Update infotype 0032 in user exit ZXPADU02

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

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

Similar Messages

  • User exit ZXPADU02 - evaluating SY-UCOMM

    Hello everyone,
    I am trying to display an error message whenever someone tries to create a new work schedule rule (P0007-SCHKZ) in infotype 7. However, the error message should just come up when the user is trying to save his data.
    I am using user exit ZXPADU02 for this purpose. My problem is that SY-UCOMM does not seem to hold reliable data in this user exit, and SSCRFIELDS does not seem to be supported at all.
    My code looks like this (only the relevant code snippet in ZXPADU02):
    CASE INNNN-INFTY.
            WHEN '0007'.
          CALL METHOD CL_HR_PNNNN_TYPE_CAST=>PRELP_TO_PNNNN
            EXPORTING PRELP = INNNN
            IMPORTING PNNNN = P0007.
          CALL METHOD CL_HR_PNNNN_TYPE_CAST=>PRELP_TO_PNNNN
            EXPORTING PRELP = PSAVE
            IMPORTING PNNNN = P0007_ALT.
          IF P0007_ALT-SCHKZ <> P0007-SCHKZ
          AND IPSYST-MASSN IS INITIAL " do not warn within an info group of a personnel action
          AND SY-UCOMM = 'UPD'. " only warn when saving the data -> problem here <-
            MESSAGE 'Do not change IT7 directly or else.' TYPE 'I' DISPLAY LIKE 'E'.
            SHOW_DATA_AGAIN = 'X'.
          ENDIF.
    At first glance, the above works nicely.  But this is what happens when I test more thoroughly:
    I create a new period in IT 7, enter a P0007-SCHKZ other than the one that was previously valid, press F11. Some warnings appear (for different reasons), which I dismiss using the Enter key. Afterwards, the above code fires, the error message is being displayed, and I am thrown back into the data screen. So far, so good.
    Now I simply alter the value in the field "Weekly hours" (P0007-WOSTD) and press Enter (!). Again a series of warnings appear, including one that a dataset is going to be deleted (seeing that an IT 7-period with just the same date range already exists). I confirm that with Enter, and the data is being saved. The above code does not fire because I have only pressed Enter - but the data is being saved anyway!
    Looks like a pretty erroneous behavior on the side of the SAP system. The question is whether I have a chance to do something about it in the code.

    Mihir Nagar wrote:
    Dear Petersen,
    Your IF condition seems ok. I doubt on the message statement. Can you replace your message statement with type E.
    MESSAGE 'Do not change IT7 directly or else.' TYPE 'E'.
          ENDIF.
    Hope this works.
    Regards,
    Mihir.
    I did not expect this to work, because normally you use type 'E'-messages only in certain PAI-environments, but it does the job, thank you!
    make use of  field IOPER of the structure  PSYST to check on the infotype actions INS, MOD, COP, DEL...
    In this particular case I did not care, so I did not check that. IT 7 should only be maintained through personnel actions in our case.
    Next you can check with sy-ucomm field the different between "enter" and "save". With "save" sy-ucomm will be 'UPD'.
    That is what I did, but as I described, there was a situation when SY-UCOMM is SPACE, but the system saved anyway due to a prior save attempt.

  • Im trying to update db table in  user exit, with the internal table

    Im trying to update db table in user exit, with the internal table
    my scenario:
    loop at itekpo.
    updating itekpo -
    > at the end of user exit the db table ekpo have to be updated
    endloop.
    Im updating internal table, using 
    MODIFY itekpo TRANSPORTING INCO1 INCO2  WHERE ebeln = itekpo-ebeln
    where itekpo is internal table, but it is not updating the db table 'ekpo'.
    i also tried updating ekpo directly !
    Thanks in advance

    Hi,
    you can search in the forum itself,
    Try this link for instance
    https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=tocreateaBADI&adv=false&sortby=cm_rnd_rankvalue
    You can find a code for finding BADI as a report with the following Transaction
    finding badis
    How to find BADIs
    Reward if helpful
    Regards
    Byju

  • Infotype check and user exit

    hi All,
    With the help of answer from my previous post I understand that I need to implement a user exit to do a particular check on my field. Actually when a user inputs a field then i need to compare it to field from some other table.
    My doubt is what user exit i need to use..
    ZXPADU01 or ZXPADU02 or ZXPADU03.
    My understanding is that ZX*02 is for me since it is implemented in PAI module of screen 2000 for MP999900.
    Also can someone explain what different situations we need to use this exits?
    Also please mention if BADI exists with the same functionality.
    thanks and regards,
    Reena

    if it is a Z infotype then as per my previous post just go to se80 and ur concerend module pool program.
    and write a module in PAI on tht particular field as in my post..
    if u want to compare it with another table value then u can simply  fetch data frm tht table in this module and compare it with ur field.
    U need not to go for USer Exit for the Z infotype.
    amit

  • Ztable not updating in sales order user exit

    Hi Genius Abapers.
    We want to take text ID data of sales order into Ztable. For taking the data we have used user exit in sales order. Now the problem is if we go through debug mode then the Ztable is updating but if we remove the break point Ztable is not getting updated.
    Please give solution for this problem
    Regards
    Narayana

    Hi Gurus,
            I am basically from SD and we used commit statements in the programme and this is the code we used
    Include name --- MV45AF0B_BELEG_INITIALISIEREN
    **********************************Code Addd by paresh 8.10.2007 starts *******************************
      DATA : BEGIN OF itab_so OCCURS 0,
             vbeln LIKE vbap-vbeln,
             posnr LIKE vbap-posnr,
             spras LIKE t002t-spras,
             END OF itab_so.
      DATA : BEGIN OF itab_so1 OCCURS 0,
             vbeln LIKE vbap-vbeln,
             posnr LIKE vbap-posnr,
             spras LIKE t002t-spras,
             END OF itab_so1.
      DATA : BEGIN OF it_tabid OCCURS 0,
             tdid LIKE stxh-tdid,
             tdspras like stxh-tdspras,
             END OF it_tabid.
      DATA : is_stxh TYPE stxh.
      DATA g_header TYPE string .
      DATA wa_plain_text TYPE zplain_text.
      DATA t_lines LIKE tline OCCURS 0 WITH HEADER LINE.
      DATA g_item(16)." type i.
      data :it_ztable type table of  ZPLAIN_TEXT .
      data wa_ztable type zplain_text.
      data flag.
    *****************************Read Header text***************************************
    *loop at vbak.
       itab_so1-vbeln = vbak-vbeln.
       itab_so1-posnr = vbak-posnr.
       itab_so1-spras = vbak-wklnd.
       APPEND itab_so1.
       CLEAR itab_so1.
    ENDLOOP.
    refresh it_tabid.
    clear it_tabid.
    refresh it_ztable.
    clear it_ztable.
      LOOP AT xvbap.
        itab_so-vbeln = vbak-vbeln.
        itab_so-posnr = xvbap-posnr.
        itab_so-spras = xvbap-wklnd.
        APPEND itab_so.
        CLEAR itab_so.
      ENDLOOP.
    LOOP AT itab_so.
        SELECT tdid tdspras FROM stxh INTO TABLE it_tabid WHERE tdobject = 'VBBK' AND tdname = vbak-vbeln  .
    ENDLOOP.
    *loop at it_ztable into wa_ztable.
      LOOP AT itab_so.
        LOOP AT it_tabid.
          is_stxh-tdobject = 'VBBK'.
          is_stxh-tdname   = vbak-vbeln.
          is_stxh-tdid     = it_tabid-tdid.
          is_stxh-tdspras  = it_tabid-tdspras.
          CALL FUNCTION 'READ_TEXT'
            EXPORTING
              id                      = is_stxh-tdid
              language                = is_stxh-tdspras
              name                    = is_stxh-tdname
              object                  = is_stxh-tdobject
            TABLES
              lines                   = t_lines
            EXCEPTIONS
              id                      = 1
              language                = 2
              name                    = 3
              not_found               = 4
              object                  = 5
              reference_check         = 6
              wrong_access_to_archive = 7
              OTHERS                  = 8.
          IF sy-subrc = 0.
            LOOP AT t_lines.
              CONCATENATE g_header t_lines-tdline INTO g_header SEPARATED BY space.
            ENDLOOP.
            wa_plain_text-application = 'SO'.
          wa_plain_text-key1 = itab_so-vbeln.
            wa_plain_text-key1 = vbak-vbeln.
            wa_plain_text-key2 = 'HDR'.
            wa_plain_text-sub_application = it_tabid-tdid.
            wa_plain_text-text = g_header.
            wa_plain_text-last_date = sy-datum.
            MODIFY zplain_text FROM wa_plain_text .
       wait up  to  60 seconds.
             commit work.
            CLEAR: wa_plain_text.
            CLEAR : g_header,t_lines.
            refresh t_lines.
          ENDIF.
      if sy-subrc <> 0.
       delete from zplain_text where key1  = vbak-vbeln    and
                                  key2  = itab_so-posnr    and
                                  SUB_APPLICATION = it_tabid-tdid.
                                   commit work.
       endif.
        ENDLOOP.
      ENDLOOP.
    *endloop.
    Please do me the needfull
    Regards
    Manam.Narayana

  • Update Delivery qty via user exits

    Hello all,
    I need to replace the delivery qty that is copied from sales order with another qty during delivery creation (or) at the time of saving the delivery. I have tried replacing the field LIPS-LFIMG in various user exits. But none had updated the delivery qty(somehow SAP again replaces the new value with the original value). If you know how to update a delivery qty thru an user exit, please give me details.
    Thanks a lot

    Hi Bala;
       Have you tried this through the routines in transaction VOFM?  An example routine is in the VOFM menu path "Data Transfer -> Deliveries".  Check the code under routine 101, that may help you.
    Best Regards,
    John

  • Updating BKPF table using User-Exit

    Hi,
    In User-exit, i am trying to modify Document date and Posting date of Accounting Document (Table : BKPF ) by using the following stmt:
       modify bkpf from table it_bkpf1.
       if sy-subrc = 0.
          commit work and wait.
      endif.
    But the modification is not done for some Accounting Document's.
    While debugging it is updating but not for Normal execution.
    Please suggest on this.
    Regards,
    Aruna.

    Hi,
      The Document Date is the date in which the business transaction for the Documente(e.g., a transfer of posting) took place. The document date is the date on which the original document was issued.
    The document date can, for example, refer to the creation date of the delivery note issued by the vendor or the internal goods receipt slip.
    Note: It is possible that an invoice was issued with a Document Date of 6/15/98, entered into R/3 on 7/15/98 (Entry Date) with a Posting Date of 6/30/98 (to post the Document in the previous fiscal year). Many times, all three of these dates are the same
    Are you sure that the <b>exit SAPLF051</b> was active. You may need to activate it through transaction CMOD.
    <b>Reward points</b>
    Regards

  • Update vbup/vbuk from user-exit for sales document

    Dear All.
    Is it possible to update the sales document status for an item (vbup) from a user exit , customer function, badi, or other, in the billing document?
    We'd like to make the control of updating the status tables dynamic, rather than based on the confiuration for an exception process.
    For example, when service item (order related billing) is partially billed, depending on some conditions we would set the sales order service item to fully invoiced. 
    In this case vbup-FKSAA = C.
    Many thanks!

    There is a BAdI LE_SHP_ITEM_STATUS that can change the item status in VBUP. Be sure to read the documentation first. It states
    If you use this BAdI to change the delivery item status that was set in delivery
    processing, it can affect further processing of the delivery extensively, and
    lead to data inconsistencies. Therefore, SAP recommends that you only use
    the BAdI to modify your own status fields.
    Regards,
    Brenda

  • HR_INFOTYPE_OPERATION is not working in user exit ZXPADU02

    Hi frndz,
      i want to delimit/modify record in infotype 0014 after checking some condition when user clicks on SAVE in infotype 0008.
    For this i'm using the code like below.
    In Include ZXPADU02.
    when '0008'.
    IF sy-ucomm = 'UPD'.
    chek <condition>
    if sysubrc = 0.
    Lock employee.
    Delimti(LIS9) record in IT0014 using HR_READ_INFOTYPE_OPERATION.
    Unlock employee.
    endif.
    Here every thing working fine but record is not getting delimitted.
    Could anybody please help me any other possibilities to solve it.
    Thanks and Regards,
    Venkat

    Hi,
    I tried to use the FM HR_INFOTYPE_OPERATION in ZXPADU02 but I found that it will
    not update data in the real DB table(PAXXXX).I found that in FM 'HR_MAINTAIN_MASTERDATA' from FM 'HR_INFOTYPE_OPERATION' will set the field 'PSPAR-PBPFL' as 'X'.
    In standard program, it looks like if this field is set it will not do the logic to update the DB table. So I put the code in other report and then call in the ZXPADU02. I think it's about LUW.
    Code as follows to understand.
    data:
          lw_p0008      LIKE p0008,
          lw_pskey      LIKE pskey,
          lv_option,
              EXPORT lw_p0008 lw_pskey lv_option
                to memory id 'ZXPADU02_0008'.
              submit ZHRR_PA_ZXPADU02_0008
                     and return.
    Inside program ZHRR_PA_ZXPADU02_0008
    IMPORT w_p0008 lw_pskey lv_option
        FROM MEMORY ID 'ZXPADU02_0008'.
      CALL FUNCTION 'ENQUEUE_EPPRELE'
            EXPORTING
              pernr          = lw_p0008-pernr
            EXCEPTIONS
              foreign_lock   = 1
              system_failure = 2
              OTHERS         = 3.
      CALL FUNCTION 'HR_INFOTYPE_OPERATION'
        EXPORTING
          infty                  = '0008'
          number                 = lw_p0008-pernr
          subtype                = lw_pskey-subty
          objectid               = lw_pskey-objps
          lockindicator          = lw_pskey-sprps
          validityend            = lw_pskey-endda
          validitybegin          = lw_pskey-begda
          recordnumber           = lw_pskey-seqnr
          record                 = lw_p0008
          operation              = lv_opera
    *      TCLAS                  = 'A'
    *      DIALOG_MODE            = '1'
    *      nocommit               = 'X'
    *     VIEW_IDENTIFIER        =
    *     SECONDARY_RECORD       =
        IMPORTING
          return                 = lw_return
    *      KEY                    =
      IF NOT lw_return IS INITIAL AND
         lw_return-type EQ 'E'.
        MESSAGE e000(38) WITH lw_return-message.
      ENDIF.
      CALL FUNCTION 'DEQUEUE_EPPRELE'
        EXPORTING
          pernr = lw_p0008-pernr.
    If this not works, then go for dynamic action from V_T588Z as suggested by Suresh.
    Regards
    Eswar

  • Update infotype from user exit

    Hi,
    My requirement is to update a infotype from a user exit. I have a internal table with some records created in the user exit pbas0001. Now i need to update these records in the infotype 2001(absences). I tried using HR
    INFOTYPEOPERATIONS directly from the user exit and it didn't work. If i create a include program and create a subroutine within the include program and call it in the user exit still i am getting a error message. How can update the infotype from the user exit.
    Can someone send the example code for how to export the internal table from the user exit and import it in another program and update the infotype from that prgm.

    Put the entire code in another Report & SUBMIT that report from the User exit.. this will isolate the two work processes & the Z table should get updated..
    ~Suresh

  • Infotype 0008 - User Exit Validation

    Hi Gurus,
    I have to validate infotype 0008 amount fields  in PAI user exit ZXPADU02 .
    For a scenario, if the amounts are not equal  ( BET01 <> BET02) then  I have to geneate error message.
    Then the user is supposed to correct / re-enter  the amounts .
    The problem is , when I generate error message , the amount fields are grayed out.
    I think this is happeneing cause of standard SAP code (  in flow logic for program MP000800  ) .
    Is there any way to generate error message in the user exit and
    Give the users an option to update the amount correctly ??
    Core mod is the last option.
    Appreciate your inputs .
    Thanks

    I solved this problem with:
    if BET01 <> BET02.
            message 'tekst' type 'S'.
            LEAVE SCREEN.
    endif.

  • Issue with user exit ZXPADU01 and ZXPADU02

    Hi,
    I am trying to change the existing record for the info type 0015 for an employee in Pa30 transaction.
    my requirement is i need old value and new value when i am changing the existing record in info type 0015.
    When i kept break point in user exit ZXPADU01 it is not triggering it is triggering only when we creating the record.
    i tried with user exit ZXPADU02 it is not working as per my requirement.
    My requirement is :whenever i am changing the existing record(modifying record) i need old value and new value.
    Anybody can suggest me how to fix this issue.
    Thanks,
    Maheedhar

    Dear Maheedhar,
    The best way to achieve this requirement is to use the PAI user exit ZXPADU02 import parameter PSAVE. The PSAVE parameter contains the PBO original / initial record, before any changes take place.
    The INNNN parameter contains the current PAI record as usual, in order to be used for customer check and new values. Thus, you've got both the old and the new record in place, and you can make your comparison according to the business requirements:

  • Update the database table inside an user exit.

    Hi Experts,
    I have a issue where i have to update a custom table in an User exit.
    I am using Lock object for ENQUE/DEQUE.
    I have tried to use statements like UPDATE/MODIFY inside the user exit.
    But the problem is that it's not updating the database table at the same time.
    I know if i use COMMIT WORK it can update at the same time but it's not advisable to use COMMIT inside a work.and also it gives a short dump.
    The real issue is that this custom table is read for batch creation at the same time for different users.
    Now if it the program does not update the database table at the same time then other users also read the same data and create the same Batch number..
    While requirement is to create a different/unique batch numbers.
    Program is updating the table but it's taking time..so in between other users are creating the same batch number.
    Please guide me what would be the best solution for this.
    Regards,
    Amit Kumar Singh

    Thanks for your quick reply.
    My actually requirement is like that.
    I have to create a Process Order using tcode COR1.
    After passing some input value it goes inside an User Exit.
    There one Custom table is maintained which stores some fields like month,year,numeric key field,etc.
    The new batch number is created using the combination of these table fields.
    Once a new batch number is created it increment the numeric key field number by one.
    Issue is we have to update this new numeric field value into the database field so that other users can read a diffrent numeric field value.hence it will create a new/different batch number.
    Here i am not able to update the database table inside this User Exit.
    Table is geeting updated but after some time and out of this User Exit.
    Please suggest what's required in that case?
    Regards,
    Amit Kumar Singh
    Edited by: Amit  Singh on Feb 3, 2009 11:33 AM

  • User exit for updating delivery block of Sales order before Delivery

    Hi  Folks,
    Need to have an user exit for updating Delivery Block indicator for a Sales order Before creating its delivery
    I have got an exit in Program SAPMV45A
    MV50AFZ1
    FORM USEREXIT_REFRESH_DOCUMENT.
    that hits before processing the delivery block fro delivery (Correct me if i m wrong with this )
    Now i want now how to change the Delivery Block indicator of Sales order in that exit
    any FM available ?
    Thanks n regards
    Sonal...

    Hi  ,
    How did you solved this issue?
    I am having similar scenario in which while pressing the save button  delivery block should update if multiple schedule line exist.
    Tried by two different approaches in various user exit without any success.
    AFAIK we have two ways to achieve this functionality.
    1) Count the no of rows in vbep. If greater than 1 then multiple schedule line exist and we can assign the value to VBAK-LIFSK(delivery block) as per our requirement.
    This is not correct. If there are two line items both with single schedule line . This case total no lines in vbep will 2 and above condition will true which is incorrect.
    2) There is a indicator for multiple schedule line (VBAPD-EPMEH , xvbap-epmeh ) if it is check then multiple schedule line exist and we can assign the value to VBAK-LIFSK(delivery block) as per our requirement.
    If I write code in USEREXIT_SAVE_DOCUMENT_PREPARE.
    Multiple schedule line indicator is not populate so can not use 2nd approach.
    If I write code in  USEREXIT_SAVE_DOCUMENT it of no use as vbak is updated before reaching this user exit.
    If I write code in USEREXIT_MOVE_FIELD_TO_VBAK as this user exit is also called while pressing the enter key for this I have use
    the condition of fcode but it also fails in some condition.
    If fcode eq 'SICH'.
    Read table xvbap with key epmeh = 'X'.
    IF SY-SUBRC = 0.
    VBAK-LIFSK = '03'.
    Else.
    VBAK-LIFSK = ' '.
    Endif.
    Endif.
    Please help me to get the desired functionality working for all cases.
    1) One line item with multiple schedule line                                              
    2) Two line item with multiple schedule line                                             
    3) One line item having one schedule line and second one having multiple
    4)Two line item both with single schedule line.

  • User Exit in Infotype 0024 (Appraisals)?

    Hi,
    I'm an ABAPer and I've been asked to find out if there are any user exits on the 0024 create screen?  We want to add in some tick boxes.
    I've searched SPRO and nothing jumps out at me, could anyone point me in the right direction?
    Thanks,
    Gill

    Hi gill,
    Actually your requirement can be fulfilled with "Enhancing Standard Infotype".I think user exit is not at all required.Check the following link:-
    https://wiki.sdn.sap.com/wiki/x/GIGrAg
    -Goodluck,
    Bhumika

Maybe you are looking for