Application Development 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: 

BAPI_PO_CREATE1 error

Former Member
0 Kudos

Hi Guys,

I was able to create PO previously however there is no conditions tab.

So what I did was add a table for the conditions tab. Below is my code snippet:

x_pocond-itm_number = x_convert-fld33.
x_pocond-cond_type = 'PMP0'.
x_pocond-cond_value = x_convert-fld21.
x_pocond-change_id = 'I'.
x_pocond-conpricdat = sy-datum.
x_pocond-currency = 'PHP'.
x_pocond-cond_st_no = '001'.
x_pocond-currency_iso = 'PHP'.
x_pocond-cond_unit = 'PC'.
x_pocond-cond_p_unt = '1'.
APPEND x_pocond TO i_pocond.
CLEAR x_pocond.


*** flags
x_pocondx-itm_number = x_convert-fld33.
x_pocondx-cond_type = 'X'.
x_pocondx-cond_value = 'X'.
x_pocondx-change_id = 'X'.
x_pocondx-conpricdat = 'X'.
x_pocondx-currency = 'X'.
x_pocondx-cond_st_no = 'X'.
x_pocondx-currency_iso = 'X'.
x_pocondx-cond_unit = 'X'.
x_pocondx-cond_p_unt = 'X'.
APPEND x_pocondx TO i_pocondx.
CLEAR x_pocondx.

What did I miss? Where is my mistake?

BAPI_PO_CREATE1 is my bapi.

Thanks.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Guys,

I know the answer

BAPIMEPOITEM-GR_IND = 'X'

BAPIMEPOITEM-IR_IND = 'X'

These two fields should always be populated.

PO created with conditions tab now.

Thanks again.

3 REPLIES 3

former_member186746
Active Contributor
0 Kudos

Hi,

Create one manually then use bapi_po_getdetail to figure out how the structures should be filled and passed on to bapi_po_create1.

Kind regards, Rob Dielemans

Former Member
0 Kudos

Hi Guys,

I did follow the bapi_po_getdetail and copied the entries of the manually created PO.

I was not able to create a po.

This is the error produced:

For items without invoice receipt, please enter price 0

Please help.

Appreciate the reply above as well.

Thanks.

Former Member
0 Kudos

Hi Guys,

I know the answer

BAPIMEPOITEM-GR_IND = 'X'

BAPIMEPOITEM-IR_IND = 'X'

These two fields should always be populated.

PO created with conditions tab now.

Thanks again.