************************************************************************
* ZBW_HANA_MIGRATION_COCKPIT (SAP Note 1909597)
* Provided by Product Management SAP EDW (BW/HANA)
*
* This cockpit combines several tools to make the migration of an
* existing SAP BW deployment to the SAP HANA platform a more
* beautiful experience.
*
* (c) SAP AG 2011-16                               MFB, SAP Canada Inc.
* Last update: 2016-03-22
************************************************************************

REPORT zbw_hana_migration_cockpit.

CONSTANTS:
  c_version    TYPE string VALUE '3.0',
  c_date       TYPE string VALUE '(March 2016)',            "#EC NEEDED

* Set proxy host and port for access from BW application server
* to SAP Community Network (SCN.SAP.COM)
  c_proxy_host TYPE string VALUE '',
  c_proxy_port TYPE string VALUE ''.

*&---------------------------------------------------------------------*
*&  Include           ZBW_HANA_MIGRATION_COCKPIT_020
*&---------------------------------------------------------------------*

TYPE-POOLS:
  abap, icon, slis.

TABLES:
  tpara, tstc.                                              "#EC NEEDED

TYPES:
  BEGIN OF ys_versions,
    tool_name          TYPE prgname,
    available_version  TYPE string,
    available_date     TYPE string,
    sap_note           TYPE string,
    installed_version  TYPE string,
    icon               TYPE icon_d,
    status             TYPE string,
  END OF ys_versions,
  yt_versions TYPE TABLE OF ys_versions,

  BEGIN OF ys_log_table,
    text1    TYPE char200,
    text2    TYPE char200,
    text3    TYPE char200,
    text4    TYPE char200,
    text5    TYPE char200,
    text6    TYPE char200,
    text7    TYPE char200,
    text8    TYPE char200,
    text9    TYPE char200,
    detlevel TYPE ballevel,
  END OF ys_log_table,
  yt_log_table  TYPE TABLE OF ys_log_table.

CONSTANTS:
  c_stc_scenario TYPE memoryid
    VALUE 'STC_SCENARIO_ID',
  c_check_vers   TYPE string
    VALUE 'http://scn.sap.com/docs/DOC-40984'.

*&---------------------------------------------------------------------*
*&  Include           ZBW_HANA_MIGRATION_COCKPIT_010
*&---------------------------------------------------------------------*

* Subscreens/Blocks:
* 100 - Check                            / 100, 150, 160, 180
* 200 - Sizing                           / 200, 210, 220
* 600 - Housekeeping                     / 600, 610
* 300 - Migration                        / 300, 320, 340, 390
* 350 - SAP HANA                         / b00, b10, b20
* 450 - BW, edition for SAP HANA (B4H)   / c00, c10, c20, c30
* 400 - Data Warehouse Management (WHM)  / 400, 420, 430, 440, 410
* 700 - Business Explorer (BEx)          / 700, 720, 740
* 850 - BW Modeling Tools (MT)           / a00
* 800 - Security                         / 800, 820
* 500 - Optimization                     / 500, 510, 520, 540
* 950 - Infos                            / 910, 920, 930, 940
* 900 - About                            / 900, 980, 990

* Checking
SELECTION-SCREEN BEGIN OF SCREEN 100 AS SUBSCREEN.

* - Upgrade Path Finder
SELECTION-SCREEN BEGIN OF BLOCK b180 WITH FRAME.
SELECTION-SCREEN COMMENT:
   /1(77) scr_t180,
   /1(77) scr_t181.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_but180 USER-COMMAND s180,
  PUSHBUTTON 59(55) b_but182 USER-COMMAND s182.
SELECTION-SCREEN END OF BLOCK b180.

* - Checklist Tool
SELECTION-SCREEN BEGIN OF BLOCK b100 WITH FRAME.
SELECTION-SCREEN COMMENT:
   /1(77) scr_t100,
   /1(77) scr_t101.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_but100 USER-COMMAND s100,
  PUSHBUTTON 59(14) b_but101 USER-COMMAND s101,
  PUSHBUTTON 76(36) b_but102 USER-COMMAND s102.
SELECTION-SCREEN END OF BLOCK b100.

* - BW Objects
SELECTION-SCREEN BEGIN OF BLOCK b150 WITH FRAME.
SELECTION-SCREEN COMMENT:
   /1(77) scr_t150,
   /1(77) scr_t151.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_but150 USER-COMMAND s150,
  PUSHBUTTON 59(55) b_but152 USER-COMMAND s152.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_but154 USER-COMMAND s154,
  PUSHBUTTON 59(55) b_but156 USER-COMMAND s156.
SELECTION-SCREEN END OF BLOCK b150.

* - Planning Functions
SELECTION-SCREEN BEGIN OF BLOCK b160 WITH FRAME.
SELECTION-SCREEN COMMENT:
   /1(77) scr_t160 MODIF ID r73,
   /1(77) scr_t161 MODIF ID r73.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_but160 USER-COMMAND s160 MODIF ID r73,
  PUSHBUTTON 59(55) b_but162 USER-COMMAND s162 MODIF ID r73.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_but164 USER-COMMAND s164 MODIF ID hdb,
  PUSHBUTTON 59(55) b_but166 USER-COMMAND s166 MODIF ID hdb.
SELECTION-SCREEN END OF BLOCK b160.

SELECTION-SCREEN END OF SCREEN 100.

*-----------------------------------------------------------------------

* Sizing
SELECTION-SCREEN BEGIN OF SCREEN 200 AS SUBSCREEN.

* - Sizing Tool
SELECTION-SCREEN BEGIN OF BLOCK b200 WITH FRAME.
SELECTION-SCREEN COMMENT:
   /1(77) scr_t200,
   /1(77) scr_t201.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_but200 USER-COMMAND s200,
  PUSHBUTTON 59(14) b_but201 USER-COMMAND s201,
  PUSHBUTTON 76(36) b_but202 USER-COMMAND s202.
SELECTION-SCREEN END OF BLOCK b200.

* - Down-Sizing Configuration
SELECTION-SCREEN BEGIN OF BLOCK b210 WITH FRAME.
SELECTION-SCREEN COMMENT:
   /1(77) scr_t210 MODIF ID r70,
   /1(77) scr_t211 MODIF ID r70.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_but210 USER-COMMAND s210 MODIF ID r70,
  PUSHBUTTON 59(55) b_but212 USER-COMMAND s212 MODIF ID r70.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_but214 USER-COMMAND s214 MODIF ID r70,
  PUSHBUTTON 59(55) b_but216 USER-COMMAND s216 MODIF ID r70.
SELECTION-SCREEN END OF BLOCK b210.

* - Down-Sizing Execution
SELECTION-SCREEN BEGIN OF BLOCK b220 WITH FRAME.
SELECTION-SCREEN COMMENT:
   /1(77) scr_t220 MODIF ID r70,
   /1(77) scr_t221 MODIF ID r70,
   /1(77) scr_t222 MODIF ID r70.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_but220 USER-COMMAND s220 MODIF ID r70,
  PUSHBUTTON 59(55) b_but222 USER-COMMAND s222 MODIF ID r70.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_but224 USER-COMMAND s224 MODIF ID r74,
  PUSHBUTTON 59(55) b_but226 USER-COMMAND s226 MODIF ID r74.
SELECTION-SCREEN END OF BLOCK b220.

SELECTION-SCREEN END OF SCREEN 200.

*-----------------------------------------------------------------------

* Housekeeping
SELECTION-SCREEN BEGIN OF SCREEN 600 AS SUBSCREEN.

* - Housekeeping Automation
SELECTION-SCREEN BEGIN OF BLOCK b600 WITH FRAME.
SELECTION-SCREEN COMMENT:
   /1(77) scr_t600 MODIF ID pca,
   /1(77) scr_t601 MODIF ID pca.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_but600 USER-COMMAND s600 MODIF ID pca,
  PUSHBUTTON 59(55) b_but602 USER-COMMAND s602 MODIF ID pca.
SELECTION-SCREEN END OF BLOCK b600.

* - Housekeeping Admin and Stat Data
SELECTION-SCREEN BEGIN OF BLOCK b610 WITH FRAME.
SELECTION-SCREEN COMMENT:
   /1(77) scr_t610,
   /1(77) scr_t611.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_but610 USER-COMMAND s610,
  PUSHBUTTON 59(55) b_but611 USER-COMMAND s611.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_but612 USER-COMMAND s612,
  PUSHBUTTON 59(55) b_but613 USER-COMMAND s613 MODIF ID r70.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_but614 USER-COMMAND s614,
  PUSHBUTTON 59(55) b_but615 USER-COMMAND s615.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_but616 USER-COMMAND s616,
  PUSHBUTTON 59(55) b_but617 USER-COMMAND s617.
SELECTION-SCREEN END OF BLOCK b610.

SELECTION-SCREEN END OF SCREEN 600.

*-----------------------------------------------------------------------

* Migration
SELECTION-SCREEN BEGIN OF SCREEN 300 AS SUBSCREEN.

* - BW Pre-migration (ASU Toolbox, DDL Generation)
SELECTION-SCREEN BEGIN OF BLOCK b300 WITH FRAME.
SELECTION-SCREEN COMMENT:
   /1(77) scr_t300,
   /1(77) scr_t301.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_but300 USER-COMMAND s300,
  PUSHBUTTON 59(55) b_but301 USER-COMMAND s301.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_but310 USER-COMMAND s310.
SELECTION-SCREEN END OF BLOCK b300.

* - Post Copy Automation
SELECTION-SCREEN BEGIN OF BLOCK b320 WITH FRAME.
SELECTION-SCREEN COMMENT:
   /1(77) scr_t320 MODIF ID pca,
   /1(77) scr_t321 MODIF ID pca.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_but320 USER-COMMAND s320 MODIF ID pca,
  PUSHBUTTON 59(55) b_but321 USER-COMMAND s321 MODIF ID pca.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(36) b_but322 USER-COMMAND s322 MODIF ID pca,
  PUSHBUTTON 39(36) b_but323 USER-COMMAND s323 MODIF ID pca,
  PUSHBUTTON 77(36) b_but324 USER-COMMAND s324 MODIF ID pca.
SELECTION-SCREEN END OF BLOCK b320.

* - BW Post-migration
SELECTION-SCREEN BEGIN OF BLOCK b340 WITH FRAME.
SELECTION-SCREEN COMMENT:
   /1(77) scr_t340 MODIF ID hdb,
   /1(77) scr_t341 MODIF ID hdb.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_but340 USER-COMMAND s340 MODIF ID hdb,
  PUSHBUTTON 59(55) b_but341 USER-COMMAND s341 MODIF ID hdb.
*  PUSHBUTTON 77(36) b_but342 USER-COMMAND s342 MODIF ID hdb.
SELECTION-SCREEN END OF BLOCK b340.

* - Database Migration Option
SELECTION-SCREEN BEGIN OF BLOCK b390 WITH FRAME.
SELECTION-SCREEN COMMENT:
   /1(77) scr_t390.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN COMMENT:
   /1(77) scr_t391,
   /1(77) scr_t392,
   /1(77) scr_t393,
   /1(77) scr_t394.
SELECTION-SCREEN END OF BLOCK b390.

SELECTION-SCREEN END OF SCREEN 300.

*-----------------------------------------------------------------------

* SAP HANA
SELECTION-SCREEN BEGIN OF SCREEN 350 AS SUBSCREEN.

* - Database Checks
SELECTION-SCREEN BEGIN OF BLOCK bb00 WITH FRAME.
SELECTION-SCREEN COMMENT:
   /1(77) scr_tb00 MODIF ID hdb,
   /1(77) scr_tb01 MODIF ID hdb.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_butb00 USER-COMMAND sb00 MODIF ID hdb,
  PUSHBUTTON 59(55) b_butb01 USER-COMMAND sb01 MODIF ID hdb.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_butb02 USER-COMMAND sb02 MODIF ID hdb,
  PUSHBUTTON 59(55) b_butb03 USER-COMMAND sb03 MODIF ID hdb.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_butb04 USER-COMMAND sb04 MODIF ID hdb,
  PUSHBUTTON 59(15) b_butb05 USER-COMMAND sb05 MODIF ID hdb,
  PUSHBUTTON 77(36) b_butb06 USER-COMMAND sb06 MODIF ID hdb.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_butb07 USER-COMMAND sb07 MODIF ID hdb,
  PUSHBUTTON 59(55) b_butb08 USER-COMMAND sb08 MODIF ID hdb.
SELECTION-SCREEN END OF BLOCK bb00.

* - External SAP HANA Views
SELECTION-SCREEN BEGIN OF BLOCK bb10 WITH FRAME.
SELECTION-SCREEN COMMENT:
   /1(77) scr_tb10 MODIF ID hdb,
   /1(77) scr_tb11 MODIF ID hdb.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_butb10 USER-COMMAND sb10 MODIF ID h74,
  PUSHBUTTON 59(55) b_butb11 USER-COMMAND sb11 MODIF ID h74.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_butb12 USER-COMMAND sb12 MODIF ID h74,
  PUSHBUTTON 59(55) b_butb13 USER-COMMAND sb13 MODIF ID h74.
SELECTION-SCREEN END OF BLOCK bb10.

* - BW Search on SAP HANA
SELECTION-SCREEN BEGIN OF BLOCK bb20 WITH FRAME.
SELECTION-SCREEN COMMENT:
   /1(77) scr_tb20 MODIF ID hdb,
   /1(77) scr_tb21 MODIF ID hdb.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_butb20 USER-COMMAND sb20 MODIF ID h74,
  PUSHBUTTON 59(55) b_butb21 USER-COMMAND sb21 MODIF ID h74.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_butb22 USER-COMMAND sb22 MODIF ID h74.
SELECTION-SCREEN END OF BLOCK bb20.

SELECTION-SCREEN END OF SCREEN 350.

*-----------------------------------------------------------------------

* BW, edition for SAP HANA
SELECTION-SCREEN BEGIN OF SCREEN 450 AS SUBSCREEN.

* - General
SELECTION-SCREEN BEGIN OF BLOCK bc00 WITH FRAME.
SELECTION-SCREEN COMMENT:
   /1(77) scr_tc00 MODIF ID hdb,
   /1(77) scr_tc01 MODIF ID hdb.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_butc00 USER-COMMAND sc00 MODIF ID hdb,
  PUSHBUTTON 59(55) b_butc01 USER-COMMAND sc01 MODIF ID hdb.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_butc02 USER-COMMAND sc02 MODIF ID hdb.
SELECTION-SCREEN END OF BLOCK bc00.

* - Operating Mode
SELECTION-SCREEN BEGIN OF BLOCK bc10 WITH FRAME.
SELECTION-SCREEN COMMENT:
   /1(77) scr_tc10 MODIF ID hdb,
   /1(77) scr_tc11 MODIF ID hdb.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_butc10 USER-COMMAND sc10 MODIF ID hdb,
  PUSHBUTTON 59(55) b_butc11 USER-COMMAND sc11 MODIF ID hdb.
SELECTION-SCREEN END OF BLOCK bc10.

* - Approving the Export of Unsupported Objects
SELECTION-SCREEN BEGIN OF BLOCK bc20 WITH FRAME.
SELECTION-SCREEN COMMENT:
   /1(77) scr_tc20 MODIF ID hdb,
   /1(77) scr_tc21 MODIF ID hdb.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_butc20 USER-COMMAND sc20 MODIF ID hdb,
  PUSHBUTTON 59(55) b_butc21 USER-COMMAND sc21 MODIF ID hdb.
SELECTION-SCREEN END OF BLOCK bc20.

* - Transfer of the Data Flow
SELECTION-SCREEN BEGIN OF BLOCK bc30 WITH FRAME.
SELECTION-SCREEN COMMENT:
   /1(77) scr_tc30 MODIF ID hdb,
   /1(77) scr_tc31 MODIF ID hdb.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_butc30 USER-COMMAND sc30 MODIF ID hdb,
  PUSHBUTTON 59(15) b_butc31 USER-COMMAND sc31 MODIF ID hdb,
  PUSHBUTTON 77(36) b_butc32 USER-COMMAND sc32 MODIF ID hdb.
SELECTION-SCREEN END OF BLOCK bc30.

SELECTION-SCREEN END OF SCREEN 450.

*-----------------------------------------------------------------------

* Data Warehouse Management (WHM)
SELECTION-SCREEN BEGIN OF SCREEN 400 AS SUBSCREEN.

* - Convert DataFlows from 3.x to 7.x
SELECTION-SCREEN BEGIN OF BLOCK b400 WITH FRAME.
SELECTION-SCREEN COMMENT:
   /1(77) scr_t400 MODIF ID r70,
   /1(77) scr_t401 MODIF ID r70.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_but400 USER-COMMAND s400 MODIF ID r70,
  PUSHBUTTON 59(15) b_but401 USER-COMMAND s401 MODIF ID r70,
  PUSHBUTTON 77(36) b_but402 USER-COMMAND s402 MODIF ID r70.
SELECTION-SCREEN END OF BLOCK b400.

* - Convert InfoProviders to HANA-optimized
SELECTION-SCREEN BEGIN OF BLOCK b420 WITH FRAME.
SELECTION-SCREEN COMMENT:
   /1(77) scr_t420 MODIF ID hdb,
   /1(77) scr_t421 MODIF ID hdb.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_but420 USER-COMMAND s420 MODIF ID hdb,
  PUSHBUTTON 59(15) b_but421 USER-COMMAND s421 MODIF ID hdb,
  PUSHBUTTON 77(36) b_but422 USER-COMMAND s422 MODIF ID hdb.
SELECTION-SCREEN END OF BLOCK b420.

* - Convert MultiProviders to CompositeProviders
SELECTION-SCREEN BEGIN OF BLOCK b430 WITH FRAME.
SELECTION-SCREEN COMMENT:
   /1(77) scr_t430 MODIF ID hdb,
   /1(77) scr_t431 MODIF ID hdb.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_but430 USER-COMMAND s430 MODIF ID r74,
  PUSHBUTTON 59(15) b_but431 USER-COMMAND s431 MODIF ID r74,
  PUSHBUTTON 77(36) b_but432 USER-COMMAND s432 MODIF ID r74.
SELECTION-SCREEN END OF BLOCK b430.

* - Transformation Finder
SELECTION-SCREEN BEGIN OF BLOCK b440 WITH FRAME.
SELECTION-SCREEN COMMENT:
   /1(77) scr_t440,
   /1(77) scr_t441.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_but440 USER-COMMAND s440,
  PUSHBUTTON 59(15) b_but441 USER-COMMAND s441,
  PUSHBUTTON 77(36) b_but442 USER-COMMAND s442.
SELECTION-SCREEN END OF BLOCK b440.

* - Object Activation
SELECTION-SCREEN BEGIN OF BLOCK b410 WITH FRAME.
SELECTION-SCREEN COMMENT:
   /1(77) scr_t410,
   /1(77) scr_t411.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_but410 USER-COMMAND s410.
SELECTION-SCREEN END OF BLOCK b410.

SELECTION-SCREEN END OF SCREEN 400.

*-----------------------------------------------------------------------

* Business Explorer (BEx)
SELECTION-SCREEN BEGIN OF SCREEN 700 AS SUBSCREEN.

* - Queries
SELECTION-SCREEN BEGIN OF BLOCK b720 WITH FRAME.
SELECTION-SCREEN COMMENT:
   /1(77) scr_t720,
   /1(77) scr_t721.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_but720 USER-COMMAND s720,
  PUSHBUTTON 59(55) b_but722 USER-COMMAND s722.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_but724 USER-COMMAND s724,
  PUSHBUTTON 59(55) b_but726 USER-COMMAND s726.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_but728 USER-COMMAND s728.
SELECTION-SCREEN END OF BLOCK b720.

* - Web Templates
SELECTION-SCREEN BEGIN OF BLOCK b740 WITH FRAME.
SELECTION-SCREEN COMMENT:
   /1(77) scr_t740 MODIF ID r70,
   /1(77) scr_t741 MODIF ID r70.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_but740 USER-COMMAND s740 MODIF ID r70,
  PUSHBUTTON 59(15) b_but741 USER-COMMAND s742 MODIF ID r70,
  PUSHBUTTON 77(36) b_but742 USER-COMMAND s742 MODIF ID r70.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_but744 USER-COMMAND s744 MODIF ID r70,
  PUSHBUTTON 59(15) b_but746 USER-COMMAND s746 MODIF ID r70.
SELECTION-SCREEN END OF BLOCK b740.

* - Workbooks
SELECTION-SCREEN BEGIN OF BLOCK b700 WITH FRAME.
SELECTION-SCREEN COMMENT:
   /1(77) scr_t700 MODIF ID r70,
   /1(77) scr_t701 MODIF ID r70.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_but700 USER-COMMAND s700 MODIF ID r70,
  PUSHBUTTON 59(55) b_but702 USER-COMMAND s702 MODIF ID r70.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_but704 USER-COMMAND s704 MODIF ID r70.
SELECTION-SCREEN END OF BLOCK b700.

SELECTION-SCREEN END OF SCREEN 700.

*-----------------------------------------------------------------------

* BW Modeling Tools (MT)
SELECTION-SCREEN BEGIN OF SCREEN 850 AS SUBSCREEN.

* - BW Note Analyzer
SELECTION-SCREEN BEGIN OF BLOCK ba00 WITH FRAME.
SELECTION-SCREEN COMMENT:
   /1(77) scr_ta00 MODIF ID r74,
   /1(77) scr_ta01 MODIF ID r74,
   /1(77) scr_ta02 MODIF ID r74.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(36) b_buta00 USER-COMMAND sa00 MODIF ID r74.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(36) b_buta01 USER-COMMAND sa01 MODIF ID r74,
  PUSHBUTTON 39(36) b_buta02 USER-COMMAND sa02 MODIF ID r74,
  PUSHBUTTON 77(36) b_buta03 USER-COMMAND sa03 MODIF ID r74.
SELECTION-SCREEN END OF BLOCK ba00.

SELECTION-SCREEN END OF SCREEN 850.

*-----------------------------------------------------------------------

* Security
SELECTION-SCREEN BEGIN OF SCREEN 800 AS SUBSCREEN.

* - Authorizations
SELECTION-SCREEN BEGIN OF BLOCK b800 WITH FRAME.
SELECTION-SCREEN COMMENT:
   /1(77) scr_t800 MODIF ID r70,
   /1(77) scr_t801 MODIF ID r70.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_but800 USER-COMMAND s800 MODIF ID r70,
  PUSHBUTTON 59(55) b_but802 USER-COMMAND s802 MODIF ID r70.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_but804 USER-COMMAND s804 MODIF ID r70,
  PUSHBUTTON 59(55) b_but806 USER-COMMAND s806 MODIF ID r70.
SELECTION-SCREEN END OF BLOCK b800.

* - Roles
SELECTION-SCREEN BEGIN OF BLOCK b820 WITH FRAME.
SELECTION-SCREEN COMMENT:
   /1(77) scr_t820,
   /1(77) scr_t821.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_but820 USER-COMMAND s820,
  PUSHBUTTON 59(55) b_but822 USER-COMMAND s822.
SELECTION-SCREEN END OF BLOCK b820.

SELECTION-SCREEN END OF SCREEN 800.

*-----------------------------------------------------------------------

* Optimization
SELECTION-SCREEN BEGIN OF SCREEN 500 AS SUBSCREEN.

* - ABAP Analyzer
SELECTION-SCREEN BEGIN OF BLOCK b500 WITH FRAME.
SELECTION-SCREEN COMMENT:
   /1(77) scr_t500,
   /1(77) scr_t501.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_but500 USER-COMMAND s500,
  PUSHBUTTON 59(15) b_but501 USER-COMMAND s501,
  PUSHBUTTON 77(36) b_but502 USER-COMMAND s502.
SELECTION-SCREEN END OF BLOCK b500.

* - ABAP Test Cockpit
SELECTION-SCREEN BEGIN OF BLOCK b510 WITH FRAME.
SELECTION-SCREEN COMMENT:
   /1(77) scr_t510 MODIF ID atc,
   /1(77) scr_t511 MODIF ID atc.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_but510 USER-COMMAND s510 MODIF ID atc,
  PUSHBUTTON 59(55) b_but512 USER-COMMAND s512 MODIF ID atc.
SELECTION-SCREEN END OF BLOCK b510.

* - Code Inspector
SELECTION-SCREEN BEGIN OF BLOCK b520 WITH FRAME.
SELECTION-SCREEN COMMENT:
   /1(77) scr_t520 MODIF ID sci,
   /1(77) scr_t521 MODIF ID sci.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_but520 USER-COMMAND s520 MODIF ID sci,
  PUSHBUTTON 59(55) b_but522 USER-COMMAND s522 MODIF ID sci.
SELECTION-SCREEN END OF BLOCK b520.

* - SQL Monitor / Performance Tuning Worklist
SELECTION-SCREEN BEGIN OF BLOCK b540 WITH FRAME.
SELECTION-SCREEN COMMENT:
   /1(77) scr_t540 MODIF ID sqx,
   /1(77) scr_t541 MODIF ID sqx.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_but540 USER-COMMAND s540 MODIF ID sql,
  PUSHBUTTON 59(55) b_but542 USER-COMMAND s542 MODIF ID sql.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_but544 USER-COMMAND s544 MODIF ID sql,
  PUSHBUTTON 59(55) b_but546 USER-COMMAND s546 MODIF ID swl.
SELECTION-SCREEN END OF BLOCK b540.

SELECTION-SCREEN END OF SCREEN 500.

*-----------------------------------------------------------------------

* Infos
SELECTION-SCREEN BEGIN OF SCREEN 950 AS SUBSCREEN.

* SCN
SELECTION-SCREEN BEGIN OF BLOCK b910 WITH FRAME.
SELECTION-SCREEN COMMENT:
   /1(77) scr_t910.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_but910 USER-COMMAND s910,
  PUSHBUTTON 59(55) b_but911 USER-COMMAND s911.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_but912 USER-COMMAND s912,
  PUSHBUTTON 59(55) b_but913 USER-COMMAND s913.
SELECTION-SCREEN END OF BLOCK b910.

* Docu
SELECTION-SCREEN BEGIN OF BLOCK b920 WITH FRAME.
SELECTION-SCREEN COMMENT:
   /1(77) scr_t920.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_but920 USER-COMMAND s920 MODIF ID d20,
  PUSHBUTTON 59(55) b_but921 USER-COMMAND s921 MODIF ID d21.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_but922 USER-COMMAND s922 MODIF ID d22,
  PUSHBUTTON 59(55) b_but923 USER-COMMAND s923 MODIF ID d23.
SELECTION-SCREEN END OF BLOCK b920.

* SMP
SELECTION-SCREEN BEGIN OF BLOCK b930 WITH FRAME.
SELECTION-SCREEN COMMENT:
   /1(77) scr_t930.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_but930 USER-COMMAND s930 MODIF ID d30,
  PUSHBUTTON 59(55) b_but931 USER-COMMAND s931 MODIF ID d31.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_but932 USER-COMMAND s932 MODIF ID d32,
  PUSHBUTTON 59(55) b_but933 USER-COMMAND s933 MODIF ID d33.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_but934 USER-COMMAND s934.
SELECTION-SCREEN END OF BLOCK b930.

* PAM
SELECTION-SCREEN BEGIN OF BLOCK b940 WITH FRAME.
SELECTION-SCREEN COMMENT:
   /1(77) scr_t940.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_but940 USER-COMMAND s940 MODIF ID d40,
  PUSHBUTTON 59(55) b_but941 USER-COMMAND s941 MODIF ID d41.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_but942 USER-COMMAND s942 MODIF ID d42,
  PUSHBUTTON 59(55) b_but943 USER-COMMAND s943 MODIF ID d43.
SELECTION-SCREEN END OF BLOCK b940.

SELECTION-SCREEN END OF SCREEN 950.

*-----------------------------------------------------------------------

* About
SELECTION-SCREEN BEGIN OF SCREEN 900 AS SUBSCREEN.

SELECTION-SCREEN BEGIN OF BLOCK b900 WITH FRAME.
SELECTION-SCREEN COMMENT:
   /1(70) scr_t900,
   77(15) scr_t902,
   /1(77) scr_t901.
SELECTION-SCREEN END OF BLOCK b900.

SELECTION-SCREEN BEGIN OF BLOCK b980 WITH FRAME.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_upda USER-COMMAND upda.
SELECTION-SCREEN END OF BLOCK b980.

SELECTION-SCREEN BEGIN OF BLOCK b990 WITH FRAME.
SELECTION-SCREEN:
  PUSHBUTTON /1(55) b_docu USER-COMMAND docu.
SELECTION-SCREEN END OF BLOCK b990.

SELECTION-SCREEN END OF SCREEN 900.

*&---------------------------------------------------------------------*
*&  Include           ZBW_HANA_MIGRATION_COCKPIT_035
*&---------------------------------------------------------------------*

* Header
SELECTION-SCREEN BEGIN OF BLOCK scr_header WITH FRAME.
SELECTION-SCREEN COMMENT:
   /1(77) scr_t000,
   /1(77) scr_t001.
SELECTION-SCREEN END OF BLOCK scr_header.

SELECTION-SCREEN BEGIN OF TABBED BLOCK scr_tab FOR 30 LINES.
SELECTION-SCREEN:
  TAB (20) scr_tab1 USER-COMMAND scr_push1 DEFAULT SCREEN 100, "Checks
  TAB (20) scr_tab2 USER-COMMAND scr_push2 DEFAULT SCREEN 200, "Sizing
  TAB (20) scr_tab6 USER-COMMAND scr_push6 DEFAULT SCREEN 600, "Housekeeping
  TAB (20) scr_tab3 USER-COMMAND scr_push3 DEFAULT SCREEN 300, "Migration
  TAB (20) scr_tabb USER-COMMAND scr_pushb DEFAULT SCREEN 350 MODIF ID hdb, "SAP HANA
  TAB (20) scr_tabc USER-COMMAND scr_pushc DEFAULT SCREEN 450 MODIF ID hdb, "Edition for HANA
  TAB (20) scr_tab4 USER-COMMAND scr_push4 DEFAULT SCREEN 400, "WHM
  TAB (20) scr_tab7 USER-COMMAND scr_push7 DEFAULT SCREEN 700, "BEx
  TAB (20) scr_taba USER-COMMAND scr_pusha DEFAULT SCREEN 850 MODIF ID hdb, "Modeling Tools
  TAB (20) scr_tab8 USER-COMMAND scr_push8 DEFAULT SCREEN 800, "Security
  TAB (20) scr_tab5 USER-COMMAND scr_push5 DEFAULT SCREEN 500, "Optimization
  TAB (20) scr_tabi USER-COMMAND scr_pushi DEFAULT SCREEN 950, "Infos
  TAB (20) scr_tab9 USER-COMMAND scr_push9 DEFAULT SCREEN 900. "About
SELECTION-SCREEN END OF BLOCK scr_tab.

*-----------------------------------------------------------------------

FORM modify_screen.

  DATA:
    l_show  TYPE abap_bool,
    l_debug TYPE c.

  GET PARAMETER ID 'RS_DEBUGLEVEL' FIELD l_debug.
  CHECK l_debug IS INITIAL.

  LOOP AT SCREEN.
    l_show = abap_true.
    CASE screen-group1.
*     Release 7.5 or higher
      WHEN 'R75'.
        IF sy-saprl < '750'.
          l_show = abap_false.
        ENDIF.
*     Release 7.4 or higher
      WHEN 'R74'.
        IF sy-saprl < '740'.
          l_show = abap_false.
        ENDIF.
*     Release 7.3 or higher
      WHEN 'R73'.
        IF sy-saprl < '730'.
          l_show = abap_false.
        ENDIF.
*     Release 7.0 or higher
      WHEN 'R70'.
        IF sy-saprl < '700'.
          l_show = abap_false.
        ENDIF.
*     SAP HANA only
      WHEN 'HDB'.
        IF sy-dbsys <> 'HDB'.
          l_show = abap_false.
        ENDIF.
*     SAP HANA only on Release 7.4 or higher
      WHEN 'H74'.
        IF sy-dbsys <> 'HDB' OR sy-saprl < '740'.
          l_show = abap_false.
        ENDIF.
*     Post-Copy Automation
      WHEN 'PCA'.
        SELECT SINGLE * FROM tstc
          WHERE tcode = 'STC01'.                        "#EC CI_GENBUFF
        IF sy-subrc <> 0.
          l_show = abap_false.
        ENDIF.
*     ABAP Test Cockpit
      WHEN 'ATC'.
        SELECT SINGLE * FROM tstc
          WHERE tcode = 'ATC'.                          "#EC CI_GENBUFF
        IF sy-subrc <> 0.
          l_show = abap_false.
        ENDIF.
*     ABAP Code Inspector
      WHEN 'SCI'.
        SELECT SINGLE * FROM tstc
          WHERE tcode = 'SCI'.                          "#EC CI_GENBUFF
        IF sy-subrc <> 0.
          l_show = abap_false.
        ENDIF.
*     SQL Monitor
      WHEN 'SQL'.
        SELECT SINGLE * FROM tstc
          WHERE tcode = 'SQLM' OR tcode = '/SDF/SQLM'.  "#EC CI_GENBUFF
        IF sy-subrc <> 0.
          l_show = abap_false.
        ENDIF.
*     SQL Tuning Worklist
      WHEN 'SWL'.
        SELECT SINGLE * FROM tstc
          WHERE tcode = 'SWLT'.                         "#EC CI_GENBUFF
        IF sy-subrc <> 0.
          l_show = abap_false.
        ENDIF.
      WHEN 'SQX'.
        SELECT SINGLE * FROM tstc
          WHERE tcode = 'SWLT' OR tcode = 'SQLM'
             OR tcode = '/SDF/SQLM'.                    "#EC CI_GENBUFF
        IF sy-subrc <> 0.
          l_show = abap_false.
        ENDIF.
    ENDCASE.

    IF l_show = abap_true.
      screen-active = '1'.
      screen-input = '1'.
    ELSE.
      screen-active = '0'.
      screen-input = '0'.
    ENDIF.

    MODIFY SCREEN.
  ENDLOOP.

ENDFORM.                    "modify_screen

*&---------------------------------------------------------------------*
*&  Include           ZBW_HANA_MIGRATION_COCKPIT_040
*&---------------------------------------------------------------------*

TABLES:
  sscrfields.

DATA:
  g_info          TYPE string,
  gs_text         TYPE textpool,
  gt_text         TYPE TABLE OF textpool,
  gt_text2        TYPE TABLE OF textpool.

DEFINE macro_textpool_load.
  read textpool sy-repid into gt_text language sy-langu.
  gt_text2[] = gt_text[].
END-OF-DEFINITION.

DEFINE macro_textpool_save.
  if gt_text[] <> gt_text2[].
    insert textpool sy-repid from gt_text language sy-langu.
  endif.
END-OF-DEFINITION.

DEFINE macro_textpool.
  read table gt_text into gs_text with key id = &1 key = &2.
  if sy-subrc = 0.
    delete gt_text where id = &1 and key = &2.
  endif.
  clear gs_text.
  gs_text-id    = &1.
  gs_text-key   = &2.
  if &1 = 'S'.
    gs_text-entry+8 = &3.
  else.
    gs_text-entry = &3.
  endif.
  gs_text-length = strlen( gs_text-entry ).
  append gs_text to gt_text.
END-OF-DEFINITION.

DEFINE macro_tab_header.
  write &2 as icon to &1.
  &1+6 = &3.
END-OF-DEFINITION.

DEFINE macro_tab_icon.
  if &4 is initial.
    g_info = &3.
  else.
    g_info = &4.
  endif.

  call function 'ICON_CREATE'
    exporting
      name   = &2
      text   = &3
      info   = g_info
    importing
      result = &1.
END-OF-DEFINITION.

*&---------------------------------------------------------------------*
*&  Include           ZBW_HANA_MIGRATION_COCKPIT_050
*&---------------------------------------------------------------------*

INITIALIZATION.

  macro_textpool_load.

  macro_textpool 'R' '' 'SAP BW Migration Cockpit for SAP HANA'.

  macro_textpool_save.

*-----------------------------------------------------------------------

* Header
  scr_t000 = 'This cockpit combines several tools to make the migration of an existing'.
  scr_t001 = 'SAP BW deployment to SAP HANA a more beautiful experience.'.

*-----------------------------------------------------------------------

* Checks
  macro_tab_header scr_tab1 icon_check 'Checks'.

  scr_t180 = 'Upgrade Path Finder'.
  scr_t181 = 'Show recommended upgrade/migration path and tools'.

  macro_tab_icon b_but180 icon_execute_object 'Upgrade Paths' ''.
  macro_tab_icon b_but182 icon_information 'Documentation' 'SAP Note 2296693'.

  scr_t100 = 'Checklist Tool'.
  scr_t101 = 'Check best practice guidelines and pre-requisites for migration to SAP HANA'.

  macro_tab_icon b_but100 icon_execute_object 'Checklist Tool' ''.
  macro_tab_icon b_but101 icon_protocol 'Log' ''.
  macro_tab_icon b_but102 icon_information 'Documentation' 'SAP Note 1729988'.

  scr_t150 = 'BW Checks'.
  scr_t151 = 'Analyze and repair BW objects and query definitions'.

  macro_tab_icon b_but150 icon_execute_object 'BW Object Checks' ''.
  macro_tab_icon b_but152 icon_information 'Documentation' 'SAP Help'.

  macro_tab_icon b_but154 icon_execute_object 'BEx Query Check' ''.
  macro_tab_icon b_but156 icon_information 'Documentation' 'SAP Note 792779'.

  scr_t160 = 'Planning Function Checks'.
  scr_t161 = 'Determine whether planning function are executed in ABAP or in SAP HANA'.

  macro_tab_icon b_but160 icon_execute_object 'Planning Function Check' ''.
  macro_tab_icon b_but162 icon_information 'Documentation' 'SAP Note 1824516'.

  macro_tab_icon b_but164 icon_execute_object 'SQLScript Check' ''.
  macro_tab_icon b_but166 icon_information 'Documentation' 'How-to Guide'.

*-----------------------------------------------------------------------

* Sizing
  macro_tab_header scr_tab2 icon_calculation 'Sizing'.

  scr_t200 = 'Sizing Tool'.
  scr_t201 = 'Determine size required for running system on SAP HANA'.

  macro_tab_icon b_but200 icon_execute_object 'Sizing Tool' ''.
  macro_tab_icon b_but201 icon_protocol 'Log' ''.
  macro_tab_icon b_but202 icon_information 'Documentation' 'SAP Note 1736976'.

  scr_t210 = 'Down-Sizing (Configuration)'.
  scr_t211 = 'Configure NLS connection and data archive processes'.

  macro_tab_icon b_but210 icon_configuration 'Near-line Storage' ''.
  macro_tab_icon b_but212 icon_information 'Documentation' 'SAP Help'.

  macro_tab_icon b_but214 icon_configuration 'Data Archive Process' ''.
  macro_tab_icon b_but216 icon_information 'Documentation' 'SAP Help'.

  scr_t220 = 'Down-Sizing (Execution)'.
  scr_t221 = 'Execute archive processes to reduce system size or convert'.
  scr_t222 = 'PSA and write-optimized DSOs in SAP-HANA-extended tables'.

  macro_tab_icon b_but220 icon_execute_object 'Data Archiving (ADK)' ''.
  macro_tab_icon b_but222 icon_information 'Documentation' 'SAP Help'.

  macro_tab_icon b_but224 icon_execute_object 'Move to Extended Tables' ''.
  macro_tab_icon b_but226 icon_information 'Documentation' 'SAP Note 2057636'.

*-----------------------------------------------------------------------

* Housekeeping
  macro_tab_header scr_tab6 icon_connection_object 'Housekeeping'.

  scr_t600 = 'Housekeeping Automation'.
  scr_t601 = 'Setup and execute a task list for regular housekeeping activities'.

  macro_tab_icon b_but600 icon_task 'Housekeeping Tasks' ''.
  macro_tab_icon b_but602 icon_information 'Documentation' 'SAP Note 1829728'.

  scr_t610 = 'Housekeeping Tasks'.
  scr_t611 = 'Most common housekeeping for administration and statistic data'.

  macro_tab_icon b_but610 icon_execute_object 'Application Log Deletion' ''.
  macro_tab_icon b_but611 icon_execute_object 'Job Log Deletion' ''.

  macro_tab_icon b_but612 icon_execute_object 'OLAP Statistic Deletion' ''.
  macro_tab_icon b_but613 icon_execute_object 'Planning Stat. Deletion' ''.

  macro_tab_icon b_but614 icon_execute_object 'IDoc Archiving' ''.
  macro_tab_icon b_but615 icon_execute_object 'Request Admin Archiving' ''.

  macro_tab_icon b_but616 icon_information 'Documentation' 'SAP Help'.
  macro_tab_icon b_but617 icon_information 'List of Large Tables' 'SAP Note 706478'.

*-----------------------------------------------------------------------

* Migration
  macro_tab_header scr_tab3 icon_move 'Migration'.

  scr_t300 = 'Pre Migration Tasks'.
  scr_t301 = 'Perform tasks before starting upgrade or migration to SAP HANA'.

  macro_tab_icon b_but300 icon_execute_object 'ASU Toolbox' ''.
  macro_tab_icon b_but301 icon_information 'ASU Documentation/Content' 'SAP Note 1000009'.

  macro_tab_icon b_but310 icon_execute_object 'SQL DDL Generation' ''.

  scr_t320 = 'Task Automation'.
  scr_t321 = 'Setup task lists for automated execution during upgrade or migration'.

  macro_tab_icon b_but320 icon_task 'Task Manager' ''.
  macro_tab_icon b_but321 icon_biw_monitor 'Task Monitor' ''.

  macro_tab_icon b_but322 icon_check 'Notes Analyzer' ''.
  macro_tab_icon b_but323 icon_xml_doc 'Basis XML' 'SAP Note 1614266'.
  macro_tab_icon b_but324 icon_xml_doc 'BW XML' 'SAP Note 1707321'.

  scr_t340 = 'Post Migration Tasks'.
  scr_t341 = 'Execute tasks after migration to SAP HANA'.

  macro_tab_icon b_but340 icon_execute_object 'BW Post-Migration Tasks' ''.
  macro_tab_icon b_but341 icon_protocol 'Log' ''.
*  macro_tab_icon b_but342 icon_information 'Documentation' 'SAP Help'.

  scr_t390 = 'Note on Database Migration Option (DMO):'.
  scr_t391 = 'The migration cockpit is a launch pad for many tools. Most are relevant'.
  scr_t392 = 'for any migration. However, when using DMO, you only need the "ASU Toolbox"'.
  scr_t393 = 'on this tab (using ASU_BW_70x_74x_DMO.zip from ASU Content).'.
  scr_t394 = 'The other tools on this tab are included in DMO.'.

*-----------------------------------------------------------------------

* SAP HANA
  macro_tab_header scr_tabb icon_database_table 'SAP HANA'.

  scr_tb00 = 'Database Checks'.
  scr_tb01 = 'Perform various SAP HANA related consistency checks'.

  macro_tab_icon b_butb00 icon_execute_object 'Table Consistency Check' ''.
  macro_tab_icon b_butb01 icon_information 'Documentation' 'SAP Note 1937062'.

  macro_tab_icon b_butb02 icon_execute_object 'PSA Consistency Check' ''.
  macro_tab_icon b_butb03 icon_information 'Documentation' 'SAP Note 1979876'.

  macro_tab_icon b_butb04 icon_execute_object 'Delta Merge Check' ''.
  macro_tab_icon b_butb05 icon_information 'Note' ''.       "1647717
  macro_tab_icon b_butb06 icon_information 'Documentation' 'How-to Guide'.

  macro_tab_icon b_butb07 icon_biw_monitor 'Monitor Non-Active Data' ''.
  macro_tab_icon b_butb08 icon_information 'Documentation' 'SAP Help'.

  scr_tb10 = 'External SAP HANA Views'.
  scr_tb11 = 'Manage and check SAP HANA views for BW objects'.

  macro_tab_icon b_butb10 icon_execute_object 'View Administration' ''.
  macro_tab_icon b_butb11 icon_information 'Documentation' 'SAP Help'.

  macro_tab_icon b_butb12 icon_execute_object 'View Consistency Check' ''.
  macro_tab_icon b_butb13 icon_execute_object 'Virtual/Query Provider' ''.

  scr_tb20 = 'BW Search on SAP HANA'.
  scr_tb21 = 'Search in metadata and where-used lists'.

  macro_tab_icon b_butb20 icon_search 'BW Search' ''.
  macro_tab_icon b_butb21 icon_information 'Documentation' 'SAP Help'.

  macro_tab_icon b_butb22 icon_execute_object 'BW Search Maintenance' ''.

*-----------------------------------------------------------------------

* BW, edition for SAP HANA
  macro_tab_header scr_tabc icon_system_favorites 'Edition (B4H)'.

  scr_tc00 = 'SAP BW, edition for SAP HANA'.
  scr_tc01 = 'Get more details about the latest BW solution'.

  macro_tab_icon b_butc00 icon_information 'General Infos' 'SAP Note 2246699'.
  macro_tab_icon b_butc01 icon_information 'Installable Add-Ons' 'SAP Note 2189708'.
  macro_tab_icon b_butc02 icon_information 'Ramp-Up' 'SCN.SAP.com'.

  scr_tc10 = 'Operating Mode'.
  scr_tc11 = 'Check system and switch to B4H mode'.

  macro_tab_icon b_butc10 icon_execute_object 'Switch Mode' ''.
  macro_tab_icon b_butc11 icon_information 'Documentation' 'SAP Help'.

  scr_tc20 = 'Object Compatibility'.
  scr_tc21 = 'Approving the export of unsupported objects'.

  macro_tab_icon b_butc20 icon_execute_object 'Maintain Whitelist' ''.
  macro_tab_icon b_butc21 icon_information 'Documentation' 'SAP Help'.

  scr_tc30 = 'Transfer Data Flows'.
  scr_tc31 = 'Convert existing data models to objects supported by B4H'.

  macro_tab_icon b_butc30 icon_execute_object 'Transfer Objects' ''.
  macro_tab_icon b_butc31 icon_information 'Note' ''.       "2238220
  macro_tab_icon b_butc32 icon_information 'Documentation' 'SAP Help'.

*-----------------------------------------------------------------------

* Data Warehouse Management (WHM)
  macro_tab_header scr_tab4 icon_adopt 'WHM'.

  scr_t400 = 'Data Flow Conversion'.
  scr_t401 = 'Convert data flows from 3.x to 7.x functionality'.

  macro_tab_icon b_but400 icon_execute_object 'Data Flow Conversion' ''.
  macro_tab_icon b_but401 icon_protocol 'Log' ''.
  macro_tab_icon b_but402 icon_information 'Documentation' 'SAP Help'.

  scr_t420 = 'InfoProvider Conversion'.
  scr_t421 = 'Convert InfoProviders to SAP HANA-optimized version'.

  macro_tab_icon b_but420 icon_execute_object 'InfoProvider Conversion' ''.
  macro_tab_icon b_but421 icon_protocol 'Log' ''.
  macro_tab_icon b_but422 icon_information 'Documentation' 'SAP Help'.

  scr_t430 = 'MultiProvider Conversion'.
  scr_t431 = 'Convert MultiProviders (and old Comp.Providers) to CompositeProviders'.

  macro_tab_icon b_but430 icon_execute_object 'MultiProvider Conversion' ''.
  macro_tab_icon b_but431 icon_protocol 'Log' ''.
  macro_tab_icon b_but432 icon_information 'Documentation' 'SAP Help'.

  scr_t440 = 'Transformation Finder'.
  scr_t441 = 'Find "1:1" or "n:1" transformations to potentially retire InfoProviders'.

  macro_tab_icon b_but440 icon_execute_object 'Transformation Finder' ''.
  macro_tab_icon b_but441 icon_protocol 'Log' ''.
  macro_tab_icon b_but442 icon_information 'Documentation' 'SAP Note 1908367'.

  scr_t410 = 'Object Activation'.
  scr_t411 = 'Activate a selection of BW objects (also check and repair options)'.

  macro_tab_icon b_but410 icon_activate 'Activate Objects' ''.

*-----------------------------------------------------------------------

* Business Explorer (BEx)
  macro_tab_header scr_tab7 icon_biw_report 'BEx'.

  scr_t720 = 'BEx Queries'.
  scr_t721 = 'Tools for maintaining and checking query definitions'.

  macro_tab_icon b_but720 icon_execute_object 'BEx Query Designer' ''.
  macro_tab_icon b_but722 icon_information 'Documentation' 'SAP Help'.

  macro_tab_icon b_but724 icon_biw_monitor 'BEx Query Monitor' ''.
  macro_tab_icon b_but726 icon_information 'Documentation' 'SAP Help'.

  macro_tab_icon b_but728 icon_display 'BEx Query Definition' ''.

  scr_t740 = 'BEx Web Templates'.
  scr_t741 = 'Convert 3.x to 7.x web items and web templates'.

  macro_tab_icon b_but740 icon_execute_object 'BEx Web Application Designer' ''.
  macro_tab_icon b_but741 icon_information 'Note' ''.       "832713
  macro_tab_icon b_but742 icon_information 'Documentation' 'SAP Help'.

  macro_tab_icon b_but744 icon_execute_object 'Web Item Conversion' ''.
  macro_tab_icon b_but746 icon_information 'Note' ''.       "832712

  scr_t700 = 'BEx Workbooks'.
  scr_t701 = 'Convert 3.x to 7.x workbooks'.

  macro_tab_icon b_but700 icon_execute_object 'BEx Analyzer' ''.
  macro_tab_icon b_but702 icon_information 'Documentation' 'SAP Note 1901268'.

  macro_tab_icon b_but704 icon_execute_object 'Workbook Conversion' ''.

*-----------------------------------------------------------------------

* BW Modeling Tools (MT)
  macro_tab_header scr_taba icon_model 'Modeling Tools'.

  scr_ta00 = 'BW Modeling Tools'.
  scr_ta01 = 'Check corrections for BW Modeling Tools, HANA Analysis'.
  scr_ta02 = 'Processes/Transformations, and Query Designer'.

  macro_tab_icon b_buta00 icon_check 'Notes Analyzer' ''.
  macro_tab_icon b_buta01 icon_xml_doc 'BW-MT XML' 'SAP Note 2094475'.
  macro_tab_icon b_buta02 icon_xml_doc 'BW-HAP XML' 'SAP Note 2117312'.
  macro_tab_icon b_buta03 icon_xml_doc 'BWMT-ELEM XML' 'SAP Note 2222904'.

*-----------------------------------------------------------------------

* Security
  macro_tab_header scr_tab8 icon_locked 'Security'.

  scr_t800 = 'Authorizations'.
  scr_t801 = 'Convert 3.x reporting authorizations to 7.x analysis authorizations'.

  macro_tab_icon b_but800 icon_execute_object 'Maintenance' ''.
  macro_tab_icon b_but802 icon_information 'Documentation' 'SAP Help'.

  macro_tab_icon b_but804 icon_execute_object 'Conversion' ''.
  macro_tab_icon b_but806 icon_information 'Documentation' 'SAP Help'.

  scr_t820 = 'Roles'.
  scr_t821 = 'Maintain roles and user assignment'.

  macro_tab_icon b_but820 icon_execute_object 'Roles' ''.
  macro_tab_icon b_but822 icon_information 'Documentation' 'SAP Help'.

*-----------------------------------------------------------------------

* Optimization
  macro_tab_header scr_tab5 icon_abap 'Optimization'.

  scr_t500 = 'ABAP Routine Analyzer'.
  scr_t501 = 'Scan custom ABAP routines used in data flows or business planning'.

  macro_tab_icon b_but500 icon_execute_object 'ABAP Routine Analyzer' ''.
  macro_tab_icon b_but501 icon_protocol 'Log' ''.
  macro_tab_icon b_but502 icon_information 'Documentation' 'SAP Note 1847431'.

  scr_t510 = 'ABAP Test Cockpit'.
  scr_t511 = 'Implement a best-practices recommendation for ABAP quality checking'.

  macro_tab_icon b_but510 icon_execute_object 'ABAP Test Cockpit' ''.
  macro_tab_icon b_but512 icon_information 'Documentation' 'SAP Help'.

  scr_t520 = 'ABAP Code Inspector'.
  scr_t521 = 'Analyze objects for performance, security, serviceability, etc.'.

  macro_tab_icon b_but520 icon_execute_object 'ABAP Code Inspector' ''.
  macro_tab_icon b_but522 icon_information 'Documentation' 'SAP Help'.

  scr_t540 = 'ABAP SQL Optimization'.
  scr_t541 = 'Configure system-wide monitoring, display results and work list'.

  macro_tab_icon b_but540 icon_database_table 'SQL Monitor Setup' ''.
  macro_tab_icon b_but542 icon_information 'Documentation' 'SAP Help'.

  macro_tab_icon b_but544 icon_database_table 'SQL Monitor Data Display' ''.
  macro_tab_icon b_but546 icon_working_plan 'SQL Tuning Worklist' ''.

*-----------------------------------------------------------------------

* Infos
  macro_tab_header scr_tabi icon_information 'Infos'.

  scr_t910 = 'SAP Community Network'.

  macro_tab_icon b_but910 icon_personal_help 'BW on HANA' 'SCN.SAP.com'.
  macro_tab_icon b_but911 icon_personal_help 'First Guidance' 'SCN.SAP.com'.
  macro_tab_icon b_but912 icon_personal_help 'Simplified Release Notes' 'SCN.SAP.com'.
  macro_tab_icon b_but913 icon_personal_help 'FAQ' 'SCN.SAP.com'.

  scr_t920 = 'SAP Product Documentation'.

  macro_tab_icon b_but920 icon_message_question_small 'BW 7.30' 'HELP.SAP.com'.
  macro_tab_icon b_but921 icon_message_question_small 'BW 7.31' 'HELP.SAP.com'.
  macro_tab_icon b_but922 icon_message_question_small 'BW 7.40' 'HELP.SAP.com'.
  macro_tab_icon b_but923 icon_message_question_small 'BW 7.50' 'HELP.SAP.com'.

  scr_t930 = 'SAP Service Marketplace (Login Required)'.

  macro_tab_icon b_but930 icon_sap 'Roadmaps' 'SERVICE.SAP.com'.
  macro_tab_icon b_but931 icon_sap 'Learning Map 7.3' 'SERVICE.SAP.com'.
  macro_tab_icon b_but932 icon_sap 'Learning Map 7.4' 'SERVICE.SAP.com'.
  macro_tab_icon b_but933 icon_sap 'Learning Map 7.5' 'SERVICE.SAP.com'.
  macro_tab_icon b_but934 icon_sap 'Learning Map DMO' 'SERVICE.SAP.com'.

  scr_t940 = 'SAP Product Availability Matrix'.

  macro_tab_icon b_but940 icon_businav_processmatrix 'NW 7.30' 'SERVICE.SAP.com'.
  macro_tab_icon b_but941 icon_businav_processmatrix 'NW 7.31' 'SERVICE.SAP.com'.
  macro_tab_icon b_but942 icon_businav_processmatrix 'NW 7.40' 'SERVICE.SAP.com'.
  macro_tab_icon b_but943 icon_businav_processmatrix 'NW 7.50' 'SERVICE.SAP.com'.

*-----------------------------------------------------------------------

* About
  macro_tab_header scr_tab9 icon_system_help 'About'.

  scr_t900 = 'Provided by Product Management SAP EDW (BW/HANA)'.
  scr_t901 = 'Making innovation adoption a beautiful experience for SAP customers'.
  CONCATENATE 'Version' c_version INTO scr_t902 SEPARATED BY space.

  macro_tab_icon b_upda icon_check 'Check for Updates' ''.
  macro_tab_icon b_docu icon_information 'Documentation' 'SAP Note 1909597'.

*-----------------------------------------------------------------------

* Adjust screen to release
  PERFORM modify_screen.

*&---------------------------------------------------------------------*
*&  Include           ZBW_HANA_MIGRATION_COCKPIT_100
*&---------------------------------------------------------------------*

AT SELECTION-SCREEN.

  PERFORM modify_screen.

  CHECK sy-dynnr <> '1000'.

  CASE sscrfields.

*-----------------------------------------------------------------------

*   Checks - Upgrade Path Finder
    WHEN 'S180'.
      PERFORM call_program
        USING 'ZBW_UPGRADE_PATHS' abap_true.
    WHEN 'S182'.
      PERFORM call_browser
        USING 'http://service.sap.com/sap/support/notes/2296693'.

*   Checks - Checklist Tool
    WHEN 'S100'.
      PERFORM call_program
        USING 'ZBW_HANA_CHECKLIST' abap_true.
    WHEN 'S101'.
      PERFORM bal_display_logs
        USING 'ZBW_HANA_CHECKLIST' '19000101' '99991231'.
    WHEN 'S102'.
      PERFORM call_browser
        USING 'http://service.sap.com/sap/support/notes/1729988'.

*   Checks - BW Objects
    WHEN 'S150'.
      PERFORM call_transaction
        USING 'RSRV'.
    WHEN 'S152'.
      PERFORM call_browser
        USING 'http://help.sap.com/saphelp_nw73/helpdata/en/92/1d733b73a8f706e10000000a11402f/frameset.htm'.

*   Checks - BW Queries
    WHEN 'S154'.
      PERFORM call_program
        USING 'ANALYZE_RSZ_TABLES' abap_false.
    WHEN 'S156'.
      PERFORM call_browser
        USING 'http://service.sap.com/sap/support/notes/792779'.

*   Checks - Planning Functions
    WHEN 'S160'.
      PERFORM call_program
        USING 'RSPLS_PLANNING_ON_HDB_ANALYSIS' abap_false.
    WHEN 'S162'.
      PERFORM call_browser
        USING 'http://service.sap.com/sap/support/notes/1824516'.

*   Checks - Planning SQLScript
    WHEN 'S164'.
      PERFORM call_program
        USING 'RSPLS_SQL_SCRIPT_TOOL' abap_false.
    WHEN 'S166'.
      PERFORM call_browser
        USING 'http://scn.sap.com/docs/DOC-53800'.

*-----------------------------------------------------------------------

*   Sizing
    WHEN 'S200'.
      IF sy-saprl < '700'.
        PERFORM call_program
          USING 'ZBW_HANA_SIZING' abap_true.
      ELSE.
        PERFORM call_program
          USING '/SDF/HANA_BW_SIZING' abap_false.
      ENDIF.
    WHEN 'S201'.
      PERFORM callback_log
        USING 'RSD' 'MIGRATION' '' abap_false.
    WHEN 'S202'.
      PERFORM call_browser
        USING 'http://service.sap.com/sap/support/notes/1736976'.

*-----------------------------------------------------------------------

*   Down-Sizing Configuration
    WHEN 'S210'.
      PERFORM call_transaction
        USING 'RSDANLCON'.
    WHEN 'S212'.
      PERFORM call_browser
        USING 'http://help.sap.com/saphelp_nw73/helpdata/en/60/cf63e1bbbb49429ee6c35e6ad03a45/frameset.htm'.
    WHEN 'S214'.
      PERFORM call_transaction
        USING 'RSDAP'.
    WHEN 'S216'.
      PERFORM call_browser
        USING 'http://help.sap.com/saphelp_nw73/helpdata/en/4a/2c7958e460351ce10000000a42189b/frameset.htm'.

*   Down-Sizing Execution
    WHEN 'S220'.
      PERFORM call_transaction
        USING 'SARA'.
    WHEN 'S222'.
      PERFORM call_browser
        USING 'http://help.sap.com/saphelp_nw73/helpdata/en/4c/c97123f3f05dc5e10000000a42189c/frameset.htm'.
    WHEN 'S224'.
      PERFORM call_program
        USING 'RS_DYNTIER_CHANGE' abap_false.
    WHEN 'S226'.
      PERFORM call_browser
        USING 'http://service.sap.com/sap/support/notes/2057636'.

*-----------------------------------------------------------------------

*   Housekeeping - Tasks
    WHEN 'S600'.
      SELECT SINGLE * FROM tpara WHERE paramid = c_stc_scenario.
      IF sy-subrc = 0.
        SET PARAMETER ID c_stc_scenario FIELD 'SAP_BW_HOUSEKEEPING'.
      ENDIF.
      PERFORM call_transaction
        USING 'STC01'.
    WHEN 'S602'.
      PERFORM call_browser
        USING 'http://service.sap.com/sap/support/notes/1829728'.

*   Housekeeping - Application Log Deletion
    WHEN 'S610'.
      PERFORM call_transaction
        USING 'SLG2'.
*   Housekeeping - Job Log Deletion
    WHEN 'S611'.
      PERFORM call_program
        USING 'RSBTCDEL' abap_false.
*   Housekeeping - OLAP Statistic Deletion
    WHEN 'S612'.
      PERFORM call_program
        USING 'RSDDSTAT_DATA_DELETE' abap_false.
*   Housekeeping - Planning Statistic Deletion
    WHEN 'S613'.
      PERFORM call_transaction
        USING 'BPS_STAT0'.
*   Housekeeping - IDoc Archiving
    WHEN 'S614'.
      SET PARAMETER ID 'OBT' FIELD 'IDOC'.
      PERFORM call_transaction
        USING 'SARA'.
*   Housekeeping - Request Admin Archiving
    WHEN 'S615'.
      PERFORM call_transaction
        USING 'RSREQARCH'.
*   Housekeeping - Documentation
    WHEN 'S616'.
      PERFORM call_browser
        USING 'http://help.sap.com/saphelp_nw73/helpdata/en/86/bd48813bba47ccbed3cd81c403a709/frameset.htm'.
    WHEN 'S617'.
      PERFORM call_browser
        USING 'http://service.sap.com/sap/support/notes/706478'.

*-----------------------------------------------------------------------

*   Migration - ASU Toolbox
    WHEN 'S300'.
      PERFORM call_transaction
        USING '/ASU/START'.
    WHEN 'S301'.
      PERFORM call_browser
        USING 'http://service.sap.com/sap/support/notes/1000009'.

*   Migration - DDL Generation
    WHEN 'S310'.
      PERFORM call_smigr.

*   Migration - Post Copy Automation
    WHEN 'S320'.
      SELECT SINGLE * FROM tpara WHERE paramid = c_stc_scenario.
      IF sy-subrc = 0.
        SET PARAMETER ID c_stc_scenario FIELD 'SAP_BW*'.
      ENDIF.
      PERFORM call_transaction
        USING 'STC01'.
    WHEN 'S321'.
      SELECT SINGLE * FROM tpara WHERE paramid = c_stc_scenario.
      IF sy-subrc = 0.
        SET PARAMETER ID c_stc_scenario FIELD 'SAP_BW*'.
      ENDIF.
      PERFORM call_transaction
        USING 'STC02'.

    WHEN 'S322'.
      PERFORM call_program
        USING 'Z_SAP_NOTE_ANALYZER' abap_false.
    WHEN 'S323'.
      PERFORM call_browser
        USING 'http://service.sap.com/sap/support/notes/1614266'.
    WHEN 'S324'.
      PERFORM call_browser
        USING 'http://service.sap.com/sap/support/notes/1707321'.

*   Migration - Post-Migration
    WHEN 'S340'.
      PERFORM call_program
        USING 'RS_BW_POST_MIGRATION' abap_false.
    WHEN 'S341'.
      PERFORM bal_display_logs
        USING 'RS_BW_POST_MIGRATION' '19000101' '99991231'.
*      PERFORM callback_log
*        USING 'RSD' 'MIGRATION' 'RS_BW_POST_MIGRATION' abap_false.

*-----------------------------------------------------------------------

*   SAP HANA - Table Consistency
    WHEN 'SB00'.
      PERFORM call_program
        USING 'RSDU_TABLE_CONSISTENCY' abap_false.
    WHEN 'SB01'.
      PERFORM call_browser
        USING 'http://service.sap.com/sap/support/notes/1937062'.

*   SAP HANA - PSA Consistency
    WHEN 'SB02'.
      PERFORM call_program
        USING 'RSDU_PSA_PARTNO_CHECK' abap_false.
    WHEN 'SB03'.
      PERFORM call_browser
        USING 'http://service.sap.com/sap/support/notes/1979867 '.

*   SAP HANA - Delta Merge
    WHEN 'SB04'.
      PERFORM call_program
        USING 'RSHDB_CHECK_TABLES' abap_false.
    WHEN 'SB05'.
      PERFORM call_browser
        USING 'http://service.sap.com/sap/support/notes/1647717'.
    WHEN 'SB06'.
      PERFORM call_browser
        USING 'http://scn.sap.com/docs/DOC-27558'.

*   SAP HANA - Monitor Non-Active Data
    WHEN 'SB07'.
      PERFORM call_transaction
        USING 'RSHDBMON'.
    WHEN 'SB08'.
      PERFORM call_browser
        USING 'http://help.sap.com/saphelp_nw74/helpdata/en/1a/c43532bb124b2fb62c3e5ad8b1b442/content.htm'.

*   SAP HANA - View Administration
    WHEN 'SB10'.
      PERFORM call_transaction
        USING 'RS2HANA_ADMIN'.
    WHEN 'SB11'.
      PERFORM call_browser
        USING 'http://help.sap.com/saphelp_nw74/helpdata/en/66/33d851345c4770bd4e523701b9f5b0/content.htm'.

*   SAP HANA - View Consistency
    WHEN 'SB12'.
      PERFORM call_transaction
        USING 'RS2HANA_CHECK'.

*   SAP HANA - Virtual / Query as InfoProvider
    WHEN 'SB13'.
      PERFORM call_transaction
        USING 'RSDDB'.

*   SAP HANA - BW Search
    WHEN 'SB20'.
      PERFORM call_transaction
        USING 'RSOS_SEARCH'.
    WHEN 'SB21'.
      PERFORM call_browser
        USING 'http://help.sap.com/saphelp_nw74/helpdata/en/1a/b179fdd69941db9cc71a337fd0281d/content.htm'.

*   SAP HANA - BW Search Maintenance
    WHEN 'SB22'.
      PERFORM call_transaction
        USING 'RSOSM'.

*-----------------------------------------------------------------------

*   B4H - General Info
    WHEN 'SC00'.
      PERFORM call_browser
        USING 'http://service.sap.com/sap/support/notes/2246699'.
    WHEN 'SC01'.
      PERFORM call_browser
        USING 'http://service.sap.com/sap/support/notes/2189708'.
    WHEN 'SC02'.
      PERFORM call_browser
        USING 'http://scn.sap.com/docs/DOC-66052'.

*   B4H - Operation Mode
    WHEN 'SC10'.
      PERFORM call_program
        USING 'RS_B4HANA_CHECK_ENABLE' abap_false.
    WHEN 'SC11'.
      PERFORM call_browser
        USING 'http://help.sap.com/hc/bw75_edition4hana'.

*   B4H - Maintain Whitelist
    WHEN 'SC20'.
      PERFORM call_program
        USING 'RS_B4HANA_WHITELIST_MAINTAIN' abap_false.
    WHEN 'SC21'.
      PERFORM call_browser
        USING 'http://help.sap.com/hc/bw75_edition4hana'.

*   B4H - Transfer Objects
    WHEN 'SC30'.
      PERFORM call_transaction
        USING 'RSB4HTRF'.
    WHEN 'SC31'.
      PERFORM call_browser
        USING 'http://service.sap.com/sap/support/notes/2238220'.
    WHEN 'SC32'.
      PERFORM call_browser
        USING 'http://help.sap.com/hc/bw75_edition4hana'.

*-----------------------------------------------------------------------

*   WHM - DataFlow Conversion
    WHEN 'S400'.
      PERFORM call_transaction
        USING 'RSMIGRATE'.
    WHEN 'S401'.
      PERFORM call_program
        USING 'RSMIGRATE_MON' abap_false.
    WHEN 'S402'.
      PERFORM call_browser
        USING 'http://help.sap.com/saphelp_nw73/helpdata/en/4e/cf67e543403352e10000000a42189b/frameset.htm'.

*   WHM - InfoProvider Conversion
    WHEN 'S420'.
      PERFORM call_transaction
        USING 'RSMIGRHANADB'.
    WHEN 'S421'.
      PERFORM callback_log
        USING 'RSDRI' 'REFACTORING' '' abap_false.
    WHEN 'S422'.
      PERFORM call_browser
        USING 'http://help.sap.com/saphelp_nw73/helpdata/en/5d/510e5c5a3c444785b5996af9d03341/frameset.htm'.

*   WHM - MultiProvider Conversion
    WHEN 'S430'.
      PERFORM call_program
        USING 'RSO_CONVERT_IPRO_TO_HCPR' abap_false.
    WHEN 'S431'.
      PERFORM callback_log
        USING 'RSD' 'HCPR_COPY' '' abap_false.
    WHEN 'S432'.
      PERFORM call_browser
        USING 'http://service.sap.com/sap/support/notes/2080851 '.

*   WHM - Transformation Finder
    WHEN 'S440'.
      PERFORM call_program
        USING 'ZBW_TRANSFORM_FINDER' abap_true.
    WHEN 'S441'.
      PERFORM bal_display_logs
        USING 'ZBW_TRANSFORM_FINDER' '19000101' '99991231'.
    WHEN 'S442'.
      PERFORM call_browser
        USING 'http://service.sap.com/sap/support/notes/1908367'.

*   WHM - Object Activation
    WHEN 'S410'.
      PERFORM launch_activation.

*-----------------------------------------------------------------------

*   BEx - Queries
    WHEN 'S720'.
      PERFORM launch_tool
        USING 'BExQueryDesignerStarter.exe'.
    WHEN 'S722'.
      PERFORM call_browser
        USING 'http://help.sap.com/saphelp_nw74/helpdata/en/9d/76563cc368b60fe10000000a114084/frameset.htm'.

    WHEN 'S724'.
      PERFORM call_transaction
        USING 'RSRT'.
    WHEN 'S726'.
      PERFORM call_browser
        USING 'http://help.sap.com/saphelp_nw74/helpdata/en/a0/2a183d30805c59e10000000a114084/frameset.htm'.

    WHEN 'S728'.
      PERFORM call_transaction
        USING 'RSRTQ'.

*   BEx - Web Templates
    WHEN 'S740'.
      PERFORM launch_tool
        USING 'BExWebApplicationDesigner.exe'.
    WHEN 'S741'.
      PERFORM call_browser
        USING 'http://service.sap.com/sap/support/notes/832713'.
    WHEN 'S742'.
      PERFORM call_browser
        USING 'http://help.sap.com/saphelp_nw73/helpdata/en/43/54e487c277321ae10000000a422035/frameset.htm'.

    WHEN 'S744'.
      PERFORM call_program
        USING 'RSZW_ITEM_MIGRATION_3X_TO_70' abap_false.
    WHEN 'S746'.
      PERFORM call_browser
        USING 'http://service.sap.com/sap/support/notes/832712'.

*   BEx - Workbooks
    WHEN 'S700'.
      PERFORM launch_tool
        USING 'BExAnalyzer.exe'.
    WHEN 'S702'.
      PERFORM call_browser
        USING 'http://service.sap.com/sap/support/notes/1901268'.

    WHEN 'S704'.
      PERFORM call_program
        USING 'RSR_DB_WORKBOOK_UTILITY' abap_false.

*-----------------------------------------------------------------------

*   MT - BW Note Analyzer
    WHEN 'SA00'.
      PERFORM call_program
        USING 'Z_BW_NOTE_ANALYZER' abap_false.
    WHEN 'SA01'.
      PERFORM call_browser
        USING 'http://service.sap.com/sap/support/notes/2094475'.
    WHEN 'SA02'.
      PERFORM call_browser
        USING 'http://service.sap.com/sap/support/notes/2117312'.
    WHEN 'SA03'.
      PERFORM call_browser
        USING 'http://service.sap.com/sap/support/notes/2222904'.

*-----------------------------------------------------------------------

*   Security - Authorizations
    WHEN 'S800'.
      PERFORM call_transaction
        USING 'RSECADMIN'.
    WHEN 'S802'.
      PERFORM call_browser
        USING 'http://help.sap.com/saphelp_nw73/helpdata/en/4c/65fcd82f841f3ce10000000a42189c/frameset.htm'.

    WHEN 'S804'.
      PERFORM call_program
        USING 'RSEC_MIGRATION' abap_false.
    WHEN 'S806'.
      PERFORM call_browser
        USING 'http://help.sap.com/saphelp_nw73/helpdata/en/ad/8f7842fdb70f53e10000000a155106/frameset.htm'.

*   Security - Authorizations
    WHEN 'S820'.
      PERFORM call_transaction
        USING 'PFCG'.
    WHEN 'S822'.
      PERFORM call_browser
        USING 'http://help.sap.com/saphelp_nw73/helpdata/en/4c/5bdc2a97817511e10000000a42189b/frameset.htm'.

*-----------------------------------------------------------------------

*   Optimization - ABAP Analyzer
    WHEN 'S500'.
      PERFORM call_program
        USING 'ZBW_ABAP_ANALYZER' abap_true.
    WHEN 'S501'.
      PERFORM bal_display_logs
        USING 'ZBW_ABAP_ANALYZER' '19000101' '99991231'.
    WHEN 'S502'.
      PERFORM call_browser
        USING 'http://service.sap.com/sap/support/notes/1847431'.

*   Optimization - ABAP Test Cockpit
    WHEN 'S510'.
      PERFORM call_transaction
        USING 'ATC'.
    WHEN 'S512'.
      PERFORM call_browser
        USING 'http://help.sap.com/saphelp_nw74/helpdata/en/62/c41ad841554516bb06fb3620540e47/frameset.htm'.

*   Optimization - ABAP Code Inspector
    WHEN 'S520'.
      PERFORM call_transaction
        USING 'SCI'.
    WHEN 'S522'.
      PERFORM call_browser
        USING 'http://help.sap.com/saphelp_nw73/helpdata/en/49/205531d0fc14cfe10000000a42189b/frameset.htm'.

*   Optimization - SQL Monitor / SQL Peformance Tuning Worklist
    WHEN 'S540'.
      SELECT SINGLE * FROM tstc WHERE tcode = 'SQLM'.
      IF sy-subrc = 0.
        PERFORM call_transaction
          USING 'SQLM'.
      ELSE.
        PERFORM call_transaction
          USING '/SDF/SQLM'.
      ENDIF.
    WHEN 'S542'.
      PERFORM call_browser
        USING 'http://help.sap.com/saphelp_nw74/helpdata/en/f1/be2e59f44d448180703d6a497ec1e2/frameset.htm'.
    WHEN 'S544'.
      SELECT SINGLE * FROM tstc WHERE tcode = 'SQLM'.
      IF sy-subrc = 0.
        PERFORM call_transaction
          USING 'SQLMD'.
      ELSE.
        PERFORM call_transaction
          USING '/SDF/SQL'.
      ENDIF.
    WHEN 'S546'.
      PERFORM call_transaction
        USING 'SWLT'.

*-----------------------------------------------------------------------

*   Infos - Additional Information
    WHEN 'S910'.
      PERFORM call_browser
        USING 'http://scn.sap.com/community/netweaver-bw-hana'.
    WHEN 'S911'.
      PERFORM call_browser
        USING 'http://scn.sap.com/docs/DOC-28467'.
    WHEN 'S912'.
      PERFORM call_browser
        USING 'http://scn.sap.com/community/data-warehousing/bw/blog/2015/02/20/simplified-sap-bw-74-release-notes'.
    WHEN 'S913'.
      PERFORM call_browser
        USING 'http://scn.sap.com/community/bw-hana/faq/'.

*   Infos - Product Documentation
    WHEN 'S920'.
      PERFORM call_browser
        USING 'http://help.sap.com/nw73'.
    WHEN 'S921'.
      PERFORM call_browser
        USING 'http://help.sap.com/nw731'.
    WHEN 'S922'.
      PERFORM call_browser
        USING 'http://help.sap.com/nw74'.
    WHEN 'S923'.
      PERFORM call_browser
        USING 'http://help.sap.com/nw75'.

*   Infos - Learning Map
    WHEN 'S930'.
      PERFORM call_browser
        USING 'http://service.sap.com/~form/sapnet?_SHORTKEY=01100035870000752360'.
    WHEN 'S931'.
      PERFORM call_browser
        USING 'http://service.sap.com/~form/sapnet?_SHORTKEY=01100035870000734511'.
    WHEN 'S932'.
      PERFORM call_browser
        USING 'http://service.sap.com/~form/sapnet?_SHORTKEY=01100035870000758478'.
    WHEN 'S933'.
      MESSAGE i799(rsm1)
        WITH 'Learning Map for SAP NetWeaver 7.5' 'is not available yet' '' ''.
*      PERFORM call_browser
*        USING 'http://service.sap.com/~form/sapnet?_SHORTKEY='.
    WHEN 'S934'.
      PERFORM call_browser
        USING 'http://service.sap.com/~form/sapnet?_SHORTKEY=01200252310000100297'.

*   Infos - Product Availability Matrix
    WHEN 'S940'.
      PERFORM call_browser
        USING 'https://apps.support.sap.com/sap/support/pam?hash=pvnr%3D01200314690900002540'.
    WHEN 'S941'.
      PERFORM call_browser
        USING 'https://apps.support.sap.com/sap/support/pam?hash=pvnr%3D01200615320900005175'.
    WHEN 'S942'.
      PERFORM call_browser
        USING 'https://apps.support.sap.com/sap/support/pam?hash=pvnr%3D67838200100900005868'.
    WHEN 'S943'.
      PERFORM call_browser
        USING 'https://apps.support.sap.com/sap/support/pam?hash=pvnr%3D73554900100900000414'.


*-----------------------------------------------------------------------

*   About
    WHEN 'UPDA'.
      PERFORM call_update.

    WHEN 'DOCU'.
      PERFORM call_browser
        USING 'http://service.sap.com/sap/support/notes/1909597'.

  ENDCASE.

*-----------------------------------------------------------------------

AT SELECTION-SCREEN OUTPUT.

  PERFORM modify_screen.

*&---------------------------------------------------------------------*
*&  Include           ZBW_HANA_MIGRATION_COCKPIT_150
*&---------------------------------------------------------------------*

START-OF-SELECTION.

  MESSAGE i799(rsm1) WITH 'Start the tools via the buttons below'.

*&---------------------------------------------------------------------*
*&  Include           ZBW_HANA_MIGRATION_COCKPIT_200
*&---------------------------------------------------------------------*

*-----------------------------------------------------------------------

FORM call_browser USING i_url TYPE char255.

  CHECK NOT i_url IS INITIAL.

  CALL FUNCTION 'CALL_BROWSER'
    EXPORTING
      url    = i_url
    EXCEPTIONS
      OTHERS = 0.

ENDFORM.                    "call_browser

*-----------------------------------------------------------------------

FORM call_program
  USING i_repid  TYPE sy-repid
        i_suffix TYPE abap_bool.

  DATA:
    l_repid      TYPE sy-repid,
    lt_selection TYPE rsparams_tt.

  l_repid = i_repid.
  IF sy-saprl < '700' AND i_suffix = abap_true.
    CONCATENATE l_repid '_3X' INTO l_repid.
  ENDIF.

  PERFORM call_program_selection USING l_repid lt_selection.

ENDFORM.                    "call_program

*-----------------------------------------------------------------------

FORM call_program_selection
  USING i_repid      TYPE sy-repid
        it_selection TYPE rsparams_tt.

  DATA:
    l_repid TYPE sy-repid.

  CHECK NOT i_repid IS INITIAL.

  SELECT SINGLE name FROM trdir INTO l_repid WHERE name = i_repid.
  IF sy-subrc = 0.
    CALL FUNCTION 'SUBMIT_REPORT'
      EXPORTING
        report           = i_repid
        ret_via_leave    = space
      TABLES
        selection_table  = it_selection
      EXCEPTIONS
        just_via_variant = 1
        no_submit_auth   = 2
        OTHERS           = 3.
    IF sy-subrc = 2.
      MESSAGE i149(00) WITH i_repid.
    ENDIF.
  ELSE.
    MESSAGE i541(00) WITH i_repid.
  ENDIF.

ENDFORM.                    "call_program

*-----------------------------------------------------------------------

FORM call_transaction USING i_tcode TYPE sy-tcode.

  DATA: l_tcode TYPE sy-tcode.

  CHECK NOT i_tcode IS INITIAL.

  SELECT SINGLE tcode FROM tstc INTO l_tcode WHERE tcode = i_tcode.
  IF sy-subrc = 0.
    CALL FUNCTION 'AUTHORITY_CHECK_TCODE'
      EXPORTING
        tcode  = i_tcode
      EXCEPTIONS
        ok     = 0
        not_ok = 2
        OTHERS = 3.
    IF sy-subrc = 0.
      CALL TRANSACTION i_tcode.                          "#EC CI_CALLTA
    ELSE.
      MESSAGE i172(00) WITH i_tcode.
    ENDIF.
  ELSE.
    MESSAGE i031(00) WITH i_tcode.
  ENDIF.

ENDFORM.                    "call_transaction

*-----------------------------------------------------------------------

FORM callback_log
  USING i_object          TYPE balobj_d
        i_subobject       TYPE balsubobj
        i_external_number TYPE balnrext
        i_suffix          TYPE abap_bool.

  DATA:
    l_external_number TYPE balnrext,
    l_s_prof          TYPE bal_s_prof.

  l_external_number = i_external_number.
  IF sy-saprl < '700' AND i_suffix = abap_true.
    CONCATENATE l_external_number '_3X' INTO l_external_number.
  ENDIF.

* Get standard application log configuration
  CALL FUNCTION 'BAL_DSP_PROFILE_STANDARD_GET'
    IMPORTING
      e_s_display_profile = l_s_prof.

* Set parameters
  l_s_prof-title             = sy-title.
  l_s_prof-disvariant-report = sy-repid.
  l_s_prof-disvariant-handle = 'LOG'.
  l_s_prof-use_grid          = abap_true.
  l_s_prof-mess_mark         = abap_true.
  l_s_prof-exp_level         = 3.
  l_s_prof-tree_size         = 25.
  l_s_prof-head_size         = 150.

  IF i_external_number IS INITIAL.
    SET PARAMETER ID 'BALEXT' FIELD i_external_number.
  ENDIF.

* Set output
  CALL FUNCTION 'APPL_LOG_DISPLAY'
    EXPORTING
      object                    = i_object
      subobject                 = i_subobject
      external_number           = l_external_number
      date_from                 = sy-datum
      time_from                 = '000000'
      date_to                   = sy-datum
      time_to                   = sy-uzeit
      suppress_selection_dialog = abap_false
      i_s_display_profile       = l_s_prof.

ENDFORM.                    "callback_log

*-----------------------------------------------------------------------

FORM callback_alv USING
  value(i_title) TYPE sy-title
  value(i_sort)  TYPE abap_bool
  it_data        TYPE ANY TABLE.

  DATA:
    l_r_data         TYPE REF TO data,
    l_tdescr         TYPE REF TO cl_abap_typedescr,
    l_sdescr         TYPE REF TO cl_abap_structdescr,
    l_t_fcat         TYPE slis_t_fieldcat_alv,
    l_s_fcat         TYPE slis_fieldcat_alv,
    l_t_components   TYPE abap_compdescr_tab,
    l_s_layout       TYPE slis_layout_alv.

  FIELD-SYMBOLS:
    <l_s_data>       TYPE any,
    <l_t_data>       TYPE STANDARD TABLE,
    <l_s_components> TYPE abap_compdescr.

  IF it_data IS INITIAL.

    MESSAGE i799(rsm1) WITH 'No data found'.

  ELSE.

    IF i_sort = abap_true.
      SORT it_data.
    ENDIF.

*   RSDU_CALL_ALV_TABLE does not exist in 3.x,
*   so do it the old fashion way
    LOOP AT it_data ASSIGNING <l_s_data>.
      EXIT.
    ENDLOOP.

    CREATE DATA l_r_data LIKE STANDARD TABLE OF <l_s_data>
      WITH DEFAULT KEY.

    ASSIGN l_r_data->* TO <l_t_data>.

    <l_t_data> = it_data.

    l_s_layout-colwidth_optimize = abap_true.
    l_s_layout-window_titlebar   = i_title.

    l_tdescr  = cl_abap_typedescr=>describe_by_data( <l_s_data> ).
    l_sdescr ?= l_tdescr.
    l_t_components = l_sdescr->components.

    LOOP AT l_t_components ASSIGNING <l_s_components>.
      CLEAR l_s_fcat.
      l_s_fcat-col_pos = sy-tabix.
      l_s_fcat-seltext_s  = <l_s_components>-name.
      l_s_fcat-seltext_m  = <l_s_components>-name.
      l_s_fcat-seltext_l  = <l_s_components>-name.
      l_s_fcat-fieldname = <l_s_components>-name.

      CASE <l_s_components>-name.
        WHEN 'SAP_NOTE'.
          l_s_fcat-hotspot = abap_true.
      ENDCASE.

      CASE <l_s_components>-type_kind.
        WHEN cl_abap_typedescr=>typekind_int.
          l_s_fcat-datatype  = 'INT4'.
          l_s_fcat-outputlen = 10.
        WHEN cl_abap_typedescr=>typekind_char.
          l_s_fcat-datatype  = 'CHAR'.
          l_s_fcat-outputlen = <l_s_components>-length /
            cl_abap_char_utilities=>charsize.
        WHEN cl_abap_typedescr=>typekind_num.
          l_s_fcat-datatype  = 'NUMC'.
          l_s_fcat-outputlen = <l_s_components>-length /
            cl_abap_char_utilities=>charsize.
        WHEN cl_abap_typedescr=>typekind_date.
          l_s_fcat-datatype  = 'DATS'.
        WHEN cl_abap_typedescr=>typekind_time.
          l_s_fcat-datatype  = 'TIMS'.
        WHEN cl_abap_typedescr=>typekind_float.
          l_s_fcat-datatype  = 'FLOAT'.
        WHEN cl_abap_typedescr=>typekind_packed.
          l_s_fcat-datatype  = 'DEC'.
        WHEN cl_abap_typedescr=>typekind_string.
          l_s_fcat-datatype  = 'STRING'.
        WHEN OTHERS.
          MESSAGE i799(rsm1) WITH 'Unknown data type'.
      ENDCASE.

      l_s_fcat-no_convext = abap_true.
      APPEND l_s_fcat TO l_t_fcat.
    ENDLOOP.

    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
        i_callback_program      = sy-repid
        i_callback_user_command = 'CALLBACK_ALV_USER_COMMAND'
        it_fieldcat             = l_t_fcat
        is_layout               = l_s_layout
      TABLES
        t_outtab                = <l_t_data>
      EXCEPTIONS
        program_error           = 1
        OTHERS                  = 2.
    CHECK sy-subrc = 0.
  ENDIF.

ENDFORM.                    "callback_alv

*-----------------------------------------------------------------------

FORM callback_alv_user_command
  USING i_ucomm     TYPE sy-ucomm
        is_selfield TYPE slis_selfield.                     "#EC CALLED

  DATA: l_url TYPE char255.

  IF i_ucomm = '&IC1' AND is_selfield-fieldname = 'SAP_NOTE'.
    CONCATENATE 'http://service.sap.com/sap/support/notes/'
      is_selfield-value+9(*) INTO l_url.

    PERFORM call_browser USING l_url.
  ENDIF.

ENDFORM.                    "callback_alv_user_command

*&---------------------------------------------------------------------*
*&  Include           ZBW_HANA_MIGRATION_COCKPIT_250
*&---------------------------------------------------------------------*

FORM call_smigr.

  DATA:
    ls_selection TYPE rsparams,
    lt_selection TYPE rsparams_tt.

  CLEAR ls_selection.
  ls_selection-kind    = 'P'.
  ls_selection-sign    = 'I'.
  ls_selection-option  = 'EQ'.
  ls_selection-selname = 'P_DB2'.
  ls_selection-low     = abap_false.
  APPEND ls_selection TO lt_selection.
  ls_selection-selname = 'P_HDB'.
  ls_selection-low     = abap_true.
  APPEND ls_selection TO lt_selection.
  ls_selection-selname = 'P_ISUNI'.
  ls_selection-low     = abap_true.
  APPEND ls_selection TO lt_selection.
  ls_selection-selname = 'P_TABCLS'.
  ls_selection-low     = abap_true.
  APPEND ls_selection TO lt_selection.
  ls_selection-selname = 'P_ROWCNT'.
  ls_selection-low     = abap_true.
  APPEND ls_selection TO lt_selection.

  PERFORM call_program_selection
    USING 'SMIGR_CREATE_DDL' lt_selection.

ENDFORM.                    "call_smigr

*-----------------------------------------------------------------------

FORM http_get_data
  USING    i_url  TYPE clike
  CHANGING e_data TYPE clike.

  DATA:
    lr_http_client TYPE REF TO if_http_client.

  CLEAR e_data.

  CALL METHOD cl_http_client=>create_by_url
    EXPORTING
      url                = i_url
      proxy_host         = c_proxy_host
      proxy_service      = c_proxy_port
    IMPORTING
      client             = lr_http_client
    EXCEPTIONS
      argument_not_found = 1
      plugin_not_active  = 2
      internal_error     = 3
      OTHERS             = 4.
  IF sy-subrc <> 0.
    MESSAGE w799(rsm1) WITH 'Error creating HTTP client'.
    EXIT.
  ENDIF.

  CALL METHOD lr_http_client->send
    EXCEPTIONS
      http_communication_failure = 1
      http_invalid_state         = 2.
  IF sy-subrc <> 0.
    MESSAGE w799(rsm1) WITH 'Error sending HTTP request.'
      'Check proxy setting in program.'.
    EXIT.
  ENDIF.

  CALL METHOD lr_http_client->receive
    EXCEPTIONS
      http_communication_failure = 1
      http_invalid_state         = 2
      http_processing_failed     = 3.
  IF sy-subrc <> 0.
    MESSAGE w799(rsm1) WITH 'Error receiving HTTP request.'
      'Check proxy setting in program.'.
    EXIT.
  ENDIF.

  e_data = lr_http_client->response->get_cdata( ).

ENDFORM.                    "http_get_data

*-----------------------------------------------------------------------

FORM http_extract_data
  USING    i_start_tag TYPE clike
           i_end_tag   TYPE clike
  CHANGING c_data      TYPE clike.

  DATA:
    l_offset TYPE i.

  FIND i_start_tag IN c_data MATCH OFFSET l_offset.
  IF sy-subrc = 0.
    l_offset = l_offset + strlen( i_start_tag ).
    c_data = c_data+l_offset(*).
    FIND '>' IN c_data MATCH OFFSET l_offset.
    IF sy-subrc = 0.
      l_offset = l_offset + 1.
      c_data = c_data+l_offset(*).
      FIND i_end_tag IN c_data MATCH OFFSET l_offset.
      IF sy-subrc = 0.
        c_data = c_data(l_offset).
      ENDIF.
    ENDIF.
  ENDIF.

ENDFORM.                    "http_extract_data

*-----------------------------------------------------------------------

FORM http_extract_versions
  USING    i_data      TYPE clike
  CHANGING et_versions TYPE yt_versions.

  CONSTANTS:
    c_tag_end    TYPE string VALUE '>',
    c_row_start  TYPE string VALUE '<tr',
    c_row_end    TYPE string VALUE '</tr',
    c_cell_start TYPE string VALUE '<td',
    c_cell_end   TYPE string VALUE '</td',
    c_link_start TYPE string VALUE '<a',
    c_link_end   TYPE string VALUE '</a'.

  DATA:
    l_data       TYPE string,
    l_row        TYPE string,
    l_offset     TYPE i,
    ls_versions  TYPE ys_versions.

  FIELD-SYMBOLS:
    <f>          TYPE clike.

  l_data = i_data.

  DO.
    FIND c_row_start IN l_data MATCH OFFSET l_offset.
    IF sy-subrc = 0.
      l_offset = l_offset + strlen( c_row_start ).
      l_data = l_data+l_offset(*).
      FIND c_row_end IN l_data MATCH OFFSET l_offset.
      IF sy-subrc = 0.
        l_row = l_data(l_offset).
        l_offset = l_offset + strlen( c_row_end ).
        l_data = l_data+l_offset(*).

        DO 4 TIMES.
          ASSIGN COMPONENT sy-index OF STRUCTURE ls_versions TO <f>.
          ASSERT sy-subrc = 0.

          FIND c_cell_start IN l_row MATCH OFFSET l_offset.
          IF sy-subrc = 0.
            l_offset = l_offset + strlen( c_cell_start ).
            l_row = l_row+l_offset(*).
            FIND c_tag_end IN l_row MATCH OFFSET l_offset.
            IF sy-subrc = 0.
              l_offset = l_offset + 1.
              l_row = l_row+l_offset(*).
              FIND c_cell_end IN l_row MATCH OFFSET l_offset.
              IF sy-subrc = 0.
                <f> = l_row(l_offset).
                l_offset = l_offset + strlen( c_cell_end ).
                l_row = l_row+l_offset(*).
              ENDIF.
            ENDIF.
          ENDIF.
        ENDDO.

        PERFORM http_extract_data
          USING    c_link_start c_link_end
          CHANGING ls_versions-sap_note.

        APPEND ls_versions TO et_versions.
      ELSE.
        EXIT.
      ENDIF.
    ELSE.
      EXIT.
    ENDIF.
  ENDDO.

ENDFORM.                    "http_extract_data

*-----------------------------------------------------------------------

FORM call_update.

  CONSTANTS:
    c_body_start  TYPE string VALUE '<!-- [DocumentBodyStart',
    c_body_end    TYPE string VALUE '<!-- [DocumentBodyEnd',
    c_table_start TYPE string VALUE '<tbody',
    c_table_end   TYPE string VALUE '</tbody'.

  DATA:
    l_data        TYPE string,
    l_report      TYPE prgname,
    lt_versions   TYPE yt_versions,
    l_line        TYPE i,
    l_offset      TYPE i,
    l_found       TYPE abap_bool,
    l_code        TYPE string,
    lt_code       TYPE TABLE OF string.

  FIELD-SYMBOLS:
    <ls_versions> TYPE ys_versions.

* Get web page listing most current versions
  PERFORM http_get_data
    USING    c_check_vers
    CHANGING l_data.

* Extract body
  PERFORM http_extract_data
    USING    c_body_start c_body_end
    CHANGING l_data.

* Extract table
  PERFORM http_extract_data
    USING    c_table_start c_table_end
    CHANGING l_data.

* Extract version info
  PERFORM http_extract_versions
    USING    l_data
    CHANGING lt_versions.

  IF lt_versions IS INITIAL.
    RETURN.
  ENDIF.

* Check if all tools are up-to-date
  LOOP AT lt_versions ASSIGNING <ls_versions>.
    l_report = <ls_versions>-tool_name.

*   Adjustments because of BW release
    CASE l_report.
      WHEN 'ZBW_HANA_CHECKLIST'.
        IF sy-saprl < '700'.
          l_report = 'ZBW_HANA_CHECKLIST_3X'.
        ENDIF.
      WHEN 'ZBW_ABAP_ANALYZER'.
        IF sy-saprl < '700'.
          l_report = 'ZBW_ABAP_ANALYZER_3X'.
        ENDIF.
      WHEN 'ZBW_TRANSFORM_FINDER'.
        IF sy-saprl < '700'.
          l_report = 'ZBW_TRANSFORM_FINDER_3X'.
        ENDIF.
      WHEN 'ZBW_HANA_SIZING'.
        IF sy-saprl < '700'.
          l_report = 'ZBW_HANA_SIZING_3X'.
          <ls_versions>-sap_note = 'SAP Note 2021372'.
        ENDIF.
      WHEN 'Z_BW_NOTE_ANALYZER'.
        IF sy-saprl < '740'.
          <ls_versions>-status = 'Program requires BW 7.4 or higher'.
          <ls_versions>-icon   = icon_light_out.
          CONTINUE.
        ENDIF.
      WHEN 'Z_SAP_NOTE_ANALYZER'.
        IF sy-saprl < '700'.
          <ls_versions>-status = 'Program requires BW 7.0 or higher'.
          <ls_versions>-icon   = icon_light_out.
          CONTINUE.
        ENDIF.
    ENDCASE.

    READ REPORT l_report INTO lt_code.
    IF sy-subrc = 0.
*     FIND 'C_VERSION' IN TABLE lt_code MATCH LINE l_line IGNORING CASE.
      l_offset = 1.
      l_found = abap_false.
      DO.
        SEARCH lt_code FOR 'C_VERSION' STARTING AT l_offset.
        IF sy-subrc = 0.
          l_line = sy-tabix.
          READ TABLE lt_code INTO l_code INDEX l_line.
          ASSERT sy-subrc = 0.
          IF l_code(1) <> '*'.
            l_found = abap_true.
            EXIT.
          ELSE.
            l_offset = l_line + 1.
          ENDIF.
        ELSE.
          EXIT.
        ENDIF.
      ENDDO.

      IF l_found = abap_true.
        FIND '''' IN l_code MATCH OFFSET l_offset.
        IF sy-subrc = 0.
          l_offset = l_offset + 1.
          l_code = l_code+l_offset(*).
          FIND '''' IN l_code MATCH OFFSET l_offset.
          IF sy-subrc = 0.
            l_code = l_code(l_offset).
            <ls_versions>-installed_version = l_code.

            IF <ls_versions>-available_version = l_code.
              <ls_versions>-status = 'Program is up-to-date'.
              <ls_versions>-icon   = icon_green_light.
            ELSEIF <ls_versions>-available_version > l_code.
              <ls_versions>-status =
                'Newer version of program is available'.
              <ls_versions>-icon   = icon_yellow_light.
            ELSE.
              <ls_versions>-status =
                'Program is newer than recommended version'.
              <ls_versions>-icon   = icon_yellow_light.
            ENDIF.
          ELSE.
            <ls_versions>-status = 'Version info not found'.
            <ls_versions>-icon   = icon_red_light.
          ENDIF.
        ELSE.
          <ls_versions>-status = 'Version info not found'.
          <ls_versions>-icon   = icon_red_light.
        ENDIF.
      ELSE.
        <ls_versions>-status = 'Version info not found'.
        <ls_versions>-icon   = icon_red_light.
      ENDIF.
    ELSE.
      <ls_versions>-status = 'Program not found'.
      <ls_versions>-icon   = icon_light_out.
    ENDIF.
  ENDLOOP.

  PERFORM callback_alv
    USING 'Migration Cockpit - Version Status' abap_true lt_versions.

ENDFORM.                    "call_update

*&---------------------------------------------------------------------*
*&  Include           ZBW_HANA_MIGRATION_COCKPIT_300
*&---------------------------------------------------------------------*

FORM launch_tool USING i_tool TYPE string.

  DATA:
    l_key  TYPE string,
    l_path TYPE string.

  l_key = 'SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\'.

  CONCATENATE l_key i_tool INTO l_key.

* Previously used path
  CALL METHOD cl_gui_frontend_services=>registry_get_value
    EXPORTING
      root                 = cl_gui_frontend_services=>hkey_local_machine
      key                  = l_key
    IMPORTING
      reg_value            = l_path
    EXCEPTIONS
      get_regvalue_failed  = 1
      cntl_error           = 2
      error_no_gui         = 3
      not_supported_by_gui = 4
      OTHERS               = 5.
  IF sy-subrc <> 0.
*   32-bit installation path
    CALL METHOD cl_gui_frontend_services=>registry_get_value
      EXPORTING
        root                 = cl_gui_frontend_services=>hkey_local_machine
        key                  = 'SOFTWARE\SAP\SAP Shared\SAPBI'
        value                = 'SAPDestDir'
      IMPORTING
        reg_value            = l_path
      EXCEPTIONS
        get_regvalue_failed  = 1
        cntl_error           = 2
        error_no_gui         = 3
        not_supported_by_gui = 4
        OTHERS               = 5.
    IF sy-subrc <> 0.
*     64-bit installation path
      CALL METHOD cl_gui_frontend_services=>registry_get_value
        EXPORTING
          root                 = cl_gui_frontend_services=>hkey_local_machine
          key                  = 'SOFTWARE\Wow6432Node\SAP\SAP Shared\SAPBI'
          value                = 'SAPDestDir'
        IMPORTING
          reg_value            = l_path
        EXCEPTIONS
          get_regvalue_failed  = 1
          cntl_error           = 2
          error_no_gui         = 3
          not_supported_by_gui = 4
          OTHERS               = 5.
      IF sy-subrc <> 0.
*       Try to use default
        l_path = 'C:\Program Files (x86)\SAP\Business Explorer\BI'.
      ELSE.
        CONCATENATE l_path '\BI\' i_tool INTO l_path.
      ENDIF.
    ELSE.
      CONCATENATE l_path '\BI\' i_tool INTO l_path.
    ENDIF.
  ENDIF.

  CALL METHOD cl_gui_frontend_services=>execute
    EXPORTING
      application            = l_path
    EXCEPTIONS
      cntl_error             = 1
      error_no_gui           = 2
      bad_parameter          = 3
      file_not_found         = 4
      path_not_found         = 5
      file_extension_unknown = 6
      error_execute_failed   = 7
      synchronous_failed     = 8
      not_supported_by_gui   = 9
      OTHERS                 = 10.
  IF sy-subrc <> 0.
    MESSAGE w799(rsm1) WITH 'Error launching tool:' i_tool.
    EXIT.
  ENDIF.

ENDFORM.                    "launch_tool

*&---------------------------------------------------------------------*
*&  Include           ZBW_HANA_MIGRATION_COCKPIT_350
*&---------------------------------------------------------------------*

FORM launch_activation.

  DATA:
    ls_list  TYPE spopli,
    lt_list  TYPE TABLE OF spopli,
    l_answer TYPE c LENGTH 2.

  CLEAR ls_list.
  ls_list-varoption = 'Logical Systems'.
  APPEND ls_list TO lt_list.
  ls_list-varoption = 'InfoObjects'.
  APPEND ls_list TO lt_list.
  ls_list-varoption = 'DataStore Objects'.
  APPEND ls_list TO lt_list.
  ls_list-varoption = 'InfoCubes'.
  APPEND ls_list TO lt_list.
  ls_list-varoption = 'HybridProviders'.
  APPEND ls_list TO lt_list.
  ls_list-varoption = 'InfoSets'.
  APPEND ls_list TO lt_list.
  ls_list-varoption = 'MultiProviders'.
  APPEND ls_list TO lt_list.
  ls_list-varoption = 'DataSources'.
  APPEND ls_list TO lt_list.
  ls_list-varoption = 'InfoSources'.
  APPEND ls_list TO lt_list.
  ls_list-varoption = 'Transfer Rules'.
  APPEND ls_list TO lt_list.
  ls_list-varoption = 'Update Rules'.
  APPEND ls_list TO lt_list.
  ls_list-varoption = 'Transformations'.
  APPEND ls_list TO lt_list.
  ls_list-varoption = 'Data Transfer Processes'.
  APPEND ls_list TO lt_list.

  CALL FUNCTION 'POPUP_TO_DECIDE_LIST'
    EXPORTING
      textline1          = 'Select type of BW objects'
      textline2          = 'you want to check or activate:'
      titel              = 'Object Activation'
      start_col          = 72
      start_row          = 11
    IMPORTING
      answer             = l_answer
    TABLES
      t_spopli           = lt_list
    EXCEPTIONS
      not_enough_answers = 1
      too_much_answers   = 2
      too_much_marks     = 3
      OTHERS             = 4.
  CHECK sy-subrc = 0.

  CASE l_answer.
    WHEN '1'.
      PERFORM call_program
        USING 'RS_LOGSYS_ACTIVATE' abap_false.
    WHEN '2'.
      PERFORM call_program
        USING 'RSDG_IOBJ_ACTIVATE' abap_false.
    WHEN '3'.
      PERFORM call_program
        USING 'RSDG_ODSO_ACTIVATE' abap_false.
    WHEN '4'.
      PERFORM call_program
        USING 'RSDG_CUBE_ACTIVATE' abap_false.
    WHEN '5'.
      PERFORM call_program
        USING 'RSDG_HYBR_ACTIVATE' abap_false.
    WHEN '6'.
      PERFORM call_program
        USING 'RSQ_ISET_MASS_OPERATIONS' abap_false.
    WHEN '7'.
      PERFORM call_program
        USING 'RSDG_MPRO_ACTIVATE' abap_false.
    WHEN '8'.
      PERFORM call_program
        USING 'RSDS_DATASOURCE_ACTIVATE_ALL' abap_false.
    WHEN '9'.
      PERFORM call_program
        USING 'RS_COMSTRU_ACTIVATE_ALL' abap_false.
    WHEN '10'.
      PERFORM call_program
        USING 'RS_TRANSTRU_ACTIVATE_ALL' abap_false.
    WHEN '11'.
      PERFORM call_program
        USING 'RSAU_UPDR_REACTIVATE_ALL' abap_false.
    WHEN '12'.
      PERFORM call_program
        USING 'RSDG_TRFN_ACTIVATE' abap_false.
    WHEN '13'.
      PERFORM call_program
        USING 'RSBKDTPREPAIR' abap_false.
  ENDCASE.

ENDFORM.                    "launch_activation

*&---------------------------------------------------------------------*
*&  Include           ZBW_HANA_MIGRATION_COCKPIT_400
*&---------------------------------------------------------------------*

*&---------------------------------------------------------------------*
*&      Form  bal_display_logs
*&---------------------------------------------------------------------*
FORM bal_display_logs
  USING i_extnumber TYPE balnrext
        i_date_from TYPE baldate
        i_date_to   TYPE baldate.

  DATA:
    l_count        TYPE i,
    l_t_log_handle TYPE bal_t_logh,
    l_s_fcat       TYPE bal_s_fcat,
    l_s_sort       TYPE bal_s_sort,
    l_s_profile    TYPE bal_s_prof.

  DEFINE macro_log_fcat.
    clear l_s_fcat.
    l_s_fcat-ref_table = 'BAL_S_SHOW'.
    l_s_fcat-ref_field = &2.
    if &3 > 0.
      l_s_fcat-outputlen = &3.
    endif.
    l_s_fcat-no_out    = &4.
    append l_s_fcat to l_s_profile-&1.
  END-OF-DEFINITION.

  DEFINE macro_log_sort.
    clear l_s_sort.
    l_s_sort-ref_table = 'BAL_S_SHOW'.
    l_s_sort-ref_field = &2.
    l_s_sort-up        = &3.
    append l_s_sort to l_s_profile-&1.
  END-OF-DEFINITION.

  PERFORM bal_get_logs
    USING    i_extnumber i_date_from i_date_to
    CHANGING l_t_log_handle.

  l_count = lines( l_t_log_handle ).

* Set display profile
  CALL FUNCTION 'BAL_DSP_PROFILE_DETLEVEL_GET'
    IMPORTING
      e_s_display_profile = l_s_profile
    EXCEPTIONS
      OTHERS              = 1.
  IF sy-subrc <> 0.
    MESSAGE i799(rsm1) WITH 'Error getting profile'.
    RETURN.
  ENDIF.

  l_s_profile-title             = sy-title.
  l_s_profile-disvariant-report = sy-repid.
  l_s_profile-disvariant-handle = 'LOG'.
  l_s_profile-use_grid          = abap_true.
  l_s_profile-mess_mark         = abap_true.
  l_s_profile-head_size         = 110.
  l_s_profile-tree_size         = 65.
  l_s_profile-tree_ontop        = abap_false.

  IF l_count = 1.
    l_s_profile-exp_level         = 2.
    l_s_profile-show_all          = abap_true.
  ELSEIF l_count <= 3.
    l_s_profile-exp_level         = 2.
    l_s_profile-show_all          = abap_false.
  ELSE.
    l_s_profile-exp_level         = 1.
    l_s_profile-show_all          = abap_false.
  ENDIF.

* Callbak
  l_s_profile-clbk_ucom-userexitt     = space.
  l_s_profile-clbk_ucom-userexitp     = sy-repid.
  l_s_profile-clbk_ucom-userexitf     = 'BAL_CALLBACK_UCOMM'.

* Additional features
  l_s_profile-ext_push1-active        = 'X'.
  l_s_profile-ext_push1-def-text      = 'Table'.
  l_s_profile-ext_push1-def-icon_id   = icon_table_settings.
  l_s_profile-ext_push1-def-icon_text = 'Display as Table'.
  l_s_profile-ext_push1-def-quickinfo = 'Display Log Messages as Table'.

  l_s_profile-ext_push2-active        = 'X'.
  l_s_profile-ext_push2-def-text      = 'List'.
  l_s_profile-ext_push2-def-icon_id   = icon_view_list.
  l_s_profile-ext_push2-def-icon_text = 'Display as List'.
  l_s_profile-ext_push2-def-quickinfo = 'Display Log Messages as List'.

* Messages
  CLEAR l_s_profile-mess_fcat.

  macro_log_fcat mess_fcat 'T_MSG' 95 ''.

* Level 1
  CLEAR l_s_profile-lev1_fcat.

  macro_log_fcat lev1_fcat 'ALDATE' 0 abap_false.
  macro_log_fcat lev1_fcat 'ALTIME' 0 abap_false.
  macro_log_fcat lev1_fcat 'EXTNUMBER' 40 abap_false.
  macro_log_fcat lev1_fcat 'LOG_HANDLE' 0 abap_true.

  macro_log_sort lev1_sort 'ALDATE' abap_true.
  macro_log_sort lev1_sort 'ALTIME' abap_true.
  macro_log_sort lev1_sort 'EXTNUMBER' abap_true.

  CALL FUNCTION 'BAL_DSP_LOG_DISPLAY'
    EXPORTING
      i_t_log_handle      = l_t_log_handle
      i_s_display_profile = l_s_profile
    EXCEPTIONS
      no_authority        = 1
      OTHERS              = 2.
  CASE sy-subrc.
    WHEN 1.
      MESSAGE i799(rsm1) WITH 'No authorization to display log'.
    WHEN 2.
      MESSAGE i799(rsm1) WITH 'Unknown error displaying log'.
  ENDCASE.

ENDFORM.                    "bal_display_logs

*&---------------------------------------------------------------------*
*&      Form  bal_get_logs
*&---------------------------------------------------------------------*
FORM bal_get_logs
  USING     i_extnumber    TYPE balnrext
            i_date_from    TYPE baldate
            i_date_to      TYPE baldate
   CHANGING e_t_log_handle TYPE bal_t_logh.

  DATA:
    l_extnumber    TYPE balnrext,
    l_s_log_filter TYPE bal_s_lfil,
    l_t_log_header TYPE balhdr_t.

  l_extnumber = i_extnumber.

  IF sy-saprl(1) = '3' AND NOT l_extnumber IS INITIAL.
    CONCATENATE l_extnumber '_3X' INTO l_extnumber.
  ENDIF.

  CALL FUNCTION 'BAL_FILTER_CREATE'
    EXPORTING
      i_object       = 'RSD'
      i_subobject    = 'MIGRATION'
      i_extnumber    = l_extnumber
      i_aldate_from  = i_date_from
      i_aldate_to    = i_date_to
    IMPORTING
      e_s_log_filter = l_s_log_filter
    EXCEPTIONS
      OTHERS         = 1.
  IF sy-subrc <> 0.
    MESSAGE i799(rsm1) WITH 'Error in filter definition'.
    RETURN.
  ENDIF.

* Find logs
  CALL FUNCTION 'BAL_DB_SEARCH'
    EXPORTING
      i_s_log_filter     = l_s_log_filter
    IMPORTING
      e_t_log_header     = l_t_log_header
    EXCEPTIONS
      log_not_found      = 1
      no_filter_criteria = 2
      OTHERS             = 3.
  IF sy-subrc <> 0 OR l_t_log_header IS INITIAL.
    MESSAGE i799(rsm1) WITH 'No logs found'.
    RETURN.
  ENDIF.

* Read logs
  CALL FUNCTION 'BAL_DB_LOAD'
    EXPORTING
      i_t_log_header     = l_t_log_header
    IMPORTING
      e_t_log_handle     = e_t_log_handle
    EXCEPTIONS
      no_logs_specified  = 1
      log_not_found      = 2
      log_already_loaded = 3
      OTHERS             = 4.
  IF sy-subrc <> 0 OR e_t_log_handle IS INITIAL.
    MESSAGE i799(rsm1) WITH 'No logs found'.
    RETURN.
  ENDIF.

ENDFORM.                    "bal_get_logs

*&---------------------------------------------------------------------*
*&      Form  bal_callback_ucomm
*&---------------------------------------------------------------------*
FORM bal_callback_ucomm
  CHANGING c_s_command TYPE bal_s_cbuc.                     "#EC CALLED

  DATA:
    l_s_path TYPE bal_s_path.

  CASE c_s_command-ucomm.
    WHEN '%EXT_PUSH1' OR '%EXT_PUSH2'.

      READ TABLE c_s_command-tree_path INTO l_s_path WITH KEY
        tree_level = '1'
        sel_table  = 'BAL_S_SHOW'
        sel_field  = 'LOG_HANDLE'.
      IF sy-subrc = 0.
        IF c_s_command-ucomm = '%EXT_PUSH1'.
          PERFORM bal_display_table USING l_s_path-sel_value.
        ELSE.
          PERFORM bal_display_list USING l_s_path-sel_value.
        ENDIF.
      ELSE.
        MESSAGE i799(rsm1) WITH 'Select a log first'.
      ENDIF.

      c_s_command-ucomm_exec = 'X'.

  ENDCASE.

ENDFORM.                    "bal_callback_ucomm

*&---------------------------------------------------------------------*
*&      Form  bal_display_table
*&---------------------------------------------------------------------*
FORM bal_display_table
  USING i_log_handle TYPE clike.

  DATA:
    l_t_msg       TYPE rs_t_msg,
    l_t_log_table TYPE TABLE OF ys_log_table.

  PERFORM bal_get_log_table
    USING    i_log_handle
    CHANGING l_t_log_table l_t_msg.

 PERFORM callback_alv
   USING 'Log as Table' abap_false l_t_log_table.

ENDFORM.                    "bal_display_table

*&---------------------------------------------------------------------*
*&      Form  bal_get_log_table
*&---------------------------------------------------------------------*
FORM bal_get_log_table
  USING    i_log_handle  TYPE clike
  CHANGING e_t_log_table TYPE yt_log_table
           e_t_msg       TYPE rs_t_msg.

  DATA:
    l_t_log_handle TYPE bal_t_logh,
    l_s_msg_handle TYPE balmsghndl,
    l_t_msg_handle TYPE bal_t_msgh,
    l_s_msg        TYPE bal_s_msg,
    l_text         TYPE char200,
    l_pos          TYPE i,
    l_s_log_table  TYPE ys_log_table.

  FIELD-SYMBOLS:
    <f>            TYPE any.

  APPEND i_log_handle TO l_t_log_handle.

  CALL FUNCTION 'BAL_GLB_SEARCH_MSG'
    EXPORTING
      i_t_log_handle = l_t_log_handle
    IMPORTING
      e_t_msg_handle = l_t_msg_handle
    EXCEPTIONS
      msg_not_found  = 1
      OTHERS         = 2.
  CHECK sy-subrc = 0.

  LOOP AT l_t_msg_handle INTO l_s_msg_handle.
    CALL FUNCTION 'BAL_LOG_MSG_READ'
      EXPORTING
        i_s_msg_handle = l_s_msg_handle
      IMPORTING
        e_s_msg        = l_s_msg
        e_txt_msg      = l_text
      EXCEPTIONS
        log_not_found  = 1
        msg_not_found  = 2
        OTHERS         = 3.
    CHECK sy-subrc = 0.

    IF l_s_msg-detlevel > 1.
      l_s_msg-detlevel = l_s_msg-detlevel - 1.
    ENDIF.
    l_pos = l_s_msg-detlevel.
    WHILE l_pos <= 9.
      ASSIGN COMPONENT l_pos OF STRUCTURE l_s_log_table TO <f>.
      ASSERT sy-subrc = 0.
      IF l_pos = l_s_msg-detlevel.
        <f> = l_text.
      ELSE.
        CLEAR <f>.
      ENDIF.
      l_pos = l_pos + 1.
    ENDWHILE.

    l_s_log_table-detlevel = l_s_msg-detlevel.
    APPEND l_s_log_table TO e_t_log_table.

    APPEND l_s_msg TO e_t_msg.
  ENDLOOP.

ENDFORM.                    "bal_get_log_table

*&---------------------------------------------------------------------*
*&      Form  bal_display_list
*&---------------------------------------------------------------------*
FORM bal_display_list
  USING i_log_handle TYPE clike.

  DATA:
    l_t_log_handle TYPE bal_t_logh,
    l_s_msg_handle TYPE balmsghndl,
    l_t_msg_handle TYPE bal_t_msgh,
    l_s_msg        TYPE bal_s_msg,
    l_text         TYPE char120,
    l_pos          TYPE i.

  APPEND i_log_handle TO l_t_log_handle.

  CALL FUNCTION 'BAL_GLB_SEARCH_MSG'
    EXPORTING
      i_t_log_handle = l_t_log_handle
    IMPORTING
      e_t_msg_handle = l_t_msg_handle
    EXCEPTIONS
      msg_not_found  = 1
      OTHERS         = 2.
  CHECK sy-subrc = 0.

  LOOP AT l_t_msg_handle INTO l_s_msg_handle.
    CALL FUNCTION 'BAL_LOG_MSG_READ'
      EXPORTING
        i_s_msg_handle = l_s_msg_handle
      IMPORTING
        e_s_msg        = l_s_msg
        e_txt_msg      = l_text
      EXCEPTIONS
        log_not_found  = 1
        msg_not_found  = 2
        OTHERS         = 3.
    CHECK sy-subrc = 0.

    IF l_s_msg-detlevel BETWEEN 2 AND 3.
      SKIP.
    ENDIF.

    IF l_s_msg-detlevel > 1.
      l_s_msg-detlevel = l_s_msg-detlevel - 1.
    ENDIF.
    l_pos = l_s_msg-detlevel * 3.

    CASE l_s_msg-msgty.
      WHEN 'S' OR 'I'.
        FORMAT COLOR COL_POSITIVE.
        WRITE: AT /l_pos icon_led_green AS ICON, l_text.
      WHEN 'W'.
        FORMAT COLOR COL_TOTAL.
        WRITE: AT /l_pos icon_led_yellow AS ICON, l_text.
      WHEN 'E' OR 'X' OR 'A'.
        FORMAT COLOR COL_NEGATIVE.
        WRITE: AT /l_pos icon_led_red AS ICON, l_text.
      WHEN OTHERS.
        FORMAT COLOR COL_NORMAL.
        WRITE: AT /l_pos icon_led_inactive AS ICON, l_text.
    ENDCASE.

    WRITE AT 150 space.

  ENDLOOP.

  SET PF-STATUS ''.

  LEAVE TO LIST-PROCESSING.

ENDFORM.                    "bal_display_list

 

'SAP BC' 카테고리의 다른 글

Change SAP Web Logon images  (0) 2016.06.02
Delete RSECADMIN  (0) 2016.05.20
ZBW_HANA_MIGRATION_COCKPIT (SAP Note 1909597)  (0) 2016.05.20
SAP Solution Manager SSO  (0) 2015.12.30
1911102 - Solution Manager application logs reorganization  (0) 2015.12.30
[SAP HANA] Row Store Table Ratio  (0) 2015.08.25

+ Recent posts