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

Small Report Logic

Former Member
0 Likes
479

Hi,

Below are the details, this is a small report but am not understanding the logic. and am giving output also you can find after the report. Please can anyone explain me. It will be great helpful to me.

REPORT ZTEST.

DATA number TYPE i VALUE -1234.

WRITE 6789.

MOVE 100 TO number.

*OUTPUT = 6.789.

Thanks,

Medha.

1 ACCEPTED SOLUTION
Read only

rajesh_akarte2
Active Participant
0 Likes
460

Hi Medha

This is the logic behind working of the program-

DATA number TYPE i VALUE -1234.

1. If u try to write number now it will show u the o/p 1234 -.

WRITE: 'number=',number.(o/p value 1234-)

2. WRITE 6789.

This statement will write 6,789.Because it is a numeric literal.

If u want to write 6789 as it is then put the 6789 in single quotes.( ' 6789' )

3. MOVE 100 TO number

after this statement number variable will contain the value 100 rather than -1234.

Please reward the point if useful.

Regards,

Rajesh Akarte

Hi,

Below are the details, this is a small report but am not understanding the logic. and am giving output also you can find after the report. Please can anyone explain me. It will be great helpful to me.

REPORT ZTEST.

DATA number TYPE i VALUE -1234.

WRITE 6789.

MOVE 100 TO number.

*OUTPUT = 6.789.

Thanks,

Medha.

2 REPLIES 2
Read only

Former Member
0 Likes
460

Hi

Check your default (Display format for numbers) must be decimal separators.....

Read only

rajesh_akarte2
Active Participant
0 Likes
461

Hi Medha

This is the logic behind working of the program-

DATA number TYPE i VALUE -1234.

1. If u try to write number now it will show u the o/p 1234 -.

WRITE: 'number=',number.(o/p value 1234-)

2. WRITE 6789.

This statement will write 6,789.Because it is a numeric literal.

If u want to write 6789 as it is then put the 6789 in single quotes.( ' 6789' )

3. MOVE 100 TO number

after this statement number variable will contain the value 100 rather than -1234.

Please reward the point if useful.

Regards,

Rajesh Akarte