‎2008 May 13 11:48 AM
Hi Friends,
I am useing function Module.
What is a meaning on F4IF_INT_TABLE_VALUE_REQUEST
function module & how to use it.
Thanks & regards,
Rahul S.
‎2008 May 13 11:50 AM
Check out this link for usage
http://help.sap.com/saphelp_nw70/helpdata/en/9f/dbaac935c111d1829f0000e829fbfe/content.htm
‎2008 May 13 11:52 AM
Hi Rahul,
F4IF_INT_TABLE_VALUE_REQUEST:
F4 help that returns the values selected in an internal table. Very handy when programming your very own F4 help for a field.
Example:
data:
begin of t_values occurs 2,
value like kna1-begru,
end of t_values,
t_return like ddshretval occurs 0 with header line.
t_values = 'PAR*'.
append t_values.
t_values = 'UGG'.
append t_values.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = 'BEGRU'
value_org = 'S'
tables
value_tab = t_values
Regards
Adil
‎2008 May 13 11:52 AM
Hi,
F4 help also returning the value to be displayed in internal table.
This module implements the standard help at POV while passing the values to be displayed in a table. The entire dialogue behaves as for a standard F4 help. This module also supports input help control.
Note: Before you use this module at POV (Process on Value-Request), reconsider whether a search help could not carry out the same task. You can implement self-defined value selection in a search help exit. This has the advantage that you can attach the search help to a data element or a field of a structure. The F4 help is then automatically available for all users of the data element or structure.
The values to be displayed are passed in table VALUE_TAB. There are different ways to organize the data in VALUE_TAB. These are mainly defined with the parameter VALUE_ORG.
1. VALUE_ORG = 'S' (Structure)
This option should be used for new developments (despite other default values).
VALUE_TAB is an internal table with a (flat) structure. Every line in VALUE_TAB then corresponds to one line in the list to be displayed.
How the definition of the data struture is passed to the module is described below.
The data in VALUE_TAB is available in internal representation.
2. VALUE_ORG = 'C' (Column)
Each line of VALUE_TAB contains the contents of a single field. The contents of VALUE_TAB are copied to the hit list line by line. The description of the columns is passed in FIELD_TAB. When all fields of FIELD_TAB have been edited, the next line is processed.
In this case the values in VALUE_TAB must be passed in external representation. This means that for types whose external and internal representation differ, the values should be passed to VALUE_TAB with the ABAP command WRITE and not with MOVE (These are for example all the numeric types, date, fields with conversion exit, etc.). Use the extension LEFT-JUSTIFIED for numbers.
Caution: Do not copy any constants directly to VALUE_TAB. For example, if a date is defined as constant "01.01.1998", it can no loner be interpreted for other user-specific settings.
Reward if useful.
Regards,
Narasimha
‎2008 May 13 11:52 AM
‎2008 May 13 12:12 PM
Hi,
DATA: BEGIN OF it_bukrs OCCURS 0,
bukrs LIKE t001k-bukrs,
END OF it_bukrs.
SELECTION-SCREEN: BEGIN OF BLOCK main WITH FRAME TITLE text-001.
SELECTION-SCREEN SKIP.
PARAMETERS: p_bukrs(4) TYPE c.
SELECTION-SCREEN END OF BLOCK main.
*----
Validation Section
*----
INITIALIZATION.
SELECT DISTINCT bukrs FROM t001k INTO TABLE it_bukrs.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_bukrs.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'BUKRS'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'P_BUKRS'
value_org = 'S'
TABLES
value_tab = it_bukrs
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
‎2008 May 17 8:05 PM
Hi,
data: gt_t179 TYPE TABLE OF gty_t179,
gk_t179 TYPE gty_t179,
gt_retval TYPE TABLE OF ddshretval,
gk_retval TYPE ddshretval.
SELECT prodh
INTO TABLE gt_t179
FROM t179
WHERE stufe EQ gc_1.
IF sy-subrc NE 0.
MESSAGE e000(zotc) WITH text-e08.
ELSE.
Function Module to populate the internal table Values
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'prod1'
value = space
value_org = gc_s
TABLES
value_tab = gt_t179
return_tab = gt_retval
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc EQ 0.
CLEAR gk_retval.
READ TABLE gt_retval INTO gk_retval INDEX 1.
s_prod1-low = gk_retval-fieldval.
ENDIF.
ENDIF.
Thanks
Sumanth