Skip to Content

I have dealt with this problem before, but never really spend time trying to solve it, until someone ask for it on the forums…

When we create an SMP application, most of the time we use text boxes to send the information and retrieve some data, or maybe we can use a choice control with some hardcode values.

What if for example, we want to have a better Flights example, one that will show us a choice already populated with all the available airlines…that would be cool, right? And actually…it’s easier than it sounds…

For this to work, we need to first log into our ERP system and create an structure called ZFLIGHT_DETAILS.

SUP_Flight_00.png

Then, a Table Type based on that structure.

SUP_Flight_01.png

Finally…a really simple RFC Function Module…too simple if you ask me…

SUP_Flight_02.png

This FM will simply return all the Airlines along with their codes.

With that ready, we can move into our Unwired Workspace and create a project. In this new project create two MBO’s. One related to our FM ZGET_AIRLINES and the other related to BAPI_FLIGHT_GETLIST.

SUP_Flight_03.png

Here, it’s important to create a Personalization Key just for the GetFlightsMBO and of course, don’t forget to link it.

SUP_Flight_04.png

SUP_Flight_04_Map.png

After saving and deploying the server, we need stablish our Starting Points. And here comes the exciting part…as we’re going to choose not only the first option, but the third one as well.

SUP_Flight_05.png

When we double click on the “Activate” screen, we will have an empty window with a link saying “Submit Workflow”…here, you can get creative and use your company logo…write a message…and of course, change “Submit Workflow” to “Start” or “Begin the journey”…anyway…my job is not build commercial software, so I leave it just like that…

SUP_Flight_06.png

When we click on the “Submit Workflow” link, can establish it’s properties, and here we’re going to call our FM. Keep in mind that it’s very important that the Default Success Screen is set to “Start”

SUP_Flight_07.png

Now, we have to move to the “Start Screen”, and add a Choice control and link with the name “Get Flights”.

SUP_Flight_08.png

When we set the properties for the Choice control, you will see where the magic comes from.

SUP_Flight_09.png

Don’t forget to link the Personalization Key.

SUP_Flight_10.png

Finally, our model should look like this one…

SUP_Flight_11.png

We must save and generate our project in order to see it of the mobile device of our choice.

SUP_Flight_12.png

SUP_Flight_13.png

SUP_Flight_14.png

SUP_Flight_15.png

SUP_Flight_16.png

I hope you like this blog and I hope you already have your own SMP server on Amazon Web Services…otherwise…go and do it! In the meantime you can create your own SAP HANA and R servers as well…

To report this post you need to login first.

2 Comments

You must be Logged on to comment or reply to a post.

  1. Mark Teichmann

    Nice blog Blag 😀

    It is very important for SUP Newbies (as me) to see some examples for all the tiny little problems you get when building an app.

    Things like this are the time bandits in a mobile project and we have to get used to the thought that things like a simple F4 help in SAP Gui are way more complicated when realizing it in a mobile app.

    (0) 

Leave a Reply