Application Development and Automation 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: 
Read only

AT SELECTION-SCREEN ON VALUE-REQUEST

Former Member
0 Likes
740

Hi All,

A very different requirement.

In a Selection Screen I have 'Check Boxes' and 'Input Fields'.

Based on the Checkboxes selected the F4 help of the Input Fields should change.

How can we aceive this?

Thanks in advance.

Sameer.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
505
at selection-screen on value request for p_matnr.

if c1 eq = 'X'.
 use this FM F4IF_INT_TABLE_VALUE_REQUEST with different values
elseif c2 eq 'X'.
 use this FM F4IF_INT_TABLE_VALUE_REQUEST with different values
endif.
3 REPLIES 3
Read only

Former Member
0 Likes
506
at selection-screen on value request for p_matnr.

if c1 eq = 'X'.
 use this FM F4IF_INT_TABLE_VALUE_REQUEST with different values
elseif c2 eq 'X'.
 use this FM F4IF_INT_TABLE_VALUE_REQUEST with different values
endif.
Read only

Former Member
0 Likes
505

Hi Sameer,

check this code...

data: begin of itab occurs 0,

matnr like mara-matnr,

end of itab.

DATA : return like ddshretval occurs 0 with header line.

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS: r1 RADIOBUTTON GROUP g1 USER-COMMAND ug1 default 'X'.

SELECTION-SCREEN COMMENT 5(20) text-002 FOR FIELD r1.

SELECTION-SCREEN END OF LINE.

SELECTION-SCREEN BEGIN OF LINE.

PARAMETERS: r2 RADIOBUTTON GROUP g1.

SELECTION-SCREEN COMMENT 5(20) text-003 FOR FIELD r1.

SELECTION-SCREEN END OF LINE.

parameters p_matnr like mara-matnr.

SELECTION-SCREEN END OF BLOCK b1.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_matnr.

REFRESH ITAB.

If r1 = 'X'.

SELECT matnr FROM mara INTO TABLE ITAB where mtart = 'FERT'.

endif.

if r2 = 'X'.

SELECT matnr FROM mara INTO TABLE ITAB where mtart NE 'FERT'.

endif.

call function 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

retfield = 'MATNR '

dynprofield = 'P_MATNR '

dynpprog = sy-REPID

dynpnr = sy-dynnr

value_org = 'S'

TABLES

value_tab = ITAB

return_tab = return.

p_matnr = return-fieldval.

Regards

CNU

Read only

RaymondGiuseppi
Active Contributor
0 Likes
505

In the AT SELECTION-SCREEN ON VALUE-REQUEST FOR field, use the value of your checkboxes or radio buttons.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR field.

IF box1 = 'X'.

call function 'F4IF_INT_TABLE_VALUE_REQUEST'

(...)

ELSE.

so long.

WARNING

To insure that their values have been read, attaches extenstion USER COMMANND to these parameters.commande

for example : PARAMETERS p-anla RADIOBUTTON GROUP vlv USER-COMMAND lvl.

So when user clickes at one of these fields, control return to program in AT SELECTION SCREEN. You don't have to code anything gor this user-command. so program then go back to selection screen.

Regards