Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Problems with function BAPI_PO_CREATE1

Former Member
0 Likes
348

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

1 ACCEPTED SOLUTION
Read only

matthias_fiebig
Explorer
0 Likes
298

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

1 REPLY 1
Read only

matthias_fiebig
Explorer
0 Likes
299

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