‎2007 Sep 21 5:57 PM
Hi all,
This is my code i need to submit RSIRCCON program to this program with a variant . I have created a variant with a name "VARIANT1" . After excuting this program am getting an error message "VARIANT VARIANT1 does not exist " .
Can any one help me to resolve this issue .
Z_RSIRCCON_2 *
*& *
&----
*& *
*& *
&----
REPORT Z_RSIRCCON_2 NO STANDARD PAGE HEADING
LINE-SIZE 255
----
TABLES *
----
LINE-COUNT 65.
TABLES: somlreci1.
----
*Global Variables *
----
DATA: repository(255) TYPE C,
L_PROGRAMM LIKE RS38M-PROGRAMM,
variant1 like RS38M-SELSET.
l_programm = 'Z_RSIRCCON_2'.
variant1 = 'VARIANT1'.
----
SELECTION SCREEN *
----
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS: p_repos FOR repository.
PARAMETER:p_single AS CHECKBOX USER-COMMAND run,
p_multi AS CHECKBOX USER-COMMAND run,
p_run AS CHECKBOX USER-COMMAND run.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK a1 WITH FRAME TITLE text-043.
PARAMETER :p_esub TYPE repository.
SELECT-OPTIONS:p_email FOR somlreci1-receiver MODIF ID sc6 .
SELECTION-SCREEN END OF BLOCK a1.
----
START-OF-SELECTION *
----
CALL FUNCTION 'RS_PROGRAM_POPUP_VARIANT'
EXPORTING
progname = l_programm
VARIANT = VARIANT1
DEBG = ' '
MESSAGE_ON_POPUP = ' '
IMPORTING
OK_CODE =
NEW_VARIANT =
EXCEPTIONS
NO_VARIANT = 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.
submit RSIRCCON VIA SELECTION-SCREEN using SELECTION-SET 'VARIANT1' AND RETURN.
null
‎2007 Sep 21 6:14 PM
hey,
Try this below FM to create the variant.... it might be helpful for you...
CALL FUNCTION 'RS_CREATE_VARIANT'
EXPORTING
CURR_REPORT = JVARI_DESC-REPORT
CURR_VARIANT = P_VAR
VARI_DESC = JVARI_DESC
TABLES
VARI_CONTENTS = SELPA
VARI_TEXT = JVT
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 0.
WRITE:/ 'VARIANT', P_VAR, 'CREATED FOR PROGRAM', JVARI_DESC-REPORT.
ELSE.
WRITE:/ 'VARIANT', P_VAR, 'NOT CREATED FOR PROGRAM', JVARI_DESC-REPORT.
EXIT.
ENDIF.
then submit your program with variant...
~~Guduri
‎2007 Sep 21 6:16 PM
Hey Naveen,
I dont want to create a variant . I want to submit a program in my main program with a variant which i have created in my main program selection screen.
‎2007 Sep 21 6:15 PM
Hi,
I am working in ECC 6.0 and i do not see any selection screen for program RSIRCCON. How did you create a variant without selection screen.
May be that is the reason you are getting the error message. There is no selection screen for program RSIRCCON, so your variant is not valid.
Let me know if i misunderstood your question.
Regards,
RS
‎2007 Sep 21 6:21 PM
Hey ,
I dont have selection screen in RSIRCCON ,but i have selection screen in my main program( Z_RSIRCCON_1) where i have created a variant this variant values need to populated into RSIRCCON . I need to pass VARIANT of Z_RSIRCCON_1 to RSIRCCON.
‎2007 Sep 21 6:39 PM
Hi,
You cannot user the variant of 'Program 1' to call the 'Program 2'.
When you write the statement
SUBMIT RSIRCCON VIA SELECTION-SCREEN USING SELECTION-SET 'VARIANT1' AND RETURN.,
it means that you are trying to submit the program RSIRCCON with the selection screen variant 'VARIANT1'. SAP expect this variant to be of program RSIRCCON not your calling 'Z' program. Since program RSIRCCON does not have any selection-screen, you can not create a variant and thus you cannot submit it with selection-set variant.
Please refer to the documentation for command 'SUBMIT' for more information.
http://help.sap.com/saphelp_47x200/helpdata/en/9f/dba51a35c111d1829f0000e829fbfe/frameset.htm
Regards,
RS
‎2007 Sep 21 6:50 PM
Hey RS,
Do u have any idea how to pass these input values to RSIRCCON which parameters?
‎2007 Sep 21 6:20 PM
Have you checked if variant VARIANT1 is present for program RSIRCCON?
That can cause the issue.
‎2007 Sep 21 6:28 PM
hey ,
i need to create an variant with these valueses in my main program . This variant has to be populated in RSIRCCON program.
Repository
Single Test
Multiple Test
Runtime Test
email subject :
email address: