1

I got a task to debug following standard and custom function modules which is related to "Event Modules for Payment Medium Formats" I've tried different methods but nothing works..

Any solution how? I found similar task on this thread unfortunately no solution, https://answers.sap.com/questions/702358/fpy1-events-debugging.html

Thanks.

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
Christop
  • 13
  • 1
  • 3
  • Strange, but google suggested me two wikis in first place, not Q&A with abandoned threads: [1st - Debugging Of Events](https://wiki.scn.sap.com/wiki/display/BPX/DEBUGGING+OF+EVENTS), [2nd - Debugging SAP Events](http://saptechnical.com/Tutorials/Workflow/Events/Page2.htm). Did you try that? – astentx Nov 18 '20 at 11:30
  • I'm limited to scenario of DMEE Exits but I will look into that. thanks so much – Christop Nov 18 '20 at 11:47
  • so what exactly have you tried? have yo tried putting breakpoint in `FKK_PAYMEDIUM_DMEE_NNN` modules? what other steps did you try? – Suncatcher Nov 18 '20 at 14:55
  • What "different methods" did you try and why didn't they work? – Philipp Nov 18 '20 at 15:59
  • Yes tried breakpoints on FKK_PAYMEDIUM_DMEE_XXX, as well tried adding user breaks at the Exit FMs while update debugging and system debugging is on. – Christop Nov 19 '20 at 03:36
  • 1
    @astentx The problem is that there are a ton of different kinds of "events" in SAP ERP. Most sub-systems have their own event system with their own way of declaring and calling customer code. Sometimes there is more than one, and sometimes you have overlap with events of different event systems being called within a process and you can choose which one to use. Yes, it's a clusterfuck. None of the two links you found happen to be about that particular kind of event this question is about. – Philipp Nov 19 '20 at 16:27

2 Answers2

3

The FP* family of transactions (mass activities in contract accounting) do their actual work in background jobs. This makes debugging them a bit tricky, because any debugger breakpoints you set won't be triggered by background jobs.

However, there is a trick! When you enter the secret function code dbug in the command field, then those transactions will run their worker tasks in the foreground, which means that your break-points will get triggered.

enter code DBUG

Message "activity run started in debugging mode

When you then schedule the run, you will find yourself in this hard-coded breakpoint, where you can then review the breakpoints you set or set additional break- and watchpoints:

Breakpoint

When you are not sure which pay medium event function modules are actually used in your system and which events are executed by the process you are debugging, then I recommend setting a break-point in the function module FKK_PAYMENT_FORMAT_EVENT_READ. That function will be called whenever the function for a specific event and payment medium is required. The export parameter E_FNAME is the active function module. A call to that module will usually follow soon after.

Philipp
  • 67,764
  • 9
  • 118
  • 153
0

The Payment Medium files are generated via a job. For example if you run F110 with the break-point set in your Function Module exit , it will not stop. Go to SM37 and find out the program that was run (here for example F110 - proposal run). Check the variants and run the program (using se38) online. Then it will stop at the Function module exit where you set your break-point. Cheers.

Franco
  • 1