cancel
Showing results for 
Search instead for 
Did you mean: 

Opening Transaction iView with OKCODE

Former Member
0 Kudos

We are opening a transaction iView from a web dynpro application via portal navigation. The transaction iView is successully opening.

However, we are attempting to initialize the screen with a specific OKCODE based on some conditions in the Web Dynpro application. The screen is configured to open in DISPLAY or CHANGE mode based on OKCODE. How we are sending this OKCODE is as a request parameter like so:

~OkCode=DISP, or

~OkCode=CHNG

We have verified that the proper ~OkCode value is getting sent based on the screen conditions. However, It does not appear that the Transaction iView is getting this parameter as the screen opens up in display mode no matter what request parameter is sent.

Does anyone have any experience with this? Are we passing the OKCODE correctly? Is there some additional work from a portal perspective that needs to happen? Below is a sample code snippet of how we are linking to the Transaction iView:

String pcd = "portal_content/com.test.content/com.i360.folder.i360/com.i360.folder.iviews/com.ii360.view.propertytree";
String okcode = wdContext.currentContextElement().getRead_only_inputfield() ? "DISP" : "CHNG";
WDPortalNavigation.navigateAbsolute("ROLES://" + pcd, WDPortalNavigationMode.SHOW_HEADERLESS_PORTAL, "width=1280,height=800,resizable=1", "Property Tree", WDPortalNavigationHistoryMode.NO_HISTORY, null, null, "GV_SUBID=" + subid + "&~OkCode=" + okcode + "&~webgui_simple_toolbar=1", true);

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

If you are not able to get url parameter properly, then try to use URLEncode class in order to change url to UTF standard url. Because sometimes some special character like &, % will not work, rather use %26 for & and %25 for % like that.

Thanks!

Former Member
0 Kudos

Looks like a minor issue on our part. Removing the tilde (~) from the OkCode seemed to fix it

String pcd = "portal_content/com.test.content/com.i360.folder.i360/com.i360.folder.iviews/com.ii360.view.propertytree";
String okcode = wdContext.currentContextElement().getRead_only_inputfield() ? "DISP" : "CHNG";
WDPortalNavigation.navigateAbsolute("ROLES://" + pcd, WDPortalNavigationMode.SHOW_HEADERLESS_PORTAL, 
    "width=1280,height=800,resizable=1", "Property Tree", WDPortalNavigationHistoryMode.NO_HISTORY, null, null, 
    "GV_SUBID=" + subid + "&OkCode=" + okcode + "&~webgui_simple_toolbar=1", true);

This does provide another question that we were wondering about. Is it possible to send ~singletransaction and ~webgui_simple_toolbar parameters in the URL to control how the transaction iView is displayed? We are trying to remove the toolbar (with the Menu and other buttons on it) when the transaction iView opens.

Any help would be appreciated.