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 keyword

Former Member
0 Likes
816

Hi,

I am using write / ' File generated....... ', variable.

Actually I want whole in 1 line means sentence in quote and after that variable in same line.

But now sentence is printing in one line & below that variable is printing on screen.

How whole can be printed in 1 line.

Thanks.

7 REPLIES 7
Read only

Former Member
0 Likes
795

Hello Rita,

Write a query as mention below.


WRITE:   'File generated....... ', variable

No need to mention '/' Sign in Write statement.

Regards,

Chidanand

Read only

0 Likes
795

still not coming.

Used '/' as it is in loop endloop.

Read only

Former Member
0 Likes
795

Hi Rita,

What is the data type you are using for variable and its length also depends for this situation.

REPORT ZMY20_SAMPLE NO STANDARD PAGE HEADING LINE-SIZE 100 LINE-COUNT 100.

Also do check your maxmimum line size (Max Chars per line ).

For example If I Say Line-Size 30 & Line-count 30, then I can print 30 lines and 30 Charaters for each line,

and let if your variable is a MATNR, then its length is 18 and your file generated is already more than 12 chars,

so matnr will print in the next line...

Thanks & regards,

Dileep .C

Read only

Former Member
0 Likes
795

Hi,

Try to CONCATENATE 'File generated....' and variable into another longer variable,

then write the longer variable.

Regards,

Leonard Chomi

Read only

Former Member
0 Likes
795

Hi....

Tryout following sample code...

  • here take v_str size of maximum length of your operation.



DATA : v_str(255) type C.

loop

*     variable, in which every time different values are there.

     concatenate v_str variable into v_str.

endloop.

concatenate ' File generated....... ' v_str into v_str.

write v_str.

Hope this helps..

Regards,

Chintan.

Read only

Former Member
0 Likes
795

Hi,

You can use concatenate staetement, like



data variable type string.

concatenate 'file generated' variable into variable.

write: variable.

Hope it helps

Regards

Mansi

Read only

Former Member
0 Likes
795

hi

try this

REPORT ZMJ_DEMO11.

data i TYPE i.

WHILE i LT 10.

WRITE: / 'value is ...........', i.

ADD 1 to i.

ENDWHILE.