on 08-10-2016 4:36 PM
Hi All
I creaded Agentry based application using next instructions
How To Part 2 Build an Agentry Based App From S... | SCN
Now I created new Complex Table for my needs.
For that
-- In Agentry SAP Framework Configuration - Mobile Data Object Configuration
Created new CT - Complex Table Z00_MATPLANT.
Binded it to the class method /SMERP/CL_MM_MATERIAL_DO-GET_MATPLANT
-- Create BAPI Z00_BAPI_GET_MATPLANT and BAPI Wrapper in BAPI Wrapper Configuration
-- Wrote parameters in Mobile Application Configuration
CT_SAPOBJECT, CT_BAPI_WRAPPER, ENABLE_TABLE
-- Created new class
public class MatPlantCT extends ComplexTableObject
in Java Project
-- Created new Complex Table in Agentry Project
Deployed Agentry Project and exported Java project on a SMP App Folder.
On the test I get next result
------
Logging user into server
Logged in
Sending client info
Sending time info...
Receiving time info...
Checking Data Tables
Received new table Airport Data Table
Checking Complex Tables
Updating complex table 'MatPlant Complex Table'...
Field Definitions received
Index Definitions received - rebuilding
Updating complex table 'Carrier Complex Table'...
Received 3 records. 0 remaining...
Application Updated to Dev
Main Fetch...
...
-----
My new Complex table is MatPlant
Now error on synchronizing data.
I also test that ERP calls /SMERP/CL_MM_MATERIAL_DO-GET_MATPLANT
It calls as I set External preakpoint and test that it returns records
It returns 7 records in the output table
APPEND LINES OF lt_maramarc TO ls_mdo_output_vals-et_complex_table->*.
I do not know how further data is processed but the result complex table is empty.
I explore it in Exlipse Test inviroment after synchronization.
What further steps can I take to understand why these do not reach the table in the mobile application?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In the Java debuger I expolred arg0 prameter of Table
@Override
public void setProperties(Table arg0) throws Exception {
setMatnr(arg0.getString("MATNR"));
setMaktx(arg0.getString("MAKTX"));
}
metaData property does not contain the data that I expect.
In ABAP I passed table of MAKT type.
Here it looks like type of SCARR table type.
Can somebody explain where these data are configured?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I have seen,people miss the primary key mapping in the Java class of the CT.
Please cross check.
@Override
public String getID() {
return this.getKeyFld();
}
Try to debug the ABAP code and make sure CT data reach to the SMP server.
-Sudhir.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I would suggest to check the field mapping you have done in Java(It should map with correct field name(Field name not the data element name) with SAP).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Ajitesh
I have two fields - MATNR and MAKTX in ERP that maps to "material" and "maktx" in Java and same fields in the Agentry Complex Table.
Here is a code of my Complex Table Java class
package com.syclo.sap.sflight.customer.object;
//import com.sap.mw.jco.JCO.Table;
import com.syclo.sap.jco.JCO.Table;
import com.syclo.sap.ComplexTableObject;
public class MatPlantCT extends ComplexTableObject {
public String material;
public String maktx;
public String getMaterial () {
return material;
}
public void setMaterial(String cMaterial) {
material = cMaterial;
}
public String getMaktx() {
return maktx;
}
public void setMaktx(String cMaktx) {
maktx = cMaktx;
}
@Override
public String getID() {
return getMaterial();
}
@Override
public void setNotes(Table arg0) throws Exception {
// TODO Auto-generated method stub
}
@Override
public void setProperties(Table arg0) throws Exception {
setMaterial(arg0.getString("MATNR"));
setMaktx(arg0.getString("MAKTX"));
}
@Override
public void setPropertiesForDeletedRecord(Table arg0) throws Exception {
// TODO Auto-generated method stub
}
}
Hello Ajitesh.
I changed code as you wrote but it did'n help.
I tried to debug class MatPlantCT but debuger doesn't stop on Breakpoints of this class.
Although it stops in other classes.
---
I also wonder why the MatPlant Complex Table have different list of events in the log.
Logging user into server
Logged in
Sending client info
Sending time info...
Receiving time info...
Checking Data Tables
Received new table Airport Data Table
Checking Complex Tables
Updating complex table 'MatPlant Complex Table'...
Field Definitions received
Index Definitions received - rebuilding
Updating complex table 'Carrier Complex Table 01'...
Received 3 records. 0 remaining...
Updating complex table 'Carrier Complex Table'...
Received 3 records. 0 remaining...
Application Updated to Dev
Main Fetch...
Flight Schedule '62' has been replaced
Flight Schedule '61' has been replaced
...
It writes
- Field Definitions received
- Index Definitions received - rebuilding
for 'MatPlant Complex Table'.
but it doesn't write these lines for 'Carrier Complex Table 01' and 'Carrier Complex Table'
Hello Sudhir
Here is Mobile Application Configuration
They are identical for all three Complex Tables.
- Mobile Data Object Configuration
I have a suspicion that the problem stems from the fact that Field Selection is empty
but for the CARRIER_COMPLEX_TABLE it empty too and it Carrier table works,
and here is - BAPI Wrapper Configuration
Hello Ajitesh
The debugger stops in the method MatPlantCT.setProperties
but only if I set breakpoint on the first line.
@Override
public void setProperties(Table arg0) throws Exception {
setMatnr(arg0.getString("MATNR"));
setMaktx(arg0.getString("MAKTX"));
}
breakpoint on the second line doesn'y stop
Most likely there is an exception, but I can't catch it.
Also breakpoint doesn't stop in setMatnr method.
So setMatnr is not called.
May be it can't find MATNR field in arg0.getString("MATNR")
Hi,
It seems data is fetched in back end.Can you also verify in the middle ware code.
Download the application in ATE. Goto-Inspect-Complex tables-verify if the data is downloaded.
In front end for this applications, there are parent indexes defined. It seems there are only 7 records in your table and also parent indexes filter the data based on other fields.
Thanks & Regards,
Sravanthi Polu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.