11-16-2006 5:52 AM
hi experts,
I am writing batch input session, without going to sm35 i need to write the code in the program for process that session.
how can i write the code for this, can anybody help me for this.
Thanks in advance,
praveen.
11-16-2006 6:01 AM
Hi Praveen
Please check this code to submit a session for immediate execution.
<b>
SUBMIT RSBDCSUB TO SAP-SPOOL WITHOUT SPOOL DYNPRO
WITH IMMEDIATELY = SPACE
WITH MAPPE = G_SESS
WITH VON = SY-DATUM
WITH BIS = SY-DATUM
WITH Z_VERARB = 'X'
WITH FEHLER = SPACE
AND RETURN.
</b>
Note that G_SESS in the above statement indicated the session that has been created.
Kind Regards
Eswar
11-16-2006 5:58 AM
11-16-2006 5:58 AM
Hi
If you want to run your session immediately after creating it by RFBIBL00, you should use ths std program RSBDCSUB:
Create the session
SUBMIT RFBIBL00 WITH DS_NAME = VA_FILE
WITH CALLMODE = CALLMODE AND RETURN.
Run the session:
IF CALLMODE = 'B' AND P_NOW = 'X'.
SUBMIT RSBDCSUB WITH MAPPE = BGR00-GROUP "Session Name
WITH VON = SY-DATUM
WITH BIS = SY-DATUM
WITH FEHLER = ' '
In this way RSBDCSUB user doesn't see the list showing * the result of execution
EXPORTING LIST TO MEMORY AND RETURN.
ENDIF.
Regards
Ram
Message was edited by:
Ram Mohan Naidu Thammineni
Message was edited by:
Ram Mohan Naidu Thammineni
11-16-2006 6:01 AM
Hi Praveen
Please check this code to submit a session for immediate execution.
<b>
SUBMIT RSBDCSUB TO SAP-SPOOL WITHOUT SPOOL DYNPRO
WITH IMMEDIATELY = SPACE
WITH MAPPE = G_SESS
WITH VON = SY-DATUM
WITH BIS = SY-DATUM
WITH Z_VERARB = 'X'
WITH FEHLER = SPACE
AND RETURN.
</b>
Note that G_SESS in the above statement indicated the session that has been created.
Kind Regards
Eswar
11-16-2006 6:43 AM
hi,
if i want to process in foreground what parameter i must use.
Thanks in advance,
praveen.
11-16-2006 7:03 AM
Hi
To execute a session immediately in foreground is not a generic requirement.
You can still give try by doing a recording of SM35 via SHDB and use it accordingly.
Hope this helps.
Kind Regards
Eswar
11-16-2006 8:33 AM
hi eswar,
first i need to upload credit details from flat file, after finish uploading i must clear debit line items according to credit line items.
uploading program is creating batch session. in same program i need to process the session immediately and after finsh process the session i need to submit the automatic debtor line item program.
for this i wrote the code like this.
SUBMIT rsbdcsub TO SAP-SPOOL WITHOUT SPOOL DYNPRO
WITH immediately = space
WITH mappe = p_sess
WITH von = sy-datum
WITH bis = sy-datum
WITH z_verarb = 'X'
WITH fehler = space
AND RETURN.
SUBMIT ZFIARVE0010 AND RETURN.
but i want to run the session in foreground, how can i do for this.
thanks in advance,
praveen.
11-16-2006 8:51 AM
Hi Praveen
In that case, you need to do some exploring:
1. Table: APQI which has the queue ID generated.
2. Program: RSBDCBTC.
Within your program, you have to approach as below:
1. Extract Queue ID from APQI.
2. Create a job using FM: JOB_OPEN.
3. Include 2 steps, first for executing the session & next to execute custom program.
4. Submit Program: RSBDCBTC with the Queue ID. Explore the program, you can even change the mode of processing.
5. Submit Program: ZFIARVE0010.
6. Close the Job via FM: JOB_CLOSE, with immediate start option.
Hope this helps you.
Kind Regards
Eswar