08-08-2008 11:24 PM
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
08-09-2008 12:45 AM
08-09-2008 12:45 AM
08-09-2008 5:23 AM
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.
08-11-2008 11:00 PM