Pass a variable from BSFN to BSFN

FrankCLT

Well Known Member
Hello,

Have a dilemma, normally i could have simply done this with a DS field in the BSFN's, but the BSFN's are numerous layers deep from one another. I have seen pointers used for things similar but I haven't used them. Can someone give me some ideas of how to accomplish a seemingly easy task but very difficult to a novice.....


Thanks in advance...

FrankCLT
 
Can you give a little more specifics? Are they all custom BSFNs? Are any BSFNs and/or DSTRs pristine? What are you trying to pass?
 
That you for the response.....I am experimenting with a DSI BSFN ND3N4210 creating sales orders. I am passing through this DSI Function the user reserved reference field URAT. The order creates perfectly, I see all the data in the F4211 with the exception of the SDURAT.

Upon running all functions through debug.(Visual Studio C++), in B4200310 I see in the function ---- > F4211FSEditLinePreProcess ---- > Main Processing ----> MathCopy(&dsF42UI12.zdurat, &lpDS->mnUserReservedAmount); I do see the value passed in through the initial call.

Further in the B4200310 ---- > Function I4200310_LoadF4211ParmsForED ---- > Main Processing ---- > Load From F42UI12 ---- > MathCopy(&lpdsF4211->sdurat, &lpdsF42UI12.zdurat); the value in &lpdsF42UI12.zdurat is 0. I need the value in &lpDS->mnUserReservedAmount.

Thanks again,
FrankCLT
 
Frank,

you didn't tell us your release version but in some older versions the User Reserved fields handling in the Master BSFNs were disabled / commented out and I had to remove the commenting and/or add a little code.
 
Of course.....9.0 (TR 9.1.4)

In short....i need to pass\store a value in the B4200310 - F4211FSEditLinePreProcess and have access to it in I4200310_LoadF4211ParmsForED


Thanks,
FrankCLT
 
Last edited:
Depending on what you need it for in I4200310_LoadF4211ParmsForED, could you not just use the URAT value afterwards in ND3N4210 and bypass I4200310_LoadF4211ParmsForED.

So go back in and do a normal I/O update after the EndDoc has run in ND3N4210?
 
So if URAT is in the BSFN(s) data structs and you can see it passed all the way through to F4211FSEditLinePreProcess, then as Larry suggested you will probably have to mod some code in B4200310/B4200311 to get it to use the passed value.
 
Its so confusing, I'm not sure how to accomplish this......

If i create an order through the standard SOE P42101 and use the MVC model, it works fine...SDURAT is passed back and forth with no issues. Using the DSI function ND3N4210 which uses the more traditional BeginDoc, PreProcess and EditLine, values are not moving back and forth.......
 
Last edited:
Lets forget about SDURAT\ZDURAT\mnUserReservedAmount.... lets say in my example i create a Data Structure in B4200310 and have its value be available after the call to B4200311...


So in B4200310 i would have a DS with a single value, the call would take place to the B4200311 and upon the return to B4200310 i would still have access to the originally set DS value. Can this even be done the way I've explained?


FrankCLT
 
If it works in P42101 then the issue may not be with B4200310/311. You might want to try both processes and look at the debug log and see where they differ and that might give you some clues. I would start with the calls to F4211FSEditLine and F4211FSEditLinePreProcess.
 
I can actually step through the code in real time and see all values being passed for both the B4200310 and B4200311. I can see the value passed in the B4200310 for URAT, the issue is that when the B4200311 executes it populates a 0 to the URAT. This is the code from the B4200311 "MathCopy(&lpdsF42UI12->zdurat,&lpds4200310B->mnUserReservedAmount);".


The &lpds4200310B->mnUserReservedAmount has a 0, so now I've just moved a 0 the &lpdsF42UI12->zdurat


When execution returns to the B4200310 MathCopy(&lpdsF4211->sdurat, &lpdsF42UI12->zdurat); since B4200311 moved a 0 to &lpdsF42UI12->zdurat, I am now writing a 0 to the F4211.


I can see all of the above transpire as i run through debug.


If any of you have DSI\Patwel DataBrowser, we can replicate this process pretty easily.
 
You still haven't told us your JDE version. Like I said before, in some earlier versions if you wanted to use the user reserved fields in F4211 you had to di some work in the BSFNs.
 
Not sure if you missed my post above?
If URAT is not needed in a calculation anywhere and is only there just to stamp the F4211 for later use, then just update it afterwards.

I use DC Link and have the same issue, this is what I do....unless it's needed inside the calls for a decision somewhere
 
There is a function called F4211PostEditLine which you can call after edit line to populate the used defined columns in the cache/work table. Might be easier.

Craig
 
I have figured out another way of doing what I required. I think the user reserved BSFN will work but i took a different approach. I probably should have asked my question a different way.

My question should have been asked more to the matter of simply -- how would i pass a value(s) to and from a Internal or if appropriate and external Function Prototype? Doesn't need to be a User Reserved field but this could have been any value i would have needed in a particular Function Prototype.


Thank you ALL for the assistance in my quest for knowledge....
FrankCLT
 
Back
Top