on 10-09-2005 11:23 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.
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
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
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
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
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
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
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
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
What is the status of the batch input session?
How many transactions are created?
Is there an entry in the "lock date" column?
Rob
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Was this job ever released (with date and time) ?
Cheers,
Sanjeev
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
how do you call rsbdcsub in your program?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.