Application Development and Automation 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: 
Read only

write statement

Former Member
0 Likes
1,124

Hi Abapers,

I got one doubt regarding write statement. i.e.

code:

WRITE: /(3) 'SR'(002),

(12) 'Date'(004),

(16) 'Ref. Number'(005),

(16) 'Reference'(003),

(18) 'Chq No'(006),

(10) 'CS Code'(007),

(50) 'Description'(009),

136(20) 'Debit/Credit'(011) RIGHT-JUSTIFIED,

156(20) 'Balance'(012) RIGHT-JUSTIFIED.

here (002), (004) ... . wht is the use of this after text. example 'Date'(004).

can you explain me...

Thanks.

Kiran.

1 ACCEPTED SOLUTION
Read only

awin_prabhu
Active Contributor
0 Likes
1,014

Hi friend,

In 'Date'(004), (004) refers to output length.

For ex:

(6) 'Date'(004) <----- Both (6) (004) refers to output length, but system takes only (004) as output length when both are present

Thanks..

Edited by: Sap Fan on Feb 25, 2009 4:13 AM

7 REPLIES 7
Read only

Former Member
0 Likes
1,014

'Date'(004), means text 'Date' will be stored in text symbols no 004.

Check the menu: Goto-->Text Elements --> Text Symbols.

or double click the 004 should bring you to the text symbols screen.

Read only

awin_prabhu
Active Contributor
0 Likes
1,015

Hi friend,

In 'Date'(004), (004) refers to output length.

For ex:

(6) 'Date'(004) <----- Both (6) (004) refers to output length, but system takes only (004) as output length when both are present

Thanks..

Edited by: Sap Fan on Feb 25, 2009 4:13 AM

Read only

Former Member
0 Likes
1,014

as said, that indicates the output length. But this will not be created automatically. you should double click on this and this will navigate u to the text elements screen and then it will get created.

You need to activate text elements also.

Thanks

Kiran

Read only

Former Member
0 Likes
1,014

Hi,

WRITE: /(3) 'SR'(002),

(12) 'Date'(004),

the importance of 002 and 004 in the write statement signifies that these lines SR and DATE are included in the text elements. since SAP is used worldwide users may want to see SR and DATE in their own languages,

So to achieve this once we maintain text element they can translate these lines SR and date to their own language in which they would like to see.

Hope this is clear.

Regards,

Siddarth

Read only

0 Likes
1,014

Hi,

when I am clicked that Program Text 'SR'(002) does not exist. Creat Object?

I came accross when I am modifying an existed program. He never used the Text Elements. But why he used 'SR'(002). But in outout all are displayed

WRITE: /(3) 'SR'(002),

(12) 'Date'(004),

(16) 'Ref. Number'(005),

(16) 'Reference'(003),

(18) 'Chq No'(006),

(10) 'CS Code'(007),

(50) 'Description'(009),

136(20) 'Debit/Credit'(011) RIGHT-JUSTIFIED,

156(20) 'Balance'(012) RIGHT-JUSTIFIED.

_____________________________________________________________________________________

SR Date Ref. Number Reference Chq No Cs Code Description..........

_____________________________________________________________________________________

But as u told 'Ref. Number'(005) it has to take 5 characters but it is printing Ref. Number ..

Is it working. Or he not used the Text elements... Thanks to all for giving valuable seggestion..

Read only

0 Likes
1,014

'Ref. Number'(005) .. here text element 005 does not mean it is not 5 character length ...

Even though U have not declared a text element , these will be displayed on the list ..

For ex : write /(3) 'SR'(002). SR will be displayed irrespective of the text element created or not ..

Read only

Former Member
0 Likes
1,014

Thanks to all u..