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

Automatic filling of 0fiscyear depending on 0fiscper

Hi Folks,

This is related to Variables. We have a variable screen which has 0fiscper & accepts value from user. How can we have a global variable to all queries that reads 0fiscper and fills 0fiscyear ?

Regards,

Manoj.

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 10, 2006 at 06:19 PM

    once you have variable on 0fiscper. it is global which is available for all queries uses 0fiscper.

    using customer exit you can fill 0fiscyear using 0fiscper.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 31, 2006 at 08:06 AM

    Hi Manoj,

    have a look at the How-to guide "How to... Derive a Variable value from another variable".

    You'll find that under https://service.sap.com/bi and there in the left-side navigation block under

    Services & Implementation -> HOW TO... Guides -> Guide List SAP BW 2.x

    This one describes a derivation of a variable from 0CALMONTH. We actually use the logic described there at our department and it works fine.

    Regards,

    Philipp

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 31, 2006 at 08:39 AM

    Hi Manoj,

    Steps to follow,

    1) In bex, Create a new variable of 0fiscyear characteristic.

    Set the following attributes:

    Type of Variable: Characteristic Value

    Variable name: ZVCPERI2

    Variable Description: Fisccal Year using Customer exit

    Processing by: Customer Exit (Drop down combo box)

    Characteristic: Fiscal Year

    Press Next

    Variable Represents: Single Value

    Variable Entry is: Mandatory

    Don’t Check out Ready for Input

    And Press Next

    Press Finish.

    2) Transaction CMOD

    Create a new project, maintain the short text, and assign a development class.

    (It’s better to ask somebody senior in our project about this, because every project have one main project and development class)

    If you have project say Zproject. Choose option components. Click Change.

    Double-click on EXIT_SAPLRRS0_001.Then double-click on ZXRSRU01.

    Enter the coding .Save and activate the coding.

    ----


    • INCLUDE ZXRSRU01 *

    ----


    DATA: L_S_RANGE TYPE RSR_S_RANGESID. 'In global area

    DATA: LOC_VAR_RANGE LIKE RRRANGEEXIT. 'In global area

    CASE I_VNAM.

    WHEN 'ZVCPERI2'.

    IF i_step = 2.

    LOOP AT i_t_var_range INTO loc_val_range

    WHERE vnam = '0fiscper'.

    EXIT.

    ENDLOOP.

    IF sy-subrc EQ 0.

    l_s_range-low = loc_val_range-low(4).

    ENDIF.

    l_s_range-sign = 'I'.

    l_s_range-opt = 'EQ'.

    APPEND l_s_range TO e_t_range.

    ENDIF.

    ENDCASE.

    Activate the project. This is very important.

    3) TO test now, use that variable ZVCPERI2 in query some where.

    4) First test it in RSRT(Tran cOde).

    Hope i m clear.

    Regards,

    San!

    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.