ECC Procurement, Indirect Procurement, SQL4

Description
Columns: Ecc Spec Id, Cat Source Type, Cat Source, Cat Po Header Id, Cat Po Line Id, Cat End Date, Cat Document Number, Cat Line Number, Cat Req Template Name, Cat Req Template Line Num ...
Imported from ECC
select * from (select ctxh.source_type
    || '-'
    || ctxh.org_id
    || '-'
    || ctxh.inventory_item_id
    || '-'
    || ctxh.po_line_id
    || '-'
    || ctxh.req_template_name
    || '-'
    || ctxh.req_template_line_num
    || '-'
    || NULL
    || '-'
    || NULL
    || '-'
    || NULL
    || '-'
    || NULL
    || '-'
    || pla.po_header_id
    || '-'
    || pla.po_line_id
    || '-'
    || NULL
    || '-'
    || pba.action_id
    || '-'
    || pba.entity_id
    || '-'
    || pba.entity_type
    || '-'
    || NULL
    || '-'
    || NULL
    || '-'
    || NULL
    || '-'
    || 'ACTION_ITEMS' ecc_spec_id,
    --catalog items
    ctxh.source_type cat_source_type,
    (select meaning from fnd_lookup_values
      where lookup_type = 'ICX_CAT_SOURCE_TYPE' and lookup_code = ctxh.source_type AND language= houtl.language) cat_source_type_code,
    DECODE(ctxh.source_type,'TEMPLATE',DECODE(least(LENGTH(ctxh.req_template_name) , 20),20,SUBSTR(ctxh.req_template_name,1,17)
        ||'...',ctxh.req_template_name),'INTERNAL_TEMPLATE',DECODE(least&#