Вы находитесь на странице: 1из 17

SAP for Mobile: Blag's experiments with SMP - Volume 1

Posted by Alvaro Tejada Galindo 14 Mar, 2012 If you know me...you know I love to build blog series...but this time, I'm not going to talk about PHP, Ruby or Python. I'm going to talk about SMP and what can we do with it. Of course, being this my first blog on the matter, I will start with a very basic program, that will read a public web service and return us some information back. First off all...I gotta admit that I based myself on the great video series created by my friend and team mate Ingo Sauerzapf. For this blog, I'm using the Developer Center for SMP. So the first thing is to open some application in order: Start Sybase Unwired Platform, MD5, 9800, Sybase Control Center and Sybase Unwired WorkSpace.

Generated by Jive on 2013-06-19+02:00 1

SAP for Mobile: Blag's experiments with SMP - Volume 1

When we log into the Sybase Control Center, we must create a user for our application.

Generated by Jive on 2013-06-19+02:00 2

SAP for Mobile: Blag's experiments with SMP - Volume 1

After we have created our user, we can move to the BlackBerry emulator and choose the "Workflow" application. Which is going to be of course empty, so we need to configure it by going to it's settings.

Generated by Jive on 2013-06-19+02:00 3

SAP for Mobile: Blag's experiments with SMP - Volume 1

We're using the same User Name and Activation Code that we used on the Sybase Control Center. Next step is to open the Sybase Unwired WorkSpace and create a new Mobile Application Project and call it "Weather_Convertion". (I know...I have a typo...should be Conversion...but I have all the pictures taken, so you guys corrected when creating your applications).

We must create an Mobile Business Object and name it "Weather_Object".

Generated by Jive on 2013-06-19+02:00 4

SAP for Mobile: Blag's experiments with SMP - Volume 1

As we're going to use a Web Service, we need to choose it as the Data Source and create a Profile for it, which is basically provide the Web Service to use. We're going to use this one: http://www.w3schools.com/webservices/tempconvert.asmx?WSDL It's important that we change the default String value on the Attributes Mapping to (3)...because 100 it's just too much Next step is to create a Personalization Key which we will call CelsiusPK.

Generated by Jive on 2013-06-19+02:00 5

SAP for Mobile: Blag's experiments with SMP - Volume 1

On our Mobile Business Object, we should go to the attributes, and then load arguments to establish the personalization key we just created.

After that, a simple right click to Deploy Project would be more than enough.

Generated by Jive on 2013-06-19+02:00 6

SAP for Mobile: Blag's experiments with SMP - Volume 1

We're now ready for the next step, which should be the "GUI" to call it in a way...let's create a Mobile Workflow Forms Editor object and call it Weather_Convertion (Again...sorry for the typo), here it's important to check the first checkbox, which will state that our application can be started on demand. When everything is ready, we need drag and drop our Weather_Object into our Form Editor environment.

Generated by Jive on 2013-06-19+02:00 7

SAP for Mobile: Blag's experiments with SMP - Volume 1

We it's done, we can double click on the "Start Screen" and add a Menu Item with the name "Get Fahrenheit", with the following options.

Generated by Jive on 2013-06-19+02:00 8

SAP for Mobile: Blag's experiments with SMP - Volume 1

We need to link this to our Weather_Object, so let's search it and call it's query operation. Also we can Generate an error screen and set the default success screen, which is the screen which should be shown is everything went right.

Generated by Jive on 2013-06-19+02:00 9

SAP for Mobile: Blag's experiments with SMP - Volume 1

It's very important to go to the Personalization Key Mapping and link the Personalization Key with the Object Key.

With that set...we can right click and call the "Generate Mobile Workflow Package...". And we can even assign our application to work only for certain users.

Generated by Jive on 2013-06-19+02:00 10

SAP for Mobile: Blag's experiments with SMP - Volume 1

Without a single line of code, we can test our little application and confirm that it's working just fine...

Generated by Jive on 2013-06-19+02:00 11

SAP for Mobile: Blag's experiments with SMP - Volume 1

I hope you liked this first blog, even when it's really basic...I promise that my next blog is going to be really nice...might take me a while, as it's not easy, but I'm sure it's going to be something worth to wait for
5746 Views Tags: emerging_technologies, sap_mobility, smp, sap_mobile_platform

Generated by Jive on 2013-06-19+02:00 12

SAP for Mobile: Blag's experiments with SMP - Volume 1

15 Mar, 2012 1:08 AM Daniel Yrigoyen

Grande Blag!

The URL i had to change it from ...WDSL-->...WSDL to make it work Great and easy example (for rookies like me)

15 Mar, 2012 3:31 AM Alvaro Tejada Galindo Daniel Yrigoyen in response to

Thanks Daniel! Small typo

I already fixed the link...

Volume 2 should come soon...and it's going to be way better than this one Greetings, Blag.

16 Mar, 2012 8:29 AM Mark Teichmann

Nice Blog Blag Where can I get an access code for the SUP Development sandbox?

16 Mar, 2012 12:25 PM Alvaro Tejada Galindo Mark Teichmann in response to

Mark: I'm glad you liked my blog...you must go to the Developer Center: http://www.sdn.sap.com/irj/sdn/index?rid=/webcontent/uuid/10ce4cc7-b924-2f10-f6a8c381861a927d A click on "Request Access to SUP" under the Build categorie. Greetings,

Generated by Jive on 2013-06-19+02:00 13

SAP for Mobile: Blag's experiments with SMP - Volume 1

Blag.

16 Mar, 2012 12:33 PM Mark Teichmann Alvaro Tejada Galindo in response to

I already tried that some days earlier but I could not provide an access code. Although I could submit the form I did not get an answer until now. But the link 'Request access to SUP' comes with a comment '(with access code only)'. Now I would like to know where I could get this access code?

16 Mar, 2012 12:47 PM Alvaro Tejada Galindo Mark Teichmann in response to

Let me check and I will come back to you Greetings, Blag.

16 Mar, 2012 1:24 PM Alvaro Tejada Galindo Mark Teichmann in response to

Mark: I just checked with my teammates...your request will be processed, but you need to be patient as we had Pre-DKOM on San Jose and an InnoJam in Bangalore Greetings, Blag.

16 Mar, 2012 1:30 PM Mark Teichmann Alvaro Tejada Galindo in response to

Great. Thank you for your help!

16 Mar, 2012 1:52 PM Alvaro Tejada Galindo Mark Teichmann in response to

Sure, no problem at all

Generated by Jive on 2013-06-19+02:00 14

SAP for Mobile: Blag's experiments with SMP - Volume 1

Greetings, Blag.

12 Apr, 2012 8:22 PM Pasquale De Angelis

Hi Blag,

i have followed your sample but when i call 'GetFahreneit' i obtain the following message from Android Emulator :

it's not possible to load file:///.......UnwiredPlatform\Servers\MessagingServer\bin \WorkFlowClient.dll access denied .....

Have you some idea?

Thanks Marco

14 Apr, 2012 1:03 AM Alvaro Tejada Galindo Pasquale De Angelis in response to

Pasquale:

I'm not much of an Android user...so I always use the BlackBerry emulator...I tried with the Android one and for me it's working just fine...have you tried with the BB one? Do you have the same error? All the images on the Dev Center are based on a master image, so basically yours and mine are the same...are you sure you follow the steps correctly?

Greetings,

Generated by Jive on 2013-06-19+02:00 15

SAP for Mobile: Blag's experiments with SMP - Volume 1

Blag.

16 Apr, 2012 1:08 PM Pasquale De Angelis Alvaro Tejada Galindo in response to

Hi Alvaro,

thank you for your support, i have solved, below i explain how:

i have verified that WorkFlowClient.dll was 'encrypted' (showed green under Win7 64 OS) then with right-click/properties/advanced i have unchecked 'encrypted' attribute. I have restarted Unwired Server and now it works fine.

Bye Marco

17 Apr, 2012 4:35 PM Fernando Cucci

Hi Alvaro, Nice blog! One detail...some images are not available. Could you please fix it? Thanks, Fernando

19 Apr, 2012 3:40 AM Alvaro Tejada Galindo Fernando Cucci in response to

I have fixed the pictures...sorry for the long delay

Generated by Jive on 2013-06-19+02:00 16

SAP for Mobile: Blag's experiments with SMP - Volume 1

Greetings,

Blag.

22 Apr, 2012 7:07 PM Pasquale De Angelis

Hi Alvaro,

i have requested an access to SUP Sandbox about one week ago but i haven't received any answer, how i can check if my request has been processed ?

Thanks Pasquale

16 Dec, 2012 11:06 AM Rana Osama

Thank you very much for this great example, i learned alot from it. waiting for more

Rana

Generated by Jive on 2013-06-19+02:00 17

Вам также может понравиться