Skip to content
Demo project — fictitious code, with the engine’s reading on every stage and no model drafts or test runs. Nothing you do here is saved. A demo run is never signed. No signed run, no audit pack and no export comes out of this screen — a signature says a named account analysed a named source, and none of that happened here.Nothing here counts against your five free analyses: the demo is the same for every account, and what you change lives in this browser only.Try an example or your own code
Back to project workspace
DemoRead from the code

Demo · Z_MM_PO_APPROVAL — Documentation

A process description and 11 handbook chapters read from the code, 28 objects and 20 tables inventoried. The business layer comes from a model in a real run.

Process description

Written from the code when the stage opens, no model call. A project exports the same document; its appendix stands at the foot of this page. The demo exports nothing.

In short

Reconstructed· from the code

What it does

  • Creates purchase orders and starts workflows in SAP, reading purchase requisitions (EBAN) and suppliers (LFA1), selected by purchase requisition number.Source line 475Source line 421
  • It creates purchase orders (BAPI_PO_CREATE1) and starts workflows (SAP_WAPI_CREATE_EVENT) and changes purchase requisitions (EBAN) and two custom tables (ZMM_PO_APPR, ZMM_PO_ATTACH) in SAP.Source line 421Source line 475+2
  • It reads purchase requisitions (EBAN), suppliers (LFA1), supplier purchasing data (LFM1), cost centers (CSKS), 5 more tables, tables ZMM_VEND_BLOCK, ZMM_DEPT_HEAD and ZMM_NOTIFY_CFG and a file the user uploads from the PC.Source line 61Source line 154+2
  • The result is a list on screen.Source line 542
  • A user starts it from a selection screen with 4 inputs; it runs in the user's session.Source line 36Source line 129
  • 12 business rules are fixed in the code.

What it does not do

  • It calls no other system: no call names a DESTINATION.

Limits of this reading

  • Supplier master data (LFA1, LFM1), cost center master data (CSKS) and material master data (MARC) are read as they are stored when it runs, not as they were on an earlier date.Source line 154Source line 161+1
  • 1 place names its target only at run time; what it reaches is not determined.Not determined
  • Why the program exists is not written in its code: this says what it does, not what it is for in your company.Not determined
  • A line reference shows where a statement comes from in the code. It does not show that the business has confirmed it.

Owner and approval

  • Process owner: Not determined — the code names no owner, and none is recorded here.Not determined
  • Business approval: Not recorded — reconstructed from the code, not confirmed by the business.Not determined

Questions a reader asks

  • Why is an item missing? — It selects by purchase requisition number. The checks that skip a record are listed with their condition and line.
  • Why is a value unknown? — The business rules fixed in the code set the values; each says when it applies, and what happens when none does.
  • Why is there no proposal or result? — The cases that end the run or skip a record, each with the message the user sees.
  • What changes in S/4HANA? — Today it creates purchase orders (BAPI_PO_CREATE1) and starts workflows (SAP_WAPI_CREATE_EVENT) and changes purchase requisitions (EBAN) and two custom tables (ZMM_PO_APPR, ZMM_PO_ATTACH) in SAP. The move itself is decided in Design and Management, with the open questions.

Process description · At a glance

Reconstructed· from the code

Demo · Emergency purchase approval — Z_MM_PO_APPROVAL

Z_MM_PO_APPROVAL.abap · 552 lines

Creates purchase orders and starts workflows in SAP, reading purchase requisitions and suppliers, selected by purchase requisition number.

The result is a list on screen.

Started by: A user starts it from a selection screen with 4 inputs; it runs in the user's session. Who carries out the steps is not provable from the code.

Rules and risks to know

  • Business rule BR-009 Deviation percent above 5 → runs “Hold for buyer” and ends “Check price”. Source line 315Source lines 316 to 317
  • Business rule BR-010 Emergency set and amount at most 50000.00 → runs “Find department head” and “Request approval”. Source lines 325 to 327
  • Business rule BR-004 Currency other than EUR → runs “Convert to EUR”. Source lines 69 to 70
  • Changes SAP data directly: the purchase requisition. EBANSource line 240
  • 5 values are fixed in the code, not in customizing. BR-001, BR-002, BR-003 +1Source line 17Source line 18+1

What this covers

  • The process in Z_MM_PO_APPROVAL.abap: 11 steps, 17 decision points, 21 rules. Source lines 1 to 552
  • An authorization check limits who can complete it. M_BANF_EKGSource lines 116 to 118

What it leaves out

  • Settings and master data in 3 custom tables it only reads. ZMM_VEND_BLOCK, ZMM_DEPT_HEAD, ZMM_NOTIFY_CFGSource line 222+2
  • Jobs, variants and schedules that start it, and manual steps around a run.
  • What the 6 SAP functions and transactions it calls do inside SAP. GUI_UPLOAD, CONVERT_TO_LOCAL_CURRENCY, SAP_WAPI_CREATE_EVENT +3Source lines 129 to 140+3
  • 2 includes whose source was not uploaded. Z_MM_PO_NOTIFY, Z_MM_PO_LOGSource line 363+1

Reconstructed from the code by the Clean-Core.io engine. Line references (L…) point at the source. What the code cannot answer is asked once, in the open questions. Text marked "Model proposal" was written by a language model.

1. How the process works

11 steps on the main path; 3 decision points between them can end the run. A run starts from a selection screen with 4 inputs.

How a run starts

  • A user starts the report Z_MM_PO_APPROVAL and fills in its selection screen (4 fields); it can also run as a background job with a variant, which the code does not show. Source line 11Source line 36
  • The processing runs in START-OF-SELECTION. Source line 41

Purchase requisition number · Requisition item · File

Steps

How a run starts is read from the code; who carries out the steps is not provable from it: the steps hold no dialogue, background or update-task statement that says so.

  1. Check authority — Reads the purchase requisition; can end early.

    CHECK_AUTHORITYSource line 42Source lines 103 to 122
  2. Read requisition — Reads the purchase requisition; converts currency; can end early.

    READ_REQUISITIONSource line 43Source lines 60 to 75
  3. Check requisition — Reads the cost center and the material plant data; can end early.

    CHECK_REQUISITIONSource line 44Source lines 77 to 98
  4. Decision: Rejected? — Yes: the run ends; No: continue with “Upload attachment”

    gv_rejected = abap_falseSource line 45
  5. Upload attachment — Changes a custom table; reads a file from the user's PC; can end early.

    UPLOAD_ATTACHMENTSource line 46Source lines 124 to 146
  6. Read vendor — Reads the supplier and the supplier purchasing data; can end early.

    READ_VENDORSource line 47Source lines 151 to 167
  7. Check vendor — Reads a custom table.

    CHECK_VENDORSource line 48Source lines 219 to 228
  8. Decision: Rejected? — Yes: the run ends; No: continue with “Read info record”

    gv_rejected = abap_falseSource line 49
  9. Read info record — Reads the purchasing info record and the info record purchasing data; can end early.

    READ_INFO_RECORDSource line 50Source lines 250 to 269
  10. Check price

    CHECK_PRICESource line 51Source lines 303 to 319
  11. Decision: On hold? — Yes: the run ends; No: continue with “Decide approval”

    gv_on_hold = abap_falseSource line 52
  12. Decide approval — Reads the release strategy and 2 more tables; changes a custom table; starts workflow; calls 2 more SAP functions.

    DECIDE_APPROVALSource line 53Source lines 324 to 340
  13. Notify requester — Reads a custom table; can end early.

    NOTIFY_REQUESTERSource line 54Source lines 379 to 395
  14. Write result list

    WRITE_RESULT_LISTSource line 55Source lines 540 to 552

2. Business rules and decision points

21 rules: 9 business rules, 7 decision points, 5 fixed values.

Business rules and decision points
BR-009WhenDeviation percent above 5ThenRuns “Hold for buyer” and ends “Check price”StepCheck priceSourceSource line 315Source lines 316 to 317
BR-010WhenEmergency set and amount at most 50000.00ThenRuns “Find department head” and “Request approval”StepDecide approvalSourceSource lines 325 to 327
BR-004WhenCurrency other than EURThenRuns “Convert to EUR”StepRead requisitionSourceSource lines 69 to 70
BR-005WhenMRP controller EMG or tracking number EMERG*ThenHandled separately in “Read requisition”StepRead requisitionSourceSource lines 72 to 73
BR-006WhenPlant 1000ThenHandled separately in “Check requisition”StepCheck requisitionSourceSource lines 95 to 96
BR-008WhenMmsta 01 or Z9ThenRuns “Reject”StepCheck material statusSourceSource lines 277 to 278

3. Exceptions

3 cases stop the run with an error; 3 warn and continue; 13 end a step or the run early.

Exceptions
No purchase requisition foundStepRead requisitionThe user sees“Purchase requisition not found …”ResultRun stops (error)SourceE001 · ZMM_POSource line 65Source line 66
No purchase requisition foundStepCheck authorityThe user sees“Purchase requisition not found …”ResultRun stops (error)SourceE001 · ZMM_POSource line 109Source line 110
No authorization for purchasing group …StepCheck authorityThe user sees“No authorization for purchasing group …”ResultRun stops (error)SourceE002 · ZMM_POSource line 120
Attachment could not be readStepUpload attachmentThe user sees“Attachment could not be read …”ResultWarning; run continuesSourceW003 · ZMM_POSource lines 129 to 140Source line 142
No exchange rate for …StepConvert to EURThe user sees“No exchange rate for …”ResultWarning; run continuesSourceW004 · ZMM_POSource line 187
Notification failedStepNotify requesterThe user sees“Notification failed for …”ResultWarning; run continuesSourceW007 · ZMM_POSource lines 386 to 391Source line 393Open question: Name the call target

4. What it changes and produces

8 effects on data and documents, the weightiest first.

What it changes and produces
Creates a documentWhatCreates the purchase orderSourceBAPI_PO_CREATE1Source lines 475 to 484
Creates a document (batch input)WhatCreates the purchase order by simulated entry through a transaction (batch input)SourceME21N, MEPO_TOPLINE-SUPERFIELDSource line 508Source line 515Source lines 515 to 518
Starts a workflowWhatStarts the workflowSourceSAP_WAPI_CREATE_EVENTSource lines 421 to 427
Changes dataWhatCreates an entry in a custom tableSourceZMM_PO_APPRSource line 353
Changes dataWhatCreates an entry in a custom tableSourceZMM_PO_ATTACHSource lines 531 to 534

5. Systems and data

It reads 12 tables; calls 7 functions by name; holds 4 controls.

Data it reads

12 tables read; which rows each read takes, as the code filters them.

Purchase requisition · Supplier · Supplier purchasing data

Amount · Reference price · Price

Integrations

7 calls to other functions: 1 file, 2 functions, 1 workflow, 2 BAPIs, 1 transaction.

  • Reads a file from the user's PC · File on the user’s PC GUI_UPLOADSource lines 129 to 140

  • Converts currency in the step “Convert to EUR”. · Function module CONVERT_TO_LOCAL_CURRENCYSource lines 173 to 183

  • Used in the step “Run a step chosen at runtime”. · Dynamic function call (name computed at run time)Source lines 386 to 391Open question: Name the call target

  • Starts the workflow · Workflow event SAP_WAPI_CREATE_EVENTSource lines 421 to 427

  • Creates the purchase order · BAPI BAPI_PO_CREATE1Source lines 475 to 484

  • Saves the changes in the step “Save the changes”. · BAPI BAPI_TRANSACTION_COMMITSource lines 490 to 492

  • Creates the purchase order by simulated entry through a transaction (batch input) · Transaction by batch input ME21NSource lines 515 to 518

Controls

4 controls in the code: authorization check, record of each case, saving changes, result check of a BAPI.

  • Authorization check. Checks the user’s authorization before it goes on.

    M_BANF_EKG · NFR-05Source lines 116 to 118Source line 119Source line 120
  • Record of each case. Keeps a record of each case in a custom table.

    NFR-04Source line 234Source line 244Source line 339+3
  • Saving changes. Saves its changes in 3 separate places in one run.

    COMMIT WORK, CALL FUNCTION BAPI_TRANSACTION_COMMITSource line 243Source line 428Source lines 490 to 492Open question: Add ATC results
  • Result check of a BAPI. Checks the result of the SAP call for errors.

    GT_RETURN · NFR-08Source lines 475 to 484Source line 486

6. Open questions

7 open questions; 3 block the decision; 0 of 5 groups closed.

  • Add the includes2ITOpen — blocks the decisionSource line 363Source line 396

    Parts of the program were not in the upload, so what they do is unknown. This project cannot take further includes, so the answer is yours to give.

  • Choose the target1ManagementOpen — blocks the decision

    No target edition is declared, so what “works on the target” means is not settled.

  • Name the call target1ITSource line 386

    What these statements call or which table they use is decided only while the program runs; the code alone cannot name it, so the answer is yours to give.

  • Add ATC results2ITSource line 173Source line 490

    Whether these function-module calls and file accesses still work on the target is not checked by this engine; your system’s ATC cloud-readiness check judges them.

  • Add usage data1IT

    Whether the program still runs is unknown until a usage export is imported. Never imported is unknown, not unused.

This reading does not cover classic list output (2 places): limits of the engine, noted here and not questions anyone can answer.

19 questions about the requirements are decisions of the requirements workspace in Design; A.4 Questions about the requirements lists them.

Business SOP and RACI

Model proposal

Who does what at each step, who is accountable, and the controls — proposed by a language model from the process documentation read from your code. The steps and their lines stay the code reading.

The demo stops where the model begins. The business SOP and RACI layer on top of this description comes out of a model call against the source in a real run. A demo makes no model call, so there is none here — and writing a convincing one by hand is the one thing this product may never do. What you see above is what the deterministic engine produced, which is the half that carries the line numbers.

Who is responsible Model proposalThe roles are a proposal for the business to confirm.

  • Responsible
  • Accountable
  • Consulted
  • Informed

A project starts from the model’s proposal; the demo calls no model. Name the roles yourself and say who does what at each step.

Explore the process

The process drawn from the code, with the chapter of each step beside it. Select a step to read its chapter.

Process as the code runs it Reconstructed· code reading

Select a step to read its chapter

Appendix: details and evidence

What the body says shorter, in the code's own words, then every process element and statement the engine read. Each sentence is printed once (22 repeats merged); nothing is left out.

Steps at a glance

Steps at a glance
1StepCheck authorityWhat it doesReads the purchase requisition; can end early.LinesSource line 42Source lines 103 to 122Details5
2StepRead requisitionWhat it doesReads the purchase requisition; converts currency; can end early.LinesSource line 43Source lines 60 to 75Details7
3StepCheck requisitionWhat it doesReads the cost center and the material plant data; can end early.LinesSource line 44Source lines 77 to 98Details13
4StepUpload attachmentWhat it doesChanges a custom table; reads a file from the user's PC; can end early.LinesSource line 46Source lines 124 to 146Details3
5StepRead vendorWhat it doesReads the supplier and the supplier purchasing data; can end early.LinesSource line 47Source lines 151 to 167Details7
6StepCheck vendorWhat it doesReads a custom table.LinesSource line 48Source lines 219 to 228Details1
7StepRead info recordWhat it doesReads the purchasing info record and the info record purchasing data; can end early.LinesSource line 50Source lines 250 to 269Details5
8StepCheck priceWhat it does—LinesSource line 51Source lines 303 to 319Details0
9StepDecide approvalWhat it doesReads the release strategy and 2 more tables; changes a custom table; starts workflow; calls 2 more SAP functions.LinesSource line 53Source lines 324 to 340Details12
10StepNotify requesterWhat it doesReads a custom table; can end early.LinesSource line 54Source lines 379 to 395Details3
11StepWrite result listWhat it does—LinesSource line 55Source lines 540 to 552Details0

Step details

  1. Reads the purchase requisition; can end early.

  2. Reads the purchase requisition; converts currency; can end early.

  3. Reads the cost center and the material plant data; can end early.

  4. Decision point “Rejected?” (the code: gv_rejected = abap_false, L45) — Yes: the run ends; No: continue with “Upload attachment”.
  5. Changes a custom table; reads a file from the user's PC; can end early.

  6. Reads the supplier and the supplier purchasing data; can end early.

  7. Reads a custom table.

  8. Decision point “Rejected?” (the code: gv_rejected = abap_false, L49) — Yes: the run ends; No: continue with “Read info record”.
  9. Reads the purchasing info record and the info record purchasing data; can end early.

  10. Decision point “On hold?” (the code: gv_on_hold = abap_false, L52) — Yes: the run ends; No: continue with “Decide approval”.
  11. Reads the release strategy and 2 more tables; changes a custom table; starts workflow; calls 2 more SAP functions.

  12. Reads a custom table; can end early.

The evidence, complete

Every process element and every statement the engine read, with its lines.

ReconstructedZ_MM_PO_APPROVAL.abap · 552 lines

Demo · Z_MM_PO_APPROVAL

Process with 41 steps and 17 decision points.

97 of 97 shapes on this map carry a line anchor — 100.0 % traceability. The map draws a small routine as one shape, so this count can differ from the number of process elements read from the code.

Not generated. No Gemini key is available for this account — neither the community key nor one of your own. Every step keeps its technical name from the code, and every line anchor is unchanged.

Read by the engine out of the whole source the signed run analysed. No language model wrote its process structure or its statements. Every statement names the lines it was read from, or says that it is not determined and why. The one exception is marked where it appears: business names and lanes from the naming stage are model proposals.

by kind: Step 24, Decision point 17, End 14, Start 11, Sub-process 10, Error boundary 8, End (early) 6, Service step 4, Message step 2, Call 1 · every one with its lines

in program order · every one with its lines

  • COMMIT WORK, does not wait — line 243
  • COMMIT WORK, does not wait — line 428
  • CALL FUNCTION BAPI_TRANSACTION_COMMIT, waits for the update — lines 490 to 492

A lane is the token the source writes, never a job title.

  • ReconstructedZ_MM_PO_APPROVALprogram — line 11
  • ReconstructedM_BANF_EKGauthority, from AUTHORITY-CHECK — lines 116 to 118

by type: Form Routine 25, Include 2, Report 1 · 0 high criticality

3 written (2 custom, 1 SAP standard), 11 read, 6 referenced · 3 high risk