Update F4942.URRF with F4201.URRF

  • Thread starter Adrian_Chimirel
  • Start date
Remo, your solution is not only reliable, but it is incredible easy to implement as well
cool.gif

It required only two minutes, really, and it works like a charm, on both scenarios - new order & new line to an existing order.
Thank YOU!
 
You're welcome. Where do I send the bill?
cool.gif


On a serious note again: Like I said: Analysing jdedebug logs is a good way to approach tasks like this.
 
We accept only brand new Canadian bills
blush.gif
I guess I have to take you out, say, in Boca Raton?
What tool have you used to browse and, most important, identify the BSFNs flow in the debuglog?
Thank you,
 
As for how to identify the flows: If I find the time, I can put together a small "how-to" document if you're interested. Let me know.
 
Of course I am interested! And I bet you I am not the only one
grin.gif

Thank you,
 
Okay, here goes:

I've taken your "P4210 Enter SO w 3 lines" log as an example.

Using a text editor (Notepad will do in most cases), do the following:

1. Find the F4942 Insert statements in your log, by searching for "INSERT INTO:" until you hit F4942 (I left out the table name in my search on purpose; That way I will get an idea in what order records in the involved tables are created).

In this case, there are three F4942 Insert statements. Go to the 1st one of them:

INSERT INTO JDE_DEVELOPMENT.TESTDTA.F4942 VALUES (...)

(Note that when you searched for it, scrolling down the log, you saw that 3xF4211 and 1xF4201 were inserted before F4942 are inserted)

2. Now from this point, scroll UPWARDS until the first "*** Start dumping data structure for business function (...)" you come across. This can either be *entering* a function, or *exiting* a function. You will see a BSFN-level associated with it. In this case, it is the *exiting* of a function (DecimalsTriggerGetbyCOCRCD in this case), and it has "(BSFNLevel = 4)" associated to it. Now what this tells you, is that the F4942.Insert is also taking place at Level 4 (The calling applicaton -P4210 in this case- being Level 0). Had the first "*** Start dumping data structure for business function (...)" you come across been *entering* a function at Level 4, then the F4942.Insert would have been taking place at level 5. Are you still with me? Ok, let's continue then...

3. So we have established our F4942.Insert is taking place at Level 4. Now let's work our way back (or rather: up) until Level 0 (which in this case is P4210). That will give us the bsfn-flow. We do this as follows:
- From the point where you found "*** Start dumping data structure for business function DecimalsTriggerGetbyCOCRCD (...)", bring up the Find-thingy and copy&paste the "(BSFNLevel = 4)" part into the "Find what:" field;
- In the "Find what:" field, change the "4" into a "3", and search UPWARDS once. In this case, it will lead to "Calling Business function WriteShipmentDetail from UNKNOWN for ADCHIMIREL. Application Name [P4210], Version [ERCO0001] (BSFNLevel = 3)";
- In the "Find what:" field, change the "3" into a "2" and again search upwards once. In this case, it will lead to "Calling Business function F4215EndDoc from UNKNOWN for ADCHIMIREL. Application Name [P4210], Version [ERCO0001] (BSFNLevel = 2)";
- In the "Find what:" field, change the "2" into a "1" and again search upwards once. In this case, it will lead to EditSystemExistenceF99410. Now this is a bit tricky, because this is NOT the function that calls F4215EndDoc. I believe this has to do with asynch bsfn calls resulting in multiple parallel threads. This is were your basic knowledge of JDE bsfn-flows comes in handy: You probably know that F5215EndDoc is called from F4211FSEndDoc (And if you didn't, you will now :)).

If you keep searching up, you will hit "Calling Business function F4211FSEndDoc from UNKNOWN for ADCHIMIREL. Application Name [P4210], Version [ERCO0001] (BSFNLevel = 1)" at one point. That's the one.

4. Congrats, you have found the bsfn-flow! :) Which in this case is:

Lvl0:p4210->
Lvl1:F4211FSEndDoc->
Lvl2:F4215EndDoc->
Lvl3:WriteShipmentDetail(N4900030)->
Lvl4:F4942.Insert.

Now, another important thing to notice in your case, is that the F4201 is written BEFORE F4942 is written. As you already saw in step 1, F4201 is inserted before F4942. In fact, F4215EndDoc (which eventually calls N4900030) is called AFTER F4201 is inserted. So based on all this, I concluded that you can put your logic in N4900030, and that you can safely do a Fetch from F4201 within this NER.


I hope all this is making some sense. It is imo a pretty simple yet powerful technique. It has helped me out many a time. This 'technique' also works for table updates, or any other interesting stuff you wanna analyse, e.g.: How (via which flow) is a certain error set, a certain function called, etc.

If you have any questions on this, just holler.

As an exercise, you can analyse your other log (P4210 Add 3rd line to SO) yourself. You'll find that the flow is pretty much the same (But without the F4201.Insert of course).
 
Holly Molly Remo, you are The Best Teacher I met in how to read a debug log
cool.gif

Your post belongs to the Downloads/Manuals/Tips & Tricks Wall of Fame
grin.gif
... I mean forum.

AND now it all starts to make sense: using John Oliver's Log Workbench 2.1.0 took me one minute to determine the BSFN calling the Insert Into F4942 (searched and found), then right click on the line and -> Go To Line BsFn Tree and TaDDAA!

Thank you very much,
 
You're welcome. When you get the hang of it, determining a flow like this takes about 5 minutes. PS Not familiar with the tool you mention I think. Doesn't ring a bell.
 
You can download the demo. I had it, but I did not know how the debug log gets populated = I was missing the "BSFN Level" concept.
Your post linked the dots for me, making the tool extremely useful = no need to browse the log up to follow the Levels anymore (just right-click the "INSERT..." line).
PS The tool does many more things, providing warning/error/performance info ...
 
Back
Top