HS.Alloc function in HFM

<p>Hello All,</p><p>Can we use the HS.Alloc function in the calc routine apart fromthe allocate routine in HFM .The admin guide says that HS.Alloc canbe used in the Calculate routine but such usage returns in a runtime error .Any advice or help would be appreciated.Thanks inadvance...</p><p> </p><p>Navy</p>

As far as I know (still on HFM 4.X!), HFM doesn't have a predefined average function. You will need to define a new function in your rules as shown below. I got this from tech support a while back. The parameters are a little different to what you have in your example so you may have to tweak. Is the "3" in your example the period number?
Function Average(strPOV,strFreq)
     DIM nPERIOD
     DIM strCUM
     DIM i
     If strFreq="PERIODIC" Then
          If HS.PERIOD.ISFIRST=TRUE Then
               nPERIOD=1
          Else
               nPERIOD=2
          End If
     ElseIf strFreq="YTD" Then
          nPERIOD=HS.PERIOD.NUMBER()
     Else
          EXIT FUNCTION 'Nothing to do -
     End If
     For i = 0 To nPERIOD -1
          If i= 0 Then
               strCUM = strPOV &".W#PERIODIC"
          Else
               strCUM= strCUM &"+"& strPOV &".W#PERIODIC.P#CUR-"&i
          End If
     Next
     Average = "(("& strCUM &") / "& nPERIOD &")"
End Function

Similar Messages

  • How to create a info structure for product allocation functionality

    Hi Experts,
    how to create a info structure for product allocation functionality
    For allocating fixed quantities to the specified customers at sales order
    Especially i need help in selecting the key figures and key charecterstics for at mc21 and mc24 t.codes(source feilds)
    plase provide product allocation functionality with screenhots
    thanks in advance
    rp
    Edited by: rajendraprasad vasam on May 21, 2008 2:19 PM
    Edited by: rajendraprasad vasam on May 21, 2008 2:19 PM
    Edited by: rajendraprasad vasam on May 21, 2008 2:20 PM

    Hello,
    please have a look at the infostructure S140 in transaction MC23 and MC26.
    this is the standard infostructure for product allocation.
    I hope that the information are helpful.
    Regards
    Claudia

  • Allocation Function in Integrated Planning

    Dear all,
    When reading the documentation on Integrated Planning ("New BI Capabilities..") I noticed the Allocate function is not mentioned.
    These functions are mentioned:
    Revaluation
    Reposting
    Formulas
    Currency translation
    Unit conversion
    Copy
    Distribute with reference data
    Distribute by keys
    Delete
    Is the Allocation function not available in Integrated Planning. Or is it now called "distribute by keys"? Would be confusing...
    Kind regards,
    Hans de Klein

    Dear all,
    the allocation function is part of the SEM installation and since SAP BW3.5 not part of planning itself. When installing the SEM, the allocation function is available in BPS but not in BI Integrated Planning.  
    From my perspective there two typical situations for allocation of e.g. costs from costcenter/costelement:
    1. The sender Costcenter/costelement is credited:
    In this case the standard distribution function (within one characteristic) would do the same.
    2. An other costcenter/costelement is credited:
    Here you would require a combination of a fox formula (to copy the sender to the 'other' combination and to reverse the sign) and as a second step the standard distribution function (within one characteristic, with the option of not crediting the sender).
    Best Regards, Olaf Fischer

  • Average function in HFM returning error

    Hi
    I have written the following script in HFM calculate routine for calculation of averages. But it gives me an error.
    Has anyone used this function and can point out the error in this please?
    SUB SUBSaVG
    HS.EXP "A#AverageSales = " &Average ("A#Sales","3")
    END SUB

    As far as I know (still on HFM 4.X!), HFM doesn't have a predefined average function. You will need to define a new function in your rules as shown below. I got this from tech support a while back. The parameters are a little different to what you have in your example so you may have to tweak. Is the "3" in your example the period number?
    Function Average(strPOV,strFreq)
         DIM nPERIOD
         DIM strCUM
         DIM i
         If strFreq="PERIODIC" Then
              If HS.PERIOD.ISFIRST=TRUE Then
                   nPERIOD=1
              Else
                   nPERIOD=2
              End If
         ElseIf strFreq="YTD" Then
              nPERIOD=HS.PERIOD.NUMBER()
         Else
              EXIT FUNCTION 'Nothing to do -
         End If
         For i = 0 To nPERIOD -1
              If i= 0 Then
                   strCUM = strPOV &".W#PERIODIC"
              Else
                   strCUM= strCUM &"+"& strPOV &".W#PERIODIC.P#CUR-"&i
              End If
         Next
         Average = "(("& strCUM &") / "& nPERIOD &")"
    End Function

  • Allocations in HFM

    Hi all,
    I am wondering if anyone has experience or has used the Allocation function in HFM.
    Thank you in advance,
    Regards,
    Thanos

    Hi Kelly!
    Thank you for the answer.
    We have already started writing and the allocation rules for cost related accounts from parent entities to base entities and it seems quite handy for the users who used to extract the data into excel and then create journals in order to allocate the costs on the appropriate entities. Now, the users only have to trigger the allocation.
    I created this topic in order to hear/collect the experiences of other users (like you) because based on my experience there are not a lot of hyperion applications that use the allocation.
    Regards,
    Thanos
    One Truth about...: ..calculation options

  • MAX function possible in HFM?

    Hi
    Is there some function in HFM which can return maximum of set of values.
    for a report, i need to find the max of a values against C2 -- but i could not find any HFM function to that effect.
    Has anyone tried and done it ?

    If you want to find the MAX value you have to write a calculation script for the same as HFM does not have any predefined MAX function. But if this is just for the purpose of reporting then you can use the functions in the reporting tool for the same.
    Varun
    Edited by: Varun Kaushal on Mar 18, 2010 9:49 AM

  • Product allocation error while creating a sales order

    Hi Gurus,
    My client is using the availability check against  product allocation functionality in sales order.while I am creating the sales order and entering the material system is throwing the error message product allocation XXX is invalid,after pressing the enter button system has thrown another error "incorrect index structure for table XMVERF_POS/000010" and unable to save the order.
    I have checked the material master and the product allocation is assigned in basic data 1 view,I have also checked the IMG settings it has maintained and assigned to infostructure.Please let me know is there any config settings are missing related to product allocation.
    Regards,
    hari challa.

    Please check if storage location is populated for the material. Also may be this material is a non-stock material and not relevant for storage location check.. If you have any non-stock items in your order and if you are populating the storage location in the order automatically, then this happens. Please check your code and bypass the check for non stock items.
    Hope this helps
    Regards
    Sai

  • Complications in the Product Allocation

    Dear SAP Gurus,
    I am facing lot of problems in configuring the Product Allocation.
    Problem-01
    I started creating new Info Structure S561 copying the existing Info Structure S140 as the Info Structure is to be assigned in OV3Z (Specify hierarchy).
    The problem is that the Table MCVOBJECT is not appearing in the u201CCharacteristics for 0001 Incoming Orders Quantityu201D in the transaction code MC25. I tried to insert the Table name as MCVOBJECT and Field name as KONOB against the characteristics u201CProd Allocation obj.u201D but I got the error message as u201COnly source fields from MC Communication structures allowedu201D
    Only few Table names are available after pressing F4.
    Please help me how I can put the Table name MCVOBJECT and field name KONOB in the Characteristics for MC25.
    Problem-02
    In OVZ0  (Define Flow according to requirement category) I am not able to create new Requirement even in the change Mode. But I found some of them started with Z i.e. it has been created by somebody. I am in IDES system.
    Problem-03
    The same issue in OVZ8  (Process flow for each Schedule line Category) I am not able to create new Requirement even in the change Mode. But I found some of them started with Z i.e. it has been created by somebody.
    Please guide me how to create a new requirement and assign it.
    Problem-04
    When I am checking in OV8Z (Check setting in Product Allocationu201D, the following comments appear. If anybody guide me on this basis I will be grateful to him.
    u201CProd.alloc.detmtn prod: PRODUCT Description: Various Items
      Use for following materials:
        1478
      Method:
        Cumulative check
          Step: 01 Description: First step Info struct.: S561
            Info struct.
              Planning version 000 is defined for info structure S561 .
              Periodicity M ( ) is set for info structure S561 .
            Update
              Updating is not defined for S561 at schedule line level!
              The update date is not permitted for S561 (permitted; MBDAT , WADAT , EDATU )!
              The period settings for info structure S561 agree
              The info structure is updated synchronously.
              Formula 146 is used for the order incoming quantity
              Not every characteristic has a formula
            Plng
              No allocation quantities have been defined for product allocation object MCA1 !
              End of allocation validity is always end of a period (PRODUCT ,01 ).
              The product allocation objects are entered in the planning hierarchy.u201D
    Problem-05
    Where should I put the quantity because when I am creating Sales Order no Product Allocation function is working.
    Problem-06
    I have used Transaction code MC8A for creating Planning type but every time I put some value and save but after that in change mode I am not finding those values.
    Regards,
    Jans

    Hi Lakshmpathi,
    Please help me in solving these problems,
    Thanks,
    Jans

  • BPS Allocation (BCS) using Debit/Credit (no balance available)

    Hello,
    BPS allocation seams to expect a balance instead of debit credit sign.
    We are using debit and credit sign in Planning (0DB_CR_IND). This seams to be the reason why allocation can not be used in SAP standard. We would need to program an individual allocation program. Is this correct?
    Lets make an example
    Cost Center A
    Credit: 50 Euro
    should be allocated 100% to another cost center B.
    Debit: 0 Euro
    The allocation function would post the following
    Cost Center A
    Credit: -50 Euro
    which is wrong, because the costs would disappear from Cost Center A
    It would be necessary to post
    Cost Center A
    DEBIT: +50 Euro
    Is there any possibility to use SAP standard to allocate with consideration of debit/credit sign?
    If not we would create a temporally key figure, calculate the balance and then distribute with allocation. Afterwards we would post the distributed amounts back to the key figure with consideration of debit/credit sign. But this solution seams to be far away from SAP standard.
    Does anyone have any comments?
    Thanks in advance
    Eckhard Lewin

    Not all things get charged to store credit.
    Even if you lost the cards, iTS can see what you redeemed. Contact them and they can dig around to see what's going on.
    iTunes Store Support
    http://www.apple.com/emea/support/itunes/contact.html

  • Question about use of HypFindMember in HFM (It doesn´t work)

    Hello to all. I posted this message in Financial Consolidation forum, but there suggested me to better post this message in the Essbase forum. Hope someone can help me with this issue. I'm just a beginner in this matter. I'm trying the HypFindMember for HFM.
    I'm doing some tests with the SmartView's VBA Functions. In particular I have some problems with one of them to obtain a result... this is the HypFindMember function. I tried the following code:
    X = HypFindMember(Sheet1, "1000000", "Default", dimName, aliasName, genName, levelName)
    but the result for "X" is always 10003 (should be zero). The previous step was HypConnect and was successful. Do you know if something in the middle should be executed for this function? The manual does not specifies a previous requirement to execute the function, besides the connection to the server and the MemberName ("1000000").
    In the SmartView manual is specified that HypFindMember works with Essbase and Financial Management. I'm using HFM 9.3.1
    In case that the HypFindMember definetly doesn´t work in HFM, do you know other way to validate if a member exists in a HFM application? (using SmartView)
    Thank you in advance.
    Edited by: Ricardo H on Apr 13, 2009 8:32 AM
    Edited by: Ricardo H on Apr 13, 2009 9:20 AM

    Hi,
    one year later, but I have exactly the same problem.
    Could someone explain how I can use that function with HFM ?
    High positive number should be a server connection problem,
    but other functions work.
    Hope u can help me

  • Issue with Loading COMMENTS in HFM ICT Module from FDMEE

    Hi,
    We have a requirement wherein we can load all the HFM ICT Transactions from a Flat File using FDMEE. We are facing 2 issues:
         a. Firstly FDMEE Target application allows us to map only COMMENT1 as a dimension for FDMEE. There is no Dimension/Place holder for COMMENT2. So how do we do this?
         b. Secondly, COMMENT1 is by default mapped to ATTR11 of the Target Application in FDMEE. Now, ATTR3 is only VARCHR2(20) whereas the actual Comment Size supported by HFM ICT Module is 256 charachters. So how to we ensure that we can load a larger comment from FDMEE?
    Thanks!

    FDM does not perform the consolidation function in HFM. It will caculate a Base Entity if you Enable Consolidation, Force Calculate, and Force Translate in the Integration Settings.

  • Can't use memory allocated in C to write then read BitmapData in AS

    Hi all,
    I've been attempting to use Alchemy to allocate a chunk of memory in C, and then write a bitmap to the memory (via getPixels) which is I would then be able to modify using my super fast C image processing functions.  I've been following the "Memory allocation in C with direct access in Actionscript (FAST!!)" section from here.
    The problem is that when I allocate the memory in C, then try to display the image using setImage, all I see is a black box on the screen.  The code below shows how I use getPixels to fill the C memory region with my bitmap data, then use setPixels to fill the BitmapData object which is displayed on the screen.  Does anyone know what I'm doing wrong here?  I've been really stuck on this
    ActionScript variables, and event function which runs after my Bitmap is loaded
            private var _dataPosition:uint;
            private var displayedImage:Image;
            private var bmp:Bitmap;
    public function loaded(e:Event):void {
                bmp = e.target.content as Bitmap;
                // A setImage at the beggining of this function properly displays my image
                displayedImage.setImage(bmp.bitmapData);
                var loader:CLibInit = new CLibInit();
                var lib:Object = loader.init();
                var ns:Namespace = new Namespace("cmodule.alchemyrgr");
                var byteArray:ByteArray = (ns::gstate).ds; //point to memory
                var tmpByteArray:ByteArray = new ByteArray();
                var imgSize:int = bmp.width * bmp.height * 4;
                _dataPosition = lib.initByteArray(imgSize); //This is the position of the data in memory           
                var bounds:Rectangle = new Rectangle(0, 0, bmp.width, bmp.height);
                tmpByteArray = bmp.bitmapData.getPixels(bounds);
                byteArray.readBytes(tmpByteArray, 0, imgSize);
                byteArray.position = _dataPosition;
                bmp.bitmapData.setPixels(bounds, byteArray);
                displayedImage.setImage(bmp.bitmapData);
                //lib.clearByteArray(); //Free the bytearray
    C memory allocation function
    static AS3_Val initByteArray(void* self, AS3_Val args)
        AS3_ArrayValue(args, "IntType", &bufferSize);
        //Allocate buffer of size "bufferSize"
        buffer = (unsigned char*)malloc(bufferSize*sizeof(char));
        //return pointer to the location in memory
        return AS3_Int((int)buffer);
    Thanks in advance!
    Mark

    Hi Mark,
    I too attempted to use a method similar to yours to no avail. I posted my solution for passing bytearray data to/from alchemy here:
    http://forums.adobe.com/thread/773517?tstart=0
    There is full flash code and C++ code so you should be able to answer all your questions just by reading my post. However, one thing I see about how you're passing your pointer back to flash is:
        //return pointer to the location in memory
        return AS3_Int((int)buffer);
    I think should be:
        //return pointer to the location in memory
        return AS3_Ptr(buffer);
    You shouldn't be casting your char array as an int and returning it, just use AS3_Ptr(buffer) and that will return the actual memory address as an int to flash. I'm not 100% sure but I think this could be an issue. I use this method also in my code you can find in the link above so you can see the full implementation there. Hope that helps.

  • SEM Allocations - How do you make the Distribution work by Period not ***?

    I have configured an SEM BPS Allocation function.
    The function appears to work as expected except for the distribution values that are being used in the calculation. The distribution values being used are the cumulative total and not the period values.
    E.G...........................................P1.............P2........Total
    <b>Sender</b>
    Sender Value............................100............200..........300
    <b>Distribution Ratio's</b>
    Receiver 1...................................1...............7............8
    Receiver 2...................................2...............2............4
    Receiver 3...................................7...............1............8
    <b>Expected Results</b>
    Receiver 1.................................10.............140........150
    Receiver 2.................................20...............40..........60
    Receiver 3.................................70...............20..........90
    <b>Actual Results</b>
    Receiver 1.................................40...............80........120
    Receiver 2.................................20...............40..........60
    Receiver 3.................................40...............80........120
    Can anybody tell me what setting I am missing to tell the distribution to use period results rather than cumulative results?
    Many thanks

    In the planning level I am using fiscal year and posting period. The posting period was set to be periods 1 to 12.
    In the setup of an assessment function there are 4 input areas:
    Sender - where I am choosing a sender cost center and identifying a secondary cost element.
    Receiver - where I am identifying the cost centers to receive the assessment and the same secondary cost element (to be the same as R/3 assessments).
    Trigger - identifying the range of cost elements where the original costs are held on the sender.
    Distribution - where I identify the statistical key figures where the values are held to calculate distribution ratios over the receiving cost centers.
    I have attempted to insert posting period into the assessment structure, but have been getting a message that posting period is included in a higher method, which did not appear to be the case.
    In reviewing this while answering your initial questions, posting period is now able to be input into the structure, and the assessment appears to be working.
    Thank you for trying to help.
    This appears to be one of those strange items where some previous configuration had not cleared in the relevant tables.

  • SEM-BPS functionality

    Hi to everybody.
    I'm searching for a particular functionality of SEM-BPS but I don't know if it exists or if I have to develop it custom(for ex:with ABAP).
    Here, the issue: I have a product-hierarchy, the last two bottom-level of which are PRODUCT and (under) SKU (PRODUCT is parent of SKU).
    I want to spread (I mean "distribute") values of particular PRODUCTS down to the respective SKUs following the hierarchy definition. An example: the value of PRODUCT P10 down to SKU 19, SKU 20 and SKU 21, the value of PRODUCT P11 down to SKU 22, SKU 23, SKU 24  and so on.
    I have tried to use ALLOCATION function and it works perfectly but there are too much parameters to define (sender, receiver, distributor and so on) and it isn't related to the pre-defined hierarchy (I mean, there is no possibility to define a hierarchical reference).
    This problem is born because of the large amount of PRODUCTS and SKUs (it's an hard work defining every single parameter...).
    So I'm searching to a function that permits to refer to the product-hierarchy and execute the spread.
    Any advice?
    Thanx a lot.
    Luca.

    Hi Luca,
    I am afraid I may not be able to help you with  your query! But if you dont mind can I ask for your help. I am new to SEM-BPS. I have done certification in SEM but you know how its like. The pace of the academy is so fast and furious that it is impossible to retain most of the stuff after the academy. Now I am working on an SEM-BPS project. The company wants me to show to them what BPS can offer them. They are currently using their own bespoked planning software but are not very happy. I need to show to them the functionalities of SEM-BPS. Are their standard examples on heirarchies in BPS? Or is their something u can send me to get started with using heirarchies in BPS so that I can map their organistion structure to BPS planning layout and then can proceed from there? And last but not the least can you advise me on the structure of info cube? What things do i need to take in to consideration before I can design my info cube? Thanks a lot.

  • Rule in ATP for allocating stock

    Hi Team,
    Where can we check the rule in ATP ,,ie, the percentage specified for allocating the stock to the customers.
    Thanks for the help.
    Thanks,
      Vijesh

    You have not explained clearly what is your current configuration.  In normal circumstances, stock would not be reserved against specific customer / sale order.  Once the required stock is produced, production team would transfer the stock to Unrestricted Storage Location.  Of course, via configuration, you can allocate stock against particular customer or sale order.  Please search the forum how to achieve this.  Alternatively, I am not sure, whether you are looking for Product Allocation functionality.  Please search in Google with this topic.
    G. Lakshmipathi

Maybe you are looking for

  • How do i change my default search engine from yahoo to gooogle?

    i used to have a search engine window, identified by the google logo, towards the upper right corner of my mozilla firefox screen. This is a shared computer. Somewhere along the line, someone did something to make the google search box disappear, rep

  • Tracking a iphone

    someone stole my iphone 4s. i tried tracking the phone on i phone finder but it appears the phone is offline. Any other ways to tract a phone that's turned off?

  • Some questions about Skype Manager and Skype Conne...

    Hallo, I found one of your post: That, if I have some questions I may contact with  Contact our solutions team Sadly that link wont work... I have few questions and also I contacted with Microsoft support, but sadly they wasn't able to help me. Only

  • Two computers..one itunes account ..different songs on the two computers

    My windows laptop has a few of my itunes songs on it that i downloaded some time ago. My apple mac and iphone have a whole bunch of songs but not the ones on my windows laptop. I dont quite understand why there is a problem since they operate under t

  • Experienci​ng a myriad of problems with W510

    Hello! It seems like there are many dissatisfied users of the W510! Firstly, the right hand speaker did not work out of the box. Took it to one of the Lenovo agents here in Sri Lanka and they said that the speakers needed to be replaced but since it