Skip to Content
0
Former Member
Apr 26, 2007 at 06:43 AM

BAPI_PO_CHANGE: general questions

180 Views

I need help with BAPI_PO_CHANGE. Some things remain unclear to me:

1. I understand that the X-structures control which fields of the data-structures will be used (processed) and which not. But what's the exact meaning of the X-fields together with the structure-key. For example structure POSCHEDULEX:

PO_ITEM and SCHED_LINE is the key, but what happens if I set or unset PO_ITEMX and SCHED_LINEX?

2. For example to edit quantity and delivery date of an existing item 00010 I only need to fill table POSCHEDULE and POSCHEDULEX:

POSCHEDULE.PO_ITEM [0] = '00010'

POSCHEDULEX.PO_ITEM [0] = '00010'

POSCHEDULE.SCHED_LINE [0] = '0001'

POSCHEDULEX.SCHED_LINE [0] = '0001'

POSCHEDULE.QUANTITY [0] = 20.000

POSCHEDULEX.QUANTITY [0] = 'X'

POSCHEDULE.DELIVERY_DATE [0] = '21062007'

POSCHEDULEX.DELIVERY_DATE [0] = 'X'

I don't need to set the POSCHEDULEX.PO_ITEMX and POSCHEDULEX.SCHED_LINEX fields. That's correct, isn't it?

Why do I get a warning message returned in RETURN that reminds to set POHEADERX (SAP message below in German)

"W/ ME/ 658/ Bitte versorgen Sie auch den Schnittstellenparameter POHEADERX"? As I don't want to edit any header fields in the po I don't touch the POHEADER and POHEADERX structures. Or is it necessary to fill some of the header values?

3. To add a new item I have to set each of the X-key-fields in the X-structures, eg. POSCHEDULEX.PO_ITEMX and POSCHEDULEX.SCHED_LINEX. This works but is my observation correct? See also my question 1.

POITEM.PO_ITEM [0] = '00020'

POITEMX.PO_ITEM [0] = '00020'

POITEMX.PO_ITEMX [0] = 'X'

....

POSCHEDULE.PO_ITEM [0] = '00020'

POSCHEDULEX.PO_ITEM [0] = '00020'

POSCHEDULEX.PO_ITEMX [0] = 'X'

POSCHEDULE.SCHED_LINE [0] = '0001'

POSCHEDULEX.SCHED_LINE [0] = '0001'

POSCHEDULEX.SCHED_LINEX [0] = 'X'

...

POACCOUNT.PO_ITEM [0] = '00020'

POACCOUNTX.PO_ITEM [0] = '00020'

POACCOUNTX.PO_ITEMX [0] = 'X'

POACCOUNT.SERIAL_NO [0] = '01'

POACCOUNTX.SERIAL_NO [0] = '01'

POACCOUNTX.SERIAL_NOX [0] = 'X'

...

BTW: Again I get the warning about POHEADERX as mentioned in question 2.

4. I use the BAPI via RFC from another application. In an earlier project task I discovered that for BAPI_SALESORDER_CREATEFROMDAT2 the date fields in ORDER_SCHEDULES_IN structure (DATS data type) need to be set in format "YYYYMMDD". In BAPI_PO_CREATE1 it also worked this way. But suddenly in BAPI_PO_CHANGE I have to format the delivery date in form "DDMMYYYY". Can anyone explain this behaviour? (I set language DE on RFC logon.)

Thank you very much for your assistance!

Best regards,

Florian