Application Development and Automation 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: 
Read only

Structure Appended on VBAK table, BAPI use for inserting data in new field

Former Member
0 Likes
1,897

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,302

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       X

Regards

Vinod

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

2 REPLIES 2
Read only

Former Member
0 Likes
1,302

Hi,

Use parameter EXTENSIONIN to pass your append structure to the function module.

*" TABLES

.......

*" EXTENSIONIN STRUCTURE BAPIPAREX OPTIONAL

Read only

Former Member
0 Likes
1,303

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       X

Regards

Vinod