cancel
Showing results for 
Search instead for 
Did you mean: 

HR-abap problem in getting wage type in 0008 infotypes

Former Member
0 Kudos

i am creating sap scripts for appointment letters in that i am coolecting data from table pa0008,

for that i am using field bet01 , bet02, etc for the diff. allowances .

if the order of allowances are changed in 0008 infotype then field form which i am getting amount is also getting changed.

E.G :- i am using perticular order in 0008

then it gives me wage type in lga02 and corresponding amount in bet02 for first allowance

wage type in lga03 and corresponding amount in bet03 for second allowance

and now if i interchange order of allowances in pa008 then t gives me

wage type in lga02 and corresponding amount in bet02 for first allowance

wage type in lga03 and corresponding amount in bet03 for second allowance

i hope you understnad my problem .

Thanks in advance

Accepted Solutions (1)

Accepted Solutions (1)

GauthamV
Active Contributor
0 Kudos

Use this function module which gives all wage type details for infotype 0008.

RP_FILL_WAGE_TYPE_TABLE_EXT

Answers (4)

Answers (4)

Former Member
0 Kudos

thanks Durga for the answer ,

I am getting all the tabels p0001, p0007, p0008, ppbwla, p0230 blannk

can u help me further

i am calling FM like these

data: begin of ppbwla occurs 20.

include structure pbwla.

data: end of ppbwla.

DATA : ipa0008 TYPE STANDARD TABLE OF pa0008 WITH HEADER LINE,

  • ipbwla TYPE STANDARD TABLE OF PBWLA,

ipa0001 TYPE STANDARD TABLE OF p0001,

ipa0007 TYPE STANDARD TABLE OF p0007,

iPA0230 TYPE STANDARD TABLE OF PA0230.

in tables do i need to use internaln tables in FM or it is ok.

i.e CALL FUNCTION 'RP_FILL_WAGE_TYPE_TABLE_EXT'

EXPORTING

pernr = pernr-pernr

infty = '0008'

*subty = ipa0008-subty

*objps = ipa0008-objps

begda = ipa0008-begda

endda = ipa0008-endda

dlspl = ' '

TABLES

pp0001 = p0001

pp0007 = p0007

pp0008 = p0008

ppbwla = ppbwla

PP0230 = p0230

EXCEPTIONS

error_at_indirect_evaluation = 1.

Former Member
0 Kudos

Hi,

please check thiscode

call function 'RP_FILL_WAGE_TYPE_TABLE_EXT'

exporting

appli = 'P'

pernr = p0467-pernr

infty = pinfty

  • SUBTY = PSUBTY

  • OBJPS = POBJPS

  • SEQNR = PSEQNR "QEAK100596

  • waers = sy-waers "XYMK097435

begda = datum

endda = datum

tables

pp0001 = p0001 "input

pp0007 = p0007 "input

pp0008 = p0008 "input

ppbwla = ppbwla "output

exceptions

error_at_indirect_evaluation = 1.

check sy-subrc eq 0.

loop at ppbwla.

if ppbwla-waers ne q0467-waer2.

perform convert_to_local_currency using

ppbwla-betrg ppbwla-waers

q0467-waer2 ppbwla-betrg

datum.

modify ppbwla.

endif.

endloop.

Ref program

MP046740

Thanks and regrds

Durga.K

Former Member
0 Kudos

thanks gautam ,

but can you give me sample code for same FM,

bcoz i am getting errors in table types that i have passed with FM

Former Member
0 Kudos

to read the amounts corresponding to the wage types

use do .. varying ... enddo ...

data : it_pa0008 like pa0008 occurs 0 with header line.

data : begin of it_temp occurs 0,

lga01 like pa0008-lga01,

bet01 like pa0008-bet01,

end of it_temp.

do 40 times

varying it_temp-lga01 from it_pa0008-lga01 next it_pa0008-lga02

varying it_temp-bet01 from it_pa0008-bet01 next it_pa0008-bet02.

  • write case here to get the corresponding amounts

case it_temp-lga01.

when '/101'.

v_amt1 = it_temp-bet01.

when '/100'.

v_amt2 = it_temp-bet01.

endcase.

enddo.