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: 

Wrtie to

Former Member
0 Kudos

Hello Everybody,

Can anyone tell me why WRITE TO Statement doest not trigger TOP-OF-PAGE event? is it right that WRITE TO is an assignment statement ? n What are assignment statements?

thnx

Fozia

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Yes WRITE TO will not trigger the TOP OF PAGE because that event will be triggered only by the first list processing statement like write uline etc..

where as write to is not a list processing statement it is assigment statetment...

if u want to pass value of f1 to f2 u need to write as

syntax:

write f1 to f2.

6 REPLIES 6

Former Member
0 Kudos

Yes,

WRITE TO is an assignment statement...

They are the ones in which you normally assign a value to a variable...

e.g A = B.

Cheers,

Tatvagna.

Former Member
0 Kudos

hiii

yes write to is an assignment statement

you can assign some values by using this statement

like we can use it as

WRITE sy-datum TO: w_date.

it will write sy-datum in w_date so it will work as assignment statement here.

regards

twinkal

Former Member
0 Kudos

Hi Fozia,

Assignmet operator( = , MOVE , WRITE TO) .

http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb3260358411d1829f0000e829fbfe/content.htm

Regard & Thanks ,

Sandeep Patel

Former Member
0 Kudos

Hi ,

Basic form of the WRITE TO statement

Specifying the source field at runtime

Writing values with Offset specifications

Basic form of the WRITE TO statement

Syntax: WRITE <f1> TO <f2> .

This statement converts the contents of a data object <f1> to type C, and places the string in the variable <f2>.

The data type of <f1> must be convertible into a character field; if it is not, a syntax or runtime error occurs.

When assigning values to data objects with WRITE TO statement you can use all the formatting options available except UNDER and NO-GAP.

If Found Help Full Do Reward.

Regards.

Eshwar.

Former Member
0 Kudos

Hi,

Yes WRITE TO will not trigger the TOP OF PAGE because that event will be triggered only by the first list processing statement like write uline etc..

where as write to is not a list processing statement it is assigment statetment...

if u want to pass value of f1 to f2 u need to write as

syntax:

write f1 to f2.

Former Member
0 Kudos

Hi Fozia,

Write To statement trigger the Top-of-page.

check this code.

DATA w_char(10) TYPE c .

TOP-OF-PAGE.
  WRITE 'Heading' TO w_char.

START-OF-SELECTION.
  WRITE: / w_char.
  WRITE: / 'line 2'.
  WRITE: / 'line 3'.

Regards,

Sandeep