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

Adding Status flag to Bapi fm for tcode VA41

Former Member
0 Likes
516

Hi friends,

I want to add a Status flag to the Bapi_contract_creatformdata.How can i do it.

Plz help me.

Thanks ,

Ankitha.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
468

EXTENSIONIN or EXTENSIONOUT

refer this example

The extension structure of header, item and scheduling are BAPE_VBAK, BAPE_VBAP and BAPE_VBEP for the values and BAPE_VBAKX, BAPE_VBAPX and BAPE_VBEPX for flag of updating.

You should know which strcutures to be used reading the BAPI documentation.

In this case I needs to enhance the structure VBAKKOZ, VBAPKOZ and VBEPKOZ.

For example for new item fields you should add your Z-field for item in VBAP, VBAPKOZ and BAPE_VBAP; if you have added Z-FIELD in VBAPKOZ you have to insert ZZ-FIELD but as flag.

So while you're passing the data to BAPI:

BAPE_VBAP-VBELN =

BAPE_VBAP-POSNR =

BAPE_VBAP-ZFIELD1 =

BAPE_VBAP-ZFIELD2 =

...................

BAPE_VBAP-ZFIELDN =

BAPIPAREX-STRUCTURE = 'BAPE_VBAP'.

BAPIPAREX+30 = BAPE_VBAP.

APPEND BAPIPAREX TO EXTENSIONIN.

BAPE_VBAPX-VBELN =

BAPE_VBAPX-POSNR =

BAPE_VBAPX-ZFIELD1 = 'X'

BAPE_VBAPX-ZFIELD2 = 'X'

...................

BAPE_VBAPX-ZFIELDN = 'X'

BAPIPAREX-STRUCTURE = 'BAPE_VBAPX'.

BAPIPAREX+30 = BAPE_VBAPX.

APPEND BAPIPAREX TO EXTENSIONIN.

2 REPLIES 2
Read only

varma_narayana
Active Contributor
0 Likes
468

Hi..

To Enhance the BAPI

We can use the EXTENSIONIN or EXTENSIONOUT parameters where we can add the new fields .

In this bapi <b>Bapi_contract_creatformdata</b> You have EXTENSIONIN in the TABLES parameter .. you can use it .

<b>Reward if Helpful.</b>

Read only

Former Member
0 Likes
469

EXTENSIONIN or EXTENSIONOUT

refer this example

The extension structure of header, item and scheduling are BAPE_VBAK, BAPE_VBAP and BAPE_VBEP for the values and BAPE_VBAKX, BAPE_VBAPX and BAPE_VBEPX for flag of updating.

You should know which strcutures to be used reading the BAPI documentation.

In this case I needs to enhance the structure VBAKKOZ, VBAPKOZ and VBEPKOZ.

For example for new item fields you should add your Z-field for item in VBAP, VBAPKOZ and BAPE_VBAP; if you have added Z-FIELD in VBAPKOZ you have to insert ZZ-FIELD but as flag.

So while you're passing the data to BAPI:

BAPE_VBAP-VBELN =

BAPE_VBAP-POSNR =

BAPE_VBAP-ZFIELD1 =

BAPE_VBAP-ZFIELD2 =

...................

BAPE_VBAP-ZFIELDN =

BAPIPAREX-STRUCTURE = 'BAPE_VBAP'.

BAPIPAREX+30 = BAPE_VBAP.

APPEND BAPIPAREX TO EXTENSIONIN.

BAPE_VBAPX-VBELN =

BAPE_VBAPX-POSNR =

BAPE_VBAPX-ZFIELD1 = 'X'

BAPE_VBAPX-ZFIELD2 = 'X'

...................

BAPE_VBAPX-ZFIELDN = 'X'

BAPIPAREX-STRUCTURE = 'BAPE_VBAPX'.

BAPIPAREX+30 = BAPE_VBAPX.

APPEND BAPIPAREX TO EXTENSIONIN.