Which function is used for  adding days to given month

which function is used for  adding days to given month

Hi Jagrut,
Good ... Check out the following examples
<b>Get a date</b>
DATE_GET_WEEK Returns week for a date
WEEK_GET_FIRST_DAY Returns first day for a week
RP_LAST_DAY_OF_MONTHS Returns last day of month
FIRST_DAY_IN_PERIOD_GET Get first day of a period
LAST_DAY_IN_PERIOD_GET Get last day of a period
RP_LAST_DAY_OF_MONTHS Determine last day of month
<b>Date calculations</b>
DATE_COMPUTE_DAY Returns a number indicating what day of the week the date falls on. Monday is returned as a 1, Tuesday as 2, etc.
DATE_IN_FUTURE Calculate a date N days in the future.
RP_CALC_DATE_IN_INTERVAL Add days/months to a date
RP_CALC_DATE_IN_INTERVAL Add/subtract years/months/days from a date
SD_DATETIME_DIFFERENCE Give the difference in Days and Time for 2 dates
MONTH_PLUS_DETERMINE Add or subtract months from a date. To subtract a month, enter a negative value for the 'months' parameter.
DATE_CREATE Calculates a date from the input parameters:
Example: DATE_CREATE
CALL FUNCTION 'DATE_CREATE'
EXPORTING
   anzahl_jahre  = 1
   anzahl_monate = 2
   anzahl_tage   = 3
   datum_ein     = '20010101'
IMPORTING
   datum_aus     = l_new_date.
   Result:
   l_new_date = 20020304
Example: MONTH_PLUS_DETERMINE
data: new_date type d.
CALL FUNCTION 'MONTH_PLUS_DETERMINE'
EXPORTING
months = -5 " Negative to subtract from old date, positive to add
olddate = sy-datum
IMPORTING
NEWDATE = new_date.
write: / new_date.
<b>Hollidays</b>
HOLIDAY_GET Provides a table of all the holidays based upon a Factory Calendar &/ Holiday Calendar.
HOLIDAY_CHECK_AND_GET_INFO Useful for determining whether or not a date is a holiday. Give the function a date, and a holiday calendar, and you can determine if the
date is a holiday by checking the parameter HOLIDAY_FOUND.
Example: HOLIDAY_CHECK_AND_GET_INFO
data: ld_date                 like scal-datum  default sy-datum,
      lc_holiday_cal_id       like scal-hcalid default 'CA',
      ltab_holiday_attributes like thol occurs 0 with header line,
      lc_holiday_found        like scal-indicator.
CALL FUNCTION 'HOLIDAY_CHECK_AND_GET_INFO'
  EXPORTING
    date                               = ld_date
    holiday_calendar_id                = lc_holiday_cal_id
    WITH_HOLIDAY_ATTRIBUTES            = 'X'
  IMPORTING
    HOLIDAY_FOUND                      = lc_holiday_found
  tables
    holiday_attributes                 = ltab_holiday_attributes
  EXCEPTIONS
    CALENDAR_BUFFER_NOT_LOADABLE       = 1
    DATE_AFTER_RANGE                   = 2
    DATE_BEFORE_RANGE                  = 3
    DATE_INVALID                       = 4
    HOLIDAY_CALENDAR_ID_MISSING        = 5
    HOLIDAY_CALENDAR_NOT_FOUND         = 6
    OTHERS                             = 7.
if sy-subrc = 0 and
   lc_holiday_found = 'X'.
  write: / ld_date, 'is a holiday'.
else.
  write: / ld_date, 'is not a holiday, or there was an error calling the function'.
endif.
Checking dates
DATE_CHECK_PLAUSIBILITY Check to see if a date is in a valid format for SAP. Works well when validating dates being passed in from other systems.
Converting dates
DATE_CONV_EXT_TO_INT Conversion of dates to SAP internal format e.g. '28.03.2000' -> 20000328 Can also be used to check if a date is valid ( sy-subrc <> 0 )
Function to return literal for month
he table you want to use is T247. You can also use the function MONTH_NAMES_GET.
You can also try table T015M. It has the month number in it's key.
Formatting
DATUMSAUFBEREITUNG Format date as the user settings
Other
MONTH_NAMES_GET It returns all the month and names in repective language.
Good Luck and thanks
AK

Similar Messages

  • Double charge full month of Family Plan which only used for 7 days  and full month of individual plan

    I changed from Family Plan to Individual Plan and I got only refund back $9.99 for one line that stay with Verizon but I got charged double both Family Plan and Individual Plan for full month without any credits for 23 days of unused Family Plan. ($120-discount Family Plan + $39.99-discount Individual Plan) per 1 month (from 06/07 to 07/06).
    I am asking the credit of unused 23 days of Family Plan back into my account when I changed from Family plan to Individual plan then I got the answer like this which I do not agree at all.
    "As the previous rep stated since the numbers were ported out the bill continued to bill until the end of the current bill cycle. This is the reason why there was no credit issued for the first month in advance. Had the numbers not been ported, and instead disconnected, there would have been a refund issued for any unused portion of the service"
    I never saw any clause saying that porting numbers would not get credit issued for any unused portion of the month billed in advance.
    I expected refund 23 days credit of the Family plan from 06/06 to 07/06 back to my account since the family plan supposed to be disconnected on 06/07 but because of porting time schedule from other carrier so that all 4 lines completely disconnected the service 1 week later which is on 06/13/2012 and only 1 line(my current number) left as individual plan as it planned originally 06/07.
    Family Plan with corporate discount: $120-$16 cisco discount/month------> each day is: $104/30 days= $3.46/day
                       23 days unused of Family Plan is : $3.46 x 23= $79.58
    I still expect missing credits into my account: $79.58-$9.99= $69.59.
    At the least if you want to take away the $16 discount for the last month of Family plan, then you still owe me the refund of ($69.59-$16)= $53.59

    verizonloyal wrote:
    You left out the next important sentence ..... If it is your intention to fool all other members, please correct it.
    This is the path for the whole thing:"Customer Agreement"
    http://www.verizonwireless.com/b2c/support/customer-agreement
    I am not a Prepaid customer and I will be entitled to a refund of unused charge from an advanced month charge. Any cancellation should honor that..I called the customer representative to ask in advance what happened when I plan to keep only one line and change to individual plan ,she assured me that I will get credits for any unused of Family Plan of the advanced month, the new Individual Plan charge will take over and I would not get double charge at all.
    I am the customer with Verizon very long time, more than 5 years and I can not believe that you charged me double like that.
    Please return me back my money.
    I am NOT trying to fool anyone. As with the sentence you highlighted, if what I highlighted ONLY pertained to prepaid customers, it would have indicated it in the sentence. Since it did not, it DOES NOT. Postpaid customers are NOT mentioned at all within the section about porting numbers. Are you saying since they are not mentioned that postpaid customers CANNOT port their numbers? Didn't think so. The entire paragraph is about ALL Verizon customers EXCEPT the sentence which specifically singles out prepaid customers. You are responsible for all charges until the end of the billing cycle from the point of porting, not from when you asked to be ported. Therefore you are responsible for the charges for the "Family Plan" until the end of the billing cycle.
    Unfortunately, you only left ONE phone on the account when you ported out your numbers. Therefore the single line could NOT have been left on a Family Plan, and was therefore migrated to an Individual Plan. AT MOST, you would be entitled to a prorated refund of the $9.99 access fee FOR THAT ONE LINE, since that line was not canceled due to the porting. However, you should ONLY be responsible for Individual Plan charges from the point your single line was migrated until the end of the billing cycle, NOT for an entire month of service. Of course, your bill would show that the following month was being charged, too, since Verizon charges a month in advance.
    While Verizon may refund you more money just to placate you, according to the CUSTOMER AGREEMENT, you are not entitled to it.
    Good luck.

  • Which function to use for labeling 3D objects? (Acrobat 3D or Acrobat 9 Pro Extended)

    I want to label parts of a 3D model (e.g. "Rough finish", "Glossy" etc.). I want the labels to be present even when the model is rotated, zoomed and turned etc. I tried using the comment feature (text box with a line) in Acrobat 3D (v. 8) but the problem is that the labels disappear as soon as the model is turned or zoomed. They reappear only when the saved "view" is "on".
    Any suggestions on how this can be done, preferably using Adobe Acrobat 8 (or toolkit)? If its absolutely impossible in this version of Adobe I will try to use trial version of Adobe 9 Pro Extended.
    Please advise.
    Thank you.

    Hello,
    You can create 3D comments linked to the geometry within Acrobat Pro Extended 9
    - Import your 3D model
    - Activate 3D then right click and select Tools/Add 3D comment
    - Pick an element on your 3D Part (insert your text) then press ok
    Hope it helps
    Best Regards
    William Gallego

  • Is there a custom function available which can be used for logging errors captured in a sp in a sql table

    Is there a custom function  available which can be used for logging errors captured in a sp during and after execution in a sql table?
    Basically we  would like to utilize such function  in every sp and log errors of each sp in a error log table
    Mudassar

    Thanks .
    I was able to write this however I am thinking I am missing something
    CREATE FUNCTION testfunction1()
    RETURNS @temp_error TABLE (
    id int identity(1,1),
    procedure_name varchar(255),
    line_number int,
    error_number int,
    error_message varchar(max),
    error_state int,
    error_severity int,
    occurence_datetime datetime default current_timestamp,
    user_name sysname default suser_name(),
    login_name sysname default suser_name()
    AS
    BEGIN
    insert @temp_error(procedure_name,line_number,error_number,error_message,error_state,error_severity)
    select error_procedure(),error_line(),error_number(),error_message(),error_state(),error_severity()
    RETURN;
    END;
    CREATE TYPE test_type AS TABLE(
    id int identity(1,1),
    procedure_name varchar(255),
    line_number int,
    error_number int,
    error_message varchar(max),
    error_state int,
    error_severity int,
    occurence_datetime datetime default current_timestamp,
    user_name sysname default suser_name(),
    login_name sysname default suser_name()
    GO
    create proc usp_error_test
    @test_type AS test_type READONLY
    as
    begin
    begin try
    select 1/0
    end try
    begin catch
    select * from testfunction1(@test_type)
    end catch
    end
    Mudassar

  • How to disable iMessage for an old Apple ID which is only used for AppStore?

    How to disable iMessage for an old Apple ID which is only used for AppStore?
    I used my old Apple ID for iMessage and AppStore Apps. Now I'm using my iCloud Account (second Apple ID) on my Mac as iCloud and iMessage Account.
    New Apple ID - iCloud & iMessage (**** thing that I can't use my okd Apple ID for iMessage and another for iCloud) on new Mac
    Old Apple ID - AppStore, iMessage days ago
    So now how to disable the iMessage function for my old Apple ID which isn't used anymore?
    Thank you!

    Yeah the problem is that I want to be reachable by:
    *new apple id
    *mobile number
    Earlier:
    *old apple id
    *mobile number
    Problem - if I set in Settings => Messages => Receive at:
    *new apple id
    *mobile number
    Others still can see my old apple id as "iMessage" although it isn't used a iMessage anymore. So how to disbale iMessage function for that?

  • Query with SQL-SP gives error, if not used for few days

    Hi All,
    I have observed that if we do not use some of queries (which usage SQL SPs) for few days, then it stops working.
    But when we go in SQL and execute the SP, the query in SAP starts working, without making any change either in query or the SQL-SP.
    Can anybody throw light on this ? I guess it has some connection with SQL-SP behaviour.
    Thanking you in advance ,
    Samir Gandhi
    Edited by: Rui Pereira on May 1, 2009 1:28 PM

    Hi Gordon,
    Please note the function of the SP is to bring selected data from tables, for example to bring Purchase details (I have copy pasted the SP at bottom of this message).
    These are not SP_notif...
    These SPs are called from the SBO query.
    Once we execute the SP in SQL, then it starts working with SBO also.
    set ANSI_NULLS ON
    set QUOTED_IDENTIFIER ON
    GO
    ALTER Procedure [dbo].[pGetPurchaseRegister]
         @StartDate datetime,
         @EndDate  datetime
    as
    if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tmpPurchaseReg1]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
         drop table tmpPurchaseReg1
    if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tmpPurchaseReg2]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
         drop table tmpPurchaseReg2
    SELECT T1.LineNum,T0.DocNum AS 'Document Number', T0.DocDate AS 'Posting Date', T0.CardCode AS 'Vendor Code',
           T0.CardName AS 'Vendor Name', T0.NumAtCard as 'Vendor Ref. No', T0.VatSum AS 'Total Tax', T0.DocTotal AS 'Document Total' ,
           T1.AcctCode AS 'Account Code',T1.LineTotal AS 'Basic Amount', T1.ItemCode AS 'Item No.', T1.Dscription AS 'Item/Service Description',
           T2.SuppCatNum, T1.INMPrice AS 'Item Cost', T1.Quantity AS 'Quantity',T3.ItmsGrpNam AS'ItemGroup'
    into tmpPurchaseReg1
    FROM  [dbo].[OPCH] T0
          INNER  JOIN [dbo].[PCH1] T1  ON  T1.DocEntry = T0.DocEntry
          INNER  JOIN [dbo].[OITM] T2  ON  T1.ItemCode = T2.ItemCode
          INNER  JOIN [dbo].[OITB] T3  ON  T2.ItmsGrpCod = T3.ItmsGrpCod
          --WHERE T0.DocDate >= CONVERT(DATETIME, [%0], 112)   AND  T0.DocDate <= CONVERT(DATETIME, [%1], 112)  
         WHERE T0.DocDate >=@StartDate  AND  T0.DocDate <=@EndDate
    ORDER BY T0.DocNum
    select  * into tmpPurchaseReg2 from tmpPurchaseReg1
    declare @Total int
    declare @TmpCardCode varchar(200)
    declare @DocNum int
    declare  PurchseRegister_Cursor cursor LOCAL for
         select  [Document Number] from tmpPurchaseReg1 group by [Document Number] having count([Document Number]) > 1 order by [Document Number]
    open PurchseRegister_Cursor
                            fetch next from PurchseRegister_Cursor into @DocNum
                            while @@fetch_status = 0
                            begin
                                        begin
                                drop table tmpPurchaseRegTemp
                                 select top 1 * into tmpPurchaseRegTemp from tmpPurchaseReg2 where [Document Number] = @DocNum 
                             select @TmpCardCode =[LineNum]  from tmpPurchaseRegTemp     
                             update tmpPurchaseReg2 set [Vendor Name] = '',[Total Tax] = 0,[Document Total] = 0
                                                   where  [Document Number] = @DocNum  and [LineNum] <> @TmpCardCode
                                        end
                                       fetch next from PurchseRegister_Cursor into @DocNum   
                            end
    close PurchseRegister_Cursor
    deallocate PurchseRegister_Cursor
    BR
    Samir Gandhi

  • Which method is used for event creation

    Dear All,
    My client has more then one Purchase Organization. Workflow for Purchase order release very from pur org to pur org. For example - workflow WS92000030 is trigger when PO is created for India pur org where as workflow WS92000021 is trigger when PO is created for US pur org.  
    I checked and found that same Object Type - BUS2012 & event - RELEASESTEPCREATED is used in all Pur. Org PO release workflow. Also I found in Transaction code - SWETYP that Type linkage activate for  BUS2012, RELEASESTEPCREATED in all the PO workflow - WS92000030 & WS92000021.
    As per my knowledge, event can be created in various way such as Function module, Change document, General status management, Business Transaction Events etc.
    Can some one guide me, how can I found that which method is used for event creation in different pur org?
    How can I fould what is the fuctional module used for event creation if Fuctional module used for event creation. 
    For your information, I can see in T. Code - SWUO that 'Result dependent on a check function module'  for all the workflow - WS92000030, WS92000021 etc.
    Thanks in

    Hi Sahu,
    I dont think they have used the Function module or change document or any other kind of methods to trigger the workflow. This is because RELEASESTEPCREATED method is a standard method and it will be triggered by standard SAP. They can not make changes in standard sap saying RELEASESTEPCREATED should be triggered for this Purchase Org .
    Istead what i think is, they might have given the Event Condition for each workflow.
    In SWDD>> basic settings>> Start Events, we can give condition on triggering the workflow.
    Please check this.
    Regards,
    Gautham

  • Function module used for ENQUEUE_EIQMEL & DEQUEUE_EIQMEL function

    Hi All,
    It should be highly appreciable if any one could please help.
    I need the name of the function module used for ENQUEUE_EIQMEL & DEQUEUE_EIQMEL function.
    waiting for help.
    Thanks
    Shaw

    Hi,
    The names 'ENQUEUE_EIQMEL' and 'DEQUEUE_EIQMEL ' you have mentioned are itself the function modules. Which other FM's you need i didnt understand.
    These are FM to ahndle lock objects 'QMEL'.
    please reframe your question in case of further issues.
    Regards,
    Mansi.

  • Which tool you use for your datamodel?

    Which tool you use for your datamodel?
    To show your tables with pk and fk and all.
    designer
    jdev
    other?

    I am using ERwin® Data Modeler r7.1 (7.1.1.1207). It supports most new features of Oracle 10g such as hash, list, composite hash, setting LOB storage properties etc.
    We just upgraded from version 4 recently. In the old version, I had to manually modify the generated scripts.
    ERWin r7 supports all Oracle 10g (Release 2) new features we need for our projects. It offers far more functionality and options than the old version. It supports all partition types in Oracle 10g: Range, Hash, List, Composite-Hash and Composite-LIST and offers more storage settings.
    Another nice new feature of ERWin r7 is that it offers purge option in the DROP TABLE statement. In Oracle 10g, the recycle bin contains all the dropped database objects until you permanently drop them with the PURGE option. Otherwise, you will see many funny looking objects like this: 'BIN$0+ktoVChEmXgNAAADiUEHQ==$0'.
    With the purge option, you don't need to purge the recycle bin after the forward engineering.
    SQL> purge recyclebin;
    My favorite is Oracle Designer.
    http://www.oracleabc.com/forums/thread-24-1-1.html

  • Interface/class which can be used for obtaining exchange rates of currency

    Is there any interface or class in the java package which can be used for obtaining current exchange rates of currencies ?

    Yes. The people at Sun change the static fields every day to reflect the current prices on the world currency markets at GMT 12:00. Then every day all the java programmers around the world reinstall a new JDK that contains the updated class. The class is called:
    EuroDollarDollarEuroDollarYenYenDollarYenEuroEuroYenRubleDollarDollarRuble
    To access the Euro-Dollar exchange rate, you write:
    EuroDollarDollarEuroDollarYenYenDollarYenEuroEuroYenRubleDollarDollarRuble.EURODOLLAR

  • What listener do you use for adding text to JTextField?

    what listener do you use for adding text to JTextField?
    I have a component which adds some text to my JTextField, and I want to pick up this event. I have tried ActionListener with no effect.
    cheers,
    Olly

    jtextField.getDocument().addDocumentListener();
    The DocumentListener implements:
    changeUpdate() insertUpdate() removeUpdate().
    http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/event/DocumentListener.html

  • Which CKM is used for moving data from Oracle to delimited file ?

    Hi All
    Please let me know Which CKM is used for moving data from Oracle to delimited file ?
    Also is there need of defining each columns before hand in target datastore. Cant ODI take it from the oracle table itself ?

    Addy,
    A CKM is a Check KM which is used to validate data and log errors. It is not going to assist you in data movement. You will need an LKM SQL to File append as answered in another thread.
    Assuming that you have a one to one mapping, to make things simpler you can duplicate the Oracle based model and create a file based model. This will take all the column definitions from the Oracle based model.
    Alternatively, you can also use an ODI tool odiSQLUnload to dump the data to a file
    HTH

  • I have an email account causes the machine to hang up after being in use for a day.  It only occurs on my Macbook Pro and only one particular account.  The problem account works fine on my iMac and Windows Machines.  Any ideas what is causing this?

    I have an email account causes the machine to hang up after being in use for a day.  It only occurs on my Macbook Pro and only one particular account.  The problem account works fine on my iMac and Windows Machines.  I have been to the local Genius bar and through trial and error we have determined that Mail is working ok but somehow the account is causing the problem.  I have used this account for years.  Any ideas what is causing this?

    No idea why, but one thing you may try if you have the time, is create a new user, and set up the problem mail account in the new user space. See if it causes your MBP to hang as well.  That will tell you if it is something wrong with your main User, or something wrong with MBP.
    Assuming this works, I'd nuke the problem account in your main user space, re-start, and reinititate the account and see if that helps.
    Depening on how many email accounts you have setup, it may be necessary to nuke the whole Mail folder in your User/Library....   Hard way to get it to work, but just my idea.

  • How to specify which cert to use for software virt server?

    Is there a way to specify which certificate to use for each software virtual server? So, for example a user hitting https://somewhere.com would get the certificate for somewhere.com while the virtual server https://somewhereelse.com would use the certifcate with the name somewhereelse.com in it?

    No, this is not possible due to limitations of the underlying protocols.
    HTTP requests are sent over TCP connections which deal with IP addresses and port numbers (i.e. hardware virtual server properties), not hostnames (i.e. software virtual server properties). The HTTP protocol adds software virtual server support by allowing a client to identify the hostname (e.g. "www.iplanet.com") of the server it wishes to communicate with. This is achieved by including a "Host:" header with each HTTP request.
    Unfortunately, the SSL/TLS protocols require that the web server present its SSL/TLS certificate BEFORE the client sends its HTTP request. Since the software virtual server information is contained in the HTTP request, it is not possible for the server to select different certificates for different software virtual servers.
    You will need to use hardware virtual servers (i.e. virtual servers that have different IP addresses and/or port numbers) if you wish to use distinct SSL/TLS certificates.

  • After reopening Firefox does not remember which desktop was used for each window. Can you help, please.

    I'm using two displays and several desktops on my Mac (OS X 10.9.4).
    When I need to restart Firefox, it remembers to open windows from last session in correct display, but does not remember which desktop was used for each window. So when the application starts, it opens all windows on a desktop which is currently active instead of reopening them on desktops used during the last session. How to fix the issue?

    Hi Nerva,
    Thank you for your question, there is a add on I have been recommended to custom set up of opening windows in new monitors. It's called [https://addons.mozilla.org/en-US/firefox/addon/monitor-master/ Monitor Master].
    However, in regards to the session remembering which monitor the window was open in, in the profile folder there is a file that stores window positions and dimensions. It is called localstore.rdf.
    Please stay tuned for more investigation, as there are definitely bugs on file for similar issues. Pinpointing it is the hard part.

Maybe you are looking for