Call Selection screen of other program..

Hello ABAP Experts,
I have a situation where in I need to call the selection screen of one sap generated standard program without executing that program & get the values of those selection variables in to my custom program. Is there a way to do that? Please help.
Thanks,
Pandu

If it is static or one program I could have done like that. But the nature of the  program is dynamic & not just one program.

Similar Messages

  • Calling selection screen of another  program

    Hi all,
         Am trying to call a program from a enhancement section of IW3K transaction using the following statement.But the selection screen of the program is not getting displayed.
    but the screen is dispalyed when i run the statement in debug mode.
    Can anyone help me on this...
    useful answers will be rewarded.
    submit Z XXXXX            via selection-screen
                                       WITH s_ispla =  'BEKD'
                                       WITH p_rsnum =  CAUFVD-rsnum
                                       WITH s_rspos in   i_range_tab
                                       and RETURN.

    hi,
    You can call one selection screen from other selection screen program using SUBMIT command.
    The syntax is as follows -
    codeSUBMIT... VIA SELECTION-SCREEN
    USING SELECTION-SET <var>
    WITH <sel> <criterion>
    WITH FREE SELECTIONS <freesel>
    WITH SELECTION-TABLE <rspar>.[/code]
    e.g.
    The following executable program (report) creates a selection screen containing the parameter PARAMET and the selection criterion SELECTO:
    codeREPORT demo_program_submit_rep1.
    DATA number TYPE i.
    PARAMETERS paramet(14) TYPE c.
    SELECT-OPTIONS selecto FOR number.[/code]
    The program DEMO_PROGRAM_SUBMIT_REP1 is called by the following program using various parameters:
    codeREPORT demo_program_submit_sel_screen NO STANDARD PAGE HEADING.
    DATA: int TYPE i,
    rspar TYPE TABLE OF rsparams,
    wa_rspar LIKE LINE OF rspar.
    RANGES seltab FOR int.
    WRITE: 'Select a Selection!',
    SKIP.
    FORMAT HOTSPOT COLOR 5 INVERSE ON.
    WRITE: 'Selection 1',
    / 'Selection 2'.
    AT LINE-SELECTION.
    CASE sy-lilli.
    WHEN 4.
    seltab-sign = 'I'. seltab-option = 'BT'.
    seltab-low = 1. seltab-high = 5.
    APPEND seltab.
    SUBMIT demo_program_submit_rep1 VIA SELECTION-SCREEN
    WITH paramet eq 'Selection 1'
    WITH selecto IN seltab
    WITH selecto ne 3
    AND RETURN.
    WHEN 5.
    wa_rspar-selname = 'SELECTO'. wa_rspar-kind = 'S'.
    wa_rspar-sign = 'E'. wa_rspar-option = 'BT'.
    wa_rspar-low = 14. wa_rspar-high = 17.
    APPEND wa_rspar TO rspar.
    wa_rspar-selname = 'PARAMET'. wa_rspar-kind = 'P'.
    wa_rspar-low = 'Selection 2'.
    APPEND wa_rspar TO rspar.
    wa_rspar-selname = 'SELECTO'. wa_rspar-kind = 'S'.
    wa_rspar-sign = 'I'. wa_rspar-option = 'GT'.
    wa_rspar-low = 10.
    APPEND wa_rspar TO rspar.
    SUBMIT demo_program_submit_rep1 VIA SELECTION-SCREEN
    WITH SELECTION-TABLE rspar
    AND RETURN.
    ENDCASE.[/code]
    => To leave a called program, you can use SUBMIT .... AND RETURN. by choosing F3 or F15 from list level 0 of the called report.

  • Selection-screen in module program

    Hi,
    I have created a module pool prog.
    Now the new regd. is that I want to create selection-screen before displying the actual screen.
    But when I m trying to use selection screen then I m getting the message that it is not possible in type 'M' as my program is module pool.
    I m using screen 9000 to display the records, now where to write selection screen in the program?
    I think in PBO but getting some error, I have created one screen and in that defined a subscreen but it is giving some error.
    So any body knows how to add selection screen in 'M' type program?
    Thankx in advance.
    Umesh

    Hi,
    You can create a selection-screen for a module pool program.
    Create a new program with executable type. Create the selection screen as you would do in a normal program. Once you give data in the selection and press F8 button, based on the logics written, the O/P must appear in a table control. This is what your requirement is:
    A example below for your understanding.
    name of the prog : ZTEST
    Type: Exectable report (I)
    *----Selection Screen -
    SELECTION-SCREEN BEGIN OF BLOCK IPDATA WITH FRAME TITLE TEXT-001.
    PARAMETERS: PR_MONTH LIKE BOITEM-SPMON.
    SELECT-OPTIONS: SO_VKGRP FOR KNVV-VKGRP.
    SELECTION-SCREEN END OF BLOCK IPDATA.
    SELECTION-SCREEN BEGIN OF BLOCK ORGDATA WITH FRAME TITLE TEXT-002.
    SELECT-OPTIONS: SO_REGIO FOR KNA1-REGIO,
                    SO_KUNNR FOR KNA1-KUNNR,
                    SO_WERKS FOR T001W-WERKS.
    SELECTION-SCREEN END OF BLOCK ORGDATA.
    *--Selection Screen Events--
    START-OF-SELECTION.
      W_CURMFDAY = SY-DATUM.
      W_CURMFDAY+6(2) = '01'.
      PERFORM F001_GETDATA.
      IF SY-DBCNT EQ 0.
        MESSAGE S017(ZSFL).
        EXIT.
      ENDIF.
      PERFORM F002_ADDITIONALDATA.
      CALL SCREEN 100.
    For this screen 100, both the PBO and PAI can be declared in this main program itself.
    Regards,
    JLN.

  • Issue with CALL SELECTION-SCREEN

    Hi experts,
    I am working on a report.
    Here on the selection screen , based on the selection of some radiobuttons ,i want to call a secondary selection screen.
    So i am using the following program code ,
    AT SELECTION-SCREEN on BLOCk blk.
    IF p_abc  =  c_x.
        CALL SELECTION-SCREEN 100 STARTING AT 20 5.
        IF sy-subrc <> 0.
          MESSAGE text-011 TYPE c_e .
        ENDIF.
      ENDIF.
    so currently , once i complete my slection on the screen 100 , the popup screen stays there and rest of the programing logic is executed correctly.
    My issue is that , once i complete my slection on the screen 100, i want that the pop up should be closed
    And then the the rest of the program logic should continue.    
    please guide me how ,this can be done.
    Regards,
    Rajesh Kumar.

    Hi
    The event AT SELECTION-SCREEN and AT SELECTION-SCREEN ON BLOCK  are very similar, only the second event see the part of selection-screen defined in the block.
    This events are triggered as soon as the user does something: so press ENTER, F8,........
    If u want the second-selction screen is shown once and the main selection-screen has to be displayed under the second one, u can try to run the second one only if the report has to run, so if the user has pressed F8, code ONLI.
    AT SELECTION-SCREEN on BLOCk blk.
    CHECK SY-UCOMM = 'ONLI'.
    IF p_abc = c_x.
      CALL SELECTION-SCREEN 100 STARTING AT 20 5.
      IF sy-subrc 0.
         MESSAGE text-011 TYPE c_e .
      ENDIF.
    ENDIF.
    In tihs way the rest of the program will be executed, else u need to move all code of the event START-OF-SELECTION and END-OF-SELECTION in the event AT SELECTION-SCREEN, or, just as I said before, to move the calling of POPUP to event START-OF-SELECTION.
    Max

  • Short dump while using call selection-screen mdynnr

    Hi ALL,
    I need your help and information.
    In programmes, We are using the statament " CALL SELECTION-SCREEN MDYNNR " 
    and passing the screens dynamically into variable mdynnr.
    And the programme is going to dump after executing 50 times.
    When we
    can we use any other statement instead of CALL SELECTION-SCREEN MDYNNR.
    Your information helps us lot.
    Thanks in advance.
    Srinivasa Reddy.

    Hi,
    As you know Call Screen is the statement, but you will get the problem if you are going to call it in the same LUW repeatedly. So, FM is the only convenient way to do it. This is very easy. Just create a FM and replace you statement with this FM. Hopefully this will solve your problem.
    Check this comment " When you call a new main program in order to use a screen sequence (for example, using CALL TRANSACTION), a new SAP LUW begins. This may be an undesired effect, especially when you are trying to modularize a transaction that updates the database.
    An alternative to this is to use an external procedure, whose main program is linked to a screen sequence, and which contains the corresponding dialog modules. Procedures run in the same SAP LUW and internal session as their calling program."
    Thanks,

  • Back on a CALL SELECTION-SCREEN from an ALV

    Hi all,
    I have created a program with a normal selection-screen (1000).
    According to the selected values, when I press "Execute" I go to a next selection-screen (2000) with instruction CALL SELECTION-SCREEN 2000.
    Then I display an ALV.
    When I press the back button, I want to go back to screen 2000, but actually I go directly to screen 1000.
    PARAMETERS : p_choic1 RADIOBUTTON GROUP cho DEFAULT 'X'.
    PARAMETERS : p_choic2 RADIOBUTTON GROUP cho.
    SELECTION-SCREEN BEGIN OF SCREEN 2000.
    PARAMETERS : p_table TYPE char10.
    SELECTION-SCREEN END OF SCREEN 2000.
    START-OF-SELECTION.
      IF NOT p_choic1 IS INITIAL.
        CALL SELECTION-SCREEN 2000.
        PERFORM alv_process.
      ENDIF.
    Have you got any idea of what I can do to return to screen 2000 from the ALV after pressing Back button ?
    Thanks.

    Hi,
    Follow below sample code...
    SELECTION-SCREEN BEGIN OF SCREEN 2000.
    PARAMETERS p_mat  TYPE matnr.
    PARAMETERS p_enam TYPE ernam.
    SELECTION-SCREEN END OF SCREEN 2000.
    START-OF-SELECTION.
    set PF-STATUS 'STATUS'.
      WRITE:/ p_mat,
              p_enam.
    AT USER-COMMAND.
      CASE SY-UCOMM.
      WHEN 'S2000'.
          CALL SELECTION-SCREEN 2000.
      WHEN 'EXIT'.
          EXIT.
      ENDCASE.
    Ram.

  • Calling selection screen from another selecton screen.

    Hi guys,
    I want to call default selection screen of one program from default selection screen of another program.
    Is that possible . would appreciate some helpful answers.
    Thanks,
    Venkat.

    it is possiable.
    1.submit
    2. call transcation t_code.
    Syntax
    SUBMIT <prog>.
    For more information about the SUBMIT statement, see Calling Executable Programs (Reports)
    Assume the following simple report:
    REPORT ZDYN3.
    WRITE / 'Dynamic Program!'.
    The following executable program (report) starts, modifies, and restarts ZDYN3:
    REPORT ZMASTER1.
    DATA CODE(72) OCCURS 10.
    DATA LIN TYPE I.
    READ REPORT 'ZDYN3' INTO CODE.
    SUBMIT ZDYN3 AND RETURN.
    DESCRIBE TABLE CODE LINES LIN.
    MODIFY CODE INDEX LIN FROM
    'WRITE / ''Dynamic Program Changed!''.'.
    INSERT REPORT 'ZDYN3' FROM CODE.
    SUBMIT ZDYN3.
    The output of this program is displayed on two subsequent output screens. The first screen displays:
    Dynamic Program!
    The second screen displays:
    Dynamic Program Changed !
    When you use the SUBMIT statement, all modifications made to a program during runtime take immediate effect before they are submitted. In the above example, ZDYN3 is submitted from ZMASTER1 first in its original and then in its modified form, generating different results.
    This is not the case if you change the codes of include programs or subroutines dynamically.
    Assume the following include program:
    INCLUDE ZINCLUD1.
    WRITE / 'Original INCLUDE program!'.
    and an executable program (report) for modifying and including it:
    REPORT ZMASTER2.
    DATA CODE(72) OCCURS 10.
    DATA LIN TYPE I.
    READ REPORT 'ZINCLUD1' INTO CODE.
    DESCRIBE TABLE CODE LINES LIN.
    MODIFY CODE INDEX LIN FROM
                'WRITE / ''Changed INCLUDE program!''.'.
    INSERT REPORT 'ZINCLUD1' FROM CODE.
    INCLUDE ZINCLUD1.
    If you run ZMASTER2, the source code of include program ZINCLUD1 is changed and replaced in the system. However, the last line of ZMASTER2 executes the older version since the runtime object of ZMASTER2 is generated before ZINCLUD1 is modified. Only when ZMASTER2 is run a second time, does the system determine that ZINCLUD1 has been changed. Exactly the same is true if you dynamically modify the source code of a subroutine and call it from within the same program.
    One way to solve this problem is to use the INCLUDE statement within an external subroutine that is called by the program. This allows you to create or modify include programs or subroutines and use the updated versions directly in the same program.
    Assume the following include program:
    INCLUDE ZINCLUD1.
    WRITE / 'Original INCLUDE program!'.
    and an external subroutine:
    PROGRAM ZFORM1.
    FORM SUB1.
         INCLUDE ZINCLUD1.
    ENDFORM.
    The following program reads the include program, modifies it, enters it back into the system, and calls the subroutine.
    REPORT ZMASTER3.
    DATA CODE(72) OCCURS 10.
    READ REPORT 'ZINCLUD1' INTO CODE.
    APPEND 'WRITE / ''Extension of INCLUDE program!''.' TO CODE.
    INSERT REPORT 'ZINCLUD1' FROM CODE.
    PERFORM SUB1(ZFORM1).
    This produces the following output:
    Original INCLUDE program!
    Extension of INCLUDE program!
    In this case, the updated version of the include program is used in the subroutine because its time stamp is checked when the subroutine is called, and not when the calling program is generated.

  • Selection screen on moudle programming

    The business needs selection parameter for select options to an existing module program. All the functionalities for a select-option in selection screen should be available.
    I know that we can have normal selection screen 1000 and then call the relavent screen using call screen.
    My need is for the exisiting module program.
    Is it possible if yes then how can that be achieved...?

    Hi ,
      You can define the selection screen in the top include...and use the syntax CALL SELECTION-SCREEN..
      check the F1 help for call selection-screen...
    Thanks
    Naren

  • Can I make two differents selection screen in my program?

    Hi experts!!
    I don't know how to male this, the problem is that I need to make two differents selection screen in my program because I have two differents kinds of button,
    BUTTON1         BUTTON2          BUTTON3
    When I press button1 I received.
    BUTTON4         BUTTON5          BUTTON6
    Now If I press on button4, how can I pick up the event? the name or something associate to this button4?
    Thanks a lot and regards
    Rebeca

    Hi and thanks,
    I've tried with your code,  Velu Lakshmanan,  and I only received another screen with the buttons... I need to put this button in the same screen, now I've this, but I can't receive the event associate to the second's buttons,
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN PUSHBUTTON  1(79) DTP USER-COMMAND DTP
    VISIBLE LENGTH 25.
    SELECTION-SCREEN PUSHBUTTON 28(79) EMP USER-COMMAND EMP
    VISIBLE LENGTH 25.
    SELECTION-SCREEN PUSHBUTTON 55(79) ABS USER-COMMAND ABS
    VISIBLE LENGTH 25.
    PARAMETERS: PROC_TYP TYPE I DEFAULT 1 NO-DISPLAY.
    SELECTION-SCREEN END OF LINE.
    * Informes de datos de tiempo.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN PUSHBUTTON 1(25)  TEXT-FED USER-COMMAND FED MODIF ID DT1.
    SELECTION-SCREEN PUSHBUTTON 28(25) TEXT-DCH USER-COMMAND DCH MODIF ID DT1.
    SELECTION-SCREEN PUSHBUTTON 55(25) TEXT-ACH USER-COMMAND ACH MODIF ID DT1.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN PUSHBUTTON 1(25)  TEXT-FII USER-COMMAND FII MODIF ID DT1.
    SELECTION-SCREEN PUSHBUTTON 28(25) TEXT-PTB USER-COMMAND PTB MODIF ID DT1.
    SELECTION-SCREEN PUSHBUTTON 55(25) TEXT-PTS USER-COMMAND PTS MODIF ID DT1.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN PUSHBUTTON 1(25)  TEXT-ACI USER-COMMAND ACI MODIF ID DT1.
    SELECTION-SCREEN PUSHBUTTON 28(25) TEXT-FIM USER-COMMAND FIM MODIF ID DT1.
    SELECTION-SCREEN PUSHBUTTON 55(25) TEXT-LDH USER-COMMAND LDH MODIF ID DT1.
    SELECTION-SCREEN END OF LINE.
    * Informes de empleados
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN PUSHBUTTON 1(25)  TEXT-LDP USER-COMMAND LDP MODIF ID EM1.
    SELECTION-SCREEN PUSHBUTTON 28(25) TEXT-PDF USER-COMMAND PDF MODIF ID EM1.
    SELECTION-SCREEN PUSHBUTTON 55(25) TEXT-LDT USER-COMMAND LDT MODIF ID EM1.
    SELECTION-SCREEN END OF LINE.
    * Informes de bajas
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN PUSHBUTTON 1(25)  TEXT-BAJ USER-COMMAND BAJ MODIF ID AB1.
    SELECTION-SCREEN PUSHBUTTON 28(25) TEXT-VMA USER-COMMAND VMA MODIF ID AB1.
    SELECTION-SCREEN PUSHBUTTON 55(25) TEXT-SDE USER-COMMAND SDE MODIF ID AB1.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN PUSHBUTTON 1(25)  TEXT-LDB USER-COMMAND LDB MODIF ID AB1.
    SELECTION-SCREEN PUSHBUTTON 28(25) TEXT-LDA USER-COMMAND LDA MODIF ID AB1.
    SELECTION-SCREEN PUSHBUTTON 55(25) TEXT-DHT USER-COMMAND DHT MODIF ID AB1.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK B1.
    * Pintamos los botones que necesitemos mostrar según la opción seleccionada
    AT SELECTION-SCREEN.
      CASE SSCRFIELDS-UCOMM.
        WHEN 'DTP'. PROC_TYP = 1.
        WHEN 'EMP'. PROC_TYP = 2.
        WHEN 'ABS'. PROC_TYP = 3.
      ENDCASE.
    AT SELECTION-SCREEN OUTPUT.
      CASE PROC_TYP.
    * Cuando el botón que ha seleccionado es "Datos de tiempo"
        WHEN 1.
          CALL FUNCTION 'ICON_CREATE'
            EXPORTING
              NAME   = ICON_OKAY
              TEXT   = TEXT-DTP
              INFO   = TEXT-AUS
            IMPORTING
              RESULT = DTP.
          EMP = TEXT-EMP.
          ABS = TEXT-ABS.
          LOOP AT SCREEN.
            IF SCREEN-GROUP1 EQ 'DT1'.
              SCREEN-INPUT = '1'. SCREEN-INVISIBLE = '0'. MODIFY SCREEN.
            ENDIF.
            IF SCREEN-GROUP1 EQ 'EM1'.
              SCREEN-INPUT = '0'. SCREEN-INVISIBLE = '1'. MODIFY SCREEN.
            ENDIF.
            IF SCREEN-GROUP1 EQ 'AB1'.
              SCREEN-INPUT = '0'. SCREEN-INVISIBLE = '1'. MODIFY SCREEN.
            ENDIF.
          ENDLOOP.
        WHEN 2.
          CALL FUNCTION 'ICON_CREATE'
            EXPORTING
              NAME   = ICON_OKAY
              TEXT   = TEXT-EMP
              INFO   = TEXT-AUS
            IMPORTING
              RESULT = EMP.
          DTP = TEXT-DTP.
          ABS = TEXT-ABS.
          LOOP AT SCREEN.
            IF SCREEN-GROUP1 EQ 'DT1'.
              SCREEN-INPUT = '0'. SCREEN-INVISIBLE = '1'. MODIFY SCREEN.
            ENDIF.
            IF SCREEN-GROUP1 EQ 'EM1'.
              SCREEN-INPUT = '1'. SCREEN-INVISIBLE = '0'. MODIFY SCREEN.
            ENDIF.
            IF SCREEN-GROUP1 EQ 'AB1'.
              SCREEN-INPUT = '0'. SCREEN-INVISIBLE = '1'. MODIFY SCREEN.
            ENDIF.
          ENDLOOP.
        WHEN 3.
          CALL FUNCTION 'ICON_CREATE'
            EXPORTING
              NAME   = ICON_OKAY
              TEXT   = TEXT-ABS
              INFO   = TEXT-AUS
            IMPORTING
              RESULT = ABS.
          DTP = TEXT-DTP.
          EMP = TEXT-EMP.
          LOOP AT SCREEN.
            IF SCREEN-GROUP1 EQ 'DT1'.
              SCREEN-INPUT = '0'. SCREEN-INVISIBLE = '1'. MODIFY SCREEN.
            ENDIF.
            IF SCREEN-GROUP1 EQ 'EM1'.
              SCREEN-INPUT = '0'. SCREEN-INVISIBLE = '1'. MODIFY SCREEN.
            ENDIF.
            IF SCREEN-GROUP1 EQ 'AB1'.
              SCREEN-INPUT = '1'. SCREEN-INVISIBLE = '0'. MODIFY SCREEN.
            ENDIF.
          ENDLOOP.
      ENDCASE.
    Help please... I don't know how can I make this.....
    If I use screen...how can I put this screen in the correct place?
    Thanks a lot
    Regards,
    Rebeca

  • Problem with the selection screen in submit program

    Hi Friends,
    i am facing the problem wih the selection screen in submit program. in my Module pool program i am using the submit program statement, When i execute the program , The module program display the submit program selections creen.
    I have implemented the code same as below.
    submit ztest with tknum =p_tknum and  return.
    Can you pleaes help me how to avoid the submit program selection screen.
    Thanks,
    Charan

    Hi Charan,
    You have to give the selection screen values when you submit a job.
    Press F1 on submit and you will see more details.
    Here is an example from ABAP Documentation.
    Program accessed
    REPORT report1.
    DATA text(10) TYPE c.
    SELECTION-SCREEN BEGIN OF SCREEN 1100.
      SELECT-OPTIONS: selcrit1 FOR text,
                      selcrit2 FOR text.
    SELECTION-SCREEN END OF SCREEN 1100.
    Calling program
    REPORT report2.
         DATA: text(10)   TYPE c,
          rspar_tab  TYPE TABLE OF rsparams,
          rspar_line LIKE LINE OF rspar_tab,
          range_tab  LIKE RANGE OF text,
          range_line LIKE LINE OF range_tab.
    rspar_line-selname = 'SELCRIT1'.
    rspar_line-kind    = 'S'.
    rspar_line-sign    = 'I'.
    rspar_line-option  = 'EQ'.
    rspar_line-low     = 'ABAP'.
    APPEND rspar_line TO rspar_tab.
    range_line-sign   = 'E'.
    range_line-option = 'EQ'.
    range_line-low    = 'H'.
    APPEND range_line TO range_tab.
    range_line-sign   = 'E'.
    range_line-option = 'EQ'.
    range_line-low    = 'K'.
    APPEND range_line TO range_tab.
    SUBMIT report1 USING SELECTION-SCREEN '1100'
                   WITH SELECTION-TABLE rspar_tab
                   WITH selcrit2 BETWEEN 'H' AND 'K'
                   WITH selcrit2 IN range_tab
                   AND RETURN.
    Regards,
    Jovito.

  • 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

  • CALLING SELECTION SCREEN.

    Hi All,
    My requirement is whenever i am clicking check box on selection screen one window selection screen shu apper where i will enter some data.After pushing execute button it should go to standard selection screen.
    code i hav wirtten as...
    Program *********************************************
    SELECTION-SCREEN BEGIN OF BLOCK 1 WITH FRAME TITLE text-003 .
    PARAMETERS: pa_ls1 AS CHECKBOX,
                            pa_ls2 AS CHECKBOX USER-COMMAND flag.
    SELECTION-SCREEN END OF BLOCK 1.
    SELECTION-SCREEN BEGIN OF SCREEN 2000 TITLE text-004.
    SELECT-OPTIONS: pa_vkorg FOR vbak-vkorg NO INTERVALS NO-EXTENSION.
    SELECTION-SCREEN END OF SCREEN 2000.
    at selection-screen.
    IF pa_ls2 = 'X'.
    do.
        CALL SELECTION-SCREEN '2000'
        STARTING AT 10 10.
        exit.
    enddo.
      ENDIF.
    with this code i am able to call the screen but cant go back to standard screen.

    HI RUSHIKESH,
    MODIFICATION HAS BEEN MADE INTO YOUR CODE.SEE THE BOLD PART.
    REPORT  ZCLICK.
    tables : vbak.
    SELECTION-SCREEN BEGIN OF BLOCK 1 WITH FRAME TITLE text-003 .
    PARAMETERS: pa_ls1 AS CHECKBOX,
    pa_ls2 AS CHECKBOX USER-COMMAND CLICK.
    SELECTION-SCREEN END OF BLOCK 1.
    SELECTION-SCREEN BEGIN OF SCREEN 2000 TITLE text-004.
    SELECT-OPTIONS: pa_vkorg FOR vbak-vkorg NO INTERVALS NO-EXTENSION.
    SELECTION-SCREEN END OF SCREEN 2000.
    at selection-screen.
    IF pa_ls2 = 'X'.
    <b>PA_LS2 = ''.</b>
    CALL SELECTION-SCREEN '2000'
    STARTING AT 10 10.
    ENDIF.

  • Call Selection Screen

    Hi,
    can any one give me good links for
    All variants of at selection screen..
    some thing on call selection screen
    Thx,
    Shashi

    ·     AT SELECTION-SCREEN
    You should only perform very expensive checks with AT SELECTION-SCREEN if the program is then started. Here, you can read the system field SSCRFIELDS-UCOMM (provided a statement TABLES SSCRFIELDS exists). If the field has one of the values 'ONLI' (= Execute) or 'PRIN' (= Execute and Print), the report is then started, i.e. the selection screen is closed and the processing continues with START-OF-SELECTION.
         Additions:
    ·     ... ON psel
    Effect
    This event is assigned to the selection screen fields corresponding to the report parameter or selection criterion psel.
    If the report starts an error dialog at this point, precisely these fields become ready for input.
    ·     ... ON END OF sel
              For each selection criterion sel on the selection screen, you can call a further screen by pressing a pushbutton. On this screen, you can enter any number of single values and ranges for the selection criterion sel..
    When this screen has been processed (i.e. at the end of PAI for this screen), the event AT SELECTION-SCREEN ON END OF sel is executed.
    At this point, all the values entered are available in the internal table sel.
    ·     ... ON VALUE-REQUEST FOR psel_low_high
    Effect
    In this addition, the field psel_low_high is either the name of a report parameter or of the form sel-LOW or sel-HIGH, where sel is the name of a selection criterion. The effect of this is twofold:
    1.     The possible entries pushbutton for F4 appears beside the appropriate field.
    2.     When the user activates this pushbutton or presses F4 for the field, the event is executed. You can thus implement a self-programmed possible entries routine for the input/output fields of the selection screen. If the program contains such an event and the user presses F4, the system processes this rather than displaying the check table or the fixed values of the Dictionary field.
    ·     ... ON HELP-REQUEST FOR psel_low_high
    Effect
    As with the addition ON VALUE-REQUEST the field psel_low_high is either the name of a report parameter or of the form sel-LOW or sel-HIGH, where sel is the name of a selection criterion. When the user presses F1 on the relevant field, the subsequent processing block is executed. You can thus implement a self-programmed help for the input/output fields of the selection screen. If the program contains such an event and the user presses F1, the system processes this rather than displaying the documentation of the Dictionary field - even if the report parameter or the selection option with LIKE or FOR points to a Dictionary field.
    ·     ... ON RADIOBUTTON GROUP radi
    Effect
    This event is assigned to the radio button groups on the selection screen defined by PARAMETERS par RADIOBUTTON GROUP radi.  If the report starts at an error  dialog at this point ,precisely these fields of the radio button group
    radi become ready for input again.
    ·     ... ON BLOCK block
    Effect
    This event is assigned to the blocks on the selection screen defined by SELECTION-SCREEN BEGIN/END OF BLOCK block. If the report starts at an error
    dialog at this point, precisely these fields of the block block become ready for input again.
         The events assigned to the radio button groups are executed according to the first parameter of the radio button group.
    The events assigned to the blocks are executed "from the inside to the outside".
    ·     ... OUTPUT
    Effect
    This event is executed at PBO of the selection screen every time the user presses ENTER - in contrast to INITIALIZATION. Therefore, this event is not suitable for setting selection screen default values. Also, since AT SELECTION-SCREEN OUTPUT is first executed after the variant is imported (if a variant is used) and after adopting any values specified under SUBMIT in the WITH clause, changing the report parameters or the selection options in AT SELECTION-SCREEN OUTPUT would destroy the specified  values. Here, however, you can use LOOP AT SCREEN or MODIFY SCREEN to change the inout/output attributes of selection screen fields. 
    ·     ... ON EXIT-COMMAND
    Effect
    This event is executed at the exit command of the selection screen - that is, at Back, Cancel, or End,events executed after the screen is sent that do not cause the system to check the input and execute the PAI.
    plz reward if useful
    vivek

  • Problem in Call Selection Screen

    Hi,
    I am facing a problem on the call selection screen. The no. of nested screens that can be called by using call selection screen is 50. When the count reaches to 51 it is going to short dump. How can i avoid the dump. What is the system field that captures the nested screens count.
    Thanx in advance,

    Maximum number of nested CALL SCREEN is 50, I think you cannot call 51th screen in a row.
    To avoid short dump you can handle exception <b>DYNP_TOO_MANY_CALL_SCREENS</b> and give error (or information) message 'Maximum number of nested sccreen level is 50' .
      TRY .
          CALL SCREEN 100.
        CATCH cx_root .
          MESSAGE e100(00).
      ENDTRY.

  • To call Selection screen In BSP

    I have written a report "zdemo" in abap editor with some selection screen. I'm desperately looking for <b>_how to call Selection screen In BSP_</b>.
    Any kind of help will be apreciated.
    nikhil

    Hi Nikhil,
    There is no way that, you can call a selection-screen directly or create automatically as in the case of report in ABAP.
    The possible way could be
    Create one more page for holding the selection screen input fields with a submit button.
    On click on submit, do the processing and call the result page.
    Regards,
    Ravi

Maybe you are looking for