‎2007 Nov 23 7:24 AM
Hello,
I need to work with BAPI_PO_CREATE1, but I didn`t find the right way to fill it.
I get the error message, that there is no position and the purchase order wasn`t saved.
<i>The following parameters were used:
data: x_po_items TYPE STANDARD TABLE OF bapimepoitem WITH HEADER
LINE.
CALL FUNCTION 'BAPI_PO_CREATE1'
EXPORTING
poheader = x_po_header
poheaderx = wa_headerx
IMPORTING
exppurchaseorder = x_po_number
TABLES
return = x_bapireturn
poitem = x_po_items
poitemx = it_itemx
poschedule = x_po_items_schedules
POSCHEDULEX = it_eketx
p_x_po_items-material = <f_input>-matnr.
p_x_po_items-ematerial = <f_input>-matnr.
p_x_po_items-NET_PRICE = '12'.
p_x_po_items-stge_loc = <f_input>-lgort.
p_x_po_items-plant = p_werks.
p_x_po_items-no_rounding = 'X'.
p_x_po_items-tax_code = <f_input>-mwskz.
p_x_po_items-ret_item = 'X'.
IF p_klb = 'X'.
p_x_po_items-item_cat = '7'.
ENDIF.
APPEND p_x_po_items.</i>
<b>IS THERE SOMETHING MISSING?????</b>
Thanks for help
Nicole
‎2007 Nov 23 8:16 AM
Hello,
First fill the field x_po_items-po_item?
you must also fill the tables t_itemx, x_po_items_schedules and it_eketx. Take a look to the documentation of the function module a small working example of data is provided.
Matthias
‎2007 Nov 23 8:16 AM
Hello,
First fill the field x_po_items-po_item?
you must also fill the tables t_itemx, x_po_items_schedules and it_eketx. Take a look to the documentation of the function module a small working example of data is provided.
Matthias