P0911 Modification

AlexRO

AlexRO

Well Known Member
Hello all,

I have done some modification to the P0911 - Journal Entry program. Actually I have cloned it to PQ480911. I have modified some grid columns, and it works properly. No I figured out that i need to update a column in the F0911 table based on the logic in these columns. I have tried to use table IO but with no luck, so i thought that I should modify the business view used by the grid !
crazy.gif
. I have cloned the original BV and added the column for which I want the logic to be done. After I add the BV I get lots of ER validation errors. Most of them i have sorted, because they have occurred because the change of the BV invalidated some assignments. Now i get some errors regarding ER's but i don't know where to look for them to correct.

[ QUOTE ]

CER ERROR #3003 : Unable to assign to data structure */
Function Name: PQ480911_WQ480911A_2_1563
Function Description: ER for WQ480911A_2_1563
Form: WQ480911A - Journal Entry
Control: 2 -
Event: 1563 - Post Button Clicked
Seq #: 163
Line #: 157
Line Text: Start Process(JDEBCHAPPR, <Mapped>, <Mapped>)

[/ QUOTE ]

This is one of the errors I get. As you can see the Control has only a number and no name. I don't know where to look for it to view the error and correct it. Does anyone have any advice for me?

Thanx in advance,
Alex.
 
dump the ER to text file, and then look for the text "Start Process". double click the ER line, and open the 2nd parameter. there you will find BC-values mapped. i'm guessing you didn't "update" those yet.
 
As a rule of thumb Alex, after you modify the form's BSVW, you need to validate ALL the ER lines of that form:p
By the way, I found only two instances of "Start Process" in my release's P0911 ER. One is in the OK Post Button Pressed, the other is in the Close/Cancel Post Button Pressed.
Good luck,
 
Hello guys,

I have found the ER's which where giving me erros. They where in the menu in the ok button.
blush.gif
I have passed the problem. But i still can not update the collumns in the f0911 table. Any suggestions?

Thanx,
Alex.
 
in w0911a, standard updates and adds are suppressed, so that might explain why the column you added is not automatically updated to the table. mbfs are used instead. dunno which column you added, but check if F0911 Edit Line has a parameter corresponding with that column. if yes, try mapping it.
 
Hello remo,

I have found out this, and no the column which I want is not in the business function F0911 Edit Line. What can I do in this case? Does it mean I have to rewrite the business function. I have thought that I could write an UBE to be processed after the app is closed but how can i pass the parameters to it for each line of the document? Can i do this with table IO? I have tried to and did not succeed.

Regards,
Alex.
 
Alex,

another approach you should consider is just modifying the existing BSVW to include the field(s) you needed.

Modifying a Business View is probably the safest customization you can do in JDE as long as you're just adding fields from existing tables in the view. As long as you mark this BSVW for Spec Merge your changes will also safely survive ESUs and Updates.

Going this approach you'll avoid the nightmare you're currently in, which in my opinion is far more risky than just adding a field to the view.

My Humble Opinion,
 
larry: true in "normal" circumstances, but in this case, like i said: standard businessview updates and adds are suppressed.
alex: if the field you want is not in the edit line datastructure, then modifying edit line itself is not gonna help you (since you do not want to modify standard datastructures of standard functions). looks like you'll have to manually update the table after end doc has finished. search for posts that discuss this kind of topics. the ones that talk of making the calls to end doc and such synchronous (if not already), etc. i believe there was one recently about w4210a.
 
Hy remo and larry,

I'm a little confused. You are saying that i should modify End Doc function? or add some logic in the ER where End doc is called (in form of Table IO) ? If the case is 2'' then i would want to ask you how do I do that, because this is the first thing that crossed my mind. I did put f0911.update every where i could think of. The result in the log was 0 columns updated.

I appreciate your help very much. Hope you can guide me to the answer of my problem.

Thanx,
Alex.
 
Hello all,

I have done it finally. I want to share the knowledge I have acquired for all that will want to make modifications to the P0911 app.

I have added a new column in the Grid and wanted to update the DB with that column. Because the DB operations are suppressed in the grid control and the all the IO operations are done through MBF's the update of the F0911 table should be done manually. Thanx to remo I have realized that. Now the IO operations should be done after the End Document function is called. It is called in the Post Button pressed event of the OK Hyper item. If you put the IO in that event you will not get the table updated because the data is not yet committed. I have found this out through trial and error.

I have put the ER which update the F0911 in the "Clear Screen Before Add" event of the Journal Entry Form so I could have access to the Grid records, because after the add the grid is cleard for the next JE. Now I have the column updated an with no major modification in the BFNs or the data structures, so I think this is quite good.

Thank you all for your help.

Alex.
 
no problem. not quite sure though if clr scr b4 add is the event you want to put your table i/o in. note that clr scr b4 add is not only triggered after ok button processing has finished, but also for example when entering a form in add mode. i wonder though why you couldnt get it to work in OK - Post Button Clicked. are you sure you put it AFTER the End Doc? and also: note that there are several calls to end doc in OK - post button clicked of w0911a, one of which is *asynch*. i'm guessing that's the one that is called in your case. you'll need to change it to synch. for more details, see the post(s) i mentioned earlier.
 
Hello,

Yes I know that is called also when the the form is entering in add mode, I have took care of that, and I have changed the BFN to sync with no luck in updating the table. If it's working now I have no problem with it. I'm moving on with my development.

Thanx again.
 
Hi Alex,

The solution for your issue had been discussed several time - I also post it more time.
Sorry, I an currently hurry, so please, search the archives of JDEList.

Other keywords for your screnario "Transaction Processing", "Include Transaction". If EndDoc is called with Include Transaction option, then your table i/o wil be out of transaction scope, so it will fail. Open the table with Inlcide Transaction advanced option, perform table i/o, close the table.

Regards,

Zoltán
 
Hey Zoltan,

I will check my transaction options to see if this is the case. I'm quite sure I have done it before, but I will give it one more try.

Thanx.
 
when i said "for more details, see the post(s) i mentioned earlier", i was actually thinking of writing: "for more details, see the post(s) i mentioned earlier, especially the ones by zoltan"
cool.gif
i kid you not.
 
Back
Top