11-19-2008 3:55 PM
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!!
11-19-2008 4:13 PM
you can use EXTENSIONIN parameter to update any fileds which is not there in the standard interface
11-19-2008 4:13 PM
you can use EXTENSIONIN parameter to update any fileds which is not there in the standard interface
11-19-2008 4:23 PM
It's for standard fields or is for Z fields?? I need change VBAP-MAGRV, it's standar field.
11-19-2008 4:29 PM
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
11-19-2008 4:24 PM
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