cancel
Showing results for 
Search instead for 
Did you mean: 

Calculate Actual and plan value

0 Kudos

Hello SDNERS,

I am working in FI Reports in one Reports Requirement is like that if user selects 003/2011; then the report should display Actuals for 001/2011 - 003/2011 and Plan for "004/2011 - 012/2011"

Means lay out should be :-

001/2011 002/2011 003/2011 004/2011 005/2011 006/2011 -


012/2011

Actualcost Actualcost Actcost Plancost Plancost Plancost Plancost

362 367 412 455 456 455 455

For that I have written user exit, It is giving sum for 001,002,003 for actual and 006 to 0012 for plan, but I need above layout Code is as below :-

DATA: L_S_RANGE TYPE RSR_S_RANGESID.

DATA: LOC_VAR_RANGE LIKE RRRANGEEXIT.

Data: v_loc(3) type c.

CASE I_VNAM.

*----


  • to calculate "Actual cost user input is "FISCPER" Key Date

*----


WHEN 'ZCACTCST'.

IF I_STEP = 2. "after the popup

LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE

WHERE VNAM = 'ZUSFISCPER'.

CLEAR L_S_RANGE.

L_S_RANGE-LOW = '001'.

L_S_RANGE-HIGH = LOC_VAR_RANGE-LOW+4(3).

L_S_RANGE-SIGN = 'I'.

L_S_RANGE-OPT = 'BT'.

APPEND L_S_RANGE TO E_T_RANGE.

EXIT.

ENDLOOP.

ENDIF.

*----


Thanks

Chitra.

                  • To dervie Plan cost during reporting *****

WHEN 'ZCPLANCST'.

IF I_STEP = 2. "after the popup

LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE

WHERE VNAM = 'ZUSFISCPER'.

CLEAR L_S_RANGE.

V_LOC = LOC_VAR_RANGE-LOW+4(3).

L_S_RANGE-LOW = V_LOC + 1.

L_S_RANGE-HIGH = '012'.

L_S_RANGE-SIGN = 'I'.

L_S_RANGE-OPT = 'BT'.

APPEND L_S_RANGE TO E_T_RANGE.

EXIT.

ENDLOOP.

ENDIF.

ENDCASE.

Edited by: Chitrakala Sankar on Mar 1, 2011 7:42 AM

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Sankar,

As per my understanding ,the layout should change dynamically based on the value entered by the user and also there should be switiching between Actual & Plan Infocubes .

I have worked on the same requirement ...

I created 12 selections in Columns for each month and restricted the 0INFOPROVIDER and 0FISCPER with customer Exit variables.

The customer exit variable switches Actual and plan infocube based on the Version entered by the user...

I can provide you the code for both customer exit variables..

Thanks,

Ravi

0 Kudos

Hello Ravi,

Thanks for your kind coperation, Can you pls provide me code for the same.

Regrds

Chitra

Former Member
0 Kudos

Hi

Below is the code for Switching Actual and Plan Infocubes.We need to create 12 customer exit variables for ex:zinfoprov1 to zinfoprov12


WHEN 'ZINFOPROV1'.

    CLEAR : L_VERSION1.
    IF I_STEP = 2.
      LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
            WHERE VNAM = '0P_VERS'.
      ENDLOOP.

      L_VERSION1  = LOC_VAR_RANGE-LOW.

      CLEAR: L_S_RANGE,LOC_VAR_RANGE.

      IF L_VERSION1 EQ 'F01' OR L_VERSION1 EQ 'F02' OR L_VERSION1 EQ 'F03' OR L_VERSION1 EQ 'F04' OR
         L_VERSION1 EQ 'F05' OR L_VERSION1 EQ 'F06' OR L_VERSION1 EQ 'F07' OR L_VERSION1 EQ 'F08' OR
         L_VERSION1 EQ 'F09' OR L_VERSION1 EQ 'F10' OR L_VERSION1 EQ 'F11' OR L_VERSION1 EQ 'F12'.

        L_S_RANGE-LOW          =  'Actual Infocube Cube Name'.
        L_S_RANGE-HIGH         =  LOC_VAR_RANGE-HIGH.
        L_S_RANGE-SIGN         =  'I'.
        L_S_RANGE-OPT          =  'EQ'.
        APPEND L_S_RANGE TO E_T_RANGE.

      ELSEIF L_VERSION1 EQ '000'  OR L_VERSION1 EQ '006'  OR L_VERSION1 EQ '007'  OR L_VERSION1 EQ '008' .

        L_S_RANGE-LOW          =  'Plan Infocube Cube Name'.
        L_S_RANGE-HIGH         =  LOC_VAR_RANGE-HIGH.
        L_S_RANGE-SIGN         =  'I'.
        L_S_RANGE-OPT          =  'EQ'.
        APPEND L_S_RANGE TO E_T_RANGE.
      ENDIF.
      EXIT.
    ENDIF.

  WHEN 'ZINFOPROV2'.
    CLEAR : L_VERSION2.

    IF I_STEP = 2.
      LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE
            WHERE VNAM = '0P_VERS'.
      ENDLOOP.

      L_VERSION2  = LOC_VAR_RANGE-LOW.

      CLEAR: L_S_RANGE,LOC_VAR_RANGE.

      IF L_VERSION2 EQ 'F02' OR L_VERSION2 EQ 'F03' OR L_VERSION2 EQ 'F04' OR
         L_VERSION2 EQ 'F05' OR L_VERSION2 EQ 'F06' OR L_VERSION2 EQ 'F07' OR L_VERSION2 EQ 'F08' OR
         L_VERSION2 EQ 'F09' OR L_VERSION2 EQ 'F10' OR L_VERSION2 EQ 'F11' OR L_VERSION2 EQ 'F12'.

        L_S_RANGE-LOW          =   'Actual Infocube Cube Name'.
        L_S_RANGE-HIGH         =  LOC_VAR_RANGE-HIGH.
        L_S_RANGE-SIGN         =  'I'.
        L_S_RANGE-OPT          =  'EQ'.
        APPEND L_S_RANGE TO E_T_RANGE.

      ELSEIF L_VERSION2 EQ 'F01' OR L_VERSION2 EQ '000'  OR L_VERSION2 EQ '006'  OR L_VERSION2 EQ '007'  OR L_VERSION2 EQ '008' .
        .
        L_S_RANGE-LOW          =   'Plan Infocube Cube Name'.
        L_S_RANGE-HIGH         =  LOC_VAR_RANGE-HIGH.
        L_S_RANGE-SIGN         =  'I'.
        L_S_RANGE-OPT          =  'EQ'.
        APPEND L_S_RANGE TO E_T_RANGE.
      ENDIF.
      EXIT.
    ENDIF.


You need to do the similar coding for 12 Customer exit variables for FISCPER...using IF ELSE..and restrict the variable in each selection.

Thanks,

Ravi

0 Kudos

any update pls