Skip to Content
avatar image
Former Member

Help in the FM

hi folks,

I have this piece of code and trying to delimit the records on the infotype 0050. The code is executing fine and I am getting no errors when I run the code but the record is not getting delimited.

Can anyone tell me what am I missing here?

SELECT SINGLE * INTO CORRESPONDING FIELDS OF WA_0050 FROM PA0050 WHERE PERNR = REC-PERNR.

CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'

EXPORTING

number = WA_0050-PERNR

IMPORTING

RETURN = return.

CALL FUNCTION 'HR_INFOTYPE_OPERATION'

EXPORTING

infty = '0050'

number = wa_0050-pernr

  • subtype = subty

validityend = ztermin (delimit date -YYYYMMDD)

validitybegin = wa_0050-begda

  • recordnumber = seqnr

record = wa_0050

operation = 'LIS9'

tclas = 'A'

dialog_mode = '0'

IMPORTING

return = return

key = key

EXCEPTIONS

OTHERS = 0.

IF NOT return IS INITIAL.

CLEAR key.

EXIT.

ENDIF.

CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'

EXPORTING

number = WA_0050-PERNR

IMPORTING

return = return.

Any insight into this is greatly appreciated.

Thanks

Vinu

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Apr 25, 2006 at 09:28 PM

    1. if you haven't already trie dit..put an explicit COMMIT WORK.

    2. Change the parameter to dialog_mode = '2' & verify if all the delimit is actually done.

    regards,

    Suresh Datti

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Suresh Datti

      hi folks!!!

      Solved it using the FM HR_INFOTYPE_OPERATION.

      Here is the code....

      I had not used the FM 'HR_INFOTYPE_GETDETAIL' earlier, when I used it and with the action 'MOD' it worked, the records are getting delimited.

      The problem with BDC was, it was not recognizing the Delimit action (when the button for delimit is pressed)

      as a result the records were not getting updated.

      The problem is each infotype has some uniques actions that they respond to like in my system updating infotypes 0035 and 0041 have dynamic actions which do not show up when you are recording the data using SHDB in a sequence.

      But this worked finally!!!!

      SELECT SINGLE * INTO CORRESPONDING FIELDS OF WA_0050 FROM PA0050 WHERE

      PERNR = REC-PERNR.

      BEGIN = wa_0050-begda.

      END = wa_0050-endda.

      CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'

      EXPORTING

      number = WA_0050-PERNR

      IMPORTING

      RETURN = return.

      CALL FUNCTION 'HR_INFOTYPE_GETDETAIL'

      EXPORTING

      infty = '0050'

      number = WA_0050-pernr

      • subtype = subty

      validityend = END

      validitybegin = BEGIN

      tclas = 'A'

      IMPORTING

      return = return

      record = WA_0050

      EXCEPTIONS

      OTHERS = 0.

      IF NOT return IS INITIAL.

      EXIT.

      ENDIF.

      Move ztermin to wa_0050-endda.

      CALL FUNCTION 'HR_INFOTYPE_OPERATION'

      EXPORTING

      infty = '0050'

      number = wa_0050-pernr

      • subtype = subty

      validityend = '99991231'

      validitybegin = BEGIN

      • recordnumber = seqnr

      record = wa_0050

      operation = 'MOD'

      tclas = 'A'

      dialog_mode = '0'

      IMPORTING

      return = return

      key = key

      EXCEPTIONS

      OTHERS = 0.

      IF NOT return IS INITIAL.

      CLEAR key.

      EXIT.

      ENDIF.

      CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'

      EXPORTING

      number = WA_0050-PERNR

      IMPORTING

      return = return.

      • IF NOT return IS INITIAL.

      • EXIT.

      • ENDIF.

      <b>I HOPE IT HELPS TO EVERYONE.

      THANKS GUYS FOR YOUR INPUT I SHALL AWARD POINTS HERE.

      VINU</b>