Skip to Content

Hi,

 

Tools used in developing the application are:

 

SUP version  : 2.0

BB Simulator : 6.0.0.141_9800  (MDS 4.1.2.17)

 

This is a workflow application which illustrates how can we release the Purchase Order (unreleased one) from our mobile device.

i have taken screen shots while developing this application.

 

create a new project with some new name.

create a new MBO. (PO_MBO)

 

First of all i want to view all the possible list of unreleased Purchase Order

 

BAPI used : BAPI_PO_GETITEMSREL

 

Capture.PNG

 

select the ITEMS_FOR_RELEASE,

REL_CODE,

REL_GROUP as input arguments

and PO_ITEMS as output paramter

 

click on preview button to pass some test data

 

Capture.PNG

 

select the cache Policy as “online”.

 

 

 

Capture.PNG

 

 

 

 

 

as soon as you select the policy as “online”, you will see an error message or error icon on your MBO.

this is because you have to MAP your input parameters to the MBO parameters.

 

for that, i am inserting 3 more attributes to the existing MBO… ( i am deleting unwanted attributes from my MBO)

 

Capture.PNG

here, i added 3 attributes : rel_grp1, item_for_rel1, rel_code1 (there are total 7 attributes including 3 input attributes)

 

 

 

right click on MBO… and go to attributes> load parameters

 

here i am doing mapping…

 

Capture.PNG

 

next task, deploy the MBO to your server.

 

then, create a workflow editor. (PO_test)

 

drag and drop the MBO from left hand side.

 

Capture.PNG

go to start screen,

 

 

add 3 EDITBOX to the start screeen.

 

Capture.PNG

create the KEY simultaneously for each field… ( here i am passing the fixed “default” value for each one)

 

 

Capture.PNG

 

create a menu to the start screen. (Get Details)

 

and set the following properties as below:

 

Capture.PNG

 

go to “Paramter Mappings”  …do the following

 

Capture.PNG

 

 

go to the PO_MBO screen

 

select PO Number and item no in the List View (u can select anyone of your own choice)

 

MAP the ListView Details Screen as PO_MBODetail

 

Capture.PNG

 

 

then, generate the workflow package.

 

you must be see the ouput on your device like below:

 

Capture.PNG

 

in the 3rd screen, we are seeing a list of unreleased purchase order, our main aim is to release them (one by one)

 

for this we have to create a new operation to the MBO.

 

create a new operation : ReleaseWF

operation Type: update

 

Capture.PNG

 

then use BAPI: BAPI_PO_RELEASE

set the parameters as below

 

Capture.PNG

 

then create two Personalization Keys for each input attributes

 

Capture.PNG

 

then , we have to map these Personalization keys with input attributes of the operation

so, right click on the ReleaseWF operation

 

Capture.PNG

 

then deploy the modified MBO to the unwired server.

 

go to PO_MBOdetail screen,

 

create a menu “Release PO”   and set the following properties:

 

Capture.PNG

 

(here i have created a “Success Message” screen to see the message after Release the PO)

 

go to the Parameter Mapping tab

 

Capture.PNG

 

 

 

at “Success Messge ” screen , i have added a HTMLView

 

Capture.PNG

 

once again, generate the workflow package. you will see the flow of application like this:

 

 

 

Capture.PNG

 

(here my cursor is pointing to 4500000047 PO number > which i want to release)

 

Capture.PNG

 

now, i want to check the status of the released PO.

if it has been released, it must not show in the list of POs.

 

Capture.PNG

 

there is no 4500000047 PO in the latest list.

it means this particular PO has been released.

 

 

Regards,

Jitendra

To report this post you need to login first.

47 Comments

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

  1. saket amraotkar

    Nice work Jitendra.

    I was also working such scenario, But i stuck in on prob that, once we reach to successes screen, i want to go back to PO list where i can release another PO, but the problm is when we go back to PO list, the previous released PO also will be there.

    If you can put some stretch on that, it will be great effort.

    Thanks & Regards

    Saket

    (0) 
      1. saket amraotkar

        Hi Satya,

        My problem is once i have click on confirm PO i should go back to PO list and again i should be able to release another PO, and the previous PO should get removed from List.

        (0) 
    1. Jitendra Kansal Post author

      Saket,

      its really a nice query.

      i ll update as soon as i resolve your query.

      there is some prob wid my system for last 2 days.. not able to connect to server.

      i am working on it.

      (0) 
      1. Midhun VP

        Hi jithendra,

        Your post is very useful.

        I have a question here that is the input for the bapi is rel code,rel grp and item for rel.

        These values won’t change for a user. Even though the user has to give these values each and every time once he run the app.

        How you are going to solve this ?

        Regards

        Midhun.VP

        (0) 
    2. Jitendra Kansal Post author

      Saket,

      have you resolved your query?

      I was also working such scenario, But i stuck in on prob that, once we reach to successes screen, i want to go back to PO list where i can release another PO, but the problm is when we go back to PO list, the previous released PO also will be there.

      If you can put some stretch on that, it will be great effort.

      i got the solution.

      its very simple.

      when you create a button on last screen ( to go back to PO lists screen)

      select it as “online req”

      choose the desired MBO

      do Parameter mappings…

      nd select the PO lists screen

      you ll get the list of PO (which has nt been released—–not which has been released)

      hope you ll understnd for my ans.

      plz let me knw if you face any issues regarding the same.

      Regards,

      Jitendra

      (0) 
      1. saket amraotkar

        Hi Jitendra,

        Thats very true, but i was thinking to refresh it through jQuery. as i dont want to call again an MBO.

        In iphone application we do have one api to refresh the data.

        This also sounds good. Anyways i appreciate your curiosity.

        Thanks

        All the Best

        Saket

        (0) 
  2. ayo shaba

    Hi jitendra

    Thank you for this. I am in the process of creating a PO (Purchase Order) workflow app on SUP 2.1.3 following your steps and after selecting the input and output parameters and passed some test data, I get error “Execution failed: Field NUMBER not a member of BAPIRETURN” when i click on the preview button. Please how do I resolve this?

    Regards

    Ayo

    (0) 
    1. Jitendra Kansal Post author

      Hi Ayo,

      can you please put a snapshot where you are getting this error so that it would clarify me that what input/output parameters you are passing?

      Regards,

      Jitendra

      (0) 
      1. ayo shaba

        Hello Jitendra

        I cannot seem to paste or attach here. It just wont allow me. Let me try to explain.

        My input parameters are: REL_CODE, ITEMS_FOR_RELEASE and REL_GROUP and my output parameter PO_ITEMS.

        Test cases for the input parameters are:

        REL_CODE:01

        ITEMS_FOR_RELEASE: X

        RELEASE GROUP: O1

        Clicking on Preview it gives error: Execution Error: Field Number not a member of BAPI return.

        I hope this helps. Will be glad to let me know how I can attach screen shot here.

        Hope to hear from you soon.

        Regards

        Ayo

        (0) 
        1. Jitendra Kansal Post author

          HI Ayo,

          very simple.

          you are getting this error because these are not valid test datas.

          these are wrong entries.

          make sure your datas are correct.

          i hope you got my point.

          btw, for attaching an image ,

          (just click on the icon insert image

          but it wont work while commenting on a blog. )

          Regards,

          Jitendra

          (0) 
          1. ayo shaba

            Hello Jitendra

            Thank you. These are the value we use for PO. I have confirmed this many times and yet still gives same error

            Regards

            Ayo

            (0) 
                1. ayo shaba

                  Hello Jitendra

                  I am stuck again at the getdetail menu screen. I cannot seem to do parameter mapping. The whole area is grayed. I know may be I might be missing something but dont know what it is so I need your help please.

                  Regards

                  Ayo

                  (0) 
                  1. Jitendra Kansal Post author

                    Hi Ayo,

                    did you add 3 new attributes to your MBO?

                    did mapping (propogate to attribute)?

                    deployed your MBO to server?

                    did you create a new key for each and every edit box fields?

                    if yes,

                    then you hv to put a new post

                    (only way to chck error is by putting snapshots)

                    Regards,

                    Jitendra

                    (0) 
                    1. ayo shaba

                      Hello Jitendra

                      Yea I did. I traced my mistake to the the policy. I did not select ‘online initially’. This is working now thank you.

                      I am on the POMOB screen but I cannot seem to do any selection. Also I do not see the item no…. What could be wrong here please help.

                      Regards

                      Ayo

                      (0) 
                      1. Jitendra Kansal Post author

                        Hi Ayo,

                        you must have dragged and dropped your MBO to your flow screen.

                        havent you?

                        there you will 2 screens POMBO and POMBODetail

                        when you double click to your POMBO screen , you ll see all 7 fields according to above blog.

                        here, you can select what you would like to show on your scrn.

                        Regards,

                        Jitendra

                        (0) 
                        1. ayo shaba

                          Hello Jitendra

                          Thank you. I can now see the workflows on the iPad. However I get an error whenever I want release a PO “Sybase.UnwiredPlatform.WorkflowClient.RequestFailedException: com.sap.conn.jco.AbapException:Responsibility_FAIL at Sybase.UnwiredPlatform.WorkflowClient.Responder.ProcessSyncRequest(ContextData oContextData, String sData)….”

                          How can I resolve this please?

                          Regards

                          Ayo

                          (0) 
                          1. Jitendra Kansal Post author

                            Hi Ayo,

                            so you are able to view the list of purchase orders. corrct?

                            when you created a new operation to your MBO,

                            did you deploy it to the unwired server or not?

                            it has to be deployed.

                            Regards,

                            Jitendra

                            (0) 
                              1. Jitendra Kansal Post author

                                Hi Ayo,

                                you got stuck while releasing the PO?

                                can u plz put snapshots where you started with ReleaseWF operation so that it would clarify everything?

                                Regards,

                                Jitendra

                                (0) 
  3. Abishek kumar

    Hi jitendra

    This is very good artice. I would like to know one information, whether we can create a table view or screen using hybrid apps?

    Example : On the “Start Screen” we have couple of text boxes and then on the click on a button or menu option a “TABLE” needs to be populated with values in the next screen. this table needs to be visible to the end user. i know there is this list view that you have shown but can we create a table view with 4 or 5 fields?

    Thanks

    Abishek

    (0) 
    1. Jitendra Kansal Post author

      Hi Abhishek,

      thanks for your comment.

      you can design a table in hybrid based app.. but it required lot of customization.

      can be done with help of html5, JS.

      Regards,

      Jitendra Kansal

      (0) 
  4. Katigiri Linganna

    Hi Jitendra,

    it is very good document..

    i have a question how do you get the SAP Definition screen.. and currently i am working with eclipse and i want to bring the sap data with mobile app. how can do it .. can you provie the link if posible..

    thanks and regards

    Linganna Katigiri.

    (0) 
    1. Jitendra Kansal Post author

      currently i am working with eclipse

      here you are talking about Sybase unwired workspace eclipse? correct

      want to bring the sap data with mobile app

      for that you need to establish sap connection from sup workspace…

      (0) 
    1. Jitendra Kansal Post author

      Hi Kunnu

      R1,X, 02 are the test data to execute to bapi .

      you need to check it with your sap backend team of availability of test data.

      Rgrds,

      Jitendra

      (0) 
        1. Jitendra Kansal Post author

          Sybase Unwired Platform (HWC- hybrid web container) kind of apps are platform independent, means same app can be run on any platform( any phone, tab) without doing any modifications.

          These kind of apps are online apps and are lightweight apps like expense approval, purchase order approval, time sheet etc.

          (0) 
  5. Ali Naveed

    Hi jitendra

    can you guide. for example i have a button in start screen and i need to push from start button to PO_MBO programatically.

    what is the syntax ?

    Regard

    AliScreen Shot 2014-06-02 at 12.04.00 PM.png

    (0) 
  6. Ibrahem Ahmed

    hi Jitendra,

    thank you for this valuable blog, but i want to know how would this application communicate with SMP and backend ERP. Should I implement an ABAP code on netweaver gateway to make my ODATA webservice.

    (0) 

Leave a Reply