on 02-16-2009 1:36 PM
Experts,
We want to transfer the values from our Z-fields in the shopping cart header directly to the header Z-fields of the PO. We have implemented the BBP_CREATE_PO_NEW badi in classic scenario, but no values are transferred.
following coding we did:
DATA: ls_po_extension TYPE bbps_badi_extension,
ls_bapi_po_header TYPE ZMM_SRM_EXTENSION_PO,
ls_bapi_po_headerx TYPE ZMM_SRM_EXTENSION_PO2,
CLEAR ls_header.
loop at is_sc_document-header into ls_header.
Endloop.
CLEAR: ls_po_extension, ls_bapi_po_header, ls_bapi_po_headerx.
ls_bapi_po_header-po_number = cs_po1_document-is_poheader-po_number.
ls_bapi_po_header-zzoutput = ls_header-zzoutput.
ls_bapi_po_header-ZADM_CONTACT = ls_header-ZZADM_CONTACT.
ls_bapi_po_header-ZTEC_CONTACT = ls_header-ZZTEC_CONTACT.
ls_po_extension-structure = 'BAPI_TE_MEPOHEADER'.
MOVE ls_bapi_po_header TO ls_po_extension-VALUEPART1+30.
APPEND ls_po_extension TO CS_PO1_DOCUMENT-it_extensionin.
* Inform the badi interface to read the Z-fields
ls_bapi_po_headerx-po_number = cs_po1_document-is_poheader-po_number.
ls_bapi_po_headerx-zzoutput = 'X'.
ls_bapi_po_headerx-ZADM_CONTACT = 'X'.
ls_bapi_po_headerx-ZTEC_CONTACT = 'X'.
ls_po_extension-structure = 'BAPI_TE_MEPOHEADERX'.
MOVE ls_bapi_po_headerx TO ls_po_extension-VALUEPART1+30.
APPEND ls_po_extension TO cs_po1_document-it_extensionin.
* End copy customer fields
any idea what is wrong in this code?
Regards,
Tom
Hi Tom,
did you resolve your issue?
We have the same one.
Many thanks and Regards,
Maria
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Tom,
I have had no experience with extensions but have you test the BAPI on the back-end first? I found sometimes that some errors are not trapped properly and not passed back to SRM. So, I had to create test data in R/3 and test the BAPI to figure out a couple of issues.
I am sorry that I could not help you futher . However, if you ever have to deal P/O Header Text, SAP commented that code out on the SRM-side. You have to modify the method, because I could not get SAP to do it.
Regards, Dean.
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.