Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Input Field range in screen painter

Former Member
0 Kudos

Presently using Screen painter for designing Selection screen. Single input field I can cretae just by selecting input/output field option.

But if I want range or multiple options for input field how to define that. In normal coding we use selection-options for this purpose.

pls help.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

One thing more. I'm sure that you cannot define a select-options on your screen using the screen-painter.

If you want to have some other elements on your screen besides the selec-options which you want to design using the screen-painter, then your only option is to use a subscreen and call a selection-screen into that.

Regards,

Anand Mandalika.

14 REPLIES 14

Former Member
0 Kudos

Hello Anupama,

In my experience, I have never designed a selection-screen with the screen-painter. I'm not even sure if it is correct to do so.

Is there any compelling reason why you cannot define your selection-screen using the program ?

Regards,

Anand Mandalika.

Former Member
0 Kudos

One thing more. I'm sure that you cannot define a select-options on your screen using the screen-painter.

If you want to have some other elements on your screen besides the selec-options which you want to design using the screen-painter, then your only option is to use a subscreen and call a selection-screen into that.

Regards,

Anand Mandalika.

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

The best way is to use selection screen.

In screen painter,use a table control with columns high,low,sign,option.

Then you can use it as select-option

if you are entering all the values for those fields.

0 Kudos

Hi Jayanthi,

What is the point in asking the user to enter the values for sign and option? The reason why the select-option is desirable is that it hides such technical details from the user. It is only the programmer who needs to be concerned with these details.

It is important that we think about making sense with our solution, <i>instead of just being bent on making it work</i>.

Regards,

Anand Mandalika.

Former Member
0 Kudos

hI Anand,

THANKS for ur prompt replies. I think there is some confusion. what i wanted to ask is how one can define range or multiple options in screen using Screen Painter.

0 Kudos

Hi Anupama,

I also think that the reply that I have given is not clear enough.

IT is not possible to define a range on a normal screen (using SE51).

Regards,

Anand Mandalika.

0 Kudos

create button and use FM COMPLEX_SELECTIONS_DIALOG

Former Member
0 Kudos

Hi,

You cant create input field with ranges in Screen Painter. So Create a Sub screen in that Particular Screen and Define that Sub Screen in Program with Selection option.

Use the Below Code.


*** In Main Prg Define the Subscreen
SELECTION-SCREEN BEGIN OF SCREEN 300 AS SUBSCREEN.
SELECT-OPTIONS : so_matnr FOR matnr.
SELECTION-SCREEN END OF SCREEN 300 .

*** Put code in PBO and PA1 of screen 100

PROCESS BEFORE OUTPUT.
 MODULE STATUS_0100.
 call subscreen sub_1 including sy-repid '0300'.


PROCESS AFTER INPUT.
 CALL SUBSCREEN sub_1.
 MODULE USER_COMMAND_0100.

Hope it will Useful For You.

with Regards

Kesavaperumal

raymond_giuseppi
Active Contributor
0 Kudos

Define a sub-screen selection screen and include it in your dynpro

- SAP documentation at [Selection Screens as Subscreens (link)|http://help.sap.com/saphelp_nw04/helpdata/en/e7/deb237b9a9a968e10000009b38f8cf/frameset.htm]

- multiple threads at sdn - [search forums (link)|http://forums.sdn.sap.com/search.jspa?q=selection-screensubscreenmodule]

- [search wiki (link)|http://wiki.sdn.sap.com/wiki/dosearchsite.action?searchQuery.queryString=selection-screensubscreenmodule&searchQuery.spaceKey=conf_global] for samples

NB: COMPLEX_SELECTIONS_DIALOG is useful for dynamic selections.

Regards,

Raymond

Clemenss
Active Contributor
0 Kudos

Hi anya,

Alexandr's idea will work although it is not exactly what you want.

It should be possible to define a subscreen area in your field. This subscreen should be called at PBO and PAI. The subscreen itself can be defined anywhere in the program coding as

SELECTION-SCREEN BEGIN OF SCREN nnn AS SUBSCREEN.
SELECT-OPTIONS: ...
SELECTION-SCREEN END OF SCREN nnn.

To be honest: I did not try myself but I do not see any reason why it should not work.

Let us know if (or why it does not) work .

Regards,

Clemens Li

Former Member
0 Kudos

Hi Anya,

As per your requirement SAP dont have any selec-option kind of scenario for screen painter. You can achieve it by calling

subscreen like the example given above , Or another techniq is you can design the screen like a selection screen.

just take two text box and a pushbutton beside it . Arrange it in a same way like select-option. Then in PAI of your program

write the code for the pushbutton like below :

DATA: BEGIN OF rtab OCCURS 0,

sign(1) TYPE c,

option(2) TYPE c,

low LIKE LQUA-LGTYP,

high LIKE LQUA-LGTYP,

END OF RTAB.

TAB_FIELD-FIELDNAME = 'LGTYP'. "Your field , here in example it is LGTYP

TAB_FIELD-TABLENAME = 'LQUA'.

CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG' "This function module will call the same window for range that we see in

EXPORTING "select option

TITLE = ' '

TEXT = 'Storage Types'

  • SIGNED = 'X'

  • LOWER_CASE = ' '

  • NO_INTERVAL_CHECK = ' '

  • JUST_DISPLAY = ' '

  • JUST_INCL = ' '

  • EXCLUDED_OPTIONS =

  • DESCRIPTION =

  • HELP_FIELD =

  • SEARCH_HELP =

TAB_AND_FIELD = TAB_FIELD

TABLES

range = RTAB " Range table, it will automatically getas populated, structure

EXCEPTIONS " Described above.

NO_RANGE_TAB = 1

CANCELLED = 2

INTERNAL_ERROR = 3

INVALID_FIELDNAME = 4

OTHERS = 5

.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

DATA:LAST TYPE SY-TABIX.

DESCRIBE TABLE RTAB LINES LAST.

IF NOT rTAB[] IS INITIAL.

  • Read the very first entry of the range table and pass it to

  • dynpro screen field

READ TABLE rTAB INDEX 1.

IF sy-subrc = 0.

P_LGTYP1 = rTAB-low.

ENDIF.

READ TABLE RTAB INDEX LAST.

IF sy-subrc = 0.

P_LGTYP1U = rTAB-LOW.

ENDIF.

Thanks.

Former Member
0 Kudos

Hi

You need to create a container for Subscreen in your screen layout .

Regards

Rahul

0 Kudos

Hi all,

you can create a container area for the placement of a GUI control

you can create a subscreen area for Subscreen in your screen layout .

you can create a custom control on a subscreen

you can not create a screen or subscreen in a control area

Please don't confuse that.

[subscreens|http://help.sap.com/erp2005_ehp_04/helpdata/EN/9f/dbabfe35c111d1829f0000e829fbfe/frameset.htm]

[Custom Controls|http://help.sap.com/erp2005_ehp_04/helpdata/EN/9f/dbabfe35c111d1829f0000e829fbfe/frameset.htm]

Regards,

Clemens

former_member193724
Active Participant
0 Kudos

Hi ,

      You mean you need to design a select option in a screen painter.  I have tried to do this and was successful . You need to create 2 i/o fields in screen painter.

eg.   designing select-option for material . create a text field name Material and then 2 i/o fields to its right as u see in select-options. Set the property of the i/o fields with name = LOW and HIGH respectively .  If you want u can give search help too for this fields .

Now in PAI  use " Material  BETWEEN LOW  AND  HIGH "  as per your requirement.

Regards,

Lohit.