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: 

How to use betrg and sumbb in FM?

Former Member
0 Kudos

Hi experts,

The specification given is to get the personal_no(pernr),Complete name(CNAME) of the employees who are having active status i.e(STAT2 = 3) is the condition from pa0000,and for that list of employees get the basic pay(BETRG) using "HR_Read_Infotype" function module,and gross salary(SUMBB) using "HR_GET_TOTAL_AMOUNT_P0008" and display all the output using ALV grid display.I am getting so many errors in doing that report.I need some codings for that urgently.Kindly give me some ideas or codings if possible.

Thanks in advance,

Sakthi.

Message was edited by:

Sakthi saravanan

1 REPLY 1

Former Member
0 Kudos

Hi,

Follow the below steps:

1)Declare an internal table ITAB with all the fields which needs to be displayed in ALV Grid.

2)Get PERNR, CNAME into internal table ITAB with appropriate condition in SELECT statment.

3)Get all details into ITAB:

Start DO<>TIMES loop.

READ table ITAB into WA_TAB.

Get BETRG and SUMBB using FMs into WA_TAB and then

MODIFY ITAB FROM WA_TAB INDEX SY-INDEX.

ENDDO.

Now internal table has all data.

4)Display it using proper coding in ALV GRID.

*if you need help in ALV Grid then let me know.

*Always reward points for helpful answers

Regards,

Amit