Application Development 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: 

Problem in using BAPI_HU_CREATE ?

Former Member
0 Kudos

Hi All,

I am using BAPI_HU_CREATE to create HUs, it is creating HU items. that s ok. after that i am using

BAPI_HU_CHANGE_HEADER, to change some header details. this is also ok. fine. What i observed here is i checked in VEPO table

For example : i created hu for 2 line items, BAPI_HU_CREATE creating 2 line items it is taking vbeln different no. and posnr also 1 and 2. after BAPI_HU_CHANGE_HEADER again 2 more line itesm created with correct vbeln and posnr as 10 20 both are correct.

why it is happened like this???

and one more is.. in VEKP Table first in BAPI_HU_CREATE, VPOBJ and VPOBJKEY values are different i changed these values in

BAPI_HU_CHANGE_HEADER , so correct values are coming, that means correct vbeln and posnr. before why it is taking

VPOBJKEY randomly??

Now total 4 records are there in table?? What should i do now?

Thanks,

Venkat.

3 REPLIES 3

Former Member
0 Kudos

Hi Venkat,

Are you sure you are clearing the variables appropriately, i mean before you start building the data for "BAPI_HU_CREATE" are you doing a clear/refresh on the corresponding variables?

Regards,

Chen

0 Kudos

Hi, Thanks for your reply,

No i am not clearing anything.

Thanks,

Venkat.

0 Kudos

On the contrary, what i meant was when you are calling the BAPI - "BAPI_HU_CREATE" is the input data as you want it to be, have tried checking the values just before the call is made?

Regards,

Chen