Dynamic action defalting IT0041 date specification

Hi., Every one
I am strucking up bringing default values to date specification (IT0041).
Requirement: Based on the Hiring date (ex: 1.1.2007) system should calcuate (adding 6months) the other date specification and should default in the date field.
If the Hiring date is 1.1.2007 system should default 1.7.2007 (adding 6 months) in the date specification field.
My configuration follows below:
0000                   04     332     P     T001P-MOLGA='40'
0000                   04     334     P     P0000-MASSN='I1'
0000                   04     338     I     INS,0019,Z0
0000                   04     339     W     P0019-TERMN=P0000-BEGDA
0000                   04     340     W     P0019-VTRAN='6'
0000                   04     341     W     P0019-VTRZH='012'
0000                   04     345     W     P0019-VTROP='+'
0000                   04     350     I     INS,0041,,,(P0000-BEGDA),(P0000-ENDDA)
0000                   04     352     W     P0041-DAR05='Z0'
0000                   04     354     W     P0041-DAT05=P0019-TERMN
I tried storing the value (1.7.2007) in IT0019, and tried default that value in IT0041 date specification., but its not working in that way..
Would appreciate your help., if any one fix this problem.
Madhu. K

Hi
Its very much possible i have done it in my earlier company you have to take the help of the abaper and guide him with your Actions codes and the day type codes.
Award points if helpful
Regards,
Bhupesh Wankar

Similar Messages

  • Dynamic action - Cache server data

    APEX 4.2.2
    Is there a way to cache server side data in a global (page/document level) Javascript vector (bunch of key-value pairs) (associative array, array of objects or some such)? This way the data can be used by subsequent dynamic actions' Javascript code without querying the server over and over.
    I see that apex_util.json_from_sql is still undocumented after all these years. Are there any examples of using that API to do this sort of thing? Can someone please share?
    Thanks

    https://apex.oracle.com/pls/apex/f?p=57688:24
    I took a shot at this and it seems to work well using Javascript global objects for data storage. Hope this helps someone.
    1. Page attributes - Javascript global variables var gData,gLookup={};2. On-demand application process Get_Emps as apex_util.json_from_sql('select empno,ename from emp');3. Page Load dynamic action to invoke the application process and cache the data var get = new htmldb_Get(null,$v('pFlowId'),'APPLICATION_PROCESS=Get_Emps',$v('pFlowStepId'));
    var retval=get.get();get=null;
    gData=apex.jQuery.parseJSON(retval);
    $.each(gData.row,function(i,obj){
       gLookup[obj.EMPNO]=obj.ENAME;
    });4. EMPNO page item - Standard OnChange dynamic action to SetValue of ENAME page item using the cached data - Javascript expression gLookup[$v(this.triggeringElement)]
    We document something when it is ready to be supported. This specific procedure isn't something we haven't invested in, and thus, per our discretion, have elected not to document or support it at this time.Fair enough.

  • 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

  • Date Specifications IT0041

    In my selection screen we're attempting to do a select on a specific date type in multiple columns however, with the unique structure of IT0041 if I select for instance 'Z9' in column 2, I may get 10 results. If I select for 'Z9' in column 3, I may get 20 results. If I select for 'Z9' in both positions my result is zero rather than a total of 30 since 'Z9' is not in both positions but in one OR the other hence my problem. Is there a way to search where 'Z9' is in column 2 OR column 3.....  rather than in column 2 AND column 3? Kind Regards.
    Edited by: Regan McCarthy on Jul 1, 2010 12:08 AM
    Edited by: Regan McCarthy on Jul 1, 2010 12:13 AM

    Hi,
    The feature DATAR is used to determine default date types whenever IT0041 (Date Specifications) is maintained. For example, you want date types 01(Benefit start date) and 02(Benefit term date ) to default when IT0041 is created for US employees. You would then use the feature and build decision tree like DATAR>MOLGA>10>01-02.
    The config. path is SPRO>Personnel Management>Personnel Administration>Evaluation Basis>Date Specifications>Determine default date specification.
    Like that way create one more date type in that table T548Y, and give the return values. While creating 0041IT , by default you can get the both date types.((Benefit start date, benefit term date ).
    Regards,
    Devi.

  • Dynamic action in infotype0000

    hi abapers
    I am using HR_MAINTAIN_MASTERDATA Fm to update 0000 infotype. can i use Dynamic action to update data of other infotypes?
    thanks
    Sachin

    hi Kumar Bandanadham
    by filling proposed values...then there will not be any dynamic action. the meaning of dynamic action will lost. Is it possible to have dynamic action when i am using Fm HR_MAINTAIN_MASTERDATA?
    thanks
    Sachin

  • 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

  • Date Picker with Dynamic Action

    Hi
    I have a situation where a DA is fired onchange of a date field using the apex 4 date picker item type.
    The DA does a number of calculations and database requests, so it can take a few seconds over our slow internet connection.
    While the DA is executing, the calendar remains displayed. The application demands that I display at least 1 or preferably 2 months as well as the current month to facilitate the user entry, which means much of the page is obscured. Not only would it be nice so see the various fields in multiple regions being updated progressively, it would also be reassuring for the user to see that the application has not "hung".
    Is this the expected behavior? Is there a technique to close the date picker before the DA actions are triggered?
    Thanks for your advice.
    CS

    Hi,
    Try this write a Zprogram for this.
    REPORT  Zget_date.
    TABLES : RP50D, PA0041, P0041, PA0019.
    PERFORM Z_date.                       "3CML Dynamic action for IT0000
    FORM Z_date.
      DATA: DATE1 LIKE SY-DATUM.
      DATA: DATE2 LIKE SY-DATUM.
      SELECT * FROM  PA0041
               WHERE  DAR01 EQ '11'
                AND PERNR  = P0041-PERNR
                AND BEGDA  = P0041-BEGDA.
        DATE1 =  PA0041-DAT01.
        DATE2 = DATE1 + 1.
        RP50D-DATE1 = DATE2.
        EXIT.
      ENDSELECT.
    ENDFORM.       
    and use this in your dynamic action.
    F Z_date(Zget_date)
    W P0041-DAT01=RP50D-DATE2
    Hope this will solve your problem.
    Regards,
    ARU

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

  • 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

  • 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 Actions - Date Specificatoins - Retirement date

    Hi Experts,
    can any one help me in Dynamic actoins i want to caliculate Retiremetn date automatically infotype 0041 - Date specificatoin one item called Retirement date to call this date type through feature DATAR i have updated the date type but to update the value in the field **************
    0002     04     01     P     *P0000-MASSN='HI'
    0002     04     02     P     *T001P-MOLGA='40'
    0002     04     03     I     *INS,0041,,,(P0000-BEGDA),(P0000-ENDDA)
    0002     04     212     W     *P0041-DAR04='16'
    0002     04     213     W     P0041-DAT04=************
    what i have to give the return value to be automatically caliculted and it should be updated in infotype 0041 - date specifications
    logic is Date of birth + 58 years  - hire date = Retirment date
    i dont have good knowledge in programming/techinical
    can any one can help in this

    Hi kumar,
    0002 04 01 P *P0000-MASSN='HI'
    0002 04 02 P *T001P-MOLGA='40'
    0002 04 03 F GET_DATE(ZPUDYN01)
    0002 04 04 I *INS,0041,,,(P0000-BEGDA),(P0000-ENDDA)
    0002 04 212 W *P0041-DAR04='16'
    0002 04 213 W *P0041-DAT04=RP50D-DATE1
    Requirement :
    The routine GET_DATE in programm ZPUDYN01 calculates the date and gives the value to field RP50D-DATE1. You could calculate the date at your own and also read other infotypes.
    REPORT ZPUDYN01.
    Here, we have routines called by dynamics measures (table t588z).
    TABLES: p0000, rp50d.
    DATA: data_pa LIKE p0000-begda.
    FORM get_date.
      PERFORM day_plus_years(sapfp500) USING p0000-begda
                                             1
                                             data_pa.
      rp50d-date1 = data_pa - 1.
    ENDFORM.                    "get_date
    Hope this helps
    Regards
    Bernd
    Message was edited by:
            Bernd Köhn

  • Concatenating data for field assignment in Dynamic Action

    In a dynamic action I am creating a record in a custom infotype.  In one of the custom infotype fields I need to assign a value of the number 28 concatenated with the personnel number.  The line in the dynamic action is
    W P9007-Z_INS_EE_PK = '28'&Pernr but the problem is I cannot get a concatenation to work.  How do you go about concatenating data together in a field assignment?

    Hi David,
    For this, you will have to write a small routine in a program and then call it in the dynamic action. Consult your technical team on this. Get them to write a routine which would concatenate the value and pass it to field RP50D-FIELD1. You would then call the routine and default the fields as shown below:
    F ZPROGRAM(Z_CONCATENATE)
    I INS,9007,,,
    W P9007-Z_INS_EE_PK=RP50D-FIELD1
    Here, ZPROGRAM is the name of the program and Z_CONCATENATE is the routine which would contain the logic to populate field RP50D-FIELD1 with concatenated value.
    Donnie

  • Row action event on data table does not occur when rows added dynamically

    Row action event on data table does not occur (only refreshes the page) when the rows in the data table are added dynamically at run time using button click and java bean.
    please tell me a way to catch the row click event when adding rows dynamically to data table. i m using RAD 6.0 to develop Faces jsp pages.
    thanks
    amit

    i got the answer

  • Help using a dynamic action to update tabular form items (specifically radio button) based on collection

    Hi Everyone, I have posted this question in the past and made huge progress with Denes Kubicek's help:  https://apex.oracle.com/pls/apex/f?p=31517:294:115851992029365::::: based on my earlier question posted: https://forums.oracle.com/forums/thread.jspa?threadID=2537494
    I am struggling with one item in my tabular form.  It is a radio button.  The choices all appear properly, but the value is not saved in the collection (and hence, not saved in the table).  All other items in the tabular form save properly.
    here is what I have for the query.   It is item c024 (which maps to ;'f03'), which is defined as a radio LOV based on an existing LOV.
    Currently I have:
    2 page items:
    P110_ID
    P110_VALUE
    Dynamic action called CHANGE COLUMN:
    event: CHANGE
    selection type: jQUERY Selector
    jQuery:
    jQuery Select = input[name='f03'],select[name'f08'],select[name='f09'],input[name='f10'],input[name='f11'],input[name='f12'],select[name='f40'],input[name='f21'],input[name='f22'],input[name='f23'],input[name='f50']
    event scope: Dynamic
    true action#1: set value P110_ID javascript expression this.triggeringElement.id
    true action#2: set value P110_VALUE javascript expression this.triggeringElement.value
    true action#3: execute pl/sql code
    declare
      v_member number;
      v_seq number;
    begin
      v_member := TO_NUMBER (SUBSTR (:p110_id, 2, 2));
      select ltrim(substr(:p110_ID,5,4),'0') into v_seq from dual;
      safis_collections.update_column(v_seq,
                                    v_member,
                                    :p110_value);
    true ation#4 refresh region :LANDINGS_COLLECTION
    the tabular form is based on the query:
    SELECT
    apex_item.text(1,seq_id,'','','id="f01_'||seq_id,'','') "DeleteRow",
    seq_id,
    seq_id display_seq_id,
    apex_item.text_from_LOV(c004,'SPECIES')||'-'||apex_item.text_from_LOV(c005,'GRADE')||'-'||apex_item.text_from_LOV(c006,'MARKETCODE')||'-'||apex_item.text_from_LOV_query(c007,'select unit_of_measure d, unit_of_measure r from species_qc') unit,
    apex_item.select_list_from_LOV(8,c008,'DISPOSITIONS','onchange="getAllDisposition('||seq_id||')"','YES','0','  -- Select Favorite --  ','f08_'||seq_id,'') Disposition,
    apex_item.select_list_from_LOV(9,c009,'GEARS','style="background-color:#FBEC5D; "onFocus="checkGearPreviousFocus('||seq_id||');"onchange="getAllGears('||seq_id||')"','YES','3333','-- Select Favorite --','f09_'||seq_id,'') Gear,
    apex_item.text(10,TO_NUMBER(c010),5,null, 'onchange="setTotal('||seq_id||')"','f10_'||seq_id,'') Quantity,
    apex_item.text(11,TO_NUMBER(c011),5,null,'onchange="getPriceBoundaries('||seq_id||')"','f11_'||seq_id,'') Price,
    apex_item.text(12, TO_NUMBER(c012),5,null, 'onchange="changePrice
    ('||seq_id||')" onKeyDown="selectDollarsFocus('||seq_id||',event);"','f12_'||seq_id,'') Dollars,
    decode(c013,'Y',apex_item.text(14, c014,30,null,'style="background-color:#FBEC5D;" onClick="onFocusAreaFished('||seq_id||');"','f14_'||seq_id,''),'N','N/A') Area_Fished,
    decode(c017,'Y',apex_item.text(18, c018,4,null,'style="background-color:#FBEC5D; "onBlur="setUnitQuantity('||seq_id||')"','f18_'||seq_id,''),'N','N/A') UNIT_QUANTITY,
    decode(c017,'Y',apex_item.text(19,'CN',3,null,'readOnly=readOnly;','f19_'||seq_id,''),'N','N/A') UNIT_COUNT,
    c024 hms_flag,
    decode(c050,'Y',apex_item.checkbox(21,'Y','id="f21_'||seq_id||'" style="background-color:#FBEC5D; " onClick="alterYes('||seq_id||');" onKeyPress="alterYes('||seq_id||');"',c021),'N','N/A') FinsAttached,
    decode(c050,'Y',apex_item.checkbox(22,'N','id="f22_'||seq_id||'" style="background-color:#FBEC5D;" onClick="alterNo('||seq_id||');" onKeyPress="alterNo('||seq_id||');"',c022),'N','N/A') FinsNotAttached,
    decode(c050,'Y',apex_item.checkbox(23,'U','id="f23_'||seq_id||'" style="background-color:#FBEC5D;" onClick="alterUnk('||seq_id||');" onKeyPress="alterUnk('||seq_id||');"',c023),'N','N/A') FinsUnknown,
    decode(c050,'Y',apex_item.textarea(28,c028,3,null,null,'f28_'||seq_id,''),'N','N/A') Explanation,
    decode(c024,'N',apex_item.select_list_from_LOV(29,c029,'HMSNATURE','onchange="saveNature('||seq_id||')"','YES','A','-- Select Nature of Sale --','f29_'||seq_id,''),'U',apex_item.select_list_from_LOV(29,c029,'HMSNATURE','onchange="saveNature('||seq_id||')"','YES','A','-- Select Nature of Sale --','f29_'||seq_id,''),'Y','N/A') Nature_Of_Sale,
    decode(c020,'Y',
    apex_item.select_list_from_LOV(40,c040,'HMS_AREA_CODE','style="background-color:#FBEC5D;"',null,null,null,'f40_'||seq_id,''),
    'N','N/A') HMS_AREA_CODE,
    c020,c050,
    decode(c020,'Y',
    apex_item.text(41,TO_NUMBER(c041),5,null,null,'f41_'||seq_id,''),
    'N','N/A') Sale_Price
    from apex_collections
    where collection_name = 'SPECIES_COLLECTION' order by seq_id
    I have noticed the following:
    when I change column C011 (price) the following values are set in the dynamic action:
    P110_ID = f11_1
    P110_VALUE = whatever I change the price to.
    when I change the column C024 (hms_flag), the following values are set:
    P110_ID = f03_0001
    P110_VALUE = whatever I change hms_flag to.
    the region is refreshed in my dynamic action, and the change for hms_flag does not hold.  I have tested the SQL query that generates the value for v_SEQ in the dynamic action.   In both a change to price and HMS_FLAG it appears valid
    select ltrim(substr(:p110_ID,5,4),'0') into v_seq from dual;
    if f11_1, v_seq:= 1
    if f03_0001, v_seq := 1
    thank you!

    solved.  sort of. 
    field c024 references f03.
    the Dynamic ACtion, step 4 calculates v_member by taking a substring of P110_ID...and in all other fields, the column and the field (fxx) are the same value....except for c024.
    I am not certain exactly how to resolve, but see the problem.

Maybe you are looking for