2013 Dec 17 12:24 PM
Team,
Have developed a report 'ABC' which has SUBMIT command (SUBMIT 'XYZ'). where XYZ is another abap report which has variant /selection screen.
While background processing, in SM36, i create a job for XYZ report and also provide its variant, and also creates spool when once checked in SM37.
Issue -
but now in SM36, while creating a job, if given a report name as "ABC" and schedule( it has no variant) , in sm37, no spool created.
SO CAN WE USE THE VARIANT OF REPORT XYZ WHILE PROCESSING BACKGROUND JOB FOR REPORT 'ABC' ????
example :
Report ABC. "Here report ABC has no selection screen, so no variant.
Perfom application.
Form application.
SUBMIT XYZ . " Here XYZ has selection screen, so variant created.
Endform.
2013 Dec 17 12:27 PM
Hi Guru
Even if it does not have selection screen but your program shall work..Can you please paste the sample code.
Nabheet
2013 Dec 17 12:35 PM
Hi,
You can pass the variant name, like:
SUBMIT XYZ USING SELECTION-SET 'VARIANT_NAME'
At,
Sandro Ramos
2013 Dec 17 12:40 PM
For this an addition/modification has to be done to the syntax and the variant decided.
... USING SELECTION-SET variant
Report ABC. "Here report ABC has no selection screen, so no variant.
Perfom application.
Form application.
SUBMIT XYZ USING SELECTION-SET variant. " Here XYZ has selection screen --> pass variant
Endform.
Documentation :
If you specify this edition, the parameters and selection criteria for the selection screen are supplied with values from a variant. For variant, you must specify a character-like data object that contains the name of a variant for the program accessed when the statement is executed. If the variant does not exist, the system sends an error message. If the variant belongs to a different selection screen, it is ignored.
2013 Dec 17 12:45 PM
Hi Gururaj,
You can submit the second report as job.
SUBMIT <REPORT>
USER <USER> VIA JOB <JOB NAME> NUMBER <JOB NUMBER>
WITH PARAM1 =
WITH PARAM2 =
..............................
AND RETURN.
Use the JOB_OPEN and JOB_CLOSE FMs to insert this process into job.
You could find sample codes for this on the net.
2013 Dec 18 6:36 AM
Hi Susmitha,
The issue is, the main report(ABC) has no selection screen, it just calls another report(XYZ) using SUBMIT statement. The variant is creted for XYZ report as it has selection screen, whereas first report ABC has no selection screen, so no variant.
So in SM36, the basis guys need only the first report ABC for background processing. Since it has no variant/selection screen, spool is not not created wen checked in SM37.
But if i execute SM36 and put the report name as XYZ and its variant, then in SM37, spool is getting created.
Do let me know, can SUBMIT button be used in background processing without any variant?
Regards,
Gururaj.
2013 Dec 18 7:20 AM
Hi,
Its just a suggestion.
Create all the parameters in report XYZ in ABC to but as hidden.
report ABC.
PARAMETERS p_par1 TYPE datype NO-DISPLAY,
.......... p_pari.
in the submit program in the program
submit XYZ with par1 = p_par1 ... pari = p_pari.
* or submit using the same variant or selection set
Then create the background job for ABC with the variant, which will be same as for XYZ