cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping ECC PO fields to R/3 PO fields

Former Member
0 Kudos

Hi Experts,

I was trying map ECC Po fields to R/3 fields which are not mapping in standard way automatically. Like Tracking No and Good Recipient name.

I am using the BADI BBP_ECS_PO_OUT_BADI to map these fields.

However i am able to map and see those fields in the back end.

The same thing i was trying to do for the Text fields. Suppose, mapping vendor text to item text .these fields are not able to transfer through this BADI.

for this i am using the BADI BBP_PO_INBOUND_BADI in R/3 to map these fields . I am able to map and see those text fields in R/3 also. But wonder now i am not able to see Tracking No and Good Recipient name fields in R/3 .

Any pointer to solve this issue, really a help for me.

Thanks in Advance.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Did you try to implement the BADI "BBP_ECS_PO_OUT_BADI " for the text fields also?

Probably you have implemneted the BADI on SRM side as well as the badi on ECC side.The last one called is the ECC badi.So you may have to include the logic for the Tracking no field and Good Recipient name also in the ECC badi "BBP_PO_INBOUND_BADI ".Please do the chnages as mentioned and see if the field values are transferred.So include the logic for all the fields(Tracking no,GR recipient name as well as text fields) in either of the 2 BADi's (either SRM badi or ECC badi)

See these threads for more pinters /sample code:

BR,

Disha.

Former Member
0 Kudos

Hi Disha ,

Thank you so much for your reply ,

Actually i have implemted the BBP_ECS_PO_OUT_BADI this BADI only in SRM side .When i have implemeted i can see Tracking No and Goods recipient are mapping correctly in Back End . But the thing is only the text fields are not mapping the correctly. though code was correct .

So i have implemeted the BBP_PO_INBOUND_BADI BADI in the R/3 side , through this one i can able to map the text fiedls , where as this time Tracking No and Goods recipient are not mapping .Any pointers for this , will really help for me .

*See my code for BBP_ECS_PO_OUT_BADI*

*Vendor text at line item level of SRM PO should be passed to

*u2018Item Textu2019 at R/3 PO line item level.

LOOP AT it_item INTO WA_PO_ITEM.

Read table IT_LONGTEXT into wa_LONGTEXT with key Guid = WA_PO_ITEM-guid

tDid = 'ITXT'.

IF SY-SUBRC EQ 0.

W_PO_ITEM_TEXT-PO_NUMBER = WA_PO_ITEM-BE_OBJECT_ID.

W_PO_ITEM_TEXT-PO_ITEM = WA_PO_ITEM-NUMBER_INT+5(5).

W_PO_ITEM_TEXT-TEXT_ID = 'F01'.

W_PO_ITEM_TEXT-TEXT_FORM = '*'.

W_PO_ITEM_TEXT-TEXT_LINE = WA_LONGTEXT-TDLINE.

APPEND W_PO_ITEM_TEXT TO CT_BAPI_POITEM_TEXT.

ENDIF.

*Internal Note at line item level of SRM PO should be passed to

*u2018Info record noteu2019 at line item level of R/3 PO

Read table IT_LONGTEXT into wa_LONGTEXT with key Guid = WA_PO_ITEM-guid

tDid = 'NOTE'.

IF SY-SUBRC EQ 0.

W_PO_ITEM_TEXT-PO_NUMBER = WA_PO_ITEM-BE_OBJECT_ID.

W_PO_ITEM_TEXT-PO_ITEM = WA_PO_ITEM-NUMBER_INT+5(5).

W_PO_ITEM_TEXT-TEXT_ID = 'F06'.

W_PO_ITEM_TEXT-TEXT_FORM = '*'.

W_PO_ITEM_TEXT-TEXT_LINE = WA_LONGTEXT-TDLINE.

APPEND W_PO_ITEM_TEXT TO CT_BAPI_POITEM_TEXT.

ENDIF.

ENDLOOP.

*Vendor Text at PO header level should be passed onto R/3 PO header text field.

Read table IT_LONGTEXT into wa_LONGTEXT with key Guid = IS_HEADER-GUID

tDid = 'HTXT'.

IF SY-SUBRC EQ 0.

WA_Header_text-PO_NUMBER = IS_HEADER-BE_OBJECT_ID.

  • WA_Header_text-PO_ITEM = WA_PO_ITEM-NUMBER_INT+5(5).

    • WA_Header_text-PO_ITEM+4(1) = '0'.

WA_Header_text-TEXT_ID = 'F02'.

WA_Header_text-TEXT_FORM = '*'.

WA_Header_text-TEXT_LINE = WA_LONGTEXT-TDLINE.

APPEND WA_Header_text TO CT_BAPI_POHEADER_TEXT.

ENDIF.

*Map the Tracking No

LOOP AT it_item INTO WA_PO_ITEM.

Read table CT_BAPI_POITEM into WA_BAPI_ITEMS with key PO_ITEM = WA_PO_ITEM-NUMBER_INT+5(5).

WA_BAPI_ITEMS-TRACKINGNO = WA_PO_ITEM-BE_TRACKING_NO.

MODIFY TABLE CT_BAPI_POITEM FROM WA_BAPI_ITEMS TRANSPORTING trackingno.

ENDLOOP.

*The user id of the Partner Function u2018Goods recipientu2019 is map to

*R/3 Goods Recipient field

LOOP AT it_item INTO WA_PO_ITEM.

Read table IT_PARTNER into wa_partner with key P_GUID = WA_PO_ITEM-guid

PARTNER_FCT = v_grfun.

IF SY-SUBRC EQ 0.

SELECT SINGLE CHUSR

FROM BUT000

INTO v_grname

WHERE PARTNER_GUID = WA_PARTNER-PARTNER_NO.

Read table CT_BAPI_POACCOUNT into WA_POACCOUNT with key PO_ITEM = WA_PO_ITEM-NUMBER_INT+5(5).

WA_POACCOUNT-GR_RCPT = V_GRNAME.

MODIFY TABLE CT_BAPI_POACCOUNT FROM WA_POACCOUNT TRANSPORTING GR_RCPT.

ENDIF.

ENDLOOP.

endmethod.

See my code BBP_PO_INBOUND_BADI

APPEND LINES OF bbp_potextheader TO bapi_potextheader.

APPEND LINES OF BBP_POTEXTITEM TO BAPI_POTEXTITEM.

Evem i tried to map these traking no and good recipient fields in the R/ 3 , I have this piece of code in the Back end , But couldnt work for me.

  • LOOP AT BBP_POITEM INTO WA_BBP_POITEM.

  • Read table BAPI_POITEM into WA_BAPI_POITEM with key PO_ITEM =

  • WA_BBP_POITEM-PO_ITEM.

  • WA_BBP_POITEM-TRACKINGNO = WA_BBP_POITEM-TRACKINGNO.

  • MODIFY table BAPI_POITEM FROM WA_BAPI_POITEM TRANSPORTING trackingno

  • .

  • Read table BBP_POACCOUNT into wa_BBP_POACCOUNT with key PO_ITEM =

  • WA_BBP_POITEM-PO_ITEM.

  • wa_BAPI_POACCOUNT-GR_RCPT = wa_BBP_POACCOUNT-GR_RCPT.

  • MODIFY table BAPI_POACCOUNT FROM wa_BBP_POACCOUNT TRANSPORTING

  • GR_RCPT.

  • ENDLOOP.

*

  • Loop at BAPI_POITEM into wa_BAPI_POITEM.

  • Read table BAPI_POITEMX into wa_BAPI_POITEMX with key PO_ITEM =

  • wa_BAPI_POITEM-PO_ITEM.

  • wa_BAPI_POITEMX-TRACKINGNO = 'X'.

  • MODIFY table BAPI_POITEMX FROM wa_BAPI_POITEMX TRANSPORTING TRACKINGNO

*.

  • Read table BAPI_POACCOUNTX into wa_BAPI_POACCOUNTX with key PO_ITEM =

  • wa_BAPI_POITEM-PO_ITEM.

  • wa_BAPI_POACCOUNTX-GR_RCPT = 'X'.

  • MODIFY table BAPI_POACCOUNTX FROM wa_BAPI_POACCOUNTX TRANSPORTING

  • GR_RCPT.

  • Endloop.