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: 

discard repeating text in printing

Former Member
0 Kudos

hi friends,

i want to discard repeating text in my write statement what is syntax for this.

thanks

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

Capture the text in a global variable.Before the write statement check the text with global variable contents.If they are not same then only use WRITE else skip it.

4 REPLIES 4

Former Member
0 Kudos

Hi,

Capture the text in a global variable.Before the write statement check the text with global variable contents.If they are not same then only use WRITE else skip it.

Former Member
0 Kudos

Hi,

do like below...

data : gv1 , (Internal Table)

LOOP at gv1.

IF gv1 NS 'STRING'. (here compare with the text what you want)

write : gv1.

endif.

endloop.

Hope it helps!!

Regards,

Pavan

0 Kudos

friends ,

i am getting output like this

AA 222 01 mm

AA 141 02 bb

AA 454 21 jj

AA 242 52 lk

BB 548 54 pl

BB 214 24 kj

but i want like this . there is keyword for this but i am unable recollect from memory.

AA 222 01 mm

141 02 bb

454 21 jj

242 52 lk

BB 548 54 pl

214 24 kj

0 Kudos

write as :

loop at itab.

at new field1.

write : itab-field1 ,

endat.

clear itab-field1.

write 😕 itab-field2 ..

endloop.