Application Development 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: 

WRITE_FORM_LINES. Need to change the style when printing in the SAP Script

Former Member
0 Kudos

Hi Experts,

I am using the WRITE_FORM_LINES function module to write a list of numbers.

But I need to change the font of the numbers when printing it.

I have changed it_header-tdstyle = 'S_DOCUS1'...SAP standard one but I need to create my own style.

I have created using SE72 and has given my own defined Character and Paragraph formats.

when I pass through the function module there is no change in it.

I think I need to create a text object is .. Can any one explain me hw to create a text object

http://help.sap.com/saphelp_nw04/helpdata/en/d6/0db827494511d182b70000e829fbfe/frameset.htm

CALL FUNCTION 'WRITE_FORM_LINES'

EXPORTING

function = 'APPEND'

header = it_header

window = 'MAIN'

TABLES

lines = it_serial

EXCEPTIONS

function = 1

type = 2

unopened = 3

unstarted = 4

window = 5

bad_pageformat_for_print = 6

spool_error = 7

codepage = 8

OTHERS = 9.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

Waiting for u r replies...

Thanks,

Chaithanya K

1 ACCEPTED SOLUTION

Former Member
0 Kudos

In se75. go in change mode and click create button in application tool bar.

Now text object is something to which a text is attached, like, a material or a Purchase order etc.

Text format is like rich text format or plain text depending upon which an editor is invoked

Specify Editor application. SAP provides standard Editor application choose from one of them(TA or TN)

Line width

This attribute determines the line width to be used for this text in the text editor. A SAPscript text line may consist of up to 132 characters.

Save mode specifies how a text is saved in

dialogue task

When calling the corresponding save function, the system immediately writes the text module to the text database.

in update task

All changes to the text modules of a transaction are stored intermediately in a buffer. Only when the application object is updated does the system write the texts to the log file and, in the update task, stores them in the text file.

For not in text file

You can use SAPscript to edit texts that are not stored in the text database. In this case, SAPscript only returns the changed text table to the application program, which is itself responsible for storing the text

4 REPLIES 4

Former Member
0 Kudos

In se75. go in change mode and click create button in application tool bar.

Now text object is something to which a text is attached, like, a material or a Purchase order etc.

Text format is like rich text format or plain text depending upon which an editor is invoked

Specify Editor application. SAP provides standard Editor application choose from one of them(TA or TN)

Line width

This attribute determines the line width to be used for this text in the text editor. A SAPscript text line may consist of up to 132 characters.

Save mode specifies how a text is saved in

dialogue task

When calling the corresponding save function, the system immediately writes the text module to the text database.

in update task

All changes to the text modules of a transaction are stored intermediately in a buffer. Only when the application object is updated does the system write the texts to the log file and, in the update task, stores them in the text file.

For not in text file

You can use SAPscript to edit texts that are not stored in the text database. In this case, SAPscript only returns the changed text table to the application program, which is itself responsible for storing the text

0 Kudos

Hi..

Thanks for your reply. I am able to create ....

I need the numbers to be printed in the Main window at a desired position.

when I use WRITE_FORM_LINES.

It prints from the starting like say

123456,23456,123456-789,

1453456,23456,123456-789,

but I need to be printed at

-


123456,23456,123456-789,

-


1453456,23456,123456-789,

How Can I achieve that???

Thanks,

Chaithnaya K

Edited by: chaithanya k on Apr 1, 2008 3:27 PM

Edited by: chaithanya k on Apr 1, 2008 3:28 PM

0 Kudos

Please explain more. ur question is not clear to me...

0 Kudos

I need the values to be printed at the right of the page. I could solve it by concatenating with bank spaces

and using respecting blanks.

Thanks for u replies.

regards,

chaithanya K