‎2006 Nov 10 10:47 AM
Hi,
When use the below code in report-2 the sy-comm values changes to 'JOBS' instead of 'ONLI'. So please let me know how can I rectify it?
Note: Its working fine if I remove the addition job from the submit statement.
Thanks in advance.
Regards,
Siva.
SUBMIT Report-1
USER LV_BATCHUSER
VIA JOB LV_JOBNAME NUMBER LV_JOBCOUNT
AND RETURN TO SAP-SPOOL
WITHOUT SPOOL DYNPRO
DESTINATION 'LOCL'
IMMEDIATELY ' '
KEEP IN SPOOL ' '
USING SELECTION-SET P_VARIANT
WITH SEL_LOC IN PR_LOCNO
WITH SEL_PROD IN PR_MATNR.
‎2006 Nov 10 10:54 AM
Hi
Where is the problem?
I can't see where you check the system variable SY-UCOMM
Max
‎2006 Nov 10 10:59 AM
The sy-ucomm is populated with 'JOBS' in at selection-screen of report-1. Since there is a check with UCOMM 'ONLI' in report-1 it's not getting triggered.
‎2006 Nov 10 11:20 AM
Hi
It's not very clear for me what you need.
U have to program REPORT-1 and REPORT-2, REPORT-1 is submitted by REPORT-2: is it right?
Now do you need REPORT-1 works only in background?
Max
‎2006 Nov 10 11:26 AM
Yes I call report-1 in report-2.
When I excute the report-1 it calls the report-2. There is a check in report-2.
If sy-ucomm = 'ONLI'.
process.
endif.
But I get the sy-ucomm value as 'JOBS'. I don't know from there it's getting populated.
‎2006 Nov 10 11:34 AM
Hi
U can't change that value it depends on how it runs a report.
SY-UCOMM:
- ONLI if the report works ON LINE,
- PRIN if the report works ON LINE and print the data
- SJOB if the report works in bakcground.
So if you need to check if a report is in online or background u can also check the variable SY-BATCH.
Anyway u can update the control
If sy-ucomm = 'ONLI' or
sy-ucomm = 'SJOB'. process.
endif.
Max
‎2006 Nov 10 11:35 AM
sy-ucomm would be JOBS as you are submitting the report via a job. The only way you can get the ucomm to be ONLI is by not submitting via job and instead just SUBMIT and RETURN.
‎2006 Nov 10 11:39 AM
I execute the report in the foreground but still I get the ucomm values as 'JOBS' and more over the Report-2 is a standard program. So I can't change anythign in that.
‎2006 Nov 10 11:48 AM
Sorry it is getting a bit confusing...are you submitting report2 or report1 ?
In your submit statement you said report1 and in the above you mention report2 ??
Please note that which ever is the ABAP, if you submit it via JOB then the sy-ucomm field would contain JOBS and not ONLI.
‎2006 Nov 10 11:51 AM
Thx a lot.
I have removed the option JOB and its working fine.
Since there is some problem in assigning points......... will assign the point later.
Regards,
Siva.
‎2006 Nov 10 1:32 PM
If you submit it via JOB then the sy-ucomm field would contain JOBS and not ONLI.