11-24-2014 8:40 PM
Hi,
I have successfully implemented FM F4IF_INT_TABLE_VALUE_REQUEST for values in the ABAP dictionary, but I need a short fixed list of values that are not in an SAP table. Is there any way to use this FM for this, or is there another FM, or another way to do this?
My F4 list will only have three values.
Thanks,
Phillip
11-24-2014 9:26 PM
Hi,
You can use this Fm for fixed list of values. Look at program DEMO_DYNPRO_F4_HELP_MODULE module value_connection. Inner table values_tab is filled from SELECT statement, but it could by filled ex. with fixed values - it's up to You.
Regards,
Jarek
11-25-2014 5:17 AM
HI
you can add those three values into internal table and pass that internal table only you wil get those three value in F4.
regards
laxman
11-25-2014 5:33 AM
Hi phillip ,
First what ever field names or values you want just create a domain and maintain all the values over there ,
Then use 'GET_DOMAIN_VALUES' fm you will get the description as well as field value .
append these values to the main f4 fm,
Hope useful,
Sudheer
11-25-2014 5:50 AM
Try the below code
TYPES: BEGIN OF ty,
matnr TYPE matnr,
werks TYPE werks_d,
END OF ty.
DATA: it2 TYPE STANDARD TABLE OF dselc,
wa2 TYPE dselc.
DATA: it TYPE STANDARD TABLE OF ty,
wa_return TYPE ddshretval,
i_return TYPE STANDARD TABLE OF ddshretval,
repid TYPE sy-repid,
dynnr TYPE sy-dynnr.
PARAMETERS: p_werks TYPE marc-werks.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_werks.
repid = sy-repid.
dynnr = sy-dynnr.
SELECT matnr werks
FROM marc UP TO 3 ROWS
INTO TABLE it.
wa2-fldname = 'F0002'.
wa2-dyfldname = 'P_WERKS'.
APPEND wa2 TO it2.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'WERKS'
dynpprog = repid
dynpnr = dynnr
dynprofield = 'P_WERKS'
value_org = 'S'
display = 'F'
TABLES
value_tab = it
dynpfld_mapping = it2
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc = 0.
ENDIF.
Regards,
Mayur Priyan. S
11-25-2014 6:08 AM
Hello Philip,
As I understood from your question, you want to show the values in the F4 help which were not there in the domain.
If you check at the function module, whatever the values which you pass into TABLES parameter " VALUE_TAB " will be shown in the F4 help screen.
Did you try by populating the values manually into VALUE_TAB.
Regards,
Thanga
11-25-2014 2:06 PM
Hi all,
As I said, I am using this FM already pulling values from a table, so I understand the internal tables needed. For this project, I am filling the values in the F4 manually but no entries show, although there is a message that there are 3 entries. If you have already done this and it is working, please let me know what you did differently.
Here is module code:
MODULE set_fieldtypes INPUT.
* Declarations - these are actually outside the module at the top of the include
TYPES: BEGIN OF ty_fldtypes, " <-- this is value_tab
fieldtype(8),
description(11),
END OF ty_fldtypes.
DATA: it_fldtypes TYPE STANDARD TABLE OF ty_fldtypes INITIAL SIZE 0,
wa_fldtypes LIKE LINE OF it_fldtypes.
DATA: it_return TYPE STANDARD TABLE OF ddshretval.
DATA: it_fieldtab TYPE TABLE OF dfies,
wa_fieldtab LIKE LINE OF it_fieldtab.
* Clear/refresh each time module is called
CLEAR: wa_fldtypes, it_fldtypes, it_return.
REFRESH: it_fldtypes, it_return.
* Fill the internal table (value_tab)
wa_fldtypes-fieldtype = 'ENTRY 1'.
wa_fldtypes-description = 'Account 1'.
APPEND wa_fldtypes TO it_fldtypes.
wa_fldtypes-fieldtype = 'ENTRY 2'.
wa_fldtypes-description = 'Account 2'.
APPEND wa_fldtypes TO it_fldtypes.
wa_fldtypes-fieldtype = 'ENTRY 3'.
wa_fldtypes-description = 'Account 3'.
APPEND wa_fldtypes TO it_fldtypes.
* Call the function module
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
* DDIC_STRUCTURE = 'SAPTABLENAME '
retfield = 'ZFIELDTYPE'
* PVALKEY = ' '
dynpprog = SY-REPID
dynpnr = SY-DYNNR
dynprofield = 'ZFIELDTYPE'
* STEPL = 0
window_title = 'My Field Types'
* VALUE = ' '
value_org = 'S'
* MULTIPLE_CHOICE = ' '
* DISPLAY = ' '
* CALLBACK_PROGRAM = ' '
* CALLBACK_FORM = ' '
* MARK_TAB =
* IMPORTING
* USER_RESET =
TABLES
value_tab = it_fldtypes
* field_tab = it_fieldtab
return_tab = it_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.
ENDMODULE.
11-25-2014 2:22 PM
Should be:
retfield = 'FIELDTYPE' " name of field in value_tab
return_tab is not necessary
value_tab-fieldtype should be the same type as Your ZFIELDTYPE field in screen.
Jarek
11-25-2014 2:29 PM
Ah, so my
retfield = 'ZFIELDTYPE'
should be
retfield = 'FIELDTYPE'
Did not catch it. Will give a try and get back to you. Thanks!!
11-25-2014 2:35 PM
Look at DEMO_DYNPRO_F4_HELP_MODULE;
in retfield should be name of field from value_tabel
in deynprofield - field name in the screen.
11-25-2014 2:45 PM
It makes sense, I did not catch it.
I probably won't get to this until late today or tomorrow but will definitely post back and let you know.
11-25-2014 10:01 PM
I changed
retfield = 'ZFIELDTYPE'
to
retfield = 'FIELDTYPE' and it's still a blank list.
11-25-2014 10:28 PM
I forgot one thing: value_tab should use data type from dictionary. Change type definition to (just example):
TYPES: BEGIN OF ty_fldtypes, " <-- this is value_tab
fieldtype TYPE CHAR08,
description TYPE CHAR11,
END OF ty_fldtypes.
Of course in Your real program use proper datatype according for Your needs.
11-25-2014 2:33 PM
Hi Phillip,
You can pass
form f4_help_function_module tables p_vtab
using p_retf.
* p_retf can be the field name. ex KOSTL and p_vtab can be the table with the data which you want to * show. After that you can use the FM in below manner.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = p_retf
dynpprog = sy-repid
dynpnr = '1000'
dynprofield = 'TEST1'
value_org = 'S'
tables
value_tab = p_vtab
return_tab = git_return
exceptions
parameter_error = 1
no_values_found = 2
others = 3.
if sy-subrc ne 0.
message
endif.
endform.
Regards,
Swet
11-26-2014 2:39 AM
Hi phillip ankerson,
I think the quick way is to create search help with tcode se11,then bounding search help with your z data element.If the fields of search help come from diffrent table,you can use seacrh help exit or create z view to achive requirement.
In this way, your z search help can be quoted by z table,z prg and so on.
Hope this will be useful for you.
Regards.
11-26-2014 1:31 PM
Hi Li Tom,
Once again, I have done that in other occasions that utilize sap data, but in this case, no sap table or z elements are referenced. It is a simple fixed list.
Thanks