Any FM to delimit record of infotype 1017 ?

Hi Experts.
I want to delimit the record of infotype 1017 so is there any function module to do so?
I can do that using BDC but the problem is that I want to delimit a particular "PD Profile" which is not getting feasible using BDC.
Thanks in Advance

Hi ,
since the infotype 1017 is an Organization Management infotypes you need to use the RH_*  standard function modules.
To delimit the infotype without a BDC program you have to can use the following sequence:
1) move the IT 1017 row to delimit into a wor area of type P1017.
2) append the work area of point 1 into a table of type P1017.
3) Call the FM RH_DELETE_INFTYPE using the table of point 2 as parameter.
4) modify the end date of the local work area in point 1)
5) repeat the step 2 using an empty internal table
6) Call the FM  RH_INSERT_INFTY using the table of point 5 as parameter.
7) Call the RH_UPDATE_DATABASE.
example
DATA: lt_p1017 TYPE TABLE OF p1017, 
                     lw_p1017 type p1017.
             * move your data into lw_p1017  
           APPEND lw_p1017  TO lt_p1017.
        CALL FUNCTION 'RH_DELETE_INFTY'
               EXPORTING
          *   LOAD                      = 'X'
              vtask                        = 'B'
          *   ORDER_FLG                 = 'X'
          *   COMMIT_FLG                = 'X'
         *   AUTHY                            = 'X'
         *   PPPAR_IMP                 =
        *   KEEP_LUPD                 =
         *   WORKF_ACTV             = 'X'
          TABLES
           innnn                         = lt_p1017
     *   ILFCODE                     =
         EXCEPTIONS              
           error_during_delete       = 1
           no_authorization          = 2
           delete_first_record       = 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.
   ELSE.
hope it's helpfull,
best regards luigi
Edited by: luigi la motta on May 24, 2010 3:50 PM

Similar Messages

  • Append records to infotype 4002

    I need to append records to infotype 4002,  I am using the HR_MAINTAIN_MASTERDATA fm and it is not updating.  I know you can't update records via PB40 but I'm doing this using abap.
    Any help/ suggestion on whic function module will be able to do this
    Thanx

    Let me rephrase my question:  I want to delimit a record to infotype 4002 'Vacancy Assignment'.  I am using the following code.
      CALL FUNCTION 'HR_MAINTAIN_MASTERDATA'
        EXPORTING
          pernr              = a_num
          actio              = 'INS'
          tclas              = 'B'
          begda              = it_4002-begda
          endda              = it_4002-endda
          dialog_mode        = '0'
        IMPORTING
          return1            = return1
          hr_return          = hr_return
        TABLES
          proposed_values    = it_pprop[].
    I can't use 'HR_INFOTYPE_OPERATION' FM as it works well for PA infotypes,  even if I set tclas to 'B' it gives a short dump.

  • Issue adding records to Infotype 0002

    Hi All,
    I am trying to insert records into Infotype 0002. I am using HR_INFOTYPE_OPERATION to do this. It works fine for all the employees but fot the ones who have Reference Personnel numbers. The system lets me to add the record to those employees through PA30 online or through BDC program with a warning message "No record with the same key for personnel number xxxxxxx",  but if I use the FM HR_INFOTYPE_OPERATION or HR_MAINTAIN_MASTERDATA, it sometimes gives me hard error message " The Social Insurance number already assigned to another employee" in the foreground and when executed in background I get a short dump with exception " CX_HRPA_INVALID_BUFFER_ACCESS".
    I debuged the standard code and the exception occurs in Include UP50RU02 in method IF_HRPA_MASTERDATA_BUFFER~INSERT.
    Short dump:
    The exception 'CX_HRPA_INVALID_BUFFER_ACCESS' was raised, but it was not caught
      anywhere along
    the call hierarchy.
    Since exceptions represent error situations and this error was not
    adequately responded to, the running ABAP program
      'CL_HRPA_MASTERDATA_BUFFER=====CP' has to be
    terminated.
    Please let me know if I am doing something wrong.
    Thanks,
    Danny.

    Hi Daniel,
    I would not worry about using FM 'HR_INFOTYPE_OPERATION' or 'HR_MAINTAIN_MASTERDATA' for the purpose of inserting PA infotype records for employees. I had developed a generic module last year to insert any PA infotype record which will use the standard PA business logic framework i.e. include all standard checks and validation, calls all Exits/BAdIs before inserting the record as it would when you are saving the infotype record via PA30. I basically created a wrapper FM to simplify the calling of some other standard FMs. Use it if you like (and if it works in your system keeping in mind config is different in every system) but please do handle all the Exceptions after the call (by reading the Message Handler Interface IF_HRPA_MESSAGE_HANDLER) to confirm there was no data inconsistency or other problems at the time of the update. Below is the sample code:
    The generic customer Function Module
    FUNCTION zpa_insert_any_infty_record.
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(IS_PNNNN) TYPE  ANY
    *"     REFERENCE(IT_TEXT_TAB) TYPE  HRPAD_TEXT_TAB OPTIONAL
    *"     REFERENCE(IV_NO_AUTH_CHECK) TYPE  BOOLE_D DEFAULT SPACE
    *"     REFERENCE(IV_LOCK) TYPE  SPRPS DEFAULT TRUE
    *"  EXPORTING
    *"     REFERENCE(EIF_MESSAGE_HANDLER) TYPE REF TO
    *"        IF_HRPA_MESSAGE_HANDLER
    *"     REFERENCE(EV_OK) TYPE  BOOLE_D
    *"  EXCEPTIONS
    *"      EX_PERNR_LOCKED
    * FUNCTION...... ZPA_INSERT_ANY_INFTY_RECORD                           *
    * FUNCTION GROUP.ZPA_FG_EMP_LEAVE_BOOKING                              *
    * TITLE......... Insert any PA infotype record for an employee         *
    * AUTHOR........ Sougata Chatterjee                                    *
    * DATE WRITTEN.. 23/08/2010                                            *
    * SAP RELEASE... ECC 6.0                                               *
    * SPECIFICATION. N/A - Reuseable Object                                *
    * =====================================================================*
    * DESCRIPTION... This function is a generic module that will insert    *
    *                a PA infotype record into the employee master data as *
    *                per the import structure IS_PNNNN. This module wil be *
    *                particularly useful when requirement is to create     *
    *                other infotype records for the same employee within a *
    *                User-Exit or a BAdI.                                  *
    * ASSUMPTIONS... Infotype record to be updated is a PA Infotype.       *
    * =====================================================================*
    * MODIFICATION HISTORY                                                 *
    * Date       Userid       Change No & Description                      *
      DATA:
        lif_msg_handler  TYPE REF TO if_hrpa_message_handler,
        lo_msg_handler   TYPE REF TO cl_hrpa_message_list.
    * instantiate the message handler object
      CREATE OBJECT lo_msg_handler.
    * assign a reference to a rereference variable using the CAST operation
      lif_msg_handler ?= lo_msg_handler.
    * insert the infotype record into the employee master data
      PERFORM insert_infotype USING    is_pnnnn
                                       it_text_tab
                                       iv_no_auth_check
                                       iv_lock
                                       lif_msg_handler
                              CHANGING ev_ok.
    * pass back the message handler to the calling program if it was requested
      CHECK eif_message_handler IS REQUESTED.
      eif_message_handler = lif_msg_handler.
    ENDFUNCTION.
    For some reason I couldn't format the subroutine code here in SDN as it is scrambling the whole page but you could use the link here to find the [subroutine code|http://www.mediafire.com/file/9923qui7dm4xqpg/Form%20Insert_Infotype.html] and an [example code|http://www.mediafire.com/file/ihg83agkf0mbc9k/z_calling_program.html] for the program calling this FM including exception handling etc.
    Let me know if the links are not working...I'm happy to email them to you if you want.
    Hope this helps.
    Cheers,
    Sougata.

  • Error in PA40: missing secondary record for infotype 0001

    Hi Experts,
    while changing the job code of employee i am getting below error in the PA40 transaction for IT0001 .
    Error : missing secondary record for infotype 0001 Key
    could you please tell me why this message is coming.
    Advance thanks,
    Regards
    Ram

    Hi,
    Please check out whether any user exits are maintained.
    Check ZXPADU01/ZXPADU02 includes.
    Please also check out whether there are dynamic actions configured for IT0000 and IT0001 via V_T588Z.
    Regards,
    Dilek
    Edited by: Dilek Ersoz Adak on Dec 16, 2009 3:19 PM

  • Delete Employee Records in Infotype 14

    Hi all,
    Is there any standard program that will delete records from infotype 14... Thanks a lot

    Hi Jim
    I do not know any programs for this but you can write your own utilizing the FM 'HR_INFOTYPE_OPERATION' with delete mode. For more details about the FM you can refer to Re: HR: creating IT "0015 - Additional Payments" item

  • Create an infotype 1017

    Hi,
    can any one tell me a function to assign a profile to a position in infotype 1017.
    (like using pp01 and choosing in object type position, in object ID the number of the position and the infotype where appears PD Profiles).
    Thanks in advance.
    R Cruz

    Hi Ricardo,
    I guess this is more than a late reply. However, I always think it is good to have the solution written down. I might have misunderstood your question - is it transaction PO13, OOSB and/or program RHPROFL0 you are looking for?
    /Elvez

  • Problem while inserting a record to infotype 416

    Iam facing a problem while inserting a record to the infotype 416 for a personnel no using the FM 'HR_INFOTYPE_OPERATION'.I have created a FM to insert a record to the infotype 416.In that FM iam using the FM 'HR_INFOTYPE_OPERATION' to create a record for infotype 416.while executing  my FM the FM 'HR_INFOTYPE_OPERATION' is returning the return value 0.But when i check in PA30 for the infotype 416,there is no record created for that personnel no.Also in the table PA0416 the record is not get created.SO what might be the problem.can anyone please provide me help on this.
    I have attached the code of my FM for ur reference.
    FUNCTION Y_ESS_FL_ENCASH.
    DATA: G_COMPENSATION_AMOUNT LIKE PA0416-AMONT,
          G_RETURN TYPE BAPIRETURN1.
    DATA T_PA0416 LIKE P0416 OCCURS 0 WITH HEADER LINE.
    CALL FUNCTION 'HR_READ_INFOTYPE'
        EXPORTING
           TCLAS                 = 'A'
           PERNR                 = '00000014'
           INFTY                 = '0416'
         BEGDA                 = sy-datum
         ENDDA                 =  sy-datum
           BYPASS_BUFFER         = 'X'
         LEGACY_MODE           = ' '
    IMPORTING
         SUBRC                 =
          TABLES
            INFTY_TAB             = T_PA0416
    EXCEPTIONS
      INFTY_NOT_FOUND       = 1
      OTHERS                = 2
        LOOP AT T_PA0416
        WHERE SUBTY = '1002'.
        ENDLOOP.
        IF SY-SUBRC <> 0.
          CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
            EXPORTING
               NUMBER = '00000014'
            IMPORTING
               RETURN = G_RETURN.
          IF SY-SUBRC <> 0.
             MESSAGE I016(RP) WITH ' RECORD IS ALREADY LOCKED'.
          ENDIF.
          T_PA0416-PERNR = '00000014'.
          T_PA0416-SUBTY = '1002'.
          T_PA0416-INFTY = '0416'.
          T_PA0416-OBJPS = ''.
          T_PA0416-SPRPS = ''.
          T_PA0416-SEQNR = ''.
          T_PA0416-AEDTM = SY-DATUM.
          T_PA0416-UNAME = SY-UNAME.
          T_PA0416-ENDDA = SY-DATUM.
          T_PA0416-BEGDA = SY-DATUM.
          T_PA0416-NUMBR = '10'.
          T_PA0416-WGTYP = '1530'.
          T_PA0416-AMONT = '15000'.
          T_PA0416-WAERS = 'INR'.
          T_PA0416-QUONR = '1'.
          APPEND T_PA0416.
          CALL FUNCTION 'HR_INFOTYPE_OPERATION'
            EXPORTING
              INFTY                  = '0416'
              NUMBER                 = '00000014'
              SUBTYPE                = '1002'
      OBJECTID               =
      LOCKINDICATOR          =
             VALIDITYEND            = '31129999'
             VALIDITYBEGIN          = SY-DATUM
            RECORDNUMBER           = ''
              RECORD                 = T_PA0416
              OPERATION              = 'INS'
              TCLAS                  = 'A'
      DIALOG_MODE            = '0'
            NOCOMMIT               = 'X'
      VIEW_IDENTIFIER        =
      SECONDARY_RECORD       =
            IMPORTING
              RETURN                 = G_RETURN.
      KEY                    =
          IF G_RETURN+0(1) EQ 'E'.
                  MESSAGE I086(ZHR) WITH 'Record is not inserted in IT416'.
          ELSE.
              COMMIT WORK.
          ENDIF.
          CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
            EXPORTING
              NUMBER = '00000014'
            IMPORTING
              RETURN = G_RETURN.
        ENDIF.
    ENDFUNCTION.

    Hi Murthy
    With a first glance, I think you have given a wrong parameter value to "validityend". It should be '99991231' not '31129999' .
    If your problem still persists, try inserting the data online from PA30. If your input causes no errors, then please state what the return parameter contains.
    Regards
    *--Serdar <a href="https://www.sdn.sap.com:443http://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.sdn.businesscard.sdnbusinesscard?u=qbk%2bsag%2bjiw%3d">[ BC ]</a>

  • Fetching last but one record from Infotype

    Hello Everyone,
    Can you kindly let me know how to fetch the last but one records of IT0171 and IT0000, then compare the endda of both of the records.
    Thank you for your help.
    Regards,
    Vinod

    Hi,
    First sort your internal table by ENDDA descending.
    Then read index 2. This will give you the last but one record.
    INFOTYPES: 0171.
    CALL FUNCTION 'HR_READ_INFOTYPE'
      EXPORTING
        pernr           = '506'
        infty           = '0171'
        begda           = '18000101'
        endda           = '99991231'
      TABLES
        infty_tab       = p0171
      EXCEPTIONS
        infty_not_found = 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.
    ELSE.
      SORT p0171 BY ENDDA descending.
      READ TABLE p0171 INDEX 2.  ---> reads the previous record of the last entry.
      write:/ 'test'.
    ENDIF.
    Regards,
    Soumya.

  • How to add record in infotype 82 and correspondingly to infotype 2001?

    Hi All,
    I need to create leaves. I can do it by using "HR_INFOTYPE_OPERATION" and create records in infotype 2001.
    But I also need to create corresponding records in infotype 0082.
    I have the leave types as stored in infotype 2001, like PCPI, PVCL etc.
    But I found that the SUBTY value stored in infty 2001 is different from that stored in infty 0082.
    How can I find the relation between these two SUBTY so that I can create the records in both infotypes.
    Please reply back if someone knows how to create the leaves in these 2 infotypes.

    Hi Ganesh,
    I could get the relation between the SUBTY in infty 2001 and infty 0082 from the table T554S.
    But I could not add the records to the two infotypes simultaneously. I am adding them one after another.

  • Creating new record in infotype during BADI

    Hi all,
    We want to use the BADI HRPAD00INFTY "Update / Infotype maintenance" for trigering an automatic creation of some infotype records using FM HR_INFOTYPE_OPERATION.
    The creation should only happen when a new record of infotype 2001 subtype GT01 is created.
    Every time when we try something we get an error on the first insert we do using the FM.
    The Enqueue goes fine (returns subrc = 0) but when doing the insert with the FM we get the error "EPG                  428A complex application error has occurred" in the return.
    We checked the data that we're passing thru the FM and there everything is fine.
    Is it possible that due to the lock of the original save is generating we can't insert anything else and how can we work around this problem?
    We also have this problem when using the user exit and we tried to do a submit to another report but there we can't even make the lock.
    Regards,
    Olivier

    Forum post in ABAP, General: Infotype reecord creation in a BAdI - Issue
    Infotype 0008 reecord creation in a BAdI - Issue
    Reward Points if useful.

  • Insert record in infotype 0581 using function module

    Hello experts,
    I am using function module HR_INFOTYPE_OPERATION to insert a record in infotype 0581, but its giving exception CX_HRPA_INVALID_INFOTYPE. This infotype is time constraint 1.So how can i handle this.
    Reply will be really helpful <removed by moderator>.
    Edited by: S Harshit on Feb 17, 2012 6:49 AM
    Edited by: Thomas Zloch on Feb 17, 2012

    Hi Mallikarjuna,
    I am trying to pass the rent amount, but unable to, here is the code.
    TYPES: BEGIN OF IT_P0581.
    INCLUDE STRUCTURE P0581.
    TYPES END OF IT_P0581.
    DATA: INFTYKEY LIKE BAPIPAKEY,
    RETURN LIKE BAPIRETURN1.
    DATA: P0581_TAB TYPE TABLE OF IT_P0581 WITH HEADER LINE.
    P0581_TAB-PERNR = 01400038.
    P0581_TAB-INFTY = '0581'.
    P0581_TAB-BEGDA = '20111010'.
    P0581_TAB-ENDDA = '99991231'.
    P0581_TAB-RTAMT = 3000 .
    append P0581_TAB.
    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
    EXPORTING
    INFTY = P0581_TAB-INFTY
    NUMBER = P0581_TAB-PERNR
    SUBTYPE = ''
    VALIDITYEND = P0581_TAB-ENDDA
    VALIDITYBEGIN = P0581_TAB-BEGDA
    RECORD = P0581_TAB
    OPERATION = 'INS'
    NOCOMMIT = ''
    RECORDNUMBER = '000'
    DIALOG_MODE = '2'
    IMPORTING
    RETURN = RETURN
    KEY = INFTYKEY
    EXCEPTIONS
    OTHERS = 0.

  • Garage Band Crashed - any way to get recording back?

    Hello. I just recorded a 50 min podcast and upon stopping recording, I got a Garage Band error box that said something to the effect of "2gb file size reached. File will be saved to this point." Then I clicked OK, but the program crashed.
    1. Is there any way to retrieve recorded audio files in ANY way? I also edit with Final Cut and I know that even if that crashes, the video is still in capture scratch/render folders, even if the project isn't saved, so I'm hoping there's something I can retrieve for this recording.
    2. Is there a way I can auto-save while recording? I've recorded 50+ 50-60 min podcasts now (only saving 10 episodes in a single project file) and never had this problem, so now I don't trust my Mac for future recordings after losing this.
    Other project files I have saved are 4-5gb each, so I don't even understand this "2 gb" limit. FYI: I have 83 GB available on my Mac, so it's not a file-size issue.
    Very frustrated and disappointed in my Mac. Any help is appreciated. Thanks much...

    Found a Solution...
    http://www.theothertomelliott.com/node/78
    In short, right click your crashed project file, then select "Open Package Contents." Recorded audio is in .AIF files.
    YAY! Thanks.

  • How to upload records into Infotype 382(Awards)

    Hi,
      Could anyone suggest me how to upload records into infotype 382(Awards) of an Employee.
    For solutions points rewarded.
    Regards,
    Radhu

    Hi
    you can develop a <b>BDC</b> for transaction <b>PA30</b>
    using infotype 382.
    (or)
    can upload using batch input recording in <b>LSMW</b>.
    regards,
    Thangesh

  • Unable to Determine the Change Date and Time for records in infotype 2011

    Hi Everyone,
    We need to know on when the clock-in and clock-out records were interfaced to SAP in infotype 2011.
    The change date/time field in infotype 2011 is blank/not populated. Hence, we're unable to determine on when the clock-in records were updated in infotype 2011.
    It is not possible to get the audit logs for infotype 2011 as it is switched off.
    We found this table TEVEN and just the same thing, the field "change on" is blank.
    Kindly help us on how we can determine the change date and time for records in infotype 2011.

    Hi Prasad,
    Here's the scenario.
    On June 3, it was reported that staff's clock-in record on june 1, 7:00AM is missing in infotype 2011.
    However, when I checked infotype 2011, the record is there.
    So, they are now asking me on when this record was updated in infotype 2011 as they are thinking that there might be some delays in sending of the data to SAP.
    The created on and created at in table TEVEN shows the same, june 1, 7:00AM which seems to be not true as on june 3, it was reported to be missing.
    Can you help further on this?

  • Infotype records of infotype 0027 can not be edited.

    Dear experts,
    I have the following problem:
    I can not edit infotype records of infotype 0027. If I delete a row, the message "no change found" is displayed. I press the "save" button but when I display the record again, the row has not been deleted.
    Thank you in advance,
    Vana Sounta

    Hi Vana,
    I assume you are using wrong dynpro (2100) instead of 2500 for MP002700. So please check first in T582A for IT0027, if
    you have maintained 2500 as single screen then make sure that in table T588M you are using module pool MP002700 with screen 2500.  Hope it helps,
    Kind Regards
    Christine

Maybe you are looking for

  • Error : Document contains same order item more than once in IDOC

    We have Intercompany IDOCs getting created in our system. The trigger for this is the Billing Document in the same system in differenct company code. The MEssage type being used is INVOIC and the basic type is INVOIC01. The IDOC is in the status of 5

  • Creating a login page in php for login to certain pages in the website

    I need to create a login page where I would assign user a password and when they input the password it would take them to pages only accesabile by that password. Can someone lead me to some good articles on how to do this? Everyting I have found so f

  • Imac tries boot and turns off

    When I turn on my iMac, a white screen with an Apple logo appears with a rotating circle right below the logo.  After a while, it fails to boot and turns off.  I tried turning the computer on while pressing Command R or Shift Command R P but nothing

  • PE 9 Fails to Install Shared Technologies - Adobe Support Stumped!

    I'm having the same problem as reported in the now closed thread http://forums.adobe.com/thread/725863?tstart=0. During installation, Photoshop Elements 9 installs Elements, then installs Organizer.  When it gets to the point to install Shared Techno

  • Motorola Q vs. BB Curve 8830

    Good Day to All: I am new to the BB world, but not to data phones. I was using until Friday a Motorola Black "Q" and I am still adjusting to differences. I read a Blackberry 101 on BIS and BES and know that I need BIS due to my size. My question/prob