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

i have doubt regarding write stmt.

Former Member
0 Likes
1,505

i would like to write like this

write: / 'jan',/ 'feb'.

however it will come one below the other.

if i write stmt exactly where side of jan like

month value

jan 10

feb 10

is it possible, if yes how.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,465

Hi Kalyan,

You could use the UNDER <field> in your WRITE statement to display it directly below a field.

DATA: BEGIN OF itab OCCURS 0,
        mon(30),
        value TYPE i,
      END OF itab.

itab-mon = 'Jan'.
itab-value = 10.
APPEND itab.

itab-mon = 'Feb'.
itab-value = 10.
APPEND itab.

LOOP AT itab.
  WRITE:/ itab-mon UNDER itab-mon,
        itab-value UNDER itab-value.
ENDLOOP.

Regards,

Wenceslaus.

i would like to write like this

write: / 'jan',/ 'feb'.

however it will come one below the other.

if i write stmt exactly where side of jan like

month value

jan 10

feb 10

is it possible, if yes how.

8 REPLIES 8
Read only

Former Member
0 Likes
1,465

WRITE 😕 'JAN', '01'.

WRITE 😕 'FEB', '02'.

Regards,

Ravi

Message was edited by: Ravikumar Allampallam

Read only

Former Member
0 Likes
1,465

Hai Kalyan

Try with the following Statement

write: / 'jan 10', / 'feb 10'.

Thanks & regards

Sreeni

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
1,465

Not sure what your question is, but if you want to put values in specific columns, you can specify the posistions.

write:/ 'Jan', at 5 '10'.
Write:/ 'Feb', at 5 '10'.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
1,465

try this

write:/05 'Jan',08 '10',

/05 'feb',08 '10'.

ramesh.

Read only

Former Member
0 Likes
1,465

Is this what you are looking for?

LOOP AT itab.

WRITE: / itab-month, itab-month_value.

ENDLOOP.

Sudha

Read only

Former Member
0 Likes
1,465

no ravi i kow how to display one by one but if some value as i have shown like 10 as i shown to be displayed infront of jan and feb.

Read only

Former Member
0 Likes
1,466

Hi Kalyan,

You could use the UNDER <field> in your WRITE statement to display it directly below a field.

DATA: BEGIN OF itab OCCURS 0,
        mon(30),
        value TYPE i,
      END OF itab.

itab-mon = 'Jan'.
itab-value = 10.
APPEND itab.

itab-mon = 'Feb'.
itab-value = 10.
APPEND itab.

LOOP AT itab.
  WRITE:/ itab-mon UNDER itab-mon,
        itab-value UNDER itab-value.
ENDLOOP.

Regards,

Wenceslaus.

Read only

Former Member
0 Likes
1,465

Hi Kalyan,

Use this or Rich's Format.


WRITE : /5(4) 'Jan',  " Write on a new line, column 5, length 4
        10(2) '10'.   " column 10 length 2

Regards,

Arun Sambargi.