IN_UPDATE  HRPAD00INFTY

Hello All,
I just implement the methode IN_UPDATE using the BADi HRPAD00INFTY,
problem that I have, i need to trigger messages or exceptions when Errors comes, i dont have unfortunately any exports Parameters for triggering errors messages or exceptions in the Methode IN_UPDATE !!
can any tell to solve this? to trigger messages in IN_UPDATE methode?
thank you very much,
regards

example
IF DAYS1 = 0 OR DAYS2 = 0.
        CONCATENATE 'Data error!' ' ' INTO MES_T SEPARATED BY SPACE.
        MESSAGE MES_T  TYPE 'S' RAISING ERROR_WITH_MESSAGE.
      ENDIF.
      IF LV_DATE1 > LV_DATE2.
        CONCATENATE 'Error number 2'  ' '  INTO MES_T SEPARATED BY SPACE.
        MESSAGE MES_T  TYPE 'S' RAISING ERROR_WITH_MESSAGE.
      ENDIF.

Similar Messages

  • HRPAD00INFTY IN_UPDATE currency field

    Hi abapers,
    We have a custom infotype (structure P9003) that has an include structure PS9003 consists of 2 components (component types PAD_AMT7S and
    WAERS). We want to make some controls when saving this datas from pa30. We have implemented BADI 'HRPAD00INFTY' and used method 'IN_UPDATE'. But when debugging this method, NEW_IMAGE-DATA1 field contains ##P#USD, although in screen we input 500,00 and USD . How can i solve this problem.
    Thanks.
    Message was edited by:
            Kaan Sezer

    hi kanupriya,
                          i am not a fully technical guy so plz help me ...
    My all the required data in the It0000 screen .Now i created the ZHRPAD00INFTY badi from se 19 in
    HRPAD00INFTY~IN_UPDATE method i have to take all the screen values and save in the PA0002 table  such as in standard badi is doing.
    now how i will check it data regarding the IT0000 or IT0002 .
    kindly guide me ......
    i have my all screen data in this endmethod (parameters)
    now how i have assign to pa0000.
    method IF_EX_HRPAD00INFTY~IN_UPDATE.
               NEW_PREF_IMAGE = NEW_PREF_IMAGE.
               OLD_PREF_IMAGE = OLD_PREF_IMAGE.
               NEW_IMAGE = endmethod..
               OLD_IMAGE = OLD_IMAGE.
               IPSPAR = IPSPAR.
    endmethod.
    thanks
    sandeep

  • HRPAD00INFTY~IN_UPDATE

    Dear Friends,
    I have to insert the data in IT0000 ,IT0001 and IT0002 with the help of the HRPAD00INFTY badi.Am not aware about how i pass the value in this method IF_EX_HRPAD00INFTY~IN_UPDATE am not aware about i can do kindly help me out to guide me .
    Kindly give me example so i can dooo at my level....
    thanks
    sandeep

    hi kanupriya,
                          i am not a fully technical guy so plz help me ...
    My all the required data in the It0000 screen .Now i created the ZHRPAD00INFTY badi from se 19 in
    HRPAD00INFTY~IN_UPDATE method i have to take all the screen values and save in the PA0002 table  such as in standard badi is doing.
    now how i will check it data regarding the IT0000 or IT0002 .
    kindly guide me ......
    i have my all screen data in this endmethod (parameters)
    now how i have assign to pa0000.
    method IF_EX_HRPAD00INFTY~IN_UPDATE.
               NEW_PREF_IMAGE = NEW_PREF_IMAGE.
               OLD_PREF_IMAGE = OLD_PREF_IMAGE.
               NEW_IMAGE = endmethod..
               OLD_IMAGE = OLD_IMAGE.
               IPSPAR = IPSPAR.
    endmethod.
    thanks
    sandeep

  • HRPAD00INFTY - How to determine what action the user took (IN_UPDATE)

    Greetings, Experts.
    I've been asked to modify an existing BAdI for infotype 0167. The existing code is in method IN_UPDATE.  FYI, we have to use this method (as opposed to, say, AFTER_INPUT) since we have to make sure the user completed the operation as we're modifying data in another infotype based on their action.
    As such, the  logic depends on what the user is doing, i.e., inserting, updating, delimiting or deleting a record. I was testing different scenarios in PA30 to see what the value of IPSPAR-ACTIO would be and got some puzzling results.
    For example, I used the Edit->Copy feature in PA30 to copy and then delimit an existing record and was expecting an ACTIO of "LIS9" (Delimit) but it was "MOD". Similarly, I used the trashcan to remove an existing record and got a "MOD" operation. Finally, I deleted another record the same way (trashcan icon) and this time it was "LIS1" which I found stupefying since that's not even a valid value according to the DDIC for data element ACTIO.
    I can't seem to get a consistent way to determine what the user is doing. What is the best practice?
    Thanks.

    Hi Steve,
    You can  try with IPSYST-IOPER Parameter Which is Showing the Right Values .
    Regards,
    Kishore.S

  • FM 'HR_INFOTYPE_OPERATION' & BADI 'HRPAD00INFTY'

    Hello fellow Abapers. I am experiencing problems trying to implement the following.
    We have a custom infotype (9127) that has 8 intervals of dates. We want to created an absence if any of these intervals are filled. So, after some research i have found this BADI 'HRPAD00INFTY' and specially the method 'IN_UPDATE'. This method is triggered after pushing the save button, so it's just what i needed. I have already the information i need (after converting prelp structure to pnnnn) and then i try to create a record in INFTY 2001 with FM 'HR_INFOTYPE_OPERATION'.
    I have made a small report with this FM and it works just fine, i can create a record i PA2001 just fine, but in the implementation of the BADI it isn't working. I guess it might be something to do with 'locks', not really sure, so if anyone has a suggestion i'd appreciatiate it.
    BTW, here is the code i am using :
            CALL FUNCTION 'HR_INFOTYPE_OPERATION'
            EXPORTING
              INFTY                  = '2001'
              NUMBER                 = wa_9127-pernr
              SUBTYPE                = 'L145'
        OBJECTID               =
        LOCKINDICATOR          =
              VALIDITYEND            = <fs2>
              VALIDITYBEGIN          = <fs1>
        RECORDNUMBER           = 0
              RECORD                 = rec2001
              OPERATION              = 'INS'
        TCLAS                  = 'A'
        DIALOG_MODE            = '0'
        NOCOMMIT               =
        VIEW_IDENTIFIER        =
        SECONDARY_RECORD       =
            IMPORTING
              RETURN                 = codret
        KEY                    =
    Thanks in advance, Pedro Guarita.

    In FM 'HR_INFOTYPE_OPERATION', commit work is executed after infortype was updated.  Infortype 9127 and corresponding BAdi belong to the same SAP LUW. So it leads to commit work has no effect in BAdi.
    A common solution is to call u2018HR_INFOTYPE_OPERATION' by a submit program, this will trigger another LUW in a new work process to commit your data. The pain point for this solution is that you have to pass the data to your new program (always use memory).  Also guaranteeing the success is a little bit difficult .
    Another solution is to call FM like this: CALL FUNCTION 'HR_INFOTYPE_OPERATION' DESTINATION 'NONE' in BAdi 'HRPAD00INFTY'. Help this will help u.
    Regards,
    Kevin

  • Changes in custom infotypes not captured in badi 'HRPAD00INFTY'

    Hi
    I have created a custom infotype 9038 and my requirement is, any changes in the infotype have to be logged in to a custom table. Any changes in standard infotypes are getting captured in badi 'HRPAD00INFTY' - method 'IN_UPDATE' and i am able too update my custom table.  But changes in custom infotype 9038 is not triggering the badi 'HRPAD00INFTY'.
    Could any body suggest which tables should be maintained to trigger the badi or do we need to do any configuration using SPRO?
    Thanks and regards
    Badri

    I created the interface which is running successfully.
    Now i did some changes in target table(data base level).
    I reversed the updated table in model section. Till here its ok
    The table which is updated in the model section is not automatically updated in the interface.
    I have to drop the existed datastore in the interface and and re do the entire process of bringing the updated datastore, mapping,etc..
    Please tell the any alternate way.
    Regards
    suresh

  • BADI HRPAD00INFTY Implementation

    Hi,
    I have a query related to BADI implementation HRPAD00INFTY. We have implemented this BADI to delimit the record and create a new one of Bank details(infotype 0009). When in PA30, we copy a record whose End date is infinite i.e. 12/31/9999. After copying the record, copied record should get delimited with the end date as last changed date, as todays date. And end date of new record should get set to infinite date as above.
    New record is getting created correctly, but the delimited record's end date is not getting changed. As per analysis, when we try copying the record first time, the dates get set correctly and further not. The IN_UPDATE method of BADI is not getting called in next change sessions.
    Please advise on same or let us know for any solutions if any.
    Thanks,
    Rupali.

    Try like this
    method IF_EX_HRPAD00INFTY~BEFORE_OUTPUT.
      Data: LV_WA(20) Type C Value '(MP002100)VIEW_REPID'.
    Types: T_VIEW_REPID Type T582V-REPID.
      Field-Symbols: <FS_REPID> Type T_VIEW_REPID.
      Assign (LV_WA) To <FS_REPID>.
    endmethod.

  • Implementing BADI - HRPAD00INFTY

    Hi Experts,
    I am new to BADI (though I know the general steps for implementation - se18 and se19) and would like to know how to implement the method IN_UPDATE from the BADI - HRPAD00INFTY. I am not able to figure out what the parameters IPSPAR, OLD_IMAGE, NEW_IMAGE, OLD_PREF_IMAGE, NEW_PREF_IMAGE are for and how they can be used in coding (am looking for info in addition to what is in the documentation). According to the requirement I need to fill the supervisor ID field P0001–MSTBR and display it when the user saves the infotype record. Any sample code for implementing this method would be very helpful.
    Thanks
    Sri
    Edited by: Sri Maddineni on Mar 12, 2008 5:58 AM

    Hi Sri,
    Please check the documentation for the method below to know the purpose of the fields...
    Update Program: Call-Up During Update
    Functionality
    The method Update: Call During Update (IN_UPDATE) is called in the update task of Personnel Administration in the UPDATE form.
    Parameters
    IPSPAR
    Work fields for dialog control
    OLD_IMAGE
    Before Image: Infotype records prior to change
    NEW_IMAGE
    After Image: Infotype records following change
    OLD_PREF_IMAGE
    Before Image for assignment values
    NEW_PREF_IMAGE
    After Image for assignment values
    to view the documentation
    Go to se18 -> enter the name of the badi -> click display->
    Press on the "documentation" tab
    Athough in all cases documentation may not be available....
    in this case a pop up will come after you press "documentation"
    Scroll towards the bottom and
    click on "Method: Update: Call During Update" highlighted in blue to view the documentation
    reward if helpful
    Regards
    Byju

  • Updation of leaves from HR to Cprojects through BADI HRPAD00INFTY

    Hi Experts,
    I want to update the leaves from HR to Cprojects.
    For that i am using BADI HRPAD00INFTY  
    mplement the method IN_UPDATE from the BADI - HRPAD00INFTY. I am not able to figure out what the parameters IPSPAR, OLD_IMAGE, NEW_IMAGE, OLD_PREF_IMAGE, NEW_PREF_IMAGE are for and how they can be used in coding (am looking for info in addition to what is in the documentation).
    According to the requirement I need to update the ENDDA, BEGDA and AVLUNIT fields in RPM_BUPA_AVL table.
    I can see in the table NEW_IMAGE having the  fields ENDDA and  BEGDA. Here Data1 field having encrypted values.Any sample code for implementing this method would be very helpful.
    Regards
    Subhaskar

    Have you checked what's in the Subtype field of table T777D for infotype 0002?
      IF t777d-namst ne space.                                  "QNOK025939
        MOVE <namst> TO <subty>.
      ENDIF.
    Usually this sentence won't be executed unless there is something in that field. Usually we don't have subtypes for IT0002.
    Also make sure that the infotype that gives the dump is 0002 and not 0105.
    Regards.

  • BADI HRPAD00INFTY is not working in ESS

    Hi Gurus,
       I have a requirement for Infotype 0006 at the time of saving or updating or deleting the infotype record. I used BADI HRPAD00INFTY for this. It is working fine if we go through PA30 T-code.
      If I enter the records into infotype 0006 through ESS then this BADI is not triggering. Tried in SDN and found that for ESS we need to use BADI HRPAD00INFTYBL. In this my problem is how can we get whether it is updation or deletion or creation mode?
      Otherwise can any one provide me another BADI is available for this scenario which will work through ESS.
    Thanks,
    SC

    If you are trying to use this BADI and you don't have access to the current operation being executed (INS, MOD, DEL etc), you can always have access by using the PSYST structure used on the main program of the infotype you are working with.
    You just have to use a field-symbol to get access.
    FIELD-SYMBOLS: <FS> TYPE PSYST.
    ASSIGN('(MP000100)PSYST') TO <FS>.
    CASE <FS>-IOPER.
    WHEN 'MOD'.
    ENDCASE.

  • How to display Error messages through BADI HRPAD00INFTY in ESS ?

    Hi,
    In ESS, I want to perform custom validation on IT1067 ( Health Plan ) and allow only specific combinations of health plans to be selected.   We are on ECC6.0 EhP4 .  This infotype is "NOT PERMITTED" in the new decoupled framework and hence I cannot use NEW BADI's for validation and I am stuck with Classical BADI - HRPAD00INFTY.
    In my classical badi HRPAD00INFTY, after validation, I want to display an error message if "Invalid Combination" is selected by the user.  
    I tried using the following code to display the error message :
              DATA badi_message_handler   TYPE REF TO cl_hrpa_message_list.
              DATA message_handler        TYPE REF TO if_hrpa_message_handler. 
              DATA msg                    TYPE symsg.
              DATA is_ok                  TYPE boole_d.
              CREATE OBJECT badi_message_handler.
              message_handler = badi_message_handler.
              msg-msgid = 'YHBN'.
              msg-msgty = 'E'.
              msg-msgno = '006'.
              msg-msgv1 = c_none_plans. "'Invalid Plan'(z09).
              CALL METHOD message_handler->add_message
                EXPORTING
                  message = msg
                  cause   = message_handler->unknown.
                  is_ok = space.
              badi_message_handler->add_messages( message_handler ).
              RAISE error_with_message.
    The message is displayed in ESS but after that the Java Trace Exception is displayed.   I  want to display the error message in a user friendly way and provide an option to correct the plans.
    Please let me know if anyone has done similar thing or have any suggestions.
    Thanks

    Hi,
    DATA badi_message_handler   TYPE REF TO cl_hrpa_message_list.
              DATA message_handler        TYPE REF TO if_hrpa_message_handler. 
              DATA msg                    TYPE symsg.
              DATA is_ok                  TYPE boole_d.
              CREATE OBJECT badi_message_handler.
              message_handler = badi_message_handler.
              msg-msgid = 'YHBN'.
              msg-msgty = 'E'.
              msg-msgno = '006'.
              msg-msgv1 = c_none_plans. "'Invalid Plan'(z09).
              CALL METHOD message_handler->add_message
                EXPORTING
                  message = msg
                  cause   = message_handler->unknown.
                  is_ok = space.
              badi_message_handler->add_messages( message_handler ).
         *-- Add following--
        Exit.
              RAISE error_with_message.

  • Use of BAdi 'WorkOrder_update'(method in_update)

    Hi,
    I am using the badi 'WorkOrder_update' for an enhancement to iw32.I need to check whether new material has been added to order.How will i check that new material has been added to order. There are parameters in this badi which gives us the components list.Will these tables be returning the components which are already existing in the order or the components which the user has entered or changed.
    Please help.

    Hai anu,
    in that badi defination there is a moethod IN_UPDATE in which u have
    IT_HEADER
    IT_HEADER_OLD
    IT_ITEM
    IT_ITEM_OLD
    IT_SEQUENCE
    IT_SEQUENCE_OLD
    IT_OPERATION
    IT_OPERATION_OLD
    IT_COMPONENT
    IT_COMPONENT_OLD
    IT_DOCLINK
    IT_DOCLINK_OLD
    as importing parameters with this u can compare the old and new items for the order.
    If usefull Reward points
    Regards,
    Sree

  • BAdi HRPAD00INFTY - Dynamically change the value of Wage amount in Infotype

    Hello all,
    I am implementing BAdi HRPAD00INFTY for infotype 0008.
    The requirement is, whenever user checks/saves Infotype 8, System should look out FTE wage type exists or not. If it exists then amount should be calculated and get updates for that wage type. If wage type not found insert wagetype FTE and amount in the infotype for the employee.
    I have calculated amount in method AFTER_INPUT of the BAdi. I am trying to reflect the updated amount on the screen using  method CL_HR_PNNNN_TYPE_CAST=>PNNNN_TO_PRELP. but it is not working.
    I also tried to use the same method CL_HR_PNNNN_TYPE_CAST=>PNNNN_TO_PRELP in BEFORE_OUTPUT method.
    Can somebody help me on this?
    Any pointer would be helpful and appreciated.
    Thanks in advance.
    Best Regards,
    Dharitree

    Added by Jeyhun Hajiyev - Azerbaijan Baku DemirBank 05.04.2010
    Function EXIT_SAPFP50M_001 INCLUDE  ZXPADU01
    DATA : lv_message_handler TYPE REF TO if_hrpa_message_handler
               , wa_0008  LIKE p0008
    FIELD-SYMBOLS: <fs_p0008> TYPE ANY.
    IF innnn-infty = '0008'.
      CLEAR : lv_plans
            , ls_hrp1005
            , lv_result
    Transfer the structure p0008 from INNNN
      ASSIGN ('INNNN') TO <fs_p0008> CASTING TYPE p0008.
      CHECK sy-subrc = 0.
      MOVE <fs_p0008> TO wa_0008.
    u201COR
    CALL METHOD CL_HR_PNNNN_TYPE_CAST=>PRELP_TO_PNNNN
    EXPORTING
    PRELP = INNNN
    IMPORTING
    PNNNN = WA_0008.
    u201CChanging in Infotype 0008
          wa_0008-trfst = '01'.
          wa_0008-lga01 = '1000'.    "FOR SEE RESULT YOU MUST ADD THAT LINE
          wa_0008-bet01 = 100. " $ Amount for Q0008-BETRG
      CALL METHOD cl_hr_pnnnn_type_cast=>pnnnn_to_prelp
        EXPORTING
          pnnnn = wa_0008
        IMPORTING
          prelp = innnn.
    ENDIF.

  • Issue with function module HR_INFOTYPE_OPERATION in badi HRPAD00INFTY

    Hello All,
    I have a business scenario wherein, when user saves data for infotype 0002 from tcode PA30, i have create a new record for infotype 0105 by copying existing record and just changing the date.
    For the same I am using funtion module HR_INFOTYPE_OPERATION inside badi HRPAD00INFTY method AFTER_INPUT.
    When I am running the same function module in a independent program, its running fine. But when I run it inside the badi method, it runs with sy-subrc = 0 and no error, but later in the standard program MP000200,in pai module PRE_INPUT_CHECK, it tries to execute this statement     MOVE <namst> TO <subty> and gives dump, with runtime error MOVE_TO_LIT_NOTALLOWED_NODATA and saying that "Error at assignment: Overwritten protected field.".
    Have tried all the options of function module HR_INFOTYPE_OPERATION, but nothing is helping.
    Kindly let me know if any information on the same.
    Best Regards,
    Rahul Malani

    Have you checked what's in the Subtype field of table T777D for infotype 0002?
      IF t777d-namst ne space.                                  "QNOK025939
        MOVE <namst> TO <subty>.
      ENDIF.
    Usually this sentence won't be executed unless there is something in that field. Usually we don't have subtypes for IT0002.
    Also make sure that the infotype that gives the dump is 0002 and not 0105.
    Regards.

  • Updating another infotype in the in_update badi

    Hi Experts.
    We are upgrading from 4.6c to ECC.
    We are updating a lot of infotypes using HR_INFOTYPE_OPERATION (passing no_commit = x) in the in_update Badi.
    Now when the infotype being updated in the in_update fails, HR_INFOTYPE_OPERATION internally issues a ROLLBACK WORK.
    See these lines from the FM:
    IF RETURN IS INITIAL.
    READ TABLE MODIFIED_KEYS INDEX 1.
    MOVE MODIFIED_KEYS(8) TO KEY(8).
    MOVE MODIFIED_KEYS12 TO KEY8.
    ELSE.
    IF NOT NOCOMMIT IS INITIAL.
    ROLLBACK WORK.
    ENDIF.
    It worked correctly in 4.6c.
    Now in ECC, it starts giving a dump - saying that ROLLBACK work is not allowed within the in_update.
    Short text of error message:
    ROLLBACK WORK during ON COMMIT or ON ROLLBACK
    It sounds logical - but I am not sure how come it was working in 4.6c.
    Any work arounds to it? Anyone else also encounter it?
    Thanks in adv.

    Hi Aishi!
    I had a short look inside HR_MAINTAIN_MASTERDATA (in HR_INFOTYPE_OPERATION) - seems like there are some call transactions. A call transaction has invariably a commit work inside, so the parameter "nocommit" just defines a "dialog" parameter.
    Looks like the logic of the update was changed - or the "in_update" badi wasn't really called in update task earlier.
    Best way: search for other ways to update master data (without commits) - at least much better than the risk of additional commits in update task.
    BR, Christian

Maybe you are looking for

  • Class & int/String issues

    Upon compiling, I am receiving the following errors: TeamRosterApp.java:153: cannot find symbol symbol : class ButtonPanel location: class TeamRosterPanel ButtonPanel buttonPanel; ^ TeamRosterApp.java:166: cannot find symbol symbol : class ButtonPane

  • Safari doesn't start

    Hi. I installed an SSD and I used time machine to restore infomation. Chrome works well but Safari doen't start. I ran disk utility to repair permissions and I deleted all the plug ins. Here is the error message I get. Process:         Safari [2178]

  • ? What can i do about this, i will have cancel this if i can not use the programs

    good evening i have just purchased lightroom and photoshop on a 12 months contract and its now saying i am running a operative system that photoshop no longer supports  ? What can i do about this, i will have cancel this if i can not use the programs

  • Is it possible to open a Blurb BookSmart document with InDesign

    I created a book [document] in Blurb's BookSmart and would like to know if it is possible to open it in InDesign and make minor modifications, and then save to PDF.

  • [RESOLVED] conditional field color

    this is probably has a very simple answer. In a af:table with af:inputText's in them I am trying to get the table to render where the cells of one of the columns in the table have a background color of yellow if the field says "Yellow" as the inputTe