Infotype Updation In HR Module

Can anyone give me a code regarding
When an ALV Editable report is generated there should be ‘Update’ button on the output screen. Once this button is clicked specific field values displayed on editable report should get updated in infotype.

dear u have to create Screen and Custom Control also
and put Button there
inthe PAI event u can create code for update infotype.
Rewards if useful.

Similar Messages

  • To perform database update in a module with AT EXIT-COMMAND addition

    Dear All,
    I have a function code 'EXIT' with function type 'E'. When this function code is triggered, my screen should close.
    In the module that handles this function code (defined with AT EXIT-COMMAND addition), I will prompt the user whether he/she want's to save the data before exiting with the POPUP_TO_CONFIRM_STEP function module. The text message in the dialog box is "Do you want to save before exiting?".
    When the user wants to save the data, a simple UPDATE statement will be executed to write the data on screen to database.
    The problem here is since the module is defined with AT EXIT-COMMAND addition, the data on screen won't be copied to their corresponding variable on the code (correct me if I'm wrong). Therefore, even though database update is performed, the data written to database are no different that the original.
    How to perform database update in a module with AT EXIT-COMMAND addition?
    or
    Is it even a "custom" or a "good practice" to prompt user to save data before exiting?
    Thanks in advance,
    Haris

    With an exit command, if there's anything that would be lost, I would prompt "Data will be lost, do you wish to continue?". If they do, the database is not updated, if they don't, they stay in the transaction.
    This is because the exit command runs before validation. So how can you know the data is correct?
    If you have a button to leave the transaction that isn't an exit command, then you could prompt to save instead. There the choices should be - quit without saving, save and quit, don't quit.
    Doing a database update in an exit command is not a good idea.
    matt
    Edited by: Matt on Mar 15, 2011 11:53 AM

  • Usage of update Task Function Modules

    During an application development using WDA I have stumbeled across this unique problem.
    As recommended by SAP I am trying to use update function module to update my SAP Database. But calling the function in WDA does not update the database.
    <b>On the other hand when I call the same function module without the key words in UPDATE task, it updates the database.</b>
    <i>So my question is
    Can I use Update task function modules in WDA?</i>
    If answer is Yes, then I would like to know How?
    If answer is No,  then what is the best practice for updating the SAP database in WDA applications.

    Try Add a commit work after the call.
    Cheers
    Phil

  • HCM process & Forms - Need logic to handle the Error's when Infotype Update

    Hi Experts,
    Currently im working with HCM process and forms workflow's. I have ten HCM workflow's and everything is working fine.
    Now the issue is, at the time of save, if there is any error like infotype lock or any other Master data error's, then the standard task responsible for save the data, returns the Status as Error.
    Already the approval process for the request is carried out, and it can not be make it again. So I need to save the data without re execution of the process or without re-approval.
    I searched in standard workflow also. There is no option to handle the Infotype update Error's.
    So can any one give me some hint about this? Without the re-initiation i need to save the data's.
    Thanks for your time and Suggestions.

    If you are using the framework to update specific infotypes and they are locked for "no apparent" reason you'll want to open an SAP message.  I would highly discourage you from going down the path of calling that FM, from within workflow no less.  Workflow in the framework was not intended to do such operations, this is supposed to be handled in the decoupled infotype framework (through configuration)... not to mention you won't be using the dec. infty framework by calling that function.
    While I've had to do this before, it was because of a limitation in the framework not something as trivial as a locked infotype.  Who knows, it might actually be locked for a legitimate reason?
    Andy

  • Run Time of update task function module

    Hi
    Any body please tell me how to find out the execution time for a update task function module with in a user exit.
    thanks in advance
    saravanan

    Vimal,
    if the INSERT tries to insert an existing key, check for sy-subrc = 4 in the function module, raise an error (duplicate key) and the iupdate process is aborted - you will get express message.
    It might be better to
    first lock the table
    then check the existence of key
    then call update function (update process will unlock).
    Regards,
    Clémens

  • Downloading Update Failed - Internal Module Error

    Trying to update my Nokia 6630, and each time it completes the 25mb download before giving me the error.
    Downloading update failes
    Internal module error
    Is this because my phone is a a Vodafone fone, and therefore locked by their software to some description? Or is it a more sinister (or simpler) error?

    28-Mar-2008 01:07 PM
    blue_panther9_9 wrote:
    Could anyone help me with this problem
    i've installed NSU and nokia pc suite(all latest..)
    i've plug the my n95(v20), detected by PC suite...
    i run NSU,, detected,,, and downloaded v21 firmware for n95 (112mb)..
    after it finished downloading, when it try to install it.. it says
    "Downloading update failed"
    "internal module error"
    maybe i didnt read the instruction about change profile to general..
    i changed it to general, the problem still the same...
    okay maybe after i didnt change profile there is some file left in my phone.. so i decided to soft n hard reset.... and i connect again... still showing the same problem, after it finished download...
    so i used my other computer(maybe there is some problem with my vista), so i used my XP...
    and it still showing the same problem..
    i've used that msxml4 solution, but it still didnt work...
    Please help me....
    28-Mar-2008 01:07 PM
    blue_panther9_9 wrote:
    Could anyone help me with this problem
    i've installed NSU and nokia pc suite(all latest..)
    i've plug the my n95(v20), detected by PC suite...
    i run NSU,, detected,,, and downloaded v21 firmware for n95 (112mb)..
    after it finished downloading, when it try to install it.. it says
    "Downloading update failed"
    "internal module error"
    maybe i didnt read the instruction about change profile to general..
    i changed it to general, the problem still the same...
    okay maybe after i didnt change profile there is some file left in my phone.. so i decided to soft n hard reset.... and i connect again... still showing the same problem, after it finished download...
    so i used my other computer(maybe there is some problem with my vista), so i used my XP...
    and it still showing the same problem..
    i've used that msxml4 solution, but it still didnt work...
    Please help me....

  • Infotype updation- alternate solution for FM HR_INFOTYPE_OPERATION.

    Hi Expert ,
    Right now i am using FM HR_INFOTYPE_OPERATION to insert data to infotype 19.
    Problem i am facing is data to be inserted is very large and this takes lot of time.
    Is there any other FM which updates infotype in mass i mean using internal table?  Since in this FM cant pass internal table so i have to call this FM for every PERNR.
    Thanks & Regards ,
    JIgar Thakkar.

    Hi Jigar
    As suggested by Rahul,  Use the FM: HR_PSBUFFER_INITIALIZE. This will improve the performance of your code to a great extend. I would personally, use HR_MAINTAIN_MASTERDATA or HR_INFOTYPE_OPERATION to update the infotype 0019. However, both are buffering the data and doing some EXPORT to memory. The result of this is that after a few hundred calls to HR_INFOTYPE_OPERATION or HR_MAINTAIN_MASTERDATA, the buffer gets big enough to impact the performance of the function module. After thousand of updates with HR_INFOTYPE_OPERATION or HR_MAINTAIN_MASTERDATA, each call will take many seconds and your ABAP program will be unusable. Because you run it for high volumes only in the SAP production system, thatu2019s when youu2019ll really see the impact.
    The solution is simple. Call this function module to clear the buffer.
    CALL FUNCTION 'HR_PSBUFFER_INITIALIZE'.
    Hope this helps.
    Harsh

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

  • Help ! OM Infotype Update Error

    We were trying to update the OM infotype using the RH_UPDATE_INFTY function module. But we are getting an exceptional error - 'ERROR DURING UPDATE'. Please help us on this.
    The process which we used is.. Select the existing infotype record (IT 1029) and make modifications in some of the fields and pass the updated record to the FM.

    Hi Radha,
    Instead of  going for RH_UPDATE_INFTY, you can go for the function module HR_INFOTYPE_OPERATION.
    Before using this function module you need to LOCK using ENQUEUE_EPPRELE, so that no other person cannot make any changes to that infotype.
    After the changes, you must UNLOCK the infotype using DEQUEUE_EPPRELE.
    Sample:
    CALL FUNCTION 'ENQUEUE_EPPRELE'
    EXPORTING
    pernr = wa_hrrecord-pernr
    EXCEPTIONS
    foreign_lock = 1
    system_failure = 2
    OTHERS = 3.
    IF sy-subrc EQ 0.
    CALL FUNCTION 'HR_INFOTYPE_OPERATION'
    EXPORTING
    INFTY = '0015'
    NUMBER = P0015-PERNR
    SUBTYPE = P0015-SUBTY
    OBJECTID = P0015-OBJPS
    LOCKINDICATOR = P0015-SPRPS
    VALIDITYEND = P0015-ENDDA
    VALIDITYBEGIN = P0015-BEGDA
    RECORDNUMBER = P0015-SEQNR
    RECORD = P0015
    OPERATION = 'INS'
    TCLAS = 'A'
    DIALOG_MODE = '0'
    IMPORTING
    RETURN = RETURN
    KEY = KEY.
    CALL FUNCTION 'DEQUEUE_EPPRELE'
    EXPORTING
    pernr = wa_hrrecord-pernr.
    ENDIF.
    ENDLOOP.
    Regards,
    Chandra Sekhar

  • HR Infotype Update

    Hello,
    In WDA, I am trying to update an infotype i.e. 0021.
    I have made a call to the FM HR_INFOTYPE_OPERATION.
    Now I get an error in the function module that the record that I am trying to access does not exist, although it is there.
    This particularly happens when I use the operation mode as 'MOD'.
    When I use operation mode as 'INS', it goes and updates the record.
    So if the operation mode is 'INS' then it should insert a record rather than updating.
    Happy Coding,
    Rahul

    Hello Thomas,
    Is there any standard documentation on this particular FM that I can read.
    I have been trying to search but could not find one.
    Happy Coding,
    Rahul

  • Infotype Update gives error

    Hi,
    I tried to update infotype 0000 with HR_INFOTYPE_OPERATION.
    It gave me a error with name  ASSIGN_BASE_TOO_SHORT
    Following is the error analysis.
    Pls guide me.
    Error analysis
        The source field is too short.
        In the running program "SAPLHRMM" a field should have been assigned to a field
        symbol, which is shorter than the type of the field symbol.
        This is not possible.
        It is a statement of the form ASSIGN f TO <fs> CASTING...
        or ASSIGN f TO <fs> with a field symbol that was created with the
        STRUCTURE addition.
    I have called my FM like this.
    CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
            EXPORTING
              number = WA_p0000-pernr.
          CALL FUNCTION 'HR_INFOTYPE_OPERATION'
            EXPORTING
              INFTY                  = '0000'
              NUMBER                 =  WA_P0000-PERNR
    *   SUBTYPE                =
    *   OBJECTID               =
    *   LOCKINDICATOR          =
             VALIDITYEND            =  P0000-endda
             VALIDITYBEGIN          =  p0000-BEGDA
    *   RECORDNUMBER           =
              RECORD                 = WA_P0000
              OPERATION              = 'MOD'
             TCLAS                  = 'A'
             DIALOG_MODE            = '0'
    *   NOCOMMIT               =
    *   VIEW_IDENTIFIER        =
    *   SECONDARY_RECORD       =
           IMPORTING
             RETURN                 = w_return
    *   KEY                    =
          CALL FUNCTION 'BAPI_EMPLOYEE_DEQUEUE'
            EXPORTING
              number = WA_p0000-pernr.
    TIA.

    Hi ,
    I am also using the same function module and it is giving me the same dump can you let me know how did you solved the problem.
    Error in ASSIGN in the program "SAPLHRMM".
    Regards,
    Manohar

  • Write Direct INFOTYPE updates to PCL4 cluster

    Hi All,
    We have a custom info type (9999) and that info type is being updated in a back ground program which does direct updates (Insert/Modify/Delete) to table PA9999.
    We have a requirement to show change logs for this info type. After Change logs configuration, Changes done by users are working fine. However changes done in background program are not showing up in change logs.
    Is there a way to write direct updates to PCL4 cluster? Please let me know if there are any Function Modules or any other way to achieve this.
    Thanks,
    Swapna.

    Hi Swapna,
    Please do not use direct updates on the infotype,
    There is HR_INFOTYPE_OPERATION function module which will do the updation of infotype in many operations
    MOD, INS, LIS9, DEL etc.
    Read the documentation and correspondingly use it. Dont forget to lock and unlock employee before using this function moduel.
    If you use these function modules rather than direct updates the change log will also be taken care of, authroization checks would be taken care of, time constraints etc.
    Regards,
    Divya

  • PT60 test run and Infotype update

    Hi All,
    I have created a custom Time function and included it in schema. When i try to execute PT60 tcode i am unable to access the Test run variable TESTOPT2 inside my custom function. I want to update some entries in Infotype 2001 and i dont want this to happen during test run.
    Also will the infotype table be updated automatically if i populate the values in table P2001 inside my custom function, or should have to manually do it through Function modules?
    Any info regarding this is appreciated.
    Thanks,
    Navin..

    Devendra Yadav,
    where yoiu able to resolve your issue number 1?
    I have the same problem.
    Thank you.

  • Suggestion on infotype update

    Hi All,
    The requirement is: Create another infotype during some infotype creation. Two options I could think of are:
    1. Create using BADI HRPAD00INFTY - But we should not commit inside badi to prevent incomplete data getting updated in database (from other update statements). So we could just call FM 'HR_INFOTYPE_OPERATION' and leave to the system to commit the changes.
    2. Use Dynamic action.
    My doubt is: Does dynamic action do the same thing what I just mentioned in point number one i.e. update without immediate commit.
    Note: Only the FIRST CORRECT answer will fetch point :P
    Thanks,
    Bhaskar

    HI,
            According to my view Dynamic Action will work same as the FM HR_INFO_*. It will itself do the commit..

  • 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

Maybe you are looking for

  • Self service performance is very slow

    Hi iam working on 11..5.10 with linux 2.1.our configuration is RAC db and apps server on different node.We are having problm like our self service screen is very slow but if we use formbased screens its better than these seflservice screens.How can i

  • Audio Levels on Playback

    Whenever I create a slideshow in iDVD or iPhoto, and then burn to a DVD in iDVD the volume levels are incredibly loud on playback on my television or stand alone DVD player. I can see the sliders to adjust the volume for playback on my computer when

  • Building an image for multiple types of Macs...

    I need to build images for iMac G3 500's, iMac G4's, eMacs, & 400 Mhz G4 Towers. My question is this... Using OS 10.3 or 10.4, can I build an image on one of these machines that will have all of the appropriate drivers, software, etc. to distribute t

  • Exception in  useOneAsMany function

    Hi Experts, I have a scenario IDoc (ORDERS05) to cXML. to map the E1CUCFG (SO configuration data) to CXML.I have used the below mapping Please click the link: [http://www.flickr.com/photos/25429360@N07/2466275133/] Everything works fine, but if a IDo

  • The 10.6.2 upgrade hasn't yet resolved the google images bug

    I write for the second time and for the same bug: safari 4.0.4, even firefox 3.5, can't shows images in google images, blogspot blogs and google maps.