Prerequisites
The following items must be addressed prior
to performing this procedure:
- The desired values to be added
to those being retrieved should be determined and noted, as should
the tables within which they reside within SAP.
- The person performing this procedure must have access to the Agentry SAP Framework Configuration
Panel and have permissions to change the configuration settings
of the elements within it.
Task
Use this procedure to add new fields to complex tables
or objects. The following procedure uses a complex table as an example.
However, these steps will accomplish the same goal to add new values
to object definitions as well. Where there are differences, they
are noted in this procedure.
- Within the Agentry SAP Framework Configuration
Panel ConfigPanel Home page, select the menu link Mobile Data
Object Configuration. Select the proper MDO from the list on
the left of the configuration page, which displays its current settings.
- Copy this MDO to the Z namespace. All changes to the
MDO should be made to this new copy in the Z namespace. The original
MDO should not be modified.
For information on copying an MDO, see the procedure section
“Copying an MDO or Exchange Object to the Customer Namespace.”
- Select the additional fields in the MDO:
- Navigate to the Mobile Data Object Configuration
panel in the Configuration Panel and double-click the appropriate
MDO.
- Click the Result Set Field Selection tab and
click the Change button.
- In the Field Selection Detail pane, expand the table
to which active fields will be added.
The Field Active column displays in white, with check
mark boxes enabled.
- Scroll through the fields to determine which ones
to enable or disable. Checking the box enables the field, while
un-checking the box disables the field.
- Click Save to save your changes.
- Navigate to the ConfigPanel Home page and select the BAPI
Configuration link. In this page, change the BAPI wrapper assignment
of the proper BAPI wrapper to use the MDO in the Z namespace just
modified in the previous step.
For information and instructions on changing a BAPI wrapper’s
MDO assignment, see the procedure section “Changing the MDO Assignment
of a BAPI Wrapper.”
- Complete Java synchronization through Eclipse:
- Open the appropriate Java project in Eclipse
for the mobile application.
- Locate the appropriate BAPI wrapper Java file in the
project. You can find this by locating the BAPI wrapper name that
is associated with the MDO in the Configuration portal. Copy this
BAPI wrapper name and perform a file search within Eclipse to locate
the correct Java file.
- Open the POJO declaration within the Java file.
- Locate the public strings and the properties. Add
new data members to the class matching the fields selected for retrieval
in the MDO. Also define the new setter methods for those selected fields.
- Save and compile the Java code by running the build-mm.xml script.
This should initially be performed on the SAP Agentry Development Server to
allow for testing before publishing to the Production server.
- Add the new fields to the complex table or object
definition in Agentry:
- Open the SAP project
in Agentry.
- Navigate to the complex table or object that will
contain the newly-added fields.
- For complex tables, select the Fields tab and
click the green plus icon to add a new field.
- Add the new field using the wizard, naming it to match
the name given to the values in the Java class. When done, click
the Finish button.
- Click on the Indexes tab to add new indexes
if necessary.
- For objects, select the Properties tab and
click the green plus icon to add a new field.
- Add the new property using the wizard, naming it to
match the name given to the values in the Java class. When done,
click the Finish button.
- Make any other applicable changes to the application
that is using the complex table or object, such as displaying the
new value or modifying rules to search on the new values.
- Publish the application to the SAP Agentry Development Server in
preparation for testing. Restart the SAP Agentry Development Server as
changes were also made to the Java logic in support of the new fields.
With the completion of this procedure, one or more new
values will be retrieved as a part of the data for the object or
complex table definition. These new values may be displayed, edited,
searched on, or used in any other appropriate manner on the client.
Next
When these modifications are complete, the application
should be thoroughly tested. It should be verified that the values
added are retrieved as expected. Any functionality related to these
values should also be tested. Once testing is successful, the modifications
made should be migrated to the production system according to migration
processes in place at the implementation site.