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: 

backgroung job through program

ukiranta
Participant
0 Kudos

Hello experts, my goal is to create a background job from sm36 and call it from se38 program. I need a selection screen with one table variable. Can u please help me solve this issue?

1 ACCEPTED SOLUTION

vijay_hariharan
Contributor
0 Kudos

What is your requirement? You want to execute a dailog Program as a Background Job? OR is it something else.. When you say Selection screen value then run job.. not quite sure what your requirement is.. Check the Thread with a lot of different scenarios mentioned..
https://answers.sap.com/questions/3074282/how-to-set-up-bg-job-through-program.html

9 REPLIES 9

vijay_hariharan
Contributor
0 Kudos

What is your requirement? You want to execute a dailog Program as a Background Job? OR is it something else.. When you say Selection screen value then run job.. not quite sure what your requirement is.. Check the Thread with a lot of different scenarios mentioned..
https://answers.sap.com/questions/3074282/how-to-set-up-bg-job-through-program.html

0 Kudos

First of all, thank you for the helpful link. And my requirement is I have a sale_date variable in my table. My requirement is to create a program and enter a date into the selection-screen. If X shop does NOT have a sell at that date, I want to recieve an email about it. Can you please help me with this ?

0 Kudos

Does this mean your requirement is for email and not a background job? You should be able to find a lot of resources in the forum & over internet on how to send email.. You may check standard demo class CL_BCS_TESTMAIL..

Regards,
Vijay

0 Kudos

vijay.hariharan Actually we can say "job" because It has to send the email everyday.

0 Kudos

Well i would say, you have all the resources for it and you just need to implement your logic and either set-up the Job via SM36 or you can also run this via dialog as per the first blog link.. For mail, check out the standard demo or you'll find further resources in the forum.. You can mark the answer and close the thread when possible

Regards,
Vijay

Sandra_Rossi
Active Contributor
0 Kudos

Your requirement is unclear. For each question, you can refine by searching in the forum. Is the job already defined in SM36 but without a start condition? If so, function module JOB_CLOSE to start it from program. What is "a selection screen with one table variable"?

ukiranta
Participant
0 Kudos

sandra.rossi I dont know the reason for you saying "unclear" to all of my questions. But I can describe to you again. I want to select a date in the selection screen. And when I run the program. It will automatically send email... I have the table which has the date variable. Just this...

Sandra_Rossi
Active Contributor
0 Kudos

Oh sorry, I don't target you personally, I say "unclear" or "don't understand" to many questions in the forum 😉 (I don't target any people). Maybe it's just about English, it's not my mother language, and maybe not yours, so maybe we don't use the right words. I see that Vijay also didn't understand your question, because he keeps talking about SM36, so it's not only me 😉

Probably I was not clear in my comment if you didn't understand that I just asked for clarification: you are talking about SM36, but now I understand that "SM36" is not part of the question, you are just saying that your program is launching a background job (JOB_OPEN, SUBMIT, JOB_CLOSE). Now you are talking about a "date", but in your question you are talking about a "table". I don't understand if your question is about the selection screen, or passing a table, or passing the date in the table, or sending an email, or building the HTML code in the email body for displaying the table or the date...

ukiranta
Participant
0 Kudos

sandra.rossi oh no problem. Probably a misunderstanding as you mentioned. Thank you for your reply but nevermind the question. Have a good day 🙂