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

Scheduling BDC session in background

Former Member
0 Likes
1,332

Hi all,

I am writing a program which will pull data from the flat file placed on the application server using the Read dataset command.

Then I am populating the internal table having structure similar to BDCDATA with the data from the flat file.

Then, I will be using BDC OPEN GROUP

BDC INSERT

BDC CLOSE GROUP

Now , a session gets created.

Usually, we need to go to SM35 and run that session.

My requirement is --1. This zprogram I am writing has to be scheduled to run in background.

2. The session generated has to be run in background mode. I want to handle that too in the zprogram I am writing.

My solution is -- I believe, I will have to schedule my zprogram in SM36.

It will then run in background and the session will be generated by the program.

I would like you all to tell me how to add code in the program to make this session generated run in background.

I don't know if I am supposed t use RSBDCSUB or function modules like

JOB OPEN , JOB CLOSE or 'SIMPLE_BATCH_JOB_SUBMIT'

I would like to be given a broader pic .

I need to make the session run in background or taken care of from the zprogram itself.

I dont want to got to SM35 to do that.

Warm regards

and thanking you all in advance,

Hari Kiran

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
963

Hi Hari,

1. Create the BDC program to upload the data. Don't go for creating the session if not specified in the Functional spec...go for the call transaction you get rid of handling session. use the no screen mode.

2. Report RSBDCSUB is used to run the session not for scheduing the job.

3. You can schedule the job from SM36..steps to schedule the jobs...

8 REPLIES 8
Read only

Former Member
0 Likes
963

Hi

U need to submit the report RSBDCSUB after creating the bdc session. The report RSBDCSUB will run your session in background mode.

Max

Read only

Former Member
0 Likes
964

Hi Hari,

1. Create the BDC program to upload the data. Don't go for creating the session if not specified in the Functional spec...go for the call transaction you get rid of handling session. use the no screen mode.

2. Report RSBDCSUB is used to run the session not for scheduing the job.

3. You can schedule the job from SM36..steps to schedule the jobs...

Read only

0 Likes
963

Thank you Avinash and Max,

I now have the clarity.

I searched SDN and came up with this..

SUBMIT RSBDCSUB WITH MAPPE = P_NAME

WITH VON = SY-DATUM

WITH BIS = SY-DATUM

WITH FEHLER = ' '

EXPORTING LIST TO MEMORY

AND RETURN

Please clarify the following dobts of mine and I will close this thread.

I will schedule my program in SM36.

Inside the program I will add the above " SUBMIT RSBDCSUB"

code to take care of the session generated.

Guess, you all will concurr with me on that.

Now, the doubt is...what is this MAPPE in the above code??

what is FEHLER??

and Do I need to add the code--

"EXPORTING LIST TO MEMORY

AND RETURN"

What does it do??

Warm regads,

Hari Kiran

Read only

0 Likes
963

MAPPE -


here in this u should pass the session name...

FEHLEr----session status (incorrect)

and other two rfields are valid from and to dates

Read only

0 Likes
963

Thank you palani,

can anyone answer the following--

what is FEHLER??

and Do I need to add the code--

"EXPORTING LIST TO MEMORY

AND RETURN"

What does it do??

Regards,

Hari Kiran

Read only

0 Likes
963

hi,

check these.

[https://forums.sdn.sap.com/click.jspa?searchID=19609158&messageID=1099691]

[https://forums.sdn.sap.com/click.jspa?searchID=19609158&messageID=2378901]

Read only

0 Likes
963

Hi

The option EXPORTING LIST TO MEMORY is to store the abap list ouput to memory, the rsbdcsub generates a list for a log, if u use that option u can skip this log and back to your calling program automatically.

The parameter FEHLER means it needs to run a session in error status.

So it's useless for you because u need to run a new session

Max

Read only

0 Likes
963

Thank you Max and Gautham.

That will do.

I am closing the thread.

Warm regards,

Hari Kiran