Adding new Values to be Retrieved for Mobile Application Definitions

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.

  1. 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.
  2. 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.”
  3. Select the additional fields in the MDO:
    1. Navigate to the Mobile Data Object Configuration panel in the Configuration Panel and double-click the appropriate MDO.
    2. Click the Result Set Field Selection tab and click the Change button.
    3. 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.



    4. 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.
    5. Click Save to save your changes.
  4. 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.”

  5. Complete Java synchronization through Eclipse:
    1. Open the appropriate Java project in Eclipse for the mobile application.
    2. 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.
    3. Open the POJO declaration within the Java file.
    4. 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.



    5. 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.
  6. Add the new fields to the complex table or object definition in Agentry:
    1. Open the SAP project in Agentry.
    2. Navigate to the complex table or object that will contain the newly-added fields.
    3. For complex tables, select the Fields tab and click the green plus icon to add a new field.
    4. 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.
    5. Click on the Indexes tab to add new indexes if necessary.
    6. For objects, select the Properties tab and click the green plus icon to add a new field.
    7. 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.
    8. 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.
    9. 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.