Ex: completar un dato en las subida
clear result.
select single /BIC/Z_GROUP
into result
from /BI0/PPROD_HIER
where PROD_HIER = SOURCE_FIELDS-PRDHA
and OBJVERS eq 'A'.
Ex.: 0COSTCENTER-->Cost center hierarchy
select single * from rshiedir into hier_wa where
objvers eq 'A' and
hietype eq '1' and
hienm eq hier_name and
dateto ge sy-datum .
if sy-subrc ne 0 .
raise invalid_hierarchy .
endif .
clear hier_detail .
move: hier_wa-hieid to hier_detail-hieid ,
hier_wa-objvers to hier_detail-objvers .
call function 'RSSH_HIERARCHY_READ'
exporting
i_rshiedirkey = hier_detail
* I_RSHIEDIRLOG =
i_date = sy-datum
importing
e_rshiedir = e_rshiedir
e_t_rsnodes = e_t_rsnodes
e_th_rsinterval = e_th_rsinterval
e_duplicate_leafs = e_duplicate_leafs
e_t_rsnodes_lnk = e_t_rsnodes_lnk
exceptions
invalid_hierarchy = 1
name_error = 2
iobj_not_found = 3
others = 4 .
case sy-subrc .
No hay comentarios:
Publicar un comentario