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: 

Common spool for a SAPScript and a SmartForm

sagar-acharya
Participant
0 Kudos

Hi Folks,

I have seen the discussion in this forum which elaborates how we can create a common spool for many SmartForms. But how do I create a common spool for a SAPScript and a SmartForm?!

Here is what I have done:

OPEN_FORM for the SAPScript.

SmartForm with NO_OPEN = ' ' and NO_CLOSE = 'X'.

CLOSE_FORM for the SAPScript.

It does not work. Any inputs?

Thanks

Sagar

1 ACCEPTED SOLUTION

Former Member
0 Kudos

How does the same spool matters?

Regards,

Ravi

10 REPLIES 10

abdul_hakim
Active Contributor
0 Kudos

you cannot use OPEN_FORM for smart forms..

if you wanna configure same spool for sapscript and smartforms then plz consult your BASIS...

Cheers,

Abdul Hakim

0 Kudos

Hi Abdul,

If you reread the question, I wrote OPEN_FORM <b>for the SAPScript</b>. And I dont think BASIS can help.

Also, http://help.sap.com/saphelp_nw04/helpdata/en/64/bf2f12ed1711d4b655006094192fe3/content.htm does not have any information about clubbing the spools from a SAPScript and a SmartForm. It is only for the spools from the SmartForms.

Thanks

Sagar

Former Member
0 Kudos

How does the same spool matters?

Regards,

Ravi

0 Kudos

Here is the business scenario:

For an SD invoice (VF03), we print two sets of forms:

1. Invoice (SAPScript)

2. Pallet account slip (SmartForm)

The data that we use in the SmartForm takes some time to be fetched. Users print about 1000 invoices in the month-end. If we do not create the same spool for both of these then the users have to spend about 4-5 hours just rearranging the 5 meters stack of papers customerwise. i.e. in place of invoice1, pas1, invoice2, pas2,... it can be invoice1, invoice2, invoice3, pas1, pas2, pas3,...

0 Kudos

As per my understanding from your information,

You can just donot close the spool when you print using either of Script or smartform As SAP by default close the spool when you finish the print request. Then automatically all the requests will be stored in the same spool.

We sent multiple forms (6 smartforms output) requests into single spool for our invoices mass printing. all those smartforms will be called within in single program but needs to be sent in a one sequence while storing output in a single spool.

Give me more information so that i can help you

Regards,

Ram

0 Kudos

Ram - Thats the problem. In your case, all 6 of them are SmartForm outputs. In my case, I have one SAPScript and one SmartForm.

Venkat - The problem is very simple.

SAPScript creates 5 pages.

SmartForm creates 3 pages.

Now I need to create one spool with 8 pages.

"Common Spool request is not possible SCRIPT and SMARTFORM" - It should be possible.

0 Kudos

Hi Sagar,

Yes it is possible to store any type of forms output in single spool.

You might have different forms layout either can be done by smartforms or reports or scripts.

Are you calling both forms in single program or different programs..?

If calling them in a single program, then you can store both forms output in a single spool.

First call the Script form and then call smartform using no_open = 'X' and no_close = 'X'.

Hope your issue will be solved.

0 Kudos

Hi,

this discussion is quite a long time ago, but maybe someone still responds. For me it does not work. Does anyone have a solution for this problem?


Thanks and regards

René

venkat_o
Active Contributor
0 Kudos

Hi Sagar,

<b>1</b> .

Your Question is not clear first .Even though I understood something.

<b>2</b>.

U want to display many Same type of SMARTFORM outputs in one shot Right !

For that in SCRIPT .You can see this

Describe table i_tab lines l_lines.

w_output-TDCOPIES = l_lines

<b>OPEN_FORM</b>

Exporting

<b>OPTIONS = w_output .</b>

Loop at i_tab .

call <b>Write_form</b>

endloop.

<b>Call Close Form.</b>

<b>2</b>.

For SMARTFORM Follow the below Steps

Define 2 variables

DATA:

num_1 TYPE i,

num_2 TYPE sy-tabix.

DESCRIBE TABLE it_table LINES num_1.

LOOP AT it_table.

num_2 = sy-tabix.

CASE num_2.

WHEN 1.

control_parameters-no_open = ' '.

control_parameters-no_close = 'X'.

WHEN num_1.

control_parameters-no_open = 'X'.

control_parameters-no_close = space.

WHEN OTHERS.

control_parameters-no_open = 'X'.

control_parameters-no_close = 'X'.

ENDCASE.

IF num_1 = 1.

CLEAR: control_parameters.

ENDIF.

control_parameters-langu = sy-langu.

control_parameters-no_dialog = 'X'.

control_parameters-preview = 'X'.with print priview

or

control_parameters-preview = 'X'.Without print priview.This is direct printing

CALL FUNCTION fm_name

EXPORTING

  • ARCHIVE_INDEX =

  • ARCHIVE_INDEX_TAB =

  • ARCHIVE_PARAMETERS =

control_parameters = control_parameters

  • MAIL_APPL_OBJ =

  • MAIL_RECIPIENT =

  • MAIL_SENDER =

output_options = gv_output

user_settings = space

gv_agmt = p_agr

gv_dist = gs_distributors-kunnr

  • IMPORTING

  • DOCUMENT_OUTPUT_INFO =

  • JOB_OUTPUT_INFO =

  • JOB_OUTPUT_OPTIONS =

EXCEPTIONS

formatting_error = 1

internal_error = 2

send_error = 3

user_canceled = 4

OTHERS = 5

ENDLOOP.

<b>

3</b>.

Common Spool request is not possible SCRIPT and SMARTFORM.

<b>Thanks,

Venkat.O</b>