Skip to Content
0
Former Member
Sep 10, 2014 at 05:05 PM

Issue in BAPI_PO_CREATE1 in extension structure while populting data

352 Views


Hi,

Getting issue when populating data in custome field through bapi_po_create1.

Requiredment

Need to populate different different shipment type number in every line item ,but when i am using below code it only populating

last shipment type number in every line item while creation of STO.

Please see the below code for populating data in custome field

CLEAR wa_extensionin.
MOVE 'BAPI_TE_MEPOITEM' TO wa_extensionin-structure.

wa_bapi_te_mepoitem-po_item = wa_itab-item.
* wa_bapi_te_mepoitem-zdummy = c_x.
wa_bapi_te_mepoitem-zvsart = wa_itab-shp_type.

CONCATENATE wa_bapi_te_mepoitem-po_item
'X00000000000000000000000000000' wa_bapi_te_mepoitem-zvsart
INTO wa_extensionin-valuepart1.

APPEND wa_extensionin TO ltab_extensionin.
CLEAR wa_extensionin.

MOVE 'BAPI_TE_MEPOITEMX' TO wa_extensionin-structure.
wa_bapi_te_mepoitemx-po_item = wa_itab-item.
wa_bapi_te_mepoitemx-zvsart = 'X'.
CONCATENATE wa_bapi_te_mepoitemx-po_item
'0000000000' wa_bapi_te_mepoitem-zvsart
INTO wa_extensionin-valuepart1.
APPEND wa_extensionin TO ltab_extensionin.

please some one help me how to solve it.

Regards,

Siba