Any way for starting a Fiori App via a SAP GUI Transaction? - sap-fiori

I'm wondering if I can open a Fiori App (by Transaction Code LPD_CUST) from SAP GUI (via a transaction code). So far I think I can somehow achieve that by building a program which open a web browser to access the app's URL. Are there any better way to achieve this goal?

Yes, it is possible, but as you said it needs little coding.
Step 1. Create a class and method. In the method have a simple code as below.
DATA: lv_url type string.
ld_url = '<Direct URL to your Fiori App>'.
CALL FUNCTION 'CALL_BROWSER'
EXPORTING
url = lv_url.
Step 2. SE93 -> Create a Transaction -> Start Object as 'Method of a class'. Mention the above class and method.

Related

How do I pass MobileServiceClient to an activity?

I am building a mobile application using Xamarin.Android. I am also trying to use the Azure Offline Sync. There will be many Activities for various models to be displayed in lists. The question I have is, what is the best method of using the MobileServiceClient? Should I initialize it in the first activity that opens in my application and then pass it to other activities for use? How do I pass that object to other activities? Or is there a way to just initialize it on the first activity and then call it from other activities? Has anyone done this and have advice on the best practice? I have read this SO entry: Passing custom object between Android activities in C# and that seems to be about serializing data to pass it between activities. I don't think I want to pass this as data, I want the full service to be available to all my activities.
Please refer to this. It is about how to create MobileServiceClient in Native Android, but it also can be used in Xamarin.Android.
There is a AzureServiceAdapter class in the link, you can use it to operate the MobileServiceClient class.
About the AzureServiceAdapter:
The MobileServiceClient class should be singleton-pattern.
Initialize the AzureServiceAdapter in your main/first Activity.
Use AzureServiceAdapter.getInstance(); to get the MobileServiceClient's instance in other Activities.

How do I pass a handle of DXGI shared resource to another process?

https://msdn.microsoft.com/en-us/library/windows/desktop/bb174562(v=vs.85).aspx
According to the documentation of IDXGIResource::GetSharedHandle, I should be able to "marshal this handle to another process to share a resource with a device in another process".
But it's not clear how to pass this handle. Can I just pass the value of this handle to another process? Or do I need some specific method?
Thanks!
Microsoft's documentation now suggests using CreateSharedHandle() instead of GetSharedHandle() and creating the texture with D3D11_RESOURCE_MISC_SHARED_NTHANDLE. I had to call DuplicateHandle() in order to pass the created HANDLE to another process to be opened with OpenSharedResource1().
Yes, you can pass this handle directly to another process and access it via OpenSharedResource function.

iOS - PassBook Automatic Updates

I created a pass file and added in the wallet. I was wondering what am I missing that will show the Automatic updates option at the back of the pass ?
Like in this image : https://dxjl3qy52c1o9.cloudfront.net/wp-content/uploads/2016/03/22080644/ios-apple-wallet-share-526x1024.png
Back of my pass looks like this Image :
https://support.apple.com/library/content/dam/edam/applecare/images/en_US/iOS/iphone6-ios9-wallet-pass-auto-updates-inshell.jpg
I added the pass by two ways, one was manually by sending via email and other was adding pass file in the xcode bundle resources and fetching from there via code and adding using Passkit framework as mentioned in this tutorial: https://www.captechconsulting.com/blogs/ios-6-tutorial-integrating-passbook-into-your-applications
Do I need to have a server integrated to make that option show up ? As I read something of the sort in the apple documentation (https://developer.apple.com/library/ios/documentation/PassKit/Reference/PassKit_WebService/WebService.html#//apple_ref/doc/uid/TP40011988) and some other answers.
I am not trying to update the pass, I was just wondering for learning purpose why is that option is not shown at back of my own pass. If some one can clarfiy this, I would be very thankful.
You simply need to have a webServiceURL and authenticationToken in your pass.json to make the option appear.
For updates to work then you will need to implement the web service protocol on your server.

How to make sure that a form is only opened once?

Is it possible to make sure a user only can open one instance of a specific form, for instance CustTrans from CustTable?
Modal form is not an option. Some sort of Singleton pattern?
You can use the global cache for this, more info on MSDN: http://msdn.microsoft.com/en-us/library/aa891830.aspx. However a lot of the time the use of the global cache is a sign of bad design.
You can use the global cache to implement a singleton pattern as demonstrated here: http://www.axaptapedia.com/Singleton_pattern
Also consider alternative solutions to your problem, for example the one used on inventory journals. When you open the lines for a journal, it is marked as "in use" so no one else can open that particular journal.
Side note: I believe what you are trying to achieve is a bit of an anti-pattern. Dynamics AX uses dynalinks to link forms together. All of this functionality will be lost if you implement this.

How to prevent iOS app launching whilest defining protocol handling

I have successfully implemented urlHandling of a self-defined protocol.
I need to prevent the app from launching when other apps try to call this url for security issues. The protocol is only needed for a callback from executed JavaScript-code, so only calls within the app are allowed.
To use the response of UIWebView:stringByEvaluatingJavascriptFromString is not an option because the JS code has to work on multiple platforms.
I thought of intercepting the call itself within my app (which would work by using UIWebViewDelegate:shouldStartLoadWithRequest) but I could not figure out if that is possible with WP8. (In Android this would work with WebViewClient:shouldOverideUrlLoading)
How about implementing the UIApplicationDelegate protocol method:
application:openURL:sourceApplication:annotation:
and checking sourceApplication?
As far as I know, there is no standard API on iOS to have something like a "white-list" for which apps are allowed to call your custom URL scheme and open your app this way. When using this URL schemes, you can only have the whole cake, not just a small piece.
Suggestion A:
You could set a boolean variable in your app delegate to store if openURL was initiated from your app or another, in your view controller check if this variable is set to NO and exchange the rootViewController of your apps' window with a blank screen or an info screen telling the user that the app was not opened from a trusted source or whatever.
Suggestion B:
If you really don't want your app to open, you could make it crash in application:openURL:sourceApplication:annotation:.
Just check if the sourceApplication is a trusted source and if not use something like NSAssert(YES == NO, #"Bad bad boy") to make it crash.
B would only be a hack and I would not consider it best practice. Try suggestion A, it is a much more user-friendly way and you should be able to achieve your goal.
finally I've found a solution that works for me. ;) It's a different approach, though.
First: you might want to check out WebViewJavascriptBridge, thats a Bridge for communication in both directions implementing callbacks and everyhting you might need. But that is working with iframes... I wanted to use ajax.
I'm not implementing a protocol that my app is going to listen to. What I do now is implement a NSURLProtocol, which will allways return NO for canInitWithRequest. I am using a unique path (like /!anythingUnique) to identify my JS-Calls. With that set up I can call ajax and do stuff in the Obj-C code.
implement NSURLProtocol.
register NSURLProtocol via [NSURLProtocol registerClass:[SFJURLProtocol class]];.
you will need to set a baseURL... do that by loading any page or or via webView:loadHTMLSString. Do that when you initialize the controller.
fire Requests from JavaScript
catch them in your canInitWithRequestfunction. You might want to do stuff in the Controller for the sake of clean code, so think of a callback mechanism or something. ;)
???
Profit!
I hope this helps.

Resources