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
Similar Messages
-
Dynamic variant calling multiple 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 -
Hi!
I've set up an initial screen (selection screen) in my dynpro-program, with company code (BUKRS) as input field. This screen has been developed using the Screen Painter and is of the screen type 'Normal'.
I have managed to add a search help to the input field, but how can I <b>add a multiple selection screen</b> to it?
Thank you for all your help!
- Mari VirikHI,
Create button beside BUKRS field.
and use FM <b>K_CMPERS_MULTIPLE_SELECTION</b> when the button is pressed.
this FM provides u a multiple selection screen. Use 'R' for Fieldtype.
data: parm like cmpersdata occurs 0.
call screen 300.
*& Module USER_COMMAND_0300 INPUT
text
module USER_COMMAND_0300 input.
case sy-ucomm.
when 'MULT'.
CALL FUNCTION 'K_CMPERS_MULTIPLE_SELECTION'
EXPORTING
p_fieldtype = 'R'
p_fieldname = 'MATNR'
p_tablename = 'MARA'
tables
pt_parm = parm
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endcase.
endmodule. " USER_COMMAND_0300 INPUT
Regards
CNU -
How to disable the SELECT-OPTINS multiple selection screen's Ranges options
Hi this is sekhar,
I have used the Select-options: statement with 'No-Interval' option. Now I need to restrict the user not to enter the values in the Ranges column of multiple selection screen. How can I do it....You can also refer this code as below : CHECK OUT SELECT OPTION sel_1_0.
*& Report ZTESTREP
REPORT ztestrep.
Include type pool SSCR
TYPE-POOLS sscr.
Define the object to be passed to the RESTRICTION parameter
DATA restrict TYPE sscr_restrict.
Auxiliary objects for filling RESTRICT
DATA opt_list TYPE sscr_opt_list.
DATA *** TYPE sscr_***.
Define the selection screen objects
First block: 3 SELECT-OPTIONS
SELECTION-SCREEN BEGIN OF BLOCK block_0 WITH FRAME TITLE text-bl0.
SELECT-OPTIONS sel_0_0 FOR sy-tvar0.
SELECT-OPTIONS sel_0_1 FOR sy-tvar1.
SELECT-OPTIONS sel_0_2 FOR sy-tvar2.
SELECT-OPTIONS sel_0_3 FOR sy-tvar3.
SELECTION-SCREEN END OF BLOCK block_0.
Second block: 2 SELECT-OPTIONS
SELECTION-SCREEN BEGIN OF BLOCK block_1 WITH FRAME TITLE text-bl1.
SELECT-OPTIONS sel_1_0 FOR sy-subrc.
SELECT-OPTIONS sel_1_1 FOR sy-repid.
SELECTION-SCREEN END OF BLOCK block_1.
INITIALIZATION.
Define the option list
ALL: All options allowed
MOVE 'ALL' TO opt_list-name.
MOVE 'X' TO: opt_list-options-bt,
opt_list-options-cp,
opt_list-options-eq,
opt_list-options-ge,
opt_list-options-gt,
opt_list-options-le,
opt_list-options-lt,
opt_list-options-nb,
opt_list-options-ne,
opt_list-options-np.
APPEND opt_list TO restrict-opt_list_tab.
NOPATTERN: CP and NP not allowed
CLEAR opt_list.
MOVE 'NOPATTERN' TO opt_list-name.
MOVE 'X' TO: opt_list-options-bt,
opt_list-options-eq,
opt_list-options-ge,
opt_list-options-gt,
opt_list-options-le,
opt_list-options-lt,
opt_list-options-nb,
opt_list-options-ne.
APPEND opt_list TO restrict-opt_list_tab.
NOINTERVLS: BT and NB not allowed
CLEAR opt_list.
MOVE 'NOINTERVLS' TO opt_list-name.
MOVE 'X' TO: opt_list-options-cp,
opt_list-options-eq,
opt_list-options-ge,
opt_list-options-gt,
opt_list-options-le,
opt_list-options-lt,
opt_list-options-ne,
opt_list-options-np.
APPEND opt_list TO restrict-opt_list_tab.
EQ_AND_CP: only EQ and CP allowed
CLEAR opt_list.
MOVE 'EQ_AND_CP' TO opt_list-name.
MOVE 'X' TO: opt_list-options-cp,
opt_list-options-eq.
APPEND opt_list TO restrict-opt_list_tab.
JUST_EQ: Only EQ allowed
CLEAR opt_list.
MOVE 'JUST_EQ' TO opt_list-name.
MOVE 'X' TO opt_list-options-eq.
APPEND opt_list TO restrict-opt_list_tab.
Assign selection screen objects to option list and sign
KIND = 'A': applies to all SELECT-OPTIONS
MOVE: 'A' TO ***-kind,
'*' TO ***-sg_main,
'NOPATTERN' TO ***-op_main,
'NOINTERVLS' TO ***-op_addy.
APPEND *** TO restrict-***_tab.
KIND = 'B': applies to all SELECT-OPTIONS in block BLOCK_0,
that is, SEL_0_0, SEL_0_1, SEL_0_2
CLEAR ***.
MOVE: 'B' TO ***-kind,
'BLOCK_0' TO ***-name,
'I' TO ***-sg_main,
'*' TO ***-sg_addy,
'NOINTERVLS' TO ***-op_main.
APPEND *** TO restrict-***_tab.
KIND = 'S': applies to SELECT-OPTION SEL-0-2
CLEAR ***.
MOVE: 'S' TO ***-kind,
'SEL_0_2' TO ***-name,
'I' TO ***-sg_main,
'*' TO ***-sg_addy,
'EQ_AND_CP' TO ***-op_main,
'ALL' TO ***-op_addy.
APPEND *** TO restrict-***_tab.
KIND = 'S': Applies to SELECT-OPTION SEL_0_3
CLEAR ***.
MOVE: 'S' TO ***-kind,
'SEL_0_3' TO ***-name,
'I' TO ***-sg_main,
'N' TO ***-sg_addy,
'JUST_EQ' TO ***-op_main.
APPEND *** TO restrict-***_tab.
Call function module
CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
EXPORTING
restriction = restrict
DB = ' '
EXCEPTIONS
too_late = 1
repeated = 2
not_during_submit = 3
db_call_after_report_call = 4
selopt_without_options = 5
selopt_without_signs = 6
invalid_sign = 7
report_call_after_db_error = 8
empty_option_list = 9
invalid_kind = 10
repeated_kind_a = 11
OTHERS = 12. -
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 -
How to create multiple selection screens in reports
How to create multiple selection screens in reports
Thanks,
SridharEx: hope you will find an idea from the below example :
SELECTION-SCREEN BEGIN OF BLOCK SEL1 WITH FRAME TITLE TIT1.
PARAMETERS: CITYFR LIKE SPFLI-CITYFORM,
CITYTO LIKE SPFLI-CITYFORM.
SELECTION-SCREEN end OF BLOCK SEL1
SELECTION-SCREEN BEGIN OF SCREEN 500 AS WINDOW.
SELECTION-SCREEN INCLUDE BLOCKS SEL1.
SELECTION-SCREEN BEGIN OF BLOCK SEL2 WITH FRAME TITLE TIT2 .
PARAMETERS: AIRPFFR LIKE SPFLI-AIRPFROM,
AIRPTO LIKE SPFLI-AIRPTO.
SELECTION-SCREEN END OF BLOCK SEL2
SELECTION-SCREEN END OF SCREEN 5000.
INITIALIZATION.
TIT1 = 'ITIES'.
aT SELECTION-SCREEN.
CASE SY-DYNNR.
WHEN '0500'.
MESSAGE W159(at) WITH 'SCREEN 500'.
WHEN '1000'.
MESSAGE W159(at) WITH 'SCREEN 1000'.
ENDCASE.
START-OF-SELECTION.
TIT1 = 'CITIES FOR AIRPORTS'.
TIT2 = 'AIRPORTS'.
CALL SELECTION-SCREEN 500 STARTING AT 10 10.
TIT1 = 'CITIES AGAIN'.
CALL SELECTION-SCREEN 1000 STARTING AT 10 10. -
Calling a Selection Screen from a Function Module/Method
Hi,
I would like to call a selection screen from a function module or method. I understand it is not possible by the definition. Are there any alternative options as I am looking for the Variants Save option on the screen. Any thoughts?
Thanks
RaghavSince i don't know your exact requirements (standard SAP selection screen? your own selection screen?) the onl;y thing i can come up with is:
1. in your function pool create your own screen with a subscreen area
2. create your own selection screen as a subscreen.
3. include the selection subscreen in the first screen
4. call the first screen in your function. -
Error in calling a selection-screen...
Hello experts,
Please look at my code below:
SELECTION-SCREEN BEGIN OF SCREEN 500 AS WINDOW.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: pr_upld RADIOBUTTON GROUP grp2.
SELECTION-SCREEN COMMENT 2(20) text-007 FOR FIELD pr_upld.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 03(15) text-a11 FOR FIELD p_flnme.
PARAMETERS: p_flnme LIKE rlgrap-filename DEFAULT 'C:'.
SELECTION-SCREEN END OF LINE.
PARAMETERS: pr_list1 RADIOBUTTON GROUP grp2.
SELECTION-SCREEN COMMENT 2(7) text-003 FOR FIELD pr_list1.
SELECTION-SCREEN END OF SCREEN 500.
SELECTION-SCREEN BEGIN OF SCREEN 1500 AS WINDOW.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(22) text-002 FOR FIELD p_dcode.
PARAMETERS: p_dcode LIKE vbak-kunnr,
p_name1 LIKE kna1-name1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: pr_list2 RADIOBUTTON GROUP grp.
SELECTION-SCREEN COMMENT 2(7) text-003 FOR FIELD pr_list2.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: pr_add RADIOBUTTON GROUP grp.
SELECTION-SCREEN COMMENT 2(3) text-005 FOR FIELD pr_add.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: pr_edit RADIOBUTTON GROUP grp.
SELECTION-SCREEN COMMENT 2(4) text-006 FOR FIELD pr_edit.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 03(20) text-a12 FOR FIELD p_code.
PARAMETERS: p_code LIKE zts0001-cdseq.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF SCREEN 1500.
IF v_compflag EQ space.
CALL SELECTION-SCREEN 500.
ELSE.
CALL SELECTION-SCREEN 1500.
ENDIF.
Now, what I want to do is that the program will call a selection-screen based on a given variable(v_compflag). But its generating an error saying that 'error generating the selection-screen'. Why is this so?
Again, thank you guys and take care!Corrected code.
REPORT ztest_errror .
data: v_compflag.
SELECTION-SCREEN BEGIN OF SCREEN 500 AS WINDOW.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: pr_upld RADIOBUTTON GROUP grp2.
SELECTION-SCREEN COMMENT 2(20) text-007 FOR FIELD pr_upld
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 03(15) text-a11 FOR FIELD p_flnme.
PARAMETERS: p_flnme LIKE rlgrap-filename DEFAULT 'C:'.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: pr_list1 RADIOBUTTON GROUP grp2.
SELECTION-SCREEN COMMENT 2(7) text-003 FOR FIELD pr_list1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF SCREEN 500.
*************SELECTION-SCREEN BEGIN OF SCREEN 1500 AS WINDOW.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(22) text-002 FOR FIELD p_dcode.
PARAMETERS: p_dcode LIKE vbak-kunnr,
p_name1 LIKE kna1-name1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: pr_list2 RADIOBUTTON GROUP grp.
SELECTION-SCREEN COMMENT 2(7) text-003 FOR FIELD pr_list2.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: pr_add RADIOBUTTON GROUP grp.
SELECTION-SCREEN COMMENT 2(3) text-005 FOR FIELD pr_add.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
PARAMETERS: pr_edit RADIOBUTTON GROUP grp.
SELECTION-SCREEN COMMENT 2(4) text-006 FOR FIELD pr_edit.
SELECTION-SCREEN END OF LINE.
*************SELECTION-SCREEN END OF SCREEN 1500.
IF v_compflag EQ space.
CALL SELECTION-SCREEN 500.
ELSE.
CALL SELECTION-SCREEN 1500.
ENDIF.
Regards
vijay -
Hide the Range Option in Multiple Selection screen
Hai,
I Give the values In single Values In Selection Option Screen.
I want to need Hide the Range Option Include or Exclude In Multiple selection screen.
Regards,
Geethajust check this it may help you
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/840ad679-0601-0010-cd8e-9989fd650822">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/840ad679-0601-0010-cd8e-9989fd650822</a>
here restricting the selection screen
regards
shiba dutta -
How to display the dynamic text in the selection screen
Hi All,
I want to display the dynamic text in the selection screen .... ( I searched in forums , didnt get the any answer fot this sort of qustion ).....
EX: If i have the date of today 31st it has to show message like " today date is 31 like some thing " when i execute the report .
Could any one face this sort of requirment, Please let me know.
Thanks in advance.
Reagrds,
BharaniWhere would you like this dynamic text being displayed? As an "message" or in some parameter field?
If first
parameters date type d.
data: text type string.
at selection-screen.
concatenate 'Today is' date into text.
message text type 'I'.
If second
parameters pa_text type c length 50.
at selection-screen on date.
if date is not initial.
concatenate 'Today is' date into pa_text.
enidf.
at selection-screen output.
"show it as read only
loop at screen.
if screen-name = 'PA_TEXT'.
screen-input = abap_false.
modify screen.
endif.
endloop.
Regards
Marcin -
Calling userdefined selection screen
Hi all,
here i am having scenario like
first calling a selection screen with push button, when click the button
it should call anyother selection screen and execute that with selection parameters
please let me know anyoneHii,
first declare a pushbutton like ( if second selection parameter is date type)
SELECTION-SCREEN PUSHBUTTON /05(20) c_date
USER-COMMAND cdate .
SELECTION-SCREEN BEGIN OF SCREEN 0100." AS SUBSCREEN.
SELECT-OPTIONS : s_augdt FOR v_augdt OBLIGATORY NO-EXTENSION." no-display.
SELECTION-SCREEN END OF SCREEN 0100.
AT SELECTION-SCREEN.
*----CHECK FOR USER COMMAND - CDATE MEANS USER HAS SELECTED CLEARIND DATE BUTTON FROM SELECTION SCREEN
IF sy-ucomm = 'CDATE'.
CALL SELECTION-SCREEN 0100 STARTING AT '10' '10' ENDING AT '120' '15'.
ENDIF.
Regards,
Arti -
RAR5.3 not able to cut and paste list of users to Multiple Selection screen
CC V4.0 on ABAP system has a feature where you can cut and paste a list of many users from the clipboard to Single Values column in the Multiple Selection screen, so you can run SOD Analysis Report for all those users. The Multiply Selection screen is a standard SAP supplied pop up screen.
With RAR 5.3 the Multiply Selection screen design is different. There is no longer feature to cut and paste from clipboard. We have to input each user one at a time. So if you have many users (20, 30, etc.) it is a time consuming task. It is not acceptable to our business power users.
We can import the list of users to a Custom User Group (in the Configuration Tab). First of all, there is no mass delete on Custom User Group. You have to delete each user one at a time which is time consuming. The alternative is to create a new Custom User Group each time, then it becomes a maintenance nightmare. Secondly, it is in the Configuration Tab which is only available to Administrators (fear of users changing configuation data), so the Administrator (or whomever has access to the Configuration Tab) has to maintain the Custom User Groups which is a lot of work for him or her or them.
We talk to SAP every week. But they are looking at this as a long time project. Does any one of you (or your company) has the same requirements? How do you get around it? Did you setup some other procedures so users can cut and paste the users list and run the Risk Analysis report themselves?
Thanks,
John.This is probably a JVM issue. Are you using JInitiator or the IE native JVM?
I suggest you turn on the JVM console, set the trace level to maximum, and then watch what happens when you attempt the copy.
Also, check the key mapping (usually ctrl-k) that the forms applet is implementing. Perhaps ctrl-c means something else... -
How to create Multiple Selection Screen in ALV
Hi,
Can anybody tell me how to create the Multiple Selection screen in ALV reports.
Plse give me code sample if possible.
Thanks in advance
KPHi Rich,
thanks for the reply.
I am creating a report. in that for one field, i need to create a multiple selection screen. i mean in the output screen , i need to get the multiple selection screen for that field. in that i should be able to select multiple values, or single values or range of values.
eg: if i take the field kunnr, i should be able to select the multiple kunnar values in the output screen.
Hope my problem is understood.
Thanks
KP -
Multiple selection screen.
hi all,
how to create multiple selection screens,
i need 3 selection screens how to do it?
wats the maximum number selection screen can be created in a report.
regards
SuprithSELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.
PARAMETERS: p1 TYPE c LENGTH 10,
p2 TYPE c LENGTH 10,
p3 TYPE c LENGTH 10.
SELECTION-SCREEN END OF SCREEN 100.
SELECTION-SCREEN BEGIN OF SCREEN 200 AS SUBSCREEN.
PARAMETERS: q1 TYPE c LENGTH 10,
q2 TYPE c LENGTH 10,
q3 TYPE c LENGTH 10.
SELECTION-SCREEN END OF SCREEN 200.
SELECTION-SCREEN: BEGIN OF TABBED BLOCK mytab FOR 10 LINES,
TAB (20) button1 USER-COMMAND push1,
TAB (20) button2 USER-COMMAND push2,
END OF BLOCK mytab.
INITIALIZATION.
button1 = 'Selection Screen 1'.
button2 = 'Selection Screen 2'.
mytab-prog = sy-repid.
mytab-dynnr = 100.
mytab-activetab = 'PUSH1'.
AT SELECTION-SCREEN.
CASE sy-dynnr.
WHEN 1000.
CASE sy-ucomm.
WHEN 'PUSH1'.
mytab-dynnr = 100.
WHEN 'PUSH2'.
mytab-dynnr = 200.
WHEN OTHERS.
ENDCASE.
ENDCASE. -
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
Maybe you are looking for
-
Set the column name of a table in a list box
is there any code to set the column name of a table in a list box at oracle devloper 6i? pls help.
-
Use 2nd Mac as Airtunes Speaker
Hi. Anyone know whether/how I can use a second Mac (mini) as an Airtunes speaker, rather than buying another airport express and speaker setup? Tks
-
Exchange 2007 Webmail certificate Renewal
Hi, If any one knows more details about how to renew the webmail certificate in Exchange 2007, Webmail certificate is ging to expire soon ...EventID 12018
-
Redetermination of Pricing Procedure? Pls Urgent.
Dear all, When i am creating a Sales order, Based on Org. determination(Sales org. Dist. Channel and Div)system pick up the pricing procedure. Now i am changing the Distribution Channel manually at Organization TAB but now system does not redetermine
-
TS4185 how do i stop my FaceTime from causing an echo.
every time i call my girlfriend from my mac she can hear herself echo. I checked my sounds settings and everything is fine, why is my mic picking up her voice? Also tried turning down the volume already and doesnt help. Anyone know how to fix this?