cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with windows and variable in smartform

Former Member
0 Kudos

hi guru,

i create smartform for printing tax document and found problem.

1)

i create layout in form like this.

{Main Window} <<<< Data to print <<<< secondary Window

<<<< secondary Window

with many data in table, so this form will take 10 page up to print. i found and showed in every page. in my solution *i want to display and on last page after {Main Window} Only*. how to resolve this. 2) follow to 1st question, can i place position of each window in dynamic? +like 's position is under {Main Window} 2 cm.+ instead of specific position left margin , upper margin *or should i create other page and place and .*

3) i create 2 variables (sum1 type p , sum2 type p ) for keep sum of tax in table that show in each page and write it at end of each page. i want to clear data in these 2 variables when system create new page and start to keep sum of value again. i create program line node under {Main Window} after but don't know which code or syntax to write.how to code this?

regards,

Kittisak.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

1) On the 'Conditions' tab of your WIndow3 & WIndow4 just click the check box

'Only After End of Main Window'. It will always be printed at the last after your main window is finished.

2) And if you don't want your window3 & window4 in a fixed place than instead of new windows do the same thing inside your main window creating a new template or anything as per your requirement and place it after your main table.

3) For clearing the fields, do it like this, in the program lines write the code below:

IF G_PAGE NE SFSY-PAGE.  " declare g_page with initial value '0'
    CLEAR field1.    
    CLEAR field2.
    G_PAGE = SFSY-PAGE.    
  ENDIF.

With luck,

Pritam.

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Kittisak B,

For window 3 and window 4 in the text node in the conditions tab check the check box only after end of the main window.

In the global defintions declare the variables sum 1 & sum 2.

For total create the window after the main window -->

create the text node and create the program lines after the text node and display.

Regards,

Sravanthi

Former Member
0 Kudos

Hi

1)

in your case you have to create a new page wilth 3 windows.

one main window of SAME WIDTH as the main window in the first page and

two secondary windows,in your case WINDOW3 and WINDOW 4.

Goto general attributes of the windows and give type M for MAIN window

and type L( FINAL WINDOW ) for the other two SECONDARY windows.

Now got to the tabpage CONDITIONS in the secondary window (WINDOW3)

and give the condition

SFSY-PAGE = SFSY-FORMPAGES.

Repest the same for WINDOW 4,and not to MAIN WINDOW.

Create atext for each SECONDARY window and write the needed text.

While running the program ,this text will appear

only on the last page(In your case 10th page).

Dont forget to give the next page as page2 in the first page.

2)

You cannot dynamicaly position the windows ,you have to position the window in

the form itself.

Try this way,it will solve your problem

Regards

Hareesh Menon

Former Member
0 Kudos

Goto conditions tab of window3 and window4 there u can see a section of additional events, use those for ur requirement. tick on Only after end of main window.

For ur other requirement right after u print the sum then clear that particular variable.

кu03B1ятu03B9к

Edited by: kartik tarla on Feb 6, 2009 9:09 AM