ECM BADI Problem

Can anyone supply some custom code that they use in the HRECM00_ACTIVATION-ACTIVATE_PROCESS method to update infotypes? I've been getting the following errors when trying to create an infotype 0000 record in the badi:
The exception 'CX_HRPA_VIOLATED_PRECONDITION' was raised but was not caught at any stage in the call hierarchy.

Hello UWE,
Here is the code in my ACTIVATE_PROCESS method. There is no error checking yet as I was just beginning with an attempt to create a new infotype 0000 Action record and was getting those exceptions. Any help would be appreciated.
method if_ex_hrecm00_activation~activate_process .
  constants:
    c_abkrs_u1         type abkrs   value 'U1',
    c_abkrs_u2         type abkrs   value 'U2',
    c_abkrs_u3         type abkrs   value 'U3',
    c_abkrs_u4         type abkrs   value 'U4',
    c_massn_z4         type massn   value 'Z4',  "Change in Pay
    c_massg_10         type massg   value '10',  "Merit/Equity
    c_endda_1231       type datum   value '99991231',
    c_actio_ins        type actio   value 'INS',  "Create
    c_citem_us(2)      type c       value 'US',
    c_citem_uq(2)      type c       value 'UQ',
    c_infotype_0000(4) type c      value '0000',
    c_is_ok            type boole_d value 'X',
    c_is_not_ok        type boole_d value ' '.
  data: p0000 type standard table of p0000.
  data:
    w_rec_it0000      type p0000,
    w_rec_it0001      type p0001,   "Infotype 0001 (Org. Assignment)
    w_rec_t549a       type t549a,   "Payroll areas
    w_rec_t549q       type t549q,   "Payroll Periods
    w_is_ok           type boole_d,
    w_return          type bapireturn1,
    w_infty_key       type bapipakey,
    w_message_handler type ref to cl_hrpa_message_list.
set is_ok export parameter to true to start with
  is_ok = c_is_ok.
For each IT0759 record with a value of USnn or UQnn (where 'nn' =
last two digits of the current plan year) in field IT0759-CITEM
  if p0759-citem(2) eq c_citem_us or
     p0759-citem(2) eq c_citem_uq.
Look up the employees current Payroll Area from IT0001-ABKRS
    call function 'HR_ECM_GET_IT0001'
      exporting
        pernr           = p0759-pernr
        key_date        = sy-datum
        message_handler = message_handler
      importing
        p0001           = w_rec_it0001
        is_ok           = w_is_ok.
If the payroll area is equal to U1, U2, U3 or U4 then:
    if ( w_rec_it0001-abkrs eq c_abkrs_u1 or
         w_rec_it0001-abkrs eq c_abkrs_u2 or
         w_rec_it0001-abkrs eq c_abkrs_u3 or
         w_rec_it0001-abkrs eq c_abkrs_u4 ).
Use the payroll area to look up the Period Parameter from V_T549A field PERMO
      clear w_rec_t549a.
      select single permo from t549a
        into w_rec_t549a-permo
        where abkrs eq w_rec_it0001-abkrs.
Select the Payroll Period whose start date (BEGDA) is immediately
after the effective date on IT0759-EFFDT
      clear w_rec_t549q.
      select single * from t549q
        into w_rec_t549q
        where permo eq w_rec_t549a-permo
          and pabrj eq p0759-begda(4)
          and begda ge p0759-begda.
      CALL FUNCTION 'HR_READ_INFOTYPE'
        EXPORTING
          pernr           = p0759-pernr
          infty           = c_infotype_0000
          endda           = c_endda_1231
        TABLES
          infty_tab       = p0000
        EXCEPTIONS
          infty_not_found = 1
          OTHERS          = 2.
    sort descending to put the latest record first
      sort p0000 descending.
    read the first record into the IT0000 record structure
      read table p0000 into w_rec_it0000 index 1.
Initial Field - the system will populate
      clear: w_rec_it0000-aedtm,
             w_rec_it0000-uname.
      w_rec_it0000-begda = w_rec_t549q-begda.
      w_rec_it0000-massn = c_massn_z4.
      w_rec_it0000-massg = c_massg_10.
This will lock employee for update
      CALL FUNCTION 'BAPI_EMPLOYEE_ENQUEUE'
        EXPORTING
          number = p0759-pernr
        IMPORTING
          return = w_return.
      call function 'HR_INFOTYPE_OPERATION'
        exporting
          infty         = c_infotype_0000
          number        = p0759-pernr
          validityend   = c_endda_1231
          validitybegin = w_rec_t549q-begda
          record        = w_rec_it0000
          operation     = c_actio_ins
        importing
          return        = w_return
          key           = w_infty_key.
This will unlock employee record
      call function 'BAPI_EMPLOYEE_DEQUEUE'
        exporting
          number = p0759-pernr
        importing
          return = w_return.
    endif.
  endif.
endmethod.
Steve

Similar Messages

  • I can't open my gallery after i migrate the iphoto! How can i fix this bad problem?

    HI,
    I can't open my gallery after i migrate the iphoto! How can i fix this bad problem? Flz help me!!

    Try repair permissions with Disk Utility
    Regards
    TD

  • When i was in a phone conversation my phone has switch off and began to vibrate. I solved with a soft reset. It can be a bad problem?

    When i was in a phone conversation my phone has switch off and began to vibrate. I solved with a soft reset. It can be a bad problem?

    Is the battery charged?
    By factory reset, do you mean you "restored" the iPhone?

  • PO check BADI problem

    Hi,
    I have this problem,
    When I use me21n to create a new PO everything looks fine until I've ended filling header. When I press save button I can save a document that has no items (that is bad) because before I get a popup with warnigns, errors, etc. I get a window with save/edit/abort where save is active.
    Any help?

    Hi
    Try this ->
    1) If you have activated versioning on PO, you can get modifications with BBP_PD_PO_GET_DIFF, using the different version GUIDs.
    Otherwise you can read usual change documents (see FM BBPCHANGE_DOC_GENERAL called when you display SC or PO changes)._
    You can also look for implementing the BADI "BBPVERSION_CONTROL"_
    2) Use the FM "BBPPROCDOC_GETDETAIL" which gives the value of the details entered in PO / SC which are already there in Database._
    3) You can use the function module BBPPD_PO_GET_DIFF_ , but any way you should have different guids for the original purchase order and changed purchase order.
    Some related pointers to go through ->
    BADI: BBP_WFL_EMPL_WI_BADI - Read change document
    Re: Get PO modifications?
    how to get PO modifications when no version history exists
    Hope this will help. Do let me know.
    Regards
    - Atul

  • Custom badi problem when imported from 4.6C to 4.7

    Hi ,
    I have the following problem. I imported a custom badi from release 4.6C to a 4.7 and I see a new attribute INSTANCE_FLT_CACHE inside the generated class which is not defined inside the class private section. As a result I get a syntax error .
    What can I do?
    Thank you very much for your help.

    Hi Donatella,
    If it is an istance attribute you can declare it using the DATAstatement.
    If it is a static Attribute, the contents of static attributes define the state of the class that is valid for all instances of the class. Static attributes exist once for each class. You declare them using the CLASS-DATA statement. They are accessible for the entire runtime of the class.
    All of the objects in a class can access its static attributes. If you change a static attribute in an object, the change is visible in all other objects in the class.
    The technical properties of instance attributes belong to the static properties of a class. It is therefore possible to refer in a LIKE addition to the visible attributes of a class – through the class component selector or through reference variables, without prior creation of an object.
    if it may be useful rewards points are appreciated

  • BadI problem in MIGO

    Dear Experts,
    I need to do some validation in MIGO tcode based on item Purchase Order and item. I have already identified badi MB_MIGO_BADI and methods CHECK_ITEM also. but problem is in CHECK_ITEM method having Item Number only as Input parameter. I am unable to get PO Number and Item in this method to do validation.
    Please let me know how can i get Po number and Item in my methos CHECK_ITEM???
    Thanks in Advance,
    Siva

    Hi Siva,
    Check like this
    CALL METHOD im_header->get_items
    RECEIVING
    re_items = lt_items. If you use this method you can not get po no.
    Suppose if your business requirement is to check when ever an item enter in line then you can use line_modify.This will fire when ever you enter line item.In this case you can use parameter cs_goitem for po reference.If there is any macro available then easy to give the message.
    Regards,
    Madhu.
    Edited by: madhurao123 on Sep 26, 2011 11:20 PM

  • BADI Problem In QA01

    Hi All,
    i have to add some custome fields in QA01/QA02/QA03 so i am using BADI Definition QPL1_SUBSCREEN_ADDON and created its implementation also but problem is that now i want to add custom fields appended in CI_QALS in screen number 212 but it is coming in only display mode and it is asking for access key. can anyone please tell me that how can i add those custom fields in that screen?
    regards.

    You have to maintain a customer program and subscreen in the BADI implementation in the Subscreens tab. The custom subscreen will then be called by screen 212.
    Hope that helps.

  • CRM BADI Problems

    We have created a bespoke copy control routine to copy the order reason from one transaction to another. Within the routine we have put BREAK-POINT, but this break point is never being executed, so I assume the routine is not being called.
    The implementation name is ZCRM_COPY_CREDIT_MEM. The definition name is CRM_COPY_BADI.
    We have changed the SUBJECT method to include the following code:
    METHOD if_ex_crm_copy_badi~subject .
    Copy the Analysis Code "Order Reason" to Credit Memo
    Request analysis code "Activity Reason".
      DATA: ls_subject TYPE crmt_subject_wrk.
      BREAK-POINT.
    Ensure the analysis code is for Order Reason "ZT"
      LOOP AT it_ref_subject INTO ls_subject WHERE katalogart = 'ZT'.
    Populate the target structure from the Query source data
      ENDLOOP.
    ENDMETHOD.
    According to SE19 this implementation is active, and I have checked that the routine is being used in copy control.
    Any ideas?

    Hi Avinash,
    I am looking for your help
    Were you able to solve your  problem. Were you able to get your debugger in the Date method in the BADI CRM_COPY_BADI.
    I have implement the date method in the above Badi but this method is not getting called , could you please tell me what could be the problem.
    Waiting for your prompt reply
    Thanks and regards
    Sandeep

  • Bad Problem with Dropped Frames

    I'm running FCP 6 on my 2GHz Intel Core Duo Macbook. I've got IGB 667 MHZ RAM.
    I hadn't been having problems all day when all of the sudden, BAM, every 1 or two seconds I get the Dropped Frames error.
    This happens when I am editing MPEG4 video. I get the dropped frames both with and without audio. There are no other sequences or programs open.
    Would this problem arise from taking multiple shots from a single clip?
    It's getting pretty bad guys, so any ideas are welcome.
    thanks.

    OK, i think i've figured out what the problem may be. When i added an MPEG 4 clip to the sequence in question, a window popped up asking me if I would like to change my timeline settings to match the clip. I said yes. Whatever was changed by this is what is causing the problem.
    What would this have changed and how can i change it back?

  • Dragon Writer MS-8348B having some bad problems.

    I actually don't have the 8348B, I have a Verbatim but it's the same rebaged drive(BenQ 4816p) and I'm having alot of problems, mostly the same problems that other people are having.  The drive initially would recognize some cheap media at 40x MAX but when I tried to write at that speed the drive makes a loud buzzing noise(like really fast clicking), and when it was done writing I look at the media and only see sporatic written dat on it, it's skipping all over the place.  When I tried to write at a slower speed(16x) it either writes really slowly (slowing down to 1x or 2x) or it just burns coasters.  I have the A.UZ driver, should I expect this to happen continuously or is it just my media that's bad?

    I had the exact same thing, I returned it back to the store I bought it from and I'm supposed to get a new one in three weeks.
    P.S. Has this drive done it since you bought it or did this just start recently?

  • Bad problem with crashes - how to troubleshoot?

    Hi,
    I'm a new user and I'm having a lot of trouble with Premiere Pro CS6 crashing. It's so bad that I am thinking I might have to go back to FCP7 until I can get it sorted out. Can someone tell me where to begin troubleshooting this problem?
    I'm on a MacPro mid 2012, 24 Gb RAM, using ATI Radeon HD 5870.
    The OS is OSX Lion 10.7.4
    I'm using Premiere Pro 6.0.1
    It doesn't seem like I'm doing anything particularly special when the crashes occur. This morning, I just had three crashes in the space of about five minutes. I was looking at the audio waveform of a clip and adding markers so I could shorten the soundbite. It didn't seem to like me adding markers.
    Thanks so much.
    - C
    Update: It now crashes almost every time I add a marker to the audio waveform. Sometimes I get to hit save fast enough, sometimes not. If I look in Console, it says "invalid drawable." Not sure where to begin dealing with this.

    It's because you have a Mac....Sorry I had to.
    I had a similar problem with Premiere CS4, although not to the extent of your situation. The two things that seemed to fix it for me was first to upgrade the RAM (which likely is not your problem) and second to reinstall Premiere. It's a pain, but I think I might have just had a buggy install the first time.
    Hope you find a fix! Premiere is an excellent program!
    -Barrett

  • BADI:problem with creating a new tab in BADI

    Hi
    I'm new to BADI's.
    i have a requriement to add a new tab in the MIGO transaction and add a field in that new tab .
    my Functional specification author is suggesting to use the BADI "MB_MIGO_ITEM_BADI" to create a new TAB .
    But i'm not find any function code availale in this BADI .
    Can anybody tell me how to use this BADI "MB_MIGO_ITEM_BADI" to create a new TAB .
    Also can anybody provide me any documentation available in designing a new TAB or new screen using BADI's ?

    Hi pawan
    Try this badi :   MB_MIGO_BADI  -
    (BAdI in MIGO for External Detail Subscreens)  as the name suggest ,
    If you want to add a screen in header level use : Method : PBO_header an code as :
        e_cprog   = 'ZMMPRM0001'.     """ Your screen created
        e_dynnr   = '1000'.                     "Your screen No
        e_heading = 'TEXT ID '(004).    """" Name of the screen to be created .
      ELSE .
        e_cprog   = 'ZMMPRM0001'.
        e_dynnr   = '1000'.                     "External fields: Display
        e_heading = 'TEXT ID '."(004).
    or if at item level
    u can use methid : PBO_DETAIL
    for item level screen creation . and code in the same maaner ..
    You can explore the remaning methods as per your requirements .
    Hope it helps ..!
    Regrads
    Swapnil P KAmble

  • I have a very bad problem with java I try many solution but all the solution failed

    Hello friends,
    My system  10.8.3 Macbook pro
    I try many solution in the 
    Hello friends,
    My system  10.8.3 Macbook Pro, I use Safari 6.0.3
    Java is not working.
    I try many solution in the  internet but nothing work with me , And I feel very sad
    One of the famous solution I try in this link: http://support.apple.com/kb/HT5559
      I download Java OS x 2013-002 and Java 7.17
    after that i do what is written here : http://support.apple.com/kb/HT5559 Also failed.
    Sometime I think to sell my new Macbook Pro because of this problem
    I hope that any one can help me ?
    Thank you
    Soso

    I check what java I have by this way: https://service.parachat.com/knowledgebase/211/How-do-I-check-which-Java-version -is-installed-on-my-Mac.html
    java version "1.6.0_43"
    Java(TM) SE Runtime Environment (build 1.6.0_43-b01-447-11M4203)
    Java HotSpot(TM) 64-Bit Server VM (build 20.14-b01-447, mixed mode)
    sos-macbook-pro:~ so$

  • BADI problem

    Hi
    I have to use  standard badi FI_INT_CUS01, can any body tell how to define it and implement it.
    rgds

    Hi Anup,
    Hope this example will be usefull for u.
    DEFINING THE BADI
    1)        execute Tcode  SE18.
    2)        Specify a definition Name : ZBADI_SPFLI
    3)        Press create
    4)        Choose the attribute tab.  Specify short desc for badi.. and specify the type :
    multiple use.
    5)        Choose the interface tab
    6)        Specify interface name: ZIF_EX_BADI_SPFLI and save.
    7)        Dbl clk on interface name to start class builder . specify a method name (name,
    level, desc).
    Method                   level                                      desc
    Linese;ection        instance methos                 some desc
    8)        place the cursor on the method name desc its parameters to define the interface.
    Parameter                       type                            refe field                        desc
    I_carrid                          import                       spfli-carrid                     some
    I_connid                         import                      spefi-connid                   some
    9)        save , check and activate…adapter class proposed by system is
    ZCL_IM_IM_LINESEL is genereated.
    IMPLEMENTATION OF BADI DEFINITION       
    1)        EXECUTE tcode se18.choose menuitem create from the implementation menubar.
    2)        Specify aname for implementation ZIM_LINESEL
    3)        Specify short desc.
    4)        Choose interface tab. System proposes a name fo the implementation class.
    ZCL_IM_IMLINESEL which is already generarted.
    5)        Specify short desc for method
    6)        Dbl clk on method to insert code..(check the code in “AAA”).
    7)        Save , check and activate the code.
    Now write a sample program to use this badi method..
    Look for “BBB” sample program.
    “AAA”
    data : wa_flights type sflight,
    it_flights type table of sflight.
    format color col_heading.
    write:/ 'Flight info of:', i_carrid, i_connid.
    format color col_normal.
    select * from sflight
    into corresponding fields of table it_flights
    where carrid = i_carrid
    and  connid = i_connid.
    loop at it_flights into wa_flights.
    write:/ wa_flights-fldate,
    wa_flights-planetype,
    wa_flights-price currency wa_flights-currency,
    wa_flights-seatsmax,
    wa_flights-seatsocc.
    endloop.
    “BBB”
    *& Report  ZBADI_TEST                                                  *
    REPORT  ZBADI_TEST                              .
    tables: spfli.
    data: wa_spfli type spfli,
    it_spfli type table of spfli with key carrid connid.
    *Initialise the object of the interface.
    data: exit_ref type ref to ZCL_IM_IM_LINESEL,
    exit_ref1 type ref to ZIF_EX_BADISPFLI1.
    selection-screen begin of block b1.
    select-options: s_carr for spfli-carrid.
    selection-screen end of block b1.
    start-of-selection.
    select * from spfli into corresponding fields of table it_spfli
    where carrid in s_carr.
    end-of-selection.
    loop at it_spfli into wa_spfli.
    write:/ wa_spfli-carrid,
    wa_spfli-connid,
    wa_spfli-cityfrom,
    wa_spfli-deptime,
    wa_spfli-arrtime.
    hide: wa_spfli-carrid, wa_spfli-connid.
    endloop.
    at line-selection.
    check not wa_spfli-carrid is initial.
    create object exit_ref.
    exit_ref1 = exit_ref.
    call method exit_ref1->lineselection
    EXPORTING
    i_carrid = wa_spfli-carrid
    i_connid = wa_spfli-connid.
    clear wa_spfli.
    regards,
    Srinivas

  • Regarding the usage of HR_INFOTYPE_OPERATIONS function module in ECM badi i

    Hi All,
    We have requirement where we need to update the infotype 0015 while implementing the badi 'HRECM00_ACTIVATION'.
    To achieve this functionality we are calling the HR_INFOTYPE_OPERATION function module to update the infotype 15. But we are getting the runtime error.
    Can some one suggest how to solve this issue.
    Thanks & Regards,
    Sreelatha Gullapalli.

    thanx for ur reply...
    But i want to use Transmission Medium 5 only as i have the requirement to Send the data as an EMAIL or FAX depending on the Communication Method specified in the Partner Number.
    Actually SAP Help also explains the usage of this medium using the same requirement as mine... but then it never anywhere specified on how the Print Program will be...
    I also checked the standard output type CPAC used in Application V7 to which transmission medium 5 is assigned. And the print program assigned to this output type has no coding on sending the email using the FM. So i am very very confused.... I have seen few postings in this forum on this topic.. but not clear enuf to clarify my confusion...
    Kind Regards,
    Tanuja

Maybe you are looking for

  • How can i search and retrieve the first word ...

    How can i retrieve the FIRST or the SECOND word in a document stored in a file_datastore ? Thanks null

  • Image Transperancy in bitmapData

    Folloing are the excerpts of my code in AS2: I have image1 as and image2 on my stage. The image2 is a transparent GIF and works good transparantly when moved, roatated etc. this image2 is merged over image1 on a button click instance. Problem with th

  • Synchronizing Outlook Calendar with Phone -- Autom...

    Windows XP  SP3,  Outlook 2003, PC Suite 7.1.26.0, Nokia 6102i phone. So, I have the phone syncronization set-up to synchronize calendar 1 week prior and 2 months after. I had assumed that this would remove old appointments from the phone.  It does n

  • MM Q.

    Dear All, Pleae help me.... 1     What is the difference between Blanket Purchase Order and the Framework Order? 2     What is the difference between the stock transfer between two plants belonging to same company code and those belonging to differen

  • Installing EPM 11.1.1.3 on Solaris x64

    Hello Gurus, I am not able to install EPM 11.1.1.3 on Solaris x64. I am facing an issue while I execute installTool.sh. It gives me an error Cannot execute <filename> Could anyone please help. What are the steps that I need to keep in mind before doi