Gettings Fiscalyear period from Billing date code required

Hi All,
my requirement is to get FISCAL YEAR PERIOD from Billing Date .Can any one send me the code to be written in transformation.
Thanks in advance

Hi ,
Please use the function module DATE_TO_PERIOD_CONVERT.
Give your billing date under I_DATE and Fiscal variant under  I_PERIV (for eg 10).
This will gove you the posting period and fiscal year .Now concatenate year and posting period to get fiscal period.
Below is the sample code
call function 'DATE_TO_PERIOD_CONVERT'
    exporting
      i_date                      = Billing date
      i_periv                     = Fiscal varinat
    importing
      e_buper                     = lv_period
      e_gjahr                     = lv_year
    exceptions
      input_false                 = 1
      t009_notfound               = 2
      t009b_notfound              = 3.
  if sy-subrc = 0.
      ls_time-fiscper(4)      = lv_year.
    ls_time-fiscper+5(2)    = lv_period.
endif.
This will solve your problem.
-Vikram

Similar Messages

  • FM to calculate fiscalyear period from current date

    Experts,
    Is there any FM which outputs fiscal year period in the format mmm/yyyy when current date is given as input. I need this coz i want to automatically calculate current fiscalyear period for a query variable..
    Thanks,
    DV

    Hi Edwin,
    When i expand the Fiscalyear Period infoobject in the query design in globval view, i donty see 0F_FPER. Does that mean it has to activated from Business Content? Or can i create a variable like that one??
    DV

  • How to derive Budget Period from Delivery date in PR/PO

    Hello Gurus,
    I have activated the Budget Period functionality in FM (BCS). I am deriving the budget period from Posting date but in case of PR/PO I want to derive it from Delivery date instead of Document/Posting Date.I know it is not possible while standard derivation. Could any one help me with some suggestion like if I can use some exit/BaDI in MM. Also I am creating a PM order and at the time of release of PM order system creates the PR in background hence I need to know some kind of exit/BADI which can be called to update the Budget Period field in PR.
    Thanks in Advance!
    Regards
    Rohit Goel

    Hello Eli,
    I have one more query to ask on the above scenario.
    The scenario is my delivery date in PO is say July but I did good issue in May hence the Budget Period should be May and not july in my GR and IV.
    Now when I am doing GR in May then system is showing the Budget Period as July in GR document but in FM Document it is populating as May. I have defined a derivation strategy to derive budget period from posting date so may be because of that.
    But when I am doing IV then it is again moving the amount from May to July. It may be right behaviour that system is deriving all the account assignment from Source document but is there any way to overwrite.
    I have defined the derivation strategy with the condition that overwrite with new value if already written (Deriving from Posting Date to Budget Period).
    Please guide me on this if possible.
    Thanks in Advance
    Regards
    Rohit

  • Design of Cube for Year and Period from Posting Date

    Experts,
    In my report requirement one of the selection criteria is Year and Month (YY-MM) which needs to be got from the Posting Date.
    In my ODS I have a 0PSTING_DATE. What infobjects are needed in the cube to get the value of YY and Period and the mapping from the 0PSTING_DATE to these infoobjects.
    Thanks,
    Raj

    Hi Rajesh,
    Time Update:
    When performing a time update, automatic time conversion and time distribution are available.
    Direct Update: the system automatically performs a time conversion.
    Time Conversion:
    You can update source time characteristics to target time characteristics using automatic time conversion
                   Check here..........
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/e5/f913426908ca7ee10000000a1550b0/content.htm
    Thanks,
    Vijay.

  • Calculate "remaining period" from key date and end-of-term

    Hello BEx fans
    We are reporting on InfoCube 0CFM_C10, Positions for Position Value Date.
    http://help.sap.com/saphelp_bw32/helpdata/en/0b/eaf69b46f2304291b9533a15e5fead/frameset.htm
    As filter variable we have 0CALDAY which is a key date, showing the positions for position value at the given (key) date.
    End-of-term, 0FS_TRME_D, is a navigational attribut of 0CFM_SEC_ID (ID Number of Securities & Futures).
    We have the following characteristics for reporting:
    0CFM_SEC_ID and 0COMP_CODE
    We have some position key figures also for reporting.
    Now we would like to calculate the "remaining period" in years which is calculated as ((" 0FS_TRME_D" minus "key date") DIV 360).
    The key date is given by the business user when executing the query.
    How would you calculate this "remaining period"?
    Thanks
    BEOplanet

    Hi,
    As you know that Key date works with Time dependent Master data for that particular data enters by User. This key date is applicable for the entire Query.
    If you want to apply some logic like Key Date-1 could be implemented by creating an User Exit variable which takes input as Key date and this will return the required result.
    A helpful document for you:----
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/25d98cf6-0d01-0010-0e9b-edcd4597335a
    Regards,
    Suman

  • Accounting document number from billing data

    hi
    i have billing document with multiple items. I need to find out the accounting document number corresponding to each of the billing document item. which tables i need to refer for this.give me the field names.
    thanks

    Hi,
    You can read the FI document with the function module AC_DOCUMENT_RECORD
      call function 'AC_DOCUMENT_RECORD'
        exporting
          i_awtyp      = 'VBRK'
          i_awref      = awref
          i_aworg      = aworg
          i_awsys      = awsys
          i_awtyp_incl = 'BKPF'
          i_valutyp    = '0'
          x_dialog     = ' '
        tables
          t_documents  = docs_fi
        exceptions
          no_reference = 1
          no_document  = 2
          others       = 3.
    where docs_fi is as the table ACC_DOC. Read the records where awtyp = 'BKPF' in itab docs_fi. Search AWREF, AWORG and AWSYS in equivalent fields in table VBRK.
    I hope this helps you
    Regards,
    Eduardo
    Edited by: Eduardo Hinojosa on Jun 14, 2010 3:35 PM

  • Change billing date for first scheduling period in VA41

    Hi,
    Requirment: At the time of Contract creation, the first scheduling period amount will be compared to a fixed threshold value. If it is less than that threshold value then change its billing date to next schedule period's billing date.
    I have tried so many user-exits but hey are not triggered at the required point of time.
    As soon as we create the contract the dates will be changed accordinly.
    Also do we have any function module to change date if we make a Z program.
    bye
    Divya

    hello,
    SDAPO001  Activating Sourcing Subitem Quantity Propagation
    SDTRM001  Reschedule schedule lines without a new ATP check
    V45A0001  Determine alternative materials for product selection
    V45A0002  Predefine sold-to party in sales document
    V45A0003  Collector for customer function modulpool MV45A
    V45A0004  Copy packing proposal
    V45E0001  Update the purchase order from the sales order
    V45E0002  Data transfer in procurement elements (PRreq., assembly)
    V45L0001  SD component supplier processing (customer enhancements)
    V45P0001  SD customer function for cross-company code sales
    V45S0001  Update sales document from configuration
    V45S0003  MRP-relevance for incomplete configuration
    V45S0004  Effectivity type in sales order
    V45W0001  SD Service Management: Forward Contract Data to Item
    V46H0001  SD Customer functions for resource-related billing
    V60F0001  SD Billing plan (customer enhancement) diff. to billing plan
    Badi's
    BADI_SD_SCH_GETWAGFZ Scheduling Agreement: Read WAGFZ from S073
    BADI_SD_V46H0001     SD Customer functions for resource-related billing
    Thank u ,
    santhosh
    Edited by: santhosh kumar on Feb 9, 2009 7:59 AM

  • How to set Service render date should be equal to Billing date

    Hi All,
    At present when invoice is created the service rendered date (FBUDA) is taken as the basis for the Rebate condition types to select the condition value from the agreement.
    The business requires that for the rebate conditions, service rendered date should be equivalent to the billing date, so that correct agreement is selected based on the billing date.
    Required Change: Service Rendered date should be equivalent to the Billing Date for only Rebate condition Types and only for particular Sales Org.
    To achieve this how can I proceed, I have gone through all user-exist for billing no where I have found
    Could you please guide me to achieve this functionality?
    Thanks and Regards,
    Jaya.G

    Hi Yadav,
    My requirement is to put the billing date in service render date
    I.e. in my scenario the Actual GI date is populating into billing date and also in service render date (komk-fbuda)
    If we enter billing date manually while creating the billing that should be reflect in service render date, in condition level.
    Here it is not happening, it is taking the Actual GI date in service render date,
    Here VBRP-FBUDA is different form komk-fbuda.
    Vbrp-fbuda is have to reflect form Actual GI date only
    My requirement is, I need to populate the billing date into service render date for some conditions only. These conditions are rebate type conditions.
    I can populate the billing date to all conditions not for particular conditions
    In user exit userexit_pricing_prepare_tkomk
    I can move the vbrk-fkdat to tkomk-fbuda
    But this not my requirement
    I need to populate the billing date to service render date to some conditions types only
    In this exit I canu2019t restrict the conditions, I mean in this routine I am not able to select the condition types
    Please advice me where can I write the code to achieve my functionality
    Thanks in Advance
    Jaya.G

  • Billing Date change to past date.

    Hi,
    Basically, I want to change the billing dates of few Invoices generated on 4 December 2008 to 29 November 2008 due to some tax changes in business.
    Is there any way we can change the billing date of an invoice to a past date?

    Dear Christino,
    Check with,
    T. Code: VF02
    Key-in your Invoice Doc. No. and "Enter"
    From menu bar,
    Go To --> Header --> Header
    Under Tab: Accounting Data, there is one Field: Billing Date, which would be in Editable-mode.
    Change the Billing Date, as required.
    Best Regards,
    Amit

  • Urgent!!Calculate PERIOD frm Sytem Date or Load Date!!

    Hi experts,
    How to write an ABAP code in BI7 to Calculate PERIOD frm Sytem Date or Load Date???
    Pls help me ASAP...
    Edited by: SAP BI Learner on Jul 1, 2008 4:46 PM

    Please search before you post - for starting, see one thread below.
    FM to calculate fiscalyear period from current date

  • Customer exit code for fiscalyear period based on system date

    Hi Experts,
    Please provide customer exit code for fiscalyear period derive based sy-datum. Fiscal year period derivie current to previous 12 periods and current to fast 12 periods.
    Thanks,
    Subbaraju

    Hi Subbaraju,
    Please use below customer exit code for your solution. Please define declarations as per requirement.
    When 'ZFPERIOD'.
    IF I_STEP = 2.
    ztoday = sy-datum.
    zfast = sy-datum + 365.
    CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
      EXPORTING
        i_date               =  ztoday
        i_periv              = 'K4'
    IMPORTING
       E_BUPER              = PERIOD2
       E_GJAHR              = YEAR2.
    CONCATENATE YEAR2 PERIOD2 INTO FISCPERLOW.
    CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
      EXPORTING
        i_date               =  zfast
        i_periv              = 'K4'
    IMPORTING
       E_BUPER              = PERIOD2
       E_GJAHR              = YEAR2.
    CONCATENATE YEAR2 PERIOD2 INTO FISCPERHI.
    L_S_RANGE-LOW = FISCPERLOW.
    L_S_RANGE-HIGH = FISCPERHI.
    L_S_RANGE-SIGN = 'I'.
    L_S_RANGE-OPT = 'BT'.
    APPEND L_S_RANGE TO E_T_RANGE.
    ENDIF.
    Similar code user for your previous periods also.
    Thanks,
    Chandra

  • Downloading apps it asks for apple ID Pass then it says "verification required". Then says Security Code required. Doesn't accept code. itunes doesn't accept code from visa card either?Please Help

    Downloading apps it asks for apple ID Pass then it says "verification required". Then says Security Code required. Doesn't accept code. itunes doesn't accept code from visa card either?Please Help

    If it is trying to verify your payment info, I would be willing to guess that it is looking for the security code for your credit card. Did you credit card just get replaced lately or the expiration date change? When is the last time that you updated your payment information in iTunes?

  • Billing date(fkdat) in sales order item is not copied from Goods Issue Date

    Hi All
    we are facing problem at item level billing date field.This field should be filled with the GI Date in schedule lines shipping tab.
    but, it(billing date) is not being filled with goods issue date but, with the required deliver date at sales order header.
    Please give me a solution and the root cause. This is urgent as business is halted.
    Thanks
    Kumar

    Lakshmipati
    This is from SAP Screen
    "If invoice dates are defined for the customer, the system proposes the billing date from the invoice date calendar. If no invoice dates are agreed, then the actual goods issue date is formed on the basis of delivery related billing. In order related billing, the billing date of the order forms the basis of the billing date."
    earlier it is happening as desired.i.e., billing date=GI Date.
    but, as of now it is taken from the required delivery date.
    Please give me solution
    Kumar

  • Check required for Required Delivery date not to be copied in Billing date

    Hi Friends,
    We have a requirement by the client that if we change the required delivery date in the order,the billing date should not be changed at the sales order item level.
    Requirement comes from the fact that management decides a day on personal negotiation, when should be the billing date and the delivery date is independent of billing date.
    As of now ,we are billing based on the sales order therefore the billing date is changed if we change the required delivery date.
    I would be grateful,if anybody can help me.
    Regards,
    Amit Kashyap

    Hi Amit,
    You have to maintain the invoicing dates in payer master {billing document tab}, which in turn will control the billing dates. As per the agreement with the customer you will create a calender which needs to be filled in the above mentioned field in the customer master.
    Reward points if you are satisfied with my view.
    Hrishi

  • How to get the values from struct data type using java code..?

    Hi ,
    I am newer to java.
    we are using oracle database.
    How to get the data from struct data type using java code.
    Thanks in Advance.
    Regards,
    kumar

    Hi Rajeev,
    To retrieve a FilterContainer you will need to traverse the report structure:
    ReportStructure boReportStructure = boDocumentInstance.getStructure();
    ReportContainer boReportContainer = (ReportContainer) boReportStructure.getReportElement(0);
    FilterContainer boFilterContainer = null;
    if (boReportContainer.hasFilter()) {
         boFilterContainer = boReportContainer.getFilter();
    } else {
         boFilterContainer = boReportContainer.createFilter(LogicalOperator.AND);
    Calling boDocumentInstance.getStructure() will retrieve the entire structure for the document.
    Calling boReportStructure.getReportElement(0) will retrieve the structure for the first report of the document.
    Hope this helps.
    Regards,
    Dan

Maybe you are looking for

  • Back to back ordering

    Hi Experts, If I create a Sales Order with the Purchase Order checkbox ticked, the Sales Order creates a Purchase Order. If I open the Purchase Order and hit the button to find the target document, it opens the source Sales Order.  Is there any way t

  • Purpose of Check Boxes on New ITunes

    I just downloaded the newest iTunes. A check box appears on every song and is checked. When I uncheck it my song disappears. Anyone know what's going on???

  • How to completely delete Backups.bakupdb from trash?

    I copied the Backups.backupdb from my external drive onto my desktop.  Later I changed my mind and decided to delete the whole thing so I put it in the trash.  Then I "emptied" the trash.  Everything got tossed except this folder.  How can I permanme

  • Issue playing more than 2 tracks in a row.

    I have an issue with my ipod classic.  If I select to play an album or playlist it will only play 2 songs then will show any other songs as 0.00 and skip past them.  But if I press the menu button then enter the a song it would not play it does actua

  • Ipod touch wont turn back on after reset

    I did a complete reset and now the the apple comes on then afer  a few mins the screen flashes bright white then goes to black then the aplle comes back any help