Skip to Content

Online Shopping Cart Approval Application Using Blackberry/iPhone

Online Shopping Cart Approval Application Using Blackberry/iPhone

Business Scenario:

In the standard SAP shopping cart approval process shopping cart is created and approved in SAP Enterprise Buyer. The remainder of the procurement process takes place in the backend ERP system (s) and all other follow-on documents, such the purchase order, goods receipt/service entry sheet and invoice, are located there. Now, manager either approves or rejects the Shopping Cart. This requires the Approver to have access to a desktop or laptop where he can access the SAP system.

The Blackberry/iPhone Application for Shopping Cart approval is aimed at mobilizing the Shopping cart approval process where the approver can accept or reject a Shopping Cart on the move using handheld  device.

BAPIs Used for Shopping Cart approval process on Blackberry/iPhone:

Standard BAPIs:

Swn_Uwl_Get_Worklist:To get the count of Shopping Carts waiting for approval from a particular user.

Swk_Wi_Container_Read:To get the details related to any work item. Used to filter the work items obtained for a user based on the Business Object.

Bbp_Pd_Sc_Getdetail: To get the shopping cart Header details and shopping cart item details.

Custom BAPIs:

Z_Sc_Approve_Reject: To reject or accept the Shopping cart based on the input passed as F to approve and H to reject the shopping cart.


i) Creating a project in Webdynpro, importing models, Model Binding and Context mapping.

Create a Webdynpro project in NWDS and switch to Webdynpro perspective and create an application for the project with the authentication property “true” and choose to create a new component. Create a model choosing “Import Adaptive RFC Model” and select all the BAPIs mentioned above.

For any help on Webdynpro Java and for steps to create a Webdynpro Java Adaptive RFC application, please refer the document from SAP Library.

Once you have completed the above step and created an application and the model, follow the following steps to develop the mobile Shopping Cart application.

1. Open the data modeler, choose “Add Existing Model to the component” and select the model created     in the previous step.

2. Do a model binding between the component controller and the model. Select all the input model elements into the component controller.

3. Create Views in the component for

a) Shopping Cart Homepage

b) Shopping Cart Inbox

c) Shopping Cart Details

4. Create Value nodes in Component controller.

5. Map the relevant nodes from the context of the component controller with the context of the view controllers.

ii. UI designing – applying UI element templates to the Views and binding the UI elements to the context.

1. Shopping Cart Homepage View:Gives list of shopping cart waiting for approval

2. Shopping Cart Inbox View : Gives details of Shopping cart data like Shopping cart no, Description and Total Value.

3. Shopping Cart Details View :Gives details of Header and Item level details with Approve and Reject buttons.

Deploy and Run:

Specify the J2EE server name and port in the preferences option in NWDS.

Deploy the application on to the J2EE server by choosing “Deploy New Archive and Run” in the context menu of the Application and run the Application URL in Blackberry simulator.

Shopping Cart Approval through iPhone Demo.

1.       Start the iPhone simulator

2.       Run the application URL in the web browser of the iPhone.

The below screen is the login screen where user can enter details to login.


The below screen gives details of first page where user can view list of pending approvals.


Shopping cart Inbox details can be seen in the below  screen.


The below screen gives details of header and item level details with Approve,Reject , Home and Back buttons.







Shopping Cart Approval through Blackberry Simulator:

1.       Start the Blackberry  simulator.

2.       Run the application URL in the web browser of the Blackberry.

Log in Screen:


Shopping cart approvals count:


Shopping cart Inbox screen:


Shoppingcart  Details:


If Shopping cartis approved or rejected message will be displayed ininbox screen:


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

    you should have pointed out that this is only working with emulators and not in real world. As a Technology Analyst you should be able to figure out why. Furthermore, you missed a crucial point in the business process: the approver is getting notified via Email that a workitem was created. Would be courious to see whether you know how to handle that on a mobile device.


    • Hi,

      We can run  webdynpro application in real handhelds also.Put the application URL in Blackberry/iPhone browser and run it, we will be able to view the application details. A notification can be sent to approvers mail box on a mobile device based on the workflow configuration settings.


  • I would like to understand one thing though that
    Are all Web Dynpro application capable on running in I phones/ Ipads / Android based phones.

    please let me know your view of each of them . Also I am assuming that we are looking to run apps on real hand held devices and NOT simulators/ emulators.

    Your suggestions needed

    • Hi ,

      we are able to run applications in Blackberry/iphone handhelds(i tried with these two handhelds)which are developed using Webdynpro Java .