Skip to Content
author's profile photo Former Member
Former Member

code in the module not triggered..

hi,

i have designed a screen with 2 radio buttons, aa and bb. its associated program is of Type M and named as

SAPMZXXXXX and screen number is 100.

i created 2 subscreens in the same program SAPMZXXXXX , number 101 and 102.

now by default the first subscreen 101 shud be displayed as the first radio button will be selected. this I achieve in

PBO of screen 100. I write a call subscreen. it is working fine.

Now to capture the user's click on second radio button and to call the second subscreen, i double clicked on the MODULE USER_COMMAND_0100 under PAI and created that module and included the code as follows:

SAVE_OK = OK_CODE.

CLEAR OK_CODE.

CASE SAVE_OK.

WHEN 'RADIO'.

IF AA = 'X'.

CALL SUBSCREEN OPTIONS_SUBSCREEN INCLUDING 'SAPMZXXX' '0101'.

ELSEIF BB = 'X'.

CALL SUBSCREEN OPTIONS_SUBSCREEN INCLUDING 'SAPMZXXX' '0102'.

ENDIF.

ENDCASE.

also i created a top include in SE38 named MZXXXXX_TOP of type Include program and included the data declarations like

DATA: AA TYPE C,

BB TYPE C.

DATA: OK_CODE TYPE SY-UCOMM,

SAVE_OK TYPE SY-UCOMM.

and finally in the main screen program SAPMZXXXXX i included this top include. under that i cud see the module included as

INCLUDE MZXXXXX_USER_COMMANI02.

whats wrong ?? its not working !! am i missing any step ??

thks

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on Jul 22, 2008 at 08:23 PM
    PROGRAM  zmodule.
    
    DATA: a value 'X',
               b.
    DATA: v_dynnr TYPE sy-dynnr value  '0200'.
    
    
    *&---------------------------------------------------------------------*
    *&      Module  USER_COMMAND_0100  INPUT
    *&---------------------------------------------------------------------*
    *       text
    *----------------------------------------------------------------------*
    MODULE user_command_0100 INPUT.
    
      IF a = 'X'.
        v_dynnr = '0200'.
      ELSE.
        v_dynnr = '0300'.
      ENDIF.
    
    ENDMODULE.                 " USER_COMMAND_0100  INPUT

    Flow logic of Fist screen.

    PROCESS BEFORE OUTPUT.
    
     MODULE STATUS_0100.
    call subscreen sub including sy-repid v_dynnr.
    
    *
    PROCESS AFTER INPUT.
     MODULE USER_COMMAND_0100.

    Regards

    Vijay babu Dudla

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 22, 2008 at 08:29 PM

    Hi,

    Put breakpoint and see if PAI event is getting triggered or not

    Make sure you assign 'FctCode' (Function code) to radio button. Until you assign function code to Radio button it will not trigger PAI event.

    Regards

    Nisarg

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Yes Nisarg, u r right, i did not assign the function code to the radio buttons and also my PAI does not seem to trigger.

      what shud be the value for the function code ? different for each radio button or what ??

      in my code i check

      CASE SAVE_OK.

      WHEN 'RADIO'.

      so shud it be RADIO for all the three ?? or what ?? please explain. anything more to do ? thanks

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.