cancel
Showing results for 
Search instead for 
Did you mean: 

smartforms- want TEXT content could change at every print page

Former Member
0 Kudos

Hi Experts,

I would like to create a smartform to print many accounting document (include BKPF data and BSEG data)

at page 1 , I add some SUBWINDOW to put in TEXT , so I could move the subwindow to where I want TEXT to show,

and at MAINWINDOW , I add a TABLE to show BSEG data ,

then , I copy page 1 to page 2, and make some command , and run my program at SE38 ,

it could print two page while I give two number to parameter ,

but only the mainwindow content to be changed at diffrernt page , the TEXT content don't to be changed.......

Can you help me how to do could let TEXT change content at different page ?

Or there are other methods could hit my target?

Thanks a lot in advanced.

Best Regards,

Yacoa

Accepted Solutions (1)

Accepted Solutions (1)

bm_naidu
Explorer
0 Kudos

Hi,

Text printed in secondary window will remain same in all the pages of form, if you need to to change the document number in pages the use the window type as copies window with radio button origional and copied- copies differ, then create a program lines and in this pass a value to variable to be printed in window.

But from above solution you not get the proper results a in some cases item lines for single document will overflow to next page and in text second document number will appear. so in the print program itself make a loop on BKPF data and call the smart form inside the loop. this will trigger the new smartform output for every document no.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Yacoa,

Try this logic!!!!!

You already said that you haev created a separate window for printing text. So in your text window, just after your text element, create a program line (give input & output as same as your text parameter ex: g_text). And you can make the changes to g_text over here as your requirement (ex:if its a number u can increment it every time).

Hope this will help you to resolve the issue & close the thread.

BR,

Vinit

Former Member
0 Kudos

Hi,

What you are trying to display on this text?

If the value is going to change dynamically based on page number, i would suggest you to

1. create a global variable gv_text

2. add a "Program Line" node to check what is the value for &SFSY-PAGE&, and change any value u want to display in gv_text accordingly

3. text node to display gv_text

Hope this helps.

regards,

Xiang Li

Former Member
0 Kudos

HI,

Thanks your reply , but I consider you missunderstanding my meaning.

I put BKPF data at TEXT , not page number , like bkpf-belnr,

for example: I give two document number to driver program parameter : 3700000001 , 3700000002

then I want the report page 1 to show :

accounting number: 3700000001

report page 2 to show :

accounting number: 3700000002