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: 

SAP Variant diplaying wrong value

Former Member
0 Kudos

Hi All,

I have a report and i need to display the variant selected by the user on the output. Now I am using the system field SY_SLSET to display the value.

Problem:

When I execute the report from selection screen by choosing the variant and run it with run in background mode from selection screen , it does not display the correct value . It displays something like &000000222.

Is there any way I can come to know user has selected which variant. Please let me know.

  • Report shows correct value in SY-SLSET when run in foreground or scheduled through SM36.

Problem comes only when it is run from selection screen with run in background mode.

An early response is highly appreciated.

Regards

Rohit

3 REPLIES 3

Former Member
0 Kudos

Hi.

Tr-cd SE38 -> menu -> Program -> Execute in Background

SM37 -> Job log variant -> &000000222.

But, Tr-cd SM36 Create job. & Execute.

SM37 -> Job log variant -> Variant ID.

0 Kudos

I got you what you are saying... but my problem is different..

Can somebody tell me how one can come to know with what varaint user is running the report . I know the field is SY-SLSET. Apart from SY-SLSET is there any way i can capture the name of the variant selected by user to run the report.

Regards

Rohit

venkat_o
Active Contributor
0 Kudos

Dear Rohit, Here is the solution. Steps 1. Execute your report in SE38. 2. Enter data on Selection-screen and create variant. 3. When you go variant creation screen, you can see check box 'Only for Background Processing'. Select that one. 4. Go to SM36 and schedule the job in background. When click on "Step", you can see the variants created for background jobs. 5. Once your job is run, you can see the variant in the spool. 6. The system variable sy-slset is the right one to use. I believe that it solves your problem. Thanks Venkat.O