Application Development and Automation 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: 
Read only

Function module for assigned wage types

Former Member
0 Likes
400

Hi experts,

We need wage type wise count and sum of the amount for each wage type defined in infotype '0008' for the given from and to dates. Is there any function module available for the same.

Please suggest.

Regards,

Kaustubh Kabre.

1 REPLY 1
Read only

venkat_o
Active Contributor
0 Likes
308

Hi, <li>I do not look for function module for this case as i know that we can or have to read wage types and corresponding amount in the program. LDB PNP should be given in program attributes.


REPORT RPABAP06.
TABLES:PERNR.
INFOTYPES:0008.
DATA: BEGIN OF WAGETYPES,
   LGA LIKE P0008-LGA01,
   BET LIKE P0008-BET01,
   ANZ LIKE P0008-ANZ01,
   EIN LIKE P0008-EIN01,
   OPK LIKE P0008-OPK01,
  END OF WAGETYPES.
DATA:total type P0008-BET01.
GET PERNR.

RP_PROVIDE_FROM_LAST P0008 SPACE PN-BEGDA PN-ENDDA.
DO 20 TIMES VARYING WAGETYPES-LGA FROM P0008-LGA01 NEXT P0008-LGA02
            VARYING WAGETYPES-BET FROM P0008-BET01 NEXT P0008-BET02.
IF WAGETYPES-LGA IS INITIAL.
 EXIT.
ELSE.
 TOTAL = TOTAL + WAGETYPES-BET.
 WRITE: / WAGETYPES-LGA, WAGETYPES-BET.
ENDIF.
ENDDO.

WRITE TOTAL.
Thanks Venkat.O