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: 

screen input

Former Member
0 Kudos

Hi,

I am working on a report,where there are 2 fields(status,EOP).The status field has 3 values(active,balnace out,archive).Here only when the user selects the balance out value,the EOP field should be available for o/p.When the user selects the other 2 values,the EOP field should be grayed out.Can anyone tell me the logic for this?

Regards,

Hema

4 REPLIES 4

former_member188827
Active Contributor
0 Kudos

instead of using standard selection screen, create ur own screen and code logic in PAI of status filed...

Former Member
0 Kudos

Hi,

do like this.

PARAMETERS:status(15),

EOP(5).

AT SELECTION-SCREEN OUTPUT.

perform check.

at selection-screen.

perform check.

START-OF-SELECTION.

form check.

if status = 'BALANCE OUT'.

loop at screen.

if screen-name = 'EOP'.

screen-input = '1'.

modify screen.

endif.

endloop.

else.

loop at screen.

if screen-name = 'EOP'.

screen-input = '0'.

modify screen.

endif.

endloop.

endif.

endform.

rgds,

bharat.

Former Member
0 Kudos

Hi Hema,

I guess what you want to achieve is that if value in a particular field is entered(Balance out),then the other 2 fields should be grayed out and vice versa.

In this case,first of all, while defining the selection screen,you will have to define the fields with the "modif ID" keyword and then use the keyword "AT Selection screen" and define it in terms of loop at scren.

You can refer to the below code for the same:

PARAMETERS: rbukrs1 TYPE glpct-rbukrs MODIF ID ful,

khinr1 TYPE cepc-khinr AS LISTBOX VISIBLE LENGTH 20

MODIF ID sam ,

ryear1 TYPE glpct-ryear MODIF ID ful,

ryear2 TYPE glpct-ryear MODIF ID sam,

rpmax1 TYPE i MODIF ID ful,

rpmax2 TYPE i MODIF ID sam,

filnam1 TYPE rlgrap-filename MODIF ID ful,

filnam2 TYPE RLGRAP-FILENAME MODIF ID sam.

SELECTION-SCREEN END OF BLOCK b3.

LOOP AT SCREEN. "For toggling between the selection screens.

IF r1 EQ 'X'.

IF screen-group1 = 'SAM'.

screen-active = 0.

ENDIF.

ELSEIF r2 EQ 'X'.

IF screen-group1 = 'FUL'.

screen-active = 0.

ENDIF.

ENDIF.

MODIFY SCREEN.

ENDLOOP.

If in case,you require further clarifications,do let me know.

Regards,

Puneet Jhari.

0 Kudos

Hi,

I think you didn't get my question properly.There are 2 fields(status,EOP).For status field there are 3 values(active,balance out,archive).When the user selects balance out in status field,the EOP field should be available for i/p.When the user selects active or archive values,EOP field should be grayed out.Could you please suggest me a proper solution for this?

Regards,

Hema