- April 23, 2013
- Posted by: admin
- Category: Blog
Overview
In continuation of our last week’s entry on “Getting Started with JD Edwards Interoperability”, we realize that during in live scenarios it is very necessary to step-in and actually review the actions as they happen during your table conversion in order to identify potential issues with the input data so that relevant actions can be taken against them. In this entry, we are going to be discussing some of the key areas of “Event Rules Debugger” and how to identify potential issues with your table conversion and how to take appropriate corrective actions. So let’s get started.
Note: If you haven’t read our last week’s article, do take some time to read it here.
Debugging Scenario
In this article we are going to cover a typical debugging scenario as follows
Following our last week entry “Getting Started with JD Edwards Interoperability”, we will be using a new data import set with some potential errors in our imported data set. We will identify the potential issue in our data using “Event Rules Debugger” and will go back to our “JD Edward Table Design Aid” and will make relevant corrections in our TC using the “Event Rules Design”.
Stage-1: Setting up your Table Conversion for Debugging
Prerequisite
We will be using a slightly modified data format this time with a potential issue in the ITM field (ITM field represent the Short Item Number), can you identify the error???
Also as an addition, you must have some background in debugging applications in any other development environment.
Execution
- From the Fat Client, launch the “Debug Application” which is located under “Application Development > Object Management > Debug Application”.
- The “JD Edwards Event Rules Debugger” will be launched
- (Section-A), represents the Application Window and provide all the information related to the current application being debugged.
- (Section-B), represent the main code section where your Event Rules will be displayed.
- (Section-C), represents the “Object Browser” which let you search for your objects such as “Interactive Application(APPL)”, “Batch Application(UBE)” and “Table Conversions(TC)”.
- (Section-D), represents the “Variables” window which helps you in setting up watch on the specific variables (input / output or other)
- (Section-E), represents the “Breakpoint” window which presents all the breakpoints currently activated in your selected object.
- From the “Object Browser” select the “TC” tab and search for your table conversion. Double click to select it. It will be automatically added in the “Application” window.
- From “Application” window, open your table conversion and select the “Format Fetched” event. Your main code section will be filled with Event Rules code that you setup from the last week exercise.
- From the main code section, click on the line that says
OC EdiSuccessfullyProcess(F41010Z1)(EDSP) = “N”
and then right-click and select “Insert Breakpoint”. You will observe a “red” mark will appear on the left hand side of the line. A breakpoint indicates that your code will be stopped on this line so that you can analyze the imported data behavior. Also observe that the breakpoint is now added in the “Breakpoints” window as well. - From the “Variables” window, add the following variables by double clicking from the left hand tree grid
- Under Input Columns “IC TextLine1.ITM”
- Under Output Columns “OC F4101Z1.ITM”
- You are all done at this point, lets move to Stage-2.
Stage-2: Debugging your Table Conversion
Prerequisite
You should have followed all the steps from Stage-1 and have setup your debugging environment. Now you are ready to actually launch and debug your table conversion.
Execution
- At this point, you need to execute your table conversion once again.
- Follow the steps from our last week article (here) , for Stage-1 (Steps 13 – 16) in order to execute your table conversion.
- In a moment, the “JDE Event Rules Debugger” will be given focused by JD Edwards and your Table conversion will be stopped on the line, that you placed with the breakpoint.
- Press either (F10) or from “Debug” menu select “Step Over”.
- You will now move to the next line of execution.
- Press F10 again and you will reach on the following lineOC IdentifierShortItem(F4101Z1)(ITM) = IC ITM(TextLine1)
- At this point, from the “Variables” window you can review the variables you set for watch in the previous stage and you can spot the problem.
Yes, the ITM entry from input file has blank spaces prepend to the actual ITM entry.
- At this point, you can press the F5 key or from “Debug” menu select the “Go” entry(**).
- Now let’s head out back and figure out how to resolve this problem.
**Note: After Step-8, you might need to delete these added entries from the F4101Z1 table for the later final execution.
Stage-3: Modifying your Table Conversion for corrections
Prerequisite
Now that we have identified the issue, we now need to head back and modify our Table Conversion. At this point, you need to open your table conversion for modification
Execution
- From the Object Management Workbench (OMW) select the your Table Conversion and open it in “Design” mode.
- On the “Batch Application Design” screen, switch to “Design Tools” tab and press the “Start Table Design Aid” button. This will launch the “Table Conversion Director”. At this point you will be taken directly to the “Table Conversion – Mapping” screen.
- Select “TextLine1 Format Fetched” from the “Events” drop down.
- Press the “Advanced ER” button. This will launch the “Event Rules Design” window.
- Select the following line, and Double Click to open it,
OC IdentifierShortItem(F4101Z1)(ITM) = IC ITM(TextLine1)
your expression will be open in “Expression Manager”. - Press the “f(x)” button that is located on the top right hand side. This will open an Advanced mode where you can add/edit the expression with advanced functions and expressions.
- Under the “Advanced Functions” list , open the “Text Functions” category and double click on the following entry
ltrim(,)
Note: If you have worked with any programming language before (such as Java / C# / VB) you can easily recognize the ltrim function which allows you to remove the leading characters from any given string. - In the first parameter to this function, select the “IC ITM(TextLine1)” under the “Available Information” list, and for the second parameter type in “ “ (double quotes with a single space). Your entry should look like this
- Press OK, here and now your Event Rules screen will look like
- Save your entry and save your Table Conversion.
- At this point you can now relaunch your Table Conversion and ITM entries will be imported properly.
Finale
With the assistance of ERD (Event Rules Debugger) , you can pin point the exact cause of your applications whether it is a batch application or a table conversion. I hope you have enjoyed this entry, don’t forget to post your feedback here or on our twitter account @ephlux. Thanks for your time.
2 Comments
Comments are closed.
Nice article, one question though, for UBE that are using C business functions, how will it react if i select the “Step-in” mode.
Thanks for the article again.
P.S i would request a video training for such complicated situations.
-Ray
Hi Ray , thanks for your response. Yes in such cases, you should have Visual Studio installed on the target machine.
For the video part , yes please stay tuned and we will be publishing these very soon.
Saad Faisal