Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

implementation of BADI BBP_ECS_PO_OUT_BADI in SRM. and BBP_PO_INBOUND_BADI

Hi All,

Facing a problem in BADI can u please help me out...

I am implementing sourcing dashboard.

I am facing problem while implementing the badi BBP_ECS_PO_OUT_BADI in SRM. and BBP_PO_INBOUND_BADI in R3.

i have written following code in BBP_ECS_PO_OUT_BADI in SRM

method IF_EX_BBP_ECS_PO_OUT_BADI~BBP_B46B_PO_OUTBOUND.

data : ls_item type BBP_PDS_PO_ITEM_D.

data : w_customer_fields type BBPS_IF_CUSTOMER_FIELDS_PI.

move 'POITEM' to w_customer_fields-refobject.

move 'CATALOGID' to w_customer_fields-fieldname.

move ls_item-catalogid to w_customer_fields-container.

append w_customer_fields to ct_bapi_customer_fields.

endmethod.

i have created field zsrmcatalogid field in R3 in EKPO table.and i am now implementing the Badi in R3 for BBP_PO_INBOUND_BADI .....in extended classic scenario.

i have written following code in R3 BADI

method IF_EX_BBP_PO_INBOUND_BADI~BBP_MAP_BEFORE_BAPI.

data : wa_customer_fields type bbps_if_customer_fields,

wa_bapi_te_mepoitem type bapi_te_mepoitem,

wa_bapi_te_mepoitemx type bapi_te_mepoitemx,

wa_extensionin type bapiparex.

data : txt_960(960) type c.

read table bbp_customer_fields into wa_customer_fields with key

refobject = 'POITEM' fieldname = 'CATALOGID'.

if sy-subrc eq 0.

move wa_customer_fields-container TO

wa_bapi_te_mepoitem-zsrmcatalogid.

wa_bapi_te_mepoitemx-zsrmcatalogid = 'X'.

endif.

clear txt_960.

clear wa_extensionin.

write wa_bapi_te_mepoitem to txt_960 left-justified.

wa_extensionin-structure = 'BAPI_TE_MEPOITEM'.

wa_extensionin-valuepart1 = txt_960(240).

wa_extensionin-valuepart2 = txt_960+240(240).

wa_extensionin-valuepart3 = txt_960+480(240).

wa_extensionin-valuepart4 = txt_960+720(240).

append wa_extensionin to bapi_extensionin.

clear txt_960.

clear wa_extensionin.

write wa_bapi_te_mepoitemx to txt_960 left-justified.

wa_extensionin-structure = 'BAPI_TE_MEPOITEMX'.

wa_extensionin-valuepart1 = txt_960(240).

wa_extensionin-valuepart2 = txt_960+240(240).

wa_extensionin-valuepart3 = txt_960+480(240).

wa_extensionin-valuepart4 = txt_960+720(240).

append wa_extensionin to bapi_extensionin.

endmethod.

But its not working...

The PO details are not passed from SRM to R3.......

Can anybody help me regarding how to debug the BADI in R3.

Thanks in Advance...

Not what you were looking for? View more on this topic or Ask a question