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

Similar Messages

  • 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

  • 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

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

  • 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

  • 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

  • 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

  • Adding 21 periods to a date

    Hi all,
    I have a date say ,2-22-2007.I am following fiscal calendar.I want to add 21 periods to this date ....how to add 21 periods to the date .......can anyone tell
    your help will be appreciated...

    Hi,
    You can use FM RP_CALC_DATE_IN_INTERVAL.
    data: wa_date  like sy-datum.
    *Add 21 days to current date.
    call function 'RP_CALC_DATE_IN_INTERVAL'
             exporting
                  date      = sy-datum
                  days      = 21
                  months    = 0
                  signum    = '+'
                  years     = 0
             importing
                  calc_date = wa_date.
    write: / wa_date.
    <b>Reward points if useful</b>
    Regards
    Ashu

  • HR - Dynamic action is data saved in table ? is pernr locked ?

    hi,
         I am using a dynamic action to calculate may values,
    to calculate those values i am in need of all the values present on the screen of custom infotype, but due to some problem , i will have only pernr with me . dynamic action will trigger a report program which inturn will trigger one more report program in the second report program , if i use select queries , will i get those values which was stored in the infotype while my dynamic action triggerred ?
    ot those are still to be saved in database table ?
    is the pernr is locked by the infotype while i am in my second report program ?

    the pernr will be locked but will not prevent you from READING other infotype records in your report.. You can use HR_READ_INFOTYPE function module to access the other infotype records..
    ~Suresh

  • Dynamic action on LOV using tabular form

    Hello,
    I realize this has likely been dealt with somewhere already, but I'm going to ask anyway.
    I have a master/detail form. The detail form has an option to add rows. I have created a dynamic action as defined below...
    True Action:
    Sequence: 10
    Action: Javascript Expression
    Fire On Page Load: No
    Code: $(this.triggeringElement ).val()
    Sequence: 20
    Action: SQL Statement
    Fire On Page Load: No
    Code: select travel_status from territories_summary_v where territory_code=:P3_FIND_COUNTRY_CODE and language='US';
    Sequence: 30
    Action: Javascript Expression
    Fire On Page Load: No
    Code: $(this.triggeringElement).closest("tr").find("td[headers='TRAVEL_STATUS_CODE'] input").val($v('P3_FIND_COLOR'));
    The P3_FIND_COLOR and P3_FIND_COUNTRY_CODE are defined as hidden fields.
    This DA seems to partially work. It will update the travel status code with the proper value for each line. I can see it on screen. But when I apply changes it doesn't save this particular value to the database. If I physically go to the field and type something in, it will save this field. All other values save ok... just not this column .. regardless of the number of detail lines.
    Further to this, when I add a row and a new blank row appears, if I change the country, the DA does not fire at all. I've put an alert in on sequence 10 and the alert will fire for a pre-existing row in the table... but not a new row. I would have thought that because it's an onChange DA associated with the country code, it would work for each new row regardless of how many rows are added or whether its a new row vs existing row.
    So the first issue is why it won't save the data that is populated in travel status code when I can clearly see it there? Secondly, why this DA is not firing when I add a new row?
    If anyone can help me it would be appreciated. I've done a lot of searches but have not come up with much where these issues are concerned.

    There is no way to make a good guess on this without an example. It is hard to say what the reason could be.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.apress.com/9781430235125
    https://apex.oracle.com/pls/apex/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • Dynamic action on File browse change event

    Hi Experts,
    apex version 4.1
    This is what i'm trying to do..
    i have a file browse control and a text field. when user selects a file, selected fiel's name (without file type extension) should be set to text field.
    I tried adding a dynamic action to file browse control's change event and within pl/sql Set Value logic i queried the wwv_flow_files and tried to return the file name it didn't work. i got no data found error. i assumed file is being inserted into wwv_flow_files when a page submission happens.
    In my second approach within the SetValue pl/sql logic i got the file browser control's (by directly accessing field, not by querying wwv_flow_files)value and did some string manipulation and tried to return only the file name. yet i got the same no data found error.
    Any idea how can i implement this ?
    Thanks in advance.
    - kurubaran

    Hi,
    I think PL/SQL approach will not work before you submit data to database.
    Have you think use $v function to get value from file browser?
    http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21676/javascript_api.htm#BGBGDGIH
    Regards,
    Jari
    My Blog: http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0
    Twitter: http://www.twitter.com/jariolai

  • Dynamic Actions-Manoj Kumar

    Hi Manoj
    My Program is
    REPORT z250_send_mail.
    TABLES: DRAD,
    QINF,
    DRAW,
    SOUC,
    SOFD,
    DRAP.
    DATA: P_RETURN_CODE LIKE SY-SUBRC.
    data: d_username LIKE DRAP-PRNAM.
    mail declarations
    DATA : BEGIN OF NEW_OBJECT_ID. " the newly created email object
    INCLUDE STRUCTURE SOODK.
    DATA : END OF NEW_OBJECT_ID.
    DATA : BEGIN OF FOLDER_ID. " the folder id of the outbox
    INCLUDE STRUCTURE SOODK.
    DATA : END OF FOLDER_ID.
    DATA : BEGIN OF REC_TAB OCCURS 5. " the table which will contain the
    INCLUDE STRUCTURE SOOS1. " information on the destination
    DATA : END OF REC_TAB.
    DATA : BEGIN OF OBJECT_HD_CHANGE. " the table which contains the
    INCLUDE STRUCTURE SOOD1. " info for the object we will be
    DATA : END OF OBJECT_HD_CHANGE. " creating
    DATA : OBJECT_TYPE LIKE SOOD-OBJTP. " the type of object
    DATA : BEGIN OF OBJHEAD OCCURS 5. " the header of the object
    INCLUDE STRUCTURE SOLI.
    DATA : END OF OBJHEAD.
    DATA : BEGIN OF OBJCONT OCCURS 0. " the contents of the object
    INCLUDE STRUCTURE SOLI. " i.e. the text etc
    DATA : END OF OBJCONT.
    DATA : BEGIN OF OBJPARA OCCURS 5. " formatting options
    INCLUDE STRUCTURE SELC.
    DATA : END OF OBJPARA.
    DATA : BEGIN OF OBJPARB OCCURS 5. " formatting options
    INCLUDE STRUCTURE SOOP1.
    DATA : END OF OBJPARB.
    DATA : BEGIN OF T_MAIL_TEXT OCCURS 0, "Message table for messages to
    STRING(255), "user via mailbox
    END OF T_MAIL_TEXT.
    Parameter: p_uname like sy-uname default 'kaav07'.
    **START-OF-SELECTION
    START-OF-SELECTION.
    d_username = p_uname.
    PERFORM POPULATE_EMAIL_TEXT.
    PERFORM SETUP_TRX_AND_RTX_MAILBOXES USING P_RETURN_CODE.
    PERFORM CREATE_AND_SEND_MAIL_OBJECT.
    FORM POPULATE_EMAIL_TEXT *
    Inserts text for email message *
    FORM POPULATE_EMAIL_TEXT.
    CLEAR T_MAIL_TEXT-STRING. "puts a blank line in
    APPEND T_MAIL_TEXT.
    APPEND T_MAIL_TEXT.
    adds failed list on to end of success list.
    T_MAIL_TEXT-STRING = 'Test email message line 1'.
    APPEND T_MAIL_TEXT.
    T_MAIL_TEXT-STRING = 'Test email message line 1'.
    APPEND T_MAIL_TEXT.
    CLEAR T_MAIL_TEXT-STRING. "puts a blank line in
    APPEND T_MAIL_TEXT.
    T_MAIL_TEXT-STRING = 'Header1 Header2 Header3'.
    APPEND T_MAIL_TEXT.
    T_MAIL_TEXT-STRING = '----
    APPEND T_MAIL_TEXT.
    ENDFORM.
    *& Form SETUP_TRX_&_RTX_MAILBOXES
    Ensure that the mailboxes of the sender (INTMGR) are set up OK
    FORM SETUP_TRX_AND_RTX_MAILBOXES USING P_RETURN_CODE.
    get the user no of the sender in order to add the mail to the
    user name's outbox for future reference
    SELECT SINGLE * FROM SOUC
    WHERE SAPNAM = SY-UNAME. "SAP name of a SAPoffice user
    IF SY-SUBRC NE 0.
    "Error finding the SAPoffice user info for the user
    MESSAGE E064(ZR53) WITH SY-UNAME.
    P_RETURN_CODE = 1.
    EXIT.
    ENDIF.
    *Get the outbox No for the sender from the user No where the folder
    " type is an outbox
    SELECT * FROM SOFD WHERE OWNTP = SOUC-USRTP "Owner type from ID
    AND OWNYR = SOUC-USRYR "Owner year from the ID
    AND OWNNO = SOUC-USRNO "Owner number from the I
    AND FOLRG = 'O'."Output box
    ENDSELECT.
    IF SY-SUBRC NE 0.
    " Error getting folder information for the user
    MESSAGE E065(ZR53) WITH SY-UNAME.
    P_RETURN_CODE = 1.
    EXIT.
    ENDIF.
    ENDFORM. " SETUP_TRX_&_RTX_MAILBOXES
    *& Form CREATE_AND_SEND_MAIL_OBJECT
    FORM CREATE_AND_SEND_MAIL_OBJECT.
    FOLDER_ID-OBJTP = SOFD-FOLTP. " the folder type ( usually FOL )
    FOLDER_ID-OBJYR = SOFD-FOLYR. " the folder year ( usually 22 )
    FOLDER_ID-OBJNO = SOFD-FOLNO. " the folder no.
    OBJECT_TYPE = 'RAW'. " the type of object being added
    build up the object information for creating the object
    OBJECT_HD_CHANGE-OBJLA = SY-LANGU. " the language of the email
    OBJECT_HD_CHANGE-OBJNAM = 'PS to DM Interface'. " the object name
    mail subject 'Mass Linking of QA, pass/fail'
    MOVE TEXT-002 TO OBJECT_HD_CHANGE-OBJDES.
    OBJECT_HD_CHANGE-DLDAT = SY-DATUM. " the date of the email
    OBJECT_HD_CHANGE-DLTIM = SY-UZEIT. " the time of the email
    OBJECT_HD_CHANGE-OBJPRI = '1'. " the priority ( highest )
    OBJECT_HD_CHANGE-OBJSNS = 'F'. " the object sensitivity
    F is functional, C - company sensitive
    object_hd_change-skips = ' '. " Skip first screen
    object_hd_change-acnam = 'SM35'. " Batch imput transaction
    object_hd_change-vmtyp = 'T'. " Transaction type
    add the text lines into the contents of the email
    CLEAR OBJCONT.
    REFRESH OBJCONT.
    free objcont. " added this to delete the mail contents records
    LOOP AT T_MAIL_TEXT.
    OBJCONT-LINE = T_MAIL_TEXT-STRING.
    APPEND OBJCONT.
    ENDLOOP.
    CLEAR OBJCONT.
    build up the table of receivers for the email
    REC_TAB-RCDAT = SY-DATUM. " the date to send the email
    REC_TAB-RCTIM = SY-UZEIT. " the time to send the email
    the SAP username of the person who will receive the email
    REC_TAB-RECNAM = D_USERNAME.
    the user type of the person who will send the email ( USR )
    REC_TAB-SNDTP = SOUC-USRTP.
    the user year of the person who will send the email ( 22 )
    REC_TAB-SNDYR = SOUC-USRYR.
    the user number of the person who will send the email
    REC_TAB-SNDNO = SOUC-USRNO.
    the sap username of the person who will send the email
    REC_TAB-SNDNAM = SY-UNAME.
    get the user info for the receiver of the document
    SELECT SINGLE * FROM SOUC WHERE SAPNAM = D_USERNAME.
    IF SY-SUBRC NE 0.
    WRITE : / TEXT-001, D_USERNAME. "usnam.
    EXIT.
    ENDIF.
    the user number of the person who will receive the email ( USR )
    REC_TAB-RECNO = SOUC-USRNO.
    the user type of the person who will receive the email ( USR )
    REC_TAB-RECTP = SOUC-USRTP.
    the user year of the person who will receive the email ( USR )
    REC_TAB-RECYR = SOUC-USRYR.
    the priority of the email ( highest )
    REC_TAB-SNDPRI = '1'.
    check for delivery on the email
    REC_TAB-DELIVER = 'X'.
    send express so recipient knows there is a problem
    REC_TAB-SNDEX = 'X'.
    check for a return receipt
    REC_TAB-READ = 'X'.
    the sap username of the person receiving the email
    REC_TAB-ADR_NAME = D_USERNAME. "usnam.
    add this receiver to the internal table
    APPEND REC_TAB.
    CLEAR REC_TAB.
    call the function to create the object in the outbox of the sender
    CALL FUNCTION 'SO_OBJECT_INSERT'
    EXPORTING
    FOLDER_ID = FOLDER_ID
    OBJECT_HD_CHANGE = OBJECT_HD_CHANGE
    OBJECT_TYPE = OBJECT_TYPE
    OWNER = SY-UNAME
    IMPORTING
    OBJECT_ID = NEW_OBJECT_ID
    TABLES
    OBJCONT = OBJCONT
    OBJHEAD = OBJHEAD
    OBJPARA = OBJPARA
    OBJPARB = OBJPARB
    EXCEPTIONS
    ACTIVE_USER_NOT_EXIST = 1
    COMMUNICATION_FAILURE = 2
    COMPONENT_NOT_AVAILABLE = 3
    DL_NAME_EXIST = 4
    FOLDER_NOT_EXIST = 5
    FOLDER_NO_AUTHORIZATION = 6
    OBJECT_TYPE_NOT_EXIST = 7
    OPERATION_NO_AUTHORIZATION = 8
    OWNER_NOT_EXIST = 9
    PARAMETER_ERROR = 10
    SUBSTITUTE_NOT_ACTIVE = 11
    SUBSTITUTE_NOT_DEFINED = 12
    SYSTEM_FAILURE = 13
    X_ERROR = 14
    OTHERS = 15.
    IF SY-SUBRC NE 0.
    MESSAGE A063(ZR53) WITH SY-SUBRC.
    EXIT.
    ENDIF.
    call the function to send the already created email to the receivers
    CALL FUNCTION 'SO_OBJECT_SEND'
    EXPORTING
    FOLDER_ID = FOLDER_ID
    OBJECT_ID = NEW_OBJECT_ID
    OUTBOX_FLAG = 'X'
    OWNER = SY-UNAME
    TABLES
    RECEIVERS = REC_TAB
    EXCEPTIONS
    ACTIVE_USER_NOT_EXIST = 1
    COMMUNICATION_FAILURE = 2
    COMPONENT_NOT_AVAILABLE = 3
    FOLDER_NOT_EXIST = 4
    FOLDER_NO_AUTHORIZATION = 5
    FORWARDER_NOT_EXIST = 6
    NOTE_NOT_EXIST = 7
    OBJECT_NOT_EXIST = 8
    OBJECT_NOT_SENT = 9
    OBJECT_NO_AUTHORIZATION = 10
    OBJECT_TYPE_NOT_EXIST = 11
    OPERATION_NO_AUTHORIZATION = 12
    OWNER_NOT_EXIST = 13
    PARAMETER_ERROR = 14
    SUBSTITUTE_NOT_ACTIVE = 15
    SUBSTITUTE_NOT_DEFINED = 16
    SYSTEM_FAILURE = 17
    TOO_MUCH_RECEIVERS = 18
    USER_NOT_EXIST = 19
    X_ERROR = 20
    OTHERS = 21.
    IF SY-SUBRC EQ 0.
    MESSAGE I035(ZR53) WITH NEW_OBJECT_ID D_USERNAME. "usnam.
    ELSE.
    MESSAGE I036(ZR53) WITH D_USERNAME." sy-subrc.
    ENDIF.
    ENDFORM. " CREATE_AND_SEND_MAIL_OBJECT
    this program is working fine and i have written the dynamic actions as CREATE_AND_SEND_MAIL_OBJECT(Z250_SEND_MAIL) in the variable function part. But i didnt get any mail in my inbox.CAn you please explain me how to execute and check the mail.my remainder date in the infotype 0019 is 15.05.2008.
    Thanks and Regards,
    Ashu

    Hi,
    Put a break point in the program and try.Is it going to your program?
    Regards,
    Manoj.

Maybe you are looking for

  • WAN MINIPORT ERROR AND TAKES A LONG TIME TO SHUT DOWN

    Few days before,my device manager was showing yellow exclamation mark in wan miniport(ikev2),SSTP and another area, which i can't remember.So i searched on forums and use  another software to fix this.The link to website is  - https://www.vpnhosting.

  • Is it possible to output PSP video to Mac?

    I know there are devices such as those made by Elgato eg http://tinyurl.com/gameconsolesonmac which allow you to connect a games console to an adapter which connects to the Mac so you can then play the consoles on the Mac's screen, however I am not a

  • BlazeDS - n:m relation with eager loading - recursion?

    Hello to all! I have a n:m relation and I do eager loading with Hibernate (and other relations with 1:n and n:m, but not displayed here): @ManyToMany(fetch=FetchType.EAGER)     @JoinTable(name = "Group_User",         joinColumns = {@JoinColumn(name="

  • User Exit during Plant Order Saving

    Hi Friends Could you please tell me an user exit which triggers while saving Plant Order in IW31.  I need to keep a check regarding Settlement Rules. Could you please suggest one. Thanks Britto

  • Best Mouse for 9.2.2?

    I use 9.2.2 exclusively, and my Apple Optical Mouse just stopped working. I've tried a few cheap mice, but they all have low resolution. Could you please offer some recommendations regarding which mice work best with 9.2.2? Thanks for your time. J.C.