Application Development and Automation 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: 
Read only

Problems when defining Background Job

Former Member
0 Likes
7,252

Hello everyone,

I got a special problem when defining a background job (transaction SM36). For describing the problem, it is necessary to describe our system landscape. We got three systems: First our development system (E*) which is only for developing, then our test system (Q*) which is used for testing and is a copy of our productive system (P*).

The following problem I got only in our E-System. No problems with it in Q* or P*-System. So it is a little bit confusing, because all systems are on same release.

When I try to define a new background job with SM36 and try to enter the name of the abap program and the name of the variant in corresponding language, I got error message 'Enter a valid value' which refers to the variant field. The funny thing is, that the entered variant is clickable with F4-Value Help but SAP does not let me save the job when clicking on save or check.

Anyone got this problem too and a solution for it?

Kind Regards

Michael Boguth

30 REPLIES 30
Read only

sandeep_katoch
Contributor
0 Likes
6,018

Hi Michael,

It seems to be a bit confusing but you can try following

1: Check in transaction se38 by giving the name of report and the name of variant. Once you enter the name of program and variant click on display variant radio button, see if the value is appearing for the variant.

2: If no create a variant in se38 T code.

3: Check in table Varid by giving the value of report and variant whether the entry exists or not.

4: Once all is done and everything seems to be perfect then try to create a new varaint for test and create a job with the newly created variant.

Regards,

Sandeep

Read only

0 Likes
6,018

Hi Sandeep,

unfortunately it does not help. The variant is available in SE38 (I created it there) and also in table VARID. I created a new one with SE38 by saving it in the selection screen, but got the same problem.

One special thing that came up:

Of course I canot create background job without variant. And If I click on one of the variants, I got the problem with 'enter correct value'. But when I do not put any value in the variant field, then automatically the variant popup comes up and in some cases - after clicking on one of the values - I am able to save it. But I did not found out yet in which scenario I am able to save it, because normally (in most cases) it does not matter If I double-click on one variant or click it with the green arrow, I am not able to save.

Regards
Michael

Edit:

Ok I found out when I am able to save it. It works with:

1. Entering no variant value

2. Click on save button for the step -> then variant popup comes up

3. Choose variant

-> by doing it like this it looks like I get through the check with the variant.

Read only

0 Likes
6,018

hi Michael,

This is really very weird case but anyways when you have got the workaround then meantime you can go with it.

Regards,

Sandeep

Read only

Former Member
0 Likes
6,018

Dear Michael,

Your issue is really confusing.. I too agree...

My opinion is go to SM37 and click on JOB WIZARD and try to create the job.

Hope it will work..

Thanks ,

Anoop S

Read only

Former Member
0 Likes
6,018

I have the strange feeling that it refers to some inconsistency in our developtment system, because it is of course for testing everything 😉

I tried to debug through SAP standard program yesterday, but was not able to find the point where the message came up. Unfortunately it is standard message, message class 00, message no. 002 which is used for message in several programs.

Does anyone know how to find it? By searching the message, I get a list of ~100 programs where none of them sounds right 😉

@Annoop

Where dou you find JOB WIZARD? I do not see this in SM37.

Regards
Michael

Read only

0 Likes
6,018

Hi Micheal,

Try this to debug.

Enter into debugging mode and click on breakpoints at statement :-

Put a break point at statement message and click enter.

wherever the message statement is coming and is getting executed debugger will stop.

Regards,

Sandeep

Read only

0 Likes
6,018

Hi Sandeep,

the problem is not how, but where 😉

When I try to debug with '/h' it does not work, because I can only enter in in transaction field, before i get in detail mask for step definition.

When I look for the message, it gives me a list with 100 programs and from the name none of them looks right.

When I look in function group SAPLBTCH for SM36, there is a huge list of includes where it is not easy to find where the message came up.

Regards

Michael

Read only

0 Likes
6,018

Hi Michael,

Sorry it is in SM36..Go to SM36 and there you can see the Job wizzard.

Thanks ,

Anoop

Read only

0 Likes
6,018

Hi Michael,

Sorry it is in SM36..Go to SM36 and there you can see the Job wizzard.

Thanks ,

Anoop

Read only

0 Likes
6,018

Okay then do one thing

create a notepad . txt file with these details

[FUNCTION]

Command=/H

Title=Debugger

Type=SystemCommand

Save it.

When you are about to enter the value of variant or after you have entered the value of variant then drag and drop this text file from desktop either the check button or save button. Once you will press any of these button debugger will start.

From here put a breakpoint on mesage statement and check in which program and where this message is creeping from.

Regards,

Sandeep

Read only

0 Likes
6,018

@Anoop

Same problem in Job Wizzard when entering variant name 🙂

Read only

0 Likes
6,018

Hi Michael,

Are you sure that the varient is there in the dev system?
Or create another varient and try....

Read only

0 Likes
6,018

@ Michael,

Or in Job wizard click on the F4 option for varient.
See the picture.

Read only

0 Likes
6,018

@ Michael,

Or in Job wizard click on the F4 option for varient.
See the picture.

Read only

0 Likes
6,017

Wohoo, text document with command /h, really nice 🙂

Never heard that before.

I did it but unfortunately it does not help. Message cames up after proving field variant (see the mark in screenshot 1) and then goes to screenshot 2. Message ID and message no. are prefilled when entering method GET_LINK. Never seen that before 😉

 

Read only

0 Likes
6,017

Yes they are availabe in value-help F4, thats the confiusing about it. They are in table VARID as well, so everything looks fine, but unfortunately SAP does not accept them.

Read only

0 Likes
6,017

Hi Michael,

that 2nd screen get_link method is executed whenever the program is displaying messages. It means that the value which is capturing from screen field is invalid though i dont know why. This thread is really interesting. Hope you will find the answer for it.

thanks.

Read only

0 Likes
6,017

Put a Break point on Function Module BP_CHECK_REPORT_VALUES  in Include LBTCHF07.

Check what Sy-subrc is coming.

If everything is fine till here than move ahead with step by step debugging.

Regards,

Sandeep

Read only

0 Likes
6,017

Hai Sandeep,

This .txt file debugging is a very good idea... And it is new to me...

Thanks a lot for this info...

Anoop Satheesan

Read only

0 Likes
6,017

Just for reference : Note 118184 - SAPshortcut - debugger start

Regards,

Raymond

Read only

0 Likes
6,017

Hm Does not work. I do not get to this function module. Looks like that message comes up earlier.

Read only

0 Likes
6,017

Check the variant for attributes like client or language (can you see their description text ?) That could cause the problem.

Also you could look for errors in SM21 or SU53.

Regards,

Raymond

Read only

0 Likes
6,017

Hey if you are getting that message just after the screen field  is executed inside the chain it only means that the value is unfortunately not captured properly. Check anything changed in layout of the field in program SAPLBTCH with screen number 1120. Check these are same in quality and prod.

thanks.

Read only

0 Likes
6,017

Hm it is difficult to look for any values, because it looks like that I canot find any point between entering the value of the variant and click on prove / save. No breakpoint in program SAPLBTCH gets me there before getting to the chain in dynpro 1120 with field VARIANT.

Btw. what I should say. It is a general program in SM36. It does not refer to Z-report or some special report. Its with all reports. Looks like a general technichal problem for me, but I got no idea where to look 🙂

@Raymond

SM21 and SU53 does not give any value. I got SAP_ALL rights. In table VARID language and so on look right, just the same like in productive system. Where should I find the description? In value-help for variant I do not see this (only technical key) but this is in every system the same.

Read only

0 Likes
6,017

Description : VARIT.

Regards,

Raymond

Read only

0 Likes
6,017

Yes, in table VARIT everything looks ok as well.

I would say all tables look right as well as the value-help in field variant.

And the other thing is that - when I debug - I am getting straight to Dynpro 1120 PAI module just until field BTCH1120-VARIANT and then get straight to method GET_LINK and do not enter any other function modules for value-check of field variant (no other breakpoint which I have set was entered).

Read only

0 Likes
6,017

Hey Michael, As I already mentioned when ever system encounters a message that is to be displayed it calls GET_LINK method. That is not the problem here.. When the FIELD BTCH1120-VARIANT is executed it is failing to capture the the value you entered in that field instead it is capturing an invalid value though i don't know why. Because of this the system wanted to display the message INVALID VALUE and calls GET_LINK message to display the message. Please find why the value you entered is not capturing into the field VARIANT. Anything changed in here which is not there in quality or prod.

thanks.

Read only

0 Likes
6,017

Yes, I understood that, why GET_LINK is executed.

But the problem is, when I just start debugging (with /h) after I have entered variant name and clicked on prove or save, I get straight into PAI module of dynpro 1120 starting with the CHAIN of fields. So there is no earlier point where I can get to because /h gets you to the earliest break-point after clicking isn't it?

Every breakpoint that I tried in different methods / function modules / includes for dynpro 1120 did not react before getting to the CHAIN.

Edit:

In quality and productive system it works the same by the way. I just start entering the CHAIN filling the BTCH1120 structure fields in it. The only difference is, that when getting to field BTCH1120-VARIANT in quality/prod SAP gives me the correct entered variant key, and continues with the following fields of the chain, and in development it gets me to the GET_LINK method.

Read only

Former Member
0 Likes
6,017

Unfortunately we still have the problem which is very annoying 😕


Anyone got an idea?

Regards

Michael

Read only

0 Likes
6,017

Hi Michael

Try logging this as issue with SAP OSS.

They may have a note which can fix, or issue a note if they can replicate the problem.

Regards

Arden