*"----------------------------------------------------------------------
types:
begin of ty_paccount,
/bic/paccount type /bic/oipaccount,
end of ty_paccount.
data:
l_dsoname type rsbktgtnm,
l_odsrnr type rsrequid,
lt_paccount type hashed table of ty_paccount
with unique default key,
l_idx like sy-tabix,
l_odsobject type rsdodsobject,
l_changelog_tabname type tabname.
field-symbols:
<fs_paccount> like line of lt_paccount.
*"----------------------------------------------------------------------
break-point id break.
*" Get DSO name and last activated request
l_dsoname = i_r_request->get_tgt( ).
l_odsobject = l_dsoname.
select single
odsrnr
from rsstatmanpart
into l_odsrnr
where dta eq l_dsoname
and dta_type eq `ODSO`
and odsrnrsid eq ( select
max( odsrnrsid ) as odsrnrsid
from rsstatmanpart
where dta eq l_dsoname
and dta_type eq `ODSO`
).
read table l_t_range with key
fieldname = 'F1'.
l_idx = sy-tabix.
if l_odsrnr is not initial.
call method cl_rsd_odso=>get_tablnm
exporting
i_odsobject = l_odsobject
i_tabt = 3 "Changelog
importing
e_tablnm = l_changelog_tabname.
select distinct
/bic/paccount
into table lt_paccount
from (l_changelog_tabname)
where request eq l_odsrnr.
loop at lt_paccount assigning <fs_paccount>.
l_t_range-iobjnm = 'F1'.
l_t_range-fieldname = 'F1'.
l_t_range-sign = 'I'.
l_t_range-option = 'EQ'.
l_t_range-low = <fs_paccount>-/bic/paccount.
if l_idx <> 0.
modify l_t_range index l_idx.
else.
append l_t_range.
endif.
endloop.
endif.
p_subrc = 0.
*-----------------------------------------------------------------------
types:
begin of ty_paccount,
/bic/paccount type /bic/oipaccount,
end of ty_paccount.
data:
l_dsoname type rsbktgtnm,
l_odsrnr type rsrequid,
lt_paccount type hashed table of ty_paccount
with unique default key,
l_idx like sy-tabix,
l_odsobject type rsdodsobject,
l_changelog_tabname type tabname.
field-symbols:
<fs_paccount> like line of lt_paccount.
*"----------------------------------------------------------------------
break-point id break.
*" Get DSO name and last activated request
l_dsoname = i_r_request->get_tgt( ).
l_odsobject = l_dsoname.
select single
odsrnr
from rsstatmanpart
into l_odsrnr
where dta eq l_dsoname
and dta_type eq `ODSO`
and odsrnrsid eq ( select
max( odsrnrsid ) as odsrnrsid
from rsstatmanpart
where dta eq l_dsoname
and dta_type eq `ODSO`
).
read table l_t_range with key
fieldname = 'F1'.
l_idx = sy-tabix.
if l_odsrnr is not initial.
call method cl_rsd_odso=>get_tablnm
exporting
i_odsobject = l_odsobject
i_tabt = 3 "Changelog
importing
e_tablnm = l_changelog_tabname.
select distinct
/bic/paccount
into table lt_paccount
from (l_changelog_tabname)
where request eq l_odsrnr.
loop at lt_paccount assigning <fs_paccount>.
l_t_range-iobjnm = 'F1'.
l_t_range-fieldname = 'F1'.
l_t_range-sign = 'I'.
l_t_range-option = 'EQ'.
l_t_range-low = <fs_paccount>-/bic/paccount.
if l_idx <> 0.
modify l_t_range index l_idx.
else.
append l_t_range.
endif.
endloop.
endif.
p_subrc = 0.
*-----------------------------------------------------------------------
Динамическое имя дсо - https://searchsap.techtarget.com/tip/Dynamic-name-determination-of-an-ODS-table
Комментариев нет:
Отправить комментарий