How to check whether a batch input session is completed in ABAP program
I have created a ABAP program to create a batch input session (reference to RSBDCSUB). After the creation of the batch input session, I kick it to start and read the execution log. However, sometimes I cannot read anything from the execution log as the execution of the batch input is a synchronized process to the execution of my program, i.e. at the time being that I try to read the log of a particular transaction, that transaction is being processing / haven't start processing.
How can I check whether a batch input session is completed in the program?
The code that corresponding to the triggering of batch input session:
SUBMIT (SUBREPORT)
USER MTAB-USERID
VIA JOB MTAB-GROUPID
NUMBER JNUMB
WITH QUEUE_ID EQ MTAB-QID
WITH MAPPE EQ MTAB-GROUPID
WITH MODUS EQ 'N'
WITH LOGALL EQ LMODUS
Or is there any method to wait here until the process is completed before further processing?
Hi gundam,
1. Or is there any method to wait here until the process is completed before further processing?
There is no such direct method to wait.
2. Immediately after submitting in background,
we cannot wait
neither can we LOOP and go on detecting
whether the b/g process has completed or not !
3. To over come such problems,
we have to use another technique.
4. we have to submit another
job which will get triggered
on event SAP_END_OF_JOB
ie. when the original job will finish,
our new job will AUTOMATICALLY get triggered,
5. This new job / program
will do the FURTHER actions !
regards,
amit m.
Similar Messages
-
How to handile errors in batch input(session)method
Hi Friends..
How to <b>Re upload the error records</b> in batch input(session)method in BDC Programming?
Regards
D BabuHi
U can do it manually by SM35: the wrong trxs can be run again.
If you want to do automatically I don't think you can do it easyly, because to know if a record was loaded successfully depends on how you have loaded it and your data source .
For example:
if the records have to be loaded are from a file and every record is a trx, you could re-read the file and match it with session log:
Log--Result--
Record file
Trx 1 OK 1
Trx 2 OK 2
Trx 3 KO 3 (Re-load it)
Trx 4 OK 4
Trx 5 KO 5 (Re-load it)
Trx 6 OK 6
How to read session log see trx sm35
Max -
Batch input session to FB01 using standard program RFBIBL00
Hi all,
I am creating a batch input session using the standard program RFBIBL00 to simulate transaction FB01.
My problem is when I process the "batch input session" (using transaction SM35), this finish ok, but in the log I am retrieving the following message:
"Field BSEG-DMBTR. does not exist in the screen SAPMF05A 0300"
This is a success message and the document is created ok,and the field DMBTR is informed ok.
Has somebody some idea?.
Thanks so much in advance for any answer.Hi gundam,
1. Or is there any method to wait here until the process is completed before further processing?
There is no such direct method to wait.
2. Immediately after submitting in background,
we cannot wait
neither can we LOOP and go on detecting
whether the b/g process has completed or not !
3. To over come such problems,
we have to use another technique.
4. we have to submit another
job which will get triggered
on event SAP_END_OF_JOB
ie. when the original job will finish,
our new job will AUTOMATICALLY get triggered,
5. This new job / program
will do the FURTHER actions !
regards,
amit m. -
How do I get the Batch Search Strategy Type in an ABAP program?
Hi Experts,
I have a requirement to filter the Batch Search Strategy Type in a BADI. For example, I have a Strategy Type ZD01 which is a Customer/Material combination. This has been created and checking VCH3 confirms that.
For example, I am implementing BADI VB_BD_SELECTION~PRESELECT_BATCHES and will put the filtering in there. For example, I go to transaction VL01n then create outbound delivery with order reference, in the PRESELECT_BATCHES portion, I will do a filtering that if Batch Search Strategy Type = ZD01, then do some code.
My problem is, I don't know how to retrieve the Strategy Type. I can use the parameters I_KOMKH-KUNNR (Customer) and I_KOMPH-MATNR (Material) of method PRESELECT_BATCHES to retrieve the Strategy Type but I don't know how.
Any tips?Hi Experts,
I have a requirement to filter the Batch Search Strategy Type in a BADI. For example, I have a Strategy Type ZD01 which is a Customer/Material combination. This has been created and checking VCH3 confirms that.
For example, I am implementing BADI VB_BD_SELECTION~PRESELECT_BATCHES and will put the filtering in there. For example, I go to transaction VL01n then create outbound delivery with order reference, in the PRESELECT_BATCHES portion, I will do a filtering that if Batch Search Strategy Type = ZD01, then do some code.
My problem is, I don't know how to retrieve the Strategy Type. I can use the parameters I_KOMKH-KUNNR (Customer) and I_KOMPH-MATNR (Material) of method PRESELECT_BATCHES to retrieve the Strategy Type but I don't know how.
Any tips? -
Please help me with some questions with batch input session?
hello everyone.
I come to some questions like
1 What is a batch input session ,
2 What is the alternative to batch input session?
3 An ABAP program creates a batch input session. We need to submit the program and the batch session in back ground. How to do it?
would you please help me with the questions, couldn't thank you more.
Best regards
FrankHi
Batch Input Session:
BATCH INPUT SESSION is an intermediate step between internal table
and database table. Data along with the action is stored in session
ie data for screen fields, to which screen it is passed, program
name behind it, and how next screen is processed.
Three processing modes of executing Batch Input Session :-
Run Visibly : You can correct faulty transactions online & work step-by-step through the transactions not yet executed.
Display Errors only : You can correct faulty transactions online. Transactions not yet executed, but without error, run in the background.
Run in Background .
2) What is the alternative to batch input session?
Call transaction.
3) An ABAP program creates a batch input session. We need to submit the program and the batch session in back ground. How to do it?
go to SM36 and create background job by giving
job name,job class and job steps (JOB SCHEDULING) -
Rename Batch input session name
I am generating a BIM after executing the depreciation run with a name "RAB" instead of "NL2Z".
But i am unable to process the wrong named BIM,
How can i change the Batch input session name to new one.Hi,
@Andreas 1) Batch Name is an Authorisation Object
You will have to contact your BASIS people to get the authorisation to process the file.
Kind regards -
How to check whether a user session is null or not
Hi
I am using Jdeveloper 11.1.2.2
I have a use case of running some Junit test case, this is the problem I have :
There are some Junit tests which are written for some VO's. While testing insert and update operation in Junit there is two mandatory columns Created by and Updated by to be entered for committing into the database.
These values are taken from the UserName of the current UserSession .
So for getting the these values for each user I thought of displaying a JPanel before the test is run, where the user enters the Username and password which is validated and the user is verified.
First, I need to check whether there is a session present or not. For checking this, I wrote a createUserSession() and did like this inside it :
if(fixture.getApplicationModule().getSession().getUserData().isEmpty())If so to show the Jpanel and get the user details and verify the user.
But while running the test itself I found that the session is already present, now I just have to input the values based on who is the user.
But Junit doesn't run the tests in the order in which the test are written. So I have to call this in all the test cases.
The Question is :
How can I check whether the session is already present or not, so that I don't have to ask the user every time while every test is running to enter the Username and Password ?
Thanks,
Nigel.
Edited by: Nigel Thomas on Jul 30, 2012 10:26 AMHi,
wondering why don't you create test users and then automatically log them in as Jan Vervecken did on the threads I pointed you to. This way your test cases run without user interaction. To test if a session exists for a user, I would put a custom property into user data. If this property exists, the user session is an existing one. However, make sure the information you save into the user data survives passivation as otherwise the information you get out of this is not accurate. See: http://tompeez.wordpress.com/2011/07/08/jdev-always-test-your-app-with-applicationmodule-pooling-turned-off/
Frank -
How to see the Batch input session name in SM35 with User name.
Hi
Yesterday,User has created one Batch input session from FBWE and selected process button after that display errors only tick mark in SM35. Then the system displayed one error message"No Batch input data for screen SAPMF05A 0700".After that he came out from the screen. He dont know what happened.
Today we have verified in SM35. But there is no batch input session with his name. We have verified in incorrect screens and every thing in SM35.
We have verified in Table 'T045DTA'. There are some entries are there.
We dont know the session name also.
How we can find the session name created by the User.
We have not deleted any thing.
Please help me
Thanks
Ravi.Hi Ravi,
Yes, you should be able to create a new batch job for FBWE. You can see your own batch sessions from SYSTEM ==> OWN JOBS
Regards,
Mike -
How do I create a data set ready for a batch input session
Hi:
I don't know how to create a data set ready for an BATCH-INPUT SESSION.I know that with the function BDC_INSERT make de input online, but my requirement is that generate the data set and left to the user get in de SM35 transaccion and decide to him if it's execute or not. I have all the information in a BDCDATA table.
Any clue would be great!!You just have to do:
BDC_OPEN_GROUP (Open new batch)
BUILD BDC DATA (Your own code)
BDC_INSERT (Insert BDC data you have built in step 2)
BDC_CLOSE_GROUP (Close batch)
This will just create a new batch and it can be processed in SM35.
To build BDC data:
LOOP AT your_input_table.
<<here you have to use the code generated from recording in trasaction SHDB>> (i.e. bdc_dynpro and bdc_field performs)
ENDLOOP. -
How to delete batch input session still in process since year 2000
Hi All,
in our productive system we have still batch input session in process from year 2000, and I would like to delete them, but how to do this, because the error message is "Unable to schedule session .....".
Thanks for your helpHi Olivier ,
Such error occurs when you are trying to run session in foreground and some error occurs with connection.
As such these session are not harmful in any way. You can request basis person to remove those sessions.
Regards,
Mohaiyuddin -
How to process batch input session through program
Hi Friends,
I am getting 5 batch input sessions in SM35,but I want to process these all sessions through program without going to SM35.
How it is possible through Program?
Please Guide me!
Thanks,
YogeshHi,
It's the report to run the batchinput sessions.
When you create to B.I. session, you can execute it by transaction SM35 (but it uses rsbdcsub) or rsbdcsub.
For example you can use it in the same program where you create B.I.:
Here the code to fill the structures of FI batch input
standard....
...here it creates session...
SUBMIT RFBIBL00 WITH DS_NAME = VA_FILE
WITH CALLMODE = CALLMODE AND RETURN.
....here it runs session....
SUBMIT RSBDCSUB WITH MAPPE = P_NAME
WITH VON = SY-DATUM
WITH BIS = SY-DATUM
WITH FEHLER = ' '
TO SAP-SPOOL
LIST NAME P_NAME
LIST DATASET P_NAME
COVER TEXT P_NAME
NEW LIST IDENTIFICATION ' '
EXPORTING LIST TO MEMORY
AND RETURN.
regards,
Shiva. -
How to run the Batch input session(SM35) in background thru Report program
Hi Experts,
I am working in one modification report requirement ,the report is Mass upload will update and run the file via batch input session. The client requirement is to implement the report execution in background mode , the batch input session will process automatically (ie. the job runs the batch input session in background and process the session ends).
Currently, the report calls SM35 to write a batch input session and the user manually selects the session and record the transactions.
Once the Transaction enters and the selection-screen inputs are given, then the transaction executed in background mode and all the above batch input process to be implemented.
Please advise and guide me, how to proceed.
I need your guidance to proceed via Call transaction using bdcdata statement, if it can be achieved the requirement.
Thanks & Regards
San.Hi Arabind Prasad,
Thanks for your inputs.
I know the process of the report Execution in background and job steps.
I want the inputs for how to upload thru Batch input session in background job and the session should also processed automatically
Currently the report logic declared like call transaction 'SM35' and skip first screen.Once the report (tcode) executed (not in background) It writes one session in SM35. The user should select the session and process the transaction manually.
The new requirement is, if the report (tcode) executes in background mode...what and how the batch input session should be declared and how it process automatically (like you said mode 'N').
Hope I am clear in my query.
Please advise.
Regards
San.
Edited by: San Learner on Mar 1, 2011 7:16 PM -
How to delete old entires in batch input session sm35?
How to delete old entires in batch input session sm35?
Points assigned!
Thank you.In SM35, highlight each entry to be deleted and from the Menu ->Session ->Delete
-
How Can we delete automatically Incorrect Batch Input Sessions
Dear Experts
As per Note 16083 the Schedule of below program only deletes
successfully created Jobs
SAP_REORG_BATCHINPUT | RSBDCREO | yes | daily
How to delete Incorrect BATCH INPUT SESSIONS AUTHOMATICALLY
RgdsHi,
You could use the following code sample on SDN:
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/4794fc01-0901-0010-0fbf-beadbebbec54
Regards,
Gary -
How to process a batch input session directly from the program
Hi,
I have developed a program which will create a batch input session.
When the program is executed, the session should get processed . ie. the user need not have to go to sm35 to process the session. I am facing some problem in this.
I am using BDC_INSERT by passing the tcode . The session is getting processed, but when i go to sm35, i noticed that the session is still listed under the "New" tab instead of the "Processed" tab.
Also I am not getting the final window with the buttons " Session overview" and "Exit Batch Input".
Please help me out in this.Hi
U have to submit the program RSBDCSUB:
SUBMIT RSBDCSUB WITH MAPPE = <session>
WITH VON = SY-DATUM
WITH BIS = SY-DATUM
WITH FEHLER = ' '
EXPORTING LIST TO MEMORY
AND RETURN.
Max
Maybe you are looking for
-
hello folks i want to a bapi for transaction <b>VL01NO</b>. this transaction is used for creating outbound delivery <b>wihtout a order reference</b>. I did a search but was not able to find a bapi pls help.
-
Text field contents overlap the static text below.
hi all, I have got a problem with the size of a text field in my form. In the form, below the text field, i have got a static text. The height of the text field varies dynamically depending on the size of the string coming from the backend. Now, as t
-
Auto create dependency between ViewController and ApplicationController
Hi all, When you create a new ADF Mobile app, you will automatically create two projects: ViewController and ApplicationController. I noticed that these are not related, that is, a dependency between these is not created in the ViewController. I thin
-
Step by Step guid to extending BDocs
Hi, Does anybody have and docs about how to extend a BDoc. I am having difficulty in finding anything. Points will be rewarded. Thanks Martin
-
Log4j and Jboss are acting weird
This question is reagards to Log4j and JBoss and I thought this is the best place to ask this question. I am using Jboss 3.2.3. My purpose was to log messages in a seperate file "developer.log" using Log4j. These messages has to be logged in this fil