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 statement

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi,

It denotes the column position.

Thanks.

0 Kudos

Output Length..

Former Member
0 Kudos

position.

if it is was length it would be: -

I_OUTPUT-MENGE1(9).

Former Member
0 Kudos

Hi,

It signifies out put length.

Former Member
0 Kudos

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

0 Kudos

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??/

0 Kudos

Hi,

You are correct.

Check this code.

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

WRITE :  10(5) RESULT.

Thanks.

former_member200338
Active Contributor
0 Kudos

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

Former Member
0 Kudos

a(b)

a---column position

b---output length

so in ur case it signifies output length

Former Member
0 Kudos

hI,

Sorry it denotes the Colomn Length.

check this,

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

WRITE :  RESULT(3).

Thanks.

Former Member
0 Kudos

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