Require a function module to add days to a date?

My purpose is to add days to a particular date and get the resulting date. I tried using this function module "RP_CALC_DATE_IN_INTERVAL", but the problem is this function module only accepts two digits for days. i.e. i am only able to add a maximum of 99 days to a particular date, but i do want to go further and add more so please tell me if there is any function module which shall help me add 3 digit days to a date.

Hi Kiran,
You can directly add days to the date.
Eg:
DATA date LIKE sy-datum.
DATA days TYPE i.
date = sy-datum.
days = 100.
date = date + days.
WRITE date.
Regards
Wenceslaus

Similar Messages

  • A function module to add an entry to the change log of the ODS needed

    Hi all,
    I want to add an entry to the change log table of the ODS .
    Is there a Function module available for this or a work around for this.
    Regards
    Akshay

    Hi Kiran,
    You can directly add days to the date.
    Eg:
    DATA date LIKE sy-datum.
    DATA days TYPE i.
    date = sy-datum.
    days = 100.
    date = date + days.
    WRITE date.
    Regards
    Wenceslaus

  • Generic Extraction business Requirement, through function module,

    Generic Extraction business Requirement, specifically through function module and source code in function module.

    Dear Karthik,
    Go to transaction SBIW -> Generic Datasource -> Maintain Generic Datasources -> Choose Master/Transaction Data -> Maintain proper entries (Application Component, Descriptions) -> Extraction by FM if you want to extract using FM.
    Maintaining Generic DataSources - Independently of application, you can create and maintain generic DataSources for transaction data, master data attributes or texts from any kinds of transparent tables, database views, InfoSets of the SAP query or using a function module. As a result, you can make use of the generic extraction of data.
    Creating a Generic DataSource
           1.      Select the DataSource type and give it a technical name.
           2.      Choose Create. The creating a generic DataSource screen appears.
           3.      Choose an application component to which the DataSource is to be assigned.
           4.      Enter the descriptive texts. You can choose any text.
           5.      Choose from which datasets the generic DataSource is to be filled.
                                a.      Choose Extraction from View, if you want to extract data from a transparent table or a database view. Enter the name of the table or the database view.
    After generation, you get a DataSource whose extract structure is congruent with the database view or the transparent table view.
    For more information about creating and maintaining database views and tables, see the ABAP Dictionary Documentation.
                                b.      Choose Extraction from Query, if you want to use a SAP query InfoSet as the data source. Select the required InfoSet from the InfoSet catalog.
    After generation, you now have a DataSource whose extract structure matches the InfoSet.
    For more information about maintaining the InfoSet, see the System Administration documentation.
                                c.      Choose Extraction using FM, if you want to extract data using a function module. Enter the function module and extract structure.
    The data must be transferred by the function module in an interface table E_T_DATA.
    For information about the function library, see the ABAP Workbench: Tools documentation.
                                d.      With texts, you also have the option of extraction from domain fixed values.
    Maintain the settings for delta transfer where appropriate.
           7.      Choose Save.
    Note when extracting from a transparent table or view:
    If the extract structure contains a key figure field, that references to a unit of measure or currency unit field, this unit field must appear in the same extract structure as the key figure field.
    A screen appears in which you can edit the fields of the extract structure.
           8.      Editing the DataSource:
           Selection
    When scheduling a data  request in the BW Scheduler, you can enter the selection criteria for the data transfer. For example, you may want to determine that data requests are only to apply to data from the previous month.
    If you set the Selection indicator for a field within the extract structure, the data for this field is transferred in correspondence with the selection criteria in the scheduler.
           Hide field
    You should set this indicator to exclude an extract structure field from the data transfer. As a result of your action, the field is no longer made available in BW when setting the transfer rules and generating the transfer structure.
           Inversion
    Reverse postings are possible for customer-defined key figures. For this reason, inversion is only possible for certain transaction data DataSources. These include DataSources that have a field that is indicated as an inversion field, for example, the field update mode in the DataSource 0FI_AP_3. If this field has a value, then the data records are interpreted as reverse records in BW.
    Set the Inversion indicator if you want to carry out a reverse posting for a customer-defined field (key figure). The value of the key figure is then transferred in inverted form (multiplied by –1) into BW.
           Field only known in exit
    You can enhance data by extending the extract structure for a DataSource using fields in append structures.
    The indicator Field only known in Exit is set for fields of an append structure. In other words, by default these fields are not passed onto the extractor from the field list and selection table.
    Deselect the indicator Field Only Known in Exit to enable the Service API to pass on the append structure field to the extractor together with the fields of the delivered extract structures in the field list as well as in the selection table.
    9. Choose DataSource -> Generate.
    The DataSource is now saved in the source system.
    Maintaining Generic DataSources
    ·        Change the DataSource
    To change a generic DataSource, in the initial screen of DataSource maintenance, enter the name of the DataSource and choose Change.
    You can change the assignment of a DataSource to an application component as well as the texts of a DataSource. Double-clicking on the name of the table, view, InfoSet or extract structure takes you to the appropriate maintenance screen. Here you can make changes required to add new fields. You can fully swap transparent tables and database views, but not InfoSets. If you return to the DataSource maintenance and choose Create, the screen for editing a DataSource appears. To save the DataSource in the SAP source system, choose DataSource  -> Generate.
    If you want to test extraction in the source system independently of a BW system, choose DataSource  ->  Test Extraction.
    ·        Delta DataSource
    In the Change Generic DataSource screen, you can delete any DataSources that are no longer relevant. If you are extracting data from an InfoSet, delete the associated query. If you want to delete a DataSource, this must not be connected to a BW system.
    Also visit :[Data Extraction from SAP Source System | http://help.sap.com/saphelp_nw04/helpdata/en/28/4c553c42360a40e10000000a114084/content.htm]
    Regards,
    Naveen.

  • Add Days to a Date field

    Hi all,
    I have the following requirement:
    I have a date field 0calday and the user would like to add a specific no.of days to it, like for example 10 or 15 days. Then we use this computed date field in calculations in the query. Could you please help and let me know how we can no.of days to a date field? And also how we can compute no.of days between two date fields?
    Regards,
    Ashmith Roy

    Hi Ashmith,
        When the user enters both date and no. of days, and if you want to calculate no of days from the user entered date I think you can go for an exit where you can use the available function module which calculates the no of days from starting of the month for the given date. Then you can add up the days entered by the user and use another available function module which converts it to the dat format again based on the given days and the old date. I don't remember the function module names but i am sur ethey are available.
    If the above thing is made possible then I think getting no of days between two dates is not a problem. Well i hope this will help you.

  • How i can add days to a date using sql

    Hi.
    Sorry the question, it's a very simple question, but i'm not finding the answer to that.
    I need some function that act just like the function add_months, but instead adding months, it need to add days to a date.
    I've used the function add_days once, but now, my select returns an error code when i try to use that function.
    My Oracle version is Oracle8 8.0.5.0.0
    runnig under Linux.
    Thanks,
    Klaus Paul

    To add days just do date arthmetic. Ex
    SQL> select sysdate+10 from dual;
    SYSDATE+1
    05-MAR-00
    add_days is a not Oracle date function.
    null

  • Function Module to find 3 months Old Date

    Is there any function module to find out 3 months old date for a todays date....Pls Help me......

    Hi,
    use function module : J_1H_CAL_DATE_IN_INTERVAL
    use code as below :
    data : date type sy-datum, out_date type sy-datum.
    date = '20070702'.
    CALL FUNCTION 'J_1H_CAL_DATE_IN_INTERVAL'
      EXPORTING
        date            = date
        days            = '00'
        months          = '03'
       SIGNUM          = '-'
        years           = '00'
    IMPORTING
       CALC_DATE       = out_date.
    write :/ out_date.
    Sandeep Kaushik
    Message was edited by:
            Sandeep Kaushik

  • Function module to derive start and end dates from fiscal year and period.

    Hi,
    I want to know a function module to derive start and end dates from fiscal year and period.
    ie: If I have say fiscal year '2010' and period '07', then the start date of this period would be '01.10.2010'.
    Thanks.
    Moderator Messge: Basic Date questions are not allowed.
    Edited by: kishan P on Oct 18, 2010 4:45 PM

    Hi,
    This is one of my exit that display the calmonth (offset -12). Usefull when I have to retrieve in a KF a complete rolling year depending one calmonth.
    S_VMUCMN is my selection variable
    S_TXTCMN_M12 is my text variable calmonth-12
    S_TXTCMN_M0 is my text variable for selected calmonth.
    WHEN 'S_TXTCMN_M12'.
        IF i_step = '2'.
          LOOP AT i_t_var_range INTO loc_var_range WHERE vnam = 'S_VMUCMN'.
            CLEAR l_s_range.
            " First day of the selected month
            CONCATENATE loc_var_range-low '01' INTO l_calday.
            CALL FUNCTION 'YFRBW_FUM_CAL_DATE_IN_INTERVAL'
              EXPORTING
                date      = l_calday
                months    = 12
                signum    = '-'
              IMPORTING
                calc_date = l_calday.
            l_s_range-low = l_calday+0(6).
            l_s_range-sign = 'I'.
            l_s_range-opt = 'EQ'.
            APPEND l_s_range TO e_t_range.
            EXIT.
          ENDLOOP.
        ENDIF.
    Thus, in KF header you have to put the two text variable to display the complete period.
    Hope it helps,

  • Which  Function Module is used for converting the DATE in BDC

    HI,
    Which  Function Module is used for converting the DATE Format in BDC for Uploading purpose please help me.

    data : date like sy-datum.
    data : odate(10) type c.
    date = sy-datum.        " in format YYYYMMDD
    CALL FUNCTION 'CONVERSION_EXIT_PDATE_OUTPUT'
      EXPORTING
       input         = date
    IMPORTING
       OUTPUT        = odate         .
    write:/ odate.  "in ur format '.
    1.
    In ur itab make a field for date as 10 characters and use this Fm to store the date .
    2. Pass the date as the charcter field to the screen and now check .

  • How can I add days to a date?

    I need to find a way to add days to a date. For example, today is 10/3/03 and I want to add 180 days to that. How do I do that? Here is my code so far....
    import java.util.*;
    import java.text.*;
    public class Loan
         String date;
         String loanEndDate;
         public void setDate()
    GregorianCalendar gregNow = new GregorianCalendar();
    Date now = gregNow.getTime();
    DateFormat shortDate = DateFormat.getDateInstance(DateFormat.SHORT);
    date = shortDate.format(now);
    public String getDate()
    return date;
    public void printLoanBegDate()
              System.out.println("Loan Beg Date: " + date);
         public String setLoanEndDate()
              loanEndDate = (getDate() + 180);
              return loanEndDate;
         public void printLoanEndDate()
              System.out.println("Loan End Date: " + loanEndDate);
    The output is displayed by the following program:
    public class DemoLoan
         public static void main(String[] args) throws Exception
         Loan anLoan = new Loan();
         anLoan.setDate();
         anLoan.printLoanBegDate();
         anLoan.setLoanEndDate();
         anLoan.printLoanEndDate();
    The output is as follows:
    10/4/03
    10/4/03180 - - Why does this print the 180 afterwards? How can I get that to display the date 180 days into the future??
    Thanks

    Re: storing your dates as Dates, I mean don't have a field in your class called "date" which is a String. Have a field in your class called "date" which is a Date. If one aspect of your class is a moment in time, then use the java class that best represents a moment in time: java.util.Date. Don't make things more complicated than they have to be.
    Re: adding, it's in the docs:
    http://java.sun.com/j2se/1.4.1/docs/api/java/util/Calendar.html
    and
    http://java.sun.com/j2se/1.4.1/docs/api/java/util/GregorianCalendar.html
    But anyway it's like:
    Calendar c = new GregorianCalendar(); // now
    c.add(Calendar.DATE, 180); // 180 days from now
    Date nowPlus180 = c.getTime();
    DateFormat shortDate = DateFormat.getDateInstance(DateFormat.SHORT);
    System.out.println(shortDate.format(nowPlus180));

  • Function modules transfer  repeated records in Generic data source

    Hello Friends ,
    I have created a FM to extract the data from fields of  tables BKPF and BSEG .
    This functional module is used in the Generic data source.
    Now if I check in RSA3 for this Generic data source,
    the records are coming 10 times instead of a single time.
    Means one records at data base table is showing ten records in RSA3.
    Any help please.
    Regards,
    Amol.

    Hi Amol,
      Can you please check the Fetch statement that you are using after opening the cursor and selecting data into it. It should be in the format below.
    FETCH NEXT CURSOR S_CURSOR APPENDING CORRESPONDING FIELDS OF TABLE                                                 E_T_DATA PACKAGE SIZE S_S_IF-MAXSIZE.
    Also are you incrementing data package ID or not by using the statement  
    S_COUNTER_DATAPAKID = S_COUNTER_DATAPAKID + 1.
    Regards,
    Prakash B

  • Function Module to get BEGIN and END date of a month?

    Hello everybody,
    Is there any function module to get BEGIN and END date of a month
    GIVEN EITHER THE CURRENT SYSTEM DATE or MONTH?
    Regards,
    Sanghamitra.A.

    hi
         CALL FUNCTION 'PA03_PERIODDATES_GET'
            EXPORTING
              f_abkrs               = p_abkrs1
            IMPORTING
              f_permo               = wf_permo
              f_current_begda       = wf_begda
              f_current_endda       = wf_endda
            CHANGING
              f_current_period      = wf_pabrp
              f_current_year        = wf_pabrj
            EXCEPTIONS
              pcr_does_not_exist    = 1
              abkrs_does_not_exist  = 2
              period_does_not_exist = 3
              OTHERS                = 4.
          IF sy-subrc <> 0.
            MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ENDIF.
    this is the function module to get the first date and last date of a particular month
    if u have any doubts ask
    regads
    karthik
    reward points if useful

  • RFC enabled function module to insert , update and delete data in a ZTABLE

    friends..
    Is there any standatd RFC enabled function module to insert , update and delete data in a custom database-table (Ztable)?
    if not how can we create it? plz give me the details steps..
    what are the import, export parameters and how to code and process it.. (for example: suppose fields in the table is Emp_Id, Name, Address. I need to develop a RFM which does the 3 tasks, insert update delete in the same RFM)
    Thanks and Regards

    create a f.n mod in se37 and make it rfc enabled.  ur import parameters are Emp_Id, Name, Address and TASK and u can have an export parameter like result which gives the status of the update. based on task u can insert using keyword INSERT....and update using UPDATE or MODIFY and delete using DELETE. these keyword are not compelte with syntax but need to refer the SAP documentation.

  • Reg:function module to retrive the ekko table data

    Hi all,
    Is there any function module to retrive the ekko table data for the given select-options and parametrs.
    could you provide that.
    Thanks & regards,
    S.chaitanya.

    dear chaitanya,
    may be you can use this function module ME_READ_EKKO_MULTIPLE which can be used to pass the select options to retrieve the desired EKKO data.
    OR the best way would be to do a SELECT Query which would retrieve the data faster and in an effective manner.
    Hope this helps you.
    Help Children of U.N World Food Program by rewarding and enocourage others to answer your queries
    Thanks
    Venugopal

  • Any function module to retrieve all Payment Run Data

    I am looking for a RFC enabled function module which would retrieve all the data related to Payment Run.( Tables REGUH REGUP, PAYR, BKPF, BSEG)
    Any idea or pointers ?

    Hi
    U can use FM  RH_STRUC_GET to get the pernr in the evaluation path
    data : IT_RESULT_TAB     TYPE STANDARD TABLE OF SWHACTOR .
                CALL FUNCTION 'RH_STRUC_GET'
                  EXPORTING
                    ACT_OTYPE  = C_OTYPE
                    ACT_OBJID  = W_POSIT
                    ACT_WEGID  = C_WEGID (relation B002 like )
                    ACT_BEGDA  = W_BEGDA
                    ACT_ENDDA  = W_BEGDA
                   ACT_TDEPTH = 1 ( depath 1, 2, etc )
                  TABLES
                    RESULT_TAB = IT_RESULT_TAB .
    Nb : Give points if it worths

  • Function module to add record into incompletion log of creating sale order

    Hi SD Experts,
    Do you know any function module / class  to add record a into incompletion log procedure of creating / changing sale order process? We can do it through configuration OVA2 but I need to add more condition before adding to this table.
    Thanks,
    Duy

    Hi,
    Refer to The SDN Post : [user exit to update the incompletion log in sales order for pricing error |Re: user exit to update the incompletion log in sales order for pricing error]. 
    Limitation : While creating Sales order, this works only for document type with external number range as the code required for updating XVBUV require Sales Order Number.
    Regards
    Vinod

Maybe you are looking for

  • Service Desk with SLA: item data not automatic

    Hello all. I'm trying to setup service desck with contract determination for monitoring SLA (SolMan 7.0 SP 15) Everything works well, except for item/product determination. I mean, when i check a  support message creatde in a satellite system, organi

  • How can I initiate a "Chat" with Adobe support?

    I had a help "chat" with Adobe support last night.  Was told it was a technical problem and to wait 5-6 hours. I have a Case number but can only get into the forum.  How Can I initiate a "chat".  I keep getting looped back to the main help menu.

  • How to login to a remote (FTP??) server and read an XML file?

    Hello all, I would like some information on how to login to a remote server using a Java program. The server might be a ftp server, because the client will ftp a xml file to this server, and the java program needs to login to this server and read the

  • Image change on rollover effect

    How is this effect achieved with database driven data: 1. Roll over any image for a larger view. 2. Click to select photos can be viewed on this webpage: https://www.schooloutfitters.com/catalog/product_info/pfam_id/PFAM2691/products_id/PRO8702

  • JPGencoder and Preloader problem

    Hi guys, I have an swf which allows the user to take a snapshot of the stage, which works fine on its own. When I use an external preloader with it i get the error: TypeError: Error #1009: Cannot access a property or method of a null object reference