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: 

line Alignment in sending mail

Former Member
0 Kudos

Hi All,

I am craeting program for sending mail, its working fine but i want some line alignment in the body part. my output is:

Cost center | Company Code | Cost element | Description

159040 | 040 | 0000600100 | SALARIES

159040 | 040 | 6475FC | Contract

361001 | 001 | 0000600100 | SALARIES

i want output like below: when same cost center are there

Cost center | Company Code ption

159040 | 040

Cost element | Description

0000600100 | SALARIES

6475FC | Contract

Cost center | Company Code | Cost element | Description

361001 | 001 | 0000600100 | SALARIES

Can you please guide me

Thanks

Jigar

1 ACCEPTED SOLUTION

Former Member
0 Kudos

can you help me??

Thanks

Jigar

3 REPLIES 3

Former Member
0 Kudos

can you help me??

Thanks

Jigar

0 Kudos

Cost center | Company Code ption

159040 | 040

Cost element | Description

0000600100 | SALARIES

6475FC | Contract

Cost center | Company Code | Cost element | Description

361001 | 001 | 0000600100 | SALARIES

instead of the above you can go for generalized like below ..

Cost center | Company Code ption

159040 | 040

Cost element | Description

0000600100 | SALARIES

6475FC | Contract

Cost center | Company Code

361001 | 001 |

Cost element | Description

0000600100 | SALARIES

data: wa_tab like line of it_tab.
sort it_tab by costcenter companycode.
loop at it_tab.
  wa_tab = it_tab.
  at new companycode.
   write:/ ' Cost center | Company Code '.
   write:/ wa_tab-costcenter,
             wa_tab-companycode.
    skip 2 lines.
   write:/ ' Cost element | Description'.
  endat.
  
  write:/ wa_tab-costelement,
            wa_tab-description.

endloop.

0 Kudos

Hi Vijay,

You ans is very helpful.

Thanks

Jigar