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

unable to update customised fields through standard BAPI

Former Member
0 Likes
1,111

Hi! All,

We are using BAPI_CONTRACT_CREATEFROMDATA to create contract through conversion program.

Now some new customised fields are added in VA41 which needs to be updated through the same BAPI.

We have used extensionin structure BAPE_VBAP and BAPE_VBAPX as well activated the TABLES

parameter in the named EXTENSIONIN but still the fields are not getting updated when we display contract through

VA43.But contract is getting created properly.

structures as mentioned in BAPI documentation are all being maintained but still no result.

What may be the reasons behind this no updation in transaction.

thanks

ABAP developer1

Hi! All,

We are using BAPI_CONTRACT_CREATEFROMDATA to create contract through conversion program.

Now some new customised fields are added in VA41 which needs to be updated through the same BAPI.

We have used extensionin structure BAPE_VBAP and BAPE_VBAPX as well activated the TABLES

parameter in the named EXTENSIONIN but still the fields are not getting updated when we display contract through

VA43.But contract is getting created properly.

structures as mentioned in BAPI documentation are all being maintained but still no result.

What may be the reasons behind this no updation in transaction.

thanks

ABAP developer1

2 REPLIES 2
Read only

venkatesan_nagiah
Active Participant
0 Likes
841

The following description uses an example to explain how to proceed with

customer enhancements to the SD tables VBAK, VBKD, VBAP and VBEP.

The customer has added their own fields to table VBAP using the INCLUDE

structure CUTEST. This structure contains 2 fields:

CFIELD1, CHAR 10

CFIELD2, CHAR 3.

The customer also requires that these two fields can be maintained with

the BAPI.

1. Maintain structure CUTEST in table VBAP

2. Because the BAPIs work with checkboxes, you must also define a

CUTESTX checkbox for the customer structure. It should be structured

like this:

Field name Data element

CFIELD1 CHAR1

CFIELD2 CHAR1

3. Define these customer structures in the structures VBAPKOZ und

VBAPKOZX using INCLUDE or APPEND.

4. Add the customer structures to the BAPE_VBAP and BAPE_VBAPX BAPI

structures using the APPEND technique.

5. Adjust the following structures for customer enhancements to table

VBAK:

a) VBAKKOZ

b) VBAKKOZX

c) BAPE_VBAK

d) BAPE_VBAKX

6. Adjust the following structures for customer enhancements to table

VBEK:

a) VBEPKOZ

b) VBEPKOZX

c) BAPE_VBEP

d) BAPE_VBEPX

7. Generally, the data should be added to the BAPI interface in the

internal communication structures (VBAKKOM, and so on). There, you

can process the data in the SD tables (VBAK, and so on).

8. If the EXTENSIONIN parameter contains customer data, you must

complete at least the key fields in the relevant standard

parameters.

For example:

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

venkat

Read only

Former Member
0 Likes
841

ABAP developer,

After calling BAPI_CONTRACT_CREATEFROMDATA you must check results and then call either BAPI_TRANSACTION_COMMIT or BAPI_TRANSACTION_ROLLBACK depending on outcome of first BAPI. Without calling BAPI_TRANSACTION_COMMIT the database will not be updated.

Please check and post back with further questions or confirmation to close issue.

Thanks,

Todd