10-09-2008 7:56 AM
Hi Gurus,
I am using RBIBGL00 standard batch program in my report to create a batch session and in turn execute it.
Batch session is getting created and it is getting executed as well.
Issue:
Now i need to retreive the batch information (succes/failure msgs) from the log
so i am writing code as:
select QID to display session log
SELECT SINGLE qid
INTO gv_qid
FROM apqi
WHERE datatyp = gc_bdc
AND groupid = p_group
AND progid = sy-repid
AND userid = sy-uname
AND credate = sy-datum.
But qid is not getting fetched.
Please help me to resolve this issue.
Regards'
Madan.
10-09-2008 9:16 AM
One guess is that you should try replacing
> AND progid = sy-repid
by
> AND progid = 'RBIBGL00'
since the session was created using that program, and not your custom program (value in sy-repid).
Actually, RBIBGL00 does not exist (in ECC 6.0 at least), do you mean RFBIBL00?
Still, the select is quite weak, since you may not get the correct result, if several sessions with the same name were created by the same user on the same day.
Thomas
10-09-2008 9:46 AM
Hi Thomas,
Yes a typo error from my side, it is RFBIBL00, which in turn calls RFBIBL01 to create session.
yes, the select statement is weak as u mentioned.
But is there any alternative to retreive session details from table apqi ?
Regards'
Madan.
10-09-2008 9:53 AM
Different question: RFBIBL00 can also do "direct posting with call transaction" and "direct input". Can you not use one of these these options and just read the resulting spool list? This would save you from fiddling with batch input sessions and their logs.
Thomas
10-09-2008 10:48 AM
Hi Thomas,
I am using RFBIBL00 program in my report in 2 modes,
to Create Batch session and
in Call Transaction mode as well. ( is my requirement)
1. In Call Transaction mode, i am passing the option xlog, so that after documents are loaded, a log is displayed.
2. In Batch Session mode, batch is getting created and to execute that batch, i am calling another program RSBDCSUB.
Batch is getting executed and result gets exported to memory.
I am fetching the results from memory using function module
"LIST_FROM_MEMORY"
Then converting that to ASCI fromat using function module
"LIST_TO_ASCI"
Now i need to display the session log
so i am retreving session data (QID) from APQI table.
Please let me know if there are any alternatives.
Thanks for your time and help.
Regards'
Madan.
10-09-2008 11:53 AM
Hi Madan,
RSBDCSUB shows the Queue ID in the output list. You can grab it from there, so you don't need to obtain it from APQI.
Thomas
10-10-2008 7:51 AM
Hi Thomas,
Thank you ! for your suggestion
My problem got solved.
Regards'
Madan.
11-04-2008 12:18 PM
Hiii
can you please advise how you did you submit part on both standard program
batch input and session submit