Skip to Content
0
Former Member
Apr 09, 2010 at 04:18 PM

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

758 Views

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.