Microbe is an open source social application designed to run from your SAP system. A mobile user interface is generated using zMob, and served securely on iOS and Android devices.

/wp-content/uploads/2013/09/ss_post_plus_code_271754.png

Following is an outline of the required configuration, and some implementation details for those interested. As the project is open source, anyone is free to contribute their changes back to help Microbe grow! zMob is also open source, dual licensed under the LGPL and a commercial license.

Configuration

First of all, the source code needs to be installed on your system. Detailed instructions can be found on the project site at https://code.google.com/p/microbe/wiki/Home.

Next, the users who will use Microbe from their mobile devices must be granted access to the relevant reports. The helper report zmicrobe_addusr can be used in order to add the relevant permissions to the zMob configuration.

Finally, the zMob report zmob_config_data must be run to see the configuration details that will be used on the end user devices. This will show the SAP URL that must be configured for communication in the zMob app on your iOS and Android devices. Once added to the app configuration, your mobile devices will be able to communicate with Microbe hosted on SAP, and the fun can begin!

The zMob emulation system can be used to test your installation. Just enter the above mentioned URL into the web app (also available for Google Chrome) and see the communication between the mobile application and the SAP system in the log window:

/wp-content/uploads/2013/09/ss_debug_271743.png

Using Microbe

Microbe consists of two reports, zmicrobe_index and zmicrobe_post, that are converted into mobile user interfaces using zMob:

/wp-content/uploads/2013/09/mob_ss_index_271786.png

The first page lists the last 20 posts made by your users. Clicking “Post message” navigates to the second report.

/wp-content/uploads/2013/09/mob_post_271785.png

Here we can see the source code for the application (based on a standard SAP report). When the user clicks “Submit to SAP”, the data entered by the user is passed back to the report and the START-OF-SELECTION code is executed. This inserts the users message into the database and redirects the user to the first screen / report..

Implementation

Following is the code contained in zmicrobe_post and zmicrobe_index. These represent the bulk of the implementation – zMob does the heavy lifting of converting these reports into fully functional mobile applications..


* entry point into microbe mobile app

REPORT  zmicrobe_index.

DATA:
  msg TYPE zmicrobe_msgs,
  txt TYPE string.

START-OF-SELECTION.

WRITE ‘Welcome to the Microbe demo microblogging platform.’.
NEW-LINE.

WRITE ‘See original implementation in reports ZMICROBE_INDEX and ZMICROBE_POST.’.
NEW-LINE.

WRITE ‘Post a message <link:ZMICROBE_POST>’.
NEW-LINE.

SELECT * FROM zmicrobe_msgs INTO msg
  UP TO 20 ROWS
  ORDER BY timestamp DESCENDING.

CONCATENATE msgusername ‘posted’ msgmessage
  INTO txt SEPARATED BY space.

* todo: include thumbnails <img:> – extend db..
WRITE txt.
NEW-LINE.
ENDSELECT.

IF sysubrc NE 0.
*    WRITE: ‘Be the first to post a message!’.
ENDIF


REPORT  zmicrobe_post.

PARAMETERS:
  p_msg LIKE zmob=>ui_description,
  p_usr LIKE zmob=>bg_user.

START-OF-SELECTION.

DATA:
  msg TYPE zmicrobe_msgs.

msgtimestamp = 0.
msgusername = p_usr.
msgmessage = p_msg.

INSERT zmicrobe_msgs FROM msg.
COMMIT WORK AND WAIT.

write:
  ‘Your message has been posted.’, /,
  ‘Back to Microbe <link:ZMICROBE_INDEX>’.


Note that in the screenshots, the “Your Message” input field in the mobile application corresponds to the P_MSG parameter in report ZMICROBE_POST. P_USR is a hidden parameter, and is passed back to the report. In the emulator, hidden parameters can be exposed using the collapsible box.

Any output containing <link:…> is converted to a navigable element that will take the user to another report (if they have the authorisations to run the report..)

More technical details on implementation can be found in the article ABAP Report => Mobile Application automated by zMob!

Links

Microbe project: https://code.google.com/p/microbe

zMob project: https://bitbucket.org/zmob/sap

SAPLink: http://saplink.org

Keep up to date on the zMob project on Google Plus and Facebook.

Become a beta tester for the latest version of the mobile apps.

Future

  • Click on messages to respond and see responses..
  • Profile pictures (photographed by device camera) included by posts
  • Include photo attachments in posts (Photo capture shall soon be supported by zMob)
  • Include “Check in”, GPS at time of posting shown on map (GPS is currently supported by zMob)
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