Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

VBAP BAPE_VBAP - BAPI EXTENSIONIN exceeds 960 caracters

former_member355261
Participant

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 ?

5 REPLIES 5

gdey_geminius
Contributor

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

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.

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

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

Sandra_Rossi
Active Contributor
0 Kudos

See if there are interesting answers for the same kind of questions:

BAPIPAREX 960 site:sap.com