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: 

Posting HR data - infotype 147 (Appraisals)

Former Member
0 Kudos

Hi Gurus!

I'm using FM HR_INFOTYPE_OPERATION to upload data to infotype 147. However I'm not gettinting results.

I'ts throing error PG428 - "A complex application error has occurred".

I've setted DIALOG_MODE with value '2', and it shows the screen with no values. I'm tring to pass the values on a structured field of type P0147.

Could you please help?!

Best Regards,

Carlos Constantino

2 REPLIES 2

Former Member
0 Kudos

could you please paste ut code block of function infotype operation?

thanks,

krishna

0 Kudos
FORM f_aval_desemp .

  FIELD-SYMBOLS: <wa> LIKE LINE OF gt_data.
  DATA: lp0147 TYPE p0147,
        l_return TYPE bapireturn1,
        l_key    TYPE bapipakey,
        l_infrec TYPE infty.

  LOOP AT gt_data ASSIGNING <wa>.

    CLEAR l_return.

    PERFORM f_set_p0147 USING <wa>
                        CHANGING lp0147.

    CONDENSE <wa>-choic.
    MOVE <wa>-choic TO l_infrec.

    UNPACK l_infrec TO l_infrec.

    CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
      EXPORTING
        number = <wa>-pernr
      IMPORTING
        return = l_return.
    MOVE-CORRESPONDING l_return TO <wa>.

    CHECK l_return-type NE 'E'.

    CLEAR l_return.

    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
      EXPORTING
        infty                  = l_infrec
        number                 = <wa>-pernr
        SUBTYPE                = <wa>-subty
*       OBJECTID               =
*       LOCKINDICATOR          =
       VALIDITYEND            = <wa>-begda
       VALIDITYBEGIN          = <wa>-endda
*       RECORDNUMBER           =
        record                 = lp0147
        operation              = create                  " 'INS'
*       TCLAS                  = ' '
*       DIALOG_MODE            = '2'
        nocommit               = p_test
*       VIEW_IDENTIFIER        =
*       SECONDARY_RECORD       =
      IMPORTING
        return                 = l_return
        key                    = l_key
              .

    MOVE-CORRESPONDING l_return TO <wa>.

    CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
      EXPORTING
        number        = <wa>-pernr.
*     IMPORTING
*       RETURN        =
              .

  ENDLOOP.

ENDFORM.                    " F_AVAL_DESEMP

FORM f_set_p0147  USING    p_wa LIKE LINE OF gt_data
                  CHANGING p_p0147 TYPE p0147.

  MOVE-CORRESPONDING p_wa TO p_p0147.

ENDFORM.                    " F_SET_P0147

P0147 fields that are filled:

PERNR

BEGDA

ENDDA

CHOIC

SUBTY

APP0A

APF0A

APP0B

APF0B

APP0C

APF0C