10-09-2008 8:11 AM
Hi Experts,
I have an issue with f4 help. My f4 felp has 2 entries. 1 Role name and Role Desc. When I select any 1 entry from the f4, the text box always populates the role desc instead of role name. Please let me know on how to populate only the role name irrespective of which column I select. Values tab is shown below. I wanna populate only AGR_NAME.
begin of values_tab
OCCURS 0,
AGR_NAME type AGR_1016-AGR_NAME,
TEXT type AGR_TITLE,
END OF values_tab.
<removed_by_moderator>
Subject modified!
Read the Rules of Engagement
Thanks & Regards,
dinesh
Edited by: Dinesh Upendran on Oct 9, 2008 9:13 AM
Edited by: Juan Reyes on Oct 9, 2008 9:43 AM
10-09-2008 8:18 AM
Hi,
Are you using any standard search help or a Function module to populate F4.
Thanks & Regards,
Navneeth K.
10-09-2008 8:18 AM
10-09-2008 8:18 AM
Hi,
Are you using any standard search help or a Function module to populate F4.
Thanks & Regards,
Navneeth K.
10-09-2008 8:32 AM
Hi,
Thanks for the reply. I am using FM. Find below my complete value help program
MODULE VALUE_USERNAME INPUT.
refresh values_tab.
g_progname = sy-repid.
g_dynnum = sy-dynnr.
If I_Profilename[] is initial.
I_Profilename-profile = 'T-D0220100'.
append I_Profilename.
I_Profilename-profile = 'T_BA800099'.
append I_Profilename.
loop at I_Profilename.
SELECT aAGR_NAME bTEXT
INTO CORRESPONDING FIELDS OF TABLE i_values
FROM AGR_1016 as a join AGR_TEXTS as b on aAGR_NAME = bAGR_NAME
WHERE a~PROFILE = I_Profilename-profile
and b~SPRAS = 'E'.
APPEND LINES OF i_values TO values_tab.
endloop.
Else.
loop at I_Profilename.
SELECT aAGR_NAME bTEXT
INTO CORRESPONDING FIELDS OF TABLE i_values
FROM AGR_1016 as a join AGR_TEXTS as b on aAGR_NAME = bAGR_NAME
WHERE a~PROFILE = I_Profilename-profile
and b~SPRAS = 'E'.
APPEND LINES OF i_values TO values_tab.
endloop.
ENDIF.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'CONNID'
dynpprog = g_progname
dynpnr = g_dynnum
dynprofield = 'CONNECTION'
value_org = 'S'
TABLES
value_tab = values_tab.
ENDMODULE. " VALUE_USERNAME INPUT
Thanks & Regards,
dinesh
10-09-2008 8:36 AM
10-09-2008 8:37 AM
Also is the retfield and dynprofield are of same type. sometimes this may cause problem. Both should be of same length.
10-09-2008 8:45 AM
As Navneeth said: change retfield. You may also try removing dynpprog and dynpnr. Additionally add a return table where you get you selected items and send them back to the screen field.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'AGR_NAME'
value_org = 'S'
TABLES
value_tab = it_cov_date
return_tab = it_return
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc = 0 AND it_return[] IS NOT INITIAL.
READ TABLE it_return INDEX 1.
arg_name = it_return-fieldval. "if your screen field is name arg_name
ENDIF.
10-09-2008 8:44 AM
Hi Navneeth,
Thanks man. It is working. Points are awarded.
Regards,
dinesh.