Skip to Content
author's profile photo Former Member
Former Member

Using Characteristic in restricted Key figure

Hi,

I need to show a column in the report in Bex, which show the net sales value(KF) for all those store, whose "store open date" is less then "the first day of current month in last year" -- (store open date<= "the first day of current month in last year")*net sales value.

"store open date" is one of the attribute of characteristic "sold_to", and I have created a varible base on 0calday to get the "the first day of current minth in last year".

but I still not sure how can I get the column i need in the report,could anyone giev me some advice?

Thank you,

Ping

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • Best Answer
    Posted on Nov 30, 2005 at 11:44 AM

    Hi Ping,

    Here is step-by-step solution.

    - Put into columns your net sales KF.

    - right click on KF structure – new formula.

    - in the left frame put cursor on a ‘Formula variable’ node – new variable (for "store open date") – say, with ZOPEND name.

    - give name and description, ‘Processing by’ = replacement path; ‘Characteristic’ = sold_to; ‘Replace variable with’ = Attribute value; ‘Attribute’ = your "store open date"; check ‘To Value’.

    - in the left frame put cursor on a ‘Formula variable’ node – new variable (for "the first day of current month in last year") – say, with ZCUTDAY name.

    - give name and description, ‘Processing by’ = customer exit; mandatory, not ready for input ‘Dimension ID’ = Date.

    Into customer exit code place this:

    DATA: DATE_CUT LIKE SY-DATUM,
      year TYPE i.
    …
    
    WHEN ‘ZCUTDAY’.
                  CLEAR L_S_RANGE.
                  DATE_CUT = sy-datum.
                  DATE_CUT+6(2) = '01'.
                  year = DATE_ CUT(4).
                  year = year - 1.
                  DATE_CUT(4) = year.
    
                  L_S_RANGE-LOW = DATE_CUT.
                  L_S_RANGE-SIGN = 'I'.
                  L_S_RANGE-OPT = 'EQ'.
                  APPEND L_S_RANGE TO E_T_RANGE.

    - right click on KF structure – new formula: KF * (ZOPEND < ZCUTDAY).

    - Hide first, KF column

    - Create a condition with last formula value > 0.

    Best regards,

    Eugene

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 28, 2005 at 09:06 PM

    'Store Open Date' should be a navigational attribute of 'Sold to'. Right click -> Edit -> KF 'sales values' -> drag 'Store Open Date' to right side -> Right click 'Store open date' -> restrict -> variables(less than equal to) -> Variable on 'Store Open Date'.

    Your variable should be on 'Store Open date', you can populate its value as "the first day of current minth in last year" .

    assign points if helpful

    raj

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Thank you for the reply.

      I have created two formula variable, one for store open date(replacement path) - V1, another one is 'first day of current month/last year'(user exit)- V2

      and I created a new formula like you suggested:

      (V1<=V2)KY+(V1>V2)KY

      but it seems not what I want. what I want the fomula done is only show the KY when V1<=V2, otherwise(if v1>v2) then will not show anything(eg: blank in that column).

      I tried to change teh formular like :

      (V1<=V2)KY+(V1>V2)0

      but it doesn't work!

      pls advice how i can get what i want.

      Thank you,

      Ping

  • Posted on Nov 29, 2005 at 05:45 AM

    Hi Ping,

    Try the following.

    Create a VAR variable of replacement path for Store open date. See the “How to calculate with attributes”:

    http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sapportals.km.docs/documents/a1-8-4/how to calculate with attributes?state=7

    Say, your var for "the first day of current minth in last year" has V2 name.

    In the KF structure in columns add a new formula like

    (VAR <= V2)* KF + (VAR > V2)* KF

    Create a condition for showing only records with this formula > 0.

    Best regards,

    Eugene

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 01, 2005 at 07:11 PM

    Hi,

    Make store open date as navigational attribute and create a customer exit var on store open date to get the first day of current month in last year.

    Now make a restricted key figure .

    drag

    net sales value and store open date .

    restrict the store open date with the var u have created suppose ur var is zstordat then storeopen date restricted to zstordat<=first day of current month in last year.

    This should solve ur problem.

    Thanks

    G.V.Ranganath

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.