F4 Help for the selection screen field
Hi Gurus,
I have to display F4 help for a selection screen field. i am using following code:
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'CODE'
dynpprog = lw_repid
dynpnr = sy-dynnr
VALUE_ORG = 'S'
TABLES
value_tab = gi_text
field_tab = li_fields_tab
return_tab = pi_return_tab
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
My internal table gi_emp has two fields CODE & TEXT. When i select 1 particular value, it returns the CODE value in the pi_return_tab table.
But my requirement is i have to capture the corresponding TEXT value for the Returned CODE. Ex: following is the F4 help being displayed: -
001 test
001 test1
but is i select code 001(First Value), i also need to capture it's corresponding Text value. In return table pi_return_tab i have only Code value.
Please help me out.
Note: Based on return code i can't search into the internal table gi_code, because as shown in the example, code has multiple text.
Sachin,
I think this is what you need. The following code will return the key and the text (OR any other columns), if both columns are in the selection screen the selected values (both columns) will also be passed to the corresponding parameters. If you only need the text to be in the return table and not passed to the selection screen then set the parameter for text with NO-DISPLAY option.
REPORT zktest01 .
DATA :
BEGIN OF value_tab OCCURS 0,
field LIKE e070-trkorr,
text LIKE e07t-as4text,
END OF value_tab.
DATA: t_fldtab LIKE dfies OCCURS 0 WITH HEADER LINE,
t_rettab LIKE ddshretval OCCURS 0 WITH HEADER LINE,
t_dynmap LIKE dselc OCCURS 0 WITH HEADER LINE.
PARAMETERS : p_field LIKE value_tab-field,
p_text LIKE value_tab-text. "NO-DISPLAY.
INITIALIZATION.
t_fldtab-tabname = 'VALUE_TAB'.
t_fldtab-fieldname = 'FIELD'.
t_fldtab-langu = 'E'.
t_fldtab-position = 1.
t_fldtab-offset = 0.
t_fldtab-fieldtext = 'Key'.
t_fldtab-reptext = 'Key'.
t_fldtab-leng = 20.
t_fldtab-intlen = 20.
t_fldtab-outputlen = 20.
t_fldtab-datatype = 'CHAR'.
t_fldtab-inttype = 'C'.
t_fldtab-headlen = 20.
t_fldtab-keyflag = 'X'.
t_fldtab-lowercase = ' '.
APPEND t_fldtab.
t_fldtab-tabname = 'VALUE_TAB'.
t_fldtab-fieldname = 'TEXT'.
t_fldtab-position = 2.
t_fldtab-offset = 20.
t_fldtab-fieldtext = 'Text'.
t_fldtab-reptext = 'Text'.
t_fldtab-leng = 60.
t_fldtab-intlen = 60.
t_fldtab-outputlen = 60.
t_fldtab-headlen = 60.
t_fldtab-keyflag = ' '.
t_fldtab-lowercase = ' '.
APPEND t_fldtab.
value_tab-field = '101'.
value_tab-text = 'dddd'.
APPEND value_tab.
value_tab-field = '202'.
value_tab-text = 'aaaa'.
APPEND value_tab.
t_dynmap-fldname = 'FIELD'.
t_dynmap-dyfldname = 'P_FIELD'.
APPEND t_dynmap.
t_dynmap-fldname = 'TEXT'.
t_dynmap-dyfldname = 'P_TEXT'.
APPEND t_dynmap.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_field.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'FIELD'
dynpprog = 'ZKTEST01'
dynpnr = '1000'
dynprofield = 'P_FIELD'
value_org = 'S'
TABLES
field_tab = t_fldtab
value_tab = value_tab
return_tab = t_rettab
dynpfld_mapping = t_dynmap
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc EQ 0.
ENDIF.
START-OF-SELECTION.
Jeffrey Satriadi
Similar Messages
-
F4 help for the selection screen field designed in screen painter
Hi all,
I have designed selection screen in the screen painter. in that for one of the fields i have to give f4 help. for that i have writter the code in PAI event. in this event i have used the standard Function module for f4 help. but no f4 help is comming for that field. can any body suggest what i have to do.
Thanks & Regards,
Giri.Hi,
You must use the correct event to meet ur requirement use POV event instead of PAI event.
for more clarification and example program see below the demo program
DEMO_DYNPRO_F4_HELP_DYNPRO
DEMO_DYNPRO_F4_HELP_MODULE
Cheers
fareed -
Can we create serach help for a selection screen field
Can we create serach help for a selection screen field with out creating searchhelp object.
I mean is it possible to create serchelp in the program itself with some specific values i want to give.
E.g say we can define any internal table and fill it with values and using that into selection screen fields
Regards
MaveAT SELECTION-SCREEN ON VALUE-REQUEST FOR paymeth.
PERFORM PAYMENT_HELP.
FORM PAYMENT_HELP.
DATA: begin of DESCR_TAB occurs 0,
DESCR LIKE BKPF-BKTXT,
END OF DESCR_TAB.
DATA: gd_repid like sy-repid.
gd_repid = sy-repid.
DESCR_TAB-DESCR = 'aaaaa'.
append DESCR_TAB.
DESCR_TAB-DESCR = 'bbbbb'.
append DESCR_TAB.
DESCR_TAB-DESCR = 'ccccc'.
append DESCR_TAB.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'DESCR'
DYNPPROG = gd_repid
DYNPNR = '1000'
DYNPROFIELD = 'paymeth'
VALUE_ORG = 'S'
DISPLAY = ' '
TABLES
value_tab = DESCR_TAB.
endform.
Svetlin -
How to assign F1 help to the selection screen fields
Hi All,
I have a requirement.I have to create a button named "HELP" at the side of Execute button in the selection screen.If I place my cursor in the selection screen field and I press that "HELP" button, I should get the Documentation help for that field.
Please suggest me on this.
Thanks in advance.
Sreeharsha SinguruHi sreeharsha,
here a short example:
TABLES: MARA.
TABLES: SSCRFIELDS.
TYPE-POOLS: ICON.
DATA: CURSORFIELD(20).
SELECTION-SCREEN: BEGIN OF LINE.
SELECT-OPTIONS: S_MATNR FOR MARA-MATNR.
SELECTION-SCREEN: END OF LINE.
SELECTION-SCREEN: BEGIN OF LINE.
SELECT-OPTIONS: S_MTART FOR MARA-MTART.
SELECTION-SCREEN: END OF LINE.
SELECTION-SCREEN: SKIP 3.
SELECTION-SCREEN: BEGIN OF LINE.
SELECTION-SCREEN: PUSHBUTTON (10) PB01 USER-COMMAND HELP.
SELECTION-SCREEN: END OF LINE.
AT SELECTION-SCREEN.
GET CURSOR FIELD CURSORFIELD.
CASE SSCRFIELDS.
WHEN 'HELP'.
CASE CURSORFIELD.
WHEN 'S_MATNR-LOW'.
CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT' "Make your own Text
EXPORTING
TITEL = 'Information'
TEXTLINE1 = 'Information for field:'
TEXTLINE2 = 'S_MATNR-LOW'
START_COLUMN = 10
START_ROW = 15.
WHEN 'S_MTART-LOW'.
CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT' "Make your own Text
EXPORTING
TITEL = 'Information'
TEXTLINE1 = 'Information for field:'
TEXTLINE2 = 'S_MTART-LOW'
START_COLUMN = 10
START_ROW = 15.
ENDCASE.
ENDCASE.
INITIALIZATION.
CONCATENATE ICON_INFORMATION 'Help' INTO PB01.
START-OF-SELECTION.
SELECT * FROM MARA WHERE MATNR IN S_MATNR.
WRITE: / MARA-MATNR.
ENDSELECT.
Hope it helps.
Regards, Dieter -
Drop down box for the selection screen field of the classical report
Hi all.
i want to have the drop down list to choose from, for the region(table:zbwcntry-field:zregion1) on the selection screen.
what is to be added to the code for this requirement.Also,please note that this is the classical report.
thanks for this answered.hi,
data : gv_name TYPE vrm_id, " used for vrm id
gv_repid TYPE sy-repid, " used to hold program name
work area to provide drop down list
DATA : gs_value TYPE vrm_value,
Internal table to provide drop down list
DATA : gt_values TYPE vrm_values,
PARAMETER : p_run(12) TYPE c AS LISTBOX VISIBLE LENGTH 12
DEFAULT 'DEFAULT' OBLIGATORY,
CONSTANTS : gc_run(5) TYPE c VALUE 'P_RUN', "constant for run mode
gv_name = gc_run.
gs_value-key = gc_v1.
gs_value-text = text-010.
APPEND gs_value TO gt_values.
gs_value-key = gc_v2.
gs_value-text = text-011.
APPEND gs_value TO gt_values.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = gv_name
values = gt_values
EXCEPTIONS
id_illegal_name = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Hope this is helpful.
Rgds.,
subash -
Input help for a selection screen field
I have a selection screen with field species and checkoff activity .
For a given species('sc','sb' or 'ss') , the input values allowed for the
check off activity must be 'SCCK' for species 'SC' ,'SBCK' for species 'SB' and so on.
I need to provide input help for check off activity based on the value of the species.How do i do that?PARAMETER : p_val(10) TYPE c ,
p_val2(10) TYPE c.
AT SELECTION-SCREEN on p_val.
IF p_val = 'SC'.
p_val2 = 'SCCK'.
ENDIF. -
How to display the selection screen fields for selected checkboxes
Hi all,
I have 7 checkboxes, for each check box we have some seletion screen fields.if i select first check box,i want to display first slection screen fields only.
and if we select more than one check box how to display the selection screen fields for selected check boxes,please help me this
Thanks
sriman.hi,
Try this code
report z_13317_sdn2.
tables : mara, marc, dd03l.
parameters : p_chk1 as checkbox user-command ABC,
p_chk2 as checkbox user-command PQR,
p_chk3 as checkbox user-command XYZ.
select-options : s_matnr for mara-matnr modif id A,
s_ersda for mara-ersda modif id A,
s_werks for marc-werks modif id B,
s_lvorm for marc-lvorm modif id B,
s_tab for dd03l-tabname modif id C.
data: v_chk1,
v_chk2,
v_chk3.
at selection-screen output.
loop at screen.
if screen-group1 = 'A' or
screen-group1 = 'B' or
screen-group1 = 'C'.
screen-input = 0.
modify screen.
endif.
endloop.
loop at screen.
if v_chk1 = 'X'.
if screen-group1 = 'A'.
screen-input = 1.
modify screen.
endif.
endif.
if v_chk2 = 'X'.
if screen-group1 = 'B'.
screen-input = 1.
modify screen.
endif.
endif.
if v_chk3 = 'X'.
if screen-group1 = 'C'.
screen-input = 1.
modify screen.
endif.
endif.
endloop.
at selection-screen.
if sy-ucomm = 'ABC'.
if v_chk1 = ' '.
v_chk1 = 'X'.
else.
v_chk1 = ' '.
endif.
endif.
if sy-ucomm = 'PQR'.
if v_chk2 = ' '.
v_chk2 = 'X'.
else.
v_chk2 = ' '.
endif.
endif.
if sy-ucomm = 'XYZ'.
if v_chk3 = ' '.
v_chk3 = 'X'.
else.
v_chk3 = ' '.
endif.
endif.
Regards,
Sailaja. -
F4 help in the selection screen from a int table
I collected the datas from the function module. and the internal table is populated.
the internal table contains manny fields.
among these fields i need to take only one field and this field value to be used for F4 help in the selection screen ( not a dynpro)
for example : in the selection screen
I have to select the PO.
based on the user i have filtered the PO. (determined dynamically by using the user name this i have done it)
then i have to assign the PO the selection screen.
which FM will be better to use for this type of scenario and help me out with some example codes particularly for my req
ThanksHi ,
use the FM 'F4IF_INT_TABLE_VALUE_REQUEST'
This example is for search help for material type .
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_mtart-low .
select all material types you want to display in search help into table i_mtart.
PERFORM select_material_type.
PERFORM help_material_type.
*& Form help_material_type
text
--> p1 text
<-- p2 text
FORM help_material_type .
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
retfield = 'MTART'
PVALKEY = ' '
dynpprog = sy-cprog
dynpnr = sy-dynnr
dynprofield = 'S_MTART-LOW'
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
value_org = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
value_tab = i_mtart
FIELD_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.
ENDIF.
ENDFORM. " help_material_type
Regards,
Balaji. -
Want to see the previous file name in the selection screen field
Hi,
I am working with flat file upload. Now my problem is in the selection screen field when i press space bar or backspace i want to see the previous file path which i have taken before. How to do this functionality.
Thanks in advance,
Vijay.Hi,
Hope the following code will help u.
PARAMETER: in_file type ibipparms-path MEMORY ID FID.
at selection-screen on value-request for in_file.
call function 'KD_GET_FILENAME_ON_F4'
exporting
mask = ',CSV,*.csv,'
changing
file_name = in_file.
But here when u give a path and execute and come back or executing it again the previous path will automatically come to the in_file field.
Just check this code.
Thanks. -
How to link a search help to a selection screen field
Hi All,
I am using field PKWRG from PA0017 table in selection screen. I need F4 help there as in Tcode PA30 . But this field does not have value table or check table. However, it has a search help attached 'TRV_PKWRG' .
But, I donot know how to assign a search help to a selection screen field. Please help.
Regards,
NibhaHello,
Fetch all the data which from the table which you want to show in the search help and pass the value to the FM
F4IF_INT_TABLE_VALUE_REQUEST and the selection-screen event must be
at selection-screen on value request parameter or selection option variable.
BCALV_TEST_FULLSCREEN
BCALV_TEST_FULLSCREEN_CALLS
BCALV_TEST_FULLSCREEN_PRINT
BCALV_TEST_FULLSCREEN_STATUS
BCALV_TEST_GRID
BCALV_TEST_GRID_DRAG_DROP
BCALV_TEST_GRID_EDITABLE
BCALV_TEST_GRID_EVENTS
BCALV_TEST_GRID_INDEX
BCALV_TEST_GRID_TOOLBAR
BCALV_TEST_HIERSEQ_LIST
BCALV_TEST_LIST
BCALV_TEST_LIST_PRINT
BCALV_TEST_LIST_STATUS
BCALV_VERIFY_DTYPES_D0100_F01
BCSMENUF01
BDLCOF10
BDLDVI10
BDLTREDF -
How to make the selection screen field names to apper as in logon language
hai
the selection screen field names should appear
as that of logon language
and <u>before that once i logon with a language
it should pop up the (some)message in the logon language</u>.
For the selection screen filednames to appear as that
of the logon language whether i have to maintain the textelements for all screen fields in all possible languages or i have to write only in english and tell mentioning it to changeIn <b>SE38</b> --> Goto --> Translate.
Choose target language, and start making the translation -;)
Greetings,
Blag. -
ERROR: Select Currency/UoM field for the selected analyzed fields
Hi all
I am currently creating Business Rules in GRC PC 10.0 for the Automated Monitoring Framework.
After completing the Basic Information page, I click [Next] and get to the Data for Analysis page.
If ever I select any field that contains a value for Currency or Unit of Measure, I receive the following error and cannot proceed with creating the Business Rule:
Select Currency/UoM field for the selected analyzed fields
Does anyone have any information/SAP Notes/documentation on what this error is and how to solve it?
Any help will be gratefully accepted.
Kind regards
Gregory Huddlehttp://service.sap.com/sap/support/notes/1904313
-
Status profile for the selection screen ?
Dear Shymal,
The link of thread which you sent have this line status profile for the selection screen for QA33 and QA32 . I don't users ti get those lots which are having status LTCA.
Now how can i do this? Can you explain me?
Regards,
Kaushal RaiDear Kaushal,
It is written in that reply status profile, is just a slip of mind/Fingers only. We can say a typographical error. I hearty apologies for the same.
Now a accept my regret and pls find the rectification herewith.
That is "Selection Profile", to create rather I can say configure it,
- Run trx BS42, create new profile, Name it Logically.
- Double click on the "_Selection Conditions_",system will lead you to the screen named Change View "Selection Conditions": Over View.
- Here Enter the LTCA, in the Fourth Column "STATUS".
- Click on the check box under Sixth column 'not'.
The settings should be as.....
1st Column,,,Link :- No Links (Blank0
2nd Column,,,Usr:- Don't check this box.
3rd Column,,,St.Prof.:- Blank
4th Column,,,Status:- LTCA.
5th Column,,,Status:- Lot canceled
6th Column,,,not:- Check this box.
7th Column,,,Status:- It will be 'Active' by default.
Now SAVE.....
Now in QA32, pick the section profile you just created.
Let me know if it don't work.
Regards,
Shyamal -
How to limit the search help in the selection screen?
Hi All,
I got a selection option in a selection screen,
say SELECT-OPTIONS KSCHL FOR VAKE-KSCHL.
I want to limit the output list of the search help of this field, e.g. 33 entries for a specific application and usage.
What should I do ?
Thz.Hi,
U can check with these two
<b>... NO-EXTENSION</b>
Effect
The user can only make an entry on one line. Calling the additional "Multiple Selection" screen is not supported and no pushbutton for this appears on the selection screen.
Addition 12
<b>... NO INTERVALS</b>
Effect
The selection option is displayed on the selection screen without a 'to' field. The pushbutton for calling the "Multiple Selection" screen appears immediately after the 'from' field.
This addition thus allows you to generate a simplified display on the selection screen. This is particularly useful if you are not making any range selections for this selection option.
Notes
On the "Multiple Selection" screen, you can also enter ranges for selection options with "NO INTERVALS".
By combining this addition with "NO-EXTENSION", you can restrict the user to entry of a single value for the selection option, but with the possibility of also choosing single value options like 'Greater than' or 'Less than or equal'.
By using the addition " NO INTERVALS" with SELECTION-SCREEN BEGIN OF BLOCK, you can activate the simplified display for all selection options in a block.
The function module SELECT_OPTIONS_RESTRICT allows you to restrict the set of selection options available for a SELECT-OPTION (for example, only single values and patterns, i.e. 'EQ' and 'CP' are allowed). You can also forbid the leading sign 'E' (= 'Exclude from selection'). This means that you can considerably restrict the selections which can be entered on the selection screen.
Just now tried it out to limit the search help u have to use NO-EXTENSION.
<b>Try this simple code.
Tables: mara.
SELECT-OPTIONS: s_matnr FOR MARA-matnr NO-EXTENSION.</b>
Hope this helps.
Kindly reward points and close the thraed if ur problem got solved.
U havent rewarded any points?
Message was edited by: Judith Jessie Selvi -
F4 help for a selection screen parameter with filename created dynamically
Hi All,
I have a requirement where in an F4 help should be present for a selection screen parameter. After selecting the filepath and clicking OK button on the Dialog, the filename should be dynamically get created in the selection screen parameter field. For example:
if the path is D:\DOCS then at the end of DOCS the filename should automatically get populated.
Like below string:
D:\DOCS\new.txt
Is there any function module or method which does this kind of activity.
Thanks in advance,
Deepakthis code will help:
FORM get_filename CHANGING p_filename.
DATA : lv_filename TYPE string,
lv_rc TYPE i,
li_filetable TYPE filetable.
CONSTANTS : lc_fname TYPE string VALUE 'ZRPP4000.XLS',
lc_fpath TYPE string VALUE 'C:\',
lc_extn TYPE string VALUE 'XLS'.
CALL METHOD cl_gui_frontend_services=>file_open_dialog
EXPORTING
default_filename = lc_fname
initial_directory = lc_fpath
default_extension = lc_extn
CHANGING
file_table = li_filetable
rc = lv_rc
EXCEPTIONS
file_open_dialog_failed = 1
cntl_error = 2
error_no_gui = 3
not_supported_by_gui = 4
OTHERS = 5.
IF sy-subrc = 0 .
READ TABLE li_filetable INTO lv_filename INDEX 1.
IF sy-subrc = 0.
p_filename = lv_filename.
ENDIF.
ENDIF.
REFRESH li_filetable.
CLEAR:lv_filename.
ENDFORM. "get_filename
" p_filename is selection screen parameter
Maybe you are looking for
-
Ease of use from ver 2 to ver 8
A long time ago I bought Elements Ver 2 and could not understand it all and returned it. I am looking for a program to edit photos like fun stuff,,adding people to other picts, changing picture sizes for a group of picts (pixels/size/names/etc), ch
-
can not sign in to Icloud it keeps coming up the maximum number of free accounts have been activated on this ipad 1st generation
-
Hi According to iTunes the iPhoto album I selected is showing as synced on the status bar, but ATV say's there are no photos synced to ATV. Any ideas? Colin
-
Info on upgrading RAM and Hard Disk on late-2011 Macbook Pro
Hello everyone, I would like some info from anyone regarding upgrading RAM on my macbook pro (13inch, late 2011 model) from 4GB to 8GB. Will the notebok support 8GB and if so, is it something that you can do yourself or should it be taken to an Apple
-
Errors in Christian Holidays calendar - please update
I subscribed to the Christian Holidays calendar at http://ical.mac.com/ical/Christian32Holidays.ics. It has some errors and since I didn't create it, I can't fix them. The problems: - Easter should be an entire day, not just from 1-2 PM. - The follow