Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with variant ...

former_member190103
Participant
0 Kudos
259


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

6 REPLIES 6

pavanm592
Contributor
0 Kudos
163

Hi Sravan,

Is any variant defined in Quality?

Regards,

Pavan

Former Member
0 Kudos
163


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

0 Kudos
163

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

Mohamed_Mukhtar
Active Contributor
0 Kudos
163

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

former_member190103
Participant
0 Kudos
163

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

0 Kudos
163

Compare your vairants at SHD0_MANDT and find the diffrerence. Custom variants are always client dependent.


Cheers,

Thomas.