07-24-2014 7:28 PM
Hi ,
I have problem with standard BAPI_PO_CREATE1 bapi function.
ERROR DETAILS
when FM:- BAPI_PO_CREATE1 first time executed getting error "Check item number 30 in table EXTENSIONIN" and PO not creating.
when using function key reverse(cntl+f12) in BAPI_PO_CREATE1 in same execution ,po document creating ,but data is not papulating custom field.
CODE USING IN MY PROGRAM
DATA :
ltab_extensionin TYPE TABLE OF bapiparex,
wa_extensionin TYPE bapiparex,
wa_BAPI_TE_MEPOITEM type BAPI_TE_MEPOITEM.
wa_bapi_te_mepoitem-po_item = wa_itab-item.
wa_bapi_te_mepoitem-zvsart = wa_itab-ship_type.
move 'BAPI_TE_MEPOITEM' to wa_extensionin-structure.
move wa_BAPI_TE_MEPOITEM to wa_extensionin-VALUEPART1 .
APPEND wa_extensionin TO ltab_extensionin.
CALL FUNCTION 'BAPI_PO_CREATE1'
EXPORTING
poheader = wa_pohead
poheaderx = wa_poheadx
testrun = ' '
IMPORTING
exppurchaseorder = v_po_number
TABLES
return = itab_return
poitem = itab_poitem
poitemx = itab_poitemx
poschedule = itab_posched
poschedulex = itab_poschedx
poshipping = itab_poshipping
poshippingx = itab_poshippingx
extensionin = ltab_extensionin.
Could one of u help me ?? .
Regards,
Nayak
07-24-2014 7:48 PM
Can you check your data?
Also provide full error details like error message number & message class.
07-24-2014 9:18 PM
Hi Sameer,
see the below error.
type id number
E MEPO 85
Regards,
Siba
07-24-2014 11:06 PM
Hello,
Error message is coming while extension in structure validation from Include - L2012F22.
Looking at above code.
Please check line item number in extension-in structure must be present in PO item table.
Regards,
07-25-2014 11:04 AM
Hi,
Try populating the ltab_extensionin as the code given below:
Maybe it can help you.
Constants: c_flag_bape_vbak TYPE char10 VALUE 'BAPE_VBAK', " Constant
c_flag_bape_vbakx TYPE char10 VALUE 'BAPE_VBAKX'," Constant
wa_bape_vbap-vbeln = space.
wa_bape_vbap-posnr = wa_order_items_in-in_linenumber.
MOVE c_flag_bape_vbak TO wa_extensionin-structure.
MOVE c_flag_bape_vbap TO wa_extensionin-structure.
CALL METHOD cl_abap_container_utilities=>fill_container_c
EXPORTING
im_value = wa_bape_vbap
IMPORTING
ex_container = wa_extensionin-valuepart1.
APPEND wa_extensionin TO it_extensionin.
CLEAR : wa_extensionin.
MOVE c_flag_bape_vbapx TO wa_extensionin-structure.
wa_extensionin-valuepart1+0(10) = space.
wa_extensionin-valuepart1+10(6) = wa_order_items_in-in_linenumber.
wa_extensionin-valuepart1+80(3) = abap_true.
APPEND wa_extensionin TO it_extensionin.
CLEAR : wa_extensionin.
Regards,
Shweta