‎2007 Feb 02 8:44 AM
Hi,
I'm using the FM BAPI_SALESORDER_CHANGE to change existing orders and their positions. The positions contain lots of user fields appended to the original VBAP structure.
The length ot this append already hast reached 1.151 characters - DDIC or 1.031 characters - ABAP. I'm planning to add an additional field to this append structure and need to change this new field via the above mentioned FM.
The problem I encounter now is within the BAPI extension structure VBAP_BAPE: This structure holds only four fields with a summed up length of 960 characters. This means I won't be able to change my new field at all.
What can I do in this case? Any hints are welcome!
Thanks,
Michael
<b>Edit: Sorry I meant BAPE_VBAP not VBAP_BAPE!</b>
Message was edited by:
Michael Fritz
‎2007 Feb 02 8:53 AM
Hi Michael,
Is it possible to split the append structure into two append structures?
In that case you can have two records in the EXTENSIONIN table.
REgards,
Ravi
‎2007 Feb 02 8:56 AM
this is the example for BAPI_SALESORDER_CREATEFROMDAT2
The extension structure of header, item and scheduling are BAPE_VBAK, BAPE_VBAP and BAPE_VBEP for the values and BAPE_VBAKX, BAPE_VBAPX and BAPE_VBEPX for flag of updating.
You should know which strcutures to be used reading the BAPI documentation.
In this case I needs to enhance the structure VBAKKOZ, VBAPKOZ and VBEPKOZ.
For example for new item fields you should add your Z-field for item in VBAP, VBAPKOZ and BAPE_VBAP; if you have added Z-FIELD in VBAPKOZ you have to insert ZZ-FIELD but as flag.
So while you're passing the data to BAPI:
BAPE_VBAP-VBELN =
BAPE_VBAP-POSNR =
BAPE_VBAP-ZFIELD1 =
BAPE_VBAP-ZFIELD2 =
...................
BAPE_VBAP-ZFIELDN =
BAPIPAREX-STRUCTURE = 'BAPE_VBAP'.
BAPIPAREX+30 = BAPE_VBAP.
APPEND BAPIPAREX TO EXTENSIONIN.
BAPE_VBAPX-VBELN =
BAPE_VBAPX-POSNR =
BAPE_VBAPX-ZFIELD1 = 'X'
BAPE_VBAPX-ZFIELD2 = 'X'
...................
BAPE_VBAPX-ZFIELDN = 'X'
BAPIPAREX-STRUCTURE = 'BAPE_VBAPX'.
BAPIPAREX+30 = BAPE_VBAPX.
APPEND BAPIPAREX TO EXTENSIONIN.
‎2007 Feb 02 8:59 AM
Ravi,
how would you do this, passing two EXTENSIONIN records?
Currently I'm doing this:
wa_bape_vbap-vbeln = vbap-vbeln.
wa_bape_vbap-posnr = vbap-posnr.
wa_bape_vbap-zzaumadm = l_tab_ihpad-parnr.
l_tab_bapiparex-structure = 'BAPE_VBAP'.
l_tab_bapiparex-valuepart1 = wa_bape_vbap.
l_tab_bapiparex-valuepart2 = wa_bape_vbap+240.
l_tab_bapiparex-valuepart3 = wa_bape_vbap+480.
l_tab_bapiparex-valuepart4 = wa_bape_vbap+720.
APPEND l_tab_bapiparex.
‎2007 Feb 02 9:05 AM
Amit,
thanks for reply. I know how to use the BAPI customer extensions 'cause I do use them in many ABAPs but my problem is I already exceed the maximum length of the BAPE_VBAP structure with user fields appended to VBAP.
‎2007 May 02 6:25 PM
Hi Michal,
I am also Facing a similar situation that the custom fileds we have added in Order Item level(BAPE_VBAP) gets exceeded the 960 characters length of structure BAPIPAREX. Did your problem got resolved? If yes please send me the details how did you overcome with this issue.
Thanks in Advance.
Ankit Sharma