Update Infotype 1001

hi all,
I have to update  the SLAS of the object ID. I am using Fm " RH_UPDATE_INFty".  but it is not updating the SCLAS
Code is given below
REPORT  ZTEST_RH_UPDATE_INFTY.
DATA:
    lt_relation TYPE TABLE OF p1001,
    ls_relation TYPE          p1001.
  ls_relation-mandt = sy-mandt.
  ls_relation-plvar = '01'.
  ls_relation-otype = 'E'.
  ls_relation-objid = '30000031'.
  ls_relation-infty = '1001'.
  ls_relation-istat = '1'.
  ls_relation-rsign = 'A'.
  ls_relation-relat = '025'.
  ls_relation-begda = '20090709'.
  ls_relation-endda = '20090711'.
  ls_relation-sclas = 'P'.
  ls_relation-sobid =  '00123749'.
  APPEND ls_relation TO lt_relation.
CALL FUNCTION 'RH_UPDATE_INFTY'
    EXPORTING
      vtask                     = 'S'
    ORDER_FLG                 = 'X'
    COMMIT_FLG                = 'X'
    AUTHY                     = 'X'
    PPPAR_IMP                 =
    OLD_TABNR_NEW_LANGU       = ' '
    REPID                     = ' '
    FORM                      = ' '
    KEEP_LUPD                 =
    WORKF_ACTV                = 'X'
    tables
      innnn                     = lt_relation
    ILFCODE                   =
   EXCEPTIONS
     ERROR_DURING_UPDATE       = 1
     NO_AUTHORIZATION          = 2
     REPID_FORM_INITIAL        = 3
     CORR_EXIT                 = 4
     OTHERS                    = 5
  IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
please help .
thanks
Sachin

hi Dilek,
thanks for ur reply.
I have added both FM but its not updating yet.
below is my code.
REPORT  ZTEST_RH_UPDATE_INFTY.
DATA:
    lt_relation TYPE TABLE OF p1001,
    ls_relation TYPE          p1001.
  ls_relation-mandt = sy-mandt.
  ls_relation-plvar = '01'.
  ls_relation-otype = 'E'.
  ls_relation-objid = '30000031'.
  ls_relation-infty = '1001'.
  ls_relation-istat = '1'.
  ls_relation-rsign = 'A'.
  ls_relation-relat = '025'.
  ls_relation-begda = '20090709'.
  ls_relation-endda = '20090711'.
  ls_relation-sclas = 'P'.
  ls_relation-sobid =  '00123749'.
  APPEND ls_relation TO lt_relation.
CALL FUNCTION 'RH_PM_ENQUEUE'
  EXPORTING
    act_plvar              = '01'
    act_otype              =  'E'
    act_objid              =  '30000031'
  ERROR_TYPE             = 'I'
EXCEPTIONS
  ERROR_IN_ENQUEUE       = 1
  OTHERS                 = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
  CALL FUNCTION 'RH_UPDATE_INFTY'
    EXPORTING
      vtask                     = 'S'
    ORDER_FLG                 = 'X'
    COMMIT_FLG                = 'X'
    AUTHY                     = 'X'
    PPPAR_IMP                 =
    OLD_TABNR_NEW_LANGU       = ' '
    REPID                     = ' '
    FORM                      = ' '
    KEEP_LUPD                 =
    WORKF_ACTV                = 'X'
    tables
      innnn                     = lt_relation
    ILFCODE                   =
   EXCEPTIONS
     ERROR_DURING_UPDATE       = 1
     NO_AUTHORIZATION          = 2
     REPID_FORM_INITIAL        = 3
     CORR_EXIT                 = 4
     OTHERS                    = 5
  IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
        WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.
  CALL FUNCTION 'RH_PM_DEQUEUE'
    EXPORTING
      act_plvar       = '01'
      act_otype       = 'E'
      act_objid       = '30000031'.
why this code is not updating SCLAS.
please help
thanks
Sachin

Similar Messages

  • HR ABAP - update infotype 1001

    Hi,
    I am trying to update position of external person using function RH_UPDATE_INFTY_1001_EXT but it doesn't update neither it does give any error.
    Below is my code:
    hold_HSU_1001 like p1001.
    loop at hold_HSU_1001.
        case hold_HSU_1001-sclas.
          when 'U'.
            hold_HSU_1001-sobid = ZHAPEXTP-OT_LOCATN.
          when 'S'.
            hold_HSU_1001-sobid = ZHAPEXTP-OT_POSITN.
        endcase.
        modify hold_HSU_1001 transporting sobid.
      endloop.
      call function 'RH_UPDATE_INFTY'
           exporting  vtask = 'S'
           tables     innnn = hold_HSU_1001
           exceptions ERROR_DURING_UPDATE = 1
                      NO_AUTHORIZATION    = 2
                      REPID_FORM_INITIAL  = 3
                      CORR_EXIT           = 4.
    key parameters of hold_HSU_1001 is
    hold_HSU_1001-otype = 'H' (external person)
    hold_HSU_1001-OBJID = '50000123'
    hold_HSU_1001-plvar = 'ab'
    hold_HSU_1001-rsign = 'B'
    hold_HSU_1001-relat = '008'
    hold_HSU_1001-istat = '1' (active)
    hold_HSU_1001-slcas = 'S' (positon)
    hold_HSU_1001-sobid = '5000465' (which is to be updated).
    Not sure why sobid doesn't get updated. if anyone can help it would be great.
    thank you
    Suganya

    Hi,
    I tried to pass that missing parameters also...Still it doesn't update.
    i also tried RH_UPDATE_INFTY and RH_RELATION_MAINTAIN.
    Thank you
    Suganya

  • Segment E1PITYP occurs for each subtype of Infotype 1001 in update mode

    Hi,
    I am using transaction PFAL and IDoc HRMD_A for transferring HR data.
    In update mode the resulting IDoc contains segment E1PITYP for each subtyp (for example A002) of Infotype 1001 even if it contains no segments of type E1P1001.
    Could somebody explain this and is it possible to avoid this behavior?
    Thanks and regards
    Patrick

    Hi,
    thanks for your answer.
    Still I am little bit confused and want give an more detailed description of my problem.
    If I export an organizational unit in initial mode I have for example 5 segments of type E1PITYP and each of them has a subsegment (for example E1P1001).
    Export of the same organizational unit in update mode results in more than 200 segments of type E1PITYP and all of them without subsegment.
    This seems to happen for all infotypes (not only 1001 like I thought before).
    Now I want to understand why this happens and if it's possible to update an organizational unit without segments of type E1PITYP that don't have a subsegment.
    Regards
    Patrick

  • Event for infotype 1001 updates doesn't trigger

    Hi everyone,
    I'm facing the following problem at HR Workflow
    I've created the object ZEHSBUS900, subtype of PDOTYPE_SH. And so, created two events: NOTIFYCREATE and NOTIFYUPDATE.
    At SWEHR3 transaction, I have this two entries:
    S     Position     1001     Relationships     A003     Belongs to     INS          0     ZEHSBUS900     NOTIFYCREATION
    S     Position     1001     Relationships     A003     Belongs to     UPD          0     ZEHSBUS900     NOTIFYUPDATE
    But when I create or update an infotype 1001, only the NOTIFYCREATION is triggered. I mean, the UPD operation doesn't work.
    What is stange is that I've made this kind of implementation at another system and it's working fine ( a creation at 1001 triggers NOTIFYCREATION and modifications trigger NOTIFYUPDATE ).
    Do you know what could be missing?
    Thanks in advance,
    Raphael Xavier

    Hi Abdullah!
    Thank you for the tip, but it still doesn't work this way. As what I've said before, what is strange is that problem occurs in one system and didn't occur in another one, and the same procedure was used in both.
    What I did to "solve" this was using a function instead calling the event at SWEHR3. In this function there is a verification if it is an insert ou update operation and then a call to the function SWE_EVENT_CREATE.
    It wasn't the best solution, but still was a solution.
    If anyone has any idea what it can be, I'm still interested about it.
    Raphael

  • Error message 'insertion of infotype 1001 (return code 3)'

    Hello,
    I have an IDoc containing many object like 'CP' and 'S' with their IT1001 relationships in UPDATE mode.
    While posting the IDoc, it's going into 51 status with error message 'Error: insertion of infotype 1001 (return code 3)'.
    Could you help me any possible solution?
    Thanks.

    Hello,
    The IDoc contains IT1001 relationships in update mode of Object type 'S' and 'CP'.
    There is no structural issue with the IDoc contents.
    Is there any other specific issue?
    Thanks.

  • EREC: An error occurred when you tried to insert infotype 1001 in IDOC

    Hello Experts,
    I have standalone e-Recruitment system and separate SAP HR system. I have ALE configuration done to talk both system.
    In the Initial Transfer, I ran PFAL in HR system in 5 steps.
    Step 1  Execute PFAL (RHALEINI)for Obj Type O, Infotype 1000 and Transfer mode as Update mode
    Step 2  Execute PFAL (RHALEINI)for Obj Type S, Infotype 1000 and Transfer mode  as Update mode
    Step 3  Execute PFAL (RHALEINI)for Obj Type O and Transfer mode as Insert
    Step 4:  Execute PFAL (RHALEINI)for Obj Type S and Transfer mode as Insert
    Step 5:  Execute PFAL (RHALEINI)for Obj Type P and Transfer mode as Insert
    All IDOC created in update mode (Step 1 & 2) are green in receiving e-recruitment system but IDOC getting create in Insert mode (Step 3 ,4 &5) are in status 51/52 I mean Red.
    Error messages are as below:
    1) An error occurred when you tried to insert infotype 1001 using RH_INSERT_INFTY (return code 3).
    2) You tried to create a relationship from object 01S 76037685 to object 01AGC:R3HCM:OM_DISPLAY_US. However, object 01AGC:R3HCM:OM_DISPLAY_US does not exist or is not active in the period from 20110101 to 99991231
    3) You tried to create a relationship from object 01O 10840305 to object 01O 10299323. However, object 01O 10299323 does not exist or is not active in the period from 20110101 to 99991231.
    @ 3rd message : Object 10299323 exist but I still don't understand why I get this message.
    Please provide valuable suggestion so that I can get rid of this error in IDOC
    Appreciate your help.
    Regards,
    Krishna Bidwai
    Losangeles USA.
    818 527 0204.
    Edited by: krishna bidwai on Aug 22, 2011 7:19 PM

    Dear Krishna,
    Hope you are doing good.
    I know its very late in getting into this conversation. Since I am also experiencing the same issue, i need some inputs from you.
    The error you posted on the top is same what i am getting when I am doing data transfers from SAP HR to E-Rec systems. Our iDoc is working file in Development server but not in Quality server. I am experiencing the same errors what you have mentioned above.
    When i checked the error, this error has occurred in subroutine read_namtb for structure  of infotype.
    Proceedure is to Check the entry for infotype  in table T777D (structure, IDoc segment,
    expanded structure) and the corresponding structures.
    As you have resolved this issue before, can you please suggest what needs to be maintained in the tables such as T777D, T777E, and T777Z.
    Appreciate your valuable inputs on this.
    Thank you.

  • Infotype 1001 skipped due to lack of authorization

    Hi,
    I am using PP03 for maintaining Organisation Unit relationship with Cost Center,but i am getting this Information message.
    Althouhg i have * in PLOG object in authorsation.
    Please let me know where would be the problem.
    THanks,
    Viru

    Hello,
    Authorization check failed
    bject Class HR   Human Resources
    Authorization Obj. PLOG       Personnel Planning
       Authorization Field INFOTYP Infotype
                                                                                    1001
       Authorization Field ISTAT Planning Status
                                                                                    1
       Authorization Field OTYPE Object Type
                                                                                    S
       Authorization Field PLVAR Plan Version
                                                                                    01
       Authorization Field PPFCODE Function Code
                                                                                    INSE
       Authorization Field SUBTYP Subtype
                                                                                    <Dummy>
    Check if this is the case if your metting the message.
    Regards,
    Regi ALex

  • HR-ABAP Any BAPI or Function module to update infotypes 167 & 170

    Hi,
        Can anyone let me know is there any BAPI or Function module to update infotypes 167(Health Plans) & 170(Flexible Spending Accounts).
    Thanks,
    Sandeep

    Hi,
       U can use HR_BEN_CREATE_PLANS internally it calls HR infotype operation as specified by suresh.
    Suresh  : If there are approximately 3000 records to be updated on regular basis do u think is it better to use BAPI's or BDC
    regards
    Vick

  • Need a help to Update Infotype.....

    Hi Experts,
    *am developing HR-ABAP Report inthat, i have data in 2 internal tables, through these (itabs) i want to*
    *insert the data into 2 Ztables(Respective tables) and then i want to Update one Custom Infotype.*
    how can i procedure for this? is there any FM to update Infotype....
    Thanks in Advance,
    sudeer.

    The best way is to use HR_INFOTYPE_OPERATION function module in your program.
    Sample code:
          call function 'HR_INFOTYPE_OPERATION'
            exporting
              infty         = p0082-infty
              number        = p0082-pernr
              subtype       = p0082-subty
              validityend   = p0082-endda
              validitybegin = p0082-begda
              record        = p0082
              operation     = 'INS'
              tclas         = 'A'
              dialog_mode   = '0'
            importing
              return        = return
              key           = key.
         capture error messages
          if return-type = 'E'.
            concatenate 'Sub Type:' p0082-infty into messtab-tcode.
            move return-message to messtab-param.
            append messtab. clear messtab.
          endif.
    You can use it for modifying the record also.

  • How to get the report to relaionship from infotype 1001.

    Hi,
    Could any one just let me know regarding how to get reports to relationship for the particular employee number from infotype 1001.
    What exactly are the aprameters involved.
    Thanks in Advance ,
    Irfan Hussain

    Hi Irfan,
    SELECT abkrs
             pernr
             ename
             gsber
             begda
             persg
             persk
             werks
             btrtl
             plans
             kostl
             orgeh
         INTO TABLE it_0001
         FROM pa0001
       loop at it_0001.
        CLEAR: l_plans, l_sobid, l_sobidx, l_pernr.
        SELECT SINGLE sobid INTO l_sobid
          FROM hrp1001
         WHERE otype = 'S'
           AND objid = it_0001-plans
           AND plvar = '01'
           AND relat = '002'
           AND endda = '99991231'.
        IF sy-subrc EQ 0.
          l_plans = l_sobid.
          SELECT SINGLE sobid INTO l_sobidx
          FROM hrp1001
         WHERE otype = 'S'
           AND objid = l_plans
           AND plvar = '01'
           AND relat = '008'
           AND endda = '99991231'.
          IF sy-subrc EQ 0.
            l_pernr = l_sobidx.
            SELECT SINGLE ename INTO <b>it_0001-repto</b>
              FROM pa0001
             WHERE pernr = l_pernr.
            IF sy-subrc EQ 0.
             MODIFY it_0001 INDEX l_index TRANSPORTING repto.
            ENDIF.
          ENDIF.
        ENDIF.
       endloop.
    Regards,
    Raj

  • HRMD_A07 Idoc to update InfoType 0014 does not delimit existing PA0014 rec

    In ECC 6.0, we are using HRMD_A07 Idoc to update infotype 0014 using update data received from a third party application. In XI, I am creating the Idoc with Update Code "U" with E1PLOGI, E1PITYP and E1P0014 segments. E1P0014 holds the data for the latest record.
    If I directly pass the Idoc thru ALE layer, It creates records for the new date range on E1P0014 segment, but does not delimit the previous record by changing its end date. This results in two records in PA0014 with end date of 12/31/9999 - which is wrong.
    I also tried using a wrapper FM to create additional segments in the Idoc representing the existing record in PA0014, with the end date being delimited to incoming record's beg. date minus 1.
    This also results in just creating two additional records in PA0014 corresponding to the two segments in Idoc while existing record in PA0014 stays intact resulting in two records with end date 12/31/9999.
    I also experimented with setting the lock indicator (PA0014-SPRPS) but that also does not result in delimiting the existing record.
    Am I missing something? Is there a piece of config that controls this?
    Regards,
    The time constraint on 0014 is "2"

    Hi Jon and Ashish,
    I too am facing the same issue that the new IDOC is not delimiting the previous record.
    Can you explain how did u get over you issue.
    I'm maintaining the same dates in E1PITYP and in E1P0014.
    Thanks,
    Jilly

  • Problem in updating infotype 2001

    Hi Experts,
                     While i am  updating infotype 2001 , using HR_INFOTYPE_operation FM it giving a error , because it calling a wrong sceen 2000 , instead of 2001 . can anybody can help on this ?
    thanks and regards
    Renjith MP

    Hi Dude,
    Go through the below code for 2002 infotype :
    TYPES BEGIN OF text_version.
    TYPES   nummer TYPE x.
    TYPES END OF text_version.
    DATA: PERSONALDATAKEY    LIKE BAPIPAKEY.
    DATA: RETURN       LIKE BAPIRETURN1.
    DATA: P2002       LIKE P2002.
    DATA: PSKEY       TYPE PSKEY.
    DATA: IT_TEXT       TYPE HRPAD_TEXT_TAB .
    DATA: LINE       TYPE HRPAD_TEXT.
    DATA: version       TYPE text_version.
    DATA: pcl1       TYPE pcl1.Input Parameters:
    PARAMETERS:  PERNR  LIKE PA2002-PERNR  DEFAULT '1004511',
                 AWART  LIKE PA2002-AWART  DEFAULT 'LW',
                 BEGDA  LIKE PA2002-BEGDA  DEFAULT SY-DATUM,
                 ENDDA  LIKE PA2002-ENDDA  DEFAULT SY-DATUM,
                 BEGUZ  LIKE PA2002-BEGUZ,
                 ENDUZ  LIKE PA2002-ENDUZ.
    START-OF-SELECTION.
      CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'
            EXPORTING
              number = PERNR
            IMPORTING
              RETURN = RETURN.
      IF RETURN-NUMBER IS NOT INITIAL.
        EXIT.
      ENDIF.
    * ADD DATA
      CLEAR: P2002.
      P2002-PERNR = PERNR.
      P2002-SUBTY = AWART.
      P2002-ENDDA = BEGDA.
      P2002-BEGDA = BEGDA.
      P2002-BEGUZ = BEGUZ.
      P2002-ENDUZ = ENDUZ.
      P2002-AWART = AWART.
      P2002-ITXEX = 'X'.
    * WRITE DATA
      CLEAR: RETURN, PERSONALDATAKEY.
      CALL FUNCTION 'HR_INFOTYPE_OPERATION'
             EXPORTING
                  INFTY          = '2002'
                  NUMBER         = PERNR
                  SUBTYPE        = AWART
                  VALIDITYEND    = BEGDA
                  VALIDITYBEGIN  = BEGDA
                  RECORD         = P2002
                  OPERATION      = 'INS'
                  NOCOMMIT       = ''
                  TCLAS          = 'A'
             IMPORTING
                  RETURN         = RETURN
                  KEY            = PERSONALDATAKEY
             EXCEPTIONS
                  OTHERS         = 0.
      IF RETURN-NUMBER IS INITIAL.
        COMMIT WORK AND WAIT.
      ELSE.
        ROLLBACK WORK.
        EXIT.
      ENDIF.

  • Function module for access OM Data from infotype 1001

    We had a function module for accessing OM data viz. Infotype 1001. Could you let me know.
    Advanced thanks,
    Dasaradh kosana

    Hi Dasaradh,
          Do you want the fm which fetches the data from HRP1001 , if this is the case you can use this FM RH_READ_INFTY_1001.
    Reward Points if it is helpful
    Regards,
    Kiran I

  • How to create infotype 1001

    Hi experts,
    I am doing some configuration in accouting and an error pops up indicating infotype 1001 is not maintained. As I know very little about HR module so I just try to create infotype 1001 in PA30 but turn out it can not be maintained there. Could any body tell me how to maintain this infotype.
    Thanks,
    Tony

    Hi Tony,
    You can go to PP01, select the otype, type in the objid and create 'Relationships' infotype which is infotype 1001.
    Through transaction OOVK, you can find out what all relationships have to be created for an object. Some of these can be maintained through PP01, some cannot be (selecting the relationship subtype and then allowed relationships -> not maintainable flag).
    Basically, you need to find out that for which relationship (subtype of infotype 1001) it is sayin that 1001 is not maintained. Then you can go and create only that relation in PP01.
    Regards,
    Neha

  • Update infotype 0032 in user exit ZXPADU02

    Hi All,
    I have the following requirement.
    Telephone extension number is stored in IT0105 and IT0032. When the extension number is updated through ESS, this is stored in IT0105 but it does not update IT0032 which is displayed in MSS.
    I need to update infotype 0032 based on the data in 0105.
    I thought I could update infotype 0032 in userexit ZXPADU02 whenever infotype 0105 was saved using the function module HR_INFOTYPE_OPERATION but it is not working for me.
    Any help would be appreciated.
    Elaine

    You have to make the function call a separate unit of work.One other option is to put the function call in a report & SUBMIT it from the User exit.
    ~Suresh

Maybe you are looking for