‎2019 May 17 2:20 PM
Hi,
SCC4 changes can be checked using the standard change log functionality.
The program which actually runs in the background is RSVTPROT.
I have a requirement where there is a need to capture the change log in a pdf and send in email.
The data should be displayed in the exact format as when viewed from SCC4 transaction
Utilities -> Change Log.
All runs well when I use " SUBMIT RSVTPROT TO SAP-SPOOL SPOOL PARAMETERS print_parameters WITHOUT SPOOL DYNPRO VIA JOB job_name NUMBER job_number
AND RETURN." command in the foreground and this the exact output that is needed.
But when I schedule a background job the spool is not generated.
So, the question is , will it be possible to run RSVTPROT in background and generate a spool.
Regards,
Ayan
‎2019 Jul 02 12:36 PM
Nothing special about RSVTPROT. Running it via a job launched programmatically is the same as running via a manual job. You have just a programming error in your code.
PS: please share your code so that we can help you.
‎2019 May 30 6:33 PM
Why are you using SUBMIT? Just run the program as a step in a background job and use spool output distribution option in the job definition to send output by email. It won't be in PDF but that is much simpler process.
Also is this not covered already by the CCMS tools? I'm not a Basis person but monitoring / alert functionality is quite robust from what I've heard.
‎2019 Jul 01 8:26 PM
Hi Jelena,
Thank you for your response.
In my case, I have a very specific requirement where the change logs are needed only as a pdf attachment in a predefined email body.
As you rightly said and I did a test from my side as well, running the program RSVTPROT as a step in a background job generates the spool although not in pdf. This spool serves the purpose for me as it has all the details.
Here as well, it is in fact a background job and so I am not quite able to understand why the same would not work via a SUBMIT statement which is turn is also trying to run program RSVTPROT via a job.
Some insights on this restrictive behavior of SUBMIT statement would be very helpful.
Regards,
Ayan
‎2019 Jul 02 2:00 AM
you may try to export it in ALV output and get it through cl_salv_bs_runtime_info
‎2019 Jul 02 8:51 AM
Hi Ayan,
Try debugging background job in SM37 , check the submit statement.
Regards,
Muhammed M
‎2019 Jul 02 12:36 PM
Nothing special about RSVTPROT. Running it via a job launched programmatically is the same as running via a manual job. You have just a programming error in your code.
PS: please share your code so that we can help you.
‎2019 Jul 16 11:37 AM
Hi,
Below is the code where I am calling RSVTPROT with a variant by the name 'TEST' :-
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = job_name
IMPORTING
jobcount = job_number
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
SUBMIT RSVTPROT USING SELECTION-SET 'TEST'
TO SAP-SPOOL
SPOOL PARAMETERS print_parameters
WITHOUT SPOOL DYNPRO
VIA JOB job_name NUMBER job_number
AND RETURN.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = job_number
jobname = job_name
strtimmed = 'X'
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.
This is not generating a spool number when run in background mode through a batch job.
But works fine when I am running it in foreground.
Regards,
Ayan
‎2019 Jul 16 12:55 PM
I still have no issue, I get a spool. Could you handle and check the possible errors, missing authorizations, etc.?
‎2019 Jul 16 9:42 PM
Hi Sandra,
Thanks for confirming from your end. This drove me to check why it does not work for me when it works for you.
Indeed, there was an issue with the printer name at my end.
Now I have used another printer as default and with this change the program is able to generate the spool even in background.
In all we can confidently conclude that there is nothing different about RSVTPROT when run in foreground or in background mode.
Thanks to everyone for their valuable inputs.
Regards,
Ayan
‎2019 Jul 12 4:01 PM
SPAN { font-family: "Courier New"; font-size: 10pt; color: #000000; background: #FFFFFF; } .L0S52 { color: #0000FF; } .L0S55 { color: #800080; } .L0S70 { color: #808080; }
cl_salv_bs_runtime_info=>set( EXPORTING display = abap_true
metadata = abap_false
data = abap_true ).
Check the above code where ever u r using and make display abap_true during sy-batch is abap_true.
‎2019 Jul 16 11:44 AM
Hi Sivanadh,
My problem is that that spool is not getting generated through SUBMIT statement when run in background mode. ALV is not the issue.
I will convert the spool to pdf and simply attach in email but to do this I first need the spool to be generated.
Regards,
Ayan