QGen > Lab: QGen > 2. Mapping Complex Screens: Parent-Child Iterations
  PPT
2. Mapping Complex Screens: Parent-Child Iterations
A common structure that is used across the QAD Enterprise Application suite is the parent-child data structure. Some good examples of these interfaces would be Purchase Order, Sales Order, and so on. When mapping a screen that has multiple iterations (repeating parent-child relationships), it is important to remember that you have to enter two lots of data into the iteration for QGen to recognize the iteration.
2.1 Map the Product Structure Maintenance Screen
This part of the exercise describes mapping a complex application screen: Product Structure Maintenance.
In the telnet session opened above, do the following:
1 Launch the Product Structure Maintenance function (13.5).
2 Press Ctrl+W to enable the QGen auto pop-up window.
3 Press Ctrl+O to access the QGen menu.
4 Select the New Run Through mode.
5 Press F1.
6 When asked if you want to reset, acknowledge the reset action.
7 Walk through the Product Structure Maintenance screen, while updating an existing entry:
a UI Field = Parent Item.
Enter 01010 and press Enter.
In the Field Info screen set the Primary Key field to Yes, and Delete Field to No.
Leave all other fields as their default values.
Press F1 to continue.
b UI Field = Component Item.
Enter 50001 and press Enter
In the Field Info screen set Primary Key to Yes, and Delete Field to No.
Leave all other fields as their default values.
c Repeat this process for the Reference and Start Effective fields, but do not enter any data-just press Enter and complete the Field Info frame using the same Primary Key and Delete Field settings as above.
d Map the remaining fields by accepting the data that is stored in the application; there is no need to change the data. Make sure that you set the Primary Key to No and the Delete Field to Yes.
8 When you are taken back to the Component Item field, press Enter again (if you do not press Enter again, QGen will not record the iteration).
9 In the Iteration Info frame set the Iteration Name to componentItem, and Action to Exit to F4.
10 Do not continue with the iteration.
11 Press F4 once to exit the componentItem iteration.
12 On the Parent Item field, remember to enter into the maintenance of the Product Structure again to ensure that QGen maps the iteration. Press Enter.
13 In the Iteration Info frame, set Iteration Name to productStructure and Action to Exit to F4.
14 Do not continue with the iteration.
Save the information recorded while mapping the Product Structure Maintenance screen:
1 Press Ctrl+W to disable the QGen automatic pop-up.
2 Press Ctrl+O to access the QGen menu.
3 Select Save and press F1.
4 When prompted for the name of the QDoc, enter maintainProductStructure.
Load the information record while mapping the Product Structure Maintenance screen:
1 Press Ctrl+O to access the QGen menu.
2 Select Load and press F1.
3 When prompted for the name of the QDoc, enter maintainProductStructure.
Generate the API files that are required by QXI:
1 Press Ctrl+O to access the QGen menu.
2 Select Generate Docs and press F1.
3 Set the following values:
 
Adapter
UI API
QDoc name
maintainProductStructure
Procedure Name
bmpsmt.p
Output To
QXI Server
Schema Standard
1.1
Schema Version
ERP3_1
4 Click the Generate Docs button and press Enter.
5 Set the following values in Connect to QXI Server screen
 
 
QXI Host
qaddemo
 
QXI Port
8080
 
QXI Webapp Name
qxi
 
SSL
no
 
Username
admin
 
Password
mfgpro
6 Press Continue.
7 Select QADEE and press Continue
8 Choose QADERP and press Continue
9 Press OK if QDoc successfully uploaded to QXI
10 Press F4 to exit the Generate Docs screen.
2.2 Verify the maintainProductStructure API has been added
To verify that the maintainGeneralizedCode API was successfully added to QXI, you need to check two places. First check that the API is available as a custom API for the QADEE application type; second, check it is a supported API on the QADERP receiver.
1 Open the QXI Web application in Internet Explorer:
http://qaddemo:8080/qxi
2 Select the Configuration tab.
3 Select the Schemas node on the menu tree.
4 Select QADEE.
The maintainProductStructure version ERP3_1 should display as the custom API that is available for the QADEE application type as shown here:
5 Select the Configuration tab.
6 Select the Receivers node on the menu tree.
7 Select QADEE.
8 Select the check box next to the QADERP receiver and click the View button.
The maintainProductStructure API version ERP3_1 should display as a supported QDoc for the receiver.
 
2.3 Test the New API
The new version of the Product Structure Maintenance API has now been successfully deployed to QXI. However, until the new version has been used to process a couple of transactions, you cannot be sure that everything has been uploaded correctly.
The best way to test a QAD QXtend API is by using soapUI to build a WSDL project, create some requests, and process those requests using soapUI.
Locate the WSDL page first.
1 Open the QXI Web application wsdl page in Internet Explorer:
http://qaddemo:8080/qxi/wsdl
2 Select QADEE from the list of modules.
3 Select receiver QADERP.
4 Click on Yes link at the right of maintainProductStructure (ERP3_1).
5 Copy the URL of the WSDL page.
Create a soapUI project using the WSDL
1 Open soapUI on the windows image; use the shortcut on the Desktop.
2 Open the Lab 05 - QGen Workspace.
3 Create a new WSDL Project.
a Right-click the workspace name.
b Select the New soapUI Project.
c Paste the URL of WSDL page to Initial WSDL.
d Set the project name to QGen 05 – Product Structure.
e Click OK to create the project.
4 Drill down to the Request 1 message created under the QGen 05 – Product Structure project.
5 Right-click Request 1 and select the Clone Request option. Enter a name for the new request.
6 Edit the new request so that it can be processed by QXI.
7 Change the SOAP header:
Set the receiver to be QADERP.
Set suppressResponseDetail to true.
8 Create the necessary session context entries:
a Create two ttContext iterations.
b Qualifier = QAD, Name = version, Value = ERP3_1.
c Qualifier = QAD, Name = domain, Value = 11CAN.
Note: If you copy and paste the empty ttContext node and blank lines are created, right-click the request and select the Format XML option. soapUI will remove any blank lines and correct the indentation of the XML.
9 Edit the application data section of the message:
a The dsProductStructure node by default will contain all the fields available when processing a Product Structure update. Only a few fields are required for a transaction to process successfully; the best way to identify the mandatory fields is to run through the UI and see which fields you have to enter data for.
b Edit the XML and create a new Product Structure QDoc that will update the end effective date of a component, use the following values:
 
 
productStructure.psPar
01010
 
componentItem.psComp
50001
 
componentItem.psend
<today> format - YYYY-MM-DD e.g. 2009-02-09
10 Process the QDoc message that you have created in the new soapUI project and verify that the Product Structure Code is updated successfully.