on 05-27-2009 11:00 AM
I need to map the Customer Fields zprice_negotiate, zvendor_top from EBP (SRM 5,0) to ERP(SAP 640). For this purpose I use the method FILL_PO_INTERFACE1 of the BAdI BBP_CREATE_BE_PO_NEW with the following coding (an example for one field):
DATA : zpo_item TYPE ebelp,
hilfe1(13) TYPE c,
hilfe2(13) TYPE c,
hilfe3(5) TYPE c,
hilfe4(10) TYPE c,
hilfe5(35) TYPE c,
hilfe6(35) TYPE c.
it_item = is_sc_document-item.
CHECK 1 = 1 .
BREAK-POINT.
LOOP AT it_item INTO st_item.
zpo_item = '00010'.
*ZPRICE_ORIGIN
hilfe1 = st_item-zprice_origin.
hilfe2 = st_item-zprice_negotiate.
hilfe3 = st_item-zcurrency.
hilfe4 = st_item-zvendor_top.
hilfe5 = st_item-zvendor_name1.
hilfe6 = st_item-zvendor_name2.
CLEAR st_transfer.
st_transfer-structure = 'BAPI_TE_MEPOITEM'.
st_transfer-valuepart1(5) = zpo_item.
st_transfer-valuepart1+5(13) = hilfe1.
st_transfer-valuepart1+18(13) = hilfe2.
st_transfer-valuepart1+31(5) = hilfe3.
st_transfer-valuepart1+36(10) = hilfe4.
st_transfer-valuepart1+46(35) = hilfe5.
st_transfer-valuepart1+81(35) = hilfe6.
APPEND st_transfer TO cs_po1_document-it_extensionin.
st_transfer-structure = 'BAPI_TE_MEPOITEMX'.
st_transfer-valuepart1(5) = zpo_item.
st_transfer-valuepart1+5(1) = 'X'.
st_transfer-valuepart1+6(1) = 'X'.
st_transfer-valuepart1+7(1) = 'X'.
st_transfer-valuepart1+8(1) = 'X'.
st_transfer-valuepart1+9(1) = 'X'.
st_transfer-valuepart1+10(1) = 'X'.
APPEND st_transfer TO cs_po1_document-it_extensionin.
Also, the Customer Fields were added to the structures INCL_EEW_PD_ITEM_CSF and INCL_EEW_PD_ITEM_CSF_SC in SRM and to the structure BAPI_TE_MEPOITEMX and table EKPO in back-end. I suppose that the BAdI should provide the table to the BAPI BAPI_PO_CREATE, which creates the Order. BAdI is called but the mapping doesnu2019t work. Could you please suggest the cause of the problem. Was the table in the BAdI correctly filled? Is there another way to map these fields?
Hi,
Go through the sample coding provided in Wiki:
https://www.sdn.sap.com/irj/scn/wiki?path=/display/srm/bbp_create_be_po_new-CreatePOin+backend
Thanks,
Pradeep
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.