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

Problem in Function Module

Former Member
0 Likes
423

Hi every one

i have strange problem in FM

when iam debugging the program iam getting the values in the output.

If i execute directly i am not getting the value. i am sending the code.

if i use WAIT UP TO 1 SECONDS i am getting the output.

but that is not the proper way as far as i know.

i need to populate the internal table TKOMV.

Please send the solution, it's very urgent

call function 'RV_PRICE_PRINT_REFRESH'

tables

tkomv = tkomv.

KOMK-MANDT = SY-MANDT.

KOMK-KALSM = ORDER_HEADER_OUT-KALSM.

KOMK-KAPPL = V_KAPPL.

KOMK-WAERK = ORDER_HEADER_OUT-WAERK.

KOMK-KNUMV = ORDER_HEADER_OUT-KNUMV.

KOMK-KNUMA = ORDER_HEADER_OUT-KNUMA.

KOMK-VBTYP = ORDER_HEADER_OUT-VBTYP.

KOMK-VKORG = ORDER_HEADER_OUT-VKORG.

KOMK-VTWEG = ORDER_HEADER_OUT-VTWEG.

KOMK-SPART = ORDER_HEADER_OUT-SPART.

KOMK-BUKRS = ORDER_HEADER_OUT-BUKRS_VF.

KOMK-PRSDT = ORDER_HEADER_OUT-ERDAT.

KOMK-KURST = ORDER_HEADER_OUT-KURST.

CALL FUNCTION 'RV_PRICE_PRINT_ITEM'

EXPORTING

COMM_HEAD_I = KOMK

COMM_ITEM_I = KOMP

LANGUAGE = 'E'

IMPORTING

COMM_HEAD_E = KOMK

COMM_ITEM_E = KOMP

TABLES

TKOMV = TKOMV

TKOMVD = TKOMVD.

ENDIF.

Regards

Venu

2 REPLIES 2
Read only

Former Member
0 Likes
384

The function module may be using select .. endselect in between..

<b>A select ... endselect statement gives dump when u debug it!! because of the COMMIT statement issued in between ...</b>

regards,

sai ramesh

Read only

johndeconinck
Participant
0 Likes
384

Hi Venu,

The problem is that many of these function execute the actual update in background. You can check the database if it is already updated or otherwise find yourself a BAPI that performs the same task as your functions, but that work synchronously.

Kind regards,

John.