In my recent blog

http://scn.sap.com/community/developer-center/mobility-platform/blog/2014/07/31/c-cross-platform-mobile-application-using-xamarin-form

I had written about SAP Mobile(Cross Platform) application in Purchasing using C# and Xamarin.  In this blog I would like to show how easy it is

to develop a mobile application (the code will run on  3 devices and runs natively – code generated by Xamarin).  Many SAP Client use HR and Expense processing. For Such Clients if we can provide a mobile app by which employees can post expenses directly to SAP and send paper receipt to their approver by SMS can significantly improve the efficiency expense process.

The SAP Transaction by which we Create Expenses is PR05.  The BAPI I used is BAPI_TRIP_CREATE_FROM_DATA. In my earlier blogs on Xamarin I have explained in great detail the process of Creating ABAP REST service which can be invoked from Mobile device.  I have written wrapper on this BAPI so that

the mobile device passes a subset of information that is required to Post Expenses. The images below show screen shots of the mobile app by which you can enter header(Employee Perner, date times, cost Center,company,bus area etc) and post an Expense

Image1.pngImage2.png

We have message on the device that we have posted trip 30077 .

Now we login in to check up SAP – Tcode PR05 for employee 100004 (IDES System)

/wp-content/uploads/2014/08/flig5_521187.png

Having Posted the expenses we would like to send the Image of the paper receipt to the approver by SMS. The images below show the screen

/wp-content/uploads/2014/08/flig7a_521190.png

By clicking the Button you can use the Camera on the device to take photograph of the recpit and send it to your

Sending SMS – Involves writing Dependency Service for each of the devices – You have create An interface in the PCL project and invoke that using code line shown below

var x = await DependencyService.Get().SendSMS(“Kindly Approve My Expense “, Mobile);

In each of the device specific project you have implement the interface. In the header of this platform Specific program you have to have a line of code

[assembly: Dependency(typeof(SMSTask))]

This will ensure linking of the SMS call between the PCL Project and the platform specific project so the device specific SMS facility can used.

To report this post you need to login first.

Be the first to leave a comment

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

Leave a Reply