How to create a selection option or parameters in a subarea of the screen

Hi Experts,
    My program have a screen 1001 and it is splited into two parts: the first is a Subarea for selection option, and the last is a table control. Now I want to create some selection option and parameters in the first subarea just like we do in screen 1000. Do we have any convenient way to do that?
Thanks in advance
Joe

Hi Joe,
Yes ,it can be done like below code:
TABLES : mara.
SELECTION-SCREEN BEGIN OF SCREEN 1001 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: s_matnr FOR mara-matnr,
                s_matkl FOR mara-matkl,
                s_mtart FOR mara-mtart.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN END OF SCREEN 1001.
DATA: number(4) TYPE n VALUE '1001'.
START-OF-SELECTION.
  CALL SCREEN 100.
in screen flow logic .write below statements.
first declare the subscreen area  'AREA' in screen.
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
CALL SUBSCREEN area INCLUDING sy-repid number.
PROCESS AFTER INPUT.
CALL SUBSCREEN area.
MODULE USER_COMMAND_0100.
Reward if useful,
Regards,
Talwinder

Similar Messages

  • How to creat a select-options in the screen layout of se80.

    Because in se80 ,the screen is drawed in the screen layout,but it just have text-field for parameter.
    Thanks!

    In your main program, you can declare your desired select-option. Do your select-option declaration before calling your dialog screen.
    Create a subscreen in your screen's flow logic (PBO & PAI) that contains your selection screen with its corresponding screen number of your declared subscreen.
    sample code of select-option declaration below.
    SELECTION-SCREEN BEGIN OF SCREEN 5003 AS SUBSCREEN.
    SELECTION-SCREEN BEGIN OF BLOCK PARAM.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT (18) TEXT-ABK FOR FIELD S_ABKRS.
    SELECT-OPTIONS: S_ABKRS FOR PA0001-ABKRS.
    SELECTION-SCREEN POSITION 47.
    PARAMETER: P_ATEXT LIKE T549T-ATEXT VISIBLE LENGTH 30.
    SELECTION-SCREEN POSITION 70.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK PARAM.
    SELECTION-SCREEN END OF SCREEN 5003.
    call screen 5000.
    Sample Flow logic Code below of screen 5000:
    *--- PBO
    PROCESS BEFORE OUTPUT.
      CALL SUBSCREEN SUB_5003 INCLUDING SY-REPID '5003'. " subscreen 5003
      MODULE STATUS_5000.
      LOOP AT GT_MBBH INTO GS_MBBH WITH CONTROL TC_MBILL
                    CURSOR TC_MBILL-TOP_LINE.
      ENDLOOP.
    *--- PAI
    PROCESS AFTER INPUT.
      LOOP AT GT_MBBH.
        FIELD GS_MBBH-SELEC MODULE TC_TABLE_MARK ON REQUEST.
      ENDLOOP.
      MODULE USER_COMMAND_5000.
      CALL SUBSCREEN SUB_5003.  " subscreen 5003
    Hope this will help..

  • How to create a Select-option and a pushbutton together

    Hi Experts,
    I have defined a selection screen in my module pool program and I am including this screen in my Module pool Dynpro. Now, my problem is that if I write the following piece of code to define my selection screen, it gives me an error that "Error when generating the selection screen "1010" of report "ZTESTHIM_MOD" ".
    SELECTION-SCREEN BEGIN OF SCREEN 1010 AS SUBSCREEN.
    SELECT-OPTIONS: s_matnr FOR  mara-matnr NO INTERVALS,
                    s_matkl FOR  mara-matkl NO INTERVALS,
                    s_mtart FOR mara-mtart NO INTERVALS,
                    s_ersda FOR mara-ersda NO INTERVALS.
    SELECTION-SCREEN PUSHBUTTON 10(5) pubu USER-COMMAND test.
    SELECTION-SCREEN END OF SCREEN 1010.
    Please help me whats the reason for this.
    Also, if I define the select-options within a block and pushbutton outside it, the code is working fine.
    The problem is that I want a select-option and a pushbutton in the same line.
    Please help me out.
    Useful answers will be duly rewarded.
    Thanks in advance.
    Regards,
    Himanshu
    null

    Hi,
    You have declared so many select options in one line and also you want to include a push button in the same line, this is not possible.
    Since the visible lenght of the line is less than the number of fields you want to display this will not be possible.
    What you can do is instead group then using
    SELECTIOn-SCREEN BEGIN OF BLOCK b1.
    here use lines
    SELECTION-SCREEN END OF BLOCK b1
    Regards,
    Sesh

  • How to  Create  a selection variable for Fiscal period/year range

    How to  Create  a selection variable for Fiscal period/year range. The idea is to filter the query results using a fiscal period/year range user input rather than a full fiscal year input.

    Hi Priya,
    Open the query in a query designer -> in the left hand side you would find the fiscal year period under the time dimension -> right click -> create variable -> create the variable.
    The better option would be use any of the SAP provided variable. You would find them under the Fiscal year period in the left hand side in the query designer.
    Bye
    Dinesh

  • How to convert select-options into parameters

    hi Abapers,
    i have an urgent requirement, iwant to know how to convert select-options into parameters
    on selection screen,is it possible to do.

    TABLES: spfli.
    SELECTION-SCREEN BEGIN OF BLOCK test.
    SELECT-OPTIONS:
                  s_carrid FOR spfli-carrid NO INTERVALS NO-EXTENSION.
    SELECTION-SCREEN END OF BLOCK test.
    Greetings,
    Blag.

  • How to set a select option's item as invisible (using a method code)

    Hi there,
    I need to hide parameters and select option fields, but Iu2019m using the select_option component to add all items to the layout using just one View Container Element.
    I could use to hide the View Container Element setting the property visible, but I need to hide fields with certain conditions. I also could add one View Container Element for each select option, but I have many... I wish I could make in other way.
    Iu2019ve checked the Definitions of the Interface IF_WD_SELECT_OPTIONS  and the Ulli Hoffmannu2019s book and I have found no help at all.
    Thanks in advance,
    Filipe Torres
    Edited by: Filipe Torres on Sep 15, 2008 12:34 AM

    Thank you, this helps but will solve just part of my problem. I'm using many views and to pass the values from those select options and parameters I just declare them in the first view... The other answer helps me more that shows how to remove one element. I was looking for a hide feature and not remove, but seems that I have to remove.

  • Problem in creating a Select-option im a module pool screen

    I've been searching how to do a select option in a module pool screen, I've found this neat tutorial http://sample-code-abap.blogspot.com/2008/06/select-option-in-module-pool-screen.html
    but I'm having trouble to replicate it...
    I've created this conde in my TOP include
    SELECTION-SCREEN BEGIN OF SCREEN 201 AS SUBSCREEN.
       SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME.
        SELECT-OPTIONS: s_matnr FOR mara-matnr.
      SELECTION-SCREEN END OF BLOCK b2.
    SELECTION-SCREEN END OF SCREEN 201.
    and this is my screen flow code
    PROCESS BEFORE OUTPUT.
      MODULE status_0100.
      MODULE pbo_200.
    PROCESS AFTER INPUT.
      MODULE pai.
      MODULE user_command_0200.
    in the screen 200 I have a subscreen area named subs
    but when I do this:
    MODULE pbo_200 OUTPUT.
      CALL subscreen subs including sy-repid '0201'.
    ENDMODULE.                 " pbo_200  OUTPUT
    it doesn't "compile"
    it gives me this error:
    ""." or "ID ... FIELD ..." expected after "SUBSCREEN"."
    what am I missing? it seems its not recognising the "CALL SUBSCREEN" command...

    you can't use CALL SUBSCREEN... in any ABAP section. It is reserved to dynpro flow logic. Just add it after PROCESS BEFORE OUTPUT (and also after PROCESS AFTER INPUT).

  • Select-options and parameters

    hi,
    In How many ways we can define select-options and parameters.

    hi uday,
    Usually we use PARAMETERS for single value input and
    SELECT-OPTIONS is used to give a range of input values for a single field
    SELECT-OPTIONS implicitly consists of internal table with fields
    OPTIONS
    LOW
    HIGH
    SIGN
    eg:
          DATA: G_VBELN TYPE VBAK-VBELN.
          SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.
          PARAMETERS : P_VBELN LIKE VBAK-VBELN.
          SELECT-OPTIONS: S_VBELN FOR G_VBELN.
          SELECTION-SCREEN END OF BLOCK B1.
       o/p:
              P_VBELN: _________________.
             S_VBELN:___________ TO  ____________.
    reward if helpful
    regards.
    shashikanth naram.

  • How to create multiple selection screens in reports

    How to create multiple selection screens in reports
    Thanks,
    Sridhar

    Ex: hope you will find an idea from the below example :
    SELECTION-SCREEN BEGIN OF BLOCK SEL1 WITH FRAME TITLE TIT1.
    PARAMETERS: CITYFR LIKE SPFLI-CITYFORM,
                CITYTO LIKE SPFLI-CITYFORM.
    SELECTION-SCREEN end OF BLOCK SEL1
    SELECTION-SCREEN BEGIN OF SCREEN 500 AS WINDOW.
    SELECTION-SCREEN INCLUDE BLOCKS SEL1.
    SELECTION-SCREEN BEGIN OF BLOCK SEL2 WITH FRAME TITLE TIT2 .
    PARAMETERS: AIRPFFR LIKE SPFLI-AIRPFROM,
                AIRPTO LIKE SPFLI-AIRPTO.
    SELECTION-SCREEN END OF BLOCK SEL2
    SELECTION-SCREEN END OF SCREEN 5000.
    INITIALIZATION.
    TIT1 = 'ITIES'.
    aT SELECTION-SCREEN.
    CASE SY-DYNNR.
    WHEN '0500'.
       MESSAGE W159(at) WITH 'SCREEN 500'.
    WHEN '1000'.
       MESSAGE W159(at) WITH 'SCREEN 1000'.
    ENDCASE.
    START-OF-SELECTION.
    TIT1 = 'CITIES FOR AIRPORTS'.
    TIT2 = 'AIRPORTS'.
    CALL SELECTION-SCREEN 500 STARTING AT 10 10.
    TIT1 = 'CITIES AGAIN'.
    CALL SELECTION-SCREEN 1000 STARTING AT 10 10.

  • Select-options and Parameters, when to use what?

    Hi gurus,
    I have been using Parameters for long. Now I want to choose a range of values, which I need to retrieve from database.
    I tried using select-options. Can't I use 2 parameters that is parameter1 and parameter2 and mention query BETWEEN para1 AND
    para2, and when I use NO INTERVALS and NO EXTENSION together, it behaves same like parameter, then why did SAP gave these
    extensions.

    Hi friend,
    Simple differences between Select-options and parameters.
    Select-Options Uses keyword 'for'                         
    Parameters Uses keywords 'like', 'type'     
    Select-Options  Uses operator 'in'                         
    Parameters Uses operator '='
    Select-Options  Provides ranges for selection     
    Parameters  No ranges only single value
    Select-Options Creates selection table                              
    Parameters No selection table
    Select-Options  When i/p blank all records selected          
    Parameters   When i/p blank none is selected
    Note:
    Select options can act as parameters by using 'no-extension' 'no intervals', but all records will be selected when i/p is blank unlike parameters.
    Might be helpful..
    Thanks...
    Edited by: Guest77 on Feb 10, 2009 5:44 AM

  • Creating a Select-option with no-intervals and a parameter on a single line

    Hi
    I have a unusual reqirment of creating a select-option with no intervals obligatory and a parameter on a single line. Is this possible? Can any one please provide me a solution for this. I reffered to the SAP help and what i found out is a single line can contain only parameters.

    Hi,
    humm,
    I guess it's not possible on one line.
    SORRY I've tried and it works!
    Try this :
    SELECTION-SCREEN BEGIN OF BLOCK main WITH FRAME
                     TITLE text-s01 NO INTERVALS.
    SELECTION-SCREEN begin of line.
    PARAMETERS : p_gjahr LIKE bkpf-gjahr OBLIGATORY MEMORY ID gjr.
    SELECT-OPTIONS : s_blart FOR bkpf-blart MODIF ID knt .
    SELECTION-SCREEN end of line.
    SELECTION-SCREEN END OF BLOCK main.
    Regards,
    erwan

  • Dialog programming - How to place a select-option field in a dialog screen

    Hi all,
    In Dialog Programming, How to place a select-option field in a dialog screen.
    Kindly give me some example code...
    Thanks,
    Jaffer Ali.S

    hi Ali,
    U can add select-options in ur module pool by using  SELECTION-SCREEN BEGIN OF SCREEN <scrn> AS SUBSCREEN  command.
    check this link for reference.....
    http://help.sap.com/saphelp_47x200/helpdata/en/e7/deb237b9a9a968e10000009b38f8cf/frameset.htm
    Example Code :
    DATA : ok_code TYPE sy-ucomm.
    SELECTION-SCREEN BEGIN OF SCREEN 1010 AS SUBSCREEN.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS: p_rad1 RADIOBUTTON GROUP grp1 DEFAULT 'X',
                p_rad2 RADIOBUTTON GROUP grp1,
                p_rad3 RADIOBUTTON GROUP grp1.
    SELECT-OPTIONS: s_matnr FOR  mara-matnr,
                    s_matkl FOR  mara-matkl,
                    s_mtart FOR  mara-mtart.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN END OF SCREEN 1010.
    START-OF-SELECTION.
      CALL SCREEN 100.
    *&      Module  STATUS_0100  OUTPUT
    MODULE status_0100 OUTPUT.
    SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'xxx'.
    CALL SCREEN 1010 .
    ENDMODULE.                    "status_0100 OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE user_command_0100 INPUT.
      CASE ok_code.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    SCREEN 100 ****************
    PROCESS BEFORE OUTPUT.
      MODULE status_0100.
      CALL SUBSCREEN sub_1010 INCLUDING sy-repid '1010'.
    <b>***** where sub_1010 is name of sub-screen area</b>
    PROCESS AFTER INPUT.
      CALL SUBSCREEN sub_1010.
      MODULE user_command_0100.
    <<< REMOVED BY MODERATOR >>>
    Harimanjesh AN
    Edited by: Marcelo Ramos on Dec 17, 2008 7:54 PM

  • How to degin a  select-option in screen painter?

    Help me !
    How can i create an object  like select-option  in screen painter.
    I want to input a range ,but there are no button or text   in screen painter  like  select-option?

    hai u can create select options on screen but in little differernt way..
    1st way : if u want to give only 1 interval then declare on screen as two different variables in same line
    and after that append the value in ranges.
    2nd way: here u can define as asingle input vriable  beside that variable u can give a icon as extension in select option and give give some function code to that.if we click on that in user command write following code :
      IF V_OKCODE = 'EXT'.
        CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
            EXPORTING
                 TITLE             = 'Title'
                 TEXT              = 'Text'
                 SIGNED            = 'X'
            LOWER_CASE        = ' '
            NO_INTERVAL_CHECK = ' '
            JUST_DISPLAY      = ' '
            JUST_INCL         = ' '
            EXCLUDED_OPTIONS  =
            DESCRIPTION       =
                 HELP_FIELD        = 'T001W-WERKS'
            SEARCH_HELP       =
             TABLES
                  RANGE             = R_WERKS
            EXCEPTIONS
                 NO_RANGE_TAB      = 1
                 CANCELLED         = 2
                 INTERNAL_ERROR    = 3
                 OTHERS            = 4
        IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    help field the field reference wich u want to declare and range is where values will be stored atomatically as in select options.
    once we click the icon if we execute the function module a window will open as in selection option in reports.there user can enter the values.once the user enters the values it will stored automatically in ranges declared like r_werks in above example.
    try it..

  • How to Expand/Collapse Select Option Tray

    Hi,
    I have a View in which I have dynamically created a select-option Tray and then added select-options within the Tray using:
    DATA lr_cost_ctr            TYPE REF TO data.
    DATA lr_interfacecontroller TYPE REF TO iwci_wdr_select_options.
    DATA lr_select_options      TYPE REF TO if_wd_select_options.
    * Initialise the selection screen.
      lr_interfacecontroller = wd_this->wd_cpifc_select_options_search( ).
      lr_select_options =
               lr_interfacecontroller->init_selection_screen( ).
    * Add a tray.
      lr_select_options->add_block(
        i_id           = 'TRY_ACCT_***'
        i_block_type   = if_wd_select_options=>mc_block_type_tray
        i_title        = 'Account Assignment' ).
    * Add a Select Option.
      lr_cost_ctr = lr_select_options->create_range_table( 'KOSTL' ).
      lr_select_options->add_selection_field(
        i_id              = 'COST_CTR'
        i_within_block    = 'TRY_ACCT_***'
        it_result         = lr_cost_ctr ).
    This works fine, but how do I dynamically expand and collapse the select-option Tray ?  There are plenty of examples for expanding/collapsing normal Trays by binding the "expanded" attribute at design time or dynamically.  But with a Tray created as a select-option block I do not have a reference to the Tray.
    I have searched high and low but cannot find how to do this.
    I don't want to create the Tray at design time because there will be select-options above and within the Tray.
    Any help will be appreciated.
    Thanks & regards,
    Grogan

    Hi,
    My Approch is:
    ---Initially set the webBean property in processReq
    Hgrid.setAutoQuery(false);
    ---On Button click navigate to the same page n set the webBean properties..
    put var in session.
    pageContext.forwardImmediatelyToCurrentPage(null, true, null);
    ---in process req get teh value of var from session.
    if(pageContext.getSessionValue(var)!= null)
    Hgrid.setAutoQuery(true);
    Hope it will helps..:)
    Note:
    ---We cant modify the webBean properties in processformReq and processformdata.
    Regards
    Meher Irk

  • How to validate obligatory select-options

    Is there an automatic way to validate obligatory select-options or parameters created with the reusable component WDR_SELECT_OPTIONS?
    I know that for standard field, we can used the method 
    cl_wd_dynamic_tool=>check_mandatory_attr_on_view( lr_view_ctr ).
    in the event method WDDOBEFOREACTION and it works fine
    Alex

    *Add a Selection Screen Field
      lr_helper->add_selection_field( i_id = 'S_CARR_ID'
      it_result = lt_range
      i_obligatory = 'X'   <<======
      i_description = 'description' ).
    Define your code according to above, then this mandatory field check will be automatic.

Maybe you are looking for

  • Dev site in the cloud?

    We are thinking of creating our Dev site in the Cloud to do all of our testing. Can anyone direct me to some info on Pros and Cons? Thanks wakgtech

  • Please Help for this scenario

    Hello, Suppose i have a input xml: <Name>XYZ</Name> <Roll>12</Roll> <Class>3</Class> Now I want output as: <Header>XYZ</Header> <Body><![CDATA[<Name>XYZ</Name>            <Roll>12</Roll>            <Class>3</Class>]]>       </Body> Please help how wi

  • Why, with iCloud, do we continue receiving the same email on multiple computers?

    Why, with iCloud, do we continue receiving the same email on multiple computers? Is there a way of stopping this?

  • Migrating From Sql Server 2005 to Oracle (Uniqueidentifier Issue)

    If i want to migrate from SQL SERVER 2005 to Oracle, How Oracle will deal with my primary key columns in almost all tables having datatype of UNIQUEIDENTIFIER ??? is there any concept of uniqueidentifier in Oracle same as in SQL SERVER ???? Regards

  • Custom Component Creates Unicode Files instead of UTF-8

    We have a custom component running in our SAP Enterprise Portal. The component creates a XML Outputfile encoded in UTF-8 since we force the component to so so. In the environment we're using right now, the output is in Unicode, which is obviously wro