Skip to Content
0

Sequence of logic - background job call

Dec 30, 2017 at 11:25 PM

78

avatar image
Former Member

Hi ,

iam working on an requirement , user enters the data in selection screen , output will display with records , i added custom pushbutton on application toolbar , now the user enters the button a background job should be created and remaining logic should be executed ( doing rate change for customer).

idid logic for displaying report using ALV GRID and also added the push button then my logic is as below.

SET PF-STATUS 'EXECUTE'.

CASE SY-UCOM.

WHEN 'EXECUTE'.

PERFORM RATE CHANGE,.

_____________________

FORM RATE CHANGE.

..............

ENDFORM.

i know FM open-job, submit ,close_job should be called for automatic background.

my question when i need to call these FM's, because after user pressing the button , using the final itab the remaining logic should execute ,

do i need to create another report and keep my additional logic and call that from first report. or can i do everything in same report.

please help with order of the logic i should call.

thanks

NK

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Sandra Rossi Dec 31, 2017 at 09:51 AM
1

Of course you could do everything in one program but my opinion is that it's much better to separate the tasks this way:

  • program 1 for display stuff
  • program 2 for background stuff
  • database or file system (or any other means) for communicating data between program 1 and program 2
  • global class for doing common tasks
Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Jan 01 at 02:18 AM
0

Thanks for reply, I separated my logic to program1 and program 2. and using EXport for Itab transfer,

but when I debug from Progarm1 , not entering into program 2 ( even aftet setting a breakpoint on program2).

can I debug in rutime?

thanks

NK

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Please don't post a question as an "answer". There's a "convert into comment" button if I remember well.

You can't debug a background job the way you say. Search "debug job" in SCN for solutions (SM37 and "jdbg" for instance, eventually "job interception" if you need to make the job wait for you so that you can start it, or in the worst scenario add an endless loop + SM50/SM66 to debug the workprocess).

1