08-16-2011 11:44 AM
Hello Experts!
I've met problem about FM "SD_SALESDOCUMENT_CHANGE".
Situation as below;
1, create Sales Order(#1000 item1), with Purchase requisition(#2000 item1)
2, transfer Purchase requisition(#2000 item1) to Purchase Order(#3000 item1)
3, modify address for Ship-to Customer on Sales Order(#1000 item1) by FM above.
From record of Sales Order, by this modification, schedule line at Sales Order(#1000) is once deleted, and then new schedule line is created.
At new schedule line, though Purchase requisition is same (#2000), its item is changed(item 2 is created.)
So I have two Purchase Requisition item, though I really need one! This is the problem I'm facing to!
My PGM exports data of schedule line, such as delivery date. quantity and so on, to this FM, except confirmed quantity and Purchase Requisition and its items.
I think this must cause this problem, but I have no idea what to deal with this, as this FM is normal, not add-on, so I can't add exporting item...
Is there anyone that has met same problem? and solve this one?
thanks in advance!
08-16-2011 11:57 AM
Hi
There's the paramenter table EXTENSIONIN in order to manage fields not belonging to standard parameters
Max
08-16-2011 11:57 AM
Hi
There's the paramenter table EXTENSIONIN in order to manage fields not belonging to standard parameters
Max
08-17-2011 3:33 AM
Hi, Experts.
Thanks for reply.
But, what is "EXTENSIONIN" ? and how can I use it?
If I should modify FM"SD_SALESDOCUMENT_CHANGE", as it is not allowed in my project, I need aonther solution.
Thanks in advance!
08-17-2011 4:00 AM
Hi
EXTENSIONIN is based on structure BAPIPAREX,
here you insert rhe structure name where the new field is and its value
What you need to do is to enhance the structures in order to insert the field you need to manage
For example for scheduling data the reference structures for extra-fields are BAPE_VBEP and BAPE_VBEPX,
so you need to check these structure in order to verify if your fields is just included else you need to enhance them (by append structure)
The code to fill EXTENSIONIN will be:
DATA: W_EXTENSIONIN TYPE BAPIPAREX.
DATA: T_EXTENSIONIN TYPE TABLE OF BAPIPAREX.
DATA: W_BAPE_VBEP TYPE BAPIPAREX.
DATA: W_BAPE_VBEPX TYPE BAPIPAREX.
CLEAR: W_BAPE_VBEP, W_BAPE_VBEPX.
W_BAPE_VBEP-VBELN = ............
W_BAPE_VBEP-POSNR = .............
W_BAPE_VBEP-ETENR = ............
W_BAPE_VBEPX-VBELN = W_BAPE_VBEP-VBELN.
W_BAPE_VBEPX-POSNR = W_BAPE_VBEP-POSNR.
W_BAPE_VBEPX-ETENR = W_BAPE_VBEP-ETENR.
W_BAPE_VBEP-<field1> = ...............
W_BAPE_VBEP-<field2> = ...............
.........................................
W_BAPE_VBEP-<fieldn> = ..............
W_BAPE_VBEPX-<field1> = 'X'.
W_BAPE_VBEPX-<field2> = 'X'.
.........................................
W_BAPE_VBEPX-<fieldn> = 'X'.
CLEAR W_EXTENSIONIN.
W_EXTENSIONIN-STRUCTURE = 'BAPE_VBEP'.
W_EXTENSIONIN+30 = W_BAPE_VBEP.
APPEND W_EXTENSIONIN TO T_EXTENSIONIN.
CLEAR W_EXTENSIONIN.
W_EXTENSIONIN-STRUCTURE = 'BAPE_VBEPX'.
W_EXTENSIONIN+30 = W_BAPE_VBEPX.
APPEND W_EXTENSIONIN TO T_EXTENSIONIN.
You also need to checl the structures VBEPKOM and VBEPKOMX: if your extra-fields aren't here, you need to add them
Max
10-18-2011 4:52 AM
Hi,
Thanks for your reply, but I'm still have problems.
I add extensionin to CALL FUNCTION 'SD_SALESDOCUMENT_CHANGE',
but still I can't set purchase requirement item number in Sales Order's schedule line.
When i use this FM, new item is created at Purchase Requirement and its number is set at Schedule line of Sales document.,,
Well, I think I was setting another point as issue..
I want not to modify purchase requirement. That's the point!
Is anyone who can help me?
Thanks in advance!
Edited by: shizukya on Oct 23, 2011 10:04 AM