cancel
Showing results for 
Search instead for 
Did you mean: 

How to pass multiple parameters to a TCode in WD application

ashwani_tomar
Participant
0 Kudos

I have to pass 4 parameters to a TCode which i am calling in my web dynpro application. I have done 1 value before and it worked fine but when im trying to pass more than one it is only passing the last value.

Any suggestions will be highly appreciated ad points will be rewarded.

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

ashwani_tomar
Participant
0 Kudos

Sridhar and UMA,

Thanks for your reply. I am passing multiple parameters right now with this code and they are showing up fine, my parameters are static now how do i pass the vales from context or pass variable,one more thing can i pass local variables instead wdContext.Current.... .

Below is the code

-Ashwani

WDPortalNavigation.navigateAbsolute(

"ROLES://portal_content/com.disney.disco.disco/com.disney.bom.BOM/com.disney.bom.iViews/com.disney.bom.MM01",

WDPortalNavigationMode.SHOW_EXTERNAL,

(String) null,

(String) null,

WDPortalNavigationHistoryMode.NO_DUPLICATIONS,

(String) null,

(String) null,

"RMMG1_REF-MATNR=Ashwani&RMMG1-MBRSH=M&RMMG1-MTART=ABF&RMMG1-MATNR=materialNumber");

sridhar_k2
Active Contributor
0 Kudos

Yes. You can pass dynamic parameters to the Transaction iView (wdContext.currentCon.....).

Let us assume you want to pass Material Number dynamically

String materailNo = wdContext().currentXXX().getMaterialNo();

WDPortalNavigation.navigateAbsolute(

"ROLES://portal_content/com.disney.disco.disco/com.disney.bom.BOM/com.disney.bom.iViews/com.disney.bom.MM01";,

WDPortalNavigationMode.SHOW_EXTERNAL,

(String) null,

(String) null,

WDPortalNavigationHistoryMode.NO_DUPLICATIONS,

(String) null,

(String) null,

"RMMG1_REF-MATNR="materailNo"&RMMG1-MBRSH=M&RMMG1-MTART=ABF&RMMG1-MATNR=materialNumber");

//in the same you can pass all dynamic variable like this.

"RMMG1_REF-MATNR="materailNo"&RMMG1-MBRSH="<dynamic val>"&RMMG1-MTART="<dynamic val>"&RMMG1-MATNR="+<dynamic var>

Regards,

Sridhar

Answers (3)

Answers (3)

ashwani_tomar
Participant
0 Kudos

Thanks Guys,

It solved my problem and i have awarded points to all the helpful answers

-Ashwani

Former Member
0 Kudos

Hi Ashwani,

I am not sure if you have solved the problem. Incase you havent probably this might help.

To Pass dynamic values to the Transasctions from the webdynpro side rather than static values,

WDPortalNavigation.navigateAbsolute("ROLES:portal_content/.../MM01",WDPortalNavigationMode.SHOW_INPLACE,"","",WDPortalNavigationHistoryMode.ALLOW_DUPLICATIONS,"","","","no="+wdcontext.currentContextElement().getNo(),false,false);

where no is the just a string and its value is obtained from the current context element at runtime.

Now in the transaction iview inside the portal, you have a property called application parameter.at this place you need to mention the field name as

RM07M-BWARTWE=<Request.no>

where is RM07M-BWARTWE is the screen field name to which you want to pass the value and no is the string from the webdynpro side.

hope that helped!

Regards

Uma.

raja_thangamani
Active Contributor
0 Kudos

Are you calling Tcode using ITS URL?

If so refer the below blog:

[Pass multiple Parameter via URL |https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/855] [original link is broken] [original link is broken] [original link is broken];

Raja T

ashwani_tomar
Participant
0 Kudos

Yes i am calling TCode Using ITS URL and i need to pass 4 paratemers to my TCode . In the URL u had sent it doesn't say anywhere how to pass more then 1 parameter to the TCode.

Thanks

-Ashwani

raja_thangamani
Active Contributor
0 Kudos

use &SELC_S_DATE-LOW=<select-option_low_value>&SELC_S_DATE-LOW=<select-option_ high_ value> to pass multiple entries.

Raja T

ashwani_tomar
Participant
0 Kudos

Thanks for your reply.

I am trying to call tcode this food but i am only getting two parameters passed first and the last and i also need to know how to pass the variables instead of static values. Below is the code for your reference.

WDPortalNavigation.navigateAbsolute(

"ROLES://portal_content/com.ney.bom.iViews/com.bom.MM01",

WDPortalNavigationMode.SHOW_EXTERNAL,

(String)

null,

(String)

null,

WDPortalNavigationHistoryMode.NO_DUPLICATIONS,

(String)

null,

(String)

null,

"RMMG1_REF-MATNR= refCode&RMMG1-MBRSH= BakKey&RMMG1-MTART= accountNo&RMMG1-MATNR= materialNumber");

sridhar_k2
Active Contributor
0 Kudos

Passing Parameters to a Transaction iview is simple.

WDPortalNavigation.navigateAbsolute(PageURL, WDPortalNavigationMode.SHOW_INPLACE, WDPortalNavigationHistoryMode.NO_DUPLICATIONS,

queryString);

PageURL - pcd location , ex :- String PageURL

"Name=" + wdContext.currentContextElement().getName();

Regards,

Sridhar