2010 May 22 6:25 AM
Hi Friends,
I have appended a Structure on VBAK table and added one new filed at the end of table. Now I am using BAPI_SALESORDER_CREATEFROMDAT2. I hvae to enter value in this new added field, but don't now how to insert values during usage of this BAPI.
Can you please suggest how can I insert data in this field with the help of BAPI_SALESORDER_CREATEFROMDAT2.
Rgds Krishan Raheja
2010 May 24 12:46 PM
Fill the custom values in structure EXTENSIONIN. Structure name for VBAK is BAPE_VBAK.
Read BAPI documentation for structrue EXTENSIONIN for more details.
Sample code in BAPI documentation for filling custom fields at item level
You want to change customer field VBAP-CFIELD2 for item 20 to "XYZ" in order 4711.
The following entries are expected:
Import: BAPIVBELN-VBELN = '0000004711' Document number
BAPISDHD1X-UPDATEFLAG = 'U' UPDKZ for doc header
Tables: BAPISDITM-ITM_NUMBER = '000020' Item number
BAPISDITMX-ITM_NUMBER = '000020' Item number
+ BAPISDITMX-UPDATEFLAG = 'U' UPDKZ for item
You must complete the EXTENSION table as follows:
STRUCTURE VALUEPART1 1234561234567890123
BAPE_VBAP 0000004711000020 XYZ
BAPE_VBAPX 0000004711000020 XRegards
Vinod
2010 May 24 12:27 PM
Hi,
Use parameter EXTENSIONIN to pass your append structure to the function module.
*" TABLES
.......
*" EXTENSIONIN STRUCTURE BAPIPAREX OPTIONAL
2010 May 24 12:46 PM
Fill the custom values in structure EXTENSIONIN. Structure name for VBAK is BAPE_VBAK.
Read BAPI documentation for structrue EXTENSIONIN for more details.
Sample code in BAPI documentation for filling custom fields at item level
You want to change customer field VBAP-CFIELD2 for item 20 to "XYZ" in order 4711.
The following entries are expected:
Import: BAPIVBELN-VBELN = '0000004711' Document number
BAPISDHD1X-UPDATEFLAG = 'U' UPDKZ for doc header
Tables: BAPISDITM-ITM_NUMBER = '000020' Item number
BAPISDITMX-ITM_NUMBER = '000020' Item number
+ BAPISDITMX-UPDATEFLAG = 'U' UPDKZ for item
You must complete the EXTENSION table as follows:
STRUCTURE VALUEPART1 1234561234567890123
BAPE_VBAP 0000004711000020 XYZ
BAPE_VBAPX 0000004711000020 XRegards
Vinod