‎2007 Oct 05 10:39 AM
Hi,
anybody worked on FM "RSNDI_SHIE_STRUCTURE_GET3"???
this is basically takes input as hierarchy name and displays subnodes.
my code goes like this...please check and let me know if any where i am going wrong.
all inputs i am passing to FM are correct and they have values too!
it is not giving any output when i execute this.
Report ZTEST4.
*Hierarchy ID (Unique ID)
*DATA: lh_hiekey type RSNDI_S_HIEKEY,
*Hierarchy Selection
data: lh_hiesel type standard table of RSNDI_S_HIESEL with header line,
*Node Identification Using Name Without Link
lh_subsel type standard table of RSSH_S_NODEBYNAMEWOL with header line,
*Hierarchy Header Information NDI
lh_hiedir TYPE RSNDI_S_HIEDIR,
lh_rc TYPE SYSUBRC.
*----
tables : ZREPCODMAP.
data: itab type standard table of ZREPCODMAP with header line.
TYPES: BEGIN OF STRUC,
RESULT type /BI0/HCOSTELMNT-nodename,
END OF STRUC.
DATA: itab1 type standard table of struc with header line.
select * from ZREPCODMAP into table itab where PROFIT_CTR <> ' '.
*----
data: xt_hierstruc TYPE STANDARD TABLE OF RSNDI_S_HTAB WITH HEADER LINE.
Select OBJVERS HIENM VERSION DATETO IOBJNM from RSHIEDIR into table
lh_hiesel where IOBJNM = '0COSTELMNT'.
TYPES: begin of xxx,
HIEID1 type RSHIEDIR-HIEID,
end of xxx.
data: xxx1 type standard table of xxx with header line.
**
Select HIEID FROM RSHIEDIR INTO table XXX1 WHERE IOBJNM = '0COSTELMNT' and HIENM = '1000KES'.
*----
*BREAK-POINT.
DATA: LV_NODENAME TYPE /BI0/HCOSTELMNT-nodename.
SORT ITAB BY REPDSELM .
DELETE ADJACENT DUPLICATES FROM ITAB COMPARING ALL FIELDS.
loop at itab.
concatenate itab-CO_AREA itab-REPDSELM INTO LV_NODENAME.
ITAB1-RESULT = LV_NODENAME.
APPEND ITAB1.
endloop.
Select NODENAME IOBJNM from /BI0/HCOSTELMNT
into table lh_subsel
for all entries in itab1
where nodename = itab1-RESULT.
loop at lh_subsel.
*write:/ lh_subsel.
endloop.
*----
CALL FUNCTION 'RSNDI_SHIE_STRUCTURE_GET3'
EXPORTING
*----
HIEID
*i_s_hiekey = lh_hiekey
*----
PASS hier name,,,version,,,dateto IOOBJNM
i_s_hiesel = lh_hiesel
*----
NODE NAME
i_s_subtreesel = lh_subsel
IMPORTING
------------STRUCTURE
e_s_hiedir = lh_hiedir
e_subrc = lh_rc
TABLES
e_t_hierstruc = xt_hierstruc.
loop at xt_hierstruc.
write: xt_hierstruc.
endloop.
Thanks & Regards,
Vijaya
‎2010 Dec 22 5:32 AM