Posts

Showing posts with the label HANA SQL

SM37: Checking a Monthly Batch Job (Selection, Job Log, Periodic Runs, Background-Only Variants)

How to check in SM37 whether a monthly batch job finished correctly: the selection screen, the numbers and buttons on the job overview, how to read the job log, how a periodic job creates its next run, background-only variants that do not appear on the selection screen, and DB02 SQL for checking. Note: screens, menus and settings can differ by SAP release and system configuration. Screen labels are given with their English GUI names. SQL results are from a demo system. 1. SM37 selection screen (Simple Job Selection) Field Example Meaning Job name part of the name + * * means "any characters". If you know only part of the name, put * before and after it User name * The default is your own user ID. Jobs created by other users appear only after you change it to * Job status all except Sched. Released (waiting), Ready, Active (running), Finished (completed), Canceled (stopped with an error) Job start condition today to t...

CO-PA characteristics and value fields by operating concern: HANA SQL in DB02/ST04 (TKEFE/TKEF/TKEB)

Which characteristics and value fields are assigned to an operating concern — read from TKEFE and TKEF instead of clicking through KEA0. HANA SQL for DB02/ST04 → SQL Editor. Verified on the EWM system (client 700, operating concerns OC10–OC40) on 2026-08-28. 0. Before you start — the operating concerns on the system (TKEB) Case List of operating concerns (TKEB) What it does TKEB is the client-dependent operating concern table. Currency (WAERS), fiscal year variant (PERIV) and creation date (CREDA) come with it. Watch out TKEB has MANDT — a client condition is required in the WHERE clause. Result 10 rows — OC10 / OC20 / OC30 / OC40 (KRW, created in 2026) plus the standard samples 1010 (empty entry), E_B1, S001, S_AL, S_CP, S_GO SELECT ERKRS, WAERS, PERIV, CREDA FROM TKEB WHERE MANDT = '700' ORDER BY ERKRS; 1. Characteristics and value fields (TKEFE × TKEF) Case Characteristics and value fields per operating concern (TKEFE × TKEF) What it does TKEFE lists the fields ...

CO-PA transfer structure (KEI1) in HANA SQL and ABAP SQL: TKB9C/TKB9G/TKB9F, plus cost element group expansion

The PA transfer structure (KEI1) — its assignment lines, the source cost elements and the value field assignments — read straight from the tables. HANA SQL for DB02/ST04 → SQL Editor. Sections 1–2 were verified on the EWM system (client 700, transfer structure FI, controlling area CA10) on 2026-08-28. Sections 3–5 were added on 2026-08-31 and verified on an S/4HANA sandbox (client 100, transfer structure FI, controlling area 0001). 1. Assignment lines (TKB9C × TKB9D) Case Assignment lines of a transfer structure (TKB9C × TKB9D) What it does TKB9C holds the assignment lines (ERZUO), TKB9D the line texts. FAKMG = 'X' corresponds to the Qty billed/delivered checkbox in KEI1. The output is the left-hand list of the KEI1 screen. Watch out The transfer structure header is TKB9A and its text is TKB9B. All TKB9* tables are client-dependent (they have MANDT). Result 3 rows — 010 Salary, 020 Depreciation, 030 IO Salary (same as the KEI1 screen) SELECT c.ERSCH, c.ERZUO, d.ZTEXT, c.F...

Cost centers by controlling area with every CSKS/CSKT column: HANA SQL in DB02/ST04 (S/4HANA and ECC versions)

Give it a controlling area (KOKRS) and it returns every cost center underneath with all CSKS columns, plus the names from CSKT. Plain HANA SQL for DB02/ST04 → Diagnostics → SQL Editor; an S/4HANA version and an ECC version are both included. Verified on an S/4HANA sandbox: controlling area JNC2 (JNC #2 Controlling Area), client 100. Written 2026-08-31. 1. Result — 5 cost centers in JNC2 Case Cost centers under controlling area JNC2 (output of the query in section 6) What it does The five cost centers of JNC2 with the CSKT name, category, functional area and standard hierarchy node. The full query returns all 84 CSKS columns; the grid below shows the columns that carry the meaning. Result 5 rows Result — 5 rows (KOKRS = JNC2) KOSTL | KTEXT (CSKT) | KOSAR | FUNC_AREA | KHINR (std hierarchy node) ---------+------------------------+-------+----------------------+--------------------------- JNC21010 | SG&A | 2 | JNCS (SG&A) ...