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

Report query?

Former Member
0 Likes
752

Hi

Can we format the data before WRITE ststement in a report?

Thanks

5 REPLIES 5
Read only

andreas_mann3
Active Contributor
0 Likes
709

hi,

yes : look to abap command

write to

A.

Read only

Former Member
0 Likes
709

Yes, just write a FORMAT statement before the WRITE. For example:


FORMAT COLOR col_key INTENSIFIED OFF.
WRITE: / 'Hi, this is a test'.
FORMAT RESET.
WRITE: / 'This has no format'.

I hope it helps. BR,

Alvaro

Read only

Former Member
0 Likes
709
Yes you can format the data for output.

Below are examples from Help

Example1:
DATA F. 

FORMAT INTENSIFIED OFF INPUT. 
WRITE F INPUT OFF INVERSE COLOR 3. 

Example2:
WRITE - Formatting options 


Options: 


... NO-ZERO 

... NO-SIGN 

... NO GROUPING 

... DD/MM/YY 

... MM/DD/YY 

... DD/MM/YYYY 

... MM/DD/YYYY 

... DDMMYY 

... MMDDYY 

... YYMMDD 

... CURRENCY w 

... DECIMALS d 

... ROUND r 

... UNIT u 

... TIME ZONE tz 

... EXPONENT e 


... USING EDIT MASK mask 

... USING NO EDIT MASK 


... UNDER g (only with WRITE) 

... NO-GAP (only with WRITE) 


... LEFT-JUSTIFIED 

... CENTERED 

... RIGHT-JUSTIFIED 

Kind Regards
Eswar
Read only

Former Member
0 Likes
709

Yes u can do the the format changes with WRITE .

Just check help for WRITE according to your requirement

Read only

Former Member
0 Likes
709

Hi

I am sending you a part of coding that is running succesfully. Just add text elements. Also change as you want to write .

Code:

FORMAT COLOR COL_HEADING INTENSIFIED ON.

WRITE : / sy-vline ,'data from '.

WRITE 😕 sy-uline.

WRITE 😕 sy-vline ,

'BUKRS' NO-GAP, sy-vline,

'BUTXT' NO-GAP, 35 sy-vline,

36 'ORT01' NO-GAP, 62 sy-vline NO-GAP,

63 'LAND1' NO-GAP, 68 sy-vline NO-GAP,

69 'WAERS' NO-GAP ,74 sy-vline NO-GAP,

75 'SPRAS' NO-GAP , 80 sy-vline ,

81 'KTOPL' NO-GAP , 86 sy-vline,

87 'BUVAR', 92 sy-vline,

93 'FDBUK', 98 sy-vline,

99 'XFDIS', 104 sy-vline,

105 'WAABW',110 sy-vline,

111 'XVALV',116 sy-vline,

117 'XSKFN', 122 sy-vline,

123 'KKBER', 128 sy-vline,

129 'XMWSN', 134 sy-vline,

135 'PERIV', 140 sy-vline,

141 'KOKFI', 146 sy-vline,

147 'MREGL', 152 sy-vline,

153 'XGSBE', 158 sy-vline,

159 'XGJRV', 164 sy-vline,

165 'XKDFT', 170 sy-vline,

171 'RCOMP', 177 sy-vline,

178 'XPROD', 183 sy-vline,

184 'ADRNR', 194 sy-vline,

195 'XEINK', 200 sy-vline,

201 'STCEG', 221 sy-vline,

222 'XJVAA', 227 sy-vline,

228 'XVVWA', 233 sy-vline,

234 'XSLTA', 239 sy-vline,

240 'FIKRS',245 sy-vline,

246 'XFDMM', 251 sy-vline,

252 'XFDSD', 257 sy-vline,

258 'XEXTB', 263 sy-vline,

264 'EBUKR', 269 sy-vline,

270 'KTOP2', 275 sy-vline,

276 'UMKRS', 281 sy-vline,

282 'BUKRS_GLOB', 292 sy-vline,

293'FSTVA', 298 sy-vline,

299 'OPVAR', 304 sy-vline,

305 'XFMCO', 310 sy-vline,

311 'XCOVR', 316 sy-vline,

317 'TXKRS', 322 sy-vline,

323 'WFVAR', 328 sy-vline,

329 'XFMCB', 334 sy-vline,

335 'XFMCA', 340 sy-vline,

341 'XBBBF', 346 sy-vline,

347 'XBBBE', 352 sy-vline,

353 'XBBBA', 358 sy-vline,

359 'XBBKO', 364 sy-vline,

365 'XSTDT', 370 sy-vline,

371 'MWSKV',376 sy-vline ,

377 'MWSKA', 382 sy-vline,

383 'IMPDA',388 sy-vline,

389 'TXJCD', 404 sy-vline,

405 'FMHRDATE', 420 sy-vline,

421 'XNEGP', 426 sy-vline.

WRITE 😕 sy-uline.

FORMAT COLOR INTENSIFIED OFF.

Bye bye

Ruchika