‎2009 May 11 4:22 AM
Dear Friends...
Thanks in Advance..
Using F4IF_INT_TABLE_VALUE_REQUEST function Module i want to Populate more than one value into the Screen Fields in Table Control.
I think we can achive this using Field Mapping.
Will any body tell the code ghow to write.
Regards:
Sridhar
‎2009 May 11 4:51 AM
hi,
check this out...
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_kunnr-high.
IF t_vbak[] IS NOT INITIAL.
SELECT kunnr FROM vbak INTO TABLE t_inttab1 FOR ALL ENTRIES IN t_vbak
WHERE vbeln = t_vbak-vbeln AND vkorg IN s_vkorg.
ENDIF.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
retfield = ' '
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 = t_inttab1
FIELD_TAB =
return_tab = t_return
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.
ENDIF.
READ TABLE t_return INDEX 1.
s_kunnr-high = t_return-fieldval.
CLEAR t_return-fieldval.
regards,
Madan..
‎2009 May 11 5:08 AM
‎2009 May 11 5:44 AM
hi chech this link,
simple program to understand....
[http://yashtechiesabap.blogspot.com/2009/04/getting-f4-help-from-internal-tablethe.html]
Regards,
priya
‎2009 May 11 5:54 AM
once you get return table value from F4IF_INT_TABLE_VALUE_REQUEST
read table i_return index 1.
use function module
DYNP_UPDATE_FIELDS
data : DYNPREAD like table of DYNPREAD wirh header line.
DYNPREAD-FIELDNAME = your screen field name
DYNPREAD-STEPL = table control stepl value
DYNPREAD-FIELDVALUE = field value
append DYNPREAD
CALL FUNCTION 'DYNP_UPDATE_FIELDS'
EXPORTING
dyname = your program name
dynumb = your screen no
* REQUEST = ' '
* START_SEARCH_IN_CURRENT_SCREEN = ' '
* START_SEARCH_IN_MAIN_SCREEN = ' '
* START_SEARCH_IN_STACKED_SCREEN = ' '
* START_SEARCH_ON_SCR_STACKPOS = ' '
* SEARCH_OWN_SUBSCREENS_FIRST = ' '
* SEARCHPATH_OF_SUBSCREEN_AREAS = ' '
tables
dynpfields = DYNPREAD
* EXCEPTIONS
* INVALID_ABAPWORKAREA = 1
* INVALID_DYNPROFIELD = 2
* INVALID_DYNPRONAME = 3
* INVALID_DYNPRONUMMER = 4
* INVALID_REQUEST = 5
* NO_FIELDDESCRIPTION = 6
* UNDEFIND_ERROR = 7
* OTHERS = 8
.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Regards,
Alpesh
‎2009 May 11 5:55 AM
Hi Sridhar,
I have sample code for f4 help for list box.
************sample code**************************
module list_box input.
LIST-BOX.
select sno sname from ysrtmm into corresponding fields of table itab.
sort itab by sno.
delete itab index 1.
sort itab by sno.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = 'SNO'
value_org = 'S'
tables
value_tab = 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. " LIST_BOX INPUT
Regards,
Naveen M.
‎2009 May 11 6:46 AM
TYPES: BEGIN OF t_itab,
code_key TYPE dfies-fieldname,
short_text TYPE char50,
END OF t_itab.
data: gt_itab type table of t_itab.
gt_itab-code_key = '0'.
gt_itab-short_text = 'C/R'.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = ' '
dynpprog = sy-repid
dynpnr = sy-dynnr
value_org = 'S'
window_title = text-001
TABLES
value_tab = gt_itab
return_tab = t_return
EXCEPTIONS
parameter_error = 1
no_values_found = 2
others = 3.
Regards,
Joan
Edited by: Joan Jesudasan on May 11, 2009 7:47 AM