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: 

BAPI_wagetype_employeegetlist - trouble with fetching the Amount field

former_member187692
Participant
0 Kudos
250

Hi ,

     I want to get the wage details for particular Employee's Personnel Number (PERNR). I have two bapi's

BAPI_WAGETYPE_EMPLOYEEGETLIST &

BAPI_WAGETYPE_GETLIST.

I want to fetch the wages details ( wages type, amount , number etc.) and populate some fields (like amount fields which is left blank for some wage type and save it). After saving this information should be available from PA30 screen.  Give the PERNR no and infotype as ' basic pay ' ( IT0008 ) -> then click display.

I want to fill in amount information for those wage types which are no filled from notepad.

Trouble is that the Amount field is no available in the two bapi's mentioned above. This particular field:  AMOUNT    TYPE BAPICURR_D, ( DEC  length 23).


Is there any other bapi's to complete this task ?



Go through the logic of my Program for better understanding:-


CALL FUNCTION 'UPLOAD'

   EXPORTING

*  CODEPAGE                      = ' '

*  FILENAME                      = ' '

    FILETYPE                      = 'DAT'

  TABLES

    DATA_TAB                      = ITAB.

call function 'BAPI_PS_INITIALIZATION' .

LOOP AT ITAB INTO WA.

MOVE: WA-WTYPE      TO WAGES-WTYPE,

       WA-AMOUNT     TO WAGES-AMOUNT,

       WA-NUMBER     TO WAGES-NUMBER,

       WA-TIMEUNIT   TO WAGES-TIMEUNIT,

       WA-INDVALUAT  TO WAGES-INDVALUAT,

       WA-ADDTTAMNT  TO WAGES-ADDTTAMNT,

       WA-OPERINDIC  TO WAGES-OPERINDIC,

       WA-NAMEWTYPE  TO WAGES-NAMEWTYPE.

       APPEND WAGES  TO WAGES[].

call function 'BAPI_EMPLOYEE_ENQUEUE'

   exporting

     NUMBER        WA-EMPNO               "'12900'

  IMPORTING

    RETURN         RETURN.

call function 'BAPI_BASICPAY_CREATE'

   exporting

     EMPLOYEENUMBER             WA-EMPNO  "'12900'

     SUBTYPE                    WA-SUB    "'1   '

     VALIDITYBEGIN              WA-FROM   " '01.01.2014'

     VALIDITYEND                WA-TO     "'31.12.9999'

    PAYSCALETYPE                WA-PSTYPE " 01

    PAYSCALEAREA                WA-PSAREA " 12

    PAYSCALEGROUP               WA-PSGRP  " 120A

    PAYSCALELEVEL               WA-PSLVL  " 00

    CURRENCY                    WA-CURR   " INR

    COMPARISONPAYSCLTYPE        WA-CPSTYPE" 01

    COMPARISONPAYSCLAREA        WA-CPSAREA" 12

    COMPARISONPAYSCLGRP         WA-CPSGRP " 120A

    COMPARISONPAYSCLLVL         WA-CPSLVL " 00

*   COMPNEXTINCREASE           =

    CAPACITYUTILLEVEL           WA-CLVL   " 100.00

    HOURSWORKEDPERPERIOD        WA-WRKHRS " 192.00

*   ANNUALSALARY               =

  IMPORTING

    RETURN                      = RETURN2

  TABLES

    WAGETYPES                   = WAGES.

call function 'BAPI_WAGETYPE_EMPLOYEEGETLIST'

   exporting

     EMPLOYEENUMBER             = WA-EMPNO

*   LANGUAGE             =

*   LANGUAGE_ISO         =

*   VALIDITYDATE         = SY-DATUM

*   SELECTIONKEY         = '0'

* IMPORTING

*   RETURN               =

   TABLES

     WAGETYPES                  = WTYPES

           .

call function 'BAPI_TRANSACTION_COMMIT' .

ENDLOOP.



3 REPLIES 3

naveenvishal
Contributor
0 Kudos
161

Hi Naren.

Try the BAPI 'RP_FILL_WAGE_TYPE_TABLE_EXT' for fetching the wage type with amount.

Amount will be in table PPBWLA (Valuated wage types) for the period you are passing.

Hope this helps.

Regards,

Naveen

0 Kudos
161

Hi Naveen,

Can you tell what this warning message means

" Indirect valuation: No record for infotype 0001 on 00000101."

I have checked in PA30 screen for my particular PERNR number( IT0001 ) data exists.

Program:

CALL FUNCTION 'RP_FILL_WAGE_TYPE_TABLE_EXT'

   EXPORTING

*   APPLI                              = 'E'

*   BEGDA                              = '00000101'

*   ENDDA                              = '99991231'

*   INFTY                              = '0008'

*   OBJPS                              = '  '

*   TCLAS                              = 'A'

     PERNR                              = WA-EMPNO

*   SEQNR                              = '   '

     SUBTY                              = '0   '

*   DLSPL                              = 'X'

*   MSGFLG                             = ''

*   NORDCT                             = ''

*   CONV_CURR                          = 'X'

*   FLAG_NO_DB_READ                    =

   TABLES

     PP0001                             = KTAB

     PP0007                             = MTAB

     PP0008                             = JTAB

     PPBWLA                             = NTAB

*   PP0014                             =

*   PP0015                             =

*   PP0052                             =

*   PP0230                             =

*   PP0267                             =

* EXCEPTIONS

*   ERROR_AT_INDIRECT_EVALUATION       = 1

*   OTHERS                             = 2

           .

IF SY-SUBRC <> 0.

* Implement suitable error handling here

ENDIF.

0 Kudos
161

Hi Naren,

Pl pass the BEGDA as the date of IT0001 creation (and not the by-default date).

Hope this helps.

Regards,

Naveen