How to make a custom Quick Create from EC/TI work in iPad (C4C)
(all credits go to Stefan Krauth)
STEPS
1 – You need to check the “Expose as OBN BO” option in your thing-type file. This enables calling screens via OBN navigation, so you can call screens individually.
– Open your thing-type.
– Go to Controller tab.
– Click on “Thing Type Data” folder.
– Check the option.
2 – Create an OBN Navigation via Wizard on your EC
– Select a name, check the “Thing-based Navigation” option, and pick your custom Thing Type.
– Select “QuickCreate”.
– Select an outport name, Navigation Style “inplace”, PortType Package “/SAP_BYD_UI/SystemPortTypes.PTP.uicomponent” and PortType Reference “ThingNavigation”. Select also your Parameters if any.
3 – Configure Add button
- Open your EC and select the Add button. On the “Thing Type” property underneath (“Properties” tab), do the following:
OutPort to Quick Create: select the outport generated on the previous step.
Quick Create Inport: type the name of your QC’s InPort CORRECTLY!
If you’ve done everything correctly, now it will work in iPad!
However, there is still a problem… we are now forcing to call the OBN-navigation along the Thing-Navigation… iPad player will consider only the OBN, and it will work. But if you trigger it in desktop, you’ll see two Quick Create dialogs!
We need to make sure this is only triggered in iPad!
4 – Create an Event Handler on your EC to call the iPad OutPort only in iPad player.
- Create new Event Handler with a Condition operation.
- Select “Expression”, and select the data field responsible for checking whether scenario is Desktop or not (For more info please read: http://scn.sap.com/thread/3477605)
- Create a Select operation, Compare Type “Constant” and let “Value” empty.
- It means that, if it’s not desktop, then we need to trigger the iPad OutPort!
- Create a new “FireOutport ”operation inside this Select and pick the iPad OutPort
- Create a “Default” operation below the “Select” one and let it empty, with no value or operations.
- Go to your Add button properties (“Thing Type” property underneath) and add this Event Handler to the “Before QuickCreate Navigation” property.
Now the OutPort is only called in iPad player!
If you don’t have the thing-based UIs generated, and you use your custom BO just on an EC, then you can use a similar approach: the only difference is that you need an additional “helper” BO, with an association to the Object you want to create an instance of, so you can build the Quick Create UI based on your “helper” BO. Finally, you create the instances manually via ABSL.
Hope this helps.
Fernando
Can you please share how do we pass the data??
What do you mean? From the EC to the QC?
Do you want to default some fields?
Yes Fernando,
For example I am calling a Custom QC from an EC. And I wnat to make some fields default.
Like if u call opportunity QC from Account TI Account field gets prepoppulated.
I tried with my custom QC it worked for HTML5 and silverlight but not for ipad app.
Regards,
Dhruvin
Make sure the parameters from your EC's OutPort have exactly the same name as in your QC's InPort.
For instance: "Key" and "AccountID".
EC (OutPort)
QC (InPort)
It should do the trick. π
Hi Fernando,
Thanks for the tip π btw just out of the topic... i have a doubt..
That in Advanced list pane in Ipad u see the button of deletebin ( for example Parties involved in opportunity ).
I think SAP Standard screen is using LAyoutStack panel to add the button there , thats what i tried in my advannced list pane but the button is visible in WebUI ( html 5 and silverlight) not in iPad any suggetions?
Check here: How to create a “Delete” button in iPad C4C player
π
Super!
Hi Fernando,
I'm newbie in C4C world and i got two question. I'll be really greateful if you answer this questions.
First is really easy for you,
At first step you say "You need to check the "Expose as OBN BO" option in your thing-type file" but i coudn't find that check property. What do you mean with "thing-type file"?
Second question is,
I'm trying to create QC with SAP Cloud Dev: Thing-Based UI - 1. Basics - YouTube tutorial video (QC session start at 7:55).
I set New button's Semantic property to QuickCreate and then set button's property at Thing Type -> OutPort To Quick Create with "QuickCreate" and then click to save and activate button. After this steps i checked ZTestTB_OWL.OWL.uicomponent to see QC screen but, there's no shown new button.
Result image is here:
edit-19.02.2015
I found thing type file and checked Expose as OBN BO is checked and second problem is still continue.
This time, i tried your solution but same result. I hope you'll give me some tips π
edit-19.02.2015
edit-24.02.2015
When we assign this BO to work center, QC button is really works nice π
edit-24.02.2015
Sorry for my bad english.
Thank you for your share of know-how.
Utku YeΔen
Did you assign the work centre of this BO to your user?
Hi Fernando,
When we assign this BO to work center, QC button is really works nice π
I guess standart-preview-design is not working properly π
Utku YeΔen
Hi Fernando,
Am facing the issue for quite long, am not able to see the button on preview or Portal where as am able to see on the UI designer any particular reason for this how to activate it ? I want to add the new button and on click of the button want to call the QC for the same BO.
Regards
Papps
Hi Papps,
I am also facing the same issue. Where you able to resolve it.
Thanks,
Naga
The iPad native application requires that you configure your custom UIs to how standard UIs are. Not all UI patterns supported in HTML5 are supported on the iPad. There is a iPad UX design guide that described these details.
For your specific example, you must configure the list control as a TOWL, and the tool bar controls must start with a "new" button first, followed by a menu with menu items.
As a best practice, open one of the standard floorplans like the account, task, or contact and you will see how our developers used the UI designer to configure the list controls correctly.
Hi ,
Firstly thanks for this wonderful blog, I gone through this blog my quickcreate is working fine on custom button but it is showing as a popup i dont want to show as a popup i want to show as a inplace hover style. Can you help me on this query.
Another query is like that when we click on save button it should gone to object work list component , it is not going now. Kindly help me for both issues.
Again thanks.
Regards,
Puneet Mittal