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
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
select the cache Policy as “online”.
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)
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…
next task, deploy the MBO to your server.
then, create a workflow editor. (PO_test)
drag and drop the MBO from left hand side.
go to start screen,
add 3 EDITBOX to the start screeen.
create the KEY simultaneously for each field… ( here i am passing the fixed “default” value for each one)
create a menu to the start screen. (Get Details)
and set the following properties as below:
go to “Paramter Mappings” …do the following
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
then, generate the workflow package.
you must be see the ouput on your device like below:
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
then use BAPI: BAPI_PO_RELEASE
set the parameters as below
then create two Personalization Keys for each input attributes
then , we have to map these Personalization keys with input attributes of the operation
so, right click on the ReleaseWF operation
then deploy the modified MBO to the unwired server.
go to PO_MBOdetail screen,
create a menu “Release PO” and set the following properties:
(here i have created a “Success Message” screen to see the message after Release the PO)
go to the Parameter Mapping tab
at “Success Messge ” screen , i have added a HTMLView
once again, generate the workflow package. you will see the flow of application like this:
(here my cursor is pointing to 4500000047 PO number > which i want to release)
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.
there is no 4500000047 PO in the latest list.
it means this particular PO has been released.
Regards,
Jitendra
Hi,
Nice Working Jitendra.
Thanks,
Syam.
Hi Jitendra,
Nice Blog.
Thanks®ards
SatyaMurthy
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
Hi Saket,
while coming back which type you are calling.
i think you should call object query findAll.
Thanks&Regards
SatyaMurthy
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.
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.
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
Midhun,
while designing UI, i have marked these 3 fields as READ..
so i dont have to enter it again and again.
Regards,
Jitendra
Saket,
have you resolved your query?
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
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
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
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
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
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
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
Hi Ayo,
i request you to post a new thread.
http://scn.sap.com/community/developer-center/mobility-platform
so that you can put the snapshot where you got stuck.
plz put the first 2 snapshots similar to what i hv put in the strting.
Regards,
Jitendra
Hello Jitendra
Thank you. I have posted a new thread here and attached and inserted screen shot of the error. Please check it out
http://scn.sap.com/thread/3261426
Regards
Ayo
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
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
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
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
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
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
Hello Jitendra
Yes I am able to view list of POs and I deployed to unwired server again.
Regards
Ayo
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
Hello Jitendra
Thank you so much. It is working now. I was using the wrong key for the rel code.
Thank you.
Regards
Ayo
Hi Ayo,
good to hear that you are able to work with this app.
Regards,
Jitendra
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
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
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.
here you are talking about Sybase unwired workspace eclipse? correct
for that you need to establish sap connection from sup workspace...
Jitendra Kansal
When i try to preview the data from ides , with R1 , X , 02 as input parameters does not fetch any data in preview. I also tried changing result checker to null.
kindly suggest to proceed further
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
Good presentation Jitendra. Keep it up.
thanks Raman !!!
Useful information . Thanks Jitendra.
Regards,
Shakeel.
thanks Shakeeluddin Khaja 🙂
Hi Jitendra_Kansal
Is it possible to release multiple MBO at a stretch using checkboxes?
Excellent document....
I must share the document to my Boss..
So that he can release the all PRs from his blackberry....
thanks Dëv Päträ
just to add: This is an example of Hybrid app,the same app can be run on any platform (android, iOS, WM)
OMG.. is it really also possible in android phone???
Even I don't know that...
This is a very good information for me and my organization...
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.
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
Ali
You can directly add a menu item/button to the start screen and make it navigate to PO_MBO screen.
Rgrds,
JK
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.
Ibrahem Ahmed
Above application was built on SUP 2.x using MBO concept. Are you talking wrt to SMP3? You may expose RFC as SOAP WS or OData service using SAP Gateway (SAP Netweaver gateway).
Regards,
JK
Nice presentation and helpfull to me a lot... thanks for sharing us.