cancel
Showing results for 
Search instead for 
Did you mean: 

Can we use one Transaction iView to call T-Code dynamically ?

Former Member
0 Kudos

Hi,

I have a BAPI which returns me a table with several T-Codes and their description.

The number of T-Codes that my table contains may change. its not static.

Is it possible to call respective transaction iViews dynamically?

Means, The first time user selects MM01 and click on submit it should call transaction iView for MM01.

second time if the user selects MM02, it should call the transaction iView for MM02.

So, is there any way to use just one Transaction iView and dynamically pass the selected T-Code so that they will get called instead of creating multiple transaction iViews in portal.

Regards

Anjana.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

It is possible to navigate to the transaction iview with dynamic transaction codes. Try this:


WDPortalNavigation.navigateAbsolute(
					"ROLES://portal_content/<pcd location of the iview/page>",
					WDPortalNavigationMode.SHOW_INPLACE,
					"",
					"",
					WDPortalNavigationHistoryMode.ALLOW_DUPLICATIONS,
					"",
					"",
					null,
					"TCode=" + <transaction code value>, //the TCode parameter is the key
					true,
					true); 

Regards,

Satyajit.

Former Member
0 Kudos

Hi Satyajit,

Thanks for your reply.

So I can create just one transaction iview and pass the t-codes dynamically right.

But, when i create the transaction iView, what should be specified in the 'Transaction Code' property of the iView?

Shall i just leave it blank?is there any other property that i need to set?

Thanks

Anjana

Former Member
0 Kudos

Hi,

> So I can create just one transaction iview and pass the t-codes dynamically right.

Yes.

> But, when i create the transaction iView, what should be specified in the 'Transaction Code' property of the iView?Shall i just leave it blank?

Yeah, you can just leave it blank

> Is there any other property that i need to set?

You will need the system property of the iView to be set, which will point to the R/3 system.

Regards,

Satyajit.

Former Member
0 Kudos

Hi Satyajit,

Thanks a lot for your replies. I got the solution for my problem from your replies!!!

I just created a sample application with drodwn getting various tcodes from simple types.

When i tried to create the transaction iview, i saw that 'transaction code' property is a required filed. So i gave

wdcontext.currentcontextelemnt.get<mycontextvalueattribute>

And in the application i gave your code with

WDPortalNavigation.navigateAbsolute(

"ROLES://portal_content/<mytransaction iview location>",

WDPortalNavigationMode.SHOW_EXTERNAL,

"",

"",

WDPortalNavigationHistoryMode.NO_DUPLICATIONS,

"",

"",

null,

"TCode=" + wdContext.currentContextElement().getTcode(),

true,

true);

It was passing the selected T-Code and calling the respective one in SAP system.

Thanks Once again!!!

Regards

Anjana

Answers (0)