‎2008 Nov 04 7:16 AM
hi all,
I am able to get f4 help for a screen field using F4IF_INT_TABLE_VALUE_REQUEST FM.
but if I am trying to select the value, it is always selecting the last column value.
here is my code.
PROCESS ON VALUE-REQUEST.
FIELD afru-zzloc MODULE loc_drop_down1.
MODULE loc_drop_down1 INPUT.
DATA : BEGIN OF f4_itab OCCURS 0,
col1 LIKE zafru_loc-col1,
col2 LIKE zafru_loc-col2,
col3 LIKE zafru_loc-col3,
col4 LIKE zafru_loc-col4,
col5 LIKE zafru_loc-col5,
END OF f4_itab.
SELECT col1 col2 col3 col4 col5
FROM zafru_loc
INTO TABLE f4_itab.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'ZZLOC'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'AFRU-ZZLOC'
value_org = 'C'
TABLES
value_tab = f4_itab.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
what is wrong with the code?
‎2008 Nov 04 7:20 AM
i think here it shuold be value_org = 'S'
and check in the debug with return field .
br,
vijay.
‎2008 Nov 04 7:25 AM
when I am giving value_org = 'S'.
I am getting f4 help, but irrespective of what I select, column 5 value is getting selected.
there are values like :
A1, A2, ....,A5.
B1,B2,....B5. in internal table f4_itab. I want B1 as input when I select B1, B2 when I select B2.
But it is taking B5 only.
Is this code suitable for my requirement.
‎2008 Nov 04 7:22 AM
Hi,
Try giving column value:
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'COL1' -
>fieldname
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'AFRU-ZZLOC'
value_org = 'C'
TABLES
value_tab = f4_itab.
Regards,
Saba
‎2008 Nov 04 7:27 AM
Hi,
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_ZZLOC -low
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'ZZLOC'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = s_zzloc-low
value_org = S
TABLES
value_tab = f4_itab.
Change the ones in bold.
Regards,
POOja
Edited by: Pooja Nayak on Nov 4, 2008 12:59 PM
‎2008 Nov 04 7:34 AM
hi
mine is a module pool program. I have mentioned POV earlier, not selection-screen
‎2008 Nov 04 7:37 AM
Hi
Do like this.
DATA: GT_RET type TABLE OF DDSHRETVAL WITH HEADER LINE.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'ZZLOC'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'AFRU-ZZLOC'
value_org = 'C'
TABLES
value_tab = f4_itab
RETURN_TAB = GT_RET. " Change Here
READ TABLE GT_RET INDEX 1.
AFRU-ZZLOC = GT_RET-FIELDVAL. " Assign the value here
‎2008 Nov 04 7:49 AM
Please, try this option
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'COL1' " the value passed here should be the name of the field in the internal table
dynpprog = sy-repid " it is not recommneded to directly use the sytem variable sy-repid and sy-dynnr
dynpnr = sy-dynnr
dynprofield = 'AFRU-ZZLOC'
value_org = 'S' " Change the value to 'S'
TABLES
value_tab = f4_itab.
IF sy-subrc 0.Ideally you should assign the values of system variables to local variables and then pass
the local variables to the parameter interface.
‎2008 Nov 04 8:12 AM
Hi,
This function module works when you want f4 help for particular field,here by default its taking last column and giving f4 help to last column .
because in the
EXPORTING
retfield = 'COL5' you have to pass field name,
so when you use this function module only f4 help for COL4 will appear .
Thanks
Ankur Sharma
‎2008 Nov 04 8:55 AM
yes, I think this function module wont solve my requirement.
It want a table to popup with values A1 to A5, B1 to B5 etc and when the user clicks on A2, A2 need to be selected into the field.
Can anyone give some more alternative.
‎2008 Nov 05 6:35 AM
hi all,
I have screen-field (location id) when the user press f4 a table with 5 rows and 5 columns should popup. When I select any of the cell in the table that value to be taken as input for the screen-field.
how to solve this requirement?
‎2009 Feb 16 10:14 AM