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.

Similar Messages

  • 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.

  • 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.

  • Call a screen in another program

    Hi
    I have a program PRG1 that has screen 1000.
    I want to load this screen from the program PRG2.
    thanks
    Murugesh

    yes , do now like below. it will surely work. it worked for me.
    DATA: bdcdata_wa TYPE bdcdata,
    bdcdata_tab TYPE TABLE OF bdcdata.
    CLEAR bdcdata_wa.
    bdcdata_wa-program = 'PRG1'.
    bdcdata_wa-dynpro = '1000'.
    bdcdata_wa-dynbegin = 'X'.
    APPEND bdcdata_wa TO bdcdata_tab.
    CALL TRANSACTION <TCODE> USING BDCDATA_TAB.

  • How to call  Screen in another program from exsisting program

    Hello Frieds,
    Can any one help me how to call  a screen  in another program (Say "test2") from exsisting program(say "test1')
    If above case is possible then how to access the fields in the target screen?
    Your responce is greatly appreciated.
    Best Regards,
    Rakesh

    Hi Rakesh,
    If you wish to use ONLY the screen of another program, call transaction  will not help you, because the called transaction will be fully executed (and not only the screen), and the acess to screen field wil be difficult.
    When you wish to access the same screen from more than one program, you can create this screen in a function module and in this way you can call the function (to display the screen) in many programs.
    Best regards,
    Leandro Mengue

  • How to insert a standard selection screen on moduled program?

    Hi All,
    Selection screen can be easily done in classic report by just simply invoking the event "SELECTION-SCREEN"
    SELECTION-SCREEN BEGIN OF ...
    SELECT-OPTIONS ...
    PARAMETERS ...
    In the case of moduled program, there will be a PBO and PAI, I have a requirement on my 2nd screen where I need to have a selection screen, but the SELECTION-SCREEN event is not applicable for NOT TYPE 1(Executable) Program.
    My Dialog Program Flow:
    Main Screen -> Display Screen (should be SELECTION SCREEN) -> Output (3rd screen)
    What's the best alternative solution on this scenario?
    Thanks.

    Hi All,
    I layout and detailed my question, please see my scenario below:
    screen 9000
    MODULE user_command_9000 INPUT.
      CASE ok_code.
         WHEN 'CREATE'.
            CALL SCREEN 9001.
         WHEN 'DISPLAY'.
             "SHOULD CALL A SELECTION SCREEN HERE
             "AFTER THE SELECTION SCREEN, IS ANOTHER SCREEN FOR OUTPUT
        ENDCASE.
    TOP include
    SELECTION-SCREEN BEGIN OF SCREEN 9003 AS SUBSCREEN.
      PARAMETERS P_PLANT TYPE T001W-WERKS.
      SELECT-OPTIONS: S_MATNR    FOR MARA-MATNR,
                      S_LICHA    FOR MCHA-LICHA,
                      S_LIFNR    FOR LFA1-LIFNR.
    SELECTION-SCREEN END OF SCREEN   9003.
    Questions:
    1. on the PAI of my main screen 9001, how can I call the SUBSCREEN I created using CALL SUBSCREEN?
        the code:
            CALL SUBSCREEN 9001 INCLUDING 'PROG_NAME' '9002',
         is not working / syntax error.
    2. Should I call it like this?
        WHEN 'DISPLAY'.
           CALL SCREEN 9002.
       Screen 9002 PBO
            CALL SUBSCREEN 9001INCLUDING 'PROG_NAME' 9002',
         is not working / syntax error.
    Thanks all.
    Edited by: Jaime Cabanban on Dec 2, 2009 5:29 PM

  • 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

  • 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.

  • 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

  • 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

  • CALL TRANSACTION 'ME33K  from another program

    Hi,
    I ma trying to CALL TRANSACTION 'ME33K  from another program, but it is not working.  The transactions is opening, but it is not opening with the contract number (ls_ekpo-ebeln) i am passing.
    ls_ekpo-ebeln does have a valued when CALL TRANSACTION 'ME33K  is called.
    In debug, I noticed the "value" is blank when step into CALL TRANSACTION 'ME33K .
       WHEN 'EBELN'.  "Contract
          l_field = 'EVRTN'.
         IF ls_ekpo-ebeln <> ''.
            GET PARAMETER ID 'VRT' FIELD l_field.  "EVRTN.
           SET PARAMETER ID 'VRT' FIELD ls_ekpo-ebeln.
           CALL TRANSACTION 'ME33K AND SKIP FIRST SCREEN.
            SET PARAMETER ID 'VRT' FIELD ls_ekpo-ebeln.
          ENDIF.
    Any help or suggestions would be great.
    Thanks,
    Naing

    Dear Naing,
    I execute the same code
    IF ls_ekpo IS INITIAL.
    GET PARAMETER ID 'VRT' FIELD LS_EKPO.
    SET PARAMETER ID 'VRT' FIELD ls_ekpo.
    CALL TRANSACTION 'ME33K' AND SKIP FIRST SCREEN.
    SET PARAMETER ID 'VRT' FIELD ls_ekpo.
    ENDIF.
    And it is working.
    Try to do de simple sintax.
    A program with one pararmeter to introduce the contract number.
    The set parameter for this parameter and the call transaction.
    I´m waiting your comments.
    Regards.
    Antonio.

Maybe you are looking for

  • WSUS: Snap-in not Responding

    Hi All,  I am encountering a problem with my WSUS server i got error "the snap-in is not responding"  when i check event viewer i got this below: ======== Event code: 3001  Event message: The request has been aborted.  Event time: 1/13/2015 3:19:07 P

  • CS4 Importing SD video from Sony NX5

    I can import it but it looks blurry and soft and needs to be rendered. The video comes from Sony NX5 tapeless camera.  It records SD in mpeg2 instead of DV. The softness seems to happen during this conversion, the original video looks sharp when view

  • Buying ITunes gift cards and shipping them to the Gulf

    I am interested in purchasing "x" ITunes gift cards and shipping them to one of the countries in the Gulf like Qatar, Dubai, or Abu Dhabi. My question to you is, is that possible without running into any legal issues or so forth? If so, please let me

  • HT4864 Registros mx para configurar mi email en otro sitio

    . He construido un sitio web con Wix.com. Estoy utilizando los namservers (dns) de ellos, por favor, envienme los registros MX, para que pueda enviarselos a Wix.com y tener los correos redireccionados de nuevo a usted mi host"}.  como encuentro esta

  • Navigation toolbar is missing scroll feature since updating to 8.0.1 Please help.

    I have read through the forums and learned quite a bit about customizing ff.I need an answer to this small yet annoying issue of the missing scroll on my navigation toolbar,drop-down.