cancel
Showing results for 
Search instead for 
Did you mean: 

About using rsbdcsub to run BDC session .

Former Member
0 Kudos

Hi all,

I use rsbdcsub to run a bdc session ,

But the job created by the program is always in "ready" status and never run(complete) .

How can I solve the problem?

Thanks

Pole

Message was edited by: gw gw

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

First, create a variant for RSBDCSUB (TEST1) that will process the BDC session(s) you want.

Then in the calling program:


  COMMIT WORK.                   
  SUBMIT rsbdcsub USING SELECTION-SET 'TEST1' AND RETURN.

Strictly speaking, the commit work shouldn't be necessary, but we found that after an upgrade, the sessions weren't processed without it.

Rob

Former Member
0 Kudos

I call the rsbdcsub like this:

SUBMIT rsbdcsub WITH mappe = l_mnam1

WITH von = sy-datum

WITH bis = sy-datum

EXPORTING LIST TO MEMORY.

Does it right?

Former Member
0 Kudos

Have you checked OSS 35381 and the authorization issue.

Cheers.

Former Member
0 Kudos

Hi Sanjay Sinha

I checked it and applied it,But the problem still occured.

Former Member
0 Kudos

On which SAP R/3 version you are on.

What is the session name which you are passing to RSBDCSUB. Put a break point on the statement SUBMIT RSBDCSUB... and check in another session in SM35 if the session is displayed as "NEW" here.

Seems that RSBDCSUB is not able to find the correct session name or there are multiple sessions with same name.

Check the OSS note - 845020 / 74411 / 15999 . You may find an answer here.

Cheers

Former Member
0 Kudos

We are on SAP R/3 4.7

In our case,RSBDCSUB can find the session(the session name is created by the program and is unique) and create the job, in sm36,we can see the job like this:

Job CreatedBy Status Startdate Starttime Duration delay

XXX-00102 xxx Ready 2005-10-09 18:12:52 0 0

the problem is that the job can not be executed.

Thanks very much for your reply.

Former Member
0 Kudos

Can you please post the code for 1)where you create the job, 2)where you submit the RSBDCSUB and 3) where you close the job?

Also, just for testing purposes, create the session from your program and then run RSBDCSUB from SE38 separately <b>(execute in background)</b>. See if the job goes into 'Ready' status and stays there.

Srinivas

Former Member
0 Kudos

I create the sm35 session

CALL TRANSACTION 'FF67' USING t_bdcdata MODE l_mode

UPDATE 'S'

MESSAGES INTO t_msg_tab.

l_mnam1 is the session name,

then:

SUBMIT rsbdcsub WITH mappe = l_mnam1

WITH von = sy-datum

WITH bis = sy-datum

AND RETURN

EXPORTING LIST TO MEMORY.

all the job done by rsbdcsub.

and I tried for testing as you said,the result is the same,the job still remaind the "ready" status.

thanks

Pole

Former Member
0 Kudos

It looks to me like you're confusing call transaction with BDC. The code you've posted will call and process the transaction immediately without creating a BDC session.

Rob

Former Member
0 Kudos

As Sanjay said, where is your logic that creates the session. You typically use BDC_OPEN_GROUP,BDC_INSERT and BDC_CLOSE_GROUP. Do you have them in your code?

Srinivas

Former Member
0 Kudos

Hi,

I know what will happen by calling transaction with BDC, When you call some Tcode, it create the session by the tcode itself, Tcode "FF67" create the BDC session.When you fill all the data, and do the Bank posting,it will create the session.

Former Member
0 Kudos

I've done this before. No batch input session is created. The transaction is executed immediately. Since you are putting the messages into t_msg_tab, your program is expecting the transactiopn to be executed in the program. You can test this by putting a break point before and after the call transaction. You'll see the transaction get executed and you'll also be able to read the messages that are in t_msg_tab.

Rob

Former Member
0 Kudos

Hi,

Maybe I made myself misunderstand.

I mean that ff67 executed immediately after I call transaction in my program,and then a session for Bank posting created by it.In sm35, I can saw the session,but it can not be executed because it remainded "job" status.

I checked the job in sm37,it remainded "ready" status and can not finish.

thanks!

Pole

Former Member
0 Kudos

Hi Pole,

What is the name of session created by FF67 ??

How do you capture this as you have to pass it to RSBDCSUB .

Have you tried running your program , check in SM35 if session exists. Later goto SE38 and execute RSBDCSUB ( not thru your program , in your program please comment this out ) with the session anme and then see if the job still remains in ready status. Also check if you can process the session from SM35 -> In background.

Cheers

Former Member
0 Kudos

Hi Pole,

Now I see what you are trying to do. Please give me some inputs.

You are calling FF67 from your program with BDC data.

You are trying to process the session that is created as a result of this call transaction.

I think I am on the right track here. Now my question is FF67 is for manually uploading bank statment into the system. If your users don't want to do this manually, then why don't you simply use the SAP standard program that uploads the bank statement automatically. The program is RFEBKA00. Schedule this instead of trying to do the call transaction for the manual posting transaction.

If you still want to take the call transaction route, please post your logic for filling the initial screen of FF67.

Regards,

Srinivas

Former Member
0 Kudos

Hi Srinivas,

Thanks very much.You understood what I meant exectly.

Because the files provided by the several banks systems are not the same format,so we can not use the report RFEBKA00.And now we are developing the system connecting to the bank system directly,we can get the data from the bank and upload them to the sap system without creating a file.

So we use the FF67 BDC

The program like this:

"it_data" is the internal table containing the data from the bank system.

"l_mnam1" is the session name created by the program.

PERFORM fill_bdcdata USING:

'SAPMF40K' '0110' 'X',

'FEBMKA-FDIS_SEL' 'X' ' ',

'FEBMKA-VARI_START' 'TKL01' ' ',

'FEBMKA-DEBI_MID' 'D' ' ',

'FEBMKA-KRED_MID' 'K' ' ',

'FEBMKA-WVAR_ART' '2' ' ',

'FEBMKA-BUCH_VAL' 'X' ' ',

'BDC_OKCODE' '=ENTE' ' ',

'SAPMF40K' '0102' 'X',

'FEBMKA-BANKL' t012-bankl ' ',

'FEBMKA-BANKN' t012k-bankn ' ',

'FEBMKA-WAERS' 'CNY' ' ',

'FEBMKA-AZNUM' febko-aznum ' ',

'FEBMKA-AZDAT' l_azdat ' ',

'FEBMKA-SSALD' l_esbtr ' ',

'FEBMKA-ESALD' l_ssbtr ' ',

'FEBMKA-BUDTM' l_BUDTM ' ',

'FEBMKA-MNAM1' l_mnam1 ' ',

'BDC_OKCODE' '/00' ' ',

'SAPMF40K' '8000' 'X'.

SORT it_data BY valut.

LOOP AT it_data.

WRITE it_data-kwbtr TO l_kwbtr CURRENCY 'CNY'.

l_zuonr = it_data-zuonr.

PERFORM fill_bdcdata USING:

'FEBMKA-VGMAN(01)' it_data-vgman ' ',

'FEBEP-VALUT(01)' it_data-valut ' ',

'FEBMKA-KWBTR(01)' l_kwbtr ' ',

'FEBMKK-ZUONR_KF(01)' it_data-zuonr ' ',

'FEBMKK-SGTXT_KF(01)' l_zuonr ' ',

'BDC_OKCODE' '=ZINS' ' ',

'SAPMF40K' '8000' 'X'.

AT LAST.

PERFORM fill_bdcdata USING:

'BDC_OKCODE' '=SICH' ' '.

ENDAT.

ENDLOOP.

PERFORM fill_bdcdata USING:

'SAPMF40K' '0102' 'X',

'BDC_OKCODE' '=BUCH' ' ',

'SAPMF40K' '0102' 'X',

'BDC_OKCODE' '/EENDE' ' '.

l_mode = 'N'.

CALL TRANSACTION 'FF67' USING t_bdcdata MODE l_mode

UPDATE 'S'

MESSAGES INTO t_msg_tab.

Thanks again for your help.

Pole

Former Member
0 Kudos

Please forgive me for not paying attention to your BDC logic at this time. I still want to persue the RFEBKA00 option. Even if you are getting the bank statement in different formats, and if you are not getting files from them, can you not have this program that you are writing, convert all those different formats into a format required for this program? This is how I am thinking.

Get data from different banks. Your program knows how to differentiate one bank from another. So your program knows the source format and target format(that is the file layout required for RFEBKA00). Convert the source format into the target format and create a file. Use the RFEBKA00 program to read that file and upload the bank statement. If you don't want to have those files lying around, you can always clean the directory later on at an OS level.

The advantage with this is, you don't have to go to the bank again and again to get the bank statement, if for some reason, your upload fails. Also, you are pretty much using the standard SAP program so you don't have to worry about this BDC.

There are 4 non-country specific formats available to be uplpoaded by this program. Your different bank statements are not following any of these standards?

If BDC is the way you want to do this, check FEBMKA-NM1VB and FEBMKA-JNAME. I think they also play a role here. The next thing to do is, comment out the SUBMIT RSBDCSUB and let the sessions stay there. See if the sessions are created properly. See what specifying the job name does? Also, if you are giving just the session name for 'Bank Posting Session', then you have to check the box FEBMKA-NM1VB. If you don't check the box, then you may have to give both session names 'FEBMKA-MNAM1' and 'FEBMKA-MNAM2'. Try to isolate the problem, by doing one change at a time.

Srinivas

Former Member
0 Kudos

Hi,Srinivas

Thanks very much!

We found the reason at last,when the session name contains chinese character,the job remains "ready" status,So we removed the chinese character from the session name, and now it works well.

Thanks very much for all your help.

Pole

Former Member
0 Kudos

Hi Pole,

Good to know that you solved it .

<b>What is the name of session created by FF67 ??

How do you capture this as you have to pass it to RSBDCSUB .</b>

I guess you didnot notice the above suggestion in this thread.

Now since you problem is solved can you close this thread.

Cheers.

Answers (4)

Answers (4)

Former Member
0 Kudos

What is the status of the batch input session?

How many transactions are created?

Is there an entry in the "lock date" column?

Rob

Former Member
0 Kudos

Hi

This seems to be an authorization issue. Check if the user executing RSBDCSUB has the authorization to schedule a job in SM36 . See OSS note 35381 .

Cheers.

Former Member
0 Kudos

Hi,

The user executing RSBDCSUB has the SAP_ALL authorization,so I am afraid that it is not an authorization issue.

Former Member
0 Kudos

Was this job ever released (with date and time) ?

Cheers,

Sanjeev

Former Member
0 Kudos

Hi

how do you call rsbdcsub in your program?