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,917

Hi,

<u><i>I have a code snipplet as follows</i></u>:

write:

SY-VLINE, (9) I_OUTPUT-MENGE1 decimals 0 right-justified,

SY-VLINE, I_OUTPUT-MEINS1,

SY-VLINE, (9) I_OUTPUT-MENGE2 decimals 0 right-justified,

SY-VLINE, I_OUTPUT-MEINS2,

SY-VLINE, (8) G_Difference decimals 0 right-justified,

The digits in brackets signifies output length or column position?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,712

Debarshi just in abap editor write the statement write and press F1 It will show you the documentation.

By the way the thing I am pasting here that is from SAP help example.

DATA: WORD(16), VALUE '0123456789ABCDEF',

COL TYPE I VALUE 5,

LEN TYPE I VALUE 10.

WRITE AT / WORD. "new line

WRITE AT 5 WORD. "column 5

WRITE AT (10) WORD. "output length 10

WRITE AT /5(10) WORD. "new line, column 5, length 10

WRITE AT COL WORD. "column = contents of COL

WRITE AT (LEN) WORD. "output length = contents of LEN

WRITE AT /COL(LEN) WORD. "new line, column = contents of COL

"output length = contents of LEN

Hope you are clear now.

regards

shiba dutta

11 REPLIES 11
Read only

Former Member
0 Likes
1,712

Hi,

It denotes the column position.

Thanks.

Read only

abdulazeez12
Active Contributor
0 Likes
1,712

Output Length..

Read only

Former Member
0 Likes
1,712

position.

if it is was length it would be: -

I_OUTPUT-MENGE1(9).

Read only

Former Member
0 Likes
1,712

Hi,

It signifies out put length.

Read only

Former Member
0 Likes
1,712

All those who got it wrong I think you need to look at the ABAP manual.

Read only

0 Likes
1,712

Lemme know what does the following statement does:

write: 10(5) 'Welcome'.

Is it 10th position and a width (or output length) of 5 places???

OR

Is it the other way round??/

Read only

0 Likes
1,712

Hi,

You are correct.

Check this code.

DATA : FLAG VALUE '%',
       FLAG1,
       RESULT(200) TYPE C VALUE 'ABCDEFGH'.

WRITE :  10(5) RESULT.

Thanks.

Read only

Former Member
0 Likes
1,712

Hi,

its the coloumn position.

try this program. u will understand

DATA: text TYPE string VALUE '0123456789ABCDEF'.

Write:

SY-VLINE, (9) text right-justified.

Regards,

Niyaz

Read only

Former Member
0 Likes
1,712

a(b)

a---column position

b---output length

so in ur case it signifies output length

Read only

Former Member
0 Likes
1,712

hI,

Sorry it denotes the Colomn Length.

check this,

DATA : FLAG VALUE '%',
       FLAG1,
       RESULT(200) TYPE C VALUE 'ABCDEFG'.

WRITE :  RESULT(3).

Thanks.

Read only

Former Member
0 Likes
1,713

Debarshi just in abap editor write the statement write and press F1 It will show you the documentation.

By the way the thing I am pasting here that is from SAP help example.

DATA: WORD(16), VALUE '0123456789ABCDEF',

COL TYPE I VALUE 5,

LEN TYPE I VALUE 10.

WRITE AT / WORD. "new line

WRITE AT 5 WORD. "column 5

WRITE AT (10) WORD. "output length 10

WRITE AT /5(10) WORD. "new line, column 5, length 10

WRITE AT COL WORD. "column = contents of COL

WRITE AT (LEN) WORD. "output length = contents of LEN

WRITE AT /COL(LEN) WORD. "new line, column = contents of COL

"output length = contents of LEN

Hope you are clear now.

regards

shiba dutta