Variants for AT SELECTION-SCREEN..
how many variants r there for AT SELECTION-SCREEN event???
like AT SELECTION-SCREEN OUTPUT
AT SELECTION SCREEN ON FIELD
howmany r thr??
and can any1 explain the usage of these completely wid examples??
regards
ziden
Hi,
Sorry. I think You wanted the events.
At Selection-screen output. This will firs, just before all the fields are displayed on the screen. For eg: you have something like:
selecttion-screen: begin of blk1.
parameters: p_name(20).
select-options: s_bukrs for t001-bukrs.
selection-screen: end of blk1.
at selection-screen output.
if sy-uname = 'ABS'.
p_name = 'MANAGER'.
If you have specified a select-options and you want to validate it, use
at selection-screen on s_bukrs-low.
select single bukrs into s_bukrs-low from t001.
Similarly, there is at selection-screen on value request for (fld-name).
at selection-screen on help request for (fld_name).
regards
Subramanian
Similar Messages
-
How to create a variant for a selection screen button
hi ,
i have created a selection screen for a normal report .
In the selection screen there is one button after the selct option for company code. when user enters some company code and presses the button the user i call a able contraol in which user gives some additional values for the comapny code.
how do i create variant. when i create varaint for the slection screen it does not take into account the other screen i called .
so every time user has to click that button and enter some values and execute. please suggest some way.
THANKX IN ADAVANCE:)Hi,
Inorder to create a variant for selection screen report, you need to enter valid data on the screen and click on the SAVE button which is available in the Menu.
And regarding the button you were asking about after select option, it is not created manually it comes automatically,, you can remove this by mentioning no-extension after the select-option. You can get clear information of this if you do F1 help on select-option.
My advice to you, make effect use of F1 help.
Edited by: Madhuri on Sep 23, 2008 4:46 PM -
To create a variant for a selection screen having invisible fields
Hello All
I am facing a peculiar problem. I have a screen for the program RSEIDOCB in which the following fields are hidden:
TAOUTPR FOR EDIDC-STATUS NO-DISPLAY,
STAINPR FOR EDIDC-STATUS NO-DISPLAY,
STAOUTRS FOR EDIDC-STATUS NO-DISPLAY,
STAINTA FOR EDIDC-STATUS NO-DISPLAY,
STAOUTES FOR EDIDC-STATUS NO-DISPLAY,
STAINTD FOR EDIDC-STATUS NO-DISPLAY,
STAOUTST FOR EDIDC-STATUS NO-DISPLAY,
STAOUTDT FOR EDIDC-STATUS NO-DISPLAY,
STAINBK FOR EDIDC-STATUS NO-DISPLAY,
STAOUTEI FOR EDIDC-STATUS NO-DISPLAY,
STAINEI FOR EDIDC-STATUS NO-DISPLAY,
STAOUTEX FOR EDIDC-STATUS NO-DISPLAY,
STAINEA FOR EDIDC-STATUS NO-DISPLAY,
STAOUTDS FOR EDIDC-STATUS NO-DISPLAY,
STAINDS FOR EDIDC-STATUS NO-DISPLAY.
I want to create a variant for the above program having values for the fields. These fields are basically for specifying the various status of the idocs. I am unable to do to so at the moment. Please help me out. Suitable points will be provided.
Regards
AnkitHi Ankit
Follow these steps..
1. in SE38 enter Program name 'RSEIDOCB'.
2. Click on variants button
3. enter variant name click on create
4. in selection screen enter default values
5. Click on attributes
4. Enter meaning
5. Press Shft + F4
6. Bottom of Screen will popup invisible fields
7. go down to screen
8. select field and click on selection variables button
(you to have to tick selection variable check box)
9. here click on down arrow button very next to field
10.you can choose values from list and assign to field.
then save variant.
Message was edited by:
Perez C -
Show the drop down list of variant on the selection screen in ALV reports
Hi,
i have a alv report when i execute this display will come and then i click display layout it save as a variant on the selection screen and when i go back to selection screen and press f4 on the display variant its show the drop down list of varient.
can u send me some code for this functionality...its very urgent.
thanks!
VipinHi,
try inserting this code apropietly in you program. (1 parameter + Initialization + At-selection-screen + 2 forms)
START HERE
PARAMETERS: pa_vari TYPE disvariant-variant.
INITIALIZATION.
g_repid = sy-repid.
CLEAR e_variant.
e_variant-report = sy-cprog.
e_variant-username = sy-uname.
CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
i_save = 'A'
CHANGING
cs_variant = e_variant
EXCEPTIONS
not_found = 2.
IF sy-subrc = 0.
pa_vari = e_variant-variant.
ENDIF.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR pa_vari.
PERFORM alv_variant_f4 CHANGING pa_vari.
*& Form ALV_VARIANT_F4
FORM alv_variant_f4 CHANGING pa_vari.
DATA: l_exit(1) TYPE c.
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = e_variant
i_tabname_header = 'ANYTHING'
i_save = 'A'
IMPORTING
e_exit = l_exit
es_variant = e_variant
EXCEPTIONS
not_found = 2.
IF sy-subrc = 2.
MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
IF l_exit = space.
pa_vari = e_variant-variant.
ENDIF.
ENDIF.
ENDFORM. " ALV_VARIANT_F4
END
Hope iy helps!
Alfonso -
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 -
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 -
Variant in ALV selection screen
Hi friends,
How to protect a variant in ALV selection screen from changing or deleting by other users.
Thanks,
RajeshRajesh,
You still need someone to be able to change the variant, right? That is what exactly PROTECT VARIANT does.
If you select the field Protect variant, the variant can only be changed by the person who created it or last changed it.
Regards,
Ravi
Note :Please mark the helpful answers and close the thread if the quesiton is answered -
Need a drop down for a selection screen
HI all,
I need a drop down for a selection screen.
say for eg: Field is MARA-MTART (Material Type). The selection is optional and the dropdown should be using check table: T134
How to get a dropdown? I think a function module is used , but I dont remember the name.
Kindly reply.
Thanks in advance.
Points will be rewardedHi,
chk the below code...
TYPE-POOLS: vrm.
PARAMETER: pr_spart TYPE spart AS LISTBOX VISIBLE LENGTH 7.
*AT SELECTION-SCREEN ON VALUE-REQUEST FOR pr_spart.
INITIALIZATION.
*----Code for Drop down list....
DATA: lit_spart_list TYPE vrm_values, "Table for list of Divisions
lwa_spart_list TYPE vrm_value,
lw_name TYPE vrm_id. "Name of parameter with list-box.
*---Assign selected values to table that would be passed to FM VRM_SET_VALUES
CLEAR : lwa_spart_list,
lw_name.
*---Pass required values for list-box display.
lwa_spart_list-key = 'H'.
lwa_spart_list-text = 'HL'.
APPEND lwa_spart_list TO lit_spart_list.
lwa_spart_list-key = 'S'.
lwa_spart_list-text = 'SL'.
APPEND lwa_spart_list TO lit_spart_list.
lwa_spart_list-key = 'P'.
lwa_spart_list-text = 'PP'.
APPEND lwa_spart_list TO lit_spart_list.
lwa_spart_list-key = 'F'.
lwa_spart_list-text = 'FR'.
APPEND lwa_spart_list TO lit_spart_list.
*Name of parameter to which list is to be assigned
lw_name = 'PR_SPART'.
CALL FUNCTION 'VRM_SET_VALUES'
EXPORTING
id = lw_name
values = lit_spart_list
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.
Reagrds,
nagaraj -
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 -
Variants for module pool screena
Hi,
I tried creating a variant for module pool screen by using the FM : RS_CREATE_VARIANT.
For this i created a dummy report which has the same parameters as the fields in the screen.
CALL FUNCTION 'RS_VARIANT_CONTENTS'
EXPORTING
report = gc_dummy_rep
variant = 'variant5'
MOVE_OR_WRITE = 'W'
NO_IMPORT = ' '
EXECUTE_DIRECT = ' '
IMPORTING
SP =
tables
L_PARAMS =
L_PARAMS_NONV =
L_SELOP =
L_SELOP_NONV =
valutab = lt_params
OBJECTS =
FREE_SELECTIONS_DESC =
FREE_SELECTIONS_VALUE =
EXCEPTIONS
VARIANT_NON_EXISTENT = 1
VARIANT_OBSOLETE = 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.
but when i try to retrieve the values stored in the variant using FM : RS_VARIANT_CONTENTS.
CALL FUNCTION 'RS_VARIANT_CONTENTS'
EXPORTING
report = gc_dummy_rep
variant = 'variant5'
MOVE_OR_WRITE = 'W'
NO_IMPORT = ' '
EXECUTE_DIRECT = ' '
IMPORTING
SP =
tables
L_PARAMS =
L_PARAMS_NONV =
L_SELOP =
L_SELOP_NONV =
valutab = lt_params
OBJECTS =
FREE_SELECTIONS_DESC =
FREE_SELECTIONS_VALUE =
EXCEPTIONS
VARIANT_NON_EXISTENT = 1
VARIANT_OBSOLETE = 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.
I get an error message : variant5 not found.
is there anything that i miss here?
or is the way i use to create variant for module pool screen not right?
Regards,
KaminiHi,
To avail save variant option in module pool screen,
1. You need to create a data base table similar to INDX table with the fields RELID, VARI_NAME
PROG_NAME
UNAME
SRTF2, MEMORYID, CLUSTR, CLUSID. And the remaining fields can be anything.
2. Enable the Save button in the Function keys part of GUI Status. And Add a push button for Get variant.
3. When Save button clicked call a screen with a single field for variant (let us say g_var). After g_var entered, in the PAI of the initial screen export all the screen values to the created database index using the statement .
EXPORT: g_characteristics_tab TO DATABASE zav0257(ch) ID g_var,
s_auart TO DATABASE zav0257(au) ID g_var.
So that the values will be exported to database.
Then update the fields(VARI_NAME,PROG_NAME,UNAME) of the database table using modify from work area.
So that you will have the history of variance existence.
4. Next time , when the user clicks on Get Variant option, call another screen to enter the variant name. Then import the values for that variant from the memory id in the database table.
It worked for me. -
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 -
Variants on tabbed selection screen for ALV reports
Scenario: We use a tabbed selection screen for an ALV report. We create a variant, make a selection field on the second tab mandatory & save it without a value. When we run the report with the saved variant it does not check that the required field on the second tab is populated before it executes.
Question: How can I code such a check?
Edited by: Alridge Tom on Jul 4, 2008 3:43 PMHi,
try inserting this code apropietly in you program. (1 parameter + Initialization + At-selection-screen + 2 forms)
START HERE
PARAMETERS: pa_vari TYPE disvariant-variant.
INITIALIZATION.
g_repid = sy-repid.
CLEAR e_variant.
e_variant-report = sy-cprog.
e_variant-username = sy-uname.
CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
EXPORTING
i_save = 'A'
CHANGING
cs_variant = e_variant
EXCEPTIONS
not_found = 2.
IF sy-subrc = 0.
pa_vari = e_variant-variant.
ENDIF.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR pa_vari.
PERFORM alv_variant_f4 CHANGING pa_vari.
*& Form ALV_VARIANT_F4
FORM alv_variant_f4 CHANGING pa_vari.
DATA: l_exit(1) TYPE c.
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = e_variant
i_tabname_header = 'ANYTHING'
i_save = 'A'
IMPORTING
e_exit = l_exit
es_variant = e_variant
EXCEPTIONS
not_found = 2.
IF sy-subrc = 2.
MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
IF l_exit = space.
pa_vari = e_variant-variant.
ENDIF.
ENDIF.
ENDFORM. " ALV_VARIANT_F4
END
Hope iy helps!
Alfonso -
Dynamic variant calling multiple selection screens
Hi all,
The concerned issue is that i am trying to execute a report( which on execution throws a selection screen) from a program using 'submit' statement passing a variant. along with it iam creating a dynamic varinat using FM RS_CREATE_VARIANT, the variant is being made, but on execution , the program throws an error meassage " invalid variant called'.
This is because the varinat is calling multiple screens , although only one screen number is passed in teh FM,( screen no 0170).
Please tell me the possible solution fr this .
Cheers,
Thanks in advance.Hi,
first try to pass only the static variant with the submit statement and c whether its working properly.
and than check for dynamic variant..
c the difference and let me know what happens ??
thanks
ravi aswani -
Job for specific selection-screen
hi,
i have multiple screens in tabstrip. when background job, variant for screen other than the default unable to generate. but if i manually call (not via background job), output can be generated as i can choose screen to run.
may i know how to make the background job can run every single screen base on the variant value. if the variant value for screen 1, then background job can generate output for screen 1 selection screen. if variant value for screen 2, then background job can generate output for screen 2 selection screen.
thankshi,
i have multiple screens in tabstrip. when background job, variant for screen other than the default unable to generate. but if i manually call (not via background job), output can be generated as i can choose screen to run.
may i know how to make the background job can run every single screen base on the variant value. if the variant value for screen 1, then background job can generate output for screen 1 selection screen. if variant value for screen 2, then background job can generate output for screen 2 selection screen.
thanks -
How can one save variants for module pool screens.
hai all,
i have done a module pool screen for taking information from user..later i leave to list processor and give a report to the user.
i am testing the program with many input parameters.i don't want to enter the values each time i execute the program.can i not save a variant like i save for normal abap editor programs?
any other solution ?Hii..
Variants can be created in Selection Screen only...
For ur Scenario:
To leave to the list use the Statements
<b>LEAVE TO LIST-PROCESSING And return .</b>
then the Data will be automatically retained.
<b>Reward if Helpful</b>
Maybe you are looking for
-
Interactive button in Photoshop
Hi. Using Photoshop CS6 on a MacBook Pro. I know you can design a button in Photoshop, but can you create one that is also interactive? Say if you wanted to do an animation in Photoshop and you wanted a button to go to the next part of the animation?
-
How could I know if a system root is a CD-ROM? I searched all the api, I got close when I found FileSystemView let me know the name of the volume, but I have not find how to know if it is a CD-ROM. Can some one help me?
-
Error While working with 2 hierarchy
Hi Experts - While working with 2 hierarchy variable and 2 node variables my webi report not returing any data. But in RSRT i got data... Where could be a problem. Any Inputs.
-
Hyperion Shared Services and DB Userid
Hi, When we create a DB userid for Hyperiion Shared services, do we need to tie this userid to a separate tablespace (like hss_data and hss_index). Thanks
-
Stop Download Of Songs To Iphone
I was out the other night & as you do after a few beers I started messing about with my phone & I decided to download all of my music to my phone. Bad news, I have 10,000 tunes in my library & according to Apple support there is no way to stop them d