2006 Jul 17 8:25 AM
Hello all, I am facing problem with this requirement.
I have some fields (EMPNUM, BASIC, HRA, INST, TOTALSAL)in my internal table I_EMPTAB from EMPTAB.
Now i want to dispaly the data of all my fields, and total salary of each field in a last column as TOTALSAL.
Please suggest me how to go about this issue.
thnx in advance.
sreenivas.
2006 Jul 17 8:30 AM
select empnum basic HRA INST
into table i_emptab
from emptab
where(Put your condition here).
loop at i_emptab into wa_emptab.
wa_emptab-totalsal = wa_emptab-empnum + wa_emptab-basic + wa_emptab-HRA + wa_emptab-inst.
modify i_emptab from wa_emptab.
endloop.Message was edited by: mukesh kumar
Hello all, I am facing problem with this requirement.
I have some fields (EMPNUM, BASIC, HRA, INST, TOTALSAL)in my internal table I_EMPTAB from EMPTAB.
Now i want to dispaly the data of all my fields, and total salary of each field in a last column as TOTALSAL.
Please suggest me how to go about this issue.
thnx in advance.
sreenivas.
2006 Jul 17 8:28 AM
loop at itab.
itab-total = itab-hra + itab-bsic + itab-int.
modify itab.
clear itab.
endloop.
now ur all field all in itab.
use alv or simple report to display it.
2006 Jul 17 8:29 AM
You will have calculate the total salary manually.
Loop at the table and calculate the total.
LOOP AT ITAB.
ITAB-TOTAL_SAL = ITAB-BASIC + ...
MODIFY ITAB.
ENDLOOP.
Now you write the output using the internal table, you will see the total salry.
Regards,
Ravi
Note : Please mark all the helpful answers
2006 Jul 17 8:39 AM
2006 Jul 17 8:30 AM
select empnum basic HRA INST
into table i_emptab
from emptab
where(Put your condition here).
loop at i_emptab into wa_emptab.
wa_emptab-totalsal = wa_emptab-empnum + wa_emptab-basic + wa_emptab-HRA + wa_emptab-inst.
modify i_emptab from wa_emptab.
endloop.Message was edited by: mukesh kumar
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |