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 a statement in perticular row using "WRITE"..

Former Member
0 Likes
1,803

Hi All,

I want to write a perticular column in a perticular row using write statement... Is it possible?

Or any alternative way is available.?

Any body can help me...

Ranjith K

1 ACCEPTED SOLUTION
Read only

former_member182670
Contributor
0 Likes
1,080

You can combine POSITION and SKIP TO LINE statements:


DATA LINEPOS TYPE P VALUE 5.
DATA: ROW TYPE I VALUE 3.

POSITION LINEPOS. 
SKIP TO LINE ROW.

WRITE 'X'.

You can combine POSITION and SKIP TO LINE statements:


DATA LINEPOS TYPE P VALUE 5.
DATA: ROW TYPE I VALUE 3.

POSITION LINEPOS. 
SKIP TO LINE ROW.

WRITE 'X'.

6 REPLIES 6
Read only

Former Member
0 Likes
1,080

take a look on statment POSITION

Read only

former_member182670
Contributor
0 Likes
1,081

You can combine POSITION and SKIP TO LINE statements:


DATA LINEPOS TYPE P VALUE 5.
DATA: ROW TYPE I VALUE 3.

POSITION LINEPOS. 
SKIP TO LINE ROW.

WRITE 'X'.

Read only

Former Member
0 Likes
1,080

hi Ranjith Karuvadiyil

below is the link which has the sample code for complete formatting options of write.

http://help.sap.com/saphelp_erp2005/helpdata/en/9f/db9f8c35c111d1829f0000e829fbfe/content.htm

But most of the times people are expecting the output in

ALV's .

Reward me points if this of help to you.

Regards,

Kishore Kumar Yerra.

Read only

Former Member
0 Likes
1,080

Hi Ranjith,

you can use this combination.

<b>SKIP TO LINE 3.

WRITE: AT /OFF COL1, /OFF1 COL2.</b>

where OFF and OFF1 are offset i.e the column position.

Read only

hymavathi_oruganti
Active Contributor
0 Likes
1,080

u can use WRITE AT (A,B)

Read only

Former Member
0 Likes
1,080

Hi Ranjith,

1. What u are asking for is something like this :

write (5,10) 'hello'.

where 5 = row number

10 = column number.

2. But in ABAP

there is no such facility.

3. THE REASON IS :

All such write sattements,

work like PRINTER :

Just as in Printer,

We FIRST HAVE TO REACH TO THE 5TH LINE,

ONE BY ONE,

(WE CANNOT DIRECTLY PRINT ON A PARTICUALR ROW,COL)

4. Simillarly in ABAP write,

we have to FIRST REACH THAT LINE

EITHER USING WRITE,SKIP

ONLY THEN WE CAN WRITE SOMETHING.

5. WE CANNOT DIRECTLY JUMP TO THAT LINE

(SOME THING HAS TO BE PRINTED/SKIPPED/WRITTEN)

6. See below code (just copy paste in new program)

7. report abc.

write 😕 'Line 1'.

write 😕 'Line 2'.

write 😕 'Line 3'.

write : 15 '15'.

write : 30 '30'.

write 😕 'Line 4'.

write 😕 'Line 5'.

write 😕 'Line 6'.

write : 15 '15'.

write : 30 '30'.

regards,

amit m.