Application Development and Automation 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: 
Read only

Spool in Smartform

Former Member
0 Likes
1,093

Hi,

I want to display the output from smartform in a spool.

Here, iam calling the smartform from a program. So, How can i do this??

Hi,

I want to display the output from smartform in a spool.

Here, iam calling the smartform from a program. So, How can i do this??

8 REPLIES 8
Read only

Former Member
0 Likes
1,061

Hello,

SSFCOMPOP-TDNEWID = 'X'.

...

set other fields based on your reqmt.

Pass the structure to the FM which triggers the SSF as the exporting parameter; output_options.

Hope this helps you.

Best Regards, Murugesh AS

Read only

0 Likes
1,061

Thanks Murugesh. I got it with output_options....

I had one more question.

I want to display the range of customers for my smartform. As of now, for only one customer, it is coming properly. How to do for the range.... and how to call the smartform within the range.

Iam trying to call the smartform within a loop by setting no_close and no_open accordingly...

but it is not coming.

only one customer is displaying in the spool repeatedly for no of pages.

Is there any thing to set? pls. let me know

Read only

0 Likes
1,061

Hello,

Your query is not clear for me.

Is that you need to display a range of customers as output in one Smartform or you need to trigger form output for every customer?

let me know your reqmt.

Regards, Murugesh AS

Read only

0 Likes
1,061

I got the range of customers... simply by looping in the smartform for table data.

Now, I need to reset the pageno for each customer in the smartform. e.g.,say i have 2 customers... 1st customer having 1 page of data and 2nd customer having 2 pages of data. so, i need to display the page no for 1st customer as "page 1 of 1". For second customer, it shud come "page 1 of 2", "page 2 of 2".

Read only

0 Likes
1,061

Hello,

I understand that you have called the SSF FM by looping in internal table which holds different customer numbers. Please make sure that all the data objects which are used in SSF are reinitialized in every loop pass.

You can use:

  • Page &SFSY-PAGE& of &SFSY-FORMPAGES&

for page numbers.

Hope this helps you.

Regards, Murugesh AS

Read only

0 Likes
1,061

Hi Murugesh,

Thanks for the information.

But my problem here for page display is as follows.

--My output will get many customers.

--Iam displaying open data for each customers.

--The data for 1st customer contains 2 pages of main data

--And the data for 2nd customer contains say 3 pages of main data.

--Here, Iam displaying both customers at a time.

so, the total no. of pages here is 5 pages.

--But, here when iam displaying, i need to get page nos for each customer starting from 1.

i.e., for 1st customer, i need to display "page 1 0f 2", "page 2 of 2"

For 2nd customer immediatly after the 1st customer, it shud display starting from 1. so it is "page 1 of 3", "page 2 of 3", "page 3 of 3".

Now, iam getting like this. I used page &sysy-page& of &sysy-formpages&

for 1st customer, "page 1 of 5","page 2 of 5"

for 2nd customer, "page 3 of 5", "page 4 of 5","page 5 of 5".

Here, all the customers will display at a time from the spool.

I think, you understood.

Please Help me..

Read only

0 Likes
1,061

Hello,

I propose 2 methods:

Please follow the following logic:

1. Create a New IntTab with unique Customers.

2. Loop in this New IntTab.

3. Initialize all the Fields/Structures.

4. Get the details of the corresponding Customer.

5. Call the SSF in the Loop.

This would reinitialize the SSF Variable for Page number.

.or.

I understand that the PAGE numbers are written in separate window.

You need additional global field in SSF to hold the Customer number, and one for Page Number.

First, you initialise with the first customer number.

Since, this window being called for every page make a comparison of the IntTab Customer Number with the New Field for Customer Number.

If both does NOT match, you reinitialize the field for Page and if it matches you can increment the Page Number.

Hope either of the above helps you.

Best Regards, Murugesh AS

Read only

0 Likes
1,061

Hello,

Please close this thread if the problem is resolved.

Best Regards, Murugesh AS