Function module to give a date based on a particular date and interval.

Hi there,
I am writing a code where I need to to find another date
based on a key date and and an interval.
Is there any function module where I pass the date and the interval
(say 30) and it gives me a new date after subtracting 30 from it.
Or is there any piece of code which does it?
Thanks in advance.
Regards,
Kate

hi Kate,
you can try ?
data : date2 like sy-datum.
date2 = yourdate - 30.
hope this helps.

Similar Messages

  • Function Module to get PO details based on Plant and PO date

    Hi
    1. Is there any Function Module to get PO details based on Plant and PO date?
    2. Is there any Function Module to get Material document details based on PO number?
    Thanks
    Narendra

    hi,
    check these standard reports.
    ME2L - By vendor
    ME2M - By material
    MSRV3 - By service
    ME2K - By account assignment
    ME2C - By material group
    ME2B - By tracking number
    ME2N - By PO number
    ME2W - By supplying plant
    also chck this func module.
    REPL_LIST_PURCHASE_ORDER_READ
    reward if hlpful.

  • Function Module that gives the names of the file in the Application Server.

    Hi Experts,
       Please give me a Function Module that gives the names of the file in the Application Server.
    Thanks,
    Debi.

    Hi,
    see these links
    http://help.sap.com/saphelp_nw04/helpdata/en/2a/fa02b7493111d182b70000e829fbfe/content.htm
    http://abaplovers.blogspot.com/2008/05/function-module-sap-logged-in-users-to.html
    http://www.saptechies.com/abap-function-modules/
    http://sap.ittoolbox.com/groups/technical-functional/sap-dev/function-module-to-get-data-and-time-of-file-576751
    thanks
    karthik

  • Is there any function module which gives open invoices &open amount?

    Hello All,
    I want to use function module which gives open invoices with open amount.
    I know 'CUSTOMER_OPEN_ITEMS'  'BAPI_AR_ACC_GETOPENITEMS' function which gives open invoices but does not give open amount.
    Can anyone help me to find such function?

    From this BAPI ,
    BAPI_AR_ACC_GETOPENITEMS, You got amount for items in lc_amount field of lineitems table parameter.
    I hope, it will helpful to you.
    by
    Prasad GVK.

  • Function module for GL account open items at a key date

    Is there a function module for "GL account open items at a key date" similar to following for customer and vendor accounts?
    BAPI_AR_ACC_GETOPENITEMS Customer account open items at a key date
    BAPI_AP_ACC_GETOPENITEMS Vendor account open items at a key date
    If not, please suggest any alternatives. I am looking to capture the output of FBL3N (GL account line item display) in a program.
    Thank you in advance.
    Prasanna Pujari

    hi,
    please go through the below link i think it will help u.
    http://sapfunctional.com/FI/GL/Balance.
    Regard
    Abhishek Tripathi

  • Need of a function module to give a pop up of certain values

    Hi Experts,
    I am need of an function module to give a pop up of values present in an internal table, just like an F4 help. Please advise.
    Thanks in advance,
    Vivenchandar R

    hi Viven,
    check the program <b>BALV_POPUP_TO_SELECT</b> to see how the function module <b>REUSE_ALV_POPUP_TO_SELECT</b> can be used for your requirement.
    Hope this helps,
    Sajan Joseph.

  • Function Module to get pernr number based on first name and last name

    Hi All,
    What is the Function Module to get pernr number based on first name and last name.
    Could you please help me.
    T@R.
    Vidya

    hi Vidya,
    you can get perner from PA0002 based on firs name and last name.
    use select query and get perner.

  • Is there any function module to give absolute value of a number?

    Hi,
    Is there any function module to give absolute value of a number?
    That has similar functionality to the Built in Function ABS.
    Please let me know.
    Thanks,
    cs

    hi,
    why are you looking for any function module.
    You can easily get it by mathematical function ABS .
    Syntax : <Turget Variable> = ABS <Source Variable>
    \[removed by moderator\]
    Anirban Bhattacharjee
    Edited by: Jan Stallkamp on Jun 27, 2008 4:19 PM

  • Function module which could calculate the previous month's start date.....

    hi,
    I want a function module which could calculate the previous month's start date and end date...
    Say todays date is  like 29.05.2007(start date) it should return
    01.04.2007 and 30.04.2007...
    IS there any FM for this ... or how to go about this scenario ???
    thanks in advance
    samm

    See the below Logic :
    DATA :g_date(2) TYPE n,           " Date
          g_month(2) TYPE n,          " Month
          g_year(4) TYPE n ,          " Year
          g_bill_low(10) TYPE n,       " From date
          g_bill_high(10) TYPE n,      " To date
          g_month1(2) TYPE n,         " Month
          g_year1(4) TYPE n,          " Year
          g_date1(2) TYPE n,          " Date
          g_year2(4) TYPE n,          " Year
          g_datum LIKE sy-datum.      " System date
    RANGES : r_bdate  FOR vbrk-fkdat.             " Billing date
      g_datum = p_date + 10.
      g_month = g_datum+4(2).
      g_year = g_datum+0(4).
      IF g_month = 1.
        g_year = g_year - 1.
        g_month = 12.
        g_date = 1.
      ELSE.
        g_month = g_month - 1.
        g_date = 1.
      ENDIF.
    Passing the date to billing date-low
      CONCATENATE  g_year g_month g_date  INTO g_bill_low.
      r_bdate-low = g_bill_low.
      r_bdate-sign = 'I'.
      r_bdate-option = 'BT'.
      g_month1 = g_datum+4(2).
      g_year1 = g_datum+0(4).
      IF g_month1 = 1.
        g_year1 = g_year1 - 1.
        g_month1 = 12.
      ELSE.
        g_month1 = g_month1 - 1.
      ENDIF.
      CASE g_month1.
        WHEN 1.g_date1 = '31'.
        WHEN 3.g_date1 = '31'.
        WHEN 4.g_date1 = '30'.
        WHEN 5.g_date1 =  '31'.
        WHEN 6.g_date1 = '30'.
        WHEN 7.g_date1 = '31'.
        WHEN 8.g_date1 = '31'.
        WHEN 9.g_date1 = '30'.
        WHEN 10.g_date1 = '31'.
        WHEN 11.g_date1 = '30'.
        WHEN 12.g_date1 = '31'.
      ENDCASE.
      g_year2 = g_year1.
      IF g_month1 = 2.
        g_year2 = g_year2 MOD 4 .
        IF g_year2 = 0.
          g_date1 = 29.
        ELSE.
          g_date1 = 28.
        ENDIF.
      ENDIF.
    Passing the date to billing date-high
      CONCATENATE  g_year1  g_month1  g_date1 INTO g_bill_high.
      r_bdate-high = g_bill_high.
      APPEND r_bdate.
    Reward Points if it is helpful
    Thanks
    Seshu

  • Get the COI date based on I base number and component number

    Hi Experts,
    I have get the COI date based on the Ibase number and component.
    Please suggest me is there any FM available.
    Thnx,
    Sam.

    Hi Sam,
    You mean to say u want to get the associated person to that Partner.
    Which we define as Role type in CRM.
    Say a person ABC is having a team lead XYZ , then you can use the table BUT050 and give the relation ship type key value
    Partner ABC must be associated with Team Lead XYZ with some BP Role.
    Ask it from your fucntional and use a select query to get that Team Lead name.
    Hope this helps

  • How to revert the changes in SAP BI based on a particular user and date

    Hi
    I am new to SAP BI. I have installed the info objects from business content by choosing the option select necessary objects while installing the DSO 0PM_DS04. But later i came to know that some of the infoobjects are customized. But after the installation, the customized infoobjects have been overwritten by the latest content from RSA1 and all the customizations have been lost. Is it possible to revert back the changes based on a particular user and from a particular date.
    Please provide the solution as soon as it is possible. Points will be definitely given. Thanks in advance.

    Hello,
    Just for your information thats why the customized objects are givena diffferent name then the BC objects.
    I am not sure why you have customized a BC objects but you should always create a a Z objects if you want a customization.
    Thanks
    Ajeet

  • Function module which uses both BAPI's for sales order create and change

    Please name the function module which uses both BAPI's for sales order create and change.
    BAPI_SALESORDER_CREATEFORMDAT2
    BAPI_SALESORDERCHANGE

    Yup.
    you must write a piece of code for this.
    with if else condition.first check if SO is exsist than use second FM to change it else create new SO from first FM.
    logic somethig like this.
    Amit.

  • Function Module - Calculate 5 weeks lookup based on -7 increments from the Key Date

    Hi Guys,
    I am looking to create a variable on Fiscal Period/Year, that automatically populates the variable with the previous 5 weeks based on -7 increments from the key date , when the user runs the query .
    For Example: If key date is 03/11/2014 need to get previous 5 weeks 03/04/2014, 02/25/2014, 02/18/2014, 02/11/2014, 02/04/2014. mm/dd/yyyy.
    Is there any Function Module available/ please provide the logic code - can anyone help?
    Thanks,
    Suresh Narayan

    Hi suresh,
    Please once try with this approach,
    Create a variable with variable represents :  multiple input value, Processing type : customer exit ; variable is ready for input.
    and write the below code :
    if i_step = 1.
    data : fdate type d ,
            wa1 like line of e_t_range,
           n1 type i.
    n1 = 1.
    if n1 <= 5.
    wa1-opt = 'EQ'.
    wa1-sign = 'I'.
    wa1-low = fdate.
    append wa1 to e_t_range.
    fdate = fdate - 7.
    endif.
    endif.
    Hope you got it,

  • Is there any Function Module will give the Transactional data of a cube?

    Hi Experts,
    I have one Infocube Zco3_BILT , I need to write a routine (BADI Program)on top of this info cube  to fetch a characterstic value in the infocube.
    F table  & Etable wont give any characterstic values.
    Is There any SAP provided FM to give characterstic values of the Infocube.
    Thanks in advance.
    Regards
    Mohan

    Hi Mohan,
    this is correct since the values are stored in different tables (fact, dimension etc) due to star sheme modelling. As far as I know there is no standard function module for this issue.
    However ABAP report RSDD_SHOW_ICUBE might help. This is the report for transaction listcube, all relevant data is build up, there you should find all necessary steps and standard reports/modules to fetch the required characteristic value. Although I do not know the exact requirement you will probably have to work with SID values.
    Perhaps this will help resolving your issue.
    Best Regards,
    Marcel

  • Function Module to pull in variables based on a source variable

    Hi,
    I am new to user exits and function modules and don't know any ABAP, but I need to make use of a user exit to pull in 4 cost center values (0COSTCENTER) based on a single profit center (0PROFIT_CTR) value.  For example, in the planning layout users will select a profit center from the variable screen.  Based on that profit center selection, I want to populate 4 cost centers values that correspond to the following:
    - a "Pproduction" cost center value
    - a "Level 2 R&D" cost center value
    - a "Level 2 Selling" cost center value
    - a "Level 2 Admin" cost center value
    I know I need to create a mapper table that shows what production and level 2 cost centers are to be associated with what profit centers, but I'm not sure how, or where to do that (obviously I have the mapper data already, I just don't know how to set it up in a table that can be read by a function module).  And then I think I need to make use of a user exit (function module) to look up the values in that table so the correct cost center values are pulled in based on the profit center selection. 
    Can anyone offer any advice, and/or provide sample code where I could easily replace the values that are relevant to my situation.  Again, I don't know any ABAP, but clearly I need to learn, so I'm not sure if this is even feasible for me to do. 
    Any advice is appreciated.
    //HC

    Hi,
    You need to create BPS variable of type exit. You can learn it easily. See the following document and you can also search this forum for relevant threads.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/650ee690-0201-0010-4bb7-83c3e2a74039

Maybe you are looking for

  • Updating PSD files in a Flash movie

    Hello.  I'll start off by saying that I'm new to Flash.  I'm using the CS5 Web Premium suite and want to publish an updated version of a Flash movie that contains PhotoShop files which I've recently modified.  Unfortunately, when I open the .FLA file

  • Downloaded Elements 7 won't accept my serial number, Invalid

    I damaged my Elements 7 disc. I had to download Elements 7 from the Adobe website and I am now getting a message that my serial number is Invalid. Adobe customer service told me it is not a deactivation/activation issue and the serial number is good.

  • Nokia E51 VOIP connection

    I have E51 mobile phone and appreciate if anyone in the forum knows how to configure SIP settings for internet telephone using VOIP. Can this be done with EQO or Sype services?

  • Changing Country/Region

    I bought my AppleTV whilst working in USA, now returned to UK. In Settings, I've changed Region to UK but the front page still has CBS,Fox,PBS etc. from America. How can I get the UK front page with the UK content icons? I understood that you could h

  • Backup of nohup.out

    Hi, I am working on an application in which logs are log in nohup.out file. So the file size is increasing continuously and the it is too large. I want to take the backup of nohup.out file without starting the weblogic server in a regular interval of