Selection-screen problem:need to go back to selectionscreen not source code

Hello experts,
Please help me on my dillema. I have 2 reports, zreport1 and zreport2. Now, zreport1 submits
values via selection-screen to zreport2. Now here is the problem, when I press 'BACK' on the
selection-screen of zreport2(rememeber we used submit statement via selection-screen on zreport1)
instead of going back to the selection-screen of zreport1 it goes to the source code of zreport1 which
is wrong. And there are 2 selection-screens on zreport1 depending on the user if he is controller or not.
So what I need to do here is that whenever I press 'BACK' either I'm adding or modifying or displaying records
it should go back to whatever screen I called in zreport1.
Here's a diagram.
ZREPORT1**
  if v_controller = 'X'
    display selection-screen 1500
  else
    display selection-screen 500
  endif.
  if user wants to add records, submit values from zreport1 to zreport2
  and return via selection-screen.
  *same goes for edit option.
  if user wants to display, get all records then display in ALV.     
ZREPORT2**
  So lets assume user decides not to add records and decides to go back. so he presses
  the BACK button in selection-screen of zreport2. Now here's the nasty part, instead of going back to either
  selection-screen 500 or 1500 in zreport1, it goes to the source code of zreport1!. I hope I explained it clearly.
  Again, thanks a lot guys for your help!

Hi,
Try this
START-OF-SELECTION.
*----------Sumbit Report-------*
Sumit Report......AND RETURN
*----------Check Condition & back to select screen-------*
  IF condition.
    MESSAGE s207(zusm_gen) DISPLAY LIKE lc_e .
    EXIT.
  ENDIF.
Set something in the memmory.
this can be used to check the completion of the report.
if the 2nd report executed porperly then u further execute the code.
If u dont have any thing to execute after sumbit report
then u can do is.
START-OF-SELECTION.
*----------Sumbit Report-------*
Sumit Report......AND RETURN
    MESSAGE s207(zusm_gen) DISPLAY LIKE 'S' .
    EXIT.
Message was edited by: Manoj Gupta

Similar Messages

  • CALL SELECTION SCREEN problem

    Hello!
    I have a problem. In my riport I have a selection screen (1000), a main screen (2000), and a screen (400) this is called inside a loop, to fill some datas when you hit the print button.
      CLEAR L_TOTAL.
      SORT LT_EBAN BY BNFPO.
      LOOP AT LT_EBAN.
        GT_ITEM2-FIELD01 = SY-TABIX.
        GT_ITEM2-FIELD02 = LT_EBAN-MATNR.
    *---Part name, Type, Maker
        SPLIT LT_EBAN-TXZ01 AT ',' INTO GT_ITEM2-FIELD03 GT_ITEM2-FIELD04 GT_ITEM2-FIELD05.
         CONCATENATE GT_ITEM2-FIELD03 '/' GT_ITEM2-FIELD04 INTO DESCR.
         ITEM = LT_EBAN-BNFPO.
         CALL SCREEN 400 STARTING AT 20 7 ENDING AT 60 18.
    *---Machine
        GT_ITEM2-FIELD06 = ST_400-MACHINE.
    After this, i could not use the LEAVE TO SCREEN 0, because it's not going back to secreen '2000' , I'm getting a blank 400 screen.
    Thatswhy I used CALL SCREEN '2000', and it's fine.
    But in the case of the Selection screen (1000) something is wrong.
    On the screen 2000 I using this logic.
    MODULE EXIT_2000 INPUT.
      CASE OK_CODE.
        WHEN 'BACK' OR 'EXIT'.
          CLEAR OK_CODE.
           CALL SELECTION-SCREEN '1000'.
           LEAVE PROGRAM.
        WHEN 'CANC'.
          PERFORM EXIT_PROGRAM.
          LEAVE PROGRAM.
      ENDCASE.
      CLEAR OK_CODE.
    ENDMODULE.                 " exit_2000  INPUT
    With this logic, the program is going to the SELECTION-SCREEN, when I hit the back button, and when we are already on the SELECTION-SCREEN, it's leaving the program. This is also ok.
    But when I hit the back button, and on the SELECTION-SCREEN I want to run the program again, it's not going to the program logic, it's jumping to this CALL SELECTION-SCREEN '1000', and leaving of course.
    START-OF-SELECTION.
      PERFORM DSP1_PROC.
      IF GT_DISPLAY[] IS INITIAL.
        MESSAGE S208(00) WITH 'No data.'.
        EXIT.
      ENDIF.
      IF S_RET = '1'.
        MESSAGE I208 WITH 'Document not found'.
        S_RET = ' '.
      ELSE.
        S_RET = ' '.
        CALL SCREEN '2000'.
      ENDIF.
    So my question is, that the above logic, when I running the program first time It's working good, at the START-OF-SELECTION, but when I trying to runnig from the SELECTION-SCREEN "second time", from the   START-OF-SELECTION it's jumping to the CALL SELECTION-SCREEN '1000'. How can I avoid this. I want that from the  START-OF-SELECTION, never go to the CALL SELECTION-SCREEN '1000'.
    Thank You
    Edited by: Roland on Dec 5, 2011 11:27 AM

    Hi Max!
    Yeah, I was thinking the same, that the problem is with that loop.
    But I don't know, how can I solved in a different way, because when we hit the print button, we getting all the items from a table, and we starting looping on them. In the loop we passing the values to a GT_ITEM table, later this table is connected with an excell, so it will be printed out in an excell form.
    So I have to call this screen so many times, how many items we have. Sometimes just 1, sometimes 4, 6, 9, and so on.
    For this items I have to add 2 more fields, wich are uploaded by the user. ( The other fields are coming from the table)
    So if I going out from the loop after the CALL SCREEN 400, I think the next item wont be get the values. Or maybe any of them, because this is before the APPEND GT_ITEM. So this methode wont be called, no data would be in the table, nothing will be printed.
    *-Item
      SELECT BNFPO MATNR TXZ01 MENGE MEINS ERNAM PREIS BEDNR EBELN EBELP
        INTO CORRESPONDING FIELDS OF TABLE LT_EBAN
        FROM EBAN
       WHERE BANFN  =  GT_DISPLAY-BANFN
         AND LOEKZ  =  ' '.
      CLEAR L_TOTAL.
      SORT LT_EBAN BY BNFPO.
      LOOP AT LT_EBAN.
        GT_ITEM2-FIELD01 = SY-TABIX.
        GT_ITEM2-FIELD02 = LT_EBAN-MATNR.
    *---Part name, Type, Maker
        SPLIT LT_EBAN-TXZ01 AT ',' INTO GT_ITEM2-FIELD03 GT_ITEM2-FIELD04 GT_ITEM2-FIELD05.
         CONCATENATE GT_ITEM2-FIELD03 '/' GT_ITEM2-FIELD04 INTO DESCR.
         ITEM = LT_EBAN-BNFPO.
         CALL SCREEN 400 STARTING AT 20 7 ENDING AT 60 18.
    *---Machine
        GT_ITEM2-FIELD06 = ST_400-MACHINE.
    *---Using Qty
        WRITE ST_400-USING UNIT LT_EBAN-MEINS TO GT_ITEM2-FIELD08.
    *---Now Stock
        CLEAR L_LABST.
        SELECT SUM( LABST ) INTO L_LABST
          FROM ZMM0460T
         WHERE MATNR = LT_EBAN-MATNR
           AND WERKS = '3A10'.
        WRITE L_LABST UNIT LT_EBAN-MEINS TO GT_ITEM2-FIELD09.
        WRITE LT_EBAN-MENGE UNIT LT_EBAN-MEINS TO GT_ITEM2-FIELD10.
        IF NOT LT_EBAN-EBELN IS INITIAL.
          CLEAR LS_EKPO.
          SELECT SINGLE NETPR WAERS PEINH
            INTO CORRESPONDING FIELDS OF LS_EKPO
            FROM EKPO AS A INNER JOIN EKKO AS B ON A~EBELN EQ B~EBELN
           WHERE A~EBELN = LT_EBAN-EBELN
             AND A~EBELP = LT_EBAN-EBELP.
          IF LS_EKPO-WAERS <> 'HUF'.
            CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
              EXPORTING
                DATE             = SY-DATUM
                FOREIGN_AMOUNT   = LS_EKPO-NETPR
                FOREIGN_CURRENCY = LS_EKPO-WAERS
                LOCAL_CURRENCY   = 'HUF'
              IMPORTING
                LOCAL_AMOUNT     = LS_EKPO-NETPR.
          ENDIF.
          IF LS_EKPO-PEINH IS INITIAL. LS_EKPO-PEINH = 1. ENDIF.
          LT_EBAN-PREIS = LS_EKPO-NETPR / LS_EKPO-PEINH.
        ENDIF.
        WRITE LT_EBAN-PREIS CURRENCY 'HUF' TO GT_ITEM2-FIELD11.
        CONDENSE GT_ITEM2-FIELD11.
        CONCATENATE GT_ITEM2-FIELD11 'Ft' INTO GT_ITEM2-FIELD11
          SEPARATED BY SPACE.
        L_NETWR = LT_EBAN-MENGE * LT_EBAN-PREIS.
        WRITE L_NETWR CURRENCY 'HUF' TO GT_ITEM2-FIELD12.
        CONDENSE GT_ITEM2-FIELD12.
        CONCATENATE GT_ITEM2-FIELD12 'Ft' INTO GT_ITEM2-FIELD12
          SEPARATED BY SPACE.
        L_TOTAL = L_TOTAL + L_NETWR.
    *---Unit
        SELECT SINGLE UNIT INTO GT_ITEM2-FIELD13
          FROM ZMM0500T
         WHERE PERNR = LT_EBAN-BEDNR.
    *---Name
        SELECT SINGLE SNAME INTO GT_ITEM2-FIELD14
          FROM PA0001
         WHERE PERNR = LT_EBAN-BEDNR
           AND ENDDA = '99991231'.
    *---Append
        GT_ITEM2-CNTR01 = ''.
        APPEND GT_ITEM2. CLEAR: GT_ITEM2, ST_400, DESCR, ITEM.
      ENDLOOP.
      GT_ITEM2-FIELD11 = 'Total'.
      WRITE L_TOTAL CURRENCY 'HUF' TO GT_ITEM2-FIELD12.
      CONDENSE GT_ITEM2-FIELD12.
      CONCATENATE GT_ITEM2-FIELD12 'Ft' INTO GT_ITEM2-FIELD12
        SEPARATED BY SPACE.
      GT_ITEM2-CNTR01 = 'B'.
      APPEND GT_ITEM2. CLEAR GT_ITEM2.
    ANy idea?
    Thank You
    Edited by: Roland on Dec 5, 2011 1:36 PM
    Edited by: Roland on Dec 5, 2011 1:50 PM

  • IPhone 5s. Never synced it. Passcode protected. Broke the screen. Need to rest back to factory settings. Can this be done?

    iPhone 5s. Never synced it. Passcode protected. Broke the screen. Need to rest back to factory settings. Can this be done?

    Hello Slimshaney74,
    if you have a Mac or a PC with iTunes installed you may be able to do this. If your screen is broken but your iPhone still reacts to touch you have to just turn it off, and if your iPhone doesn't respond to touch, you have to hold both home and power buttons for about 7 seconds (it might not work from the first try) so that it shuts down. Afterwards get your lightning to USB cable connected to the computer but not to the phone. You hold your phone's home button and while holding it, you connect it to the cable, iTunes should say something like "iTunes detected iPhone in recovery mode"and a window with a restore button should pop up. You click on the restore button and iTunes will walk you through the process afterwards. If the iPhone has Find my iPhone feature activated you will have to enter your Apple ID password at the activation process after the iPhone is restored.
    Hope that I helped!

  • Enter key not functioning pls i need to resume backing,enter key not function another option pls.

    Enter key not functioning pls i need to resume back,enter key not function another option pls hp mini laptop.

    Hello Damyanology,
    If your enter key is not working but you have to use it, you can bring up the on screen keyboard, and that will allow you to use enter.
    Here is a link to open the on screen keyboard.
    Go into device manager and uninstall the keyboard and restart the computer. This should reinstall the driver to correct the problem.
    Here is a link to uninstall in device manager.
    Let me know if this helps.

  • Two selection screen problem in one report

    i have a two selection screens 1000 & 2000 in single report , which needs to be executed one after the other ,
    the problem is when i execute second selection screen(2000) , the cursor is going back to at-selection-screen once again.
    but i need to trigger start-of-selection directly after executing second selection screen,
    the first selection screen 1000 will be executed with the help of select options..
    the sample code is below .
    at-selection-screen.
        perform validations.
       call selection screen 2000.
        at selection screen on value request p_adm
    start-of-selection.
       main logic

    Moderator message - Cross post locked
    Rob

  • Tabbed selection screen problem.

    Hi expert,
    I need some help in creating my selection screen.
    Right now i'm creating a tabbed selection screen as the code below follows.
    PARAMETERS: p_test AS CHECKBOX USER-COMMAND testrun DEFAULT 'X'.
    SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
    PARAMETERS: p_offkdt TYPE sy-datum MODIF ID thr.
    SELECT-OPTIONS: s_konfe FOR p0002-konfe.
    SELECTION-SCREEN END OF SCREEN 100.
    SELECTION-SCREEN BEGIN OF SCREEN 200 AS SUBSCREEN.
    SELECTION-SCREEN: BEGIN OF LINE,
                       COMMENT 1(20) text-005 MODIF ID yea
                        FOR FIELD p_lowdt,
                        POSITION POS_LOW.
    PARAMETERS: p_lowdt TYPE begda MODIF ID yea,
                p_updt TYPE endda MODIF ID yea.
    SELECTION-SCREEN: END OF LINE.
    PARAMETERS: p_keydt TYPE dats MODIF ID yea.
    SELECTION-SCREEN END OF SCREEN 200.
    SELECTION-SCREEN BEGIN OF SCREEN 300 AS SUBSCREEN.
    PARAMETERS: p_lvdat TYPE dats MODIF ID lv.
    SELECTION-SCREEN END OF SCREEN 300.
    SELECTION-SCREEN: BEGIN OF TABBED BLOCK prog_selection FOR 4 LINES,
                      TAB (20) button1 USER-COMMAND push1,
                      TAB (20) button2 USER-COMMAND push2,
                      TAB (20) button3 USER-COMMAND push3,
                      END OF BLOCK prog_selection.
    Now as I'm using tab and subscreen, therefore i need to initialize the subscreen which i wanted to use which i did in the initialization event.
      prog_selection-dynnr = 100.
      prog_selection-activetab = 'PUSH1'.
    With the above code, my default tab would be screen 100 which is the first tab.
    My problem right now is, after i execute the program, and then i press the back button to go back to the selection screen, the default tab 100 is shown again while i wanted to show the last tab which was picked before the program was executed. Please kindly advise how can i solve this problem.
    Many Thanks!
    -Suwardi Nursalim-

    Hi,
    DATA: V_DYNNR TYPE SY-DYNNR VALUE '0100',
               V_ACTIVETAB(4).
    INITIALIZATION.
      MOVE 'PUSH1' TO V_ACTIVETAB.
    AT SELECTION-SCREEN OUTPUT.
      prog_selection-dynnr = V_DYNNR.
      prog_selection-activetab = V_ACTIVETAB.
    When the user clicks each tab of the tab strip.*
    CASE SY-UCOMM.
       WHEN 'PUSH1'.
            V_ACTIVETAB = 'PUSH1'.
            (rest of your code).
       WHEN 'PUSH2'.
            V_ACTIVETAB = 'PUSH2'.
            (rest of your code).
       WHEN 'PUSH3'.
            V_ACTIVETAB = 'PUSH3'.
            (rest of your code).
    ENDCASE.
    Hope this will help you.
    Regards,
    Smart Varghese

  • Selection screen problem in module pool

    Hi friends,
    I am working on module pool programming, I need to put select screen on the screen of the module pool porgramming. I used Input/Output field to do that and activated. But I am getting message invalid field format (screen error) can any one tell me why I am not able to run the seletion screen when I am using input/output field, also please let me know how to solve this problem.
    Regards,
    Line

    Hello,
    Think that this is useful for u/
    SELECTION-SCREEN - Defining selection screens
    Variants:
    1a. SELECTION-SCREEN BEGIN OF SCREEN scr.
    1b. SELECTION-SCREEN END   OF SCREEN scr.
    2. SELECTION-SCREEN BEGIN OF SCREEN scr AS SUBSCREEN.
    Effect
    Defines a selection screen with the number scr. scr may be up to 4 digits.
    SELECTION-SCREEN BEGIN OF SCREEN scr.
    Additions:
    (zu SELECTION-SCREEN BEGIN OF SCREEN scr) 1. ... TITLE title
    2. ... AS WINDOW
    Notes
    In reports (type 1 programs), a selection screen with number 1000 is created automatically when you use the SELECT-OPTIONS, PARAMETERS and SELECTION-SCREEN statments. This selection screen appears when you SUBMIT the report.
    In any type of program (apart from subroutine pools - type S), you can define further selection screens using SELECT-OPTIONS, PARAMETERS and SELECTION-SCREEN. You enclose these statements between the SELECTION-SCREEN BEGIN OF SCREEN and SELECTION-SCREEN END OF SCREEN statements.
    You call these screens using the CALL SELECTION-SCREEN statement.
    Screen number 1000 is not allowed (reserved for standard selection screen).
    When you generate the program, all user-defined selection screens are also generated.
    Within a report (type 1 program), all SELECT-OPTIONS, PARAMETERS and SELECTION-SCREEN statements outside a SELECTION-SCREEN BEGIN/END OF SCREEN block form part of selection screen 100 (standard selection screen)
    Regards,
    LIJO JOHN.

  • Standard PNP selection screen problem in reason for action type

    Hi all,
    We have used standard PNP in one of our report program.
    The input for 'Reason for Action' (excluding a particular reason for action ) has no effect on the actual selection of data from the PNP. i.e. even if a particular reason for action is excluded in the selection, record pertaining to that action for reason is still picked in the PNP selection and passed on to the program through Get PERNR statement.
    The above problem seems to affect all the standard and custom HR Reports as well.
    Please advise on how exactly the excluding of a particular reason for action work in selection through PNP and is there anyway to solve the problem.
    eagerly waiting for your response.
    Thanking You,
    Regards.
    Deepak

    Thanks for your response,
    We tried but it did not work.
    Our code is as follows,
    INITIALIZATION.
    W_REPID = SY-REPID.
    PERFORM CREATE_RANGES.
    START-OF-SELECTION.
    GET PERNR.
    RP-PROVIDE-FROM-LAST P0000 SPACE PN-BEGDA PN-ENDDA.
    PERFORM GET_DATA.
    END-OF-SELECTION
    If you could give us your email id, we would email the screen shots of the selection screen and the output.
    my email id - [email protected]
    Thanking You,
    Regards
    Deepak

  • RE:HR-ABAP selection screen problem.

    hi,
    hi friends iam facing one problem regarding hr ABAP  selection screen ,in my program iam using PNP LDB for bonus details report
    i have using selection screen declaration present  for single selection.
    SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-006.        
    SELECT-OPTIONS: S_ABKRS FOR P0001-ABKRS NO INTERVALS NO-EXTENSION,
                    S_WERKS FOR P0001-WERKS NO INTERVALS NO-EXTENSION,
                    S_BTRTL FOR P0001-BTRTL NO INTERVALS NO-EXTENSION,
                    S_PERSG FOR P0001-PERSG NO INTERVALS NO-EXTENSION,
                    S_PERSK FOR P0001-PERSK NO INTERVALS NO-EXTENSION.   
    SELECTION-SCREEN END OF BLOCK B3.
    based on this selection iam fetching the information from infotypes using  macros.
    now my requirement is iam fetch the information for multiple  selections means like payroll areas z1,z2 and z3 payroll informations
    should be  fetching once.  pls any body knows solution please give me reply.
    thanks & regards,
    mgrao.

    You should be using a selection view (HR Report Category in the programs attributes) to filter results from the LDB.
    Why is this in the objects forum?

  • RE:pnp LDB selection screen problem

    hi,
    hi friends iam facing one problem regarding hr ABAP selection screen ,in my program iam using PNP LDB for bonus details report
    i have using selection screen declaration present for single selection.
    SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-006.
    SELECT-OPTIONS: S_ABKRS FOR P0001-ABKRS NO INTERVALS NO-EXTENSION,
    S_WERKS FOR P0001-WERKS NO INTERVALS NO-EXTENSION,
    S_BTRTL FOR P0001-BTRTL NO INTERVALS NO-EXTENSION,
    S_PERSG FOR P0001-PERSG NO INTERVALS NO-EXTENSION,
    S_PERSK FOR P0001-PERSK NO INTERVALS NO-EXTENSION.
    SELECTION-SCREEN END OF BLOCK B3.
    based on this selection iam fetching the information from infotypes using macros.
    now my requirement is iam fetch the information for multiple selections means like payroll areas z1,z2 and z3 payroll informations
    should be fetching once. pls any body knows solution please give me reply.
    thanks & regards,
    mgrao.

    hi jain thanks for your reply, iam already created report category and assigned my report. here iam giving my report selection
    declerations fully   below.
          S E L E C T I O N       S C R E E N                           *
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001. " DECLEARED REPORT CODE LEVEL
    SELECT-OPTIONS: S_DATE   FOR SY-DATUM NO-EXTENSION.    "Bonus for Financial Year
    PARAMETERS:     P_BDATE  TYPE SY-DATUM OBLIGATORY,     "Bous payed as on
                    P_WKDAYS TYPE CHAR6.                                            "No.of Working Days     
    SELECTION-SCREEN END OF BLOCK B1.
    *SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-006.    " COMMENTED report level TAKING FROM LDB PNP    
    *SELECT-OPTIONS: S_ABKRS FOR P0001-ABKRS NO INTERVALS NO-EXTENSION,     "  Payroll area
                   S_WERKS FOR P0001-WERKS NO INTERVALS NO-EXTENSION,                       Personnel area   
                   S_BTRTL FOR P0001-BTRTL NO INTERVALS NO-EXTENSION,                          Personnel  sub area        
                   S_PERSG FOR P0001-PERSG NO INTERVALS NO-EXTENSION,
                   S_PERSK FOR P0001-PERSK NO INTERVALS NO-EXTENSION.   
    *SELECTION-SCREEN END OF BLOCK B3.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002. "REPORT CODE LEVEL SELECTION
    PARAMETERS: P_FORMCP TYPE PIN_RATE, " char6,    "Form C %    
                P_FORMEP TYPE PIN_RATE, " char6,                 "Exgratia %
                P_FORMBP TYPE PIN_RATE. " char6 .               "Bonus %   
    SELECTION-SCREEN END OF BLOCK B2.
    SELECTION-SCREEN BEGIN OF BLOCK B4 WITH FRAME TITLE TEXT-004.
    PARAMETERS: L_REPORT TYPE ZHRD_FORMC AS LISTBOX VISIBLE LENGTH 40 OBLIGATORY . Report for list box   1 form c
    SELECTION-SCREEN END OF BLOCK B4.                                                                                2 exgratia
    the above selection is iam used first, now iam commented BLOCK B3 SELECTION  PARAMETERS  and taking the parameters from REPORT CATEGORY  ASSINGN MENT.
    MY PROBLEM  is if i select one payroll area example z1 it showing all pay roll employees bonus details it is not filter the remaining payroll areas my requirement is what are the payrolls iam  selecting  those pay roll area details only displaying.
    data fetching from  INFOTYPES 0001,0002,0021 AND 9150 FOR BONUS DETAILS and out put is classical report format.
    please kindly give the reply if you knows the solution.
    thanks & regards ,
    mgr.

  • At selection-screen problem: triggering an error message...

    Hello experts,
    I have 3 radiobuttons and 1 parameter in my selection screen. it works in such a way that whenever the user clicks on the 3rd radiobutton the parameter will be inputtable. Now, what I want to do is that whenever the 3rd radiobutton is clicked and the user forgot to put a value in the paramater an error message will be triggered saying 'please put a value'.
    Now, creating a code for that is easy but here is the problem: whenever I click on any of the radiobuttons the message triggers. Anyway, below is my code:
    SELECTION-SCREEN BEGIN OF BLOCK box1 WITH FRAME TITLE text-001.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: pr_upld RADIOBUTTON GROUP grp MODIF ID id3
                                              USER-COMMAND ucomm.
    SELECTION-SCREEN COMMENT 2(20) text-007 FOR FIELD pr_upld.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 03(15) text-a11 FOR FIELD p_flnme MODIF ID id3.
    PARAMETERS: p_flnme LIKE rlgrap-filename DEFAULT 'C:\' MODIF ID id3.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 1(22) text-002 FOR FIELD p_dcode MODIF ID id1.
    PARAMETERS: p_dcode LIKE vbak-kunnr MODIF ID id1,
                p_name1 LIKE kna1-name1 MODIF ID id1.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: pr_list RADIOBUTTON GROUP grp MODIF ID id4.
    SELECTION-SCREEN COMMENT 2(7) text-003 FOR FIELD pr_list MODIF ID id4.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: pr_add  RADIOBUTTON GROUP grp MODIF ID id2.
    SELECTION-SCREEN COMMENT 2(3) text-005 FOR FIELD pr_add MODIF ID id2.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: pr_edit RADIOBUTTON GROUP grp MODIF ID id5.
    SELECTION-SCREEN COMMENT 2(4) text-006 FOR FIELD pr_edit MODIF ID id5.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 03(20) text-a12 FOR FIELD p_code MODIF ID id2.
    *PARAMETERS: p_kunnr LIKE zts0001-kunnr.
    PARAMETERS: p_code LIKE zts0001-cdseq MODIF ID id6.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK box1.
    AT SELECTION-SCREEN OUTPUT.
    IF v_compflag EQ space.
        LOOP AT SCREEN.
          IF screen-group1      = 'ID1'.
            screen-input        = '0'.
            screen-output       = '1'.
            MODIFY SCREEN.
          ELSEIF screen-group1  = 'ID2'.
            screen-active       = '1'.
            MODIFY SCREEN.
          ELSEIF screen-group1  = 'ID3'.
            screen-active       = '0'.
            MODIFY SCREEN.
          ELSEIF screen-group1  = 'ID4'.
            screen-active       = '1'.
            MODIFY SCREEN.
          ELSEIF screen-group1  = 'ID5'.
            screen-active       = '1'.
            MODIFY SCREEN.
          ELSEIF screen-group1  = 'ID6'.
            screen-active       = '1'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ELSEIF v_compflag NE space.
        LOOP AT SCREEN.
          IF screen-group1      = 'ID1'.
            screen-active       = '0'.
            MODIFY SCREEN.
          ELSEIF screen-group1  = 'ID2'.
            screen-active       = '0'.
            MODIFY SCREEN.
          ELSEIF screen-group1  = 'ID3'.
            screen-active       = '1'.
            MODIFY SCREEN.
          ELSEIF screen-group1  = 'ID4'.
            screen-active       = '1'.
            MODIFY SCREEN.
          ELSEIF screen-group1  = 'ID5'.
            screen-active       = '0'.
            MODIFY SCREEN.
          ELSEIF screen-group1  = 'ID6'.
            screen-active       = '0'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    *for users that are not controllers
      LOOP AT SCREEN.
        IF screen-name   = 'P_CODE'.
          screen-input   =  '0'.
        ENDIF.
        MODIFY SCREEN.
      ENDLOOP.
      IF pr_list = 'X' OR
         pr_add  = 'X'  OR
         pr_upld = 'X'.
        LOOP AT SCREEN.
          IF screen-group1   =  'ID6'.
            screen-input     =  '0'.
          ENDIF.
          MODIFY SCREEN.
        ENDLOOP.
      ELSEIF pr_edit  =  'X'.
        LOOP AT SCREEN.
          IF screen-group1   =  'ID6'.
            screen-input     =  '1'.
          ENDIF.
          MODIFY SCREEN.
        ENDLOOP.
      ENDIF.
    *for controllers
      IF pr_upld = 'X'.
        LOOP AT SCREEN.
          IF screen-name      = 'P_FLNME'.
            screen-input     = '1'.
          ENDIF.
          MODIFY SCREEN.
        ENDLOOP.
      ELSEIF pr_list = 'X'.
        LOOP AT SCREEN.
          IF screen-name      = 'P_FLNME'.
            screen-input     = '0'.
          ENDIF.
          MODIFY SCREEN.
        ENDLOOP.
      ENDIF.
    AT SELECTION-SCREEN.
      IF pr_edit = 'X' AND p_code IS INITIAL.
        MESSAGE e008 WITH 'Please specify Code.'.
      ENDIF.
    Again, thank you guys and have a nice day!

    Hi viraylab,
    1. Such validations can be handled in the event
       START-OF-SELECTION.
    2. We should them and other such validations,
       using this logic
    START-OF-SELECTION.
    IF ERRORCONDIDTION.
    <b>MESSAGE 'PLEASE ENTER ' TYPE 'S'
    LEAVE LIST-PROCESSING.</b>
    ENDIF.
      WRITE :/ 'ABC'.
    3.
    The most important statements are
    A) message should be of type I, or S, or W
       (and not error E)
    b) LEAVE LIST-PROCESSING
      (it discontinues the further list showing,
       and again, re-displays, the selection screen)
    regards,
    amit m.

  • SELECTION-SCREEN problem

    [Background:]
    (1)There are two parameters in a radio button group.
        One is P_SCREEN,it means display report on screen
       and another is P_FILE,it means output report into a file.
    (2)There is a parameter P_NTFILE, use it to indicate output file path.
    [Target:]
    (1)After the selection-screen built,
       If the P_FILE is checked,P_NTFILE should be enable.
       If the P_SCREEN is checked,P_NTFILE should be disable.
    [Code:]
    Parameter in Block2
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME.
    SELECTION-SCREEN BEGIN OF LINE.
    PARAMETERS: P_SCREEN RADIOBUTTON GROUP R1. " Screen output
    SELECTION-SCREEN COMMENT 04(21) TEXT-001.
    SELECTION-SCREEN POSITION 32.
    PARAMETERS: P_FILE RADIOBUTTON GROUP R1. " NTFILE output
    SELECTION-SCREEN COMMENT 35(17) TEXT-002.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK B2.
    Parameter in Block3
    SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME.
    PARAMETERS: P_NTFILE(45) TYPE C LOWER CASE OBLIGATORY MODIF ID SC1.
    P_PCFILE      LIKE RLGRAP-FILENAME OBLIGATORY.
    SELECTION-SCREEN END   OF BLOCK B3.
    *&      AT SELECTION-SCREE
    AT SELECTION-SCREEN.
      IF P_SCREEN = 'X'.
        FLAG = 0.
      ENDIF.
      IF P_FILE = 'X'.
        FLAG = 1.
      ENDIF.
    *&      AT SELECTION-SCREE ON <FIELD>
    AT SELECTION-SCREEN ON RADIOBUTTON GROUP R1.
      IF P_SCREEN = 'X'.
        LOOP AT SCREEN.
          IF SCREEN-GROUP1 = 'SC1'.
            SCREEN-INPUT = FLAG.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
      IF P_FILE = 'X'.
        LOOP AT SCREEN.
          IF SCREEN-GROUP1 = 'SC1'.
            SCREEN-INPUT = FLAG.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    [Problem:]
    P_NTFILE can not refresh between enable and disable status.
    Anyone can help me?

    *& Report  Z_JAGANOBJECT                                               *
    REPORT  Z_JAGANOBJECT line-count 0(1)                          .
    Tables sscrfields.
    *--parameters--
            SELECTION-SCREEN BEGIN OF BLOCK RB1 WITH FRAME TITLE new.
            selection-screen :skip 2.
                PARAMETERS : cmp_name(10) type c,
                             imp_code(5) type n,
                             exp_cmp(10) TYPE c,
                             Exp_mtrl(10) TYPE c.
    ------------------------radi button---------------------
               SELECTION-SCREEN BEGIN OF BLOCK RB WITH FRAME TITLE text.
               selection-screen: skip 1.
                 PARAMETERS : Import RADIOBUTTON GROUP RB user-command usr,
                              Export RADIOBUTTON GROUP RB DEFAULT 'X'.
               SELECTION-SCREEN END OF BLOCK RB.
               SELECTION-SCREEN END OF BLOCK RB1.
    *--push button--
    SELECTION-SCREEN PUSHBUTTON /40(20) SAVE USER-COMMAND STORE.
    DATA : FLAG TYPE I.
    *--internal tables--
    data :    begin of itab occurs 0,
                 cmp_name(10) type c,
                 imp_code(5) type n,
              end of itab.
    data :    begin of itab1 occurs 0,
                 exp_cmp(10) TYPE c,
                 Exp_mtrl(10) TYPE c,
              end of itab1.
    *--initalisaton--
    INITIALIZATION.
    save = 'store'.
    text = ' Type '.
    new = ' Import- Export details'.
    *--selection screen--
    AT SELECTION-SCREEN.
          case SSCRFIELDS-ucomm.
               when 'STORE'.
               FLAG = '1'.
                    if import = 'X'.
                       itab-cmp_name = cmp_name.
                       itab-imp_code = imp_code.
                append itab.
                clear itab.
                endif.
                    if export = 'X'.
                       itab1-exp_cmp = exp_cmp.
                       itab1-Exp_mtrl = Exp_mtrl.
               append itab1.
               clear itab1.
               endif.
               ENDcase.
    *--selection screen output--
    AT SELECTION-SCREEN OUTPUT.
      IF export = 'X'.
       LOOP AT SCREEN.
          IF SCREEN-NAME = 'CMP_NAME' OR  SCREEN-NAME = 'IMP_CODE'.
            SCREEN-INPUT = '0'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
       elseIF import  = 'X'.
        LOOP AT SCREEN.
          IF SCREEN-NAME = 'EXP_CMP' OR SCREEN-NAME = 'EXP_MTRL'.
            SCREEN-INPUT = '0'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    end-of-selection.
    LOOP AT ITAB.
    WRITE : /10 itab-cmp_name, 30 itab-imp_code.
    ENDLOOP.
    LOOP AT ITAB1.
    WRITE : /10 itab1-exp_cmp,50 itab1-exp_mtrl.
    ENDLOOP.
    hope its useful,
    reward points if its useful
    regards
    vijay

  • At selection screen Problem

    Hai experts
    parameters     : p_bukrs like j_1iexchdr-bukrs obligatory default 'GMI'.
    select-options : s_werks for j_1iexchdr-werks,
                     s_rcwrk for j_1iexchdr-rcwrk,
                     s_exdat for j_1iexchdr-exdat.
    selection-screen end of block 1.
    at selection-screen on s_exdat.
      if s_exdat-low > s_exdat-high.
        message e303(ME) with 'Please Enter correct dates'.
      endif.
    Here  select-options(s_exdat)  field is not trgered, it didnot display  given message if dates given wrong.
    how can i trigger when select-options field.
    thansks
    sitaram

    Hi,
    if u want  that if s_exdat-high is less than s_exdat-low,then give error message.
    then for this u need not write anty code ,
    by default if you give lesser value in s_exdat-high than s_exdat-low, error message will come.
    just comment ur this code and try .
    it will work.
    regards,
    sudha

  • Selection Screen problem Urgent  ...

    Please find below  ; It doesn't care of selection screen .For example I want to take all material mtart is 'abc'  . How can I build that .For example there is one record instead of mtart (abc ) but when I enter bcd it also get something.
      SELECT  * FROM mbew
         WHERE matnr in s_matnr
         AND bwkey IN s_bwkey.
        ytab-matnr = mbew-matnr .
        ytab-kaln1 = mbew-kaln1 .
        SELECT SINGLE * FROM makt
        WHERE matnr = ytab-matnr.
        ytab-maktx = makt-maktx .
        SELECT SINGLE * FROM mara
                 WHERE matnr = ytab-matnr
              AND matkl IN s_matkl
                AND mtart IN s_mtart.
        ytab-matkl = mara-matkl .
        ytab-mtart = mara-mtart .
        SELECT SINGLE * FROM mvke
        WHERE matnr = ytab-matnr
        AND  kondm IN s_kondm .
        ytab-kondm = mvke-kondm .
        SELECT SINGLE * FROM ckmlcr
        WHERE kalnr = ytab-kaln1
        AND bdatj EQ s_bdatj
        AND curtp EQ s_curtp.
        ytab-kalnr = ckmlcr-kalnr .
        ytab-bdatj = ckmlcr-bdatj .
        ytab-curtp = ckmlcr-curtp .
        SELECT SINGLE * FROM vbrp
                  WHERE matnr = ytab-matnr.
        ytab-vbeln = vbrp-vbeln .
        ytab-fbuda = vbrp-fbuda .
        ytab-posnr = vbrp-posnr .
        ytab-fkimg = vbrp-fkimg .
        ytab-netwr = vbrp-netwr .
    APPEND ytab.
        CLEAR  ytab.
      ENDSELECT.
    Message was edited by:
            yusuf tunay çilesiz

    Hi,
    The code looks good..Explain your problem clearly..
    What ever you give in the selection screen is not getting filtered..??
    AFter this select check for sy-subrc..
    SELECT SINGLE * FROM mara
    WHERE matnr = ytab-matnr
    AND matkl IN s_matkl
    AND mtart IN s_mtart.
    IF SY-SUBRC <> 0.
    if you want to skip the record if there is no material found for the corresponding
    material, matkl and mtart...use CONTINUE..Which will process the next record in the MBEW select..
    CONTINUE.
    ENDIF.
    Thanks,
    Naren

  • Query selection screen problem

    Dear all,
    We have turnover per companycode report in our portal. When the selection screen appear for the query I tried to press f4 help to get the list for Supplier. But this not getting displayed. Can you please let me know the reason why this happens ?
    For all the remaining field selection i could get the list except the supplier field.
    I also tried checking the master data and SID table for supplier. they have data in the table.
    Please let me know the problem & from wher the data is retrieved when we process f4 help.
    Thankyou!
    Bala

    Hello there,
    There are settings at info object level and Query designer level. At info object level for the characteristic, go to the tab Business Explorer and check the settings for the Query filter value. Similarly check the settings for the characteristics which show values for f4 help.
    Also there is a similar setting for the info object at query designer level with similar names in the properties pane of the characteristic.
    Check them and set it accordingly.
    Regards
    Joga

Maybe you are looking for