HI Ashish
As mentioned by Laurent check the link on how to debug . run the FM BBP_PD_SC_TRANSFER
Also check BADI BBP_TARGET_OBJTYPE
Set a watchpoint on the fields 'requisition' and 'it_procurement_item[]-OBJ_TO_GEN', and check where and why are they filled/changed. The field lt_procurement_item[]-OBJ_TO_GEN defines the type of the follow-on document (where the 1=reservation, 2=purchase requisition, 3=purchase order). If there is a problem that PR is created instead of reservation, than you need to watch the field 'purchasing'.
Also you could add the below code in your badi and then try :
IF Your condition | |
ls_item-pack_objtype = 'BUS2201'. "PO | |
CLEAR ls_item-pack_objtype. | |
MODIFY ct_item FROM ls_item TRANSPORTING pack_objtype. | |
ENDIF.
Regards Vinita | |