cancel
Showing results for 
Search instead for 
Did you mean: 

all Background jobs keep appending to same Spool request.

Former Member
0 Kudos

Hi all,

I am running Driver prog as Background job. Every time i run the background job. spool is getting appended to same spool request.

I am calling two smartfrom from driver prog. Please help me how can i avoid this.

Here is the code which i am using.


  DATA: gs_control TYPE ssfctrlop.
  gs_control-no_dialog = 'X'.
  gs_control-preview = 'X'.
  gs_control-no_open = 'X'.
  gs_control-no_close = 'X'.

   CALL FUNCTION 'SSF_OPEN'


      struc_ssfcompop-tdimmed = SPACE.
      struc_ssfcompop-tddest = 'LOCL'.
      struc_ssfcompop-tdnewid = 'X'.
      struc_ssfcompop-tdfinal = SPACE.

    CALL FUNCTION smartform1
      EXPORTING
        control_parameters         = gs_control
        output_options             = struc_ssfcompop

      struc_ssfcompop-tdimmed = 'X'.
      struc_ssfcompop-tddest = 'LOCL'.
      struc_ssfcompop-tdnewid = SPACE.
      struc_ssfcompop-tdfinal = 'X'.

      CALL FUNCTION smartform2
        EXPORTING
          control_parameters         = gs_control
          output_options             = struc_ssfcompop


    CALL FUNCTION 'SSF_CLOSE'
*     IMPORTING
*       JOB_OUTPUT_INFO        =
         EXCEPTIONS

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi

Try this:

DATA: E_SSFCOMPIN TYPE SSFCOMPIN,
          E_SSFCTRLOP TYPE SSFCTRLOP.

E_SSFCOMPIN-TDDEST   = '*'.
E_SSFCOMPIN-TDIMMED  = '*'.
E_SSFCOMPIN-TDDELETE = '*'.

CALL FUNCTION 'SSF_OPEN'
     EXPORTING
          INPUT  = E_SSFCOMPIN
     EXCEPTIONS
          ERROR  = 1
          OTHERS = 2.

E_SSFCTRLOP-NO_OPEN   = 'X'.
E_SSFCTRLOP-NO_CLOSE  = 'X'.

CALL FUNCTION SMARTFORM1
    EXPORTING
         CONTROL_PARAMETERS = E_SSFCTRLOP
    ...............................

CALL FUNCTION SMARTFORM2
    EXPORTING
         CONTROL_PARAMETERS = E_SSFCTRLOP
    ...............................


CALL FUNCTION 'SSF_CLOSE'.

Max

Former Member
0 Kudos

Thanks Max for your replay,

let me try your suggestion.

sorry Max, it did not work.

any one having idea.

thanks

Former Member
0 Kudos

Try like this :

p_out-tdnewid = 'X'.

p_out-tdimmed = ' X'.

p_out-tdcopies = 1.

Thanks

Seshu

Former Member
0 Kudos

That is caused by,

      struc_ssfcompop-tdimmed = 'X'.
      struc_ssfcompop-tddest = 'LOCL'.
      struc_ssfcompop-tdnewid = SPACE.
      struc_ssfcompop-tdfinal = 'X'.

The field TDNEWID is blank, so the second form will append to the already open spool request.

Regards,

Nick

<i>Please acknowledge those that help you by giving points</i>

Former Member
0 Kudos

Thanks Nick for your reply,

But my problem is all background jobs keep appending to same spool request.

Whenever i run background job new spool request should get created.

Thanks

Former Member
0 Kudos

All background jobs? Including report output as well as forms?

If this is the case, the equivalent parameters are also in the job settings of your report jobs. Go into the job defintion and check the print parameters, the 'New spool request' option should be set to 'Yes'

Regards,

Nick