cancel
Showing results for 
Search instead for 
Did you mean: 

Calling R3 Transaction from Webdynpro application

Former Member
0 Kudos

HI,

I have to call R3 Transaction from my webdynpro application after user clicks some button .Can any one tell me how to achieve this?

Thanks,

Vinay

Accepted Solutions (1)

Accepted Solutions (1)

sridhar_k2
Active Contributor
0 Kudos

Vinay,

You can achieve that in other way. Create a SAP Transaction view , Which internally point to SAP Transaction.

Access your Transaction view like this.

WDPortalNavigation.navigateAbsolute(

"ROLES:portal_content/com.cv.kaar.Test_Page2",

WDPortalNavigationMode.SHOW_INPLACE,

(String) null,

(String) null,

WDPortalNavigationHistoryMode.NO_DUPLICATIONS,

(String) null,

(String) null,

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

// here is the link for calling iview

https://www.sdn.sap.com/irj/sdn/forums

For more info please go thru this link.

Regards,

Sridhar

Former Member
0 Kudos

Thanks sridhar for replying.I have one doubt,the code which u mentioned above,i need to use this code for button?because i need to access this transaction mm01 when user clicks button in webdynpro appl say "Go to MM01".

Vinay

sridhar_k2
Active Contributor
0 Kudos

Yes. In your Button's action method, write this code. You can even send parameters to that transaction.

First Create and Test Transaction iView and Call it from your web dynpro method.

Cheers,

Sridhar

Former Member
0 Kudos

thanks sridhar.

Former Member
0 Kudos

HI Sridhar,

You said that we can even pass parameters to the transaction,can you please tell me how can we do this.In my requirment i need to pass atleast 3 parameters to the transaction mm01.

Thanks,

Vinay

sridhar_k2
Active Contributor
0 Kudos

Hello Vinay,

Sending Parameters to a transaction iview or any ivew is easy.

Create application parameters from iview properties in Content Administration. like the below way. i have 3 application parameters first two are static and the third one is dynamic, which we are passing thru program.

P_BNKLND=DE&P_ACNUM=12345&P_XSIMUL=

WDPortalNavigation.navigateAbsolute(

"ROLES://portal_content/com.test.sample.iViews/com.test.sample",

WDPortalNavigationMode.SHOW_EXTERNAL,

(String) null,

(String) null,

WDPortalNavigationHistoryMode.NO_DUPLICATIONS,

(String) null,

(String) null,

"P_BNKLND="BankCountry"&P_BNKKEY="BakKey"&P_ACNUM="accountNo"&P_XSIMUL= ");

Regards,

Sridhar

Former Member
0 Kudos

Thanks sridhar,

I have one more quesion on tabstrip ui.

In my view i am using tabstrip controller ,i have two tabs like tab1 and tab2.

In tab1 i have to call table which contains so many entires and also i have to do lot of funcionalities,like i am calling r3 transaction when user clicks button from tab1,and after user closes the r3 screen they should come back to tab1.etc,,the same for tab2.

I wanted to know whether it is feasible to use tabstrip for so many funcionalities,

I never used table control in tabstip,can any one tell me how should i call table control in tab,this one is the same what we do for normal table control when we call in view.

my tabstrip should behave just like the another view,so in my two tabs i have to assume as two views.

let me know whether it is feasible or not.

thanks,

vinay

sridhar_k2
Active Contributor
0 Kudos

Hello Vinay,

For your question, In Tabstip, each tab behaves like a view. You can keep all the controls like a normal view.

You can keep Transaction iView on the same page and one back button, in that button you can navigate it to the previous screen.

Regards,

Sridhar

Former Member
0 Kudos

Thanks sridhar.

Former Member
0 Kudos

hi sridhar,

i tried this code to call transaction,but i am not getting,i wrote this code in button action event.when i click this buton i am unable to open the transaction ivew.

i am giving the right pcd location of transaction iview which i created.

please let me know where i went wrong.

this is my code.

public void onActioncall(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )

{

//@@begin onActioncall(ServerEvent)

// // try {

// WDPortalNavigation.navigateAbsolute(

// "ROLES://portal_content/com.xxx.xxx.xxx/iview/se",

// WDPortalNavigationMode.SHOW_INPLACE,

// (String) null,

// (String) null,

// WDPortalNavigationHistoryMode.NO_DUPLICATIONS,

// (String) null,

// (String) null,

// (String) null);

// }

// catch (Exception e) {

//

// wdComponentAPI.getMessageManager().reportException("An error has occured. Please contact the help desk.", true);

// e.printStackTrace();

// }

//@@end

}

sridhar_k2
Active Contributor
0 Kudos

Vinay,

Try with this below code. replace ROLES:// to ROLES:

// "ROLES:portal_content/com.xxx.xxx.xxx/iview/se",

// WDPortalNavigationMode.SHOW_INPLACE,

// (String) null,

// (String) null,

// WDPortalNavigationHistoryMode.NO_DUPLICATIONS,

// (String) null,

// (String) null,

// (String) null);

Regards,

Sridhar

Answers (2)

Answers (2)

ashwani_tomar
Participant
0 Kudos

Can You pl. tell me how to pass multiple values to a tCode

Former Member
0 Kudos

Hi Vinay,

Though i cannot give the exact scenario how to call a BAPI or a R3 Transaction, the links below will surely help you know how to do it.

please follow the links for detailed examples

SDN Example --> Check for "Backend Access/ Model"

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/49f2ea90-0201-0010-ce8e-de18b94a...

Programming UI and Navigation

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9214b1e5-0601-0010-fdb0-ec3...

Webdynpro for Java

http://help.sap.com/saphelp_nw2004s/helpdata/en/15/0d4f21c17c8044af4868130e9fea07/frameset.htm

Webdynpro Samples

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/web%20dy...

Web Dynpro User Interface

https://www.sdn.sap.com/irj/sdn/developerareas/webdynpro?rid=/webcontent/uuid/ce44a14c-0a01-0010-af8... [original link is broken]

PDf

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/com.sap.km.cm.docs/library/nw/netweaverdevelopersguide2004s/sap%20netweaver%20developer's%20Guide%202004s/UsingJava_00_PDFsList.ca

SAP Netweaver Application Server eLearning Catalog

https://www.sdn.sap.com/irj/sdn/elearn?rid=/webcontent/uuid/b1203f5e-0501-0010-bb88-915402c954f2 [original link is broken]

Hope that will be helpful.

Regards

Anil

Message was edited by:

Armin Reichert

Former Member
0 Kudos

Thanks anil,but i know webdynrpo java ,i am looking for exact solution here,i dont have to read this entire tutorial for this solutuon.