cancel
Showing results for 
Search instead for 
Did you mean: 

Need to call a transaction in R3 from portal component

Former Member
0 Kudos

Hi,

The scenario is like this:

I developed a AbstractPortalComponent that stores the User Mapping of a user with a user in R3.

Then I need to call a transaction in R3. How do I do that?

The code I tried is something like this:

//obtain system

String systemalias = "SAP_R3";

// get user from request

IUser iuser = request.getUser ();

// get usermapping service

IUserMappingService iums = (IUserMappingService)

PortalRuntime.getRuntimeResources().getService(IUserMappingService.KEY);

IUserMappingData iumd = iums.getMappingData (systemalias, iuser);

Map map = new HashMap ();

try {

//set the user name

map.put("user","userID");

//set the password

map.put("mappedpassword","passowrd");

iumd.storeLogonData(map);

} catch (Exception e) {response.write(e.getMessage());}

IPortalComponentURI componentURI = request.createPortalComponentURI();

componentURI.setContextName("com.sap.portal.appintegrator.sap.bwc.Transaction");

String url = componentURI.toString() + "?System=SAP_R3&TCode=RZ10&GuiType=WinGui&WinGui_Type=Shortcut" ;

Let me know is this the correct approach to call a transaction thru Java, if so how do I include that URL to the response?

Regards,

Megha.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos
Former Member
0 Kudos

Piyush,

Could you please send me the docs to this emai: (mbokam)at (gmail.com)

Also if you could send me an example on that, that would be great...

Regards,

Megha.

Former Member
0 Kudos

sent.

regards,

piyush

ps: please mark useful answers.

Former Member
0 Kudos

Piyush,

Thanks for doc. But it doesn't have what I am looking for.

I would like to call a transaction like "BBP_QUOT" from java code and it should be opened in a web gui, how do I do that?

Regards,

Megha.

Former Member
0 Kudos

Hi Megha,

Where u able to accomplish this? How did u invoke that URL?

Thanks,

Vishnu

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Megha,

why don´t you use sap-logon-tickets?

Regards

Oliver