Agentry notes on Modifications
Notes on making modifications to Agentry
1. Data Tables (DT)
– You could be asked to filter out some values from the data table. i.e. Filter Data and download it into an application table. Note: Data Tables should be used sparingly, recomend less than 100 actual records of rarely changing data.
1.1. A Filter is available within the config portal MDO.
- Check the datatable for DT and see if a filter has already been defined.
- Specify a new filter value in MBO for the table
- How do you find the MDO for the datatable ? Look for parameter group DT-MDOID
1.2. Filter is not available within the config portal MDO
- Copy the existing class handler, making a new Z copy.
- Goto the application config and look for parameters, search for DT_MDOID and find the class handler for that entry. With SAP class handler copy it to Z. Then change the Get method where the filter has been defined.
- Change the GET_DATA_TABLE method.
- Copy the MDO, point it to the new class and specify the filter values.
- Change the mobile application parameter value for the group DT_MDOID with the parameter name –
- Copy the MBO class to a new Z class.
- In the Z copy class change the method GET_DATA_FILTER_LIST which contains a list of filter fields.
- Copy another class that already has a filter defined as a template to the code you need to add.
- Change the value accordingly for your new dll.
- Edit your new Z class method GET_DATA to apply suitable ABAP SQL Statements, altered to include the filter field names and their values.
- Once activated (ABAP Class), change the DT config for the application, pointing to the new class. This in effect then uses the new filter value added to the MDO calling the Z class method GET_DATA_FILTER_LIST. The filter values can be supplied in the DT config.
1.3. Creating a Data Table from new.
- If the class handler already exists use it.
- If not create a new class handler. This is either a copy of an existing one with filter logic already includeded in it. Or create a new class (ABAP) with a
- super class reference to /SYCLO/DTHANDLER and then add suitable methods.
- Create the MDO
- Set the new DT-MDOID for the new class and table in the two parameter settings.
- Create the DT in Agentry, link to an existing Java class. com.syclo.sap.DataTable. No new Java is needed here. Remember Table for the GUID in SAP function modules or classes is /SYCLO/MDW00 (Use SE16)
Estimated effort: 15 hours per Data Table.
2. Complex Tables (CT)
2.1. Adding a new field to a complex table (CT)
- It could exist in the BAPI structure or it does not exist i.e. it comes from a custom Z table.
- Change the backend logic.
- Agentry definitions also need changing.
- Java classes field matching also need changing.
2.2 Need to add a new filter.
- Is the new filter exposed in the config panel? You can just change it on the config portal panel.
- If filter is not exposed on the config portal panel, then see my notes 1.1/1.2.
2.3. Create a new Complex table (CT)
- Is there a class handler for it already ? Or does the class handler not exist.
- Look at the config panel parameter CT_BAPI_WRAPPER for the existing Table name Ct.table.name and bapi.wrapper.
- Get the Bapi wrapper assignment CT_MDOID for the CT table name.
- Then go to the MDO for the wrapper class and see if a filter exists.
- If the filter does exist then set the appropriate values.
- If the filter does not exist then copy the wrapper class in SAP.
- Copy the code for a filter method from another class
- Change the get method etc then see my notes 1.2. It is possible and recommended to setup dummy SQL data first to test this new method.
- Create the new MDO using the config Portal.
- Create the Bapi wrapper assignement, using the config portal, to the new ZCL wrapper. (SAP Class)
- Extend the POJO to include new field mapping or create a new POJO class using Syclo super class com.syclo.sap.ComplexTable.
- Change the CL_SAPOBJECT parameter to point to the POJO.
- Using eclipse Java perspective, publish the modified POJO’s by using export to a .jar file that must be added to the agentry.ini file the first time the project is created.
- Stop and re-start the Agentry server.
3. Exchange – New, Changes and Deletes
- Using Get_new_records, Get_change_records and Get_Delete_records.
- The insertions of the enhancements into the standard SAP ECC BAPI code can be quite messy because we are trying to detect the new/change and deletions.
- No automatic reset of the exchange table program is available in the product. Companies implementing Agentry tend to build one of their own by modifying the BAPI code.
- Filtering can be implmented by modifying the BAPI code itself that feeds the exchange.
Estimated effort: 30 hours per Exchange.