‎2008 Nov 24 9:41 AM
hello all,
I have problem with featching data from infotype 8, table pa0008 does not having data of all wage type it contain only basic salary amount, other wage type doest have amount in table pa0008 but when we open pa20 to see basic pay of a perner it will show all the wage type and its amount.
is their other table contan the values of other wage type or any Funcation module to retrive the data of basic pay.
thanks in adv.
kaustubh
‎2008 Nov 24 9:46 AM
‎2008 Nov 24 9:47 AM
Hi Try this,
Fetch the Basic salary data
rp_provide_from_last p0008 space g_begda g_endda.
IF pnp-sw-found = '1'.
DO 40 TIMES VARYING g_lga01 FROM p0008-lga01 NEXT p0008-lga02
VARYING g_bet01 FROM p0008-bet01 NEXT p0008-bet02
VARYING g_anz01 FROM p0008-anz01 NEXT p0008-anz02
VARYING g_ein01 FROM p0008-ein01 NEXT p0008-ein02
VARYING g_opk01 FROM p0008-opk01 NEXT p0008-opk02
VARYING g_ind01 FROM p0008-ind01 NEXT p0008-ind02.
IF g_lga01 IS INITIAL.
EXIT.
ENDIF.
i_ptbindbw_line-seqnr = sy-index.
i_ptbindbw_line-lgart = g_lga01.
i_ptbindbw_line-opken = g_opk01.
i_ptbindbw_line-betrg = g_bet01.
i_ptbindbw_line-waers = p0008-waers.
i_ptbindbw_line-indbw = g_ind01.
i_ptbindbw_line-anzhl = g_anz01.
APPEND i_ptbindbw_line TO i_ptbindbw.
CLEAR i_ptbindbw_line.
ENDDO.
ENDIF.
IF NOT i_ptbindbw[] IS INITIAL.
Function Module to evaluate indirect wage types.
rp_provide_from_last p0007 space g_begda g_endda.
CALL FUNCTION 'RP_EVALUATE_INDIRECTLY_P0008'
EXPORTING
appli = 'M'
pbegda = p0008-begda
pmolga = g_molga
pp0001 = p0001
pp0007 = p0007
pp0008 = p0008
ppernr = p0008-pernr
TABLES
ptbindbw = i_ptbindbw
EXCEPTIONS
bad_parameters = 1
error_at_indirect_evaluation = 2
OTHERS = 3.