Dinamic variant for selection screen
Hi,
I got a requirement where i need a Dynamic variant for selection screen .There is a date field in the selection screen i want to create a variant such that when i choose it,it should give the current day date in selection screen.can anyone help me.
Regards,
Ravi
Hi,
Using Customer Exit code you can give it.
Create a Customer Exit Variable and write simple code in CMOD. See the usefull Exit code for reports in the following url.
https://wiki.sdn.sap.com/wiki/display/profile/Surendra+Reddy
WHEN 'ZV_DAT'.
IF i_step = 1 .
CLEAR l_s_range.
l_s_range-low = sy-datum.
l_s_range-opt = 'EQ'.
l_s_range-sign = 'I'.
APPEND l_s_range TO e_t_range.
ENDIF.
Thanks
Reddy
Similar Messages
-
How to create variant for selection screen which is in subscreen
Hi,
How to create variant for selection screen which is in subscreen in a module pool program?
it is very urgent.
Thanks in advance.Hi,
You can create the 'Parameter Transaction' so that whenever you run the particular transaction it will run with the initial value given when the Tcode was created and hence you can skip the initial screen of the module pool program.
To create Parameter transaction from SE93 you have to choose the last option i.e Parameter Transaction.
Regards
Sudheer -
How to set default variant for selection screen
Hi,
I want to make one variant as default for selection screen for one user.
For eg., take COOIS. For the selection screen, i have 3 variants. But i want one variant to be default. Thsi is not for all users. Thsi is for particular user.
I am not seeing any way to do this. please help me..
Thanks
SriniHi,
If you are using Z program then you can ask your developer to get Variant name Runtime from Parameter ID.
This means you decide a Parameter ID name : ZVAR in your Z program and ask your developer to load variant each time your Z program loads.
Now, second step will be using SU01 transaction you can set value of ZVAR in Parameters tab for the user. This value will be the variant which you created for this user.
This will solve your problem and you can make n number of variants and assign it to different users.
Regards,
Arpit -
Transaction Variant for Selection Screen
Hi, experts!
A question regarding transaction variants: Is it possible to create screen variants and transaction variants via SHD0 for selection screens? I' ve created a customer report with one selection screen including parameters and select options and would like to provide the users with a variant transaction for this.
Utilizing the "Save as variant" option from the selection screen itself works out perfectly, but this variant cannot be transported. And trying to create a transaction variant via SHD0 fails because values entered in the selection screen parameters and select options help screens are not saved and presented.
Any hints are more than welcome!
Regards,
ThomasYou wrote
Utilizing the "Save as variant" option from the selection screen itself works out perfectly, but this variant cannot be transported.
But, give the variant a name beginning with "CUS&" and this variant will be transported. Variant beginning with "CUS&" or "SAP&" are so-called "system variant" and are transported automatically. You can then copy the transaction code and use this new variant in the new transaction.
Regards,
Raymond -
Variant for selection screen with the Table control entries in another Tab
Hi Guys,
The requirement is to create a variant for the two tabs on a selection screen.
First tab contains the select options and the second contains table control for making entries.
So will it be possible to create a variant when the user makes entries in the fields in one tab and the table on other tab?You wrote
Utilizing the "Save as variant" option from the selection screen itself works out perfectly, but this variant cannot be transported.
But, give the variant a name beginning with "CUS&" and this variant will be transported. Variant beginning with "CUS&" or "SAP&" are so-called "system variant" and are transported automatically. You can then copy the transaction code and use this new variant in the new transaction.
Regards,
Raymond -
Loading user defined variants for selection screens
hi everybody,
i want to add a feature to my report which automatically loads a variant for a report.just like iw38, where the variant for the main selection-screen is automatically set when you name it like "U_<username>". sadly i couldnt find anything helpful by debugging the report.
is there a certain function module to load specific screen-variants?
thanks,
dspHi dsp,
There is a table
VARID - Variant directory.
it consists of all the variants according to the user name, date & time.
You can do something like this,
data: it_variant type standard table of varid,
wa_variant type varid.
Initialization.
select * into corresponding fields of table it_variant
from varid
where report = sy-repid
and ename = sy-uname.
sort it_variant descending by edat etime.
delete adjacent duplicates from it_variant comparing ename.
loop at it_variant into wa_variant.
*CLEAR W_VARIANT.
*W_VARIANT = wa_variant.
CALL FUNCTION 'RS_SUPPORT_SELECTIONS'
EXPORTING
report = sy-repid
variant = wa_variant-variant
EXCEPTIONS
VARIANT_NOT_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.
endloop.
Hope it helps you,
Regards,
Abhijit G. Borkar -
Adding layout variant to selection screen
Hi all,
Currently I am working on report program, where I have to allow user to select his own output pattern. i.e layout variant is to be added to selection screen. The report uses object oriented ALV for display purpose. [set_table_for_first_display]
I made following steps,
1. Declared one parameter of type disvariant.
2. At selection-screen on value-request I called function REUSE_ALV_VARIANT_F4.
3. Passed internal table to method set_table_for_first_display.
Now I am able to create save new variant, on selection screen I can select the variant that I have created, but output shows the all the fields though
Only few are selected. Please tell me any modification so as to reflect the changes in output.
I am searching for a function which maintains fieldcat according to user defined variant.
Regards,
Nilesh kulkarni.U have to use REUSE_ALV_VARIANT_EXISTENCE inorder to use the layout u have selected
After ur code of REUSE_ALV_VARIANT_F4.
try this way
AT SELECTION-SCREEN.
PERFORM PAI_OF_SELECTION_SCREEN.
G_REPID = SY-REPID.
G_SAVE = 'A'.
FORM PAI_OF_SELECTION_SCREEN .
IF NOT P_LAYOUT IS INITIAL.
MOVE G_VARIANT TO GX_VARIANT.
MOVE P_LAYOUT TO GX_VARIANT-VARIANT.
CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
EXPORTING
I_SAVE = G_SAVE
CHANGING
CS_VARIANT = GX_VARIANT.
G_VARIANT = GX_VARIANT.
ELSE.
PERFORM VARIANT_INIT.
ENDIF.
ENDFORM. " PAI_OF_SELECTION_SCREEN
FORM variant_init .
CLEAR G_VARIANT.
G_VARIANT-REPORT = G_REPID.
ENDFORM. " variant_init
Then when u call ALV for display, pass ur display variant, in this case = g_variant
Reward if useful
Cheers
~Arun
Message was edited by:
Arun Shekhar -
How to set Variant as selection-screen
I have a variant i want to set that variant as selection-screen can anyone please tell me how to do that
Hi Pradeep,
What is your requirement?
If you just want to create the variant for the selection screeen, then after entering the values on selection screen just press SAVE button.
Regards,
Atish -
Variants without Selection Screen
Hi,
if i have a normal Dynpro Screen, and no selection screen, how can i then use the Variants of SAP? I found some FM like RS_CREATE_VARIANT but this does not work. The coding of these Variant helpers always try to read out the fields from the report. But my report has no fields, because it is a dynpro screen and no selection screen.
Do you know if i can use variants for dynpros?
ThanksHi Johnny,
You can create Transaction Variants using SHD0 transaction.
Have a look at the below SAP link:-
[Transaction Variants and Screen Variants |http://help.sap.com/erp2005_ehp_03/helpdata/EN/5b/7bc3895d1111d295ad0000e82de14a/frameset.htm]
Also Have a look at the below wiki :-
[Creating variants for custom screens|Creating variants for custom screens;
<removed by moderator>
Regards
Abhii
Edited by: Thomas Zloch on Sep 1, 2010 5:56 PM - please leave this to the original poster -
Code for selection screen, urgent
Hi Everyone,
I need code for selection screen.
I have four radio buttons, p1, p2,p3,p4(assume)
If I select second radiobutton, remaining three radiobuttons should be in disable mode and also the information under them should be in disable mode. Give the coding details. Thanks in advance. U will be rewarded.
Regards,
NagarajuHi,
REPORT ZTEST222 .
PARAMETERS : p_add RADIOBUTTON GROUP radi
USER-COMMAND radio MODIF ID MOD,
p_disp RADIOBUTTON GROUP radi DEFAULT 'X' MODIF ID pod,
p_chng RADIOBUTTON GROUP radi MODIF ID rad,
p_er_log RADIOBUTTON GROUP radi MODIF ID cod.
SELECT-OPTIONS : s_idn FOR vendor MODIF ID mod,
s_pcode FOR ws_c_pcode MODIF ID pod.
PARAMETERS: p_plant LIKE zaw_pol_plan-plant MODIF ID rad,
p_zzvend LIKE zaw_pol_plan-zzvendor MODIF ID cod.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF p_add EQ 'X'.
IF screen-group1 EQ 'MOD'.
screen-active = 1.
MODIFY SCREEN.
ELSE.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
IF p_disp EQ 'X'.
IF screen-group1 EQ 'POD'.
screen-active = 1.
MODIFY SCREEN.
ELSE.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
IF p_chng EQ 'X'.
IF screen-group1 EQ 'RAD'.
screen-active = 1.
MODIFY SCREEN.
ELSE.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
IF p_er_log EQ 'X'.
IF screen-group1 EQ 'COD'.
screen-active = 1.
MODIFY SCREEN.
ELSE.
screen-active = 0.
MODIFY SCREEN.
ENDIF.
Pls. reward if useful
ENDLOOP.
Pls. reward if useful -
How to write HTML code in Web Template for selection screen
Hello All,
Is it possible to write a html code in the web template html tag so that the output of the html is displayed in the selection screen, i.e before the execution of query.
I know that we can write html, which will be displayed once the query has been executed, but can it be done for selection screen.
if so, how.
My exact requirement is : to display a 2-3 lines of text in the selection criteria screen - sort of, various options available to user for entering values in the selection screen. I was thinking of putting this text using HTML code in the selection screen.
Regards,
Nagendra.Hi Erick,
No, unfortunately nobody replied to this thread. So i assumed it is not possible to modify the selection screen thru html code.
Btw, as my requirement was to provide user with multiple answers on the selection screen. I did the validations on customer exit and popped an errror dialog when applicable.
Regards,
Nagendra. -
Change default value (200) of Max No of Hits for selection screen in WAD
How do i change the default value of Maximum Number of Hits from 200 to 1000 for selection screen's find box in Web Application Designer .
Thanks in Advance
Points will be surely RewardedDear Hammad,
Please refer to the wiki created by me,
http://wiki.sdn.sap.com/wiki/display/BI/Information+on+the+user+setting+for+the+selector+dialog
Regards,
Arvind -
Global Variable for selection screen variable
Hi All,
We need to create a report where calendar day has to be included in the selection screen.Later after executing the report we should be able to retrieve the selection screen input for calendar day and modify it and use the modified one for other calculations.Can somebody help me out in finding the global variable in the variable exit where we find all the inputs for selection screen variables....
Regards,
Shravanishravani,
I_vnam will store the varaible names...if you have varaible in the query...
please use this code for ur help...
DATA: ww_der_date LIKE sy-datum,
wzdate LIKE sy-datum,
wzact_gi_dte TYPE /bi0/oiact_gi_dte.
wzact_gi_dte = sy-datum.
IF i_step = 2.
READ TABLE i_t_var_range INTO wa_i_t_var_range WITH KEY vnam =
'ZNODAYS'.
ww_der_date = sy-datum - wa_i_t_var_range-low.
CLEAR wa_i_t_var_range.
IF i_vnam = 'ZVAGIDCUSTEXIT'.
CLEAR l_s_range.
l_s_range-low = ww_der_date .
l_s_range-high = wzact_gi_dte.
l_s_range-sign = 'I'.
l_s_range-opt = 'BT'.
APPEND l_s_range TO e_t_range.
CLEAR l_s_range.
ENDIF.
ENDIF.
in this case user will enter no.of days in ZNODAYS and that being is used in calculation and used in the next varaible.... -
Default value for selection screen field
Hi all,
I am using LDB PNPCE. I want to give default value for field Personnel area on selection screen.
How can I do it?
Thanks
RahulHi Rahul,
In the INITIALIZATION event we can set the default values for selection screen fields.
INITIALIZATION.
loop at screen.
if screen-name = 'S_MATNR-LOW'.
CLEAR S_MATNR.
s_matnr-low = '1234'.
s_matnr-option = 'EQ'.
s_matnr-sign = 'I'.
append s_matnr.
CLEAR S_MATNR.
s_matnr-high = '5678'.
s_matnr-option = 'EQ'.
s_matnr-sign = 'I'.
append s_matnr
clear s_matnr.
endif.
endloop.
Hope it helps.
Mark if useful
Regards,
Saumya -
How to create a variant for a screen (not a selection screen)
Hi
I foud a function module RS_CREATE_VARIANT.
Is this the correct fm for creating screen variant, if yes then pls provide me some help about how to pass values to this fm.
if not then pls help me to find out new one.
thnks
satisfactory answer will be definitely rewarded.
S@meerpassing values to RS_CREATE_VARIANT.
data : LS_VARIANTDESC TYPE VARID.
DATA : LT_VARIANTTEXT TYPE TABLE OF VARIT ,
WA_VARIANTTEXT TYPE VARIT.
DATA : TT_REPORTPARAM TYPE TABLE OF RSPARAMS,
WA_REPORTPARAM TYPE RSPARAMS.
CLEAR LS_VARIANTDESC.
LS_VARIANTDESC-MANDT = SY-MANDT. " gr 46A
LS_VARIANTDESC-REPORT = 'ZXXXXX'.
LS_VARIANTDESC-VARIANT = 'VARIANT'.
LS_VARIANTDESC-EDAT = SY-DATUM.
LS_VARIANTDESC-ETIME = SY-UZEIT.
REFRESH LT_VARIANTTEXT.
CLEAR WA_VARIANTTEXT.
WA_VARIANTTEXT-MANDT = SY-MANDT. " gr 46A
WA_VARIANTTEXT-LANGU = SY-LANGU.
WA_VARIANTTEXT-REPORT = 'ZXXXXXX'.
WA_VARIANTTEXT-VARIANT = 'VARIANT'.
APPEND WA_VARIANTTEXT TO LT_VARIANTTEXT.
CALL FUNCTION 'RS_CREATE_VARIANT'
EXPORTING
CURR_REPORT = 'ZXXXXX'
CURR_VARIANT = 'VARIANT'
VARI_DESC = LS_VARIANTDESC
TABLES
VARI_CONTENTS = TT_REPORTPARAM
VARI_TEXT = LT_VARIANTTEXT
EXCEPTIONS
ILLEGAL_REPORT_OR_VARIANT = 1
ILLEGAL_VARIANTNAME = 2
NOT_AUTHORIZED = 3
NOT_EXECUTED = 4
REPORT_NOT_EXISTENT = 5
REPORT_NOT_SUPPLIED = 6
VARIANT_EXISTS = 7
VARIANT_LOCKED = 8
OTHERS = 9.
IF SY-SUBRC EQ 7.
If variant with same name already exists, change variant
CALL FUNCTION 'RS_CHANGE_CREATED_VARIANT'
EXPORTING
CURR_REPORT = 'ZXXXXX'
CURR_VARIANT = 'VARIANT'
VARI_DESC = LS_VARIANTDESC
TABLES
VARI_CONTENTS = TT_REPORTPARAM
EXCEPTIONS
ILLEGAL_REPORT_OR_VARIANT = 1
ILLEGAL_VARIANTNAME = 2
NOT_AUTHORIZED = 3
NOT_EXECUTED = 4
REPORT_NOT_EXISTENT = 5
REPORT_NOT_SUPPLIED = 6
VARIANT_DOESNT_EXIST = 7
VARIANT_LOCKED = 8
SELECTIONS_NO_MATCH = 9
OTHERS = 10.
ELSEIF SY-SUBRC NE 0.
MESSAGE WITH 'Cannot create/change variant for'
SY-UNAME.
ENDIF.
Maybe you are looking for
-
FAQ: Where can I learn more about the SpeedGrade interface?
The SpeedGrade interface can be confusing if you don't know where to look. See this video tutorial by Patrick Inhofer for a full tour of the SpeedGrade CC interface.
-
Search Incremental Crawl is not getting triggered at the scheduled time.
Hello All, Since 1 week i am observing that the incremental crawl is not getting triggered on the scheduled day & time but the next schedule is moving to next day. Let me put down in a detail. Content Incremental crawl is scheduled to run daily at 5.
-
Ok Now this may seem to be a little stupid but heres my problem: I need to integrate a Crystal Report in my Java Application and I have no idea what so ever how to do it. Here's the case: I have a Form in my application that receives various details
-
Error custom-installing 10.3.181.34
For a while now, I've had 10.1.102.64 installing via GPO and using a .mst to place the mms.cfg and a trusts.cfg. Today, I downloaded the .msi for 10.3.181.34 from http://www.adobe.com/products/flashplayer/fp_distribution3.html. Whenever I try to pus
-
I am using a PC with Windows 7, and like I said, the other browser seems to be working just fine. I just MISS my passwords and really don't want to go through all the work and trouble of requesting new ones from ALL the sites I use passwords for ! Pl