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: 

BAPI_SALESORDER_CHANGE

Former Member
0 Kudos

Dear All,

i am trying to use this BAP in User Exit MV45FZZ under User Exit

userexit_save_document.

i am passing BAP like this as per my requirement

l_sapgrp = itab_vbbe-vbeln.

l_vbeln = itab_vbbe-vbeln .

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = l_vbeln

IMPORTING

output = l_vbeln.

wa_order_header_inx-updateflag = 'U'.

  • wa_order_header_inx-bill_block = 'U'.

APPEND wa_order_header_inx.

r_kwmeng = r_kwmeng - itab_vbbe-omeng.

wa_schedule-itm_number = itab_vbbe-posnr.

wa_schedule-sched_line = itab_vbbe-etenr.

APPEND wa_schedule TO itab_schedule.

wa_schedule_x-itm_number = itab_vbbe-posnr.

wa_schedule_x-sched_line = itab_vbbe-etenr.

wa_schedule_x-updateflag = 'D'.

APPEND wa_schedule_x TO itab_schedule_x.

break scherukupall.

CALL FUNCTION 'BAPI_SALESORDER_CHANGE'

EXPORTING

salesdocument = l_sapgrp

order_header_inx = wa_order_header_inx

TABLES

return = itab_return

schedule_lines = itab_schedule

schedule_linesx = itab_schedule_x.

but i am getting error "Enter Document Number"

same code when i tried to Run in normal SE38 Program it is working fine

Can any body help me in this??

Thanks & regards,

Srikanth C

3 REPLIES 3

Former Member
0 Kudos

HI

you have to pass l_vbeln instead of passing l_sapgrp as i guess. hope it works

Reward if it dose.

Thanks

Siva Kuamr

0 Kudos

Hi Shiv,

i am passing

l_sapgrp = itab_vbbe-vbeln. which is vbeln

still i am facing the error

the same section of code is running in SE 38 Program

Issue is Open Still

0 Kudos

Try to pass l_vbeln instead of l_sapgrp.

Also put the break point at the Bapi call and check whether you are passing the correct Sales Document or not.

Thanks,

Srinivas