2014 May 14 3:55 PM
Hi Experts,
i am facing a strange issue. my problem is i have created a varinat and using the same in foreground excution .
in program i have placed a check as mentioned below.
PARAMETERS: p_varnt TYPE sy-slset NO-DISPLAY.
CHECK sy-batch IS INITIAL.
CLEAR p_varnt.
MOVE sy-slset TO p_varnt.
.
.
.
.
.
IF sy-batch IS INITIAL.
SELECT SINGLE * FROM XXXX INTO wa_XXXX WHERE report EQ sy-repid AND vari EQ sy-slset.
ELSE.
SELECT SINGLE * FROM XXXX INTO wa_XXXX WHERE report EQ sy-repid AND vari EQ p_varnt.
ENDIF.
if i execute in forground i will get the variant name because that time sy-batch value will be initial.
but if i schedule a background through SM36 (creating a job) in development i am getting variant name i don t know how it is picking. when i transport the changes into Quality system it not picking variant name when schedule background job.
can anuone please help me why it is behaving differently in both servers.
Thanks in Advance
Sravan
2014 May 15 4:49 AM
2014 May 15 5:28 AM
hi Sravan,
I feel while saving the varinat you might have marked the check box for 'Only for back ground processing' or while creating the batch job you might have give the variant name along with the program name, Pelase cross cehck it once.
Regards
Hari
2014 May 15 7:47 AM
Hi Hari,
Thanks for reply. while creating background job i am giving variant name along with program name. everything is same in Development and in Quality. but the behavior of executing is different.
Thanks
Sravan
2014 May 15 7:55 AM
Hello Sravan,
Debug the background job in your development system and check how the variant is being picked.
Select the job in SM37 and enter JDBG in command filed and hit enter. Debugger will get activated.
Thanks
2014 May 15 8:35 AM
Hi ,
Thanks for reply.. i have already debugged and came to know that in development system it is picking before coming to CHECK statement but in Quality it is not picking..
Thanks
Sravan
2014 May 15 10:07 AM
Compare your vairants at SHD0_MANDT and find the diffrerence. Custom variants are always client dependent.
Cheers,
Thomas.