Dynamic action on IT0035 to create data in IT0171 - URGENT

Dear HR-ABAP Gurus
I am new to HR Programming and I am in a situation to achieve the following.
Through a subroutine pool program ZSUBPGR:
1. Based on the personnel number, start date and end date of the IT0035 subtype ‘9SOP’ created, program shall retrieve the corresponding IT0171 records.
If records are found, they need to go into an internal table.
2. Determine the start and end dates of IT0171 records, which overlap with the IT0035 period. Once determined, proceed to create the IT0171 records changing P0171-BENGR of the record to ‘OVRS’ for the overlapped period.
This will end in creation of records in IT0171.
Please help me out by giving some valuable guidelines/sample code towards its resolution at your earliest.
Thanking you guys in advance... Cheers

Thanks a lot
Do you have any sample code that might be of any help in writing the subroutine?
It will be very much appreciated.
Thanks

Similar Messages

  • Dynamic action on IT0035 to create data in IT0171

    Dear HR-ABAP Gurus
    I am new to HR Programming and I am in a situation to achieve the following.
    Through a subroutine pool program ZSUBPGR:
    1. Based on the personnel number, start date and end date of the IT0035 subtype ‘9SOP’ created, program shall retrieve the corresponding IT0171 records.
    If records are found, they need to go into an internal table.
    2. Determine the start and end dates of IT0171 records, which overlap with the IT0035 period.  Once determined, proceed to create the IT0171 records changing P0171-BENGR of the record to ‘OVRS’ for the overlapped period.
    This will end in creation of records in IT0171.
    Please help me out by giving some valuable guidelines/sample code towards its resolution at your earliest.
    Thanking you guys in advance... Cheers

    Thanks a lot
    Do you have any sample code that might be of any help in writing the subroutine?
    It will be very much appreciated.
    Thanks

  • Dynamic action with set value on date field

    Hi,
    I'm using APEX 4.02
    I'm trying to calculate the age based on the date of birth dynamically on a form. I'm trying to do this with a (advanced)dynamic action with set value.
    I'm able to get this kind of action working based on a number field etc, but NEVER on a date field.
    I've read all posts on this subject but so far no solution. Even if I try to simply copy the value over to another date field or typecast it to a string ( to_char function ) it does not work. So for me the problem seems to be in the source field being a date field.
    I've tried using the source value as is in a select statement :
    select :P33_GEBOORTEDATUM from dual;
    and also type casted based on the date format :
    select TO_DATE(:P33_GEBOORTEDATUM,'DD-MON-YYYY') from dual
    but still no luck.
    On the same form I don't have any issues as long as the calculation is based on number fields, but as soon as I start using dates all goes wrong.
    Any suggestions would be greatly appreciated. If you need any extra info just let me know.
    Cheers
    Bas
    b.t.w My application default date format is DD-MON-YYYY, maybe this has something to do with the issue .... ?
    Edited by: user3338841 on 3-apr-2011 7:33

    Hi,
    Create a dynamic action named "set age" with following values.
    Event: Change
    Selection Type: Item(s)
    Item(s): P1_DATE_OF_BIRTH
    Action: Set value
    Fire on page load: TRUE
    Set Type: PL/SQL Expression
    PL/SQL Expression: ROUND( (SYSDATE - :P1_DATE_OF_BIRTH)/365.24,0)
    Page items to submit: P1_DATE_OF_BIRTH
    Selection Type: Item(s)
    Item(s): P1_AGE
    Regards,
    Kartik Patel
    http://patelkartik.blogspot.com/
    http://apex.oracle.com/pls/apex/f?p=9904351712:1

  • Dynamic Actions not firing when using date picker?

    The dynamic actions don't seem to be triggering when selecting a date from the date picker, but trigger just fine when the dates are manually entered. Anyone else have this problem and if so is there a workaround to get it to work from the date picker as well? I am using Application Express 4.0.1.00.03
    And how can I report this problem?

    I'm already using Change.
    If it matters, I have it set to:
    Event: Select
    Selection Type: Item
    Condition: No Condition
    My action type is just an alert right now since all I want to do is to see if I can trigger it (as in you have to walk before you can run).
    Event Scope: Live
    Conditon type: Dynamic Action not Conditional
    Authorization Scheme: No Authorization Required

  • Dynamic Action On Date Picker

    Hi,
    I need help with understanding dynamic actions. I have two date pickers, I want the value of the first date picker to be the minimum date of the second date picker. To achieve this I have a hidden item whose value I want to reflect the selected date in the required format. In the dynamic action on the date picker I have no condition, and the true action is set to execute the following pl/sql code
    :P200220000_Y_MIN_DT := TO_CHAR(TO_DATE(:P200220000_Y_STR, 'DD-MON-YYYY'), 'YYYYMMDDHH24MI');. The items to submit field contains both the first date picker and the hidden item.
    The "P200220000_Y_MIN_DT" is now passed into the minimum date field of the second date picker. The problem is when the date is changed the hidden item does not get the value until the page is refreshed.
    Am I doing something wrong or just have not mastered the use of dynamic action or are my colleagues right use AJX call backs not dynamic actions.
    Thanks
    Aderemi

    Hi Aderemi,
    first of all as already explained, the min/max values are already used on the server side when the necessary code for the date picker is rendered. When you changed the referenced values in the browser, these values will not change the behavior of the client side date picker widget. But when you submit the page, the new min/max values will be used by the date picker validation check on the server.
    To over the client side date picker display issue, you could directly call the date picker JavaScript code and pass in the new min/max values. Have a look at http://jqueryui.com/demos/datepicker/
    So for example you could have a dynamic action of type "Execute JavaScript code" which executes the following Javascript code.
    apex.jQuery('#P200220000_MY_DATE_PICKER').datepicker("option", "minDate", "-1m");I think that should work. Note: I haven't tested if that really works and it's also some kind of unsupported, because it uses the underlaying jQueryUI APIs the APEX date picker is using. This could change in the future and would invalidate your code.
    Regards
    Patrick
    My Blog: http://www.inside-oracle-apex.com
    APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins

  • In HR ABAP WHAT IS DYNAMIC ACTIONS? GIVE ME ONE EXAMPLE?

    DEAR EXPERTS
    in HR ABAP WHAT IS DYNAMIC ACTIONS? GIVE ME ONE EXAMPLE?

    Dynamic actions are nothing but calling one more Infotype when trying to Create/Change or Delete a perosnnel number.
    Lets take an example company want that whenever an employee Communication data Fax/mobile no entered then immediately they want to make their email IDs depending upon VORNA NACHN of the personnel numbers data.Then at this point they will configure dynamic actions.But as a technical consultanat u will be given a Program name and the subroutine name in which u need to write the coding.
    Dynamic actions are a great tool to make infoytpe maintenance easier. When you create an infotype you can create another one automatically for example. Dynamic actions work for both master data and applicant data infotypes. It is basically a view on table T588Z you can reach via IMG - Personnel management - Personnel administration - Customize procedures - Dynamic actions.
    The table view looks like this:
    Infotype - Subtype - Field - Function code - Number - Step - Variable function part
    The infotype, subtype and field determine what should be created, filled, modified and so on. 
    The function code determines when something should happen. It can have the following values:
        * 02 - Change record
        * 04 - Create record
        * 08 - Delete record
    These values can be added so e.g. 06 means change record + create record. Remember - this only tells us when something should be done.
    The number simply tells us which step is first and which next. I recommend to go by 10's (10, 20, 30,40...), this makes it easier if you later on want to fill something in.
    The step determines what should be done. It can have 6 values:
        * P - check conditions under which something is done
        * I - maintain infotype record
        * W - set default values for new record
        * V - Reference to another step
        * F - call a routine
        * M - send mail
    Reward if found Helpful

  • Executing Dynamic actions in Background???

    Hello Experts,
    We have a requirement where we need to automate PA40. The data would be sent in csv file and we need to perform the required steps to insert data into Infotypes.
    The issue is in batch mode (background mode), the dynamic actions wouldn't be called and the business wants the dynamic actions to be considered as well.
    Pls let me know if there is any way we can interpret the dynamic actions dynamically; meaning the prog should be able to handle the newly created dynamic actions as well.
    Any pointers to this are highly appreciated.
    Regards
    RK

    Hello Raj;
    In documentation of  Dynamic Actions it is written so:
    Note on creating a batch input session:
    Dynamic actions are not processed in a batch input session.
    In batch input, you must specify the exact sequence of the screens. To
    ensure this is the case, you must have already programmed the dynamic
    action checks before you create the batch input session.
    To avoid errors only the static actions are processed when you program
    and process a session. Infotypes that usually only appear in the system
    as a result of a dynamic action should be updated by calling up the
    transaction separately.
    Hope this can help you,
    Regards.
    Okan

  • Dynamic actions in HR

    Hi,
    I created implementation for BADI HRECM00_CP2GP.
    Also in configuration dynamic action is set to create IT 0758. this dynamic action will be triggered in case of hire, rehire and change in position actions.
    Now the problem i am facing is.
    I hired a new associate based on some position(say.position 1). Dynamic action is triggered as expected and IT 0758 record also got created with CPGR2 = ABC(ABC is some client specific value which is selected from the logic implemented in my badi. )
    So a IT 0758 record is created with CPGR2 = ABC.
    Till here everything is fine.
    Then i terminated this associate.
    Then i run rehire action with some different position( say . position 2).
    So as expected my badi implementation got triggered. Logic worked fine. Badi returned CPGR2 = DEF(DEF is again a client specific value based on logic in BADI implementation). IT 0758 record got created.
    But here is the problem: When badi returned cpgr2 = DEF than IT 0758 record should have created with CPGR2 = DEF. But instead of this , IT 0758 record got created with CPGR2 = ABC( as it was in previous record. ) .
    But if i try to do this in screen mode. Means i go to PA30, create IT 0758 record from there. Here the same badi is invoked with correct parameters and the new record is created with correct value DEF. 
    I am not able to understand why 758 record is created wrongly in dynamic action mode where as in screen mode it is working fine.
    Is it the problem with badi implementation or some configuration problem ?

    METHOD if_ex_hrecm00_cp2gp~read_feature_cp2gp.
    if condition.
    cpgr2 = ABC
    else.
    cpgr2 = DEF.
    endif.
    ENDMETHOD.
    configuration in system :
                                   06    700         *** CREATE IT0758 FOR HIRE/REHIRE ACTION ***
                                   06    715   I     COP,0758,,,(P0000-BEGDA),(P0000-ENDDA) /D
    PERSG                          06    500         *** CREATE IT0758 FOR CIP/ORG REASSNG/STATUS CHANGE ACTION ***
    PERSG                          06    525   I     INS,0758,,,(P0000-BEGDA),(P0000-ENDDA)
    PERSK                          06    200         *** END OF SALARIED CONTRACTOR - CREATE IT 0758 ***
    PERSK                          06    250   I     INS,0758,,,(P0001-BEGDA),(P0001-ENDA) /D

  • Dynamic Actions for Rehire

    Hi All:
    I've been trying to write a dynamic action to take the termination date from infotype 0041 and based on that data change the benefit eligibility date and rehire date on infotype 0041.
    Can anyone explain how can this be done?
    Thanks
    Venkat

    Hi Raj,
    There's no dynamic action functionality for PD.
    Instead you can use user exits & BADIs.
    Pls check the following thread:
    https://forums.sdn.sap.com/click.jspa?searchID=14814870&messageID=4494628
    Regards,
    Dilek

  • Refresh pl/sql anonymous block via dynamic action?

    Greetings again to the community!
    Something I must be misunderstanding.
    I want to dynamically (ajax) update a select list depending on a page item. Now when you research for operations like this, you get some examples - but which mostly are older and... contain a lot of coding. So I am wondering if this is to be achieved in a simple way using dynamic action.
    I have created a testcase here where the html for a select list ist created in a pl/sql anonymous block like that:
    begin
    for i in (select EMPNO, ENAME from EMP
            where DEPTNO = :P50_DEP_NO or
                     :P50_DEP_NO is null)
          loop
      htp.p('<option value="' || i.EMPNO || '">' || i.ENAME || '</option>');
      end loop;
    end;Region header and footer contain the tags for <select id="selEmps"> ... </select>.
    When you press [Btn Update Sel], a dynamic action is triggered, that submits :P50_DEP_NO, then refreshes the region with the pl/sql code, so that, after you have enteres another value in :P50_DEP_NO, the select list then shows the employees of that department. Thats the plan, but
    Its not working! Can anyone tell me, what I have overlooked here, please?
    Thank you and good night for now,
    tobi

    Hi Marko,
    thanks for your hint. I have already tought about that, but im not sure if this is the solution of this particular situation, because the list really should be generated html-code for formating reasons with jQuery UI and further processing. But I have not worked so much with cascading LOVs, so I really should look into it further.
    If I dont find a solution there, I'll get back here.
    Thanks and so long,
    tobi

  • TRIGGERING DYNAMIC ACTIONS THROUGH PROGRAM

    Hi Experts ,
    I would like to know is it possible to trigger the dynamic actions through program.
    Please explain me the details.
    Thank you.

    As far as i know ,Dynamic Actions dont trigger in Batch Input Session. So what you can do is modify your batch input program so that it handles the same checks and logic that you configured in the T588z table.
    This is the documentation from SAP.
    Note on creating a batch input session:
    Dynamic actions are not processed in a batch input session.
    In batch input, you must specify the exact sequence of the screens. To ensure this is the case, you must have already programmed the dynamic action checks before you create the batch input session.
    To avoid errors only the static actions are processed when you program and process a session. Infotypes that usually only appear in the system as a result of a dynamic action should be updated by calling up the transaction separately.

  • Dynamic actions - how to create an infotype with a date - 1 day.

    Hi everyone,
    I need a requirement to change an infotype through dynamic action with ENDDA = BEGDA of maintaned infotype(0000) - 1 day.
    In other words when a  personel action is performed, another infotype (2001) should appear for change, and in the validity period of this infotype should end with the day before the start of the personel action.
    is it possible to achieive this using dynamic actions? how?
    Thanks!
    Stanislaw Adamski

    Hi Adamski,
    A dynamic action has the following components.
    Infotype Number (INFTY): specifies the infotype for which you want the dynamic action triggered
    Subtype (SUBTY): narrows the focus to a specific subtype
    Field Name (FIELDN): starts your action when a maintenance function is performed on a particular field
    Function (FC): specifies the various maintenance operations to which your dynamic action would respond. They are 02 (change); 04 (create); 06 (create and change); 08 (delete); 10 (change and delete); 12 (create and delete). Dynamic actions are only applicable in maintenance operations, not in display functions.
    Sequence Number (NO): refers to a sequential number.
    Step (A): specifies a particular type of action. No dynamic action is executed if the function character has a value other than one of the following:
                 P: Plausibility checks, which allow you to check certain conditions.          
                 I: Calls an infotype for processing
                 W: Called after the I statement and used to assign values to screen fields while creating or copying another infotype record through the I statement 
                  F: Calls a FORM routine (subroutines in ABAP) during your action. The routine may reside in or out the module pool MPNNNN00.
                 V: Lets you treat collectively a number of fields for which you want to define a common dynamic action
                  M: Sends SAP Office mail
    Variable function part: The variable function part along with the step indicator forms the core part of your action. It specifies the processing details when the dynamic action is triggered. For example: 
    you have to look for the scenario what you are planning tyo create .
    The maintenance of dynamic actions is done via the view V_T588Z, as shown in 1 (IMG menu path Personnel Management>Global Settings in Personnel Management>Basic Settings>Infotypes>Create Dynamic Actions
    Here you havev to use conditions INS for the infotype what you want to create..
    Please brief the light on the scenario.
    Warm Regards,
    Kapil Kaushal

  • Unable to create a dynamic action ALERT to be generated on a Select List when particular value is selected.

    Hi everyone, this should be so easy, yet I am stuck.
    I have a form region with an item P110_VESSEL_ID.   This item is a select list.   It is based on the query: 
    select distinct v.vessel_name, v.vessel_id
    from vessels vessels v, frequent_fishermen ff
    where ff.dea_permit_id = :G_PERMIT_ID and
    ff:vessel_id = v.vessel_id
    UNION
    select v.vessel_name, v.vessel_id
    from apex_collections a, vessels v
    where collection_name = 'SUPVES_COLLECTION' and
    a.c002 = v.vessel_id
    If the user decides against the values in the select list query, they may opt to SELECT ALL VALUES.  This SELECT ALL VALUES is a POST ELEMENT TEXT on P110_VESSEL_ID.
    <a id="popVessels" href="#"><font color=blue>Select from ALL Vessels</a>
    This all works fine.
    The issue is that when the user selects a vessel name = 'UNKNOWN' and it's corresponding vessel_id value, I would like an ALERT to appear indicating that they should double check that the vessel is UNKNOWN and not that the is no vessel. 
    I created a dynamic action
    event= change
    select type = item
    item = P110_VESSEL_ID
    True ACtion #1 is the ALERT.
    I currently have no other logic, but cannot even get this to work.  Any thoughts.   I have also tried the SELECT TYPE = jQuery Selector = select[name='P110_VESSEL_ID'] but that does not work either (though I am not certain if the value should be P110_VESSEL_ID or the static name of VESSEL_ID).
    Any help is appreciated.
    ps.  the page is not submitted when the vessel is changed.  There is other data that needs to be entered both in this region and others and many validations run when submit, so the submit would not be an option.
    thanks again,
    Karen

    KarenH,
    KarenH wrote:
    I created a dynamic action
    event= change
    select type = item
    item = P110_VESSEL_ID
    True ACtion #1 is the ALERT.
    This should work.  Sometimes I've see where there is other javascript on the page that may have some errors and is causing the dynamic action code to not be executed.  Use your favorite browser script console to try and determine if this may be the case.
    --Jeff
    P.S. Your jQuery selector can be: select#P110_VESSEL_ID

  • Adding period to a date in Dynamic action

    Hi Gurus,
    We have a requirement where we need to create a IT2010 with a start date less than the action date.
    For E.g If action is run on 02.07.2011 then IT 2010 should be created with 01.07.2011.
    Please help.

    Create program that can be called as a routine in Dynamic Action (table V_T588Z)
    1.    Within the dynamic action, the routine (ZXXXX) will be called (Configured by the functional consultant) with the GETDATE subroutine:
    P2010-BEGDA=RP50D-DATE1
    2.     In the program, we need to minus 1 from the hire date.
    Program     ZXXXX
    Tables : P0000, rp50d
    Form getdate
          Rp50d-date1 = p0000-begda u2013 1
    Endform

  • Get infotype data in e-mail/sapscript - Dynamic action-

    Hello,
    we developed a dynamic action sending a mail if an employee leave the company.
    We can catch data in infotype 0000 and 0001 in the sapscript used in the mail, but we would like also fetch data from other infotypes.
    We tried to generate an ABAP code from an ad hoc query, but it was impossible to get the return tables in the sapscript.
    Are there other solutions to get infotype data in saps scripts?
    Kr,

    Hi ,
    you can follow the below solution .
    1. Create a custom report for the leaving/terminated employees by using the action in infotype 0000 with field massn, massg.
    2. you will get all the employees from table pa0000 who are laving between a date interval .
    3. by using the personnel numbers from pa0000 get other infotypes information.
    4. create a smartform/script for your requirement.
    5. using the program you can send the data to the employees.
    another way .
    if you know the name of the script you can create some variables for the other fields from other infotypes in that script and you can populate the variable values using perform in program command using a custom program in that script.

Maybe you are looking for