HANA ABAP UpdateErrors
HANA ABAP UpdateErrors
HANA ABAP UpdateErrors
/*
[NAME]
- HANA_ABAP_UpdateErrors
[DESCRIPTION]
[SOURCE]
[259]: invalid table name: Could not find table/view VBHDR / VBERROR in schema
- If access to ABAP objects is possible but you cannot log on as ABAP user, you can
switch the default schema before executing the command:
[VALID FOR]
- Revisions: all
- Statistics server type: all
- Client application: ABAP
[INVOLVED TABLES]
- VBERROR
- VBHDR
[INPUT PARAMETERS]
- BEGIN_TIME
Begin time
- END_TIME
End time
TO_TIMESTAMP('2014/06/08 14:05:00', 'YYYY/MM/DD HH24:MI:SS') --> Set end time to
8th of June 2014, 14:05
CURRENT_TIMESTAMP --> Set end time to
current time
- APP_SERVER
- MANDT
- WP_TYPE
SAP ABAP work process type (e.g. DIA, ENQ, BTC, UPD)
- WP_ID
- CPID
1234 --> Show information for work process with client process ID
1234
-1 --> No restriction related to client process ID
- ACTION
- TABLE_NAME
- STATE
- WAITING_FOR
Wait situation
- APP_USER
Application user
- APP_SOURCE
Application source
- REQUEST_TYPE
- BATCH_JOB
- AGGREGATE_BY
- TIME_AGGREGATE_BY
- ORDER_BY
[OUTPUT PARAMETERS]
[EXAMPLE OUTPUT]
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
----------------------------
|START_TIME |APP_SERVER |MANDT|TYP|WP_ID|CPID |DB_ROWS |DB_TIME_S |
ACTION |TABLE_NAME |STATE |APP_USER |APP_SOURCE
|BATCH_JOB |WAITING_FOR
|
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
----------------------------
|2017/02/15 12:01:00|saphana0_E9A_02| 103|DIA| 33| 20032| 0| 0.00|
SELECT |LQUA | |RUPUZIDAEK |SAPML03T -> SAPLL03A
| |
|
|2017/02/15 12:01:00|saphana0_E9A_02| 103|DIA| 34| 20033| 1227| 0.27|
| | |JOBRUN |SAPMSSY1 -> SAPLVEDA
| |
|
|2017/02/15 12:01:00|saphana0_E9A_02| 103|DIA| 66| 20066| 0| 0.00|
SELECT |COST | |PUZUTTIOBA |/GLB/RGTPTR_PROCESS_ORDER_VAR ->
SAPLKARS | |
|
|2017/02/15 12:01:00|saphana0_E9A_02| 103|DIA| 77| 28920| 361| 0.51|
| |SYNC RFC |BGVASILEVA |RVV50R10C -> SAPLATPC
| |CMSEND(SAP) / 13410508 / SYNC_CPIC /
141.122.207.43|
|2017/02/15 12:01:00|saphana0_E9A_02| 103|BTC| 113| 1876| 833| 0.88|
SELECT |VBFA | |JOBRUN |/EUR/ODECSR_COD_PROCESS ->
SAPLV05C |RU_R3E_CS_R_0065295_SDBLRU3AIMSP|
|
|2017/02/15 12:01:00|saphana0_E9A_02| 103|BTC| 117| 22492| 283| 0.18|
| | |JOBRUN |SAPMV45A -> SAPLV69A
|IT_R3E_CS_R_0060246_ORDERS_E |
|
|2017/02/15 12:01:00|saphana0_E9A_02| 103|BTC| 119| 11503| 0| 0.00|
| |ABAP WAIT|NBNRA |/GLB/RGTFCR_INVOICE_JOB
|5200637291201720170215120040 |CMRCV / 77113581 / SYNC_CPIC
|
|2017/02/15 12:01:00|saphana1_E9A_02| 103|DIA| 8| 5335| 384| 0.57|
SELECT |LIKP | |BGMIHAYLAL1 |SAPMSSY1 -> SAPLV61B
| |
|
|2017/02/15 12:01:00|saphana1_E9A_02| 103|DIA| 22| 30973| 481| 0.64|
SELECT |/GLB/RGTNOSHPORD| |BGMIHAYLAL1 |SAPMSSY1 -> SAPLV61B
| |
|
|2017/02/15 12:01:00|saphana1_E9A_02| 103|DIA| 37| 30642| 0| 0.00|
SELECT |TRFCQOUT | |PUMAIZNEBA |SAPMSSY1 -> SAPLORFC
| |
|
|2017/02/15 12:01:00|saphana1_E9A_02| 103|DIA| 51| 5380| 0| 0.00|
| | |OSS_481396 |SAPMSSY1 ->
CL_SERVER_INFO================CP | |
|
|2017/02/15 12:01:00|saphana1_E9A_02| 103|DIA| 60| 30643| 1197| 0.92|
SELECT |EKBE | |DESERWEFL |RM06EL00 -> SAPLME07
| |
|
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
----------------------------
*/
START_TIME,
LPAD(NUM, 7) COUNT,
APP_SERVER,
LPAD(MANDT, 5) MANDT,
APP_USER,
REPORT_NAME,
TRANSACTION_NAME
FROM
( SELECT
CASE
WHEN BI.AGGREGATE_BY = 'NONE' OR INSTR(BI.AGGREGATE_BY, 'TIME') != 0 THEN
CASE
WHEN BI.TIME_AGGREGATE_BY LIKE 'TS%' THEN
TO_VARCHAR(ADD_SECONDS(TO_TIMESTAMP('2014/01/01 00:00:00', 'YYYY/MM/DD
HH24:MI:SS'), FLOOR(SECONDS_BETWEEN(TO_TIMESTAMP('2014/01/01 00:00:00',
'YYYY/MM/DD HH24:MI:SS'), TO_TIMESTAMP(H.VBDATE, 'YYYYMMDDHH24MISS')) /
SUBSTR(BI.TIME_AGGREGATE_BY, 3)) * SUBSTR(BI.TIME_AGGREGATE_BY, 3)), 'YYYY/MM/DD
HH24:MI:SS')
ELSE TO_VARCHAR(TO_TIMESTAMP(H.VBDATE, 'YYYYMMDDHH24MISS'),
BI.TIME_AGGREGATE_BY)
END
ELSE 'any'
END START_TIME,
CASE WHEN BI.AGGREGATE_BY = 'NONE' OR INSTR(BI.AGGREGATE_BY, 'MANDT') !=
0 THEN H.VBMANDT ELSE MAP(BI.MANDT, '%', 'any', BI.MANDT)
END MANDT,
CASE WHEN BI.AGGREGATE_BY = 'NONE' OR INSTR(BI.AGGREGATE_BY, 'APP_USER') !=
0 THEN H.VBUSR ELSE MAP(BI.APP_USER, '%', 'any', BI.APP_USER)
END APP_USER,
CASE WHEN BI.AGGREGATE_BY = 'NONE' OR INSTR(BI.AGGREGATE_BY, 'SERVER') !=
0 THEN H.VBNAME ELSE MAP(BI.APP_SERVER, '%', 'any', BI.APP_SERVER)
END APP_SERVER,
CASE WHEN BI.AGGREGATE_BY = 'NONE' OR INSTR(BI.AGGREGATE_BY, 'REPORT') !=
0 THEN H.VBREPORT ELSE MAP(BI.REPORT_NAME, '%', 'any', BI.REPORT_NAME)
END REPORT_NAME,
CASE WHEN BI.AGGREGATE_BY = 'NONE' OR INSTR(BI.AGGREGATE_BY, 'TRANSACTION') !=
0 THEN H.VBTCODE ELSE MAP(BI.TRANSACTION_NAME, '%', 'any', BI.TRANSACTION_NAME)
END TRANSACTION_NAME,
COUNT(*) NUM,
BI.ORDER_BY
FROM
( SELECT
BEGIN_TIME,
END_TIME,
MANDT,
APP_USER,
REPORT_NAME,
TRANSACTION_NAME,
APP_SERVER,
AGGREGATE_BY,
MAP(TIME_AGGREGATE_BY,
'NONE', 'YYYY/MM/DD HH24:MI:SS',
'HOUR', 'YYYY/MM/DD HH24',
'DAY', 'YYYY/MM/DD (DY)',
'HOUR_OF_DAY', 'HH24',
TIME_AGGREGATE_BY ) TIME_AGGREGATE_BY,
ORDER_BY
FROM
( SELECT /* Modification section */
TO_TIMESTAMP('1000/07/11 06:15:00', 'YYYY/MM/DD HH24:MI:SS') BEGIN_TIME,
TO_TIMESTAMP('9999/07/11 06:18:00', 'YYYY/MM/DD HH24:MI:SS') END_TIME,
'%' MANDT,
'%' APP_USER,
'%' REPORT_NAME,
'%' TRANSACTION_NAME,
'%' APP_SERVER,
'TIME' AGGREGATE_BY, /* TIME, SERVER, MANDT, APP_USER, REPORT,
TRANSACTION or comma separated combinations, NONE for no aggregation */
'DAY' TIME_AGGREGATE_BY, /* HOUR, DAY, HOUR_OF_DAY or database time
pattern, TS<seconds> for time slice, NONE for no aggregation */
'TIME' ORDER_BY /* TIME, COUNT */
FROM
DUMMY
)
) BI,
VBHDR H,
VBERROR E
WHERE
TO_TIMESTAMP(H.VBDATE, 'YYYYMMDDHH24MISS') BETWEEN BI.BEGIN_TIME AND
BI.END_TIME AND
H.VBMANDT LIKE BI.MANDT AND
H.VBUSR LIKE BI.APP_USER AND
H.VBREPORT LIKE BI.REPORT_NAME AND
H.VBTCODE LIKE BI.TRANSACTION_NAME AND
H.VBNAME LIKE BI.APP_SERVER AND
H.VBKEY = E.VBKEY
GROUP BY
CASE
WHEN BI.AGGREGATE_BY = 'NONE' OR INSTR(BI.AGGREGATE_BY, 'TIME') != 0 THEN
CASE
WHEN BI.TIME_AGGREGATE_BY LIKE 'TS%' THEN
TO_VARCHAR(ADD_SECONDS(TO_TIMESTAMP('2014/01/01 00:00:00', 'YYYY/MM/DD
HH24:MI:SS'), FLOOR(SECONDS_BETWEEN(TO_TIMESTAMP('2014/01/01 00:00:00',
'YYYY/MM/DD HH24:MI:SS'), TO_TIMESTAMP(H.VBDATE, 'YYYYMMDDHH24MISS')) /
SUBSTR(BI.TIME_AGGREGATE_BY, 3)) * SUBSTR(BI.TIME_AGGREGATE_BY, 3)), 'YYYY/MM/DD
HH24:MI:SS')
ELSE TO_VARCHAR(TO_TIMESTAMP(H.VBDATE, 'YYYYMMDDHH24MISS'),
BI.TIME_AGGREGATE_BY)
END
ELSE 'any'
END,
CASE WHEN BI.AGGREGATE_BY = 'NONE' OR INSTR(BI.AGGREGATE_BY, 'MANDT') !=
0 THEN H.VBMANDT ELSE MAP(BI.MANDT, '%', 'any', BI.MANDT)
END,
CASE WHEN BI.AGGREGATE_BY = 'NONE' OR INSTR(BI.AGGREGATE_BY, 'APP_USER') !=
0 THEN H.VBUSR ELSE MAP(BI.APP_USER, '%', 'any', BI.APP_USER)
END,
CASE WHEN BI.AGGREGATE_BY = 'NONE' OR INSTR(BI.AGGREGATE_BY, 'SERVER') !=
0 THEN H.VBNAME ELSE MAP(BI.APP_SERVER, '%', 'any', BI.APP_SERVER)
END,
CASE WHEN BI.AGGREGATE_BY = 'NONE' OR INSTR(BI.AGGREGATE_BY, 'REPORT') !=
0 THEN H.VBREPORT ELSE MAP(BI.REPORT_NAME, '%', 'any', BI.REPORT_NAME)
END,
CASE WHEN BI.AGGREGATE_BY = 'NONE' OR INSTR(BI.AGGREGATE_BY, 'TRANSACTION') !=
0 THEN H.VBTCODE ELSE MAP(BI.TRANSACTION_NAME, '%', 'any', BI.TRANSACTION_NAME)
END,
BI.ORDER_BY
)
ORDER BY
MAP(ORDER_BY, 'TIME', START_TIME) DESC,
MAP(ORDER_BY, 'COUNT', NUM) DESC