Sunday, September 24, 2006

[nw2004s] data provider of type filter [ selector_data_provider ]

This can be used as filter for BPS function in WAD [ exec_planning_function_simple ]

Set Filter Values by Filter [ SET_SELECTION_STATE_BY_FILTER ]

or use as a complex filter scenarios

Set Filter Values by Different Sources [ SET_SELECTION_STATE_BY_BINDING ]

Friday, September 22, 2006

[BW] user exit type of variable

I_S_RKB1D-COMPID --> report id
*&---------------------------------------------------------------------*
*& Include ZXRSRU01
*&---------------------------------------------------------------------*

DATA : L_S_RANGE TYPE RSR_S_RANGESID,
LOC_VAR_RANGE TYPE RRS0_S_VAR_RANGE,
WA_E_T_RANGE TYPE RRRANGESID,
L_DATE LIKE SY-DATUM,
L_WEEK LIKE SCAL-WEEK,
L_YRMON(06),
v_month(2) type n,
v_year(4) type n.



IF I_STEP = 3.
LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE WHERE VNAM = 'ZVFRDAT'."'VAR_FROM'. "'0CWEEK'.
LSVAR_FR = LOC_VAR_RANGE-LOW.
EXIT.
ENDLOOP.

LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE WHERE VNAM = 'VAR_TO'.
LSVAR_TO = LOC_VAR_RANGE-LOW.
EXIT.
ENDLOOP.

ENDIF.

** Calculate Last Calendar Month

*break charlie.
CASE I_STEP.
WHEN '2'.
IF I_S_RKB1D-COMPID = 'REP0011_1' OR
I_S_RKB1D-COMPID = 'REP0011_2'.
READ TABLE I_T_VAR_RANGE INTO LOC_VAR_RANGE WITH KEY VNAM = 'ZVDAYI'
IOBJNM = '0CALDAY'.
IF SY-SUBRC = 0.
W_TODATE = LOC_VAR_RANGE-HIGH.
ENDIF.
ENDIF.

CASE I_VNAM.

WHEN 'ZVDAY2M'.
* Current Month
READ TABLE I_T_VAR_RANGE INTO LOC_VAR_RANGE WITH KEY VNAM = 'ZVDATE'
IOBJNM = '0CALDAY'.
IF SY-SUBRC = 0.
L_DATE = LOC_VAR_RANGE-LOW.
WA_E_T_RANGE-SIGN = 'I'.
WA_E_T_RANGE-OPT = 'EQ'.
WA_E_T_RANGE-LOW = L_DATE(06).
APPEND WA_E_T_RANGE TO E_T_RANGE.
ENDIF.

WHEN 'ZVDAY2M1'.
* Previous Week's month
READ TABLE I_T_VAR_RANGE INTO LOC_VAR_RANGE WITH KEY VNAM = 'ZVDATE'
IOBJNM = '0CALDAY'.
IF SY-SUBRC = 0.
L_DATE = LOC_VAR_RANGE-LOW.
L_DATE = L_DATE - 7.
WA_E_T_RANGE-SIGN = 'I'.
WA_E_T_RANGE-OPT = 'EQ'.
WA_E_T_RANGE-LOW = L_DATE(06).
APPEND WA_E_T_RANGE TO E_T_RANGE.
ENDIF.

WHEN 'ZVLSTMON1'. " Text Variable: From Value
* Previous Month
READ TABLE I_T_VAR_RANGE INTO LOC_VAR_RANGE WITH KEY VNAM = 'ZVDAYI'
IOBJNM = '0CALDAY'.
IF SY-SUBRC = 0.
L_DATE = LOC_VAR_RANGE-HIGH.
L_DATE+6(02) = '01'.
L_DATE = L_DATE - 1.
WA_E_T_RANGE-SIGN = 'I'.
WA_E_T_RANGE-OPT = 'EQ'.
WA_E_T_RANGE-LOW = L_DATE(06).
APPEND WA_E_T_RANGE TO E_T_RANGE.
ENDIF.

WHEN 'ZVLSTMON2'. " Text Variable: To Value
* Previous Month - 1
READ TABLE I_T_VAR_RANGE INTO LOC_VAR_RANGE WITH KEY VNAM = 'ZVDAYI'
IOBJNM = '0CALDAY'.
IF SY-SUBRC = 0.
L_DATE = LOC_VAR_RANGE-HIGH.
L_DATE+6(02) = '01'.
L_DATE = L_DATE - 1.

L_DATE+6(02) = '01'.
L_DATE = L_DATE - 1.
WA_E_T_RANGE-SIGN = 'I'.
WA_E_T_RANGE-OPT = 'EQ'.
WA_E_T_RANGE-LOW = L_DATE(06).
APPEND WA_E_T_RANGE TO E_T_RANGE.
ENDIF.

WHEN 'ZVDAY2W1'. " Last week's WEEK NO.
BREAK CHARLIE.
READ TABLE I_T_VAR_RANGE INTO LOC_VAR_RANGE WITH KEY VNAM = 'ZVDATE'
IOBJNM = '0CALDAY'.
IF SY-SUBRC = 0.
L_DATE = LOC_VAR_RANGE-LOW.
L_DATE = L_DATE - 7.
CALL FUNCTION 'DATE_GET_WEEK'
EXPORTING
DATE = L_DATE
IMPORTING
WEEK = L_WEEK
EXCEPTIONS
DATE_INVALID = 1
OTHERS = 2.
WA_E_T_RANGE-SIGN = 'I'.
WA_E_T_RANGE-OPT = 'EQ'.
WA_E_T_RANGE-LOW = L_WEEK.
APPEND WA_E_T_RANGE TO E_T_RANGE.
ENDIF.

WHEN 'ZVDAY2W'. " Date to WEEK NO.
READ TABLE I_T_VAR_RANGE INTO LOC_VAR_RANGE WITH KEY VNAM = 'ZVDATE'
IOBJNM = '0CALDAY'.

IF SY-SUBRC = 0.
L_DATE = LOC_VAR_RANGE-LOW.

CALL FUNCTION 'DATE_GET_WEEK'
EXPORTING
DATE = L_DATE
IMPORTING
WEEK = L_WEEK
EXCEPTIONS
DATE_INVALID = 1
OTHERS = 2.
WA_E_T_RANGE-SIGN = 'I'.
WA_E_T_RANGE-OPT = 'EQ'.
WA_E_T_RANGE-LOW = L_WEEK.
APPEND WA_E_T_RANGE TO E_T_RANGE.
ENDIF.

WHEN 'ZTVMON1'. " Text Variable: From Value
* Next Month
READ TABLE I_T_VAR_RANGE INTO LOC_VAR_RANGE WITH KEY VNAM = 'ZPCALMON'
IOBJNM = '0CALMONTH'.
IF SY-SUBRC = 0.
L_YRMON = LOC_VAR_RANGE-LOW.
v_month = L_YRMON+4(02).
v_year = L_YRMON(04).

IF v_month = '12'.
v_month = '01'.
v_year = v_year + 1.
ELSE.
V_MONTH = V_MONTH + 1.
ENDIF.

WA_E_T_RANGE-SIGN = 'I'.
WA_E_T_RANGE-OPT = 'EQ'.
WA_E_T_RANGE-LOW(04) = V_YEAR.
WA_E_T_RANGE-LOW+4(02) = V_MONTH.
APPEND WA_E_T_RANGE TO E_T_RANGE.
ENDIF.

WHEN 'ZVNXTYR1'. " Text Variable: From Value

* Get a list of company code from selected projects
WHEN 'ZVCPYT'.
LOOP AT I_T_VAR_RANGE INTO LOC_VAR_RANGE WHERE VNAM = 'ZVTPJK'
AND IOBJNM = 'ZPRJ_KEY'.
BREAK CHARLIE.
SELECT SINGLE COMP_CODE
INTO WA_E_T_RANGE-LOW
FROM /BIC/PZPRJ_KEY
WHERE /BIC/ZPRJ_KEY = LOC_VAR_RANGE-LOW
AND COMP_CODE <> ''
AND CO_AREA <> ''.

IF SY-SUBRC = 0.
WA_E_T_RANGE-SIGN = 'I'.
WA_E_T_RANGE-OPT = 'EQ'.
APPEND WA_E_T_RANGE TO E_T_RANGE.
ENDIF.

ENDLOOP.
ENDCASE.
ENDCASE.

Wednesday, September 20, 2006

[nw04s] access denied when call bw web report

Set Permissions of System Object

All end user must have read access to the system object in the Portal Content. Please perform the following steps to set the permissions of a system object:

    1. Logon to Portal
    2. Choose iView System Administration / Permissions / Portal Permissions
    3. Expand folder Portal Content and choose system object
    4. Use context menu of system object to open permissions
    5. Search for "Everyone" in "Groups" (do not use role "Everyone")
    6. Choose Add
    7. Set dropdown box Administrator to Read and switch checkbox End User on

Wednesday, September 13, 2006

[nw04s] error kmc-bc SP9 Note 978042 - KMC upgrade fails on Oracle - DROP INDEX 'KMC_AP_IHR' sqlplus sql script

put script in D:\oracle\BWJ\101\bin
and apply note Note 978042 - KMC upgrade fails on Oracle - DROP INDEX 'KMC_AP_IHR'

[nw2004s] change standard web template

If you copy 0ANALYSIS_PATTERN, make sure you apply Note 931043. After applying that note, make sure you log in to the WAD after applying the note and refresh your metadata from the options menu... Then copy 0ANALYSIS_PATTERN again... Go to SMICM and invalidate the cache as well. This should resolve your issue.

We are running SP7.
I have just executed RS_TEMPLATE_MAINTAIN_70 using the directions in note 917950. When I analyse and validate I receive two warnings: Query does not exist in the BI System (Object QU ) and Mapping for Service item_validation_service for Object CONTEXT_MENU_ITEM missing. When I execute in Debug mode the teamplate executes correctly. I believe I am receiving the warnings listed above because my template is just a copy of 0ANALYSIS_PATTERN with logos and stuff added.

After the test above, I receive the same results when I use the BEx Web Analyzer iView.

Perhaps restart of the J2EE Engine (Portal) could work. Nevertheless you should create an OSS-Message for this problem.

Tuesday, September 12, 2006

[nw2004s] no data real time cube read mode

use rsrt to set Data Integrity > 1 for direct access to real time cube data
how to set Data Integrity in cube level?

Sunday, September 03, 2006

[BPS] - Fox call function

If you want to call function in BPS FOX, you need to maintain that function in table RSPLF_FDIR first (SM31).