Need to submit a program with a variant
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
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
Similar Messages
-
Submit a program with two variants
Hi all,
There is one program which needs to run everyday with two different variants
( For this i need to have two jobs ).
Now, i need to write a new program which submits the above program with two variants. How do i do it?
Thanks
Abhijith HYou don't need two jobs, you can have 1 job with two steps, each step would call the progam with the different variant.
If you want to write a program which submits the program twice with two different variants, you can use the SUBMIT statement. Here VARIANT1 is the name of a variant.
SUBMIT ZREPORT01
USING SELECTION-SET 'VARIANT1'
AND RETURN.
Regards,
Rich Heilman -
Needs to submit a program with Create icon
Hi experts,
I need to submit SAPRCKCC. Once the program SAPRCKCC got executed, in the selection screen i need to click Create Icon after that i need to pass the required values.
The requirement is,
How to submit SAPRCKCC with clicking of create icon
Can anyone guide me.
MohanaAT SELECTION-SCREEN.
IF sy-ucomm <> 'CREATE'. " FC code for your button.
SUBMIT <Pgname> VIA SELECTION0-SCREEN
WITH SELECTION-TABLE
ENDIF -
Hi,
My Issue is when I execute a program (ZRHECM_PRINT_CRS Copy of RHECM_PRINT_CRS) directily It is generating the output for me in the form of xstring, But when I submit it with same parameter inside a function module It is not going to (get) statement.
This program is using pnpce(LDB)
Is there a problem in submiting a program Using LDB?
Here is what I Submit .What should be done ?
SUBMIT zrhecm_print_crs WITH pnppernr-low = pernr
WITH PNPTIMED = PNPTIMED
WITH p_carea = p_carea
WITH p_ccatg = p_ccatg
WITH p_cplan = p_cplan
WITH p_crevi = p_crevi
WITH pnpbegda = begda
WITH pnpendda = endda
WITH pnpstat2-low = stat2
WITH pnpbtrtl-low = btrtl
WITH pnpwerks-low = werks
WITH pnppersg-low = persg
WITH pnppersk-low = persk
AND RETURN.You don't need two jobs, you can have 1 job with two steps, each step would call the progam with the different variant.
If you want to write a program which submits the program twice with two different variants, you can use the SUBMIT statement. Here VARIANT1 is the name of a variant.
SUBMIT ZREPORT01
USING SELECTION-SET 'VARIANT1'
AND RETURN.
Regards,
Rich Heilman -
Launch a program with different variant in one time
Hi,
User have to launch all day x times the same transaction but selecting an other saved variant a each time.
Is there a program or transaction which can be used to launch a lot of program - variant in one time ?
Thanks a lot
RegardsYou can use a ECATT testscript to automatise it.
It can launch different variants each time and how many times you want.
Follow the documentation <a href="http://help.sap.com/saphelp_nw70/helpdata/en/d4/80023c59698908e10000000a11402f/frameset.htm">link</a>
Regards,
Walter -
Example of problem on http://constitution.org/rror/rror--00.htm
iframe content often displayed in the wrong places, or sometimes not at all. Similar problem with other pages on site. Pages display correctly with IE, Google Chrome, Safari, and sometimes in Firefrox as well, especially just after a new start, so the problem is not the underlying HTML, and the fact that Firefox usually does initially display it correctly, but fails to do so after running a while, suggests something like a memory leak.
Using Firefox v. 3.6.23 Linux under Fedora.I had already tried clearing everything, which didn't work. Just tried changing the network.http.pipelining value to true in prefs.js by entering about:config in the location field of the browser, and rebooted the system. That seems to work, for now, but rebooting the system has worked before -- for a while. It should not be necessary to have to frequently reboot to avoid the problem. For that matter, it should not be necessary to have to edit the prefs.js file. Other browsers seem to work without having to do that.
-
How to Run std program with a specific variant for specific user?
Hi guys
We have a std program which will be run by different users in the company. Now the requirement is to make sure that each user runs the report with a specific varaint. Can we control this if yes how?
one options we thought about was to create a transaction in SE93 and define the program to run with a predefined varaint and assign the new custom tcode to the user profile. But we have many different users and we will end up with creating many transactions which we would like to avoid. Is there any other option to control the std program such that each user can run the program only with a pre-defined varaint and the one which only the user is suppoed to run. thanks in advance.We have a std program which will be run by different users in the company. Now the requirement is to make sure that each user runs the report with a specific varaint. Can we control this if yes how
you can do this..
You can create a Custom table
userid keyfield
program keyfield
variant keyfield
programdesc
Make the table Maintaintable(usnig table maintenance )
Now create another Program
It takes input of the Program name( using selection screen)
LOGIC
in side that place a logic ,
Based on the user name and program name Get the variant name from above table
Now Submit the program with the variant you have selected above.
Use Variant Addition when you use SUBMIT
So now program executed based on user variant.
Now you create a Transaction for this program.
When use Runs the Transaction , user needs to input the Program name which he wants to execute.
and Output will be shown based on the variants
Regards
Vijay Babu Dudla -
ABAP program to resubmit itself with temp variant
Hi there,
I want a program to be able to re-submit itself in the background. I can do this, but if the user does not use a variant, how do I submit the program with the user-defined selections? This program may be run often and I don't want to create a massive list of variants. This must work whether they select a variant, or manually input selections.lv_job_name will be the program name itself
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = lv_job_name
IMPORTING
jobcount = lv_job_nr
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
IF syst-subrc = 0.
*submit job with all the selection screen params...
<b> SUBMIT (lv_job_name)
WITH applfile = applfile " all your variables go here
WITH p_lines = p_lines
WITH rfcdest = rfcdest
WITH p_selmtd = lv_selmtd
USER syst-uname
VIA JOB lv_job_name NUMBER lv_job_nr AND RETURN.</b>
IF sy-subrc = 0.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = lv_job_nr
jobname = lv_job_name
strtimmed = 'X'
IMPORTING
job_was_released = lv_job_released
EXCEPTIONS
cant_start_immediate = 1
invalid_startdate = 2
jobname_missing = 3
job_close_failed = 4
job_nosteps = 5
job_notex = 6
lock_failed = 7
OTHERS = 8.
IF syst-subrc <> 0.
MESSAGE i162(00) WITH
'An error occured while closing the background job.'.
STOP.
ENDIF.
ENDIF.
ENDIF.
SKIP 1.
WRITE: / 'Background process', lv_job_name_string , 'called successfully' NO-GAP.
WRITE: / 'You can check the job in transaction SM37'.
Message was edited by:
Kris Donald -
How to run the program with variant automatically
Hi experts,
I want to know how can I run the program with a variant automatically without defining any transactions or jobs. I want my program to run with a variant automatically, when I press F8.Try doing this way...
First Create a Sel Screen varient, 'ZTEST123' in this case
Report ZTEST.
parameters:
w_kunnr type kna1-kunnr,
w_flag type c no-display.
start-of-selection.
if w_flag eq ' '.
submit ZTEST USING SELECTION-SET 'ZTEST123' with w_flag eq 'X'.
endif.
end-of-selection.
write: w_kunnr.
Thanks. -
How to create a job thru ABAP program for calling a program with variant???
Hello experts,
can u give me step wise procedure to create jobs for a program with a variant name thru ABAP???
Also, can a transaction can be scheduled as a job to run in background with a variant name???
Edited by: SAP USER on Jul 22, 2008 6:08 AMHi,
To create a job through ABAP program you can do the following.
Go to Menu bar.
In there, go to SYTSTEM> SERVICES> JOBS--> DEFINE JOB.
Then give the JOB NAME and CLASS in the screen that comes up.
This is how we schedule a program.
Now, to create a variant for a program -
First activate your program in SE38. Then execute it .
Now, click on SAVE button. It will open up the variant creation screen. Give the details there like variant name and value for the fields. Save and come back.
Hope this helps.
Regards,
Hari Kiran -
Pass parameter to program (with LDB) submitted in background
Hello,
For a particular requirement, I need to submit the program RPLPAY00 in background.
I need to extract data for the 'Current Year' which appears as a radiobutton on screen
However, it comes from the logical database PNP
I have written code as follows
*& Report ZRUN_RPLPAY00
*& Author : Kris Donald
*& Date : 15-05-2009
*& Purpose :
REPORT ZRUN_RPLPAY00.
DATA: LV_JOB_NAME LIKE TBTCO-JOBNAME,
LV_JOB_NR LIKE TBTCO-JOBCOUNT,
LV_JOB_RELEASED TYPE C,
LV_JOB_START_SOFORT TYPE C,
LV_PRINT_PARAMETERS TYPE PRI_PARAMS.
LV_JOB_NAME = 'RPLPAY00'.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
JOBNAME = LV_JOB_NAME
IMPORTING
JOBCOUNT = LV_JOB_NR
EXCEPTIONS
CANT_CREATE_JOB = 1
INVALID_JOB_DATA = 2
JOBNAME_MISSING = 3
OTHERS = 4.
IF SYST-SUBRC = 0.
*submit job with all the selection screen params...
SUBMIT (LV_JOB_NAME)
WITH PNPTIMR1 = ''
WITH PNPTIMR3 = 'X'
with PNPBEGDA = ''
with PNPBEGPS = ''
with ALV_LIST = 'X'
USER sy-uname
VIA JOB LV_JOB_NAME NUMBER LV_JOB_NR AND RETURN.
IF SY-SUBRC = 0.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
JOBCOUNT = LV_JOB_NR
JOBNAME = LV_JOB_NAME
STRTIMMED = 'X'
IMPORTING
JOB_WAS_RELEASED = LV_JOB_RELEASED
EXCEPTIONS
CANT_START_IMMEDIATE = 1
INVALID_STARTDATE = 2
JOBNAME_MISSING = 3
JOB_CLOSE_FAILED = 4
JOB_NOSTEPS = 5
JOB_NOTEX = 6
LOCK_FAILED = 7
OTHERS = 8.
IF SYST-SUBRC <> 0.
MESSAGE I162(00) WITH
'An error occured while closing the background job.'.
STOP.
ENDIF.
ENDIF.
ENDIF.
SKIP 1.However when I check the output log it shows the following message
'Pay scale grpg for allowances for 00040011 is not defined on 20040728'
If 'Current year' was selected properly, it would have read as
'Pay scale grpg for allowances for 00040011 is not defined on 20090101'
Does anyone know how I can pass the parameters properly to the program in background ? -
How to submit a program after completion of a background job
Hi Experts,
I have a small issue. In my report program i am calling one transaction using call transaction it will trigger a background job. After completion of this background job i need to submit another program, Because the background job updating few values, using this value only the second program functionality will works.
Currently when i execute my report its calling 1st program and triggering the background job. Once the job started again the program triggering the next program. Here after competion of the background job only this program should submit next program. Anyone kindly suggest some clue.
CALL TRANSACTION 'ZSAPRCK60' USING zbdcdata
OPTIONS FROM g_s_options
MESSAGES INTO msg_tab.
SUBMIT SAPRCK10 VIA SELECTION-SCREEN
WITH kalaid = p-kalaid
WITH kaladat = sy-datum
WITH PARALLEL = 'X'
WITH SERVNUM = '10'
WITH backgr = 'X'
AND RETURN.
MohanaHi,
There is one function module there which gives you the job status .. if the job is finished then the value will be 'F'.I don't exactly remember the FM but then you can search with BDLSTATUS or BDSTATUS in SE37..
do.
call fm BD****STATUS
IF STATUS (IMPORT PARAMTER) eq 'F'.
exit.
endif.
enddo.
Regards,
Nagaraj -
Copy/create program with logical database
Hi
I need to create a program with the same selection-screen as SAP standard program RPRAPA00.
RPRAPA00 is using a logical database, but even that I have passed in the PNP in the attributes of my own progam, I don't get the selection in the top (buttons, key-date info + selection info).
The rest of my program looks fine.
Any ideas how I get the missing selections into the selection-screen?Hi,
Define pernr table under tables statement then and use GET PERNR event.This get event is followed by End-Of-Selection.
Syntax: Tables pernr.
Get pernr.
Try, activate and test. This should solve your problem.
Regards,
Abhijeet -
Question: Do I need to run and anti virus program with MAC OSX Lion? Have heard different opinions! If so what would you recommend? Was looking at Sophos. Does anyone have any experience with this? Thanks
Do I need to run and anti virus program with MAC OSX Lion? Have heard different opinions!
You will continue to hear different opinions here, where thoughts range everywhere between "anti-virus software is the evil spawn of Satan" to "anyone not running anti-virus software is a fool."
Truth is, this is still a very personal decision on a Mac. Depending on circumstances, it is still very easily possible to stay safe without using anti-virus software, but circumstances and personal preferences vary widely. Besides which, anti-virus software cannot even remotely provide you a guarantee of protection!
To learn how to stay safe (with or without anti-virus software), and how to decide whether to use anti-virus software, see my Mac Malware Guide. -
Hai, i tried to open itunes on my windows 8 laptop but it comes out with 'iTunes has stop working' notification and need to close the program everytime i try to load it. Please help! thanks.
Hi ajay-9,
Thanks for visiting Apple Support Communities.
The steps in this article can help if iTunes is quitting unexpectedly on your PC:
iTunes for Windows Vista, Windows 7, or Windows 8: Fix unexpected quits or launch issues
http://support.apple.com/kb/ts1717
Cheers,
Jeremy
Maybe you are looking for
-
My facebook app no longer works for my iphone after i sync it to my laptop!
Why does my facebook app no longer works for my iphone after i sync it to my mac book pro? I added this app for facebook and then i synced it up with my mac book pro, but afterwards it lost the app, and I can't download it anymore... why is that? And
-
Copying over "users" folder from Mac OS 10.3.8
Hello, I am doing an upgrade from a G4 with 10.3.9 to G5 with Mac OS 10.4.8 Can I simply copy over the users folder from 10.3.9? I have a feeling this will not work....? Better to do it with Migration assistant, or just grab specific things I need, s
-
Install on a new hard drive question
So my hard drive failed in my iMac. I had a 2Tb drive I was not using so I took the Mac apart and installed my drive in it. I am now trying to get snow leopard installed from my original disk. It hits 22 minutes left (only about 3 minutes in) and the
-
BT master socket query - no wires? Is that right?
I was asked by my ISP to try out the test socket on my master socket as I am having a few speed issues. When I took the face plate off it came off OK but with no wires attached, is this correct? I thought it was meant to have some wires attached? The
-
Problems with iOS4 on 3G. Any suggestions?
I downloaded the latest iTunes and iOS4 and this is what I've experienced: Battery drained quickly External power pack (mophie brand) is not recognized anymore and cannot power up iPhone Emails in Draft folder in Outlook disappeared Cannot read Excel