Customer Exit  for Calendar year/Quarter

Hi Experts,
I had a scenario as I had a Time char 0Calquarter.  Based on this I need to derive the current quarter headcount and Pervious year same quarter headcount.  To get the headcount I defined a counter constant '1' for each employee at cube level.
In a Query
a)  Assign a system date to 0Calquarter variable in query.
b) If the variable is blank till current quarter the headcount need to display and same as previous quarter headcount.
c) If the user enters any value (say 20083) tht quarter current headcount and pervious year quarter(20073) headcount.
For the above scenarios I need to write customer exit. 
Thanks,

Hi Shanthi,
Thanks for u r reply.
Headcount is defined as 'constant'.  when Z_COUNT Keyfigure is dran & droped in rows it'll cumulate and display the current headcount.
hope u understand the headcount.
I require the cmod logic.
Thanks

Similar Messages

  • Customer Exit for Calendar Month based on the day (system Date)

    Hello,
    I need help in creating a customer exit for Calendar month without the user input. The logic is as follows:
    For the BEx variable created with customer exit option and no user input:
    If the day on the system date falls in between 1 to 14 take the calendar year/month value as previous month.
    If the day on the system date falls in between 15 through 31 then take the calendar year/month as current month.
    eg if report is run on March 24th2009 the calendar year/month variable should be calculated as 03/2009 (March 2009)
    if the report is run on March 1st2009 the calendar year/month should be calculated as 02/2009 (Feb 2009).
    The code should be effective when run in the first 15 days of Jan when the previous month would contain the previous year as well.
    Thank You
    Srishti

    Thanks Shanthi. I am trying to incorporate the logic when the query is run in beginning of Jan when the year should be the previous year.Following is the code.please let me know if it would work. Is there a way I can test it as well?
    CASE I_VNAM.
    WHEN 'ZCURCALMON'.
    IF i_step = 2.
    data: mm(2),
            dd(2),
            yy(4),
            FM(6).
    if sy-datum+4(2) EQ 1.
    sy-datum(4) = sy-datum(4) - 1.
    else.
    sy-datum(4) = sy-datum(4).
    endif.
    if sy-datum+6(2) LE 15.
      mm = sy-datum+4(2) - 1.
      concatenate sy-datum(4) mm into FM.
    else.
      concatenate sy-datum(4) sy-datum+4(2)  into FM.
    endif.
    l_s_range-low = FM.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'EQ'.
    append l_s_range to e_t_range.
    Endif.
    ENDCASE.
    Thanks
    Srishti

  • "non assigned" value for Calender year quarter not possible

    All of us know that we can not assign "#" value to calender year quarter.
    In my planning level (which is a part of multi planning area consinsting 2 cubes, Actual COPA cube and Plan COPA cube), I want to copy data from Actual copa cube to plan copa cube using planning function of formula type, but actual copa cube is not getting populated against calyear quarter.
    I want to retain calyearquarter as a characteristic in my level as it is acting as a key to  my plan data. What shoould be done in such a scenario?

    santoshkumar,
    I would suggest you build a characateristic relationship exit on calendar year quarter, probably based on fiscal year period or 0calmonth..  Make sure you leave Calendar year quarter out of your planning level in the copy so it would derive it.
    Hope this helps,
    Mary.

  • Custom Exit for determining previous-year time range

    Dear all:
    I have a problem about custom exit:
    We have created a new object for combining Fiscal Year/Month and Period. So the format will be shown as " yyyymmp"
    now we have one requirement which is determining the same period but previous year based on user input. For Example, if user input start and end period as
    "2006041" and "2006111". There are should be 2 custom exit which are able to convert the user input to be "2005041" and "2005111". We created 2 custom exit for telling the previous-year period.
    Then based on this converted time range, we should be able to extract applicable data. But after testing, we cant get supposing result. The code is following:
    We will be very grateful for any input. thank you all so much
    Calculate (Start)previous year/month/period by current
    *year/month/period
    *user-entry calendar year/month/period
    WHEN 'ZFACLV19'.
          LOOP AT i_t_var_range INTO loc_var_range
          WHERE vnam = 'ZFACYMP1'.
            CLEAR l_s_range.
            LOC_YEAR = LOC_VAR_RANGE-LOW(4).
            LOC_MONTH = LOC_VAR_RANGE-LOW+4(2).
              LOC_YEAR = LOC_YEAR - 1.
            L_S_RANGE-LOW(4) = LOC_YEAR.
            L_S_RANGE-LOW+4(2) = LOC_MONTH.
            L_S_RANGE-LOW6(1) = LOC_VAR_RANGE-LOW6(1).
            l_s_range-sign = 'I'.
            l_s_range-opt = 'EQ'.
            APPEND l_s_range TO e_t_range.
            EXIT.
          ENDLOOP.
    Calculate (End)previous year/month/period by current
    *year/month/period
    *user-entry calendar year/month/period
    WHEN 'ZFACLV20'.
    break ab_william.
          LOOP AT i_t_var_range INTO loc_var_range
          WHERE vnam = 'ZFACYMP2'.
            CLEAR l_s_range.
            LOC_YEAR = LOC_VAR_RANGE-LOW(4).
            LOC_MONTH = LOC_VAR_RANGE-LOW+4(2).
              LOC_YEAR = LOC_YEAR - 1.
            L_S_RANGE-LOW(4) = LOC_YEAR.
            L_S_RANGE-LOW+4(2) = LOC_MONTH.
            L_S_RANGE-LOW6(1) = LOC_VAR_RANGE-LOW6(1).
            l_s_range-sign = 'I'.
            l_s_range-opt = 'EQ'.
            APPEND l_s_range TO e_t_range.
            EXIT.
          ENDLOOP.
    SzuFen

    Hi,
    Try with following modifications:
    ZYEAR1(4) = LOC_VAR_RANGE-LOW(4).
    ZYEAR1(4) = ZYEAR1(4)- 1.
    ZMONTH1(2) = LOC_VAR_RANGE-LOW+4(2).
    CONCATENATE ZYEAR1(4) ZMONTH1(2) INTO LOC_VAR_RANGE-LOW(6).
    With rgds,
    Anil Kumar Sharma .P

  • How to create offset for calendar year/month in BEx Reporting

    HI ALL,
        i have a requirement of creating offset for calendar year/month.Basically i have a characteristic in Rows and volume key figure in Column and i have to put that volume under the calender year /month which is shown below ..
                             Previous Volume           Present Volume
                                     01.2010                             01.2011
    material                    10000                               20000
    how can i create a report for this . by using volume key figure i am creating previous volume and present volume,. how can i put them in key figure do i have to create any structure, selections  for that.... and "" how can i get the present year volume and previous year volume. If i use cal year/month how can i create offset for that.....
    please do let me know in brief...
    Thank you.

    Hi ,
    I think you need data year wise .
    Instead of creating a variable for calmonth and using it in the RKF , you can just drag calyear in columns and keep the Volume keyfigure below it . Keep only one keyfigure Volume and do not restrict it with calmonth or any other variable .
    In this case calyear should not be present in rows or free characteristics .
    You would be able to see the data year wise ..
    Try this and check whether it is according to your requirement
    If You need to show the data as Volume (01.2011)  and Volume(01.2010)
    It means you are only showing data for Jan 2011 and Jan 2010 in the report
    In this case you can retrict Volume keyfigure with a variable and create a customer exit variable
    for 0calmonth as an offset of -1 will bring the data of 12.2010 for Previous Volume(01.2010) key figure which is incorrect .
    For your output you can create 2 customer exit variables :
    One will restrict 0calmonth to current year and another to previous year .
    Check whether this works .
    Also , if you want to show current calendar months data , you can either use a mandatory variable on 0calmonth
    and restrict the same in volume keyfigure or there are std customer exit variable provided by SAP to give current cal month .
    You can restrict the char 0calmonth with this std exit variable if you do not want 0calmonth variable to be mandatory.

  • Fiscal year variant AM is not maintained for calendar year 2008

    Hi All,
    I want to have a different fiscal year variant for asset accounting do to the company go live will be at the third quarter of the year we want to use a shortened fiscal year variant.
    I've already create a fiscal year variant called 'AM' for year 2008 and it is a shortened year-depent variant. Next step is to assign this year variant to the company code in this customizing path
    spro>Financial Accounting>Asset Accounting>Valuation>Fiscal Year>Fiscal Year Variants>Specify other versions on company code level
    When I try to set this and press save button this message is displayed
    "Fiscal year variant AM is not maintained for calendar year 2008"
    Do you know why is displayed this message? Am I missing any customizing step?.
    Many thanks.

    Hi Suresh Upadhyayula ,
    In fact it appears in the proposed value when I press F4. When I press save button this message appears.
    I mean that in this path
    IMG>Financial Accounting>Asset Accounting>Valuation>Fiscal Year>Fiscal Year Variants>Specify other versions on company code level
    You can assign a diferent fiscal year variant to the company code at AA level keeping the one that you have in global paramenters at GL level. We are cosidering this solution due to we want to depreciate the assets in a shortened fiscal year variant at AA level.
    Many thanks.

  • Customer Exit for 15 month from current month

    Hi Gurus,
    I have a requirement to write customer exit for 15 months from current month based on todays day.
    if current day is less than 10 then we have to get 15 months from current month other wise from next month to 15 months.
    this exit I am writing on calendar year/month.
    Please assist for logic.
    Thanks
    Ganesh Reddy.

    I hope this code will do the trick.
    DATA: L_S_RANGE TYPE RSR_S_RANGESID,
    LOC_VAR_RANGE LIKE RRRANGEEXIT,
    zcalmonth(6) type c.
    zcurrentmonth(6) type c.
    zyear(4) type n,
    znextyear(4) type n,
    zyear1(4) type c,
    znextyear1(4) type c,
    zmonth(2) type n,
    zmonth1(2) type n,
    zmonth2(2) type c,
    zmonth3(2) type n,
    zmonth4(2) type c,
    IF i_step = 2.
    CASE i_vnam.
    WHEN '<VARNAME>'.
    zyear = sy-datum+0(4).
    znextyear = zyear + 1.
    zyear1 = zyear.
    znextyear1 = zlastyear.
    zmonth = sy-datum+4(2).
    if sy-datum+6(2) LE 10.
    zmonth1 = zmonth + 2.
    if zmonth1 GT 12.
    zmonth1 = zmonth1 - 12.
    zmonth2 = zmonth1.
    zcurrentmonth = sy-datum+0(6).
    endif
    concatenate znextyear1 zmonth2 into zcalmonth.
    else.
    zmonth1 = zmonth + 3.
    ZMONTH3 = ZMONTH + 1.
    if zmonth1 GT 12.
    zmonth1 = zmonth1 - 12.
    zmonth2 = zmonth1.
    endif
    if zmonth3 GT 12.
    zmonth3 = zmonth3 - 12.
    zmonth4 = zmonth3.
    endif
    concatenate znextyear1 zmonth2 into zcalmonth.
    concatenate znextyear1 zmonth4 into zcurrentmonth.
    endif.
    l_s_range-low = zcurrentmonth.
    l_s_range-high = zcalmonth.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'BT'.
    APPEND l_s_range TO e_t_range.
    ENDIF.
    ENDIF.
    rgds, Ghuru

  • Fiscal year variant Z1 is not maintained for calendar year 2012 when loadin

    Dear Experts,
    We are working on BI7.0 extracting data from ECC 6.0.
    I am trying to load data from 0HR_PY_PP_1 which is a Self DataSource in our BW System (extracts data from 0EMPLOYEE and 0PERSON) to load into ZPA_C50 which is a copy of BCT InfoCube 0PAPA_C02 (Headcount).
    The data has come through into the PSA very well.
    However, DTP is throwing an error while loading 32242 records of data from PSA into ZPA_C50 InfoCube. The error details as below:
    Error while updating to target ZPA_C50 (type INFOCUBE)
    Fiscal year variant Z1 is not maintained for calendar year 2012     FGV     2
    Messages for 1 data records saved; request is red acc. to configuration
    Processing Terminated
    We are actually doing a Re-implementation of BW 3.0b in BI 7.0 Ehp1. We have imported Maintenance of Fiscal Year Variant from the BW 3.0b Production System. So this shouldn't be a problem I guess since I have also checked the setting in SPRO in BI 7.0 Development (New) System and they are looking good.
    Also, when I do a Filter on 0CALDAY in DTP from 01.01.1900 to 31.12.2010, the loads are working fine. I want the load to run without any Filters on 0CALDAY.
    Has anyone been in similar situation. How did you resolve this issue? Your time is very much appreciated.
    Thanks in advance.
    Chandu

    Dear Experts
    Thanks for your time.
    We have resolved this issue ourselves. We have maintained 'Shortened Fiscal Years' for 'Z1' and it is working fine now. Steps are as below:
    In BI Dev System -> SPRO -> SAP Reference IMG -> SAP Customizing Implementation Guide -> SAP NetWeaver -> Business Intelligence -> General BI Settings -> Maintain fiscal year variant -> Select 'Z1' Fiscal Year Variant and then DoubleClick on 'Shortened Fiscal Years' to set the Fisc Year Variant -> Save.
    The dataload should work fine now.
    Cheers,
    Chandu

  • Customer exit for Batch management

    Hi experts,
    I'm using customer exit for batch management for internal number assignment.
    I need the Batch number as i mentioned below 
    DDMMYYB01
    DD-Date
    MM-Month
    YY-Year
    B-Block
    01-Number
    For this i need to give logic. How to give i'm not getting. This batch number creation will come at the time of GR.
    Anybody help me?
    Naren

    Hi
    Please use the user exit SAPLV01Z as I mentioned in your other thread, please go to SMOD to read its documentstion.
    In SMOD, select the 'Documentation' and click 'Display', this will show the overview documentation.
    Select the 'Componnet', then ciick the 'Display'. select each component and click 'Documentation Ctrl+F4) this will show the detailed documentation of them.
    Best Regards.
    Leon.

  • Calendar year quarter

    dear all,
    any function module in bw which returns me the calendar year quarter for 0CALQUART1 and 0CALQUARTER.
    while we on the data subject, what does 0FISCVARNT do? thanks.

    Hello Amit,
    thanks for replying once again.
    i dont want current or previous quarter... nothing wanting to write my own routine, is there any function module in sap which e.g. throws in a date 21/02/2001 and it returns me the quarter.

  • Close shop order Fiscal year variant B2 is not maintained for calendar year

    Hello,
    I know there are already some threads in the forum about this error, but I could not find an answer that works for me.
    Here is the scenario:
    We do want to close a production order in CO02. (CO02-functions-restrict processing-close).
    I get an error message u201CUnprocessed future change recs for order xxprevent del. flag/completionu201D
    Message no. CO688
    Transaction COFC shows me 6 errors (all the same) for this production order, I guess this might be the reason for the previous error:
    u201CFiscal year variant B2 is not maintained for calendar year 2006u201D
    When I now go into OB29, it shows entries for B2 for the year 2006, it has 12 periods, so it looks fine for me.
    Any suggestions?
    Thanks
    Anne

    - check out this note
    https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=487683
    Note 487683 - CO688 for 'complete technically' or set deletion flag
    Symptom
    An order should be technically completed or the deletion flag should be activated for the order.
    The action cannot be carried out since the system issues error message CO688 "Unprocessed future change recs for order & prevent deletion flag/completion".
    Even after you have started report CORUPROC for processing the unprocessed future change records, the action cannot be carried out.
    Other terms
    Archiving, complete technically,
    LÖVM, TABG, CO688, CO 688
    Reason and Prerequisites
    The action cannot be carried out since there are incorrect goods movements or incorrect actual costs for the order.However, this option is not mentioned in the long text of message CO688.
    Solution
    With the aid of Transactions COGI and COFC, you must check whether there are incorrect goods movements or incorrect actual costs for the order and you must post-process them.
    You can change the long text of the message as follows by using Transaction SE91 in order to add missing information:
    Diagnosis
    For the order, you must still process future change records or error records from the confirmation for confirmation processes.These are the possible confirmation processes:
    automatic goods receipt
    backflush
    actual cost determination
    data transfer to HR
    System activities
    For orders with confirmation processes to be post-processed, setting of the deletion flag or of status 'completed' has not been planned.
    Procedure
    You must process the unprocessed future change records with the help of
    predefined confirmation processes</> or
    with the aid of program CORUPROC, when you dispatch it in Customizing in a background job (dispatch background jobs: confirmation processes).
    You must check whether there are incorrect goods movements or incorrect actual cost determination for the order and you might have to post-process them:
    post-processing of incorrect goods movements</>
    post-processing of incorrect actual cost determinations</>

  • Fiscal year variant Z1 is not maintained for calendar year 9006

    Hello Experts ,
    I am tring to load data into Cube from ECC datasource.  The load till PSA is fine but  during DTP load I am getting the followig error .
    "Fiscal year variant Z1 is not maintained for calendar year 2009006"
    I tried to  reload "Global settings from System system " But did't worked . Just to let u know  our client is retail client and using 4-4-5 fiscal year .
    Pls help what should I do.
    I saw 0FISCPER AND 0FISCYER Infoobjects in BI but could not find thing .
    Your Help will be Highly Appreciated .
    Thanks
    Pankaj

    You have a few choices on how to handle this:
    1. Have a functional person update the Fiscal Year Variant in your ECC source system to include periods for Fiscal Year 9006. Then update Global Settings.
    2. Update the Fiscal Year Variant in your BW environment, in the IMG (SPRO > SAP Customizing Implementation Guide > SAP NetWeaver > Business Intelligence > General BI Settings > Maintain fiscal year variant).
    3. Filter out the data for that Fiscal Year in your DTP.
    4. Modify the Transfer Rules / Transformation to change this date to an acceptable Fiscal Year/Period.
    These are in order of preference (best practice) on how to handle this.

  • Fiscal year variant 01 is not maintained for calendar year 2001

    Dear Experts,
    I have a question regasting the InfoObject 0FISCYEAR. When I load the data from PSA to my customized ODS, I'm getting the following error.
    1. Fiscal year variant 01 is not maintained for calendar year 2001.
    2. Error when assigning SID: Action VAL_SID_CONVERT table 0FISCYEAR.
    3. Activation of M records from DataStore object ZDS_GLCD terminated.
    4. Process 000015 returned with errors.
    I tried the posted solutions in the Forums, but still I could not solve the problems.
    Please help me solve the problem.
    Full point will be rewarded.
    Thanks and Regards,
    Azimah Abdullah

    Hi,
    Check the table T009B, see whether the fiscal year variant 01 for the year 2007 is maintained or not. If it is not maintained, then go to rsa1, select ur source system and on the context menu select "Transfer Global Settings".
    Regards,
    Dinesh D

  • Error FGV002: Fiscal year variant & is not maintained for calendar year &

    Hi all,
    I am facing a unique problem in BW production. This is not happeneing in my Development.
    Whenever I goto table    "/BI0/SFISCPER" or do F4 on any Fiscal Year / Peiod field, I get the message " Error FGV002: Fiscal year variant R1 is not maintained for calendar year 2005"  . In my client R1 is Shortened Fiscal Year.  But we are not using this for year 2005 and most years. And the message is Type Error. I tried to debug but the code enters in 100 odd Function Modules and does not give any answer.
    My Finance Person has checked the settings in transaction SPRO > SAP Reference IMG > BW Customizing Implementation Guide > Business Information Warehouse > General BW Settings > Maintain Fiscal Year Variant). They are exactly identical to R/3 production setting.
    I have already done rebuild of Fiscal Year Variant from Source System by right clicking and loading data again.
    I am using BW 3.0B with Bi Content 3.1 . Please advise urgently.

    Hi TCS
    Please check these SAP notes in advance:
    1619823
    1835628
    Please advice if this helps.
    Regards
    PC

  • Customer Exit for 13 month from current month

    Hi Gurus,
    I need a customer exit for 13 months from current month. Based on the requirement I have written following code
    When 'VPI_13CALYRMON'.
        IF i_step = 1.
          l_s_range-sign = 'I'.
          l_s_range-opt = 'BT'.
          l_s_range-low = sy-datum+0(6).
          l_s_range-high = sy-datum+0(6) + 13.
          append l_s_range to e_t_range.
        endif.
    Please could you guide me the code.
    Thanks
    Ganesh Reddy.

    Hi,
    I think you can do it in below way.
    When 'VPI_13CALYRMON'.
    IF i_step = 1.
    temp1 = sy-datum+0(4).
    temp1 = temp1 +1. (because adding 13 months would take year to next year)
    temp2 = sy-datum+4(2).
    temp2 = temp2 + 1. (after adding 13 months, the month would be one more than of previous year)
    concatenate temp1 temp2 into temp3.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'BT'.
    l_s_range-low = sy-datum+0(6).
    l_s_range-high = temp3.
    append l_s_range to e_t_range.
    endif.
    Hope this helps.

Maybe you are looking for

  • Consumed Budget Getting Reversed

    Dear All, I am facing one typical error, please help me out to resolve the same. Issue:     Consumed Budget is getting reversed after MIGO Scenario:    I've Created a Material PO for which system has done the AVC check and posted the budget document

  • Video chatting with windows vista

    is it possible to video chat with window or windows vista? whenever i try t chat with someone who also has a camera it says communication error. does anyone have any answers or advice?

  • TV signal from T60p VGA port ?

    Hi ! I would like to connect my T60p laptop to a TV. I saw VGA to RCA/S-Video cables available, but they require to have support for TV (RCA/S-Video) output through VGA port. This is the recommendation from the VGA to Svideo/RCA cable seller: "please

  • IMovie crashing upon miniDV import?

    Trying to import home videos into iMovie, but it will import a few minutes of video and then freeze up and crash. Any ideas? Below is the code: Process:         iMovie [1335] Path:            /Applications/iMovie.app/Contents/MacOS/iMovie Identifier:

  • Tree Control Updated.

    On Tree control i wish to provide link click or double click and a context menu simultaneously. How can i do that using cl_gui_alv_tree and version 4.6c.