Calling a module pool program screen to an executable program

Hi gurus,
I have created a executable program to use selection-screen and want to see my output in module pool program where I have designed table control according to my requirement.
How can I call the module-pool program screen from an executable program?
Any help?
Regards
Mac

Hi Mac,
I think you can proceed with a report program alone . There you create a screen with the table control to populate your result.
In the report program, after getting values for internal table for your display, just call the said screen.
i.e.
CALL SCREEN <screen number>.
Hope this may help you.
Regards,
Smart Varghese

Similar Messages

  • SELECT-OPTIONS in Module Pool Sub-Screen

    Hi,
    I have been working on a Module-Pool Development, in the header portion of the Screen, I have provided a Selection-Screen as a Sub-Screen because the requirement specifies to display a SELECT-OPTION in the Header Area.
    Now the problem is that, when working with the Screen, as soon as I press <ENTER> the Main Screen re-calls the Selection-Screen in the Sub-Screen area and all the entries made in the Selection-Screen are reset/erased.
    Kindly provide a solution either to stop the <ENTER> action to re-call the sub-screen. Or on any alternate method(s) to  provide a SELECT-OPTION on a Module Pool based Screen UI.
    MAIN SCREEN Code:
    *  PROCESS BEFORE OUTPUT
    PROCESS BEFORE OUTPUT.
    *~  Set PF-STATUS and TiTLE for Screen 100
      MODULE status_0100.
    *~  Call the Subscreen Dynamically
      CALL SUBSCREEN subscr1 INCLUDING sy-cprog gv_dynnr1.
      CALL SUBSCREEN subscr2 INCLUDING sy-cprog gv_dynnr2.
    *  PROCESS AFTER INPUT
    PROCESS AFTER INPUT.
    *~  Handle the Exit Commands of Screen 100
      MODULE user_command_0100 AT EXIT-COMMAND.
    *~  Handle the User Command(s) for screen 100
      MODULE user_action_0100.
      CALL SUBSCREEN subscr1.
      CALL SUBSCREEN subscr2.
    So whenever <ENTER> is pressed, the PBO re-calls:
    CALL SUBSCREEN subscr1 INCLUDING sy-cprog gv_dynnr1.
    and the Selection-Screen is reset.
    Regards,
    Nishant Nayyar.

    Haii Nishant,
    This problem was earlier solved by one of the members and after going through it i have now created a select-option in the Subscreen. Just create two input fields, name them as if they were low and high (for convinience as in case of select-option).
    U now need to create a table of type rstabfield.
    Ex: gt_rstab_bukrs type rstabfield.
    Now create a button and assign a Fcode for it. When you click on this button then u need to implement the ranges functionality as in select-option. For that use the following function module:
    CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
    EXPORTING
      TITLE                   = ' '
       TEXT                    = ''
       SIGNED                  = 'X'
       SEARCH_HELP             = 'H_T001'
       TAB_AND_FIELD           = gt_rstab_bukrs
      TABLES
        RANGE                   = rg_bukrs1.
    Hope it helps.
    Best Regards,
    rama

  • Module Pool Selection Screen

    The user wants the custom module pool selection screen to look like a list selection screen.  Meaning that they want to have the multiple selection box come up at the end of the field.  I don't think that this is possible but maybe someone has some ideas

    Use code like the following in your TOP include.
    Note that we have defined screen 500 in the code.
    Now in your transaction code for this module pool set this as the openingscreen. Please revert in case of any clarifications.
    Code.
    =AF---
    selection-screen : begin of screen 500 as window.
    selection-screen : begin of block abc with frame title text-001.
    select-options : s_bukrs for mseg-bukrs no intervals no-extension
    obligatory.
    parameter : p_postdt like mkpf-budat obligatory.
    select-options : s_vendor for mseg-lifnr.
    selection-screen : end of block abc.
    selection-screen : begin of block def with frame title text-002.
    parameter : c_fore radiobutton group g1 default 'X',
    c_back radiobutton group g1 .
    selection-screen : end of block def.
    selection-screen : end of screen 500.
    at selection-screen.
    if sy-ucomm = 'CRET'.
    perform get_data.
    endif.

  • Probelm in module pool selection screen

    Hi,
    I wanted to create transaction variant for my selection screen which i have to design through module pool
    if use the following code im not able to get the screen fields during trancation varian creation
    call screen 1001.
    SELECTION-SCREEN BEGIN OF SCREEN 101.
      SELECTION-SCREEN BEGIN OF BLOCK BL1.
       select-options:s_matnr for mara-matnr.
      SELECTION-SCREEN END  OF  BLOCK BL1.
    Kindly giv me a solution for the above query.
    Thanks In Advance,
    Santhiya B

    Hi,
    The easy way out is use a report program so you can have a normal selection screen and enjoy the variant capability for free. You can then do a 'call screen' so the rest of your processing will behave like a dialog program.
    If that's not possible, here's another option. It's not elegant, but I've done it. If others have better ways, please do share.
    1) Create a dummy program (ZXXXVARI). In this program, all it needs is the selection fields similar to what you have in your module pool.
    2) Add buttons to your dialog screen so users can choose variants, save variant, etc.
    3) Define internal array VALUTAB LIKE RSPARAMS.
    4) When user wants to save their selection, populate VALUTAB, then call FUNCTION 'RS_CREATE_VARIANT' EXPORTING CURR_REPORT = "ZXXXVARI", etc., or call function 'RS_CHANGE_CREATED_VARIANT', depending on whether the variant already exists on the table VARI or not.
    5) When user wants to choose a variant to use, just display the variants in VARI under his id. Once he selects a variant, CALL FUNCTION 'RS_VARIANT_CONTENTS' to retrieve the values saved and put them on the dialog screen.

  • Interval in the module pool selection screen

    Hi Experts,
       I am creating selection screen in module pool program. I know how to set search help for each field.
    But if I have select-options like fields, how can I have "Interval button". Is there any fuction module for that? should I use ranges?
    Thanks and regards,
    Venkat

    Hi,
    Follow these steps:-
    To implement select-options in module pool, first design two input/output fields (textboxes) for the low and high value of the field and name it as <field_name>-low and <field_name>-high.
    Create a button next the high value textbox and keep its sutaible function code.
    Now, to call the pop-up on this button click, we have to call the same pop-up as in standard      select-options. For this we have to use the function module COMPLEX_SELECTIONS_DIALOG.
    For this FM we have to pass the table name, field name and the range for the field whose range needs to fill when using the popup screen.
    To pass the table name and field name details into the FM, we have to declare as:
    DATA : tab TYPE rstabfield.
    This structure comprises of table name and field name.
    Pass these details in program as:-
    u2003
    *-- clear table and field details
      CLEAR tab.
    *-- append for range depending on the button clicked
    *   either for sales order or line item
      CASE sy-ucomm.
        WHEN 'VBELN'.
          tab-tablename = 'VBAP'.
          tab-fieldname = 'VBELN'.
    *--To call the popup screen for the field use code:-
      CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
        EXPORTING
          title             = text-002  u201Ctitle text
          text              = ' '
          signed            = 'X'
          search_help       = v_shelp u201Csearch help if required
          tab_and_field     = tab u201Ctable and field name details
        TABLES
          range             = r_vbeln u201Crange for the associated field
        EXCEPTIONS
          no_range_tab      = 1
          cancelled         = 2
          internal_error    = 3
          invalid_fieldname = 4
          OTHERS            = 5.
    Hope this helps you.
    Regards,
    Tarun

  • Urgent : Smartforms: Direct printing from module pool/dialog screen

    Hi all,
    i have a module pool screen where in from a screen i have some inputs from the user and after saving user wud click on a button called print which shud print a slip containing the screen data.now for this purpose i have made a smartform which on execution of it's driver program fetches data from DB table and puts on to SF.
    NOW MY ISSUE IS AS SOON AS THE USER PRESSES PRINT THE SMARTFORM SHUD DIRECTLY GET PRINTED.
    WAITING FOR ANSWERS
    THANKS AND REGARDS,
    SSACHIN SONI

    cool dude that wrked,thx giving u full points.i have on emore issue if u can  help:
    this driver program needs an input for which i've made a selection screen for testing but as i need to launch it frm mod pool screen i want that this program shud automatically get data(thr's only 1 field ) and shud nt get stopped at the selection screen.
    thanks
    sachin

  • Stack over after Calling a module pool N times

    Hi Experts,
    There is a module pool 'A' which exports to memory a table and executes a CALL TRANSACTION 'B' (another module pool).
    After saving program B, I must execute it again 'n times' without returning to caller program 'A', until I choose BACK.
    So I wrote, WHEN 'SAVE'...CALL TRANSACTION 'B', in order to save-call itself-save-call itself-etc.
    The problem is that after calling itself 5 times, the stack is over and it leaves program.
    I tried using LEAVE TO CURRENT TRANSACTION, but it doesn't works because when I save B it goes out from program to SAP menu, instead of recalling itself.
    Is there any way of doing this or deleting the stack?
    Please help me out in this.
    Thanks in Advance,
    Lilian.

    Hi,
    Instead of using the Call screen NNNN, use the Leave to scree NNN, then the stock will not overflow
    Regards
    Sudheer

  • Module pool initial screen

    Hi experts,
                     I am doing a module pool program, in the initial screen there a filed licence number. i have created it and raised an error message if the user enters incorrect licence number. The problem is when i enter incorrect licence number it's getting grayed out, rather tha resting it.
            the code i have written is below
    SELECT SINGLE zz_licno
             FROM zlec_master
             INTO zlec_master-zz_licno
             WHERE zz_licno = zlec_master-zz_licno.
      IF sy-subrc <> 0.
      MESSAGE e000(zmj) WITH 'ENTER VALID LICENCE NUMBER'.
      ENDIF.
    plz suggest me the best solution.
    thanks and regards,
    alson.

    hi muthukumaran,
                       i postin u my complete code in PAI. plz suggest where to use the code suggested by u. As i am new to module pool plz help in solving the issue.
    the code is as follows:
    MODULE user_command_0100 INPUT.
      CASE sy-ucomm.
        WHEN 'BACK'.
          LEAVE PROGRAM.
      ENDCASE.
      IF NOT zlec_master-zz_licno IS INITIAL.
        SELECT SINGLE zz_licno
              FROM zlec_master
              INTO zlec_master-zz_licno
              WHERE zz_licno = zlec_master-zz_licno.
        IF sy-subrc <> 0.
          MESSAGE e000(zmj) WITH 'ENTER VALID LICENCE NUMBER'.
        ENDIF.
      ENDIF.
      IF NOT zlec_master-zz_licno IS INITIAL.
        SELECT zz_licno
               zz_lec
               zadd_line_1
               zadd_line_2
               zadd_line_3
               zlandline_no
               zmobile_no
               zlicence_val_dt
               FROM zlec_master
               INTO CORRESPONDING FIELDS OF TABLE itab
               WHERE zz_licno = zlec_master-zz_licno.
      ENDIF.
      CALL SCREEN 200.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    thanks and regards
    alson.

  • Selection screen as subscreen in module pool main screen

    hello
    i having problem with a module pool  and a selection screen subscreen , i have my main screen 100 in my module pool
    i create a sub screen area , then in my top include i define a seleccion screen as subscreen  150
    i define some paramets and select-options ( for the select-options feature is because i choose use the subscreen )
    so far here is OK , the problem is when i fill the subscreen data and press a pushbutton define in the main screen ( 100 )
    the field are getting cleared ( BTW i call the subscreen in the PBO of the main screen ( 100 ) using call SUBSCREEN SUB_AREA INCLUDING SY-REPID '150'. ) so my question is how i can do for save the data filled in the subscreen ?
    thanks

    i find the solution of my own question:
    in the first line of the PAI event of the main screen ( where you call the subscreen ) need add 'call subscreen SUB_AREA_NAME_HERE.

  • Module Pool - Refresh Screen Fields Progmatically

    Hello All!
    I have a slightly frustrating problem. I have built a Module Pool application to display shipments and their underlying deliveries (various information from each).
    I have structured the application as follows
    An object to store the Data. This object has an internal table of Shipments and an internal table of Deliveries. The tables are related by TKNUM. When the application needs to display a shipment, it requests the shipment's information and the underlying deliveries information from the object. The object is structured to move through the shipments with methods like "GetFirstHeader", "GetPrevHeader", "GetNextHeader", "GetLastHeader". These return the data for the application to use.
    The Deliveries are displayed in a CL_SALV_TABLE, the Shipment information is displayed in textbox type fields above the table.
    The form for display has buttons to trigger the "Move" methods of the data object. This currently will retrieve the new data from the object, modify the fields and the alv grid and then go back through PBO (I'm assuming because a button was pressed). This works well. It will bring in the new data and refresh the screen everything is fine.
    I also have a button to print the currently displayed Shipment and Deliveries. This Print is handled through a SmartForm.
    The area that is giving me troubles is my other button. Since the Application can store a range of shipments at once, I have a "Print All" button. This button moves to the first shipment in the data object,
    calls the Print Form, then moves through the rest of the data object calling the Print Form for each Shipment Displayed. This happens from one button push. The problem I am running into is that the screen does not refresh when the data changes during this movement through the data objects. I believe this is due to the PBO module not being triggered yet. My question is, is there a way to refresh the screen progmatically?
    I have tried SET USER-COMMAND to move through the data, instead of calling the "GetFirstHeader" and "GetNextHeader" method directly, but that has some unpredictable behavior (works in debug, not in regular execution). I have also tried a LEAVE SCREEN statement, as that would trigger the PBO, since the Next Screen is set to the same screen number, but that kills execution of that block of code at the LEAVE SCREEN STATEMENT.
    I am including my code from my PAI module that runs this processing, hopefully that will help.
    << unformatable code removed >>
    Moderator message - Please go through your code and post only what is relevant to your question.
    Edited by: Rob Burbank on Apr 28, 2009 1:44 PM

    MODULE USER_COMMAND_9999 INPUT .
      CASE OK_CODE .
        WHEN 'NEXT' .
          PERFORM Next .
          PERFORM GetGridData .
          PERFORM RefreshALV .
        WHEN 'PREV' .
          PERFORM Prev .
          PERFORM GetGridData .
          PERFORM RefreshALV .
        WHEN 'EXIT' .
          SET SCREEN 0 .
        WHEN 'PRNT' .
          PERFORM Print .
        WHEN 'PRNA' .
          PERFORM PrintAll .
        WHEN 'BACK' .
          PERFORM HideInitials .
          SET SCREEN '1000' .
        WHEN 'CANC' .
          SET SCREEN '1000' .
        WHEN 'FRST' .
          PERFORM First .
          PERFORM GetGridData .
          PERFORM RefreshALV .
        WHEN 'LAST' .
          PERFORM Last .
          PERFORM GetGridData .
          PERFORM RefreshALV .
        WHEN 'CFAX' .
          PERFORM Show6000 .
      ENDCASE .
    ENDMODULE .
    FORM PrintAll .
      DATA sPromptB TYPE STRING .
      DATA sPromptM TYPE STRING .
      DATA sPromptE TYPE STRING .
      DATA sPromptF TYPE STRING .
      DATA cAnswer  TYPE C LENGTH 1 .
      IF NOT oLTend->isEmpty( ) = 1 .
        sPromptB = text-995 .
        sPromptM = ITOTSHIPNUM .
        sPromptE = text-994 .
        CONCATENATE sPromptB sPromptM sPromptE INTO sPromptF SEPARATED BY SPACE .
        CALL FUNCTION 'POPUP_TO_CONFIRM'
          EXPORTING
            TITLEBAR                    = 'Print All?'
            TEXT_QUESTION               = sPromptF
            DISPLAY_CANCEL_BUTTON       = ' '
          IMPORTING
            ANSWER                      = cAnswer
          EXCEPTIONS
            TEXT_NOT_FOUND              = 1
            OTHERS                      = 2 .
        IF SY-SUBRC <> 0 .
          MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4 .
        ENDIF .
        IF cAnswer = '1' .
          PERFORM First .
          PERFORM GetGridData .
          PERFORM RefreshALV .
          " >>> Need Screen Refreshed right here
          PERFORM Print .
          DO .
            PERFORM Next .
            PERFORM GetGridData .
            PERFORM RefreshALV .
            " >>> Need Screen Refreshed right here
            PERFORM Print .
            IF oLTend->GetIndex( ) = oLTend->GetCount( ) .
              EXIT .
            ENDIF .
          ENDDO .
        ENDIF .
      ENDIF .
    ENDFORM .
    That is the general flow. Hope that helps, if more info is needed, let me know.

  • How to Change the Font Size in Module Pool Selection Screen?

    Hi,
    There is a module pool, and I need to change the font size mentioned in the selection screen. Could you plaese tell me, how will I be able to do that?

    Hi ,
    If you are asking for text field , then check the options avaliable in Display tab of Attributes.
    Hope this helps you.

  • Exporting Module pool with screen

    Hi,
    I want to export module pool that I created to a file and import it back later. I could find a SAP Program RSTXSCRP to export SAPscript but no success in exporting a function module. Please help.
    Regards,
    Nikhil

    Hi Nikhil!
    If you just want to do this once, you can use transaction SE80 and menu point Utilities - More utilities - download (for each include / component).
    Otherwise a special program is easier to use, take e.g. this one:
    http://www.members.tripod.com/abap4/Upload_and_Download_ABAP_Source_Code.html
    Regards,
    Christian
    P.S.: or these one:
    ... or this one:
    http://sap.ittoolbox.com/code/d.asp?d=1623&a=s
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/abap/finding your code in bsp applications.article
    http://www.geocities.com/rmtiwari/Resources/Utilities/WebViewer.html
    Message was edited by: Christian Wohlfahrt

  • How to call Function Module in Selection Screen

    Hi All,
    I have developed one HR Report (Qualification Overview Report: To display all active employees and their Qualifications along with their Proficiency).
    Already it has 3 selection fields on selection screen and now I want one more field on selection screen like Qualification Id.
    But when the end user press F4 it should display the Popup which comes in TCode: PA30 at the time of Creating Qualification.
    I have debugged the Standard Code and searched the Function Module: 'RH_OBJID_REQUEST' which shows Popup which I wanted to show at Selection screen for newly added field.
    So I have to define new field like 'Qualification Id' and want to attach above Function Module so that it will cater my requirement.
    If anybody has worked on this type of requirement then please let me know.
    Thanks,
    Jay.

    Hi Raymond,
    I have written following code:
    s_quali is used in selection screen for Qualification Id.
    SELECT-OPTIONS :  s_quali   FOR hrp1000-objid NO INTERVALS.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_quali-low.
      CALL FUNCTION 'RH_OBJID_REQUEST'
        EXPORTING
          plvar           = '01'
          otype           = 'Q'
          seark           = '*'
          seark_begda     = '18000101'
          seark_endda     = '99991231'
          set_mode        = 'X'
        TABLES
          sel_objects     = git_objects.
      LOOP AT git_objects INTO wa_objects.         " Logic is to fill up the Selection screen field
        s_quali-low = wa_objects-objid.
        APPEND s_quali TO s_quali.
        CLEAR : s_quali, wa_objects.
      ENDLOOP.
    Now problem is that, its not populating all values in selection screen which I select from Popup screen (Choose Qualification).
    I checked that the first value in the internal Table is over written by second records in the internal table
    For e.g.: If I select 001,002,003,004 from Popup screen then I am able to see only 002,003,004 in the Multiple selection view of that field though it is available in the internal table s_quali (because I am filling up the table using Loop-Endloop)
    Please advise me how to overcome this issue. (How to fill up selection screen)
    Thanks,
    Jay.

  • Module pool , capturing screen element

    Hi,
    On a particular screen suppose there is 3 input/ouput field and our requirement is that on the basis of first user input , f4 help for second field should be displayed .  I mean how i can capture the particular entry without any event occurrence . Thanks .

    Use FM 'C14Z_DYNP_READ_FIELD'
    For Instance it should be like below
    Data : v_field(255) type c.
    CALL FUNCTION 'C14Z_DYNP_READ_FIELD'
        EXPORTING
          i_program      = sy-repid
          i_dynpro       = sy-dynnr
          i_fieldname    = 'V_PLANT'  "here specify your own field which u want to read
          i_flg_steploop = ''
        CHANGING
          e_value        = v_field.         "Specify the variable inwhich u want to have the value and based on that u select other F4 help entries
    Venkat

  • Module Pool Nested Screen Error

    Hi All,
         I have 6 screens in my APP. I have used Set Screen 0 then call screen XXX to set another screen. However after certain usage it gives me an error stating 'You requested two many consecutive nested call screen'.
    Can anybody help me on this.
    Thankx in Adv.

    Hi Sanjay,
    As You Set the Screen as 0. The below that just give levae screen So that from the screen from which u r leaving out is closed... so that u can have some restricted number of screens in used. At that time u will not be given any run time error. ok
    All the best.
    Murthy

Maybe you are looking for