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: 

Field VBAP-MAGRV update??

Former Member
0 Kudos

Hi gurus,

we have an user exit in master material (MGA00001) that modifies sales order with bapi BAPI_SALESORDER_CHANGE, but field VBAP-MAGRV is not in parameters of this bapi. How Can we change this field in correct form?? Or only exist through UPDATE directly in table VBAP?

Thank you!!!

I will revvard all answers!!

1 ACCEPTED SOLUTION

Former Member
0 Kudos

you can use EXTENSIONIN parameter to update any fileds which is not there in the standard interface

4 REPLIES 4

Former Member
0 Kudos

you can use EXTENSIONIN parameter to update any fileds which is not there in the standard interface

0 Kudos

It's for standard fields or is for Z fields?? I need change VBAP-MAGRV, it's standar field.

0 Kudos

it can be used for any fields - standard or custom, which are not defined in the standard BAPi interface. look atthe documentation, and example Max gave above to see how to use that

Former Member
0 Kudos

Hi Daniel

U need to create an enanchement:

U need to use the paramenter table EXTENSIONIN (like BAPIPAREX) in order to transfer other informations (not managed by std structure of BAPI).

All item information will transfered from EXTENSIONIN to structure BAPE_VBAP, so u make sure your field is in this structure, if there isn't, u need to add it there by append structure.

U need to manage the structure BAPE_VBAPX just like BAPE_VBAP: here u need to insert the flag field.

At the end the information will be transfered from BAPE_VBAP to structure VBAPKOM, so yuo make sure your field is in this structure too, else insert it.

U need to manage the structure VBAPKOMX too.

How to fill EXTENSIONIN structure:

TABLES:  BAPE_VBAP, BAPE_VBAPX.

BAPE_VBAP-VBELN = BAPE_VBAPX-VBELN = <VBELN>.
BAPE_VBAP-POSNR = BAPE_VBAPX-POSNR = <POSNR>.

BAPE_VBAP-MAGRV = <.....>.
BAPE_VBAPX-MAGRV = 'X'.

EXTENSIONIN-STRUCTURE = 'BAPE_VBAP'.
EXTENSIONIN+30                = BAPE_VBAP.
APPEND EXTENSIONIN.

EXTENSIONIN-STRUCTURE = 'BAPE_VBAPX'.
EXTENSIONIN+30                = BAPE_VBAPX.
APPEND EXTENSIONIN.

Max