cancel
Showing results for 
Search instead for 
Did you mean: 

Building an Agentry Based Mobile App from Scratch (No data returns)

Former Member
0 Kudos

Hi All

I use next document

How-to Build an Agentry Based Mobile App from Scratch Connecting to an SAP Back-end Part 1

to understand How-to Build an Agentry Based Mobile App

I use

- Java 8 update 66

- Eclipse Version: 4.2.2

Build id: M20130204-1200

- Agentry Editor Plugin 70.10.0.9 com.syclo.agentry.editor.feature.feature.group SAP AG

from Agentry_70.11.0_EditorPlugin_x86_64.zip

Net framework 4.61

Version: 3.0.7.0SP Level: 07

I performed all the steps of the document and adapted it to the SMP 3.0.

Now I try to test it in the Eclipse Integratet Test Enviroment.

The process of transferring data looks correct

but no data appear in the table

Looks like no data received

I have records in SBOOK and SFLIGHT tables in the ERP.

Which methods allows to debug transferring the data and understand at what stage the data is cut off?

Accepted Solutions (0)

Answers (1)

Answers (1)

mark_pe
Active Contributor
0 Kudos

Konstantin,

To answer your question:

Which methods allows to debug transferring the data and understand at what stage the data is cut off?


The way we debug this area from the ERP side is to use SAP transaction code = SE37 to enter the BAPI inputs to generate the ET_RETURN or results.  If it returns some value, we know that ERP is correct.


Then the next step is to debug from JAVA or Eclipse Editor.


This is the example of how to debug JAVA in SMP make sure you have access to source code (may need Account Executive help to gather source code - need to sign paperwork and other items for legal stuff).


Debug SMP 3.0 Agentry Java in Eclipse - SAP Mobility - SCN Wiki


In the Editor you can also use the Agentry Test Environment to debug the Objects returned during your transmit. During transmission you can debug the screen set as you defined it (For example - Object Display, Fetch or Transaction). From here you can determine if the missing part is in the Editor (you did not define the object properties) or in the Java using the link above.


Hope this helps out.


SAP Mobile Support Team.

Former Member
0 Kudos

Thank you Mark.


How can I know what parameters SMP pass to BAPI?

I want to pass the same parameters in SE37 for debuging.

Can I turn on a flag that allows to log all the calls from SMP to SAP ERP with BAPI names and parameters?

mark_pe
Active Contributor
0 Kudos

Konstantin,

In essence, your Agentry Editor will have defined transaction properties to be submitted to the backend. All communication will be dealt in Java in the stephandler. Unless you have access to the source code, all you have is the editor properties or BAPI BAPI_IS_INPUT and other input to the BAPI.

SMP (Agentry Editor) --> JAVA Libraries --> BAPI (ERP/CRM).

Hopefully this helps.

Best Regards,

Mark Pe
SAP Platinum Support Engineer

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

I would turn on the logging for the Java backend to debug as the first step.  Then you can also debug the Java to step through and capture exactly what is being passed into the BAPI calls for use with SE37.  Reference teh link above in Mark's response.

--Bill

Former Member
0 Kudos

Hello

I used next article

to set Agentry in debug mode

I used a method that changes the props.ini file

props.ini


#jvm

-XX:+HeapDumpOnOutOfMemoryError

-XX:+DisableExplicitGC

-Xms1024m

-Xmx2048m

-XX:PermSize=256M

-XX:MaxPermSize=512M

-XX:ErrorFile=./log/error.log

-XX:HeapDumpPath=./log/heap_dump.hprof

-Djava.io.tmpdir=./work/tmp

-Djava.endorsed.dirs=lib/endorsed

-Dosgi.logfile=./log/osgi.log

-DsecretKey=4Iqy0CuzBL

-DsecretKeylength=128

-Dfile.encoding=UTF-8

-Xdebug

-Xrunjdwp:transport=dt_socket,address=7090,server=y,suspend=n

#main

org.eclipse.equinox.launcher.Main

#program

-console localhost:2401

then restarted server.

Then I configured FlightBooking in Eclipse

And pressed Debug.

Eclipsed showed "Launching ZFlightBooking" message and then shown nothing

On second attempt it shown next dialog.

How to check that SMP started in debug mode and 7090 port is ready?

Former Member
0 Kudos

Hello Mark.


When you write "SMP (Agentry Editor)", what do you mean?

SAP Management Cockpit, SAP Mobile Platform Administration and Monitoring ?

I can't find "JAVA Libraries" menu in the SAP Management Cockpit.

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

There is no need to update the props.ini anymore.

Just start your SMP server from the command line using the -debug <port> option

C:\SAP\MobilePlatform3\Server>go -debug 8000

During startup you should see the java command it uses to launch

C:\SAP\MobilePlatform3\Server>"C:\SAP\MobilePlatform3\sapjvm_8\bin\java.exe" -se

rver  -XtraceFile=log/vm_@PID_trace.log "-Dcom.sap.mobile.platform.server.home=C

:\SAP\MobilePlatform3\Server" -Xdebug -Xrunjdwp:transport=dt_socket,address=8000

,server=y,suspend=n  "-XX:+HeapDumpOnOutOfMemoryError" "-XX:+DisableExplicitGC"

"-Xms1024m" "-Xmx2048m" "-XX:PermSize=256M" "-XX:MaxPermSize=512M" "-XX:ErrorFil

e=./log/error.log" "-XX:HeapDumpPath=./log/heap_dump.hprof" "-Djava.io.tmpdir=./

work/tmp" "-Djava.endorsed.dirs=lib/endorsed" "-Dosgi.logfile=./log/osgi.log" "-

DsecretKey=Jz35WQnL11" "-DsecretKeylength=128" "-Dfile.encoding=UTF-8" -classpat

h "C:\SAP\MobilePlatform3\Server\lib\*;C:\SAP\MobilePlatform3\Server\plugins\org

.eclipse.equinox.launcher_1.3.0.v20120308-1358.jar;C:\SAP\MobilePlatform3\Server

\plugins\com.sap.db.jdbc_1.0.49.373159.jar;C:\SAP\MobilePlatform3\Server\plugins

\org.apache.servicemix.bundles.derby_10.8.2.2_1.jar;C:\SAP\MobilePlatform3\Serve

r\plugins\org.apache.commons.codec_1.10.0.jar;C:\SAP\MobilePlatform3\Server\plug

ins\com.springsource.org.apache.commons.lang_2.5.0.jar" org.eclipse.equinox.laun

cher.Main -console localhost:2401

SMP Server version is 3.0.10.2

Look for the debug entry and in particuly the dt_socket,address=XXXX line to confirm debug was activated for your server.  This only works when running the server interactively not if you are running it as a service.

--Bill

bill_froelich
Product and Topic Expert
Product and Topic Expert
0 Kudos

Mark is referring to the Agentry Editor within eclipse.

--Bill

Former Member
0 Kudos

Can you give a hint.

Where "SMP (Agentry Editor)" menu in the Eclipse.

I can't find.

Agentry Editor Plugin is installed.

Former Member
0 Kudos

I set startup type to Manual for SAPSMP3Service.

and restarted SMP via go -debug 8000 command.

line

-Xdebug -Xrunjdwp:transport=dt_socket,address=8000

,server=y,suspend=n

presented in executed command list.

In Eclipse though I had the same result

Eclipse showed "Launching ZFlightBooking" message and then shown nothing

On second attempt it shown next dialog.

I changed port to 8000 in Eclipse.

I may be that debuging work.

What should be displayed on press "Debug" in "Debug configuration" dialog?

Do I need to Start Test Client in Eclipse Test Enviroment window?

Do I need to set Breakpoints in FlightScheduleStephandler class?