2021 Jun 27 10:24 PM
Hello Gurus,
We have so many custom fields in VBAP table and we need to update all those fields through sales order BAPIs.
The problem is that BAPI Extension "BAPIPAREX" structure has fields VALUEPART1, VALUEPART2, VALUEPART3 and VALUEPART4 and the total length is 960 only.
So if I add more fields in the structure BAPE_VBAP this will result in a dump.
I didn't find any OSS notes about this.
Do you have any ideas on how to achieve this purpose ?
2021 Jun 28 6:44 AM
Hi Occoro,
I have gone through the codes of BAPI "BAPI_SALESORDER_CREATEFROMDAT2".
Approach 1:
Whatever we have passed in EXTENSIONIN, it's just a move statement. Below screenshot for your reference.
So, we can append the BAPIPAREX to add a "VALUEPART5" field. Its just a move statement. That's it.
But, to be on a better position, it will be good to test all the BAPIs that been used in your system to find out there is no impact as we are appending the standard structure. Impact analysis is necessary.
Approach 2:
You can create an implicit enhancement in the mentioned subroutine in the above screenshot. You can have a similar case statement and can fill the required table. Now, the question is, how will you get the data from your upload program to here. You can use static attribute of class to export the data from program and import it here.
Thanks,
Gourab
2021 Jun 28 7:41 AM
I don't know if it's feasible, but another possible solution could be appending new lines to the parameter EXTENSIONIN with new structures ZBAPE_VBAP and ZBAPE_VBAPX, to pass additional fields (instead of adding VALUEPART5 to BAPIPAREX). After that, try to either extend BAPE_VBAP, VBAPKOM, BAPE_VBAPX, VBAPKOMX, and extend the ABAP code to move fields from ZBAPE_VBAP to the end of BAPE_VBAP, etc.
2021 Jun 28 7:46 AM
Yes Sandra, this idea seems better than adding VALUEPART5. Once additional fields are passed to EXTENSIONIN, implicit enhancement can be created in subroutine "MS_MOVE_EXTENSTIONIN".
Thanks,
Gourab
2021 Jun 28 7:56 AM
Approach 2 also works in a similar way where there will be no extension to the BAPI extension. I was thinking to Pass the data from the Calling program to BAPI by static attribute of the class and using it inside the implement enhancement. As per you suggestion, appending a new line to the EXTENSIONIN also will work as a charm.
Thanks,
Gourab
2021 Jun 28 7:43 AM
See if there are interesting answers for the same kind of questions:
BAPIPAREX 960 site:sap.com