Regarding Module Pool's Cancel button

Hi Guys,
Please help me I have created on Module Pool and now this module pool is called through a a UserExit .
now the thing is if i cancel button which is placed on my popup screen then it is still going into the output which is wrong it should show up the previous screen.
My code for the Sy-ucomm = cancel is
IF SY-UCOMM = 'CANC'.
    SET SCREEN 0.
    LEAVE SCREEN.
  ENDIF.
Can you please provide me some code by which i can go to the previous screen.

I am calling the Module pool through User exit and inside user exit i am calling FM which calls my screen.
Userexit -> FM -> ModulePool
here is the code :
***INCLUDE LZRMA_NOTIFO01 .
*&      Module  STATUS_0150  OUTPUT
*       text
MODULE STATUS_0150 OUTPUT.
*  SET PF-STATUS SY-DYNNR.
*  SET TITLEBAR SY-DYNNR.
ENDMODULE.                 " STATUS_0150  OUTPUT
*&      Module  CUA_STATUS  OUTPUT
*       text
MODULE CUA_STATUS OUTPUT.
*  SET PF-STATUS SY-DYNNR.
*  SET TITLEBAR SY-DYNNR.
ENDMODULE.                 " CUA_STATUS  OUTPUT
*&      Module  EXIT_SCREEN  INPUT
*       text
MODULE EXIT_SCREEN INPUT.
  DATA:      C_FCODE_ABBR   LIKE SY-PFKEY  VALUE 'ABBR' .
break-point.
  CASE OK-CODE.
    WHEN C_FCODE_ABBR.
*-- Abbrechen
*   Daten zurücknehmen
      CLEAR RQM01.
*      RAISE CANCEL.
      set screen 0.
      LEAVE TO SCREEN 0.
        call transaction 'QM01'.
  ENDCASE.
IF SY-UCOMM = 'CANC'. "  Here is the SY-UCOMM Where i have to handle the CANC BUTTON
*    SET SCREEN 0.
*    LEAVE SCREEN.
   LEAVE PROGRAM.
  ENDIF.
ENDMODULE.                 " EXIT_SCREEN  INPUT
*&      Module  CHECK_NOTIF_NO  INPUT
*       text
MODULE CHECK_NOTIF_NO INPUT.
*& Below condition checks if the user enter a Notification Num and Porduction
*  Order Then Message comees Please enter a Prod Order or RMA Notif Num only
*  Process cannot accept both.
  IF NOT VIQMEL-QMNUM IS INITIAL.
    IF NOT RQM01-FERTAUFNR IS INITIAL.
      MESSAGE E904(QM).    "  Please enter a Prod order or RMA Notif Num only.
                              "  Process can't accept both
    ENDIF.
  ENDIF.
*& If Production order is entered, then check if the Order type is 'AES1' or *
*&  'AES3'AES2,AES4, AES5, AES6,ICSO, PM01, PM02, RMA, SM01, SM02, ZEXR,
*&   Message flashes ' Please enter only enter RMA Notif Number.       *
  data: v_dauat like afpo-dauat.
  SELECT SINGLE DAUAT INTO V_DAUAT FROM AFPO WHERE AUFNR = RQM01-FERTAUFNR.
  if sy-subrc = 0.
    IF V_DAUAT = 'AES1' OR V_DAUAT = 'AES3' OR
       V_DAUAT = 'AES2' OR V_DAUAT = 'AES4' OR
       V_DAUAT = 'ICSO' OR V_DAUAT = 'PM01' OR
       V_DAUAT = 'PM01' OR V_DAUAT = 'RMA' OR
       V_DAUAT = 'SM01' OR V_DAUAT = 'SM02' OR V_DAUAT = 'ZEXR'..
      MESSAGE E905(QM).    " Please Only enter a RMA Notif Number.
    ENDIF.
  endif.
ENDMODULE.                 " CHECK_NOTIF_NO  INPUT
*&      Module  FEAUF_SAAUF_CHECK  INPUT
*       text
MODULE FEAUF_SAAUF_CHECK INPUT.
  OK-CODE = SY-UCOMM.
*Added by CChauhan
  IF VIQMEL-QMNUM IS INITIAL.
*& End of Addition by CChauhan
    IF  NOT RQM01-FERTAUFNR IS INITIAL
    AND ( NOT RQM01-VERID IS INITIAL
         OR NOT RQM01-RM_WERKS IS INITIAL
         OR NOT RQM01-RM_MATNR IS INITIAL ).
*   only production order or manufacturing version meaningfully
      MESSAGE E902(QM).
    ENDIF.
*Added by CChauhan
  ENDIF.
*& End of Addition by CChauhan
ENDMODULE.                 " FEAUF_SAAUF_CHECK  INPUT
*&      Module  FEAUF_FEPOS_CHECK  INPUT
*       text
MODULE FEAUF_FEPOS_CHECK INPUT.
  IF VIQMEL-QMNUM = ''.
    IF      RQM01-FERTAUFNR = ''
    AND RQM01-FERTVORNR <> ''.
      MESSAGE E903(QM).
    ENDIF.
  ENDIF.
  IF SY-UCOMM = 'CANC'.
    LEAVE SCREEN.
  ENDIF.
ENDMODULE.                 " FEAUF_FEPOS_CHECK  INPUT
*&      Module  FAUF_LESEN  INPUT
*       text
MODULE FAUF_LESEN INPUT.
*& Added by CChauhan  Date: 01/23/2007
*& Execute further if RMa_Notif(VIQMEL-QMNUM)ield is blank.
IF VIQMEL-QMNUM IS INITIAL.
*&End by CChauhan     Date: 01/23/2007
    PERFORM FAUF_LESEN USING RQM01-FERTAUFNR
                             RQM01-FERTVORNR
                    CHANGING CAUFV
                             AFVC.
*   Belegdaten an Qualitätsmeldung übergeben
    PERFORM FAUF_TO_QMEL USING CAUFV
                               AFVC
                      CHANGING RQM01.
*& Added by CChauhan  Date: 01/23/2007
ENDIF.
*&End by CChauhan     Date: 01/23/2007
ENDMODULE.                 " FAUF_LESEN  INPUT
*&      Form  FAUF_LESEN
*       text
*      -->P_RQM01_FERTAUFNR  text
*      -->P_RQM01_FERTVORNR  text
*      <--P_CAUFV  text
*      <--P_AFVC  text
FORM FAUF_LESEN USING VALUE(P_AUFNR) LIKE RQM01-FERTAUFNR
                      VALUE(P_VORNR) LIKE RQM01-FERTVORNR
             CHANGING VALUE(P_CAUFV) LIKE CAUFV
                      VALUE(P_AFVC)  LIKE AFVC .
  CALL FUNCTION 'QMHL_HELP_FAUF'
    EXPORTING
      I_AUFNR             = P_AUFNR
      I_VORNR             = P_VORNR
      I_FOLGE             = G_FOLGE
    IMPORTING
      E_CAUFV             = P_CAUFV
      E_AFVC              = P_AFVC
    EXCEPTIONS
      ORDER_NOT_FOUND     = 1
      OPERATION_NOT_FOUND = 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.
ENDFORM.                    " FAUF_LESEN
*&      Form  FAUF_TO_QMEL
*       text
*      -->P_CAUFV  text
*      -->P_AFVC  text
*      <--P_RQM01  text
FORM FAUF_TO_QMEL USING VALUE(P_CAUFV) LIKE CAUFV
                        VALUE(P_AFVC)  LIKE AFVC
               CHANGING       P_RQM01  LIKE RQM01.
* zunächst Berechtigung für Meldungsart/Werk prüfen
  PERFORM CHECK_QAUT_QMEL USING SY-TCODE
                                TQ80-QMART
                                P_CAUFV-WERKS.
* Materialnummer des Fertigprodukts ermitteln
  SELECT * FROM AFPO
  WHERE AUFNR = P_CAUFV-AUFNR.
* Materialnummer steht in der ersten Auftragsposition
    EXIT.
  ENDSELECT.
  IF SY-SUBRC IS INITIAL.
*   Materialnummer übernehmen
    P_RQM01-MATNR  = AFPO-MATNR.
    IF NOT AFPO-MATNR IS INITIAL.
      PERFORM MATERIAL_CHECK USING AFPO-MATNR.
    ENDIF.
*   Charge
    P_RQM01-CHARG     =  AFPO-CHARG.
*--- Lieferantencharge bestimmen
    IF NOT P_RQM01-CHARG IS INITIAL.
      SELECT SINGLE * INTO MCHA FROM MCHA
              WHERE MATNR =  P_RQM01-MATNR
              AND   WERKS =  P_RQM01-MAWERK
              AND   CHARG =  P_RQM01-CHARG.
      IF SY-SUBRC EQ 0.
        MOVE MCHA-LICHA TO P_RQM01-LICHN.
      ENDIF.
    ENDIF.
    P_RQM01-LGORTCHAR =  AFPO-LGORT.
  ENDIF.
  P_RQM01-MAWERK    =  P_CAUFV-WERKS.
  IF NOT AFPO-MATNR IS INITIAL
    AND  NOT P_CAUFV-WERKS IS INITIAL.
    PERFORM MATERIAL_WERK_CHECK USING AFPO-MATNR
                                      P_CAUFV-WERKS.
  ENDIF.
* Revisionsstand
  P_RQM01-REVLV     =   P_CAUFV-REVLV.
* reklamierte Menge
  P_RQM01-RKMNG     =   P_CAUFV-GAMNG - P_CAUFV-GASMG.
  P_RQM01-BZMNG     =   P_CAUFV-GAMNG - P_CAUFV-GASMG.
  P_RQM01-MGEIN     =   P_CAUFV-GMEIN.
* Arbeitsplatz
  P_RQM01-ARBPL = P_AFVC-ARBID.
* eindeutiger Schluessel fuer Vorgang
  P_RQM01-FERTAUFPL = P_AFVC-AUFPL.
  P_RQM01-PNLKN     = P_AFVC-APLZL.
* Info über automatische Datenübernahme
  MESSAGE S026(QM) WITH P_CAUFV-AUFNR RQM01-FERTVORNR.
ENDFORM.                    " FAUF_TO_QMEL
*&      Form  CHECK_QAUT_QMEL
*       text
*      -->P_SY_TCODE  text
*      -->P_TQ80_QMART  text
*      -->P_P_CAUFV_WERKS  text
FORM CHECK_QAUT_QMEL USING VALUE(P_TCODE)
                           VALUE(P_QMART)
                           VALUE(P_WERK).
  CHECK NOT P_WERK IS INITIAL.
  MOVE-CORRESPONDING RQM01 TO H_VIQMEL.
  CALL FUNCTION 'QAUT_QMEL'
    EXPORTING
      I_WERKS  = P_WERK
      I_QMART  = P_QMART
      I_TCODE  = P_TCODE
      I_VIQMEL = H_VIQMEL.
ENDFORM.                    " CHECK_QAUT_QMEL
*&      Form  MATERIAL_CHECK
*       text
*      -->P_AFPO_MATNR  text
FORM MATERIAL_CHECK USING  VALUE(P_MATNR).
*-- lokale Daten
  DATA : BEGIN OF L_DUMMY_TAB OCCURS 0,
           DUMMY(1),
         END   OF L_DUMMY_TAB.
* Prüfung nur, falls Materialnummer und Werk gefüllt
  CHECK NOT P_MATNR IS INITIAL.
* Verprobung auf MARA-Segment
  MOVE C_MARA_SEGMENT TO MTCOM-KENNG.
  MOVE P_MATNR        TO MTCOM-MATNR.
  TABLES: MTCOR.
  CALL FUNCTION 'MATERIAL_READ'
    EXPORTING
      SCHLUESSEL           = MTCOM
    IMPORTING
      MATDATEN             = MARA
      RETURN               = MTCOR
    TABLES
      SEQMAT01             = L_DUMMY_TAB
    EXCEPTIONS
      ACCOUNT_NOT_FOUND    = 01
      BATCH_NOT_FOUND      = 02
      FORECAST_NOT_FOUND   = 03
      LOCK_ON_ACCOUNT      = 04
      LOCK_ON_MATERIAL     = 05
      LOCK_ON_PLANT        = 06
      LOCK_ON_SALES        = 07
      LOCK_ON_SLOC         = 08
      LOCK_SYSTEM_ERROR    = 09
      MATERIAL_NOT_FOUND   = 10
      PLANT_NOT_FOUND      = 11
      SALES_NOT_FOUND      = 12
      SLOC_NOT_FOUND       = 13
      SLOCNUMBER_NOT_FOUND = 14
      SLOCTYPE_NOT_FOUND   = 15
      TEXT_NOT_FOUND       = 16
      UNIT_NOT_FOUND       = 17.
  CASE SY-SUBRC.
    WHEN C_RC00.
*       alles o.k.
      RQM01-MATKL = MARA-MATKL.
      RQM01-PRDHA = MARA-PRDHA.
    WHEN C_RC10.
      MESSAGE E005(QM) WITH P_MATNR.
  ENDCASE.
* Beim Material sitzt Loeschvormerkung.
  IF NOT MTCOR-LVORM IS INITIAL.
    MESSAGE W008(M3).
  ENDIF.
ENDFORM.                    " MATERIAL_CHECK
*&      Form  MATERIAL_WERK_CHECK
*       text
*      -->P_AFPO_MATNR  text
*      -->P_P_CAUFV_WERKS  text
FORM MATERIAL_WERK_CHECK USING VALUE(P_MATNR)
                               VALUE(P_WERK).
*-- local data
  DATA : BEGIN OF L_DUMMY_TAB OCCURS 0,
           DUMMY(1),
         END   OF L_DUMMY_TAB.
* Examination only, if materials number and work filled
  CHECK (    NOT P_MATNR IS INITIAL
         AND NOT P_WERK  IS INITIAL ).
* Checking on MARC segment
  MOVE C_MARC_SEGMENT TO MTCOM-KENNG.
  MOVE P_MATNR        TO MTCOM-MATNR.
  MOVE P_WERK         TO MTCOM-WERKS.
  CALL FUNCTION 'MATERIAL_READ'
    EXPORTING
      SCHLUESSEL           = MTCOM
    IMPORTING
      MATDATEN             = MARC
    TABLES
      SEQMAT01             = L_DUMMY_TAB
    EXCEPTIONS
      ACCOUNT_NOT_FOUND    = 01
      BATCH_NOT_FOUND      = 02
      FORECAST_NOT_FOUND   = 03
      LOCK_ON_ACCOUNT      = 04
      LOCK_ON_MATERIAL     = 05
      LOCK_ON_PLANT        = 06
      LOCK_ON_SALES        = 07
      LOCK_ON_SLOC         = 08
      LOCK_SYSTEM_ERROR    = 09
      MATERIAL_NOT_FOUND   = 10
      PLANT_NOT_FOUND      = 11
      SALES_NOT_FOUND      = 12
      SLOC_NOT_FOUND       = 13
      SLOCNUMBER_NOT_FOUND = 14
      SLOCTYPE_NOT_FOUND   = 15
      TEXT_NOT_FOUND       = 16
      UNIT_NOT_FOUND       = 17.
  CASE SY-SUBRC.
    WHEN C_RC00.
*       alles o.k.
      RQM01-KZDKZ = MARC-KZDKZ.
      RQM01-KZKRI = MARC-KZKRI.
    WHEN C_RC11.
      MESSAGE E004(QM) WITH P_MATNR
                            P_WERK.
    WHEN C_RC10.
      MESSAGE E005(QM) WITH P_MATNR.
  ENDCASE.
ENDFORM.                    " MATERIAL_WERK_CHECK
*&      Module  FCODE  INPUT
*       text
MODULE FCODE INPUT.
*& Inserted by CC  01/24/2007
  II_VIQMEL-FERTAUFNR = RQM01-FERTAUFNR.
*& End by CC   01/24/2007
  PERFORM FCODE USING OK-CODE.
ENDMODULE.                 " FCODE  INPUT
*&      Form  FCODE
*       text
*      -->P_OK_CODE  text
FORM FCODE USING VALUE(P_FCODE) LIKE SY-TCODE.
  CASE P_FCODE.
    WHEN C_FCODE_ENT1.
*-- Weiter
      SET SCREEN 0.
      LEAVE SCREEN.
  ENDCASE.
  IF SY-UCOMM = 'CANC'.
    SET SCREEN 0.
    LEAVE SCREEN.
  ENDIF.
ENDFORM.                    " FCODE

Similar Messages

  • Regarding Module Pool Screen Painter

    Dear All,
    Hi all. When i am using 4.7 i am able to see all the icons like check box .radio buttons,push buttons ,table control and all . There i can drag  and drop on the screen easily . I can see this all icons on the left side in the screen painter.  In ecc  i tried to create a module pool program. In that screen painter i am not able to see these icons in that screen .
    When i am clicking on layout on initial screen it is showing ''''EU_SCRP_WN32 : timeout during allocate / CPIC-CALL: 'ThSAPCMRCV' '''' . That is also in text format with some lines and all.  I was totally struck here . Please help me in  this .
    Regards,
    Madhu.

    How can you solve the problem ? Please explain it.

  • Regarding module pool with alv

    hi experts,
                  i have developed a module pool program in which the data is coming  in the table control ,what the user wants that on clicking one push button a alv report will come depending upon the data which i enterd in the selection screen of the module pool,,for this what sud i write under the push button plz help me....

    Hi
    In the table control keep a Button
    First select the Records in the tables control into an Internal table
    when you press that REPORT button in the table control screen these Selected records data which is in Internal table has to be displayed in a ALV report.
    Hope when the data is internal tables just call the fun module of ALV
    In the PAI of table control screen
    case ok_code.
    when 'REPT'.
      loop at itab where v_chk = 'X'.
       ...append the selected records to another ITAB1.
      endloop.
    leave to list-processing
    perform_display_report.
    endcase.
    In the perform you process the internal table, build the field catalog and display the ALV report
    Reward points for useful Answers
    Regards
    Anji

  • Doubt regarding module pool program

    Hi experts,
    I need to use bapi in module pool program
    can we use it ? I hope we can use,
    Please any body give some sample code
    Thanks in advance
    Ranga

    bapi like another function module can be used in module pool based ojn ur desire
    a sample code is :
    case sy-ucomm.
    when 'create'
    call bapi u require
    end case
    hope it gives u an idea
    regards
    navjot
    reward accordingly

  • Regarding Module Pool Text Field

    Hi,
         Can any body tell , is there any possiblity to change the font style and size of the Module pool text field.( Because I want a Heading in the screen)
    Regards
    Prashanth

    Hi,
    Goto the Layout Editor of your Screen.
    Double click on the text field .. Double clk the text fild, and from the Botton right u can see an arrow icon -> click on that > will open a Popup > in that <b> set Area Title to TRUE </b>.
    Rgds,
    Jothi.
    Do Award pts for helpful answers.

  • Regarding Module Pool program!

    Hi experts,
    I have the following issue.
    in my first screen there is username and password input field and two push button. 1. logn .2. change password.
    I am getting succesfully logon. and when i click change pwd button it will get old pwd, newpwd, and confirm new pwd in the another screen. (upto this also i am having no issue.)but  when giving old pwd , new pwd  and confirm new pwd i. in the input field i am unable to change the password moreover getting the error msg what I have handled.I have given the necessary codes.
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    PROCESS AFTER INPUT.
    field zpasswords-psw module validate_logon_details.
    module exit_from_prog AT EXIT-COMMAND.
    MODULE USER_COMMAND_0100.
    MODULE VALIDATE_LOGON_DETAILS INPUT.
      SELECT * FROM ZPASSWORDS INTO WA_PSW WHERE PSW = ZPASSWORDS-PSW.
        ENDSELECT.
        IF SY-SUBRC <> 0.
          MESSAGE E000(ZSMSG).
          ENDIF.
    ENDMODULE.
    MODULE USER_COMMAND_0100 INPUT.
      CASE SY-UCOMM.
        WHEN 'LOGON'.
          SELECT * FROM ZPASSWORDS INTO WA_PSW WHERE PSW = ZPASSWORDS-PSW.
          ENDSELECT.
          IF SY-SUBRC = 0.
            CALL SCREEN 300.
          ENDIF.
        WHEN 'PSW'. "For change password pushbutton.
          SELECT * FROM ZPASSWORDS INTO WA_PSW WHERE PSW = ZPASSWORDS-PSW.
          ENDSELECT.
          IF SY-SUBRC = 0.
            CALL SCREEN 200.
          ELSE.
            MESSAGE E000(ZSMSG)." wrong entry
          ENDIF.
          CLEAR SY-UCOMM.
      ENDCASE.
    PROCESS BEFORE OUTPUT.
      MODULE STATUS_0200.
    PROCESS AFTER INPUT.
      CHAIN.
      FIELD : OLDPSW , NEWPSW , CONFIRMPSW
                MODULE VALIDATE_PASSWORD.
      ENDCHAIN.
      MODULE EXIT_FROM_PROG AT EXIT-COMMAND.
      MODULE USER_COMMAND_0200.
    MODULE USER_COMMAND_0200 INPUT.
      CASE SY-UCOMM.
        WHEN 'SAVE'.
          UPDATE ZPASSWORDS SET PSW = NEWPSW WHERE PSW = OLDPSW.
          IF SY-SUBRC = 0.
            MESSAGE S001(ZSMSG).  "Password Changed Successfully
          ENDIF.
        WHEN 'BACK'.
          LEAVE TO SCREEN 0.
      ENDCASE.
      CLEAR SY-UCOMM.
    MODULE VALIDATE_PASSWORD INPUT.
      SELECT * FROM ZPASSWORDS INTO WA_PSW WHERE PSW = OLDPSW.
        ENDSELECT.
        IF SY-SUBRC = 0.
          IF NEWPSW <> CONFIRMPSW.
            MESSAGE E003(ZSMSG).
            ENDIF.
            ELSE.
              MESSAGE E004(ZSMSG).
              ENDIF.
    ENDMODULE.
    N.B. Points are assured in case of of helpful  reply.
    Thanks&Regards
    Sarkar
    Moderator Message: Use a more meaningful title. Do not tempt responders with points. Put your code between code tags.
    Edited by: kishan P on Feb 16, 2011 4:56 PM
    Edited by: kishan P on Feb 16, 2011 4:58 PM

    hI...
    There is no FM to Refresh the Fields in a Screen.
    Use the CLEAR statement to Clear each variable.
    In the PBO module of the Screen use this code.
      IF OK_CODE = 'REFRESH'.
        CLEAR : WA.
      ENDIF.
    <b>Reward if Helpful</b>

  • Regarding module pool

    Hi Guyz ,
    i am creating 3 fields in standard table LFM1 .
    and these fileds i am inserting(sub screen) 3 fields in the standard transcation XK01 ..
    these 3 fields are radio buttons if user press yes then  i have to update Y in the table for that vendor . and if he press NO then i have to update N in the table LFM1 entry (3 fileds are radio buttons ).
    can you pls let know how to proceed futher with this requirement.
    How to continue with inserting the new sub screen and updating along with the new vendor created ......

    What is 3rd field (radio button)?
    You can do this by using the user exits of XK01.
    regards,
    Kiran

  • Module Pool Programming - Radio Buttons & Screen Field Invisible or Display

    Hi,
    I have 2 radio buttons in my screen and both of them are checked or on. Not sure how to make one of them is on and other is off at a time. If A is off, i need to make few screen fields invisible or display. if A is on, i need to make the screen field invisible or input enabled.
    Can  you please suggest me a suitable way to accomplish this task.
    Appreciate Your Help in Advance.
    Thanks,
    Kannan

    hi
    try this
    go to SE38 create a program of type M
    go to SE51,give a screen no (ex : 0800) and click on create
    then click on Layout in se51
    in the Layout select the Radiobutton icon and drag/drop it on the layout
    Define them as by double clicking on the radiobutton icon
    First Radiobutton name : RB1, Groups : u can see 4 boxes,in the first box give group as G1
    do the same for the Second Radiobutton RB2.
    Now select both the radiobuttons RB1,RB2 both at a time and right click the cursor
    Radiobutton - Define.
    Then drag and drop a i/o field name : wk_name. save & activate the layout.
    in se51
    PBO
    Module_status_0800.
    Module_screen_modif.
    PAI
    Module_user_command_0800.
    in se38
    data : wk_name(10) type c.
    data : rb1,rb2.
    Module_screen_modif_o/p.
    if RB1 = 'X'.
    LOOP AT SCREEN.
    IF SCREEN-NAME = 'WK_NAME'.
    SCREEN-INPUT = '1'.
    SCREEN-INVISIBLE = '0'.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    if RB2 = 'X'.
    LOOP AT SCREEN.
    IF SCREEN-NAME = 'WK_NAME'.
    SCREEN-INPUT = '0'.
    SCREEN-INVISIBLE = '1'.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    endmodule.
    Module_user_command_0800.
    case sy-ucomm.
    when 'EXIT' or 'BACK' or 'CANCEL'.
    LEAVE PROGRAM.
    endcase.
    Endmodule.
    Regards

  • Regarding module pool programming

    hi champions,
                       i m using table control in my screen no doubt the horizontal scroll is coming but vertical scroll is not,vud u plz tell me wat sud i do so dat the vertiacal scroll will appear i hv to display the multiple records. in my report.........
    looking forward to an early reply.
    ravi gupta.

    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0200.
      MODULE clear_ok_code.
      module data_retrieval.
      Loop  with Control TABCONT.
      module populate_screen.
      endloop.
        module vertical_scroll.
    *&      Module  vertical_scroll  OUTPUT
    *       text
    module vertical_scroll output.
      DATA N TYPE I.
      describe table itab lines N.
    tabcont-lines = N.
    endmodule.                 " vertical_scroll  OUTPUT

  • Regarding module pool programming,reports and gui status

    hi,
       I have created a mpp program in which i called a report using the SUBMIT statement.In the Report i have used Gui status for BACK.When i execute the MPP and press BACK it should call a another screen of the MPP,but it leaves to the program i.e., it comes out.
    example,
    case sy-ucomm.
    When 'BACK'.
    CALL SCREEN 0002.
    endcase.
    This is what i have used in my report program.
    Please help me,
    Thanks in advance,
    Aruna

    Hi.
    Change the name BACK because it is standard FCode.
    Try Changing the Fcode.
    Awrd Points if useful
    Bhupal

  • Modul pool scrreen related query

    hi abapers,
    please solve my query regarding module pool.
    i have a module pool screen with table grid and i use upload and download function define on push button, when i press first time upload button my data can easily upload to table grid,
    but when i use mouse scroll button then again data can uploaded on table grid.
    please tale me if  any statement or function is exist to handle this problem.
    thanks,
    Abhi

    HI  I HAVE WRITTEN THIS CODE.
    { MODULE USER_COMMAND_5000_TRC_DETL INPUT.
    CASE SY-UCOMM.    
        WHEN 'UPLOAD'.
          PERFORM DATA_UPLOAD.
          CLEAR SY-UCOMM.
    WHEN 'DOWNLOAD'.
          PERFORM DOWNLOAD.
    ENDCASE.
    FORM DATA_UPLOAD .
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          FIELD_NAME = 'P_FILE'
        IMPORTING
          FILE_NAME  = P_FILE.
      CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
         EXPORTING
        I_FIELD_SEPERATOR        =
           I_LINE_HEADER            =  'X'
           I_TAB_RAW_DATA           =  IT_RAW       " WORK TABLE
           I_FILENAME               =  P_FILE "'C:\UPLOAD1.XLS'
         TABLES
           I_TAB_CONVERTED_DATA     = IT_FINAL[]    "ACTUAL DATA
        EXCEPTIONS
           CONVERSION_FAILED        = 1
           OTHERS                   = 2.
    IF SY-SUBRC <> 0.
       MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
               WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM. }
    Edited by: Abhilash on Apr 16, 2009 12:03 PM

  • Module Pool Error handling

    Hi friends,
    This issue regarding Module Pool Error Handling
    How to handle the multiple error on the same screen ,
    For example in the below code you could see "Carrid is Invalid"  when carrid is entred wrongly
    "in the same way i also need " Connid is invalid" When the customer entres the wrong Connid
    *Select single * from sflight into e_sflight*
    where carrid = e_sflight-carrid AND
    connid = e_sflight-connid AND
    fldate = e_sflight-fldate.
    IF NOT sy-subrc IS INITIAL.
    MESSAGE ID 'ZADT' TYPE 'E'
    NUMBER '002' WITH 'Carrid is invalid'.
    Kindly let me know your feedback\
    Thank you
    Sandy

    Hi Sandy,
    in PAI. " Also try to close your Questions as currently 8 out of 8 are unresolved
    Chain. " For More info take F1 help on this Key word
    field : carrid, connid. " These are the Screen Field names
    module validate on chain-request.
    endchain.
    in Program.
    module validate.
    select single carrid into carrid
         from scarr
          where carrid = carrid.
    if sy-subrc = 0.
    select single connid into connid
              from sflight
              where connid = connid,
    if sy-subrc NE 0.
    message 'Enter Valid Connid' type 'E'.
    endif.
    else.
    message 'Enter Valid Carrid' type 'E'.
    endif.
    endmodule.
    Cheerz
    Ram
    Edited by: Ramchander Krishnamraju on Apr 12, 2010 11:48 AM

  • Navigation problem with back button in module pool

    Hi everyone,
    I have a scenario in module pool programming in which i need help.
    I have an i/p filepath screen where the user inputs his/her file and clicks on validate button provided in the toolbar.
    After that it goes to the next screen which displays all the messages(error/success).
    After I click on Execution button it goes to next screen displaying all the created data.
    Now when I click on back button I want it to go to the i/o filepath screen.
    Please give me your comments on this.
    Leave to screen XXXX is giving me dump so any other options plz let me know.
    Thanks in advance.

    Hi Amit,
       Lets say you have 3 screens 100, 200 and 300. screen 100 has you input file path and 200 shows the message and 300 shows the created data.
    Now in PAI of 300 write as below.
    IN the screen as below
    MODULE USER_COMMAND_300_EXIT AT EXIT COMMAND.
    In the include as below
    MODULE USER_COMMAND_300_EXIT.
    CASE sy-ucomm.
    WHEN 'BACK'.   " OK code for BACK button.
    CALL SCREEN 100.
    WHEN 'CANCEl'.
    LEAVE TO SCREEN 0
    ENDCASE.
    ENDMODULE.
    Please revert if you still face problems.
    Regards,
    Praveenkumar T

  • Regarding exit from the module pool screen

    h experts,
    i have developed a module pool report in which in the selection screen i have four fields which are mandatory ,when i execute the program without entering in the selection screen it do not allow to come out of the module pool screen ...what i want that without entering any input in the selection screen if i press exit button push button it will allow to come out of the screen for this what sud i do plz help me....

    Hi
    keep a button called <b>EXIT</b> on the screen
    Make the function type of that field as <b>E</b>
    in Flow logic write
    PROCESS AFTER INPUT.
    Forced Exit from the transaction from screen
      MODULE exit AT EXIT-COMMAND.
    double click on exit module and
    then in PAI write
    *&      Module  exit  INPUT
    Exit from the Transaction
    MODULE exit INPUT.
      CASE okcode.
        WHEN 'EXIT' OR 'CANCEL'.
          CLEAR okcode.
          LEAVE PROGRAM.
      ENDCASE.
    ENDMODULE.                 " exit  INPUT
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • How to enable the 'FIND' Button in Module Pool Screen. Logic please

    Hi All,
       I am writing one Module Pool Program. I have one requirement like I have to put FIND, FIND+ buttons on different screens.
       I am able to do the code for normal FIND. According to my requirement I have to display one Popup when the user click on FIND button. Once he entered some value it should find all the records and all the fields and display the list of hits in another popup. This whole process should as same as in SE11 Transaction functionality.
       Example: SE11 ->Table Entries -> and click the FIND Button. I need the same functionality in my Program.
       Please let me know ASAP. If you provide some code sample it will be Great.
    Thanks & Regards
    Kiran

    Hi
    If you have just implemented the code for FIND I believe u need to add some little modifications for FIND+.
    U need only to manage the position of the last found value, so u need to go on from that position for FIND+.
    The position should have the two coordinates X (the position in the record) and Y (the number of the record):
    - FOUND should start for postion = 0, 0
    - FOUND+ should start for position = X, Y
    Max

Maybe you are looking for

  • How do I deal with project bloat? Long Save time is getting worse?

    Here are the FB posts I have got about this issue. I tried to paste them neatly but didn't work. To be honest I am baffled that such an advanced NLE has so many issues. There should be a warning about the Warp Stabilizer messing up a project I had no

  • Add button to header

    hi as per the requirement , our code needs a button to header in transaction ME22n/ME23n Pls suggest which BADI or User Exit i use ..

  • Disk Utility/ OS 10.2.8 problem

    I wanted to use Disk Utility to reformat a boot partition of my external FW drive. The install OS 9 drivers option is greyed out. Is that because the drivers are already on the whole disk? Been so long since I have had to do this I don't remember Tha

  • My Macbook pro 13 inch is stuck on a gray screen with the apple logo, how do I fix this?

    Sooo, I was using my laptop for a while and the charger was kind of broken, it was dip in and out, and slowly I got a "Service Battery" notification. I updated my system and now everytime I try to boot up my computer it'd show a gray screen with the

  • New concepts in ECC 6.0

    hi, pls make me know throuh mail id  ;[email protected]