Help required on selection screen
In the selection screen in the tool bar i need include the button where we can get the Greater than, Less Than , Equal to buttons. Somethign similar to what is done when we query a table. Ne pointers points assured to correct answer.
Hi
Search the SE16 Main program for the PF status used there with all these SELECTION OPTIONS
and try to copy that fromt hat program to your selection screen
Or try the Fun module
RS_SET_SELSCREEN_STATUS
Reward points for useful Answers
Regards
Anji
Similar Messages
-
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 -
I need some help on a selection screen. I have the following:
SELECTION-SCREEN: BEGIN OF BLOCK a1 WITH FRAME TITLE text-001.
PARAMETERS: p_bldat TYPE bkpf-bldat OBLIGATORY DEFAULT sy-datum,
p_budat TYPE bkpf-budat OBLIGATORY DEFAULT sy-datum,
p_xref1 TYPE proj-pspid OBLIGATORY,
p_bktxt TYPE bkpf-bktxt,
p_bukrs TYPE bkpf-bukrs OBLIGATORY DEFAULT '1100',
p_waers TYPE bkpf-waers OBLIGATORY DEFAULT 'USD'.
SELECTION-SCREEN: END OF BLOCK a1.
SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE text-002.
PARAMETERS: p_lifnr TYPE ekko-lifnr OBLIGATORY,
p_ebeln TYPE ekko-ebeln OBLIGATORY.
SELECTION-SCREEN: END OF BLOCK b1.
SELECTION-SCREEN: BEGIN OF BLOCK c1 WITH FRAME TITLE text-003.
PARAMETERS: p_amt TYPE wrbtr,
p_ret TYPE wrbtr.
SELECTION-SCREEN: END OF BLOCK c1.
SELECTION-SCREEN: BEGIN OF BLOCK d1 WITH FRAME TITLE text-004.
PARAMETERS: p_cmode TYPE callmode DEFAULT 'N' OBLIGATORY.
SELECTION-SCREEN: END OF BLOCK d1.
AT SELECTION-SCREEN ON p_ebeln.
SELECT SINGLE kwert INTO p_ret FROM zretention WHERE ebeln = p_ebeln AND ebelp = '00000' AND TYPE = 'C'.
IF NOT sy-subrc = 0 OR p_ret IS INITIAL.
CONCATENATE 'Purchase Order' p_ebeln 'does not have any retention available for release!' INTO d_string.
MESSAGE d_string TYPE 'E'.
ENDIF.
AT SELECTION-SCREEN.
check p_ret is not INITIAL.
IF p_amt > p_ret.
MESSAGE 'Amt. To Be Released is more than the remaining retention. Please check your input.' TYPE 'E'.
ELSEIF p_amt IS INITIAL.
MESSAGE 'Amt. To Be Released is required. Please check your input.' TYPE 'E'.
ENDIF.
What I want is for the parameter p_ret to be populated when the user inputs a PO (p_ebeln). This seems to work except I want this to be brought in without running through the other checks (AT SELECTION-SCREEN). In order to bring in p_ret I am having to hit ENTER which will trigger the event AT SELECTION-SCREEN.
How can I bring in p_ret without triggering the event AT SELECTION-SCREEN?
Regards,
DavisIn this case.
If you don't want at selection-screen to be triggered on hitting enter, you can give an if condition in at selection-screen.
tables : sscrfields.
AT SELECTION-SCREEN ON p_ebeln.
SELECT SINGLE kwert INTO p_ret FROM zretention WHERE ebeln = p_ebeln AND ebelp = '00000' AND TYPE = 'C'.
IF NOT sy-subrc = 0 OR p_ret IS INITIAL.
CONCATENATE 'Purchase Order' p_ebeln 'does not have any retention available for release!' INTO d_string.
clear sscrfield-ucomm.
MESSAGE d_string TYPE 'E'.
ENDIF.
AT SELECTION-SCREEN.
if sscrfields-ucomm = 'ONLI'.
check p_ret is not INITIAL.
IF p_amt > p_ret.
MESSAGE 'Amt. To Be Released is more than the remaining retention. Please check your input.' TYPE 'E'.
ELSEIF p_amt IS INITIAL.
MESSAGE 'Amt. To Be Released is required. Please check your input.' TYPE 'E'.
ENDIF.
endif.
The code in at selection-screen is executed only when user presses F8. on pressing 'Enter' it will not be executed.
Hope this helps you.
Regards,
Siddarth -
Error in search help button at selection-screen
hi all,
i have a small issue.
i have created a seach help button in selection screen .
my code is as bellow.
TYPES: BEGIN OF ty_ZSD_SNID,
KUNNR TYPE KUNNR,
BAREA TYPE WERKS_D,
END OF ty_ZSD_SNID.
DATA : it_z TYPE STANDARD TABLE OF ty_ZSD_SNID.
selection-screen : begin of block b with frame title text-000.
select-options : skunnr for zsd_snid-kunnr.
parameters : pbarea like zsd_snid-barea obligatory.
selection-screen : end of block b.
INITIALIZATION.
SELECT KUNNR BAREA FROM ZSD_SNID INTO TABLE it_z.
SORT it_z BY BAREA KUNNR.
DELETE ADJACENT DUPLICATES FROM it_z COMPARING BAREA KUNNR.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR SKUNNR-low.
IF it_z[] IS NOT INITIAL.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
DDIC_STRUCTURE = ' '
retfield = 'KUNNR' " data base table field name
PVALKEY = ' '
dynpprog = sy-repid " program name
dynpnr = sy-dynnr "screen name
dynprofield = 'SKUNNR-LOW' " layot field name
STEPL = 0
WINDOW_TITLE =
VALUE = ' '
value_org = 'S'
MULTIPLE_CHOICE = ' '
DISPLAY = ' '
CALLBACK_PROGRAM = ' '
CALLBACK_FORM = ' '
MARK_TAB =
IMPORTING
USER_RESET =
TABLES
value_tab = it_z[] " internal talble name
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.
ELSE.
MESSAGE E000(zsdsn).
ENDIF.
my issue is , its working properly if records are there in my z table.
if no records are there in the table then if i do comment the last message statement then its working.
if i do uncomment like the above code, then its dumming.
what i should i do ??
kind regardsclosed because of no answer.
-
How to provide F4 help in a selection screen
Hi..
How to provide F4 help in a selection screen for a particular field using
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'.
Thanks in Advance.
Regards
Raj KumarAT SELECTION SCREEN
at selection-screen on value-request for s_contr-low.
Get contract (low value)
perform get_contract changing s_contr-low.
form get_contract changing p_contr .
types: begin of ty_ycontract,
ycontract type xchcontract-ycontract,
lifnr type xchcontract-lifnr,
ycontdate type xchcontract-ycontdate,
ycont_end_dt type xchcontract-ycont_end_dt ,
end of ty_ycontract.
data: ds_returntab type ddshretval,
dt_returntab type table of ddshretval,
dl_fieldname type dfies-fieldname.
data: dt_ycontract type table of ty_ycontract.
select ycontract lifnr ycontdate ycont_end_dt
from xchcontract
into table dt_ycontract.
if sy-subrc = 0.
clear dl_fieldname.
dl_fieldname = 'YCONTRACT'.
call function 'F4IF_INT_TABLE_VALUE_REQUEST'
exporting
retfield = dl_fieldname
value_org = 'S'
tables
value_tab = dt_ycontract
return_tab = dt_returntab
exceptions
parameter_error = 1
no_values_found = 2
others = 3.
if sy-subrc = 0.
clear ds_returntab.
read table dt_returntab into ds_returntab index 1.
if sy-subrc = 0.
p_contr = ds_returntab-fieldval.
endif.
endif.
endif.
endform. -
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. -
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 -
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 -
Reg logic required for selection-screen.
Hi,
i have one requirement
on selection screen 2 radio button
1 for service
2 for account
Parameter FILE LOCALFILE Filename
If the radiobutton ACCOUNT is selected the default name for file will be:
Rev_acc_com_&system_time_stamp&.dat
Elseif the radiobutton SERVICE is selected the default name for file will be:
Rev_srv_com_&system_time_stamp&.dat
some body can give the logic for this.take the following solution
data: tstamp type TZNTSTMPS.
data: filename type string.
call function 'CONVERT_INTO_TIMESTAMP'
exporting
I_DATLO = sy-datum
I_TIMLO = sy-uzeit
importing
E_TIMESTAMP = tstamp.
if ACCOUNT is selected then
concatenate 'Rev_srv_com_' tstamp '.dat' into filename.
else if SERVICE is selected then
concatenate 'Rev_srv_com_' tstamp '.dat' into filename.
the filename variable will be containing ur required file name..
reward points if useful.... -
F4 help values in selection screen
Hi,
We have a requirement in our project where the client wants to see sorted values for an info-object when he sees the F4 help for it in the selection screen of a query executed on web.
Is there any way we can show sorted values??
Waiting for replies..Thanks in advance.Hello Bhavisha,
try to set up the data provider specific setting. You can found it in the data provider dimensions on every characteristic (right mouse click). Here you can choose the display type (key or text or both or ...)
If you choose key, key will be sorted. If you choose text, text should be sorted.
Buy,
André -
Hi,
I have req callled ,I have two parameters statements.
If I givr wrong entry in first parameter statement it has to show error messag and other option should go for display mode.
With warm regards,
khadar.Hi pls check out this,
Selection screen then it is possible.
for that you have to use AT SELECTION-SCREEN output. event..
See the below code and use it according to your requirement.
======================================
tables: pa0000, pa0001.
parameters: p_rad1 radiobutton group rad1 default 'X' user-command rusr,
p_rad2 radiobutton group rad1.
selection-screen: begin of block blk1 with frame.
select-options: s_pernr for pa0000-pernr modif id ABC.
selection-screen: end of block blk1.
selection-screen: begin of block blk2 with frame.
select-options: s_stat2 for pa0000-stat2 modif id DEF.
select-options: s_werks for pa0001-werks modif id DEF.
selection-screen: end of block blk2.
AT SELECTION-SCREEN output.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = 'ABC'.
IF p_rad1 = 'X'.
SCREEN-ACTIVE = 1.
ELSE.
SCREEN-ACTIVE = 0.
ENDIF.
MODIFY SCREEN.
ENDIF.
IF SCREEN-GROUP1 = 'DEF'.
IF p_rad2 = 'X'.
SCREEN-ACTIVE = 1.
ELSE.
SCREEN-ACTIVE = 0.
ENDIF.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
=====================================
with regards,
Hema.
pls reward if helpful. -
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 -
Help on the selection screen.....Select-options default values
Dear Friends,
We have one requirement,i.e. In Report program i am using select-option once will execute the program ALV report will be generated.In ALV Report we have one button like 'WM DATA'.Once click the WMDATA one pop-up is displaying...In that pop-up also same select-options are there upto here it's working fine...Now my problem is on pop-up select-options i have to display by default..... which i am using on report select-options values.
Please help on the same
Thank You.Do like this. Before calling your next screen assign the select option value or just assign the value in start of selection only.
tables
:lqua.
SELECT-OPTIONS:
s_lgnum FOR lqua-lgnum MODIF ID sc1 OBLIGATORY,
s_lgtyp FOR lqua-lgtyp MODIF ID sc1.
SELECTION-SCREEN BEGIN OF SCREEN 300 .
SELECT-OPTIONS : s_lgnum1 FOR lqua-lgnum OBLIGATORY,
s_lgtyp1 FOR lqua-lgtyp OBLIGATORY.
SELECTION-SCREEN END OF SCREEN 300.
START-OF-SELECTION.
s_lgnum1[] = s_lgnum[].
s_lgtyp1[] = s_lgtyp[].
call SELECTION-SCREEN 300. -
F4 - Help in BI Selection screen
Dear all,
after the installation of SP14, the F4 help in the BI selection screen fit not to our theme settings any more. The background colour switched from our defined colour green to the SAP standard colour blue.
Where can I change that back?
Thanks a lot for your help.
Best regards
Andreas BoekhoffHi,
May I know, on what logic you want to display selection values?
One way to achieve that is to restrict values in query, this will display your query result with only restricted value. But it will show all values in selection.
Another option can be of using authorization, user will see only his authorized values in the selection.
If you can describe your requirement in more details, more help can be provided.
Regards,
Ashish -
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
-
DVD DL fail to burn AND Firewire 400/800 problems
I have had several months of intermittent DVD burn fails. Most recently today burning from the finder and it is now reporting "The disc can't be burned because because communication between the computer and the disc drive failed (error code 0x8002002
-
Upload PDF to DMS using FTP server in WD abap
Hi Friends, I want to upload PDF file from presentation server to DMS. As I dont want application server in this regards , so am using FTP server instead. But the problem am facing is in WD abap the filepath is in XSTRING format. So how to uploa
-
HT1926 Have you gotten the error "a program required for this install could not be run"
Whenever I try to install iTunes on my Windows 7 PC, I get the error" a program required for this install could not be run". Any ideas?
-
FTP Access through router.
Hello, I am trying to set up a simple ftp server to exchange files with my friends in other cities. When i start the service (FTP Access) it gives me this link: ftp://192.168.0.3/ However this ip is the internal ip address i use to connect with my wi
-
Email photo attachments are getting visually compressed in the vertical. Cause?
My Email photo attachments are getting visually compressed in the vertical. Squashed as it were. Does anyone know thw cause?