Macro to close key figure

Is there any macro or another method to make one key figure only output, for a month for example?

Hi,
ROW_INPUT() should work even for a cell.
Do not foreget to set the attribute of the cell to: Scope of change =Attributes.
Also ensure your key figure is defined as input/output at planning book level.
As I said row_input should be OK... else did you try to use CELL_INPUT()?
If you want to block all key figure for period, then use COL_INPUT
Let me know how it goes
Regards
Julien

Similar Messages

  • The macro attempted to modify a key figure that is not locked

    Hi
    In my planning area I choosen detailed lock, keyfigure specific lock and do not lock read only keyfig after that In interactive DP, I have 2 Planning Books A and B .when I load the selection for book A itu2019s loaded well because all are editable key fig but when I load book B I get error u201CThe macro attempted to modify a key figure that is not lockedu201D in this book 3are editable keyfig 3 are display. I am in SAP SCM 7.0,I had seen the SAP NOTE 851731but its too old i think now iam in advanced that that but that note is not there in my system .
    Any ideas on why this is happening?
    Regards
    siva
    Edited by: sivaram2411 on Feb 3, 2012 1:52 PM

    Hello,
    According to your setting in the palnning area ("do not lock read-only key figures"), if you have set a key figure as "Output Only" in /sapapo/mc8b or by a default macro, then this key figure could not get locked.
    It is not allowed to make changes to unlocked key figures. So if there's  a macro that tries to update this key figure, you'll get the error message.
    If you have "do not lock read-only key figures" set, you must make sure that your macros do not make changes to those key figures that are output only (read only).
    Best Regards,
    Ada

  • Key figure Attributes not working

    Hi ALL,
    We have an isuue with one of our Planning book. Key figures which are supposed to be open for editing are  showing as output only and key figures which are for output only are showing as open for editing.
    I went to design mode to tried to change in manually , if I chane one row attribute all rows are getting changed.
    I found a macro which assigns Key figure attributes which I tried to activate but still not working. We are using SAP SCM 4.1 Version.
    Can any advice on this?
    Sivarama

    Thanks Problem is now solved. Looks like some has made changes in the design and there are macros which are working and as you said they might be conflicting. I changed the design which was working weired yesterday when I tried to cande one row attribute and all rows are getting applied, this worked fine today. And I deactivated the macro which is working on some row attributes and activated again.
    I am not very clear what went right but working.
    Sivarama

  • Planning Book Macro which can read different key figures from data views

    Hi Experts,
    I am looking for help to create a Planning book level macro which is having capabilities to read different Key Figure across the different Data Views. For example DataView 1 has Sales Orders and Data view 2 has Forecast and I want put in Data view 3 the netted numbers from SO and Forecast.
    Please provide me some quick pointers.
    Regards,
    Rahul Mohnot

    Hi,
    Not only is it the easiest way, it is the only way to do it as Laurence has put it. As you can see, macro workbooks are created for a Planning Book/Dataview combination.
    Thanks
    Mani

  • New Key figures and Macro updates

    Hi,
    Is there a way to ensure that a change in the data view design  by adding additional key figures and changing the positions of the key figures/macros DOES NOT result in changes in Macros already present. This seems a little ridiculuous when i compare this to spreahseet functions, where only fixed references in the cells  are impacted by changes in rows and columns, adding columns and deleting rows etc, else the formulas/macros in excel adjust automatically. The Macros in my planning are adjusted and deactivated after inserting some more key figures and shuffling some up and down to organize the book for some new functionalities. Is there a report/technique to reset the macros so that they work as intended with proper references as defined.
    Regards,
    AS

    Hi
    As Somnath says this is unfortunately the "normal" behaviour of the system. The macro workbench basically allocates a number to each key figure internally, so if new key figures are introduced, or even if you change the order of key figures in the data view, then this can affect the macro functionality.
    As long as the new key figure is introduced and placed at the end of the list in the data view then this will not normally affect the macro, it just needs re-activating.
    I find it frustrating when I have to re-order key figures in a data view then I have to check all macros are still working correctly and that the key figures used in the macro are the correct ones but unfortunately SAP will just say "as designed"!! 
    Regards
    Ian

  • Key figure Explaination in SNP planning books 9ASNP94

    Dear Experts ,
    I am curious to know regarding SNP planning books key figures
    when i am exploring sap standard  Planning book
    9ASNP94
    Data view : SNP94(1)
    I can able to see many KEY FIGURES  Please refer below
    I AM NOT SURE how they are used in planning , i mean  what is clear definition of those key figures and i see some key figures are grey out and some or open for entry
    how to find those detail information
    when i go  to T code SDP84 - define planning book
    i can able to see those descrption and infocubes but not sure how to understand clearly , would be more thankful if some give me a clear explaination of it
    Forecast     TXT                                                                                                                   
    Sales Order     TXT                                                                                                                   
    Distribution Demand (Planned)     TXT                                                                                                                   
    Distribution Demand (Confirmed)     TXT                                                                                                                   
    DistrDemand (TLB-Confirmed)     TXT                                                                                                                   
    Dependent Demand     TXT                                                                                                                   
    Total Demand     TXT                                                                                                                   
    Distribution Receipt (Planned)     TXT                                                                                                                   
    Distribution Receipt (Confirmed)     TXT                                                                                                                   
    Distribution Receipt (TLB-Confirmed)     TXT                                                                                                                   
    In Transit     TXT                                                                                                                   
    Production (Planned)     TXT                                                                                                                   
    Production (Confirmed)     TXT                                                                                                                   
    Manufacture of Co-Products     TXT                                                                                                                   
    Total Receipts     TXT                                                                                                                   
    Stock on Hand     TXT                                                                                                                   
    Supply Shortage     TXT                                                                                                                   
    Safety Stock     TXT                                                                                                                   
    Reorder Point     TXT                                                                                                                   
    Target Days´ Supply     D                                                                                                                   
    Target Stock Level     TXT                                                                                                                   
    Days´ Supply     D                                                                                                                   
    ATD Receipts     TXT                                                                                                                   
    ATD Issues     TXT                                                                                                    
    Many thanks & Regards
    Raj

    Hi
    Please find below the short summary of each key figures.
    Forecast TXT  :- FCST which has been released from APO DP to APO SNP
    Sales Order TXT :- Sales order transferred from ECC to APO via CIF.
    Distribution Demand (Planned) TXT :- Dependent demand coming from other location to this location for same product. Network planning
    Distribution Demand (Confirmed) TXT :- In case deployment , we confirm the Distribution Demand (Planned) will appear her.
    DistrDemand (TLB-Confirmed) TXT :- Mainly used in case of TLB.
    Dependent Demand TXT :- Dependent demand coming from parent product in case of BOM
    Total Demand TXT :- The sum of all above demands is called as Total Demand.
    Distribution Receipt (Planned) TXT :- SNP created Purchase req will appear in this key figure.
    Distribution Receipt (Confirmed) TXT :- In case of deployment Distribution Receipt (Planned) will be get confirmed in the Distribution Receipt (Confirmed) key figure.
    Distribution Receipt (TLB-Confirmed) TXT :- Mainly used in case of TLB.
    In Transit TXT :- In will contain the in transit stock which will transfer for ECC via CIF.
    Production (Planned) TXT :- Planned order will get created via SNP in case of domestic mfg.
    Production (Confirmed) TXT :- In case of SNP deployment Production (Planned) will be get confirmed in the Production (Confirmed)) key figure.
    Total Receipts TXT  :- Total of all the receipt elements as been used.
    Stock on Hand TXT :- Stock has transferred from ECC or R3 via CIF.
    Supply Shortage TXT :- This will be calculated with macro based on total demand and total receipt.
    Safety Stock TXT :- Based on SNP master data, safety stock will get calculated during planning run.
    Reorder Point TXT :- Based on SNP master data, Reorder Point will get calculated during planning run. . There are different methods of calculating safety stock.
    Target Days´ Supply D :- The safety stock defined in number of days appears based on SNP master data in APO.
    Target Stock Level TXT :- Get calculated by macro  based on Target Days´ Supply D and total demand in future.
    ATD Receipts TXT :- Mainly used for Deployment.
    ATD Issues TXT :- Mainly used for Deployment
    If you require any specific information for any key figure please do let me know.
    I hope this will be useful for you.
    Thanks
    Amol

  • Adding new key figure in Info structure

    Hi all,
    I am in a need to add a new key figure to our info structure here in my company.
    The way I understand it is, it would be best to create a NEW info structure and copy all existing key figure and characteristic and then insert my new key figure into this and rewrite the macro if required.
    So my question is
    1. How to determine which info structure is currently in use in my company? If i check in MC89 - the key figures match what is in Info structure S076. So is it safe to assume that we are using standard S&OP in my company? Is that a correct way to identify the currently used info structure?
    2. For our KMAT, when i open a planned order I see that there in another info structure (not S076) under configuration tab. So can we have diff info structure in use at a same time ?
    Please guide.
    Thanks,

    Hi Nisha,
    1. First of all, How would I determine which info structure is being used at this time in my company?
    I need to know this so that when I am creating my own custom (S500 - S999) info structure, i can copy the existing KFs and Characteristics and add them to my info structure and then Add a specific key figure on top of that.
    Info structures are nothing but tables so in se16 you can check which are Info structures are having update values.
    Yes you can add the specific key figure on existing self defined info structure in MC22 after that you need to generate it.
    2. Can multiple info structure be in 'use' at the same time in any scenario? 
    For self defined info structure are application specific you can not have multiple info structure for same scenario. If you take the example of flexible planning with self defined info structure then you can transfer the demand from only one info structure.
    Regards,
    R.Brahmankar

  • Assigning a Key Figure in a Multi provider

    In a multi provider if I have a key figure which is assigned from more than one part providers.  What does this exactly mean?  For example:
    Let's say I have a key figure Number of Sales which is present in two part providers and assigned from both the providers, if I build a query say Country | Number of Sales what happens with the assignment
    Thanks

    Good point.
    My scenario is as follows. 
    1. We are building a query which uses a base query as a template. 
    2. Our query is built off a seperate multiprovider which replaces one of the part cubes with a cube that has consolidated set of data from SAP and Non SAP systems
    3. In the original multi provider one of the key figures is assigned from two part providers, one of which is that which we are replacing - this key figure is used extensively in the definition of other query level key figures
    4. The key figure does not exist in the consolidated cube but we have a key figure that we will use instead of.
    5. The original query does not have info provider restrictions at the query or local key figure levels
    I believe I can sum the two figures when I define the Key figures in the new query but just needed clarity on if this is a solution hence wanted to confirm the values are being summed up assuming no restrictions etc
    Sorry guys,
    before I close this message I just wanted to confirm the following, do not want to save/activate the change on the system
    I have carried out a check after I removed the assignment from one of the part providers it seems that this is possible - this is correct.  If this is the case it seems that the business requirement is to sum the values from the two part providers
    I
    Edited by: Niten Shah on Jul 9, 2008 6:44 PM

  • How to influence the text display of key figures in the interarctive DP

    Hello all,
    Does anyone know if there is a possibility (BADI, etc.) to change the text display of key figures (not characteristics!) in a planning book/data view?
    I know that you can define a free text in the data view but still, this is only one fixed text and it cannot be changed.
    Reason for the request: We would like to use the same key figure (and hence, indicate 2 different texts) for two different purposes (in different selections) without having to create a new data view.
    Kind regards,
    Klemens

    if you dont want a new data view and might even go to the extent of creating a user exit for this ... here is an idea
    - just create auxillary KF ( or use spare Temp KF depending on what you want to do with the data in the view) for each of these KF with the text
    lets say you have KF1 and KF2 - create KF1A and KF2A
    Make sure KF1A = KF1 and KF2a = KF2
    Now depending on user you can display KF 1 and KF2 or KF1a and KF2a depending on the user by using macros USER() and ROW_VISIBLE(0)

  • SNP PR Deletion based on another key figure

    Folks,
    I want to delete Purchase requisition ( Distribution receipt - Planned) in APO-SNP based on the value of another key figure.
    for example if the another key figure value is 1 in a particular time bucket, then i want the PR of that bucket to be deleted.
    I have designed macros incorporting this logic i.e if another key figure value is 1, then make the Purchase requisition quantity as 0.
    But when i execute this macro, system gives the  message " Error saving Transport requisitions to live cache" and PR quantity does not become 0.
    I have also tried using RLCDEL but  it is not possible to selectively delete the PR using the value of another key figure.
    Is there any method ( Macro or non-macro) through which i can achieve this ? Any inputs will be highly appreciated.
    Regards,
    Pawan.

    Hi Pawan,
    I assumed the macro solution should work...
    A macro can create orders, so logically it should be able to delete. Unfortunately I can't test it now.
    Could you please do the following?
    if you delete an order manually in interactive, and refresh, what happens?
    does your order come back?
    If yes then the issue is not directly linked to the macro...
    Then could you check  in SPRO - SNP global settings,  do you 'Heur: Order Update' being set to 'Delta Mode'?
    If yes, then set it a "complete mode"
    Thanks and Regards
    Julien

  • Virtual Key Figure

    Hi all,
    Before implementing a virtual key figure, I'd like to make sure this will answer my need. I work for a brewery, and I am looking at our customer taps activity.
    Records in the cube:
    Trading Region A, Brand X, Customer 001, Action "Install": 1 "Tap action"
    Trading Region A, Brand X, Customer 002, Action "Install": 2 "Tap action" (<i>new taps</i>)
    Trading Region A, Brand X, Customer 002, Action "Removal": 1 "Tap action" (<i>old tap</i>)
    So what I want to have in my report is :
    Trading Region A Brand X: 2 "customer activity"
    I am thinking I could use a virtual key figure that will look in the cube and check if there was any activity for a customer on that brand and trading region, and then will allow me to aggregate the result in the query.
    But I am not sure because it seems to me that Virtual Key Figure are calculated at record level...
    Could any of you clarify this for me ?
    Many thanks for your help,
    Nicolas

    Thanks a lot !
    I don't know why I tried such a complicated solution...
    Tried to assign points and close the issue, let me know if it didn't work as this is my first post...

  • Restrict on a "Date" type (key-figure)

    Hello, all
    1. I need to define a query, to compare the planed-date and the current-date(today), if planed-date>today, then in the new column, the firstday of the month will be listed
    (e.g. 1-12-2005).
    could you give me some suggestion, how can I found the functions of reading date in Query Designer.(I didn't find any function in the Form).
    2. Any how can I add Macro in the report? is there some document I can read in SDN?
    Many thanks
    Tony

    Hi Tony,
    I don’t know details about your infoobjects design tech aspects. Hence, I propose that what will work. You can adjust your design accordingly.
    I encountered a problem while working with dates determined as key figure attribute.
    But with dates as reference to 0CALDAY attributes everything works.
    So, we have a Project infoobject. Create plan-beg-date and plan-end-date characteristics with reference to 0CALDAY. Assign them as attributes to Project. For testing purposes enter manualy several master data for it. Insert it as a data target (RSA1, infoproviders area). If you have a cube with the Project, then you don’t need the previous step.
    In BEx, create a V1 formula variable for plan-beg-date: replacement path, char = Project, Replace var with = Attribute value, Attribute = plan-beg-date, check ‘To value’.
    Similarly, create V2 formula variable for plan-end-date.
    Create in columns a new structure. If you work with Project infoobjects as infoprovider, put into structure ‘Number of records KF’, otherwise the following steps might not work.  Add into the structure a new formula = V1, new formula = V2, new formula = V2 - V1. It will give you the the planned duration of the project.
    Now, create X1 & X2, two customer exit variables on 0CALDAY. Based on either user entered reporting day or on current sys-day they should return the first and last days of the reporting/current month.
    In the structure create another formula for corrected beginning date:
    DATE ( ( 'V1' < 'X1' ) * 'X1' + ( 'X1' < 'V1' ) * 'V1' )
    and a formula for corrected ending date:
    DATE ( ( 'V2' > 'X2' ) * 'X2' + ( 'X2' > 'V2' ) * 'V2' )
    Now you can calculate planned days for the reporting month or even the total number of project plan days.
    About macro – you execute a query, embed it into a workbook, write a macro and save the workbook. Next time you’ll open the workbook in Analyzer.
    Best regards,
    Eugene

  • Creating a restricted key figure in BI7 reporting

    Hi
    I am creating a restricted key figure globally in BI7 query designer, whenever I try to restrict Calender Year /Month, an error message pops up showing:
    Runtime error '457' (This key is already associated with an element of this collection), when I click ok another message opens
    Runtime error '429' (Active X component can't create object)
    and finally Microsoft VB runtime error
    Automation (The callee(servernot server application) is not applicable and disappeared; all connections are invalid. The call may have executed.
    I am working in BI 7, SAP gui 640 what could be the problem in BI 7???because the same thing is working in BI 3.5 environment.
    Regards
    Indraneel

    Hi Indraneel,
    Try to look for the patch level you are using for SAP GUI, it should be level 14. If lesser than this apply and check. And always disable VB macros.
    Assign points if helps.
    -Harshal

  • Reset Manually Entered Constrained Forecast Key Figure

    We use Demand Planning to forecast future Sales Volumes.  Not too sophisticated.  We take a monthly extract from R/3 which summarize the last months Sales Actuals.
    based on a given period of Sales History we then run a statistical forecast whicgh generates future months foreasts.
    Once a manual adjustment has been made to a key figure by either Acciount Manager/Marketing Group?Demand Planner, that particular field is highlighted in 'YELLOW'.  Once this is done any future copies of stat numbers into those fields does not overwrite the users manual inputs.  As you would expect.
    However we have some apparently manually entered values in our Constrained Key Figures that are completely incorrect.  However because the cells are yellow, the copy key figure macro will not be able to overwrite these values.  Is ther a way I can somehow reset these yellow cells so that they no longer resist the copying of data into them.
    Apologies if I am using the incorrect terminology here.
    Thanks for anything you can suggest.

    I think your requirement could be met by exploring macro functions CELL_BG(), CELL_FG(), CELL_INPUT(), ROW_BG(), ROW()FG or ROW_INPUT() functions. All the macro functions can be made conditional, example a specific technical/business situation leads to color/editability etc.
    Check http://help.sap.com/saphelp_scm2007/helpdata/en/17/a5216532a111d398260000e8a49608/frameset.htm

  • Adding new key figures to DP planning area

    I am using APO DP.
    When adding new key figures to a planning area, is there any way of avoiding having to deinitialise and then re initialise the planning area?
    Thanks for any advice on this...

    First of, let us know which version of DP are you using.
    If you are using 7.0, all you need to do is right click on your planning area and select Change Keyfigure setting and you should be able to update the key figures there.
    The below is from SAP help for SAP APO 7.0, you should be able to add the key figure without deinitializing the planning area.
    Key Figure Settings
    Here you can change the properties of the key figures of a planning area, if the planning area has already been initialized. You can also add or delete key figures. However, you can only delete key figures that are no longer used in planning books, data views, macros, or demand forecasts. You can find out in which objects a specific key figure is used with the where-used list.

Maybe you are looking for

  • IPod no longer functioning.

    My iPod Shuffle was a christmas gift that I had for close to almost a year. A week ago, I use my iPod and it kept blinking green and red. I plug it up to the usb port and it wont show up on iTunes. Fast forward to yesterday. I restore settings to my

  • Diff b/w lookup and join in odi

    Hi friends, I am new to ODI ,                Please can anyone explain the difference between "join" and "lookup" ? Thanks in advance ! Cnu

  • Query used by SQL Server Management Pack for monitoring database backups

    I use SCOM 2012 R2 and the SQL Server Management Pack to monitor SQL Server database backups. I believe I am getting false positives. SCOM reports database are not backuped, while in fact they are. So I need to troubleshoot this. I suspect SCOM is qu

  • Updating Infotype 0001 (PA) as per OM structure

    Dear Experts, Can any one pls let me know how to update info type 0001 position and Org Unit from OM info type 1001 (Relation ship) I have created relation ship between position and holder (A 008) in OM structure and want to get it reflected in PA in

  • Javascript and CSS questions

    Just two quick questions. First, I am trying to change the value of one of my backing bean properties using js. It is a boolean and what I tried was: onfocus="{ ${displayOnly} = true}" however, as expected, this tries to set the actual value of displ