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

BAPI entension

Former Member
0 Likes
695

Hi Friends,

I need to use BAPI_INQUIRY_CREATEFROMDATA2. I've used it in my code & its working fine. But I have almost 25 fields Z fields appended in VBAP. I need to update the same while creating enquiry/ Order/ Contract.

I tried all the ways available in SDN & even tried the way in SP note 143580 but didn;t get success. If anyone has done it, kindly provide me the step by step procedure & code extract. It'd be big help for me.

Thanks:

Gaurav

2 REPLIES 2
Read only

Former Member
0 Likes
636

Hello,

you could use something like this:

data: l_wa_bapi_ex type y_bapiparex.

data: l_valuepart type valuepart.

l_wa_bapi_ex-structure = 'BAPE_VBAP'.

clear l_valuepart.

l_valuepart+10(6) = l_wa_zuskont-posnr_sap. "Position nr.

l_valuepart+16(6) = l_wa_zuskont-zzxxx.

l_valuepart+22(5) = l_wa_zuskont-zzyyy.

l_wa_bapi_ex-valuepart1 = l_valuepart.

append l_wa_bapi_ex to p_int_bapi_ex.

....

But:

make sure that your customer fields are defined in the tables VBAPKOZ, VBAPKOZX, BAPE_VBAP and BAPE_VBAPX.

And: i never managed to fill something other then character type fields..

The first 10 bytes of the first value part contain the Order/inquiry number - if you have one. Else, if you create a new document with an internal number, they remain empty.

Regards

Wolfgang

Read only

Former Member
0 Likes
636

Can you provide the code snippet of how you are updating the extension structures? and also are you getting error message or z fields are not getting update?