Application Development and Automation 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: 
Read only

Reg: spool output

Former Member
0 Likes
467

Hello all,

I'm subimitting prog-2 in prog-1 using SUBMIT option.

If I execute prog-2 in fore ground or back ground mode, it's working fine.

Prog-1 is working fine with fore ground mode.

Porg-1 is not working with back ground mode.

In prog-2 we have below code, and syst-spono is not getting the values. so, it's failing bcz of spool number is initial.

IF syst-batch EQ 'X'.

SUBMIT zgrcas_ftp_abapspool

WITH p_spono EQ syst-spono

WITH p_file EQ '/interfaces/CONV/out/grn/'

WITH p_repid EQ syst-repid.

ENDIF.

kindly suggest on this issue.

thanks,

Bharat.

Hello all,

I'm subimitting prog-2 in prog-1 using SUBMIT option.

If I execute prog-2 in fore ground or back ground mode, it's working fine.

Prog-1 is working fine with fore ground mode.

Porg-1 is not working with back ground mode.

In prog-2 we have below code, and syst-spono is not getting the values. so, it's failing bcz of spool number is initial.

IF syst-batch EQ 'X'.

SUBMIT zgrcas_ftp_abapspool

WITH p_spono EQ syst-spono

WITH p_file EQ '/interfaces/CONV/out/grn/'

WITH p_repid EQ syst-repid.

ENDIF.

kindly suggest on this issue.

thanks,

Bharat.

2 REPLIES 2
Read only

former_member194669
Active Contributor
0 Likes
434

I think from prog 1 you are not getting spono may be try this way


  do.
      select single * from tbtcp into wa_tbtcp1
                 where jobname eq p_jobn
                   and jobcount eq p_jobc.

      if sy-subrc eq 0.
        move wa_tbtcp1-listident to p_spono.
      endif.
      exit.
    endif.
    if v_count le 60.
      call function 'ENQUE_SLEEP'
        exporting
          seconds = 90.
      v_count = v_count + 1.
  enddo.

 IF syst-batch EQ 'X'.
  SUBMIT zgrcas_ftp_abapspool
   WITH p_spono EQ p_spono      "<<<<<<
   WITH p_file EQ '/interfaces/CONV/out/grn/'
   WITH p_repid EQ syst-repid.
 ENDIF.

Read only

0 Likes
434

Hi,

Thanks for ur quick reply.

If I execute prog-2 in background mode, it's retreiving spool number.

we have ALV FM to write data into output. after which sy-spono is getting value.

So, when I submit prog-2 in prog-1, it should get spool number generated. but, it's not happening.

thanks,

Bharat.