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

Text printing in smartforms

sharadendu_agrawal
Active Participant
0 Likes
822

Hi All,

My smartform has 3 pages namely FIRST, NEXT and TERMS.

I have 2 texts ( T1 and T2) to be printed on the smartforms. These texts are defined only in the first and the next pages.

The condition is that these 2 texts(T1 and T2) should be printed only till the 3rd last page and in the second last page only one text( T2) needs to be printed.

For example if there are 5 pages in a smartform then T1 and T2 both should be printed till page 3 and then T2 only should be printed on page 4.

Plz help me out to achieve this.

7 REPLIES 7
Read only

Former Member
0 Likes
781

U need to put the condition for this.. in the CONDITIONS tab..

Read only

0 Likes
781

I am putting the conditions for this but the thing is that SFSY-PAGE and SFSY-JOBPAGES are getting generated dynamically so am not able to get the right thing.

Read only

Former Member
0 Likes
781

hi

i think you could insert a program lines node in all the three pages and write a condition in all of them...

if helpful, reward

Sathish. R

Read only

0 Likes
781

hi sathish,

ne pointers to hw we can achieve to what u r saying.??

regards,

sharadendu

Read only

0 Likes
781

hi..

right click on the Text element...

go to flow logic..

select Program line..

regards,

sai ramesh

Read only

Former Member
0 Likes
781

hi

program lines is a node that we can insert in a loop within a window...you can code any logic just like in a normal abap program..so, you could do something like this

DATA: page1 type i, page2 type i, totalpage type i.

--->in your first page

totalpage = &sfsy-formpages&

page1 = &sfsy-page&

if page1 < ( totalpage - 2 )

write: T1, T2.

endif.

-->in your second page

totalpage = &sfsy-formpages&

page1 = &sfsy-page&

if page1 < ( totalpage - 2 )

write: T1, T2.

endif.

if page1 = totalpage - 1.

write T2.

endif.

if helpful, reward

Sathish. R

Read only

0 Likes
781

Hi Sathish,

I am trying to incorporate this logic but the pblem that i am facing is that at runtime the value sfsy-formpages and sfsy-page is the same hence i am not able to get the required output.

If it is page 1 then sfsy-formpages is 1 and sfsy-page is also 1.