Skip to Content
0
Former Member
Apr 25, 2007 at 06:51 PM

Function Module

29 Views

Hello friends, I am using the function Module,

PM_ORDER_DATA_READ with a loop and endloop.

The first time when this function module triggers i see no problem and everything works fine.

But when it triggers the second time in the loop, it gives a short dump.

Any suggestions.

Ster

Below is the code.

LOOP AT t_resb.
    CLEAR : v_ktext,v_ingpr,v_objnr,v_lgpbe,v_bismt,
            v_mmsta,v_text,v_maktx, v_iloan, v_kostl.

    CALL FUNCTION 'PM_ORDER_DATA_READ'
      EXPORTING
        order_number          = t_resb-aufnr
*   CALL_FROM_NOTIF       =
*  IMPORTING
*   WCAUFVD               =
*   WILOA                 =
*   WRIWO1                =
       TABLES
*   IAFFHD                =
        iafvgd                = t_oper
        iresbd                = tmp_resb
*   IRIPW0                =
*   OP_PRINT_TAB          =
        ihpad_tab             = t_ihpad
*   IHSG_TAB              =
*   IHGNS_TAB             =
*   KBEDP_TAB             =
     EXCEPTIONS
       order_not_found       = 1
       itab_error            = 2
       OTHERS                = 3
              .
    IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.

    REFRESH : t_oper, tmp_resb, t_ihpad.
    CLEAR: t_oper, tmp_resb, t_ihpad.

  ENDLOOP.