Härzlig willkome zue minere Bocksnip Code-Gallerie um alli Arte vo Code z'teile.

Flat Screen Report Blocking Task

Avaloq · August 30, 2016 3:18 pm

0 0 354

Das isch dr Flat Screenreport für dr Blocking Task Report

[Report 2.0]

report rbsc$task_blocking.blc_flat
/*
-------------------------------------------------------------------------------------------------------------
Bank:
Business Area:
Description: Flat screen report for accessing objects with blocks
-------------------------------------------------------------------------------------------------------------
ID Date Name, Company Issue Affected BUs, Description
-------------------------------------------------------------------------------------------------------------
001
-------------------------------------------------------------------------------------------------------------
*/


----------------------------------------------------------------------------
-- HEADER
----------------------------------------------------------------------------
naming
dfltlang 'Flat list of object blockings (w/o pos blocking)'

user_id 'BLC_FLAT'

----------------------------------------------------------------------------
-- DATAMART
----------------------------------------------------------------------------
datamart

connect rbsc$blocking as dt
where [(dt.obj_type_id != 9 or dt.obj_sub_type_id = 1)]

group by
obj [dt.obj]

consolidate
on obj
bu_id number assign [dt.bu_id]
bu text assign [obj_with_hist_name(dt.bu_id).displ_text]
obj_type_id number assign [dt.obj_type_id]
obj_type text assign [dt.obj_type.name]
obj_sub_type_id number assign [dt.obj_sub_type_id]
obj_sub_type text assign [dt.obj_sub_type.name]
obj_id number assign [dt.obj_id]
obj text assign [obj_with_hist_name(dt.obj_id).displ_text]
block_id number assign [dt.block_id]
block text assign [dt.block.name]
block_text text assign [dt.block_text]
remark text assign [dt.remark]
bp_id number assign [case when dt.obj_type_id = 4 then dt.obj_id
when dt.obj_type_id = 1 then obj_cont(dt.obj_id).bp_id
when dt.obj_type_id = 9 then obj_pos(dt.obj_id).bp_id
else null
end]
close_date date assign [dt.obj.close_date]

end datamart

----------------------------------------------------------------------------
-- LAYOUT
----------------------------------------------------------------------------
screen layout
order by 0

----------------------------------------------------------------------------
-- LAYOUT SETTINGS
----------------------------------------------------------------------------
-- title 'Blockings'
--------------------------------------------------------------------------
on column head
column bu
label session.text('LABEL.BU');
column bp
label session.text('LABEL.BP_NR');
column pb
label session.text('LABEL.PRIVATE_BANKER');
column obj_type
label session.text('LABEL.OBJ_TYPE');
column obj_sub_type
label session.text('LABEL.OBJ_SUB_TYPE');
column obj
label session.text('LABEL.OBJ');
column block
label session.text('LABEL.BLOCK_CODE');
column block_text
label session.text('LABEL.BLOCK_TEXT');
column remark
label session.text('LABEL.REMARK');
column gnrl_block
label session.text('I_OBJ_CLASSIF.360');
column bt_block
label session.text('I_OBJ_CLASSIF.141');
column close_date
label session.text('LABEL.CLOSE_DATE');

--------------------------------------------------------------------------
on report head
---- HANDLE NO DATA FOUND ----
if top.seq_nr is null then
linefeed;
column bu 'No data found'
end if;

--------------------------------------------------------------------------
on obj head
column bu ctx 'bp' obj.bu_id
obj.bu;
column bp ctx 'bp' obj.bp_id
obj_bp(obj.bp_id).extn.bp_nr;
with obj_bp(obj.bp_id) as bp do
if bp.rel_obj_id(obj_rel_sub_type_id => 5515) > 0 then
with obj_bp(bp.rel_obj_id(obj_rel_sub_type_id => 5515)) as pb do
column pb ctx 'bp' pb.id
pb.displ_text;
end with;
end if;
end with;
column obj_type ctx 'code' 'code_obj_type;' || obj.obj_type_id
obj.obj_type;
if obj.obj_sub_type_id is not null then
column obj_sub_type ctx 'code' 'code_obj_sub_type;' || obj.obj_sub_type_id
obj.obj_sub_type;
end if;
column obj ctx 'obj' obj.obj_id
obj.obj;
column block ctx 'code' 'code_block;' || obj.block_id
obj.block;
column block_text obj.block_text;
column remark obj.remark;

-- Blocking classes for BP and CONT
if obj.obj_type_id = code_obj_type.cont then
column bt_block obj_cont(obj.obj_id).extn.cont_mt_block.name;
elsif obj.obj_type_id = code_obj_type.bp then
column gnrl_block obj_bp(obj.obj_id).extn.bp_block.name;
end if;

--
column close_date obj.close_date

end layout

end report

Besprich das Bocksnip
    Kei Kommentar zur Diskussion gfunde

    Du muesch igloggt si, um über das Bocksnip z'diskutiere
boecki

boecki

Nimmt teil
August 13, 2016

  • 64 Bocksnipa
    gschriebe
  • 0 Likes
    verteilt
  • 1 Kommentär gmacht
Bocksnip Tags
Teil din Code

Organisier und teil all dini Code Snips a eim Platz.