Google Search - Blog...........

ABAP - How To Get The Sum For All The Fields In Classical Reports.

REPORT test_report.

tables:pa0008.

data: begin of itab occurs 0 ,
pernr like pa0008-pernr,
ansal like pa0008-ansal,
bet01 like pa0008-bet01 ,
end of itab .

data: v_sum type pa0008-bet01 .

select-options:s_pernr for pa0008-pernr .

start-of-selection .

select pernr
ansal
bet01
from pa0008
into table itab
where pernr in s_pernr .

loop at itab .
at end of pernr .
sum .
write:/ itab-pernr ,
itab-ansal,
itab-bet01.
endat .

endloop.

2 comments:

  1. Hi ,
    this is srinivasan, im new to hr abap, i have one doubt in GET PERNR? i dont want to mentioning the PNP LDB in se38-->attribute,bcoz ono selection screen will come while i execute. i want generate 15 infotype data as flat text file, i want use physical DB thru GET PERNR AND BY using HR_READ_INFOTYPE i will fetch the data? is it possible? or if their is other way? pl give your valuable idea?

    thanks in advance,
    Srinivasan.r
    shreenivas.ram@gmail.com

    ReplyDelete
  2. i dont want to mention PNP LDB in se38 ->attribute, LDB screen is cmg while executing, im going generate flat text file. i want to pass 15 infotypes (physical DB) thru get pernr and by using HR_READ_INFOTYPE i will get the data? is it possible? Pl any one give ur valuable input.

    Thanks in advance.
    Srinivasan.r

    ReplyDelete