Skip to Content
avatar image
Former Member

SUBMIT RSBDCSUB without showing spool

Hi,
I need to start a batch input (BI) with instruction SUBMIT RSBDCSUB, but without the spool result shown in screen.. It's very strange, but if I try using statement VIA JOB in SUBMIT RSBDCSUB, selected BI are not run in SM35. But I run without statement VIA JOB, BI is run, but I got spool result.

I just want to run a BI in SM35 and wait until BI is finished, is there a more simple way to do that? Very important, no spool result in screen from report rsbdcsub.

Thank you in advance, KR,
Pedro

"opening job
CALL FUNCTION 'JOB_OPEN'
EXPORTING
  delanfrep        = ' '
  jobgroup         = 'ZHREDSR6000'
  jobname          = jobname
  sdlstrtdt        = sy-datum
  sdlstrttm        = sy-uzeit
IMPORTING
  jobcount         = jobcount
EXCEPTIONS
  cant_create_job  = 01
  invalid_job_data = 02
  jobname_missing  = 03.
"Function to create a BI  
SUBMIT ZHREDSUTILR6000
...
AND RETURN.

"closing job
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
  jobcount             = jobcount
  jobname              = jobname
  strtimmed            = starttimeimmediate
IMPORTING
  job_was_released     = lv_job_released
EXCEPTIONS
  cant_start_immediate = 01
  invalid_startdate    = 02
  jobname_missing      = 03
  job_close_failed     = 04
  job_nosteps          = 05
  job_notex            = 06
  lock_failed          = 07
  others               = 99.

"waiting BI is created
IF lv_job_released IS NOT INITIAL.
 DO.
   CALL FUNCTION 'SHOW_JOBSTATE'
  EXPORTING
    jobcount         = jobcount
    jobname          = jobname
  IMPORTING
    finished         = v_fin
  EXCEPTIONS
    jobcount_missing = 1
    jobname_missing  = 2
    job_notex        = 3
    OTHERS           = 4.
   IF sy-subrc = 0.
  CHECK v_fin IS NOT INITIAL.
  EXIT.
   ELSE.
  EXIT.
   ENDIF.
 ENDDO.
ENDIF.

"getting ID in SM35
REFRESH it_apqi.
CALL FUNCTION 'BDC_OBJECT_SELECT'
 EXPORTING
   name             = c_name
   session_creator  = sy-uname
   datatype         = 'BDC'
   client           = sy-mandt
   date_from        = sy-datum
 TABLES
   apqitab          = it_apqi
 EXCEPTIONS
   INVALID_DATATYPE = 1.
CLEAR qid.
READ TABLE it_apqi INTO wa_apqi INDEX 1.
qid = wa_apqi-qid.

"getting structure BDCdata
CALL FUNCTION 'BDC_OBJECT_READ'
    EXPORTING
      queue_id         = id
    TABLES
      dynprotab        = bdcdata
    EXCEPTIONS
      NOT_FOUND        = 1
      SYSTEM_FAILURE   = 2
      INVALID_DATATYPE = 3.
ENDFORM.

"Running BI in SM35, in background
DESCRIBE TABLE it_bdcdata_lim LINES num_lineas_bdc.
IF num_lineas_bdc GE 1.
     SUBMIT rsbdcsub WITH mappe = 'ZHREDSR6000'
         WITH von   = sy-datum
         WITH bis   = sy-datum
         WITH Z_VERARB = 'X' "BI nuevos
         VIA JOB jobname NUMBER jobcount
         AND RETURN.
ENDIF.
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Aug 16, 2017 at 07:20 PM

    just to know more details..if you always wait until BI finish..why do you want a BI..simple execute the report with variant with Execute in background right..do u have a Tcode associated..

    Add comment
    10|10000 characters needed characters exceeded