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: 

pre fill values in selection screen

Former Member
0 Kudos
2,782

Hi

I have a requirement, on the selection screen i have to pre-fill the values.....Can somebody tell me how it can be done....

1 ACCEPTED SOLUTION

Former Member
0 Kudos
481

hi

u can create ranges and use the same in the report:

  • creating ranges for selection into a single table it_cust_afpo

RANGES: ra_vbeln FOR /fir/rf2s0bgst02-zdemdc,

ra_vbeln-sign = 'I'.

ra_vbeln-option = 'EQ'.

LOOP AT it_samp_ords INTO wa_samp_ords.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = wa_samp_ords-vbeln

IMPORTING

output = ra_vbeln-low.

APPEND ra_vbeln.

4 REPLIES 4

Former Member
0 Kudos
481

Hi,

Use initialization or at selection-screen output event ot pre fill values in selection screeen.

parameters: p1 as CHECKBOX .

INITIALIZATION.

p1 = 'X'.

or

at selection-screen output.

p1 = 'X'.

regards,

Santosh Thorat

Former Member
0 Kudos
481

Hi,

Use default values in select-options or parameters statements like

parameters: s_matnr like mara-matnr default '1234'

or

Use INITIALIZATION event. In this event u can initialize field values.

Regards,

Subbu

Former Member
0 Kudos
481

Hi

To assign default values to a selection criterion, you use the following syntax:

SELECT-OPTIONS <seltab> FOR <f> DEFAULT <g> [TO <h>] ....

Default values <g> and <h> can be literals or field names. You can only use fields that contain a value when the program is started. These fields include several predefined data objects.

For each SELECT-OPTIONS statement, you can specify only one DEFAULT addition. This means that you can fill only the first row of selection table <seltab> with default values. To fill more rows with default values, the selection table must be processed before the selection screen is called, for example, during the AT SELECTION-SCREEN -OUTPUT event.

You use the DEFAULT addition as follows to address the individual components of the first row:

To fill only the LOW field (single field comparison), use:

........DEFAULT <g>.

To fill the LOW and HIGH fields (range selection), use:

........DEFAULT <g> TO <h>.

To fill the OPTION field, use:

........DEFAULT <g> [to <h>] OPTION <op>.

For single field comparisons, <op> can be EQ, NE, GE, GT, LE, LT, CP, or NP. The default value is EQ. For range selections, <op> can be BT or NB. The default value is BT.

To fill the SIGN field, use:

........DEFAULT <g> [to <h>] [OPTION <op>] SIGN <s>.

The value of <s> can be I or E. The default value is I.

Thanks

Vasudha

Edited by: Vasudha L on Mar 17, 2008 7:43 AM

Edited by: Vasudha L on Mar 17, 2008 7:44 AM

Former Member
0 Kudos
482

hi

u can create ranges and use the same in the report:

  • creating ranges for selection into a single table it_cust_afpo

RANGES: ra_vbeln FOR /fir/rf2s0bgst02-zdemdc,

ra_vbeln-sign = 'I'.

ra_vbeln-option = 'EQ'.

LOOP AT it_samp_ords INTO wa_samp_ords.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

input = wa_samp_ords-vbeln

IMPORTING

output = ra_vbeln-low.

APPEND ra_vbeln.