You are on page 1of 7

9/5/2018 page break in smart form

(http://w
ww.sap.c
Products
om/) (https://www.sap.com/products.html)

Industries (https://www.sap.com/industries.html)

Support (https://www.sap.com/support.html)

Training (https://www.sap.com/training-certi cation.html)

Community (https://www.sap.com/community.html)

Developer (https://www.sap.com/developer.html)

Partner (https://www.sap.com/partner.html)
About About (https://www.sap.com/corporate/en.html)

 
Home (https://www.sap.com) / Community (https://www.sap.com/community.html) / Archives (/) / Discussions + Actions
Archive (/discussions) / Output Management (/discussions/space/output-management)

Archived discussions are read-only. Learn more about SAP Q&A


(https://go.sap.com/community/about/questions-and-answers.html)

page break in smart form


Hi ,

I want to do the page break on basis of material no (matnr) . I have sorted the internal table by matnr and i want
whenever the material no changes in the internal table .

EX:

matnr:

https://archive.sap.com/discussions/thread/396997 1/7
9/5/2018 page break in smart form

page break

page break

page break.

Neetesh.

Former Member
June 14, 2007 at 09:19 AM
0 Likes

Not what you were looking for? View more on this topic (https://go.sap.com/community/tag.html
id=334558737810127171897316045257708) or

Ask a question (https://answers.sap.com/questions/ask.html?primaryTagId=3345587378101271718

11 replies

Former Member replied May 04, 2007 at 13:01 PM

report xyz...line-count 35.

At new matnr.

If sy-linno(line no) <> sy-linct(linecount).

sy-linno = 35 or try 36.

endif.

endat.
https://archive.sap.com/discussions/thread/396997 2/7
9/5/2018 page break in smart form

sorry that was for report.

use 'alternative' or 'command'

santhosh

Message was edited by:

Kaluvala Santhosh

Former Member replied May 04, 2007 at 13:16 PM

Hi santosh ,

Is it possible to use on change of ot AT new to trigger page break in smartforms.

Former Member replied May 04, 2007 at 13:28 PM

I am sorry I tght that was a report...

Use 'Alternative' or 'Command'.

Option..

santhosh

Former Member replied May 04, 2007 at 14:15 PM

hi in the case of smart forms defalty page break is applicable

https://archive.sap.com/discussions/thread/396997 3/7
9/5/2018 page break in smart form

Former Member replied May 04, 2007 at 14:46 PM

Inside the Loop of the Internal table in the SF use the begin of Sort - filedname and
this will be your at new event of the Smartform, use this event inside the loop give the
page break command.

Hope that Helps

Anirban M.

Former Member replied May 04, 2007 at 15:07 PM

Hi Neetesh,

In the table node ->Data ->sort criteria give the field name 'MATNR' and select the
checkbox 'Event on sort end'. A new node will be displayed for that event. Under this
node create a COMMAND node and select 'Go To New Page' checkbox and give the
same page no.

Regards,

Vidya.

Former Member replied May 04, 2007 at 16:47 PM

inside your FORM, create program lines as follows

if not itab-matnr is not initial.

if count = 0.

count = itab-matnr.

elseif count = itab-matnr

flag = ' '

https://archive.sap.com/discussions/thread/396997 4/7
9/5/2018 page break in smart form

else

flag = ' x '

count = itab-matnr

endif.

endif.

and the create a command in line items window where give condition if flag = 'x' goto
next page.

this will surely work

Former Member replied May 08, 2007 at 09:24 AM

hi Neetesh,

Use COMMAND Node to have a page break...

Use this COMMAND node inside loop node and put a condition on COMMAND node...

for that u will have to define a flag in program lines...so when the material will change
set this flag else reset...

hope this would help u...

Regards

Prashant

(https://people.sap.com/poornimal.nathan)

Poornima L Nathan (https://people.sap.com/poornimal.nathan)replied June 13, 2007 at 14:46 PM

hi,

I tried creating the command... just that the event node appears... but under Flow

Logic, i get only loop.. i need the command submenu... any help?

Message was edited by:

Poornima L Nathan

https://archive.sap.com/discussions/thread/396997 5/7
9/5/2018 page break in smart form

Former Member replied June 13, 2007 at 14:57 PM

Hi Niteesh,

As Vidya said, try it out... it should work.

Thanks

Dinakar.

Former Member replied June 14, 2007 at 09:19 AM

Hai Neetesh

I think u have all the materials in one internal table which u are passing to smartform,
and i think u have already declared internal table in the smartforms form interface and
work area in global definitions.

you should display the internal table data in the main window of smartform by creating
a table, and in the table data section loop at it_mara into wa_mara.

now u declare a variable matno in global definitions and in the initialisation tab of
global definitions write the below code .

read table it_mara into wa_mara index 1.

if sy-subrc = 0.

matno = wa_mara-matnr.

endif.

after that u goto main window-> table->create ->flow logic->program lines

in the program line u write

matno = wa_mara-matnr.

means u are updating the value of variable matno everytime u run the loop.

then in the main window u create->flowlogic->command.

inside the command u check the checkbox and write 'page1' in goto page field.

i th diti t b f
https://archive.sap.com/discussions/thread/396997
d it 6/7
9/5/2018 page break in smart form
in the conditions tab of command write

matno != wa_mara-matnr.

I think this will definitely work.

Share & Follow


(https://www.facebook.com/sapcommunity) (https://twitter.com/SAPCommunity)

(https://www.youtube.com/c/SAPCommunities) (https://www.linkedin.com/company/sap)

(https://plus.google.com/+SAPCommunities) (https://instagram.com/sap/) (http://www.slideshare.net/SAP)

Privacy (http://go.sap.com/about/legal/privacy.html) Terms of Use (http://go.sap.com/corporate/en/legal/terms-of-use.html)


Legal Disclosure (http://go.sap.com/about/legal/impressum.html) Copyright (http://go.sap.com/about/legal/copyright.html)
Trademark (http://go.sap.com/about/legal/trademark.html) Cookie Preferences
Sitemap (http://www.sap.com/sitemap/index.html) Newsletter (https://go.sap.com/registration/newsletter.html)

https://archive.sap.com/discussions/thread/396997 7/7

You might also like