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

problem with F4IF_INT_TABLE_VALUE_REQUEST

Former Member
0 Likes
2,367

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?

11 REPLIES 11
Read only

Former Member
0 Likes
1,602

i think here it shuold be value_org = 'S'

and check in the debug with return field .

br,

vijay.

Read only

0 Likes
1,602

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.

Read only

Former Member
0 Likes
1,602

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

Read only

0 Likes
1,602

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

Read only

0 Likes
1,602

hi

mine is a module pool program. I have mentioned POV earlier, not selection-screen

Read only

asik_shameem
Active Contributor
0 Likes
1,602

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

Read only

Former Member
0 Likes
1,602

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.

Read only

Former Member
0 Likes
1,602

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

Read only

0 Likes
1,602

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.

Read only

Former Member
0 Likes
1,602

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?

Read only

Former Member
0 Likes
1,602

done