‎2010 Mar 23 6:10 AM
Hiii,
i'm using FM 'F4IF_INT_TABLE_VALUE_REQUEST' to display the list of customers number from a table... everything is working fine except for when i double click on a record from this list it doesn't appear in the I/O field... please need ur help in this.
‎2010 Mar 23 6:24 AM
Hi,
Are you reading the table RETURN_TAB of this function module after calling it. The value selected is returned in this table.
Regards,
Jayesh
‎2010 Mar 23 6:29 AM
thanks for reply Mr. Jayesh
this is the code i use...
MODULE SET_DATA_CUSTOMER_NO INPUT.
select * from ycustomer_t INTo CORRESPONDING FIELDS OF TABLE G_TAB_CON_ITAB.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'F2' " 'input/output screen field'. i've put this in POV
value_org = 'S'
TABLES
value_tab = G_TAB_CON_ITAB
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.
ENDMODULE.
‎2010 Mar 23 6:43 AM
In the export parameter Retfield, you need to specify the field of the internal table whose value is to be returned to the return tab.
After calling the FM, read return_tab and pass the value to the screen field.
Regards,
Jayesh
‎2010 Mar 23 6:58 AM
i've tried this
EXPORTING
retfield = 'customer_no' this is the table field
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'F2' this is the field in the screen that the value ( customer_no) should appear in it
value_org = 'S'
TABLES
value_tab = G_TAB_CON_ITAB this is my internat table
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
return_tab>>> bring me a runtime error
note: when i didn't use the return_tab and execute my program and select from the list, the I/O field (F2) shows a random value from the same record i select but not the ( customer_no) which i want it to be displayed.
‎2010 Mar 23 7:25 AM
‎2010 Mar 23 6:33 AM
Hi,
<li>Are you passing values to FM like below
<li>You do not need to read return_tab to place value when you double click.
Thanks
Venkat.O
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'IWERK' "it_t399i table field.
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'P_SWERK' "Screen field on which values is placed.
value_org = 'S'
TABLES
value_tab = it_t399i
return_tab = it_return_tab.
‎2010 Mar 23 6:38 AM
Hi,
The selected values will be returned in RETURN_TAB after that call FM to display data on input field.
IT_DYNP_LIST should be filled with the selected value from F4 help FM.
Fetch the selected value
read table it_retvals into wa_retvals index 1.
wa_dynp_list-fieldname = c_field1 . "FIELD name.
wa_dynp_list-fieldvalue = wa_retvals-fieldval..
append wa_dynp_list to IT_DYNP_LIST.
clear : wa_dynp_list.
Use FM to display data on input field
call function 'DYNP_VALUES_UPDATE'
exporting
dyname = sy-repid
dynumb = sy-dynnr
tables
dynpfields = it_dynp_list.
Hope this may be helpful.
Thanks,
Sravanthi.V
‎2010 Mar 23 7:25 AM
I wrote the following code which worked fine. The screen field is p_pernr and customer no is replace with personal number here.
PARAMETERS: P_PERNR TYPE PERSNO.
Data: Itab type standard table of p0001,
RETURN_TAB TYPE STANDARD TABLE OF DDSHRETVAL WITH HEADER LINE.
At selection-screen on value-request FOR P_PERNR.
Select * from pa0001 into corresponding fields of table itab up to 50 rows.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
RETFIELD = 'PERNR'
PVALKEY = ' '
DYNPPROG = ' '
DYNPNR = ' '
DYNPROFIELD = ' '
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
VALUE_ORG = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
VALUE_TAB = ITAB
FIELD_TAB =
RETURN_TAB = RETURN_TAB
DYNPFLD_MAPPING =
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.
ELSE.
READ TABLE RETURN_TAB INDEX 1.
P_PERNR = RETURN_TAB-FIELDVAL.
ENDIF.