3. Mapping Complex Screens: Comments
Many functions in QAD Enterprise Applications allow you to create general comments that are assigned to the data you are maintaining. The structure and UI for maintaining those comments is common to all components, and consequently require a special process when mapping a screen with QGen.
3.1 Map the Product Structure Code Maintenance Screen
This part of the exercise will focus on mapping a screen in the application that allows comments to be entered: Product Structure Code Maintenance.
In the telnet session opened above perform the following steps:
1 Launch the Product Structure Code Maintenance function (13.1).
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 code maintenance screen, while updating an existing entry:
a UI Field = BOM Code.
Enter 01010 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.
Press F1 to continue.
b UI Field = Description.
Enter 20-10000-001 and press Enter.
Keep the value and press Enter.
In the Field Info screen set Primary Key to No and Delete Field to Yes.
Leave all other fields as their default values.
Press F1 to continue.
c UI Field = Unit Of Measure.
Press Enter.
In the Field Info screen set Primary Key to No and Delete Field to Yes.
Leave all other fields as their default values.
Press F1 to continue.
d UI Field = Comments.
Enter Yes. Press Enter.
In the Field Info screen set Primary Key to No and Delete Field to Yes.
Leave all other fields as their default values.
Press F1 to continue.
8 The standard comments entry screen displays. Follow these steps to correctly map the comments (try to ensure you are adding comments to an object that does not already have comments defined):
a UI Field = Master Reference.
Press Enter.
In the Field Info screen set Primary Key to No and Delete Field to No.
Leave all other fields as their default values.
Press F1 to continue.
b UI Field = Type.
Press Enter.
In the Field Info screen set Primary Key to No and Delete Field to No.
Leave all other fields as their default values.
Press F1 to continue.
c UI Field = Language.
Press Enter.
In the Field Info screen set Primary Key to No and Delete Field to No.
Leave all other fields as their default values.
Press F1 to continue.
d UI Field = Page.
Press Enter.
In the Field Info screen set Primary Key to No and Delete Field to No.
Leave all other fields as their default values.
Press F1 to continue.
e On the comment detail entry page press F4-do not enter any comments
f UI Field - Page.
Press Enter.
In the Field Info screen set Primary Key to No and Delete Field to No.
Leave all other fields as their default values.
Press F1 to continue.
g When you are taken back to the Master Reference field, remember to press Enter again (if we do not press Enter again QGen will not record the iteration). The comments iteration are always called transComment.
In the Iteration Info frame set the following values:
Iteration Name = transComment
Action to Exit = f4.
Do not continue with the iteration.
Exit the comments screen.
h When you are taken back to the BOM Code field, remember to press Enter again (if we do not hit enter again QGen will not record the iteration).
In the Iteration Info frame set the following values:
Iteration Name = productStructureCode
Action to Exit = f4.
Do not continue with the iteration.
Press F4 once to exit the productStructureCode iteration.
Save the information recorded while mapping the Product Structure Code Maintenance screen:
1 Press Ctrl+W to disable the QGen automatic pop-up.
2 Press Ctrl+O to access the QGen menu.
3 Click Save and press F1.
4 When prompted for the name of the QDoc, enter maintainProductStructureCode.
Load the information record while mapping the Product Structure Code Maintenance screen:
1 Press Ctrl+O to access the QGen menu.
2 Click Load and press F1.
3 When prompted for the name of the QDoc, enter maintainProductStructureCode.
Generate the API files that are required by QXI:
1 Press Ctrl+O to access the QGen menu.
2 Click Generate Docs and press F1.
3 Set the following values:
|
Adapter
|
UI API
|
|
QDoc name
|
maintainProductStructureCode
|
|
Procedure Name
|
bmmamt.p
|
|
Output To
|
QXI Server
|
|
Schema Standard
|
1.1 (Press Tab to tab to the Schema Version field)
|
|
Schema Version
|
ERP3_1
|
4 Select the Generate Docs option 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.
3.2 Verify the Product Structure Code API has been added
To verify that the maintainProductStructureCode 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 maintainProductStructureCode version ERP3_1 should display as the custom API that is available for the QADEE application type.
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 maintainProductStructureCode API version ERP3_1 should display as a supported QDoc for the receiver.
3.3 Test the New API
The new version of the Product Structure Code 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 maintainProductStructureCode (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:
a File – Switch Workspace.
b Set the workspace name to Lab 05 – QGen.
c The workspace file is in the <LabHomeDirectory>.
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 Code.
e Click OK to create the project
4 Drill down to the Request 1 message created under the QGen 05 – Product StructureCode 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. Change the SOAP header:
a Set the receiver to QADERP.
b Set suppressResponseDetail to true.
7 Create the necessary session context entries: Create two ttContext iterations.
a Qualifier = QAD, Name = version, Value = ERP3_1
b 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.
8 Edit the application data section of the message:
a The dsProductStructureCode node by default will contain all of the fields available when processing a Product Structure Code update. However, 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:
• productStructureCode.bomParent = 01020
• productStructureCode.cmmts = true
• productStructureCodeTransComment.cmmt = Comment Line 1
• productStructureCodeTransComment.cmmt = Comment Line 2
• productStructureCodeTransComment.cmmt = Comment Line 3
• productStructureCodeTransComment.cmmt = Comment Line 4
• productStructureCodeTransComment.cmmt = (blank)
• productStructureCodeTransComment.cmmt = Comment Line 6
9 Process the QDoc message that you have created in the new soapUI project and verify that the Product Structure Code is updated successfully.