Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

session

former_member182412
Active Contributor
0 Kudos

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.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

7 REPLIES 7

venkata_ramisetti
Active Contributor
0 Kudos

Hi

Check the below forum post .

Thanks

Ramakrishna

Former Member
0 Kudos

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

Former Member
0 Kudos

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

0 Kudos

hi,

if i want to process in foreground what parameter i must use.

Thanks in advance,

praveen.

0 Kudos

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

0 Kudos

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.

0 Kudos

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