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: 

RSNAST00 using SUBMIT syntax without Pop Ups?

Former Member
0 Kudos
3,990

Hi All,

I am using RSNAST00 to process and print 2 delivery outputs via 'SUBMIT RSNAST00 WITH... AND RETURN' syntax in the ABAP of my Z Transaction Code. Basically, I create the outputs at delivery creation stage (they do not print) and then print them later using my Z transaction. It all works fine except for the fact that when RSNAST00 runs the following 2 popups appear when successful:

PopUp #1. Output Processing analysis

"Processing log for program Zxxxxx routine ENTRY

Processing log for program Zyyyyy routine ENTRY"

PopUp #2. Information

"2 outputs were processed in total (2 successfu 0 incorrectly)"

Is there anyway for me to suppress these screens as the user does not want to see them when they run the Z transaction?

Should I run RSNAST00 using SUBMIT in the background? If so, can anyone help with the syntax?

I really need to suppress these popups!

Thanks,

N.

1 ACCEPTED SOLUTION

Former Member
735

Try to submit RSNAST00 as a background job.


DATA: number TYPE tbtcjob-jobcount,
      name   TYPE tbtcjob-jobname VALUE 'PRINT_OUTPUT',
      print_parameters TYPE pri_params.

CALL FUNCTION 'JOB_OPEN'
  EXPORTING
    jobname          = name
  IMPORTING
    jobcount         = number
  EXCEPTIONS
    cant_create_job  = 1
    invalid_job_data = 2
    jobname_missing  = 3
    OTHERS           = 4.
IF sy-subrc = 0.

SUBMIT rsnast00 WITH s_kappl = <i>val1</i> 
                WITH s_objky = <i>val2</i>
                WITH s_kschl = <i>val3</i>
                WITH s_nacha = <i>val4</i>            
                TO SAP-SPOOL
                SPOOL PARAMETERS print_parameters
                WITHOUT SPOOL DYNPRO
                VIA JOB name NUMBER number
                AND RETURN.

  IF sy-subrc = 0.
    CALL FUNCTION 'JOB_CLOSE'
      EXPORTING
        jobcount             = number
        jobname              = name
        strtimmed            = 'X'
      EXCEPTIONS
        cant_start_immediate = 1
        invalid_startdate    = 2
        jobname_missing      = 3
        job_close_failed     = 4
        job_nosteps          = 5
        job_notex            = 6
        lock_failed          = 7
        OTHERS               = 8.
    IF sy-subrc <> 0.
      ...
    ENDIF.
  ENDIF.
ENDIF.

3 REPLIES 3

Rashid_Javed
Contributor
0 Kudos
735

Hmm may be you can submit the report to a background job, this way there will be no popups.

for example

1: Call function job_open .....> get the job number

2: submit report RSNAST00 and return

username SY-UNAME

via job JOBNAME number JOBNUMBER

...[your other submit options].....

3: call function job_clsoe

This way your report will be submitted as background job

hope this helps.

cheers.

RJv

Former Member
736

Try to submit RSNAST00 as a background job.


DATA: number TYPE tbtcjob-jobcount,
      name   TYPE tbtcjob-jobname VALUE 'PRINT_OUTPUT',
      print_parameters TYPE pri_params.

CALL FUNCTION 'JOB_OPEN'
  EXPORTING
    jobname          = name
  IMPORTING
    jobcount         = number
  EXCEPTIONS
    cant_create_job  = 1
    invalid_job_data = 2
    jobname_missing  = 3
    OTHERS           = 4.
IF sy-subrc = 0.

SUBMIT rsnast00 WITH s_kappl = <i>val1</i> 
                WITH s_objky = <i>val2</i>
                WITH s_kschl = <i>val3</i>
                WITH s_nacha = <i>val4</i>            
                TO SAP-SPOOL
                SPOOL PARAMETERS print_parameters
                WITHOUT SPOOL DYNPRO
                VIA JOB name NUMBER number
                AND RETURN.

  IF sy-subrc = 0.
    CALL FUNCTION 'JOB_CLOSE'
      EXPORTING
        jobcount             = number
        jobname              = name
        strtimmed            = 'X'
      EXCEPTIONS
        cant_start_immediate = 1
        invalid_startdate    = 2
        jobname_missing      = 3
        job_close_failed     = 4
        job_nosteps          = 5
        job_notex            = 6
        lock_failed          = 7
        OTHERS               = 8.
    IF sy-subrc <> 0.
      ...
    ENDIF.
  ENDIF.
ENDIF.

Former Member
0 Kudos
735

Thanks for your input Rashid and Sam.

I am now happily creating the RSNAST00 program as a job and it is working fine. The code example was perfect!

Kind regards,

N.