HR ABAP : Custom Infotype updations through FM HR_INFOTYPE_OPERATION

Hi All,
          Actually, I want to update the custom infotype 3 fields as per my user inputs. I am fetching the data from the PA table acoording to sy-datum falling in the begda, enda limitations. now I am changing the field with new values in the work area. And pass with the following data to the FM.
          But I am getting the error 'No data stored for 9008 in the selected period', eventhough it is already having a data in the database table. I had seen prvious therads, but could not get how they solved the issue.
Please provide the inpus for the following code.
          ( I had also passed the validity start and end from the database entry. at this moment it gets dumped at the statement
  assign record to <record> casting type (tabname). "XDP UniCode
where tabname is proposed from t777d-ppnnn. which is a structure and having a value as P9008. If i change the value at debug point to PA9008. it works fine. is there anything extra i need to do to solve this issue? )
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
EXPORTING
infty = '9008'
number = pernr
"SUBTYPE =
"OBJECTID =
"LOCKINDICATOR =
"VALIDITYEND =
"VALIDITYBEGIN =
"RECORDNUMBER =
record = wa_pa9008
operation = 'MOD'
"TCLAS = 'A'
"DIALOG_MODE = '0'
"NOCOMMIT =
"VIEW_IDENTIFIER =
"SECONDARY_RECORD =
IMPORTING
return = l_bapireturn
key = bapipakey_tab
Regards,
Brijesh Patel

Hi,
Check this code once
Read Infotype9004 Record for the personnel No
    CALL FUNCTION 'HR_READ_INFOTYPE'
      EXPORTING
        tclas           = A
        pernr           = pernr
        infty           = 9004
      IMPORTING
        subrc           = v_subrc
      TABLES
        infty_tab       = it_pa9004
      EXCEPTIONS
        infty_not_found = 1
        OTHERS          = 2.
Read it_pa9004 into wa_pa9004 with some condition.
if sy-subrc eq 0.
Lock the employee for processing infotype 9004
    CALL FUNCTION 'HR_EMPLOYEE_ENQUEUE'
      EXPORTING
        number = wa_pa9004-pernr.
  v_begda = wa_9004-begda.
      v_endda = wa_9004-endda.
CALL FUNCTION 'HR_INFOTYPE_OPERATION'
        EXPORTING
          infty         = c_9004
          number        = wa_9004-pernr
          subtype       = c_0001
          validityend   = v_endda
          validitybegin = v_begda
          record        = wa_9004
          operation     = c_mod
          tclas         = c_a
         dialog_mode   = c_0
          dialog_mode   = '2'
        IMPORTING
          return        = wa_return.
CALL FUNCTION 'HR_EMPLOYEE_DEQUEUE'
      EXPORTING
        number = wa_pa9004-pernr.
endif.
reward the points if it is helpful.
Regards,
Srilatha

Similar Messages

  • HR ABAP : Custom Infotype updations

    Hi All,
    I am new to HR ABAP. Actually, I want to update the custom infotype 3 fields as per my user inputs. I am fetching the data from the PA table acoording to sy-datum falling in the begda, enda limitations. now I am changing the field with new values in the work area. And pass with the following data to the FM.
    But I am getting the error 'No data stored for 9008 in the selected period'. I had seen prvious therads, but could not get how they solved the issue.
    Please provide the inpus for the following code. I had also passed the validity start and end.
    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
    EXPORTING
    infty = '9008'
    number = pernr
    SUBTYPE =
    OBJECTID =
    LOCKINDICATOR =
    VALIDITYEND =
    VALIDITYBEGIN =
    RECORDNUMBER =
    record = wa_pa9008
    operation = 'MOD'
    TCLAS = 'A'
    DIALOG_MODE = '0'
    NOCOMMIT =
    VIEW_IDENTIFIER =
    SECONDARY_RECORD =
    IMPORTING
    return = l_bapireturn
    key = bapipakey_tab
    Regards,
    Brijesh Patel

    Hi Remi,
            I have done the same thing. Please see the code. data is also available in the database. But the output is the error message. Please give some inputs on this.
    ***Updation of the PA9003 Infoty pe with the LTA amount and Medical Amount
        SELECT SINGLE endda
                      begda
                      FROM pa0001
                      INTO (endda, begda)
                      WHERE pernr EQ pernr
                        AND endda GE sy-datum
                        AND begda LE sy-datum.
        SELECT SINGLE *
                      FROM pa9003
                      INTO lwa_pa9003
                      WHERE pernr EQ pernr
                        AND endda >= sy-datum
                        AND begda <= sy-datum.
        wa_pa9003 = lwa_pa9003.
        wa_pa9003-zzallw = zzallw.
        wa_pa9003-zzlta = zzlta.
        wa_pa9003-zzmed = zzmed.
        ADD 1 TO wa_pa9003-seqnr.
    ***Locking the object
        CALL FUNCTION 'ENQUEUE_EPPRELE'
          EXPORTING
            pernr          = pernr
          EXCEPTIONS
            foreign_lock   = 1
            system_failure = 2
            OTHERS         = 3.
        CALL FUNCTION 'HR_INFOTYPE_OPERATION'
          EXPORTING
            infty                  = '9003'
            number                 = pernr
       subtype                = wa_pa9003-subty
       objectid               = wa_pa9003-objps
       lockindicator          = wa_pa9003-sprps
       validityend            = wa_pa9003-endda
       validitybegin          = wa_pa9003-begda
       recordnumber           = wa_pa9003-seqnr
            record                 = wa_pa9003
            operation              = 'MOD'
      TCLAS                  = 'A'
      DIALOG_MODE            = '0'
      nocommit               = space
      VIEW_IDENTIFIER        =
      SECONDARY_RECORD       =
         IMPORTING
           return                 = l_bapireturn
           key                    = bapipakey_tab
    ***Unlocking the object
        CALL FUNCTION 'DEQUEUE_EPPRELE'
          EXPORTING
            pernr = pernr.
    Regards,
    Brijesh Patel

  • Hr abap custom infotype  updatation

    hiii frnds,
        i creatred custom inotype 9910 and i enterded some data for  this infotype in pa30 when i click on the save it is noty saving in the pa9910 table...... can any one send sample code to save the data into table

    Did you read [Developing an Infotype in Personnel Administration|http://help.sap.com/printdocu/core/print46c/en/data/pdf/PAXX/PYINT_INFOTYP.pdf] (or more recent documentation) and a guide like [Steps to Customize infotypes|http://wiki.sdn.sap.com/wiki/display/ABAP/StepstoCustomize+infotypes]
    Regards,
    Raymond

  • Custom infotype updation

    Hi Expects,
    I am working on custom infotype creation. In my requirement I have used table control concept where user enters multiple records and updates the custom infotype.
    For a single PERNR,SUBTYPE, BEGDA and ENDDA I want to update multiple records into the infotype using table control concept.
    Ex: PERNR : 25
          SUBTY: 2001
          BEGDA: 01/01/2001
          ENDDA: 12/31/2001
    Here by using the function modules 'HR_INFOTYPE_OPERATION' or 'HR_MAINTAIN_MASTERDATA' I am trying to update the custom infotype where sequence number need to be increamented automatically for duplicate entries but only one record is getting updated instead of multiple records.
    I have maintained the time constraint as '3'.
    Please let me know the procedure to update multiple records at a time into custom infotype.
    Regards,
    Mahesh.

    Hi,
    In the custom infotype table, if their are  duplicate then the sequence number field value will be created automatically for time constainst '3' but using the function module it is not creating the sequence number but using the modify statement it is working fine.
    Ex: Modify PA9002 from table GT_PA9002.
    Please let me know the solution for updating multiple records into a custom infotype.
    Regards,
    Mahesh.

  • WD ABAP - HR infotype update

    Hi,
    I need to develop some custom applications using WDA in ESS for displaying and updating the employee;s infotype records (IT0581, IT0591) and I am new to WD ABAP.
    I have completed the beginners tutorials available in sdn and planning to use service call functionality available with WD ABAP in order to display and uppdate infotype records. For this, we are developing some custom RFC;s display data of IT0581, IT0591. Can anybody guide me how to do this ?
    Is there any documentation available for same ? What are the best practises or approaches to keep in mind while developing the content for ESS using WDA?
    Regards,
    Anil Kumar

    Hi Buddy
       You are wrongly passing the parameters. Pass the parameters like this
    data : ls_pa0006 TYPE pa0006.
    data : ls_p0006 TYPE p0006.
    DATA : IT_PA0006 TYPE PA0006 OCCURS 0 WITH HEADER LIN
    DATA :  RETURN LIKE BAPIRETURN1.
    DATA : ERROR_TAB LIKE RETURN OCCURS 0 .
    SELECT * FROM PA0006 INTO CORRESPONDING FIELDS OF TABLE IT_PA0006
      WHERE ENDDA = '99991231' AND PERNR = PERNR .
    SORT IT_PA0006 BY SUBTY.
    LOOP AT IT_PA0006.
    IF IT_PA0006-SUBTY = '1' .
    move-corresponding it_pa0006 to ls_pa0006.
    ls_pa0006-name2 = co.
    ls_pa0006-stras = STREET1.
    ls_pa0006-LOCAT = STREET2.
    ls_pa0006-PSTLZ = POSTALCODE.
    ls_pa0006-ORT01 = CITY.
    ls_pa0006-ORT02 = REGION.
    ls_pa0006-TELNR = TELEPHONENUMBER.
    move-corresponding ls_pa0006 to ls_p0006.
    ls_P0006-INFTY = '0006'.
    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
      EXPORTING
        INFTY                       = '0006'
        NUMBER                   =  PERNR
        SUBTYPE                  =  '1'
        VALIDITYEND           = IT_PA0006-ENDDA
        VALIDITYBEGIN        = IT_PA0006-BEGDA
        RECORD                   = ls_p0006
        OPERATION              = 'MOD'
       TCLAS                      = 'A'
    IMPORTING
       RETURN                   = RETURN.
    I think OPERATION = DIS  will not be the correct here. Change operation to insert that is correct. Cehck this code it will work.
    Regards
    vijay

  • Issue with Custom Field updation through BAPI FM

    Hi All,
    I am going to update some custom filelds in BUt050. So for these custom fields, I want to fill buffer memory so that I can track the changes through buffer. So I was calling FM BAPI_BUPR_CONTP_CHANGE and passing following parameters.
              businesspartner = < bp number>
              contactperson   = < Contact Number>
              validfromdate   = '00010101'
              validuntildate  = '99991231'
              centraldata     =  blank
              centraldata_x   = blank
    I am keeping central data blank as there is no standard field to update.
    But it is returning me a message that no changes are made.
    can any one has any idea how can I send custom field change in buffer?

    As my goal is to update custom fields in BUt050 from WEB UI, I was planning to fill the memory buffer with the changed values by calling FM  ''BUB_BUPR_MEMORY_FILL'.
    So I have to get memory first. But if I dont call the FM 'BAPI_BUPR_CONTP_CHANGE', then the memory will not be filled.
    That is the reason to call the function module.

  • Updating custom infotype with FM 'HR_INFOTYPE_OPERATION' dumps

    Hi All,
    While updating a custom infotype 9008 with FM 'HR_INFOTYPE_OPERATION', its giving adump.
    Except.  CX_HRPA_INVALID_PARAMETER.
    I am using DIALOG_MODE as '1'. when I enter a valid field value to that particular field ( mandatory field) on that infotype, it gives dump.
    Can you suggest something which will solve this?
    Thanks.
    Dipti.

    Hi,
    Here is the dump.
    Runtime Errors         UNCAUGHT_EXCEPTION
    Except.                CX_HRPA_INVALID_PARAMETER
    Date and Time          12.11.2008 07:23:32
    Short text
    An exception occurred that was not caught.
    What happened?
    The exception 'CX_HRPA_INVALID_PARAMETER' 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_RESOLVE_EXCEPTION=====CP' has to be
    terminated.
    Error analysis
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CX_HRPA_INVALID_PARAMETER', was not
    caught in
    procedure "RESOLVE_EXCEPTION" "(FORM)", nor was it propagated by a RAISING
    clause.
    Since the caller of the procedure could not have anticipated that the
    exception would occur, the current program is terminated.
    The reason for the exception is:
    Invalid parameter EXCEPTION, value
    The occurrence of the exception is closely related to the occurrence of
    a previous exception "CX_HRPA_VIOLATED_PRECONDITION", which was raised in the
    program "CL_HRPA_MASTERDATA_FACTORY====CP",
    specifically in line 6 of the (include) program
    "CL_HRPA_MASTERDATA_FACTORY====CM004".
    The cause of the exception was:
    Precondition Violated
    Missing RAISING Clause in Interface
    Program                                 SAPFP50P
    Include                                 FP50PE10
    Row                                     2,152
    Module type                             (FORM)
    Module Name                             RESOLVE_EXCEPTION
    Trigger Location of Exception
    Program                                 CL_HRPA_RESOLVE_EXCEPTION=====CP
    Include                                 CL_HRPA_RESOLVE_EXCEPTION=====CM001
    Row                                     80
    Module type                             (METHOD)
    Module Name                             RESOLVE
    Source Code Extract
    Line
    SourceCde
    50
    message_handler = message_handler.
    51
    return.
    52
    53
    catch cx_sy_move_cast_error.
    54
    endtry.
    55
    END-OF-DEFINITION.
    56
    57
    58
    try_to resolve_missing_infty_data    cx_hrpa_missing_infty_data.
    59
    try_to resolve_missing_authorization cx_hrpa_missing_authorization.
    60
    try_to resolve_invalid_feature       cx_hrpa_invalid_feature.
    61
    try_to resolve_unexpected_message    cx_hrpa_unexpected_message.
    62
    try_to resolve_missing_personid      cx_hrpa_missing_personid.
    63
    try_to resolve_invalid_infotype_db   cx_hrpa_invalid_infotype_db.
    64
    try_to resolve_invalid_customization cx_hrpa_invalid_customization.
    65
    try_to resolve_inconsistent_database cx_hrpa_inconsistent_database.
    66
    67
    68
    Just to ensure the macro can be used nowhere else.
    69
    DEFINE try_to.
    70
    END-OF-DEFINITION.
    71
    72
    If we can not remap we would like to just re-raise the
    73
    exception like below like "RAISE EXCEPTION exception.".
    74
    Unfortunately the kernel will then forget about the
    75
    original source position.
    76
    77
    So this is the fallback strategy. Calling this method
    78
    is only allowed if the exception can be resolved. Since
    79
    this is not the case we indicate a parameter violation.
    >>>>>
    RAISE EXCEPTION TYPE cx_hrpa_invalid_parameter
    81
    EXPORTING
    82
    previous  = exception
    83
    parameter = 'EXCEPTION'.
    84
    85
    ENDMETHOD.
    Regards,
    Dipti.

  • Infotype is not updating through  'HR_INFOTYPE_OPERATION'

    Hi Frds,
    I am trying to update the infotype 2006 leave quota for casual leave. After execution of all code the screen automatically closing itself. Its not modifying the record .  I am writing this code in include of exit PBAS0001. Can anybody help regarding this.
    CALL FUNCTION 'HR_READ_INFOTYPE'
                EXPORTING
                TCLAS                 = 'A'
                  PERNR                 =  lw_pa0000-PERNR
                  INFTY                 =  '2006'
                BEGDA                 = '18000101'
                ENDDA                 = '99991231'
                BYPASS_BUFFER         = ' '
                LEGACY_MODE           = ' '
              IMPORTING
                SUBRC                 =
                TABLES
                  INFTY_TAB             =   lt_2006
              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.
              ENDIF.
              read table lt_2006 into lw_2006 with key pernr = innnn-PERNR.
             LW_2006-AEDTM = sy-datum.
              lw_2006-ANZHL = v_cs_quota.
    First Enqueue
              CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
              EXPORTING
                NUMBER = LW_2006-PERNR
              IMPORTING
                RETURN = RETURNE.
             ------------- Update
              CALL FUNCTION 'HR_INFOTYPE_OPERATION'
              EXPORTING
                INFTY = '2006'
                NUMBER = LW_2006-PERNR
                SUBTYPE = LW_2006-SUBTY
                OBJECTID = LW_2006-OBJPS
                LOCKINDICATOR = LW_2006-SPRPS
                VALIDITYEND = LW_2006-ENDDA
                VALIDITYBEGIN = LW_2006-BEGDA
               RECORDNUMBER = LW_2006-SEQNR
                RECORD = LW_2006
                OPERATION = 'MOD'
                TCLAS = 'A'
                DIALOG_MODE = '0'
              IMPORTING
                RETURN = RETURN
                KEY = KEY.
             --------- Dequeue
              CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
              EXPORTING
                NUMBER = LW_P2006-PERNR.
      ENDIF.

    Thank you, Yes Its updating in 2006....but only sy-datum and username are updating .....Leave quota i am changing from 4 to 3 . its not updating, but showing in screen when i used dialog = 2.  Also the same screen appearing 3 times and when i am trying to click on save button its ending with an error 'internal maximum number of sessions reached' , then screen automatically closing by itself.

  • Creating / updating Custom infotype with different screen

    Hi All,
    I have created custom infotype having different screen for different subtype(1,2).
    From Subtype 1, indotype is automatically updated as it is a standard program. But for subtype 2 i am using HR_INFOTYPE_OPERATION for updating the record which is ending with error, as employee which i am trying to update is already locked by me only through PA30. So this function module ends with Complex error. Please suggest how to update the infotype with subtype 2.
    Thanking you..
    Best regards
    Akshay

    Hi All,
    I have created custom infotype having different screen for different subtype(1,2).
    From Subtype 1, indotype is automatically updated as it is a standard program. But for subtype 2 i am using HR_INFOTYPE_OPERATION for updating the record which is ending with error, as employee which i am trying to update is already locked by me only through PA30. So this function module ends with Complex error. Please suggest how to update the infotype with subtype 2.
    Thanking you..
    Best regards
    Akshay

  • Calling custom Infotype method from ABAP report

    Hi Experts,
    I am working on an application where i need to call a method of a custom defined infotype.
    I have done this -->
    1. Create a custom infotype 9111
    2. SAP creates a class of that infotype ZCL_HRPA_INFOTYPE_9111
    3. Inside this method there are few inherited method which provide me functionality of insert , update , delete
    i want to call methods IF_HRPA_INFTY_BL~MODIFY,
    IF_HRPA_INFTY_BL~INSERT
    However when i call these method from abap report this method does not work.
    where as when i try to insert an entry using PA30 transaction it works.
    Does anyone know why does this happen and what is the solution?
    Regards,
    Ashish Shah

    Hi,
    This is the code we are using. Just calling the read and modify methods of the check class. Very simple actually .. we just want once update/insert to work but it does not.
    <CODE>
    REPORT  ZTESTRAD_WD.
    FIELD-SYMBOLS <p9106> TYPE p9106.
    DATA : infty_container_tab TYPE hrpad_infty_container_tab ,
           message_list        TYPE REF TO cl_hrpa_message_list,
         w_ok type boole_d  ,
         ref_class TYPE REF TO ZCL_HRPA_INFOTYPE_9106,
         container        TYPE REF TO if_hrpa_infty_container,
         it9106_container TYPE REF TO cl_hrpa_infotype_container,
         p9106_ref        TYPE REF TO data,
        busilog type ref to if_hrpa_masterdata_bl.
    CREATE OBJECT  message_list.
    TRY.
            CREATE OBJECT ref_class
              EXPORTING
                tclas = 'A'
                infty = '9106'.
          CATCH cx_hrpa_violated_assertion .
            write :/ 'Error during initialization'.
      ENDTRY.
    call method cl_hrpa_masterdata_bl=>get_instance
       importing
         masterdata_bl = busilog.
    TRY.
    CALL METHOD ref_class->IF_HRPA_INFTY_BL~read
      EXPORTING
        tclas           = 'A'
        pernr           = 'XXXXXXXX'
        infty           = '9106'
        begda           = sy-datum
        endda           = sy-datum
        no_auth_check   = abap_true
        message_handler = message_list
      IMPORTING
        container_tab   = infty_container_tab
        is_ok           = w_ok.
    CATCH cx_hrpa_violated_assertion .
       WRITE :/ 'Infotype could not be read'.
    ENDTRY.
    *" Fill the local structure with container data:
      loop at infty_container_tab into container.
        it9106_container ?= container.
        TRY.
        CALL METHOD it9106_container->primary_record_ref
          IMPORTING
            pnnnn_ref =  p9106_ref.
         CATCH cx_hrpa_violated_assertion .
        ENDTRY.
        ASSIGN p9106_ref->* to <p9106>.
        write :/ <p9106> .
      endloop.
    *" Just change some field values of the record
      <p9106>-C1name2 = 'Test name'.
      <p9106>-C2name2 = 'Test name 2 3 4'.
    data : return TYPE BAPIRETURN1,
           return1 TYPE BAPIRETURN1.
    *CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
    EXPORTING
       number        = <p9106>-pernr
    IMPORTING
      RETURN        = return1
    *PERFORM do_nothing(sapfp50p).
    The container itself is modified
      container ?= it9106_container->modify_primary_record( <p9106> ).
    CREATE OBJECT message_list.
    the invocation - errors are always fatal !!!
      DATA : lx_exception  TYPE REF TO cx_root,
             update_mode type HRPAD_UPDATE_MODE,
             massn type massn,
             massg type massg.
      TRY.
          CALL METHOD ref_class->IF_HRPA_INFTY_BL~MODIFY(
            EXPORTING
               old_container =                   it9106_container
               massn                          = massn
               massg                         = massg
               update_mode =                 update_mode
               no_auth_check =                   'X'
               message_handler =                 message_list
            IMPORTING
               is_ok =                           w_ok
            CHANGING
               container =                       container
        CATCH cx_hrpa_violated_assertion INTO lx_exception.
          RAISE EXCEPTION TYPE cx_wd_no_handler
            EXPORTING previous = lx_exception.
      ENDTRY.
    </CODE>
    I have also tried by instantiating the cl_hrpa_masterdata_bl and then calling the methods on that object...... makes no difference.
    I used this link to proceed with the modifications:
    http://help.sap.com/saphelp_erp2005/helpdata/en/43/21d2254bba2bebe10000000a1553f7/frameset.htm
    The funny thing is that the WHOLE logic executes without any error messages or dumps or anything. I have now debugged almost every line of code that these methods call. PA30 works just fine. HR_INFOTYPE_OPERATION does not .. that's a whole differnt story.

  • Creating / Updating Custom Infotype Records

    Hello everbody,
    We implement alot of custom HR infotypes in our system, both PA &  HRP.
    For the past several we have been using BDC (Batch-Input) recorded functions in order to update / create the records in our infotypes.
    We're currently facing an upcoming ECC upgrade , and I would like to lead a change that will eventually lead to us using generic SAP supplied functions.
    I've researched a few functions that might do the trick:
    RH_INSERT_INFTY:
    This one is giving me an SY-SUBRC 2 error code - Insert error, I tried to select a current record and insert it as different objid but this doesnt work.
    HR_INFOTYPE_OPERATION:
    I've read of several people that recommended using this function, but it is not released by SAP and I couldnt get it to work as well.
    BAPI_HRMASTER_SAVE_REPL_MULT:
    This one seems to work for sap infotypes but I dont think it suits custom infotypes.
    What is the "official" way of doing such operations?
    thanks in advance,
    Eli.

    Hello Dilak,
    Im currently trying to insert a new infotype record of infotype HRP9226.
    First I call function RH_GET_NEXT_NUMBER to get an objid.
    then I fill an HRP9226 line.
    after this i call the function:
    call function 'RH_INSERT_INFTY'
    exporting
    FCODE = 'INSE'
    vtask = 'S'
    ORDER_FLG = 'X'
    COMMIT_FLG = 'X'
    AUTHY = ' '
    PPPAR_IMP =
    OLD_TABNR = ' '
    REPID = ' '
    FORM = ' '
    KEEP_LUPD =
    WORKF_ACTV = 'X'
    tables
    innnn = hrp9226_line
    ILFCODE =
    EXCEPTIONS
    NO_AUTHORIZATION = 1
    ERROR_DURING_INSERT = 2
    REPID_FORM_INITIAL = 3
    CORR_EXIT = 4
    BEGDA_GREATER_ENDDA = 5
    OTHERS = 6
    I'm getting an "Error_During_Insert" and Im out of options regarding what I can possibly do.

  • Create Custom Infotype and handle Modification/Updation

    Hi All,
    I need to create a custom infotype and handle few checks while creating/updating the existing one.
    I have gone through the existing threads and have figured out the creation part.
    Could anyone tell me where i need to code the checks while creating/updating.
    I tried editing the PBO/PAI of the Module pool program, but as its standard, is asking for access key. Do we need to code this in any userexit or implement BADI.
    For example,
    a) i need to check that only one instance of the infotype should be valid for an  
        employee at a time
    b) This infotype should be created for only Employees and not contingent workers.
    c) Few fields on the body section needs to be updated/modified.
    Thanks and Regards
    Manish.

    You can use the IN_UPDATE or AFTER_INPUT Methods of the BAdI HRPAD00INFTY to perform your validations.
    Arya

  • How to Add data in HR infotype 2011 through ABAP

    Hi All,
    Can any one please give me an idea about how to insert time record in Infotype 2011 through ABAP. I cannot use the front end recording (SHDB) as it locks the person's master data. I need to Add the record through ABAP Query. I have inserted record in Table TEven and it works fine but then there is a conflict of sequence number field and system does not allow to change the data in infotype 2011 and gives error message.
    Thanks

    Hi amit
           even i have same requirement i tried with the same code but i'm getting error No data stored for infotype 2011 in the period.
    code:
       CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
            EXPORTING
              number        = wa_modify-pernr
           IMPORTING
             RETURN        = return
          clear return.
          CALL FUNCTION 'HR_INFOTYPE_OPERATION'
            EXPORTING
              infty                  = p_infty
              number                 = wa_modify-pernr
    *         SUBTYPE                =
    *         OBJECTID               =
    *         LOCKINDICATOR          =
    *         VALIDITYEND            = wa_modify-ldate
    *         VALIDITYBEGIN          =
    *         RECORDNUMBER           =
              record                 = wa_modify
              operation              = 'MOD'
             TCLAS                   = 'A'
             DIALOG_MODE             = '0'
    *         NOCOMMIT               =
    *         VIEW_IDENTIFIER        =
    *         SECONDARY_RECORD       =
           IMPORTING
             RETURN                 = return
    *         KEY                    =
          CALL FUNCTION 'HR_EMPLOYEE_DEQUEUE'
            EXPORTING
              number        = wa_modify-pernr
    *       IMPORTING
    *         RETURN        =

  • Updation problem in custom infotypes.

    HI ALL,
    I have created two custom infotypes, and the process is that one infotype updates the other infotype.
    When i open the first infotype by pa30 and then open the second and changes some value which update the first infotype table. now when i go to first info type it shows the old value. untill i exit pa30 and start again then it shows the updated values. what is the solution for this.
    Thanks.

    Hi abap sap,
      It is becasue of PAI and PBO module itterations.
    Go to the custom related program created with that infotype and insert your logic to clear the field contents.
    Reward if useful!

  • Not to Update custom infotype

    Hi Expert,
    I have one custom FM which is used to update the custom infotype but my requirement is when it get fail it should not update
    the infotype but it is updating.Befor this FM we are performing operation i. e MASSN  07,08, .
    This requirement is based on contract renewal when contract is not renewed it should not update custom infotype bue it is
    updating when contract is not renewed through the above FM.
    please give me some idea so that custom infotype should not get updated when contract is not renewed.But it is
    updating the infotype what should i put to not update the infotype when contract is not renewal.
    Below is my listed code.
        IF lv_action =  '09' OR lv_action = '07' OR lv_action = '08' AND lv_cr_renewal = ''.
        CALL FUNCTION 'ZF_HCM_ALM_ABSENCE_DATA'
            EXPORTING
              i_pernr                 = lv_pernr
              i_effective_date        = lv_date
              i_updation              = 'X'
    TABLES
      T_ABSENCE_DATA          =
          t_return                = lt_return_absence
    Regards,
    Md
    Edited by: MdAddu on Jun 26, 2011 9:33 AM
    Edited by: MdAddu on Jun 26, 2011 9:52 AM

    Hi,
    Write the code as :
    IF ( lv_action = '09'  OR lv_action = '07' OR lv_action = '08' )
      AND lv_cr_renewal = ''.     "-- contract renewed ...
    CALL FUNCTION 'ZF_HCM_ALM_ABSENCE_DATA'
    EXPORTING
    i_pernr = lv_pernr
    i_effective_date = lv_date
    i_updation = 'X'
    TABLES
    T_ABSENCE_DATA =
    t_return = lt_return_absence
    Regards,
    Srini.

Maybe you are looking for

  • Error when releasing Transports in ChaRM

    Good Day; When releasing a transport thru ChaRM I get the following error "Release of system could not be determined. The error message is "/TMWFLOW/CRIT_OBJ061" Any ideas? Thanks Don

  • Email Attachments Become Corrupted When Moved to a Different Mailbox

    I believe that I have stumbled upon a bug in Mountain Lion mail.  Here is the set up: Server: Mac OS X Mountain Lion Server 10.8.2 running IMAP email service Clients: An assortment of Macs all running Mac OS X Mountain Lion 10.8.2 using Mail as the m

  • Replacing 'special' characters

    Hi all, I was wondering if thers is a function module, class (method) or whatever (codepage translation) to convert 'special' characters like: è, é, ë, ï, etc with respectively e, e, e, i? More generally speaking we need to convert all characters (wh

  • On runtime, how to get EventDispatchThread and clear EventQueue?

    On runtime, how to get EventDispatchThread and clear EventQueue? My programer throws following exception on runtime, I want to get EventDispatchThread to stop event dispatch and clear EventQueue on runtime. Exception in thread "AWT-EventQueue-0" java

  • Re:Deemed export

    when iam creating create licenct iam geting the issue is enter the valied sold to party, ship to party how can i solve this issue please help me