HIERARCHY_NOT_FOUND
Hi Gurus,
We are getting the following error when we are trying to execute a query "HIERARCHY_NOT_FOUND". On further analysis we found the following information:
A RAISE statement in the program "SAPLRRHI" raised the exception
condition "HIERARCHY_NOT_FOUND".
Since the exception was not intercepted by a superior
program, processing was terminated.
Can you please provide some input on this issue.
Thanks in Advance
Hello All,
this a quite old topic, but this is the only one corresponding to the issue I get :
Error analysis
A RAISE statement in the program "SAPLRRHI" raised the exception
condition "HIERARCHY_NOT_FOUND".
Since the exception was not intercepted by a superior
program, processing was terminated.
Short description of exception condition:
For detailed documentation of the exception condition, use
Transaction SE37 (Function Library). You can take the called
function module from the display of active calls.
Trigger Location of Runtime Error
Program SAPLRRHI
Include LRRHIU27
Row 36
Module type (FUNCTION)
Module Name RRHI_ASOHIEDIR_READ
Can anyone confirm that the support package update was finally the correct solution ?
Thanks in advance for the help.
Guillaume P.
Similar Messages
-
Error in BEx Analyzer Exception condition "HIERARCHY_NOT_FOUND" raised.
When i run report 0FIAA_C02_Q1001 with input variable as "My controlling area" i get this error.
ERROR:
Exception condition "HIERARCHY_NOT_FOUND" raised.
ERROR Analysis:
A RAISE statement in the program "SAPLRRH1" raised the exception
condition "HIERARCHY_NOT_FOUND".
Since the exception was not intercepted by a superior
program, processing was terminated.
Please sugggest how to resolve this.
HOw to see which hierarachy it is talking about?
Thanks,
Harika.
Edited by: harikag on Oct 12, 2011 7:11 AM
Edited by: harikag on Oct 12, 2011 7:12 AMHI
FOr 0Costcenterinfoobject->attribute tab->no hierarhcies
->hierarchy tab->i see hierarchy tables are enabled.But when i click on
"MaintainHierachy" there are no hierrachies in it.
For 0CO_AREA infoobject->attribute tab->0CCA_HIENM,0PCA_HIENM hierarchies are there.
->hierarchy tab->nothing is there.
please help out.I didnt load 0COSTELMNT_0102_HIER master datasource in CO_IO.
Is that the reason? -
Exception condition "HIERARCHY_NOT_FOUND" raised. - SAPLRRHI
Hello all,
My issue is very similar as the one described in thread : HIERARCHY_NOT_FOUND, but not solved in the other thread.
I tried to update the system to SP21 as told in the topic, but the issue is still present :
when I open a query with the query designer, I'm still having the same issue. Via the RSRT transaction I get the following error message :
Short text
Exception condition "HIERARCHY_NOT_FOUND" raised.
What happened?
The current ABAP/4 program encountered an unexpected
situation.
Error analysis
A RAISE statement in the program "SAPLRRHI" raised the exception
condition "HIERARCHY_NOT_FOUND".
Since the exception was not intercepted by a superior
program, processing was terminated.
Short description of exception condition:
For detailed documentation of the exception condition, use
Transaction SE37 (Function Library). You can take the called
function module from the display of active calls.
Trigger Location of Runtime Error
Program SAPLRRHI
Include LRRHIU27
Row 36
Module type (FUNCTION)
Module Name RRHI_ASOHIEDIR_READ
I add that the query use a 0cust_sales based hierarchy, when (at the query level) I remove the time dependance the query works fine, but when I select "type of derivation" in the hierarchy display and use 0D_FC_LM1 : I get the error.
(transaction RSTHJTMAINT--> 0D_FC_LM1 based on 0calmonth and use "first day)
Thanks in advance for help.First of all, thanks Maxim to spend time on my issue, it is really appreciated (and sorry for the late answer, I did not have any computers during the week-end).
I checked both tables (SE16 then "number of entries" button) : RSHIEDIR has 5 entries and RSRHIEDIR_OLAP has 9.
So I go to my info-object 0cust_sales, hierarchy tab, "maintain hierarchy" button and reactivate the hierarchy (I only have one line available) and I get the message "There is no modified version for this hierarchy." When I check again the entries number in both tables : no change, (still 5 and 9).
Please find bellow the abap code I get with the message (when I use RSRT) :
Source Code Extract
Line SourceCde
6 *" EXPORTING
7 *" REFERENCE(E_S_HIEDIR) TYPE RRHI_S_HIEDIR
8 *" EXCEPTIONS
9 *" HIERARCHY_NOT_FOUND
10 *"----
11 data: l_hiesid type rrhi_hiesid,
12 l_TMPJOIN type rs_bool.
13
14 CALL FUNCTION 'RRHI_HIESIDASO_GET'
15 EXPORTING
16 i_hiesid = i_hiesid
17 IMPORTING
18 E_HIESID_ASO = l_hiesid.
19
20 if l_hiesid < 0.
21 l_tmpjoin = rs_c_false.
22 else.
23 l_tmpjoin = rs_c_true.
24 endif.
25
26 CALL FUNCTION 'RRHI_HIEDIROLAP_READ'
27 EXPORTING
28 i_hiesid = l_hiesid
29 I_TMPJOIN = l_tmpjoin
30 IMPORTING
31 E_S_HIEDIR = E_S_HIEDIr
32 EXCEPTIONS
33 hierarchy_not_found = 1.
34
35 if sy-subrc <> 0.
>>>>> raise hierarchy_not_found.
37 endif.
38
39 ENDFUNCTION.
Thanks again and please let me know if you need more informations. -
Exception condition "HIERARCHY_NOT_FOUND"
Hello,
we have scenario in Xcelsius where we used QAAWS with different queries.
after upgrading to the EhP1 (BW System) we strated getting WIS errors in QAAWS tool wrt 0country hierarchy even though there are no hierarchies activated in queries.
I rebuilt all the connections but the error is not eliminated - when I try to create a new universe the error is triggered:
Error at quering the hierarchies for dimension 0COUNTRY (Cube xxx/xxxxxx):Exception condition "HIERARCHY_NOT_FOUND" raised.
tried to repair the InfoObjects as well, but it didn't work
any other suggestions?
thanksHi Ingo,
we don't want to use the hierarchy in the universe (thus it's not activated in the BW Query)
- i can run BW Query in BEX Web normally without any errors
- when i perform MDXTEST in BW system the exception HIERARCHY_NOT_FOUND is trigerred:
Auslösestelle des Laufzeitfehlers
Programm SAPLRRH1
Include LRRH1U03
Zeile 69
Modultyp (FUNCTION)
Modulname RRH1_HIERARCHY_IN_TO_EX
I already repaired hierarchies and tables of the 0COUNTRY InfoObject in RSRV , but it didn't help.
Hierarchy is not found in rshiedir table, even though it's there in A version - how can I repair this issue? -
How to populate the ranges using FM for the SELECTs
Hi,
I am still working on the FM to create a generic extractor. I went through the debugger but I am still unable to determine how the ranges are populated. RSA3 always gives me zero values for the results.
There is a RANGE statement in the sample FM and the following statements for SELECTs
RANGES: L_R_CARRID FOR SFLIGHT-CARRID,
L_R_CONNID FOR SFLIGHT-CONNID.
and...
LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'CARRID'.
MOVE-CORRESPONDING L_S_SELECT TO L_R_CARRID.
APPEND L_R_CARRID.
ENDLOOP.
LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'CONNID'.
MOVE-CORRESPONDING L_S_SELECT TO L_R_CONNID.
APPEND L_R_CONNID.
ENDLOOP.
My question is how is L_R_CONNID and L_R_CARRID populated with low and high values for the SELECT statements? I tried to find the DS 0SAPI_SFLIGHT_SIMPLE to run and see how it is set up but there is no such DS.
Would someone take the time to say something about this in several sentences? I have my own code and it seems that it is not populating the values for the SELECTs when I debug from RSA3 when I provide the low and high values.
Would I normally populate the low and high values from the InfoPackage 'Data Selection' tab once I have implemented in BW or ready to test in BW? That would mean I have to choose those fields as selections from RSO2. Anyway, I think I have asked about this but I am hoping to get an answer to get this going...
Appreciate any replies.Hi
Here is an example of an extractor that uses
both method's, if the InfoPackage selection exist's
it overrides the TVARV selection (which is the default).
FUNCTION ZBW_TC_FORECAST_SO_EXTRACTOR.
""Local interface:
*" IMPORTING
*" VALUE(I_REQUNR) TYPE SBIWA_S_INTERFACE-REQUNR
*" VALUE(I_DSOURCE) TYPE SBIWA_S_INTERFACE-ISOURCE OPTIONAL
*" VALUE(I_CHABASNM) TYPE SBIWA_S_INTERFACE-CHABASNM OPTIONAL
*" VALUE(I_MAXSIZE) TYPE SBIWA_S_INTERFACE-MAXSIZE OPTIONAL
*" VALUE(I_INITFLAG) TYPE SBIWA_S_INTERFACE-INITFLAG OPTIONAL
*" VALUE(I_UPDMODE) TYPE SBIWA_S_INTERFACE-UPDMODE OPTIONAL
*" VALUE(I_DATAPAKID) TYPE SBIWA_S_INTERFACE-DATAPAKID OPTIONAL
*" VALUE(I_PRIVATE_MODE) OPTIONAL
*" VALUE(I_CALLMODE) TYPE ROARCHD200-CALLMODE OPTIONAL
*" TABLES
*" I_T_SELECT TYPE SBIWA_T_SELECT OPTIONAL
*" I_T_FIELDS TYPE SBIWA_T_FIELDS OPTIONAL
*" E_T_DATA STRUCTURE ZBW_TC_FORECASTING_EXT_STR OPTIONAL
*" EXCEPTIONS
*" NO_MORE_DATA
*" ERROR_PASSED_TO_MESS_HANDLER
*" HIERARCHY_NOT_FOUND
Change History *
Mod. # | Date | Developer | Description *
*RD3K915762|06/21/2005| SRangaraj | Change selection of open SO *
| | | data to include deleted matls *
| | | and obsolete items too *
RD3K915888|06/29/2005| SRANGARAJ | Add ext matl grp and lab offce
| | | filters for data-selection *
The input parameter I_DATAPAKID is not supported yet !
Auxiliary Selection criteria structure
DATA: L_S_SELECT TYPE SBIWA_S_SELECT.
Maximum number of lines for DB table
STATICS L_MAXSIZE TYPE SBIWA_S_INTERFACE-MAXSIZE.
Parameter I_PRIVATE_MODE:
Some applications might want to use this function module for other
purposes as well (e.g. data supply for OLTP reporting tools). If the
processing logic has to be different in this case, use the optional
parameter I_PRIVATE_MODE (not supplied by BIW !) to distinguish
between BIW calls (I_PRIVATE_MODE = SPACE) and other calls
(I_PRIVATE_MODE = X).
If the message handling has to be different as well, define Your own
messaging macro which interprets parameter I_PRIVATE_MODE. When
called by BIW, it should use the LOG_WRITE macro, otherwise do what
You want.
Initialization mode (first call by SAPI) or data transfer mode
(following calls) ?
IF I_INITFLAG = SBIWA_C_FLAG_ON.
Initialization: check input parameters
buffer input parameters
prepare data selection
The input parameter I_DATAPAKID is not supported yet !
Invalid second initialization call -> error exit
IF NOT G_FLAG_INTERFACE_INITIALIZED IS INITIAL.
IF 1 = 2. MESSAGE E008(R3). ENDIF.
LOG_WRITE 'E' "message type
'R3' "message class
'008' "message number
' ' "message variable 1
' '. "message variable 2
RAISE ERROR_PASSED_TO_MESS_HANDLER.
ENDIF.
Check InfoSource validity
CASE I_DSOURCE.
WHEN 'ZBW_TC_SO_EXTRACT'.
WHEN OTHERS.
IF 1 = 2. MESSAGE E009(R3). ENDIF.
LOG_WRITE 'E' "message type
'R3' "message class
'009' "message number
I_DSOURCE "message variable 1
' '. "message variable 2
RAISE ERROR_PASSED_TO_MESS_HANDLER.
ENDCASE.
Check for supported update mode
CASE I_UPDMODE.
WHEN 'F'.
WHEN OTHERS.
IF 1 = 2. MESSAGE E011(R3). ENDIF.
LOG_WRITE 'E' "message type
'R3' "message class
'011' "message number
I_UPDMODE "message variable 1
' '. "message variable 2
RAISE ERROR_PASSED_TO_MESS_HANDLER.
ENDCASE.
Check for obligatory selection criteria
READ TABLE I_T_SELECT INTO L_S_SELECT WITH KEY FIELDNM = 'PGMID'.
IF SY-SUBRC <> 0.
IF 1 = 2. MESSAGE E010(R3). ENDIF.
LOG_WRITE 'E' "message type
'R3' "message class
'010' "message number
'PGMID' "message variable 1
' '. "message variable 2
RAISE ERROR_PASSED_TO_MESS_HANDLER.
ENDIF.
APPEND LINES OF I_T_SELECT TO G_T_SELECT.
Fill parameter buffer for data extraction calls
G_S_INTERFACE-REQUNR = I_REQUNR.
G_S_INTERFACE-ISOURCE = I_DSOURCE.
G_S_INTERFACE-MAXSIZE = I_MAXSIZE.
G_S_INTERFACE-INITFLAG = I_INITFLAG.
G_S_INTERFACE-UPDMODE = I_UPDMODE.
G_S_INTERFACE-DATAPAKID = I_DATAPAKID.
G_FLAG_INTERFACE_INITIALIZED = SBIWA_C_FLAG_ON.
Fill field list table for an optimized select statement
(in case that there is no 1:1 relation between InfoSource fields
and database table fields this may be far from beeing trivial)
APPEND LINES OF I_T_FIELDS TO G_T_FIELDS.
Fill range tables for fixed InfoSources. In the case of generated
InfoSources, the usage of a dynamical SELECT statement might be
more reasonable. BIW will only pass down simple selection criteria
of the type SIGN = 'I' and OPTION = 'EQ' or OPTION = 'BT'.
LOOP AT G_T_SELECT INTO L_S_SELECT.
CASE L_S_SELECT-FIELDNM.
WHEN 'PRDHA'.
WGF_PRDHA_LENGTH = STRLEN( L_S_SELECT-LOW ).
IF WGF_PRDHA_LENGTH = 6. "PARTIAL PRDHA
WGF_PRDHA = L_S_SELECT-LOW.
CONCATENATE WGF_PRDHA '%' INTO WGF_PRDHA.
ELSEIF WGF_PRDHA_LENGTH = 12. "FULL PRDHA
MOVE-CORRESPONDING L_S_SELECT TO L_R_PRDHA.
APPEND L_R_PRDHA.
ENDIF.
WHEN 'MATKL'.
MOVE-CORRESPONDING L_S_SELECT TO L_R_MATKL.
APPEND L_R_MATKL.
ENDCASE.
ENDLOOP.
reset the index of where we are in the gt_header table
g_tabix = 0.
perform populate_default_variables.
perform get_data.
perform build_detail.
EXIT.
ENDIF. "Initialization mode or data extraction ?
Data transfer: First Call OPEN CURSOR + FETCH
Following Calls FETCH only
First data package -> OPEN CURSOR
IF G_COUNTER_DATAPAKID = 0.
Determine number of database records to be read per FETCH statement
from input parameter I_MAXSIZE. If there is a one to one relation
between InfoSource table lines and database entries, this is trivial.
In other cases, it may be impossible and some estimated value has to
be determined.
DESCRIBE TABLE LT_DATA LINES l_count.
IF g_tabix GE l_count.
RAISE no_more_data.
ENDIF.
*CLEAN UP THE OUTPUT TABLE
refresh E_T_DATA.
LOOP AT LT_DATA FROM G_TABIX INTO LS_DATA.
APPEND LS_DATA TO E_T_DATA.
Set global counter
g_tabix = g_tabix + 1.
ENDLOOP.
G_COUNTER_DATAPAKID = G_COUNTER_DATAPAKID + 1.
ENDIF. "Initialization mode or data extraction ?
ENDFUNCTION.
Forms
***INCLUDE LZBW_TC_FORECAST_SO_EXTF01 .
*& Form populate_default_variables
text
--> p1 text
<-- p2 text
FORM populate_default_variables.
data: wlf_name like tvarv-name.
clear: R_prdh3[], wlf_name.
*get the exclusion range from tvarv for the product hierarchy in
*question
concatenate 'ZBW_EXL_' WGF_PRDHA(6) INTO WLF_NAME.
SELECT LOW FROM TVARV INTO R_prdh3-low WHERE
NAME = WLF_NAME.
move: 'I' to R_prdh3-sign,
'EQ' to R_prdh3-option.
append R_prdh3.
clear R_prdh3.
ENDSELECT.
{Start of insert by SRangaraj on June 29, 2005 >>RD3K915888
CLEAR L_R_LABOR[].
SELECT LOW FROM TVARV INTO L_R_LABOR-Low WHERE
NAME = 'ZBW_TC_FORECAST_LAB_OFF'.
move: 'I' to L_R_LABOR-sign,
'EQ' to L_R_LABOR-option.
append L_R_LABOR.
clear L_R_LABOR.
ENDSELECT.
}End of insert by SRangaraj on June 29, 2005 >>RD3K915888
ENDFORM. " populate_default_variables
*& Form get_data
text
--> p1 text
<-- p2 text
FORM get_data.
data: wlf_lmeng like vbep-lmeng.
*get all deliveries for date range for either a range of product hrchy
*or a like value
refresh int_records1.
if wgf_prdha ne space.
select ivbeln iposnr iKLMENG jvkorg i~werks
imatnr imeins mprdha mmatkl
from vbap as i
INNER JOIN VBAK AS j
ON ( jvbeln = ivbeln
and j~vbtyp = 'C' )
INNER JOIN vbuk AS k
ON ( kvbeln = ivbeln
and k~lfgsk <> 'C'
and k~gbstk <> 'C' )
INNER JOIN vbup AS l
ON ( lvbeln = ivbeln and
lposnr = iposnr
and l~lfgsa <> 'C'
and l~gbsta <> 'C' )
INNER JOIN mara AS m
ON ( mmatnr = imatnr
{Start of insert by SRangaraj on June 21, 2005 >>RD3K915762
and m~lvorm eq ' '
and m~mstae ne '99'
{Start of insert by SRangaraj on June 29, 2005 >>RD3K915888
and m~extwg = '080' )
}End of insert by SRangaraj on June 29, 2005 >>RD3K915888
INNER JOIN marc AS n
ON ( nmatnr = imatnr
and nwerks = iwerks
and n~lvorm eq ' ' )
}End of insert by SRangaraj on June 21, 2005 >>RD3K915762
into table int_records1 where ( i~abgru = ' '
and i~klmeng > 0
and m~prdha like wgf_prdha
and m~matkl in l_r_matkl
{Start of insert by SRangaraj on June 29, 2005 >>RD3K915888
and m~labor in l_r_labor ).
}End of insert by SRangaraj on June 29, 2005 >>RD3K915888
elseif not l_r_prdha[] is initial and wgf_prdha = space.
select ivbeln iposnr iKLMENG jvkorg i~werks
imatnr imeins mprdha mmatkl
from vbap as i
INNER JOIN VBAK AS j
ON ( jvbeln = ivbeln
and j~vbtyp = 'C' )
INNER JOIN vbuk AS k
ON ( kvbeln = ivbeln
and k~lfgsk <> 'C'
and k~gbstk <> 'C' )
INNER JOIN vbup AS l
ON ( lvbeln = ivbeln and
lposnr = iposnr
and l~lfgsa <> 'C'
and l~gbsta <> 'C' )
INNER JOIN mara AS m
ON ( mmatnr = imatnr
{Start of insert by SRangaraj on June 21, 2005 >>RD3K915762
and m~lvorm eq ' '
and m~mstae ne '99'
{Start of insert by SRangaraj on June 29, 2005 >>RD3K915888
and m~extwg = '080' )
}End of insert by SRangaraj on June 29, 2005 >>RD3K915888
INNER JOIN marc AS n
ON ( nmatnr = imatnr
and nwerks = iwerks
and n~lvorm eq ' ' )
}End of insert by SRangaraj on June 21, 2005 >>RD3K915762
into table int_records1 where ( i~abgru = ' '
and i~klmeng > 0
and m~prdha in l_r_prdha
and m~matkl in l_r_matkl
{Start of insert by SRangaraj on June 29, 2005 >>RD3K915888
and m~labor in l_r_labor ).
}End of insert by SRangaraj on June 29, 2005 >>RD3K915888
endif.
sort int_records1 by vbeln posnr.
delete adjacent duplicates from int_records1 comparing
vbeln posnr.
*remove unnecessary records
if not r_prdh3[] is initial.
DELETE INT_RECORDS1 WHERE PRDHA+6(3) IN r_prdh3.
endif.
*get the schedule lines for all of the above records and
*get the lowest schedule line date per so line item
if not int_records1[] is initial.
refresh int_records3.
select vbeln posnr etenr mbdat into table int_records3
from vbep for all entries in int_records1
where vbeln = int_records1-vbeln and
posnr = int_records1-posnr and
lmeng > 0.
sort int_records3 by vbeln posnr etenr mbdat ascending.
loop at int_Records1.
loop at int_records3 where vbeln = int_records1-vbeln
and posnr = int_records1-posnr.
int_records1-mbdat = int_records3-mbdat.
modify int_records1.
exit.
endloop.
endloop.
refresh int_records3. free int_records3.
refresh int_records2.
*get the deliveries and calculate the open quantities
select vbelv posnv vbeln posnn rfmng plmin
from vbfa into table int_records2
for all entries in int_Records1
where vbelv = int_records1-vbeln
and posnv = int_records1-posnr
and VBTYP_N = 'J'. "Dels
*calculate open quantities next
loop at int_records1.
clear wlf_lmeng.
clear int_records2.
loop at int_records2 where vbelv = int_records1-vbeln
and posnv = int_records1-posnr.
case int_records2-plmin.
when '-'.
wlf_lmeng = wlf_lmeng - int_records2-rfmng.
when others. "just add
wlf_lmeng = wlf_lmeng + int_records2-rfmng.
endcase.
endloop.
int_records1-klmeng = int_records1-klmeng - wlf_lmeng.
int_records1-vbeln_dl = int_records2-vbeln.
int_records1-posnr_dl = int_records2-posnn.
modify int_records1.
endloop.
endif.
delete int_records1 where klmeng le 0.
refresh int_records2. free int_Records2.
ENDFORM. " get_data
*& Form build_detail
text
--> p1 text
<-- p2 text
FORM build_detail.
LOOP AT int_records1.
*DO INDIVIDUAL MOVES - ITS FASTER THAN MOVE-CORRESPONDING
move: int_records1-vkorg to LS_DATA-VKORG,
int_records1-werks to LS_DATA-WERKS,
int_records1-matnr to LS_DATA-MATNR,
int_records1-klmeng to LS_DATA-KLMENG,
int_records1-mbdat(6) to LS_DATA-YEARMONTH,
int_records1-meins TO LS_DATA-MEINS,
int_records1-vbeln TO LS_DATA-VGBEL,
int_records1-posnr TO LS_DATA-VGPOS,
int_records1-vbeln_dl TO LS_DATA-VBELN,
int_records1-posnr_dl TO LS_DATA-POSNR,
int_records1-mbdat to LS_DATA-WADAT_IST,
int_records1-PRDHA to LS_DATA-PRDHA,
int_records1-matkl to LS_DATA-MATKL.
APPEND LS_DATA TO LT_DATA.
clear: LS_DATA.
ENDLOOP.
ENDFORM. " build_detail -
SAP BW query to BOBJ Universe: The supplied XML is not valid.
Help!
The Business Objects Sever XI is giving us messages like the below, on some but not all BOBJ Universes based on SAP BW queries.
A database error occurred. The database error text is: The supplied XML is not valid. [various InfoObjects] [LEVEL01] (WIS 10901)
These queries were executing 1 working day, 3 calendar days ago. No transports to SAP BW or promotions to BOBJ were made.
Any ideas?
Thanks,
John Hawk
When we refresh the Universe, we get this mesdage
Error getting hierarchies for dimension 0INFOPROV (Cube FIGL_M10/FIGL_M10_Q001): Exception condition "HIERARCHY_NOT_FOUND" raised
Edited by: John Hawk on Jun 1, 2010 9:15 PMHi John,
I'm also getting same error 'Error getting hierarchies for dimension 0INFOPROV (Cube ZLE_M10/YBO_FREIGHT_ZLE_M10_UNIV_MPT1): Unknown error' when tried to create universe on top of query which is based on multi provider. Could you please send me copy of program ZZ_REPAIR_HIEDIR?
Thanks,
Milind -
Hierarchy BW User Exit code EXIT_SAPLRSAP_004 ZXRSAU04
Hi All,
We are loading Hierarchy data in BW using User Exit by taking data from master dat InfoObject.
As we thought it's working fine; but on every 2nd load it's getting failed (1st load is success, 2nd load failed, 3rd load success likewise; so every alternate load is getting failed). We tried with all the options in Infopackage.
As per our assumptions and the requirement we could able to load the data through user exit.
We need your help in the following code where we are missing or we are missing some process in BW.
We request you please give us suggestions ASAP.
thanks in Advance.
*& Include ZXRSAU04
data:y_i_/BIC/PYIOSID type standard table of /BIC/PYIOSID,
y_wa_/BIC/PYIOSID type /BIC/PYIOSID,
lwa_upmode type char1.
data:y_i_/BI0/HCRM_OBJ_ID type standard table of /BI0/HCRM_OBJ_ID,
y_wa_/BI0/HCRM_OBJ_ID type /BI0/HCRM_OBJ_ID,
y_wa_hienode type RSAP_S_HIENODE.
data:y_I_table like standard table of C_T_HIENODE.
data: y_v_active type char1.
data:y_v_n(8) type n.
*refresh C_T_HIENODE[].
case I_DATASOURCE.
when '80CRM_OBJ_IDH'.
To load the data from YIOSID master data into 0CRM_OBJ_ID hierarchy
delete C_T_HIENODE where nodeid ne '00000001'.
select single *
from /BI0/HCRM_OBJ_ID
into y_wa_/BI0/HCRM_OBJ_ID
where nodeid = '00000002'.
if sy-subrc eq 0.
move:C_T_HIENODE[] to y_I_table[].
refresh C_T_HIENODE.
move y_I_table[] to C_T_HIENODE[].
refresh y_I_table[].
CALL FUNCTION 'RSHIER_HIER_SUBTREE_DELETE'
EXPORTING
I_HIEID = y_wa_/BI0/HCRM_OBJ_ID-HIEID
I_DEL_IOBJNM = y_wa_/BI0/HCRM_OBJ_ID-IOBJNM
I_DEL_NODENAME = y_wa_/BI0/HCRM_OBJ_ID-nodename
I_DEL_DATETO =
EXCEPTIONS
FOREIGN_LOCK = 1
HIERARCHY_NOT_FOUND = 2
CANCELED = 3
OTHERS = 4
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
else.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
delete C_T_HIENODE where nodeid ge '00000002'.
commit work and wait.
wait up to 15 seconds.
CALL FUNCTION 'RSHIER_HIER_CHECK_AND_ACTIVATE'
EXPORTING
I_HIEID = y_wa_/BI0/HCRM_OBJ_ID-HIEID
IMPORTING
E_ACTIVE_STATE = y_v_active
EXCEPTIONS
CANCELED = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
wait up to 3 seconds.
else.
commit work and wait.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
ENDIF.
endif.
endif.
select *
from /BIC/PYIOSID
into table y_i_/BIC/PYIOSID.
if sy-subrc eq 0.
sort y_i_/BIC/PYIOSID by /BIC/YIOSID OBJVERS.
endif.
if y_i_/BIC/PYIOSID[] is not initial.
move: '0HIER_NODE' to C_T_HIENODE-IOBJNM,
'OPP_NUM' to C_T_HIENODE-NODENAME,
'00000002' to C_T_HIENODE-NODEID,
'02' TO C_T_HIENODE-TLEVEL,
'00000001' to C_T_HIENODE-PARENTID,
'00000001' to C_T_HIENODE-childid.
append C_T_HIENODE.
move:
'0HIER_NODE' to c_t_foldert-IOBJNM,
'OPP_NUM' to c_t_foldert-NODENAME,
'E' to c_t_foldert-langu,
'OPP_NUM' to c_t_foldert-txtsh.
append c_t_foldert.
loop at y_i_/BIC/PYIOSID into y_wa_/BIC/PYIOSID.
if y_wa_/BIC/PYIOSID-/BIC/YIOSID is not initial.
if y_wa_/BIC/PYIOSID-/BIC/YIOSID gt 2.
move: '0CRM_OBJ_ID' to C_T_HIENODE-IOBJNM,
y_wa_/BIC/PYIOSID-/BIC/YIOOBJ to C_T_HIENODE-NODENAME,
y_wa_/BIC/PYIOSID-/BIC/YIOSID to y_v_n,
y_v_n to C_T_HIENODE-NODEID,
y_wa_/BIC/PYIOSID-/BIC/YIOTLEV TO C_T_HIENODE-tlevel,
y_wa_/BIC/PYIOSID-/BIC/YIOPLEV to y_v_n,
y_v_n to C_T_HIENODE-PARENTID.
append C_T_HIENODE.
endif.
endif.
endloop.
endif.
endcase.
*ROSHIENODEHi!
I had the same problem during this user exit run.
When load failed a new dump DBIF_RSQL_INVALID_CURSOR appeared.
My problem appeared because system was loosing cursor during a SELECT...ENDSELECT run.
I made my SELECTs smaller and everything become fine.
SDN gives some notes:
SAP Note Number: 1124093 70SP17: Extraction terminates with DBIF_RSQL_INVALID_CURSOR
SAP Note Number: 401847 DBIF_RSQL_INVALID_CURSOR during extraction
SAP Note Number: 675 Unexpected abends in SELECT loops (COMMIT)
Hope it helps.
Maybe you are looking for
-
How to sort an Internal table Based on a One Char Trans type in the rec?
Meaning, ascending descending will not work, lets say itab_A has the order O-H-W-G-I-A, and I want it to write it to itab_B to the correct order, G-H-O-I-A-W. I know I can do loop at itab_A where for each one and write it, but is their a better way?
-
ACK_ channel for handling ALEAUD back to ECC system
Hi, I have created a channel called ACK_Receiver_XI_TO_ECC for sending ALEAUD for all IDOC's that are received from ECC to XI. I also have another receiver IDOC channel for all IDOCs that are sent from XI to ECC. I read in one of the pdf's that when
-
COMMIT_WORK in FM, SO_DOCUMENT_SEND_API1
Hi, I use this FM to send e-mail in VA01 for a certain output type. I passed a parameter, COMMIT_WORK with an 'X'. But then when creating sales order upon saving, i got an update terminate. Studying the dump error, it is an error of COMMIT_IN_POSTING
-
White-based Alpha channel for flv export
I'm trying to export a sequence into flash (.flv) and include the alpha channel. The default alpha channel base color is black, but I need white because the black creates an outline around the object (check out www.wavereel.com to see the video I exp
-
Can we install different oracle editions in a single system
Hi, Can we install oracle standard edition s/w and enterprise edition s/w in a single windows or unix box. Thanks, Mahi