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

Function Module Problem

Former Member
0 Likes
1,671

Hi,

I was debugging LIQS0F55 which contains a Function Module PM_NOTIFICATION_PRINT_CONTROL for print purpose.

while dubugging program doesn't enter this function module.

Since in both if and else condition the same FM is called so it must enter the FM anyway.

I think there is a field DEVICE in FM which should be added in the export parameters of FM in LIQS0F55.

IF T399J-DIALOG_PRT = SPACE.         " Print in update task ???

    CALL FUNCTION 'PM_NOTIFICATION_PRINT_CONTROL' IN UPDATE TASK
      EXPORTING
        IVIQMEL        = VIQMEL
        RIWO1          = RIWO1
        QMNUM          = VIQMEL-QMNUM
        RIWO00         = RIWO00  "FOR STATUS INFO
        PRINT_LANGUAGE = DEF_PRINT_LANGUAGE
        RQM00          = RQM00
      TABLES
        IVIQMFE        = IVIQMFE
        IVIQMMA        = IVIQMMA
        IVIQMSM        = IVIQMSM
        IVIQMUR        = IVIQMUR
        IWORKPAPER     = IWORKPAPER
        IQKAT          = IQKAT
        IHPAD_TAB      = IHPAD_TAB.

*...         commit work will be issued in F00 later.
  ELSE.                                " dialog print
    CALL FUNCTION 'PM_NOTIFICATION_PRINT_CONTROL'  "not in update task
         EXPORTING
              IVIQMEL              = VIQMEL
              RIWO1                = RIWO1          " texts workarea
              QMNUM                = VIQMEL-QMNUM
              RIWO00               = RIWO00          "FOR STATUS INFO
              PRINT_LANGUAGE       = DEF_PRINT_LANGUAGE
              RQM00                = RQM00
         TABLES
              IVIQMFE              = IVIQMFE
              IVIQMMA              = IVIQMMA
              IVIQMSM              = IVIQMSM
              IVIQMUR              = IVIQMUR
              IWORKPAPER           = IWORKPAPER
              IQKAT                = IQKAT
              IHPAD_TAB            = IHPAD_TAB
         EXCEPTIONS
              NO_WORKPAPERS_PASSED = 01.

  ENDIF.

This Device field in import parameters of FM.

DEVICE                     LIKE           ITCPP-TDDEVICE                'PRINTER '           'SCREEN' or 'PRINTER'

IVIQMEL                    LIKE           VIQMEL                               SPACE                 QMEL field string (message)

PRINT_LANGUAGE    LIKE           T390_U-PRINT_LANG           SYST-LANGU        Ausgabesprachesvorlageswert

QMNUM                    LIKE            IPRT_WA-QMNUM               SPACE                 Message number

RIWO00                     LIKE           RIWO00                               SPACE                                                                               

RIWO1                      LIKE            RIWO1                                 SPACE                                                                               

CAUFVD                   LIKE           CAUFVD                               SPACE                                                                               

ILOA                         LIKE            ILOA                                    SPACE                                                                               

O_RIWO1                LIKE              RIWO1                                SPACE                                                                               

RQM00                     LIKE           RQM00                                   SPACE                  spezielle E/A-Felder fuer Qualitätsmeldungen

Since this is the standard include program and FM i can't do R&D by adding or removing fields.

Can you suggest me that Am i thinking right?

If wrong what would be the correction.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,248

The function module is called in update task( It is called after the commit)and thus it is not going inside with normal debugging. You have to do "Update debugging" by switching on Settings->Update debugging in the debugger and then it should enter inside the function module provided you put a break point.

5 REPLIES 5
Read only

Former Member
0 Likes
1,250

The function module is called in update task( It is called after the commit)and thus it is not going inside with normal debugging. You have to do "Update debugging" by switching on Settings->Update debugging in the debugger and then it should enter inside the function module provided you put a break point.

Read only

0 Likes
1,248

Hi,

I did what you had suggested.

I placed a breakpoint at

IF T399J-DIALOG_PRT = SPACE. Switched on Update Debugging.

and I also placed a breakpoint in the source code of FM.

But still didn't enter in the FM.

Where else i should place a breakpoint?

Read only

0 Likes
1,248

After triggering the update debugging, press F8 and it should open a new window and then press F8 again to go to the FM. Make sure you re run the transaction after you have put the break point inside the source code of the FM

Read only

Former Member
0 Likes
1,248

Thanx Rudra.

That was really helpfull.

I found the Message Id - S313(IM) in Include LIQS0F55 which is saying "The shop papers are printed when you exit the transaction".

But it is not happening when I am clicking on back button in transaction QM02 for Z3 type notifications.

The code regarding this must be somewhere near this message but i am unable to find it.

Can you help me on this??

Read only

0 Likes
1,248

Hi,

What I could make out here is :

Check the condition record for Z3 type notification. If it is not there the output will not be triggered. Also make sure when you press the back button, you are selecting "Yes" on the SAVE popup. Unless the transacton is saved successfully, your output will not be triggered.

Regards,

R