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

How to insert header condition type when create PO with 'BAPI_PO_CREATE1' ?

Former Member
0 Likes
2,183

Hi, guys,

Currently, I'm using a BAPI function module 'BAPI_PO_CREATE1' in my customised program in order to create a new purchase oder document. And in the tables POCONDHEADER and POCONDHEADERX for this bapi function. I make it like the following:

bapi_pocondheader-itm_number = '000000'.

bapi_pocondheader-cond_type = 'HB00'.

bapi_pocondheader-cond_value = 10.00.

bapi_pocondheader-currency = 'SGD'.

bapi_pocondheader-change_id = 'I'.

APPEND bapi_pocond.

bapi_pocondheaderx-itm_number = '000000'.

bapi_pocondheaderx-itm_numberx = 'X'.

bapi_pocondheaderx-cond_type = 'X'.

bapi_pocondheaderx-cond_value = 'X'.

bapi_pocondheaderx-currency = 'X'.

bapi_pocondheaderx-change_id = 'X'.

APPEND bapi_pocondx.

bapi_pocondheader-itm_number = '000000'.

bapi_pocondheader-cond_type = 'RA01'.

bapi_pocondheader-cond_value = 25.00.

bapi_pocondheader-currency = 'SGD'.

bapi_pocondheader-change_id = 'I'.

APPEND bapi_pocond.

bapi_pocondheaderx-itm_number = '000000'.

bapi_pocondheaderx-itm_numberx = 'X'.

bapi_pocondheaderx-cond_type = 'X'.

bapi_pocondheaderx-cond_value = 'X'.

bapi_pocondheaderx-currency = 'X'.

bapi_pocondheaderx-change_id = 'X'.

APPEND bapi_pocondx.

CALL FUNCTION 'BAPI_PO_CREATE1'

EXPORTING

POHEADER =

POHEADERX =

TABLES

RETURN =

POITEM =

POITEMX =

POCONDHEADER = bapi_pocondheader

POCONDHEADERX = bapi_pocondheaderx

POCOND =

POCONDX =

.

Although it can create a new PO document, but it's header pricing with the condition type that I put didn't inserted into the new PO document. Does anyone how to fix it?

Thanks in advance.

Hi, guys,

Currently, I'm using a BAPI function module 'BAPI_PO_CREATE1' in my customised program in order to create a new purchase oder document. And in the tables POCONDHEADER and POCONDHEADERX for this bapi function. I make it like the following:

bapi_pocondheader-itm_number = '000000'.

bapi_pocondheader-cond_type = 'HB00'.

bapi_pocondheader-cond_value = 10.00.

bapi_pocondheader-currency = 'SGD'.

bapi_pocondheader-change_id = 'I'.

APPEND bapi_pocond.

bapi_pocondheaderx-itm_number = '000000'.

bapi_pocondheaderx-itm_numberx = 'X'.

bapi_pocondheaderx-cond_type = 'X'.

bapi_pocondheaderx-cond_value = 'X'.

bapi_pocondheaderx-currency = 'X'.

bapi_pocondheaderx-change_id = 'X'.

APPEND bapi_pocondx.

bapi_pocondheader-itm_number = '000000'.

bapi_pocondheader-cond_type = 'RA01'.

bapi_pocondheader-cond_value = 25.00.

bapi_pocondheader-currency = 'SGD'.

bapi_pocondheader-change_id = 'I'.

APPEND bapi_pocond.

bapi_pocondheaderx-itm_number = '000000'.

bapi_pocondheaderx-itm_numberx = 'X'.

bapi_pocondheaderx-cond_type = 'X'.

bapi_pocondheaderx-cond_value = 'X'.

bapi_pocondheaderx-currency = 'X'.

bapi_pocondheaderx-change_id = 'X'.

APPEND bapi_pocondx.

CALL FUNCTION 'BAPI_PO_CREATE1'

EXPORTING

POHEADER =

POHEADERX =

TABLES

RETURN =

POITEM =

POITEMX =

POCONDHEADER = bapi_pocondheader

POCONDHEADERX = bapi_pocondheaderx

POCOND =

POCONDX =

.

Although it can create a new PO document, but it's header pricing with the condition type that I put didn't inserted into the new PO document. Does anyone how to fix it?

Thanks in advance.

2 REPLIES 2
Read only

Former Member
0 Likes
1,289

Anyone know about this?

Read only

0 Likes
1,289

Hi,

Check whether these pricing conditions are marked as "manual" in PO pricing procedure, if it is not defined as manual, Bapi may not populate these pricing conditions while creating Purchase Order.

Regards

Vinod