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.

Similar Messages

  • Infotype 0002 for Taiwan

    Hi Expert,
    I am trying to create a new record in infotype 0002 with marital status since equal to future day.
    Then I got the below error:
    "date is less than birth date or great than system current date"
    Could you please let me know how to deactivate this checking?
    Million thanks,
    WF

    Hi William,
    This message is not tied to a configuration step.
    The message is popped up as follows:
    SE51 - Screen maintenance.
    Module pool: MP000200
    Screen : 2042
    Flow logic: FIELD P0002-FAMDT MODULE CACL_FAMTW_FROM_FAMDT ON REQUEST.
    Double click MODULE CACL_FAMTW_FROM_FAMDT - Double click perform MODULE CACL_FAMTW_FROM_FAMDT .
    There go to the following line:
    IF P0002-FAMDT LT LOW_DATE .....
    MESSAGE E096(30).
    ENDIF.
    Message 096 belonging to message class 30 is that specific message.
    The only thing that comes to my mind is to copy screen 2042 to your own screen and change thins coding accordingly.
    Regards,
    Dilek

  • Infotype 0002 issue

    hi,
    i have added one field in infotype 0002 , by pm01 . it is not getting displayed in pa30 transaction . i have already activate module pool  and layout editor plz tell me what to do .

    Please check the screen number of the module pool. In which screen you have added the new field? Is the same scrren is being used by PA30 screen. I am sure there is some mismatch in screen.
    Regards,
    Sandip

  • Issuing error message when creating a record for infotype

    i have a req in HR
    for the infotype 14 and the subtype 3010, when i'm going to create a record, i need to check some fields in infotype 0002. if check fails, i need to give error message and stop processing...
    how i should do this...
    thanks in advance

    Go to CMOD transaction and create a project with enhancement PBAS0001.Components for PBAS0001 is EXIT_SAPFP50M_001,EXIT_SAPFP50M_002.
    These two exit will contain tw0 includes ZXPADU01,ZXPADU02.ZXPADU01 include will trigger in the PBO of the transaction in create and change mode  and ZXPADU02 will trigger in in create and change mode  .Inside the inculde you can add the following code for different infotype
      CASE innnn-infty.
    0 0 1 4 *************************
        WHEN '0014'.
          PERFORM validate_0014_pai USING tclas
                                            psave
                                            ipsyst
                                            i001p
                                            i503
                                  CHANGING  innnn
                                           show_data_again.
    0 1 4 7 *************************
        WHEN '0147'.

  • Calling infotype 0002 in ALV  report for showing employee photo

    Hi all,
    The requirment from business side is a report in which employees personal data shuold be shown with employee photo, I had tried for employee photo in ALV report but it didnt sucessed, then I went for other solution like calling transaction in ALV report.
    In this case I am calling Infotype 0002 but the issue is that the transaction PA20 is coming with PERNR but I am not able to go directlly to infotype which shows employee Photo,please suggest any solution.
    Thaks.
    JAY

    Hi Jay,
    It is possible. Please refer the syntax for the CALL TRANSACTION
    CALL TRANSACTION ta { [AND SKIP FIRST SCREEN]
                        | [USING bdc_tab [bdc_options]] }.
    You can do a recording till the required page comes & call the transaction accordingly. Hope, you are aware about the same.
    For example, I just had a solution to go to the roles tab in the user profile and I did as below:
        CLEAR wa_bdcdata.
        wa_bdcdata-program  = 'SAPLSUU5'.
        wa_bdcdata-dynpro   = '0050'.
        wa_bdcdata-dynbegin = k_ok.
        APPEND wa_bdcdata TO it_bdcdata.
        CLEAR wa_bdcdata.
        wa_bdcdata-fnam  = 'BDC_CURSOR'.
        wa_bdcdata-fval   = 'USR02-BNAME'.
        APPEND wa_bdcdata TO it_bdcdata.
        CLEAR wa_bdcdata.
        wa_bdcdata-fnam  = 'USR02-BNAME'.
        wa_bdcdata-fval   = g_value.
        APPEND wa_bdcdata TO it_bdcdata.
        CLEAR wa_bdcdata.
        wa_bdcdata-fnam  = 'BDC_OKCODE'.
        wa_bdcdata-fval   = 'SHOW'.
        APPEND wa_bdcdata TO it_bdcdata.
        CLEAR wa_bdcdata.
        wa_bdcdata-program  = 'SAPLSUU5'.
        wa_bdcdata-dynpro   = '0100'.
        wa_bdcdata-dynbegin = k_ok.
        APPEND wa_bdcdata TO it_bdcdata.
        CLEAR wa_bdcdata.
        wa_bdcdata-fnam  = 'BDC_OKCODE'.
        wa_bdcdata-fval   = '=ACTG'.
        APPEND wa_bdcdata TO it_bdcdata.
        g_opt-dismode = 'E'.
        g_opt-defsize = k_ok.
    *** if user click on the User Name, call SU01
        CALL TRANSACTION 'SU01' USING it_bdcdata
                    OPTIONS FROM g_opt.
    Regards,
    Selva K.

  • 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.

  • Sending the enhanced Infotype 0002 outside SAP via an IDOC

    Hello Friends,
    We have added couple of Z fields to the standard 0002 Iinfotype table PA0002.
    I can see the custom fields in the trans : PA30 screen for infotype 002.
    Now, we want to send these custom fields value outside SAP via an IDOC.
    Here are the steps I followed :
    I created a Z Segment in an extended idoc with the structure PA0002.
    I went in transaction PM01 for Infotype 0002 and added the above created Z segment as a 2nd IDOC segment.
    In transaction PA30 for 002, I made changes to the custom field value for a person 12039.
    Created an idoc via BD21.
    IDOC generated with the Z Segment but it doesn't contain any  Z  custom fields.
    Which step am I missing here? Do I have to have a user-exit or BADI to achieve this OR can it be done without writing any code?
    Basically I
    I will really appreciate your help.
    Regards,
    Pooja Pandey

    Pooja,
    you need to fill each field manually.
    check this code i am filling ZHCMS_PI_SEMENT
    data: sgmnt_e1pityp type e1pityp.
      field-symbols: <wplog> type any.
      field-symbols: <wplog1> type any.
      data: ixxxx type e1pityp, iyyyy type e1plogi,sgmnt_hcms_pi type zhcms_pi_segment,wa_idoc_data_x type edidd, ls_idoc_data type edidd.
      data: lv_p0001 type standard table of p0001 ,lv_p0002 type standard table of p0002 ,lv_p0007 type standard table of p0007 .
      data: lv_p0521 type standard table of p0521 ,lv_p0710 type  standard table of p0710 ,lv_p2001 type  standard table of p2001 .
      data: ls_p0001 type  p0001,ls_p0002 type p0002,ls_p0007 type p0007 ,ls_p0521 type  p0521 ,ls_p0710 type  p0710 ,ls_p2001 type p2001 .
      data: row_index type sy-tabix,del_index type sy-tabix.
      data: lcx_root type ref to cx_root.
    fILL THE E1PITYP
    try.
    Keep the segments which have changed date greater than last run date in update mode
        read table idoc_data into wa_idoc_data_x with  key segnam = 'E1PITYP'.
        assign wa_idoc_data_x-sdata to <wplog> casting type e1pityp.
        ixxxx = <wplog>.
        loop at idoc_data into wa_idoc_data_x where segnam = 'E1PLOGI'.
          row_index = sy-tabix + 1.
          assign wa_idoc_data_x-sdata to <wplog1> casting type e1plogi.
          iyyyy = <wplog1>.
          sgmnt_e1pityp-plvar = ixxxx-plvar.
          sgmnt_e1pityp-otype = ixxxx-otype.
          sgmnt_e1pityp-objid = iyyyy-objid.
          sgmnt_e1pityp-infty = '0001'.
          sgmnt_e1pityp-begda = ixxxx-begda.
          sgmnt_e1pityp-endda = ixxxx-endda.
          clear ls_idoc_data.
          ls_idoc_data-segnam = 'E1PITYP'.
          ls_idoc_data-sdata = sgmnt_e1pityp.
          insert ls_idoc_data into idoc_data index row_index.
    APPEND t_idoc_data .
    Get the ZZSWISSREID
          sort lv_p0001 by begda descending.
          read table lv_p0001 into ls_p0001 index 1.
          sgmnt_hcms_pi-zzswissreid = ls_p0001-zzswissreid.
    Get the custom data from IT0002
          sort lv_p0002 by begda descending.
          read table lv_p0002 into ls_p0002 index 1.
          sgmnt_hcms_pi-zzglobalid = ls_p0002-zzglobalid.
          sgmnt_hcms_pi-zzsource_id = ls_p0002-zzsource_id.
          sgmnt_hcms_pi-zzlegacy_emp_id = ls_p0002-zzlegacy_emp_id.
          ls_idoc_data-segnam = 'ZHCMS_PI_SEGMENT' .
          ls_idoc_data-sdata = sgmnt_hcms_pi.
          row_index = row_index + 1.
          insert ls_idoc_data into idoc_data[] index row_index.
          clear : lv_p2001[] , lv_p0001[] , lv_p0002[] , lv_p0710[] ,lv_p0007[], lv_p0521[], ls_p2001 , ls_p0001 , ls_p0002 , ls_p0710 ,ls_p0007, ls_p0521 .
    APPEND t_idoc_data.
        endloop.
    Thanks
    Bala Duvvuri

  • Iam getting any error in infotype 0002 while doing enhancement ...

    Dear all
                could any one let me know why iam getting this error ,
       " TABL HRTIM00WS_PWS_INFTIES was adjusted
      Check table HRTIM00WS_PWS_INFTIES (SFCD07/13.06.07/11:34)
      Enhancement category for table missing
      Enhancement category for include or subtype missing
      Field name TIME is reserved (Do not use structure as include in DB table)
      Table HRTIM00WS_PWS_INFTIES was checked with warningsif iam doing
    enhancement for infotype 0002 ....
    i have just added an one custom field ...(zzname , data element is zzname type char 20)as per the business requirement.
    regards
    vamsi

    Iam getting any error in infotype 0002 while doing enhancement .
    " TABL HRTIM00WS_PWS_INFTIES was adjusted
    Check table HRTIM00WS_PWS_INFTIES (SFCD07/13.06.07/11:34)
    Enhancement category for table missing
    Enhancement category for include or subtype missing
    Field name TIME is reserved (Do not use structure as include in DB table)
    Table HRTIM00WS_PWS_INFTIES was checked with warningsif iam doing
    enhancement for infotype 0002 ....
    when iam activating .................the structure i got the above error...........please urgent i have just added only one field

  • Start date personnel number infotype 0002 (Personal data)

    Hi gurus,
    I have the following problem in SAP ECC6.
    I created a personnel number with transaction PA40 with start date 200208.
    In infotype 0002 (Personal data), after that I have filled various field, if I save, the start date changes from 200208 to 01011900.
    Could you help me please?
    Thanks in advance
    Regards
    Raffaele

    Hi
    Adding to what Mr. Sai Naraynan has said.
    See whatever happening at your end is absolutley correct you have to understand the logic behind that.
    See Personal data infotype will contain the master data of an employee like name, ***, complete name, form of address etc... whuich is same from his birth so there is no need to have a validity starting from the date of hiring because this data is same from his birth thats why system automatically stamps a Birth date out there.
    Hope it clarifies your doubt.
    Regards,
    Bhupesh Wankar

  • Add button in transaction transaction PA20 for Infotype 0002

    Hi All,
    Hope all are doing good progress in their works... I had one question.
    Has anyone added a button in the transaction PA20 for the Infotype 0002. I need to add a button in this screen so that the User can navigate from this screen in PA20 to the transaction CV04n.
    Helpful answers will definetly be rewarded..
    Thanks,
    Susanth Kumar.

    Hi,
    Package name PBAS.
    Check in SMOD with F4 help and give pakage name.
    We can find the exits. But for your requirement we need to have a screen exit or menu exit.
    FM exit-
    HRPBAS01-User Exit for HR Master Data-EXIT_SAPLRPIN_001.
    User exit-
    PBAS0002-PA: Enhancements for Personnel Administration - Menu-EXIT_SAPMP50A_001.
    Reward if helpful.
    Best Wishes,
    Chandralekha

  • Purchasing Cube -- 0PUR_C01.. "Added record" is showing zero in request

    When i try to load the data to this cube, my trasfer record is showing values while Added Record is showing zero values. Whats the problem. Please advise !!

    Hi,
    Check whether do you have defined the industry sector in R/3. This has to be done before filling the setup table. search the forums with note no 353042.
    This is done with the help of Transaction MCB_ which you can find in the OLTP IMG for BW (Transaction SBIW) in your attached R/3 source system.
    Here you can choose your industry sector. 'Standard' and 'Consumer products' are for R/3 standard customers, whereas 'Retail' is intended for customers with R/3 Retail only.
    You can display the characteristics of the process key (R/3 field BWVORG, BW field 0PROCESSKEY) by using Transaction MCB0.
    If you have already set up historical data (for example for testing purposes) by using the setup transactions (Statistical Setup Programs) (for example: Purchasing: Tx OLI3BW, material movements: OLI1BW) into the provided setup tables (for example: MC02M_0SCLSETUP, MC03BF0SETUP), you unfortunately have to delete this data (Tx LBWG). After you have chosen the industry sector by using  MCB_, perform the setup again, so that the system fills a valid transaction key for each data record generated. Then load this data into your connected BW by using 'Full update' or 'Initialization of the delta process'. Check, whether the system updates data into the involved InfoCubes now.
    If all this is not successful, please see Note 315880, and set the application indicator 'BW' to active using Transaction 'BF11'.
    Regards,
    Anil Kumar Sharma .P

  • Error while adding record

    I am getting the following error while adding record into the table CM_RECIPE_ITEM :
    Error
    ORA-20505: Error in DML: p_rowid=626, p_alt_rowid=CRI_ID, p_rowid2=, p_alt_rowid2=. ORA-01410: invalid ROWID ORA-06512: at "COSTMAN.CM_RECIPE_ITEM_T3_AFTER", line 11 ORA-04088: error during execution of trigger 'COSTMAN.CM_RECIPE_ITEM_T3_AFTER'
    Error Unable to process row of table CM_RECIPE_ITEM.
    Kindly suggest if the problem is because of the Global temporary table or the triggers given below. Also suggest the solution.
    Thanking You,
    Yogesh
    CM_RECIPE_ITEM Table
    CRI_ID------CRI_CR_ID--------CRI_BOM_CODE--------CRI_CIFG_CODE---------CRI_CIRM_CODE--------CRI_SEQ--------CRI_QTY--------CRI_RM_COST
    625----------464-----------------PRODUCT3001----------FG003----------------------10---------------------------1-------------------60-----------------10
    626----------464-----------------PRODUCT3001----------FG003----------------------12---------------------------2-------------------40------------------10
    Global temporary table
    DROP TABLE COSTMAN.INTERIM CASCADE CONSTRAINTS;
    CREATE GLOBAL TEMPORARY TABLE COSTMAN.INTERIM
    ROW_ID ROWID
    ON COMMIT PRESERVE ROWS
    NOCACHE;
    CREATE OR REPLACE TRIGGER COSTMAN."CM_RECIPE_ITEM_T3"
    BEFORE INSERT OR UPDATE ON "CM_RECIPE_ITEM" FOR EACH ROW
    BEGIN
    INSERT INTO interim VALUES (:new.rowid);
    END;
    Trigger to update data on CM_RECIPE table
    CREATE OR REPLACE TRIGGER COSTMAN."CM_RECIPE_ITEM_T3_AFTER"
    AFTER INSERT OR UPDATE ON "CM_RECIPE_ITEM"
    BEGIN
    FOR ds IN (SELECT row_id FROM interim) LOOP
    UPDATE CM_RECIPE
    SET CR_RMC = (
    SELECT SUM(CRI_QTY * CRI_RM_COST)/SUM(CR_QUANTITY)
    FROM CM_RECIPE_ITEM
    WHERE CRI_BOM_CODE = CR_BOM_CODE
    AND rowid = ds.row_id
    UPDATE CM_RECIPE
    SET CR_TOTAL_COST = (
    SELECT CIFG_PACKING + CIFG_OVERHEAD +CIFG_OTHERS
    FROM CM_ITEM_FG
    WHERE CIFG_CODE = CR_CIFG_CODE
    AND rowid = ds.row_id
    ) + CR_RMC;
    UPDATE CM_RECIPE
    SET CR_GROSS_MARGIN =
    (SELECT CIFG_DP_RATE
    FROM CM_ITEM_FG
    WHERE CIFG_CODE = CR_CIFG_CODE
    AND rowid = ds.row_id) - CR_TOTAL_COST) / CR_TOTAL_COST;
    END LOOP;
    END;
    /

    yogeshyl wrote:
    Error
    ORA-20505: Error in DML: p_rowid=626, p_alt_rowid=CRI_ID, p_rowid2=, p_alt_rowid2=. ORA-01410: invalid ROWID ORA-06512: at "COSTMAN.CM_RECIPE_ITEM_T3_AFTER", line 11 ORA-04088: error during execution of trigger 'COSTMAN.CM_RECIPE_ITEM_T3_AFTER'
    Error Unable to process row of table CM_RECIPE_ITEM.
    Kindly suggest if the problem is because of the Global temporary table or the triggers given below. Also suggest the solution.The error message points to the trigger...

  • 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>

  • What's the difference between Transferred Records and Added Records?

    When right click an ODS or a cube to select Manage, then under the 3rd tab called Requests, there are two columns called Transferred Records and Added Records, what's the difference between these two?
    Thanks

    Hello KeLviN,
    How r u ?
    Consider a realtime example.
    Assume a transfer of Transactional Data from R/3(with PSA) which is having Unit values in it.
    Now, I found in RSA3 2844168 of records. In BW I saw one Data Packet with 306 error records(because of a UNIT value is not available in BW T006 table, Eg. YDD) which are automatically collected in PSA. Now in the Monitor screen you could see 2 Monitor status with GREEN Signals for 2 set of data.
    1. with 2843862 records
    2. with 306 records
    Now, if u manage the Data Target you will get 2844168 in the Transferred Records & 2843862 in the Added Records. and the 306 error records are in the PSA.
    Hope this is clear.
    Best Regards....
    Sankar Kumar
    +91 98403 47141

Maybe you are looking for