Skip to Content
0
Former Member
Jan 09, 2008 at 03:01 PM

Problem with Function Module

55 Views

Hi Friends,

im calling a fm(SD_DELIVERY_UPDATE_PICKING_1) to update the picking quantity during delivery creation wn ever sto is saved,inside a badi(LE_SHP_DELIVERY_PROC).Now the controll is not comming out of the code.

method IF_EX_LE_SHP_DELIVERY_PROC~SAVE_AND_PUBLISH_DOCUMENT.

data: wa_lips type lips,

it_lips TYPE TABLE OF lips,

wa_likp TYPE likp,

it_likp TYPE TABLE OF likp,

wa_komdlgn type komdlgn.

it_lips[] = it_xlips[].

it_likp[] = it_xlikp[].

read table it_lips into wa_lips index 1.

read table it_likp into wa_likp index 1.

*********************************************

data:wa_VBKOK type VBKOK.

data:wa_vbpok type vbpok,

it_VBPOK TYPE TABLE OF VBPOK.

wa_VBKOK-VBELN_VL = wa_likp-vbeln. " 0080001420

wa_VBKOK-VBTYP_VL = wa_likp-vbtyp. " J

wa_VBKOK-KODAT = wa_likp-kodat. " 01/09/2008

wa_VBPOK-VBELN_VL = wa_lips-vbeln. " 0080001420

wa_VBPOK-POSNR_VL = wa_lips-posnr. " 000010

wa_VBPOK-VBELN = wa_lips-vgbel. " 8200001248

wa_VBPOK-POSNN = wa_lips-vgpos. " 000010

wa_VBPOK-PIKMG = wa_lips-lfimg. " 1.000

wa_VBPOK-MATNR = wa_lips-matnr. " SC540206FUR2

wa_VBPOK-CHARG = wa_lips-charg. " 1000000009

wa_VBPOK-WERKS = wa_lips-werks. " 8380

append wa_vbpok to it_VBPOK.

*if wa_VBPOK-PIKMG is INITIAL.

*if sy-tcode ne 'VL02N'.

CALL FUNCTION 'SD_DELIVERY_UPDATE_PICKING_1'

EXPORTING

VBKOK_WA = wa_VBKOK

SYNCHRON = 'X'

NO_MESSAGES_UPDATE_1 = ' '

  • NICHT_SPERREN_1 = ' '

  • AUFRUFER_T_1 = ' '

  • IF_ERROR_MESSAGES_SEND_1 = 'X'

  • IF_LATE_DELIVERY_UPD = ' '

  • IT_SERNR_UPDATE =

TABLES

VBPOK_TAB = it_VBPOK.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

*commit WORK.

*endif.

  • endif.

endmethod.

plz help to solve the issue.

points wikll be awarded surelly.

after the end of execution of fm, the controll is coming back to

data: wa_lips type lips,

it_lips TYPE TABLE OF lips,

wa_likp TYPE likp,

it_likp TYPE TABLE OF likp,

wa_komdlgn type komdlgn. statemant.

and from there its not executing next time.i hv seen this in debug mode.

Edited by: SASIKANTH SM on Jan 9, 2008 8:32 PM

Edited by: SASIKANTH SM on Jan 9, 2008 8:33 PM