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

Append Structure

Former Member
0 Likes
829

Hello Experts,

I have a question regarding user exit for VBAK, I know when I want to add fields to Additional Data B I have to append a structure ZAVBAK by pressing the "Append Structure" button in SE11 and add the new fields. But when I use the BAPI to create sales order. I am suppose to append the new fields in the EXTENSIONIN part using the BAPE_VBAK. Now this is where the problem comes, I would like to know how I can create the structure BAPE_VBAK.

Points will be rewards for helpful answers.

Thanks.

2 REPLIES 2
Read only

Former Member
0 Likes
686

Sorry but an extension to this question, since I also have to add additional fields for VBRK and VBRP, where can I create the BAPE_VBRK and BAPE_VBRP structures after I have appended the structures ZAVBRK and ZAVBRP. Thanks.

Read only

Former Member
0 Likes
686

Hi,

Create 'BAPE_VBAK' as follow.

Create

BAPE_VBAK : Create structure

- VBELN : Sales document

- Append strucutre : Z..._VBAK1

Create required fields: ZINDS type char4 (ex: Industry key)

VBAK table:

Append strucutre Z..._VBAK with field ZINDS type char4 similar as BAPE_VBAK.

Sales order creation:

Data : l_r_brsch TYPE bape_vbak,

l_r_brschx TYPE bape_vbakx.

Populating values for extensionin parameter for updating customer fields of structure 'BAPE_VBAK'.

extensionin-structure = 'BAPE_VBAK'.

l_r_brsch-zinds = val1.

extensionin-valuepart1 = l_r_brsch. (BAPE_VBAK work area)

append extensionin.

Populating values for Extensionin parameter to decide which customer field should be updated by providing 'X' to the customer field of structure 'BAPE_VBAKX'.

extensionin-structure = g_c_bapevbakx.

l_r_brschx-zzbrsch = 'X'

extensionin-valuepart1 = l_r_brschx.

APPEND extensionin.

Use the extensionin internal table in BAPI .