cancel
Showing results for 
Search instead for 
Did you mean: 

Managing Spool Requests in Smartforms

Former Member
0 Kudos

Hi Peers,

Requirement In Brief : We need to have only One Spool Request created & have two different smartforms forms printed & stapled for each delivery number.

We are executing for 'n' no:of deliveries , for each delivery we have to print a Delivery Note Form & Pack Slip form & staple them automatically in a printer.

We have already acheived the above but we have 'n' no:of spool requests created for these 'n' deliveries.

Is there a way where we can have only one Spool Request created & also have those 2 forms stapled for each delivery.

All solutions will be suitable rewarded.

Thanks in advance!

Daniel

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

Solution given by Ravi kumar is perfectly working for me.

Regards,

Madhu.

Former Member
0 Kudos

Hi,

Also the other answer from Mr. Young is working fine.

Gr., Frank

Former Member
0 Kudos

check example.

program

sf_example_03.

in control parameters u will have

control-no_open

control-no_close

check these.

Edited by: S.r.v.r.Kumar on Jun 18, 2008 4:49 PM

Former Member
0 Kudos

Hi Daniel,

I'm not sure how you're triggering the staple on the printer, so this may not be an exact solution.

Anyway, if you wanted to combine multiple smartforms into one spool request you would need to put the smartform call into a loop and change the print parameters based on whether you were printing the first or subsequent forms.

For the first form you will need to set TDNEWID in the structure OUTPUT_OPTIONS to X, in the subsequent you will need to set it to blank.

Regards,

Nick

Former Member
0 Kudos

Hi,

Use Open Spool and Close Spool function modules to get single spool.

For ex:

CALL FUNCTION OPEN_SPOOL.

--> CALL FUNCTION SMARTFORM1.

--> CALL FUNCTION SMARTFORM2.

--> CALL FUNCTION SMARTFORM3.

.

CALL FUNCTION CLOSE_SPOOL.

This will create the single spool.

Ex Code:

  • Open Spool

CALL FUNCTION 'SSFCOMP_OPEN'

EXPORTING

input = ls_ssfcompin

IMPORTING

result = ls_job

EXCEPTIONS

error = 1

OTHERS = 2.

IF sy-subrc NE 0.

EXIT.

ENDIF. " IF SY-SUBRC NE 0.

--> CALL FUNCTION SMARTFORM1.

--> CALL FUNCTION SMARTFORM2.

--> CALL FUNCTION SMARTFORM3.

  • Close Spool

CALL FUNCTION 'SSFCOMP_CLOSE'

IMPORTING

result = ls_result

EXCEPTIONS

error = 1

OTHERS = 2.

IF sy-subrc EQ 0.

ENDIF.

Edited by: Ravi Kumar on Jun 18, 2008 12:35 PM

Former Member
0 Kudos

Hi Ravi,

Thanks for the info.

But my requirement is still not resolved.

We are printing 2 different forms & stapling them for each delivery. Simultaneously a spool request is created for every delivery.

Now , this is performance issue as per the Basis team as they will get too many spool requests to manage.

Suppose we are printing for 2000 deliveries we will have 2000 spool requests created.

Now our Goal is to reduced the 2000 spool requests to 1 spool request.

Please guide if you have any knowledge about it.

Thanks in advance!

Regards,

Daniel

Former Member
0 Kudos

Hi Daniel,

By using the 'SSFCOMP_OPEN' and 'SSFCOMP_CLOSE' spool function modules(as i given code above), a single spool will be created if we place the CALL FUNCTION SMARTFORM(more than one calls) in between them. I tried it, it is working fine.

Try it and let me know.