Skip to Content
author's profile photo Former Member
Former Member

Select-options inside a Dynpro

Hi,

How can a I do to put a field that seems like a select-options, but inside a dynpro.

I have the field: R_RANGE.

In dynpro it should appear

r_range-low [ ] r_range-high [ ]

and also the buttom of multiple value.

Thanks

Regards

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Posted on Jan 20, 2005 at 08:19 PM

    Couple ways to do this.

    1) you can build the screen yourself and use a FM to handle the "multiple selections" functionality

    or

    2) you can embed a selection screen inside of a subscreen.

    Here is a sample program.

    Regards,

    Rich Heilman

    report zrich_0006 .

    tables: mara.

    • Custom Selection Screen 1010

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

    endmodule.

    &----


    *& Module USER_COMMAND_0100 INPUT

    &----


    module user_command_0100 input.

    endmodule.

    • Screen screen 100 with a subscreen area

    • called "subscreen_1010"

    • Screen Flow Logic follows

    process before output.

    module status_0100.

    call subscreen subscreen_1010

    including sy-repid '1010'.

    process after input.

    call subscreen subscreen_1010 .

    module user_command_0100.

    Message was edited by: Rich Heilman

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 20, 2005 at 08:25 PM

    I don't think you can do that without some pogramming. You have to create PF-Status just like report selection screen. Then you have to program it for value request.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 20, 2005 at 08:53 PM

    Hi Cesar,

    I don't think you can do that. When you define your selection screen with select-options, system generates the screen 1000 automatically for and all the buttons, and the range from and to are also automatically defined based on your definition.

    If you want to do something like that, you need to look at the screen design of any report that has select-options and see the screen flow logic for the push buttons. I don't think there is any straight forward way to do this. Alternatively you can try defining a selection-screen in your program and calling it from your dynpro in a subscreen. Here is how.

    In your main program(say ZTEST), you define a selection screen having the select-options you want as follows.

    TABLES: t001.
    
    SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
    SELECT-OPTIONS: s_bukrs FOR t001-bukrs.
    SELECTION-SCREEN: END OF SCREEN 100.

    After that in your dynpro, you need to define a subscreen area(say SUB). In your flow logic, you need to call the subscreen defined above as follows.

    PROCESS BEFORE OUTPUT.

    • MODULE STATUS_0200.

    CALL SUBSCREEN sub

    INCLUDING 'ZTEST' '100'.

    PROCESS AFTER INPUT.

    • MODULE USER_COMMAND_0200.

    CALL SUBSCREEN sub.

    After that you are good to go.

    If this helps, please reward and close.

    Regards,

    Srinivas

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 21, 2005 at 05:26 AM

    Hello Cesar,

    I agree completely with Srinivas. The best option is to call a selection-screen as a subscreen.

    It takes less time and effort to do that then to program a select-options behaviour in a normal screen.

    I do not know your complete requirement, but if you do not have elements like a table-control on this particular screen, you can directly <i>call</i> this selection screen - there's no need to call it as a <i>subscreen</i>.

    All the best,

    Regards,

    Anand Mandalika.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.