Skip to Content
0
Former Member
Dec 13, 2007 at 10:24 AM

BAPI_SALESORDER_CHANGE

21 Views

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