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: 

i have doubt regarding write stmt.

Former Member
0 Kudos
146

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

Former Member
0 Kudos
106

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.

8 REPLIES 8

Former Member
0 Kudos
106

WRITE 😕 'JAN', '01'.

WRITE 😕 'FEB', '02'.

Regards,

Ravi

Message was edited by: Ravikumar Allampallam

Former Member
0 Kudos
106

Hai Kalyan

Try with the following Statement

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

Thanks & regards

Sreeni

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos
106

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

Former Member
0 Kudos
106

try this

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

/05 'feb',08 '10'.

ramesh.

Former Member
0 Kudos
106

Is this what you are looking for?

LOOP AT itab.

WRITE: / itab-month, itab-month_value.

ENDLOOP.

Sudha

Former Member
0 Kudos
106

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.

Former Member
0 Kudos
107

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.

Former Member
0 Kudos
106

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.