Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Query about Session Management in WebDynpro Component.

Hi to all, My Requirement is that,i have to Capture User-ID From Logon-Ticket and it will be use in the web-dynpro component,that access the Data From R/3 Server

(Back-end). and according to the login-ID information Captured from the Logon-ticket, i will do some task that will interact with the Bapi(R/3) on the basis of User-ID information. How Can I Do This.....Or How Can I Maintain the USer-Login Information into Portal and Use That in the Web-Dynpro Component embeded in the Portal.......

Plz if any-one have idea about, Help Me.......................

Thnx & Regard's

Dheerendra K. Shukla

Former Member replied

hi, dheeru,

check it out , that code may solve your problum.

Use this code (taken from help.sap.com) which helps you to pass the SAP Logon information dynamically

while connecting to R/3.

import com.sap.mw.jco.*;

public class TutorialConnect1 extends Object {

JCO.Client mConnection;

public Connect1() {

try {

// Change the logon information to your own system/user

mConnection =

JCO.createClient("001", // SAP client

"<userid>", // userid

"****", // password

null, // language

"<hostname>", // application server host name

"00"); // system number

mConnection.connect();

System.out.println(mConnection.getAttributes());

mConnection.disconnect();

}

catch (Exception ex) {

ex.printStackTrace();

System.exit(1);

}

}

public static void main (String args[]) {

Connect1 app = new Connect1();

}

}

Regards.

Jitender

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question