8/10/2019 Creating custom page format for sapscript_smartform.pdf
http://slidepdf.com/reader/full/creating-custom-page-format-for-sapscriptsmartformpdf 1/7
05/12/13 My Experiments with ABAP: Creating custom page format for sapscript/smartform
sample-code-abap.blogspot.com.ar/2009/05/creating-custom-page-format-for.html
My Experiments with ABAP
Home Index Links SAP SD SAP MM Tutorial
Wednesday, 13 May 2009
You can print any size of output from SAP, it all depends on what page format is defined and configured in your SAP system. Most
of the standard page format are already defined in SAP but often you come across the situation where the required output doesn’t
even come close to any of these p redefined page format. Printing cheques a nd receipts are some common e xample. Defining
and configuring Page format is multi-step process and often is printer specific. In short its very easy to get your setting wrong and
situation is worse when printer is physically away from you.
Its very important to understand how this page format works in SAP. The process starts with defining the Page Format, but you
need few more setting to actually print this page size on printer. Page format just define the size of page for sapscript (this size
info defined in page format is not passed to printer), next step is to define Format type which defines 'Type of format' and what
orientation are allowed with this page format. It is important to note that Page Format and Format type should have same name.
Well, you can argue why do we need to define Format Type. To find out that, which you may find bit confusing refer sap note
2374. Still you can not print with this page size on printer. To allow printer to use this new page format you need to add this page
format to device type of printer. This step will enable you to print the output but correct page size information will not be passed
to printer. You need to actually put printer specific code to set desire page size on printer.
Before we start it worth checking where do we spe cify page fo rmat in sa pscript.
Now let us go through each step with screen shot. You need to have access to transaction SPAD and changes to the repository and
cross-client customizing should be permitted in the client where you will create/change page format.
Execute transaction SPAD. By default transaction will not show all the tabs, you need to click on 'Full administration' to ge t thedesire tab.
Creating custom page format for sapscript/smartform
9
Processing x ml with XSLTtransformation in ABAP
Displaying Two ALV Grid onScreen
Simple Code to consume Webservice using SAP ABAP
SAP ABAP Dynamic Internal tableand P rocessing 02
Enhancement - Sales Ordertransactions VA01/VA02/VA03
ALV Grid OO - Tips
Defining Range Type in ABAP
Display ALV Grid (OOP)Fullscreen
Table Maintenance withCreate/Modified InformationAutomatically Filled in
Creating custom page format forsapscript/smartf orm
Popular Posts
Join this site
w ith Google Friend Connect
Members (62) More »
Already a member? Sign in
Followers
Very Useful information. Thankyou. - 11/9/2013 - Vinay
Very Useful information.
Thanks. - 11/9/2013 - Vinay
thanks very much for postingmaterialtables... - 4/9/2013 - HarishKumar
Thanks Buddy..!! VeryHelpful..:) - 26/8/2013 - Santho
sh kumar
Great Buddy, Very Helpful...:) - 26/8/2013 - Santhoshkumar
Recent Comments
Read this on Mobile Device
Más Siguiente blog» Crear un blog Acced
8/10/2019 Creating custom page format for sapscript_smartform.pdf
http://slidepdf.com/reader/full/creating-custom-page-format-for-sapscriptsmartformpdf 2/7
05/12/13 My Experiments with ABAP: Creating custom page format for sapscript/smartform
sample-code-abap.blogspot.com.ar/2009/05/creating-custom-page-format-for.html
Go to 'Device Types' tabs and hit 'Display' button next to Page Formats.
On ne xt screen hit 'change' b utton then you will button to create new Page format, now press New button.
Fill in the required input, below is an example.
Follow by Email
Email address... Submit
8/10/2019 Creating custom page format for sapscript_smartform.pdf
http://slidepdf.com/reader/full/creating-custom-page-format-for-sapscriptsmartformpdf 3/7
05/12/13 My Experiments with ABAP: Creating custom page format for sapscript/smartform
sample-code-abap.blogspot.com.ar/2009/05/creating-custom-page-format-for.html
Congrats you just created a new page format.
At this stage you can use this page format in sapscript, however you can not print that sapscript. This information of page
dimension is just for sapscript. You will get warning message while adding page format to sapscript 'There is no form for page
format XYZ' and error message while printing 'Device type ABC does not support page format XYZ'.
Next step is to create Format Type. Reme mber Format Type should have same name as your Page Format nam e. Start from
transaction SPAD, on 'Device Type’ tab press display button next to 'Format Type'. Click on change then new button and create
Format Type as shown in screen-shot below.
To allow printer to use this new Format Type you need to add this format to device type of printer. You can find the device type of
printer from table TSP03D, it is stored in field PATYPE.
On 'Device Types' table enter Device name and press Display button next to it.
8/10/2019 Creating custom page format for sapscript_smartform.pdf
http://slidepdf.com/reader/full/creating-custom-page-format-for-sapscriptsmartformpdf 4/7
05/12/13 My Experiments with ABAP: Creating custom page format for sapscript/smartform
sample-code-abap.blogspot.com.ar/2009/05/creating-custom-page-format-for.html
Go in change mode and press 'Formats'
On next screen press ‘New’ button and enter 'Format Type'.
Once the format type added to device type, double click on the line (on first column). On next screen as shown below double click
on 'Printer initialization'
8/10/2019 Creating custom page format for sapscript_smartform.pdf
http://slidepdf.com/reader/full/creating-custom-page-format-for-sapscriptsmartformpdf 5/7
05/12/13 My Experiments with ABAP: Cr eating custom page format for sapscript/smartform
sample-code-abap.blogspot.com.ar/2009/05/creating-custom-page-format-for.html
19 comments
Top comments
manisha jain 5 months ago
hi friend ,, its nice to see your blog.. i am sap bwbi consultant. i just looking funcunality in sap abap , their
i found your blog interesting. Thanks for sharing such a valuable information on sap-abap
Add a comment as Mariano Acevedo
Input following code, this code will actually set the page length on printer. Page length is defined under the code '# set page
length 72 lines'. Its defined in hex a nd is defined in lines. You m ight have to do some math to convert your page length from
CM/MM to line considering lines per inch value set.
For example in this particular case the page length define Page format is 102 mm which is 4 inches. Using setting 6 lines per inch
4 inches comes out to be 24 lines. (ok, the comment is wrong, it should be '# set page length 24 lines'). And in hex 24 is
represented as 18.
You might need to add this format and put this code for each device type of each printer on which you are planning to print the
output.
With all these setting in place you can, hope fully, print the ou tput on printer with correct page format.
Posted by Pawan Kesari
Labels: Formatting, SAP ABAP, Sapscript
+1 Recomendar esto en Google
8/10/2019 Creating custom page format for sapscript_smartform.pdf
http://slidepdf.com/reader/full/creating-custom-page-format-for-sapscriptsmartformpdf 6/7
05/12/13 My Experiments with ABAP: Creating custom page format for sapscript/smartform
sample-code-abap.blogspot.com.ar/2009/05/creating-custom-page-format-for.html
eemac an an a egar year ago
nice
Anonymous 1 year ago
Works perfectly and very useful! thank you for your hard work!
alex linh 1 year ago
How to create a sapscript in abap, you could check this link
http://saptechnicals.blogspot.com/2012/04/how-to-create-sapscript-in-abap.html
Anonymous 1 year ago
\o/ very good!
ambrish 1 year ago
very good
Anonymous 2 years ago
good work thanks!!!
Anonymous 2 years ago
Thanks
Anonymous 2 years ago
I am working with a zebra label printer and it is not working...I wonder why?
Anonymous 2 years ago
Very Helpfull documents, Thanks
Bhavesh Panchal (ABAP) 3 years ago
very good
Anonymous 3 years ago
thanks..
matheus_tux 3 years ago
Thanks
Anonymous 3 years ago
Thanks Lot .......... It helps Lot
Anonymous 3 years ago
Thanks a lot, it was really helpfull and well explained.
8/10/2019 Creating custom page format for sapscript_smartform.pdf
http://slidepdf.com/reader/full/creating-custom-page-format-for-sapscriptsmartformpdf 7/7
05/12/13 My Experiments with ABAP: Creating custom page format for sapscript/smartform
sample-code-abap.blogspot.com.ar/2009/05/creating-custom-page-format-for.html
Newer Post Older PostHome
Subscribe to: Post Comm ents (Atom)
Anonymous 3 years ago
Thanks a MIL for this! Helped me solve my print pblm! :) B
Anonymous 4 years ago
Very Nice explanation. It help me resolve a critical issue.
Dion 4 years ago
Good Work! Tks Dion Mar - Brazil
Anonymous 4 years ago
nice explanation..
► 2013 (24)
► 2012 (6 )
► 2011 (16)
► 2010 (11)
▼ 2009 (23)
► December (3 )
► September (5 )
► August (3 )
► July (3 )
▼ May (5 )
Processing x ml with XSLT transforma tion in ABAP
Use of Application Log FMs to display MessageList...
Reset ALV Export Option for User
Simple Code to consume W eb service using SAPABAP
Creating custom page format forsapscript/smartfor...
► April (1 )
► March (1 )
► February (1 )
► January (1 )
► 2008 (39)
Blog Archive
Search
Search This Blog
Abap Objects (13) ALV List (10) Config
(11) Dynamic (6) EDI (8
Module Pool (6)
Quick Reference (50) Repor
(12) Sample Code (61) SAPABAP (80) SAP
MM (15) SAP SD (12)
Sapscript (9) Selection-Screen (6)
Smartforms (7) Tutoria
(25) Web Dynpro
(7)
Labels
You are most welcome to use any information available in this blog. Any usage of the information or sample code is at your own risk. I do take care of accuracy and relevance of blog before publishing. However, I do not guarantee that
information and code are accurate and bug free, their can be alternate and better way of doing same thing so please use information as reference only. Relevance of code and instructions can possibly change with time, check the blog post
date before using this information. This is my personal blog, recommendation and opinions expressed in this blog are mine and not of any company of any of my employer. I do moderate comments and publish as soon as I check them. You
can post questions as well, which I will try best to solve. I will anyway publish your questions in case others readers might have answer. Thanks for coming here and reading the blogs :)
Small print