Update F4942.URRF with F4201.URRF

Adrian_Chimirel

Adrian_Chimirel

Legendary Poster
I am trying to pass-in the F4201.URRF to F4942.URRF using P4210 - tried both revision forms Header & Detail with no success.
Somehow it seems my update comes BEFORE the shipment record gets created in F4942.
Also, I tried to identify the proper function from the_way_too_many_BSFNs ...
grin.gif

- B4200310 SOE MBF calls N4900010 F4215 Add Shipment Detail.
- - well, this one calls B4900130 Process Shipment ~ Cache, and N4900030 F4943 Write Shipment Pieces
... and a couple of days later ... I guess I already got lost.
Anybody familiar with the Transportation module? I do appreciate any help.
Thank you,
 
It's been a while since I've worked on Transportation. I remember I needed to populate some columns in F4941 (and F4215)... Did that by passing them to Process Shipment Header Cache (in N4900010 - F4215EditLine). I guess you can accomplish the same in F4942 by passing the values to Process Shipment Detail Cache. But.. I don't see any User Reserved fields you can map, so it looks like that's a no-go. As a last resort, you could perhaps update F4942 in F4211 End Doc, after both F4211 and the Shipment records have been created.
 
Alright Remo, we've decreased our expectations here and would be happy to "only" push the F4201.URRF to F4941.
Can you teach me how/where did you pass it to F4215EditLine, please.
Appreciating your help,
 
Hi Adrian,

Like I said: I did that by passing them to Process Shipment Header Cache (in N4900010 - F4215EditLine). But: a) Like I said: Process Shipment Header Cache (and Process Shipment Detail Cache) datastructure doesn't contain any user reserved fields. And b) in my case, I could fetch the needed values within [N4900010 - F4215EditLine] (I needed Route Code and Zone Number from Suppl. Master F0401). So like I said, I think it's easiest in your case to do it in F4211 End Doc, after all necessary table i/o has been done (Haven't analysed this, but have done similar stuff in End Doc for other tables). It's either that or code your own "parallel" custom caches - Which is way more work
tongue.gif
 
Hi Adrian,
try to code your update at ER level in the post commit event.
 
Hi Bruno, yes, some people prefer that, but I prefer to do it in the MBF. That way, it'll be in the same place as where the other table updates/inserts are done..
 
Ciao Bruno,
Can I use the SO Detail Revisions Post Commit?
 
Unfortunately, Remo, even after your not_so_helpful_for_my_ignorant_dead_brain, but definitely persistent preferred pushes, the camel would not enter the eye of a needle ... so sorry
confused.gif

In other words, I STILL cannot figure out WHERE the !%$#~@!^& MBF, EndDoc or EndOfTheWorld for what matters, should be modified
crazy.gif
 
Hi Adrian, if what I'm saying doesn't make much sense to you, then it's pretty hard to explain what I mean... The solution I mentioned consists of updating the F4942 record after it and the F4201 record have been created by the standard code. It's been a while, so I'd have to dig in myself to analyse the flows which eventually lead to the creation of F4201/F4942/etc. A simple and effective way to determine these flows is by analysing the jdedebug.log. Work your way back (or should I say: up) from where the F4201 and F4942 records are created in the process. This will help in determining where to put your logic. Hope this helps.
 
It's difficult to say where is the right place but, of course, changing the MBF is a way.
 
A. It works on SODetail Post Commit ER.
B. The SOHeader Post Commit ER doesn't validate, and it isn't executed, see below:
[ QUOTE ]
*************************
EVENT RULE VALIDATION LOG
APPL - P4210 - Sales Order Entry
Created : Wed Jul 04 16:23:10 2012
*************************
/* CER WARNING #2007 : Transaction flag is off - Post Commit will not be executed */
Function Name: P4210_W4210G_0_1590
Function Description: ER for W4210G_0_1590
Form: W4210G - Sales Order Header
Control: 0 - FORM
Event: 1590 - Post Commit

[/ QUOTE ]
C. When adding a brand new sales order, F4942 gets updated as expected.
D. However, when adding a new line to an existing order - bleah - the new F4942 record doesn't get updated
crazy.gif

E. It looks like I HAVE TO go the MBF_F4211FSEndDoc way ... yaaaaaaayyyyy ... thank you Remo
grin.gif

What's analyzing a couple of thousands of lines of code ... just a piece of C(ake), right
tongue.gif
 
Adrian, if you want, you can mail me jdedebug logs of your steps C and D, so I can have a look to refresh my memory (My current clients don't have Transportation set up, so I can't easily produce these logs myself).
 
I've had to do 'similar', and it was frustrating. Why b'Orgacle doesn't do things 'right' in the first place.

They give us an MBF to correctly update the most-used fields in a table, but fail to include ALL the columns in the tables (yes, I realize it is more work, but making MBF's right from the beginning should be the goal, right????)

Regards!

(db)
 
Sure thing Bruno, please find it attached.
Thank you,
 

Attachments

  • 177971-P4210 Rev1.zip
    382.3 KB · Views: 51
Hi Remo,
I can't find your eMail, therefore I've attached here the biggie - new SO with three lines. F4201.URRF makes it properly to all three records F4942.URRF.
Thank you very much!
 
And this post has the second attachemnt - aded a third line to an existing order. This time the third record in F4942 did NOT get the passes URRF.
Thank you all, Long Linve THE ONE and ONLY JDE List!
 
Aight, will have a look when I can make some time.

PS: Daniel: I agree.
 
Adrian, briefly looked at your logs. I hope I'm not overlooking anything, but this one seems pretty easy: In both cases, your F4942 records are written after F4211/F4201 have been written. The flow in both cases is: P4210->F4211FSEndDoc->F4215EndDoc->WriteShipmentDetail (N4900030). So try placing it in N4900030. Just before the F4942.Insert is done, you fetch F4201.URRF and pass it to the F4942.Insert statement.

Put a restriction by only doing your custom logic for certain values of BF cSourceofOrder and BF szProgramId so that it's only done when adding/updating Sales Orders. So something like:

If (Coming from P4210)
{
Custom logic (I.e.: 1. Fetch F4201.URRF; 2. Pass it to your custom F4942.Insert);
}
Else
{
Standard logic (I.e.: Just do the standard F4942.Insert);
}

(I know, checking on a BF szProgramId is not 100% guarantee, but it's better than nothing. If you wanna go all fancy, you can write a c-function in which you use jdeGetApplicationName to check for calling application, and call this function first to decide whether or not you're coming from P4210. Do a search. JDE does it in a few (not many) places).

Let us know.
 
Back
Top