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

Smartform will print multiple time based on an output parameter.

Former Member
0 Likes
6,446

Dear All,

I have an query. If possible then please help me. I want to take print of a single form but multiple time, i, e the form with the same layout will print 3 times if its related output parameter value is 3 and also will show 1 of 3, 2 of 3, 3 of 3 in a field. All other values and layout will be same but only one field will show this number 1 of 3, 2 of 3.....until that output counter ends. Is it possible ? I am showing an example of my requirement.

Here Total containers are 3. So it will print 3 forms with the same layout and the field Container No. will show value for the 1st one as : 1of 3, for the 2nd one as: 2 of 3 and for the 3rd one as: 3 of 3.

Please tell me is it possible to do? If so then give me idea how to do this.

Thanks in advance.

Best regards,

Ferdous.

1 ACCEPTED SOLUTION
Read only

VijayaKrishnaG
Active Contributor
0 Likes
5,733

Hi Taniya,

You can use COPIES Window in smartform or else try to use system variable SFSY-COPYCOUNT. If you are able to hold the total containers value in a variable (lets say Cont_count) then you can write it as "SFSY-COPYCOUNT of Cont_count". SFSY-COPYCOUNT value gives you the copy number.

Hope this works out.

Regards,

Vijay

Dear All,

I have an query. If possible then please help me. I want to take print of a single form but multiple time, i, e the form with the same layout will print 3 times if its related output parameter value is 3 and also will show 1 of 3, 2 of 3, 3 of 3 in a field. All other values and layout will be same but only one field will show this number 1 of 3, 2 of 3.....until that output counter ends. Is it possible ? I am showing an example of my requirement.

Here Total containers are 3. So it will print 3 forms with the same layout and the field Container No. will show value for the 1st one as : 1of 3, for the 2nd one as: 2 of 3 and for the 3rd one as: 3 of 3.

Please tell me is it possible to do? If so then give me idea how to do this.

Thanks in advance.

Best regards,

Ferdous.

21 REPLIES 21
Read only

arivazhagan_sivasamy
Active Contributor
0 Likes
5,733

Hi Taniya,

You can print like

Concatenate &SFSY-PAGE& 'of' 'Total_container' into var1.

Total container : Var1

You can see the exact value in var1.

Arivazhagan S

Read only

0 Likes
5,733

Thanks Arivazhagan. Will you plz elaborate what you said? I am not getting your point.

Read only

VijayaKrishnaG
Active Contributor
0 Likes
5,734

Hi Taniya,

You can use COPIES Window in smartform or else try to use system variable SFSY-COPYCOUNT. If you are able to hold the total containers value in a variable (lets say Cont_count) then you can write it as "SFSY-COPYCOUNT of Cont_count". SFSY-COPYCOUNT value gives you the copy number.

Hope this works out.

Regards,

Vijay

Read only

0 Likes
5,733

Thanks Vijay. I am working on this and will let you know.

Read only

0 Likes
5,733

Hi Taniya,

Sorry, this system variable will work only in Copies window. So, if it is in Secondary Window please change it to COPIES WINDOW.

Regards,

Vijay

Read only

0 Likes
5,733

Hi Vijay,

I have done as you told. Now my form is showing like below,

but where is rest two i,e 002 of 3 and 003 of 4 ? I mean how it will come like? I have used Copies window also. Please help.

Read only

0 Likes
5,733

Taniya,

How may copies are you printing?? If you are printing 3 copies it will show 1 of 3, 2 of 3 and 3 of 3. Have you given number of copies more than 1 in Print control popup??? You can also pass value in Ouput_optioins-TDCOPIES.

Vijay

Read only

0 Likes
5,733

Yes. I did it and selected radio button Original and copies- Copies identical. Is it ok? Print control popup...i didnt use this. I want to take the copy number form output value. How to do it ? Plz tell me about print control popup also.

Thanks.

Read only

0 Likes
5,733

Taniya,

Pass number of prints to taken to smartform through OUTPUT_OPTIONS-TDCOPIES.

OUTPUT_OPTIONS-TDCOPIES = 3. or No. of total containers.

Then it will workout.

Regards,

Vijay

Read only

0 Likes
5,733

Sorry i am not getting this. Should i put this in program lines of smartforms or in calling prog?

Read only

0 Likes
5,733

From where are you calling this Smartform???

In the driver program (Program from where this form getting called) you have to add this.

Declare a structure type

DATA : LS_OPTIONS TYPE SSFCOMPOP.

Now pass number of copies to this,

LS_OPTIONS-TDCOPIES = 3.

In your program you are calling CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'.

for this you might passed your smartform name 'ZSMARTFORM'.

Now you will capture a function module name into variable (LV_FORM).

Then you will call like CALL FUNCTION LV_FORM. right?

Here to this function module pass above structure OUTPUT_OPTIONS = LS_OPTIONS.

Hope you got it this time.

Regards,

Vijay

Read only

0 Likes
5,733

Thanks a lot Vijay. With your help i solved my problem and learned new things also.

Another problem is getting now. Pages are showing(3 pages here) but after page 2, for page 3 ....it is showing 002 of 3. Why it happens ?

Read only

0 Likes
5,733

Got the ans. Thanks a lot.

Read only

VinayDalapathirao
Participant
0 Likes
5,733

Hi Taniya,

As my understanding it is possible what you asked.

Just concatenate  by taking a variable as current page(&syst-page&) number concatenate with 'of '  and 'total no. of pages' in footer window.

Vinay Dalapathi

Read only

Former Member
0 Likes
5,733

Hi Taniya,

- You need to transfer your output parameter which is number of copies to Smartforms input parameter OUTPUT_OPTIONS (structure with field TDCOPIES assigned)

- Create Copies Windows with text &SFSY-COPYCOUNT& of &OUTPUT_OPTIONS-TDCOPIES&

Tuan Hoang

Read only

0 Likes
5,733

Thanks for your reply. I did this as Vijay said.

Now my form is showing like below,

but where is rest two i,e 002 of 3 and 003 of 4 ? I mean how it will come like? I have used Copies window also. Please help.

Note : I have to design only one layout like this. The rest 2 should print automatic only change will be in number_of_container field(002 of 3, 003 of 3)

Read only

0 Likes
5,733

Taniya you mean 002 of 3 and 003 of 3?

You cannot see those 2?  Did you transfer your number of copies to OUTPUT_OPTIONS of Smartforms?

OR 3 of them are the same as in your picture? Dis your text belongs to Copies Window?

Read only

0 Likes
5,733

I did not use it. I have used Copies window. Plz tell me where to put number of copies? Number of copies is in a variable now.

In Output Option i am not getting any such popup to give copy number.

Thanks.

Read only

0 Likes
5,733

You need not to change any settings here. Keep them as normal.

Read only

0 Likes
5,733

Hi Vijay,

Can you help me doing the same thing in Adobe form ? I want to do the same using adobe instead of smartform. But totally new to adobe forms. Your help will really be appreciated.

Thanks,

Best regards.

Read only

0 Likes
5,733

Sorry Taniya,

I don't have experience with Adobe forms.