Skip to Content

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

Problem from one abstract component to another abstract component

my problem is that when iam giving inputs from jspdynpage my data is displaying abstact page if iam selecting there user id it was moving to next abstarct page in that i want that person perticular data iam geting data when iam passing directly the pener in coding i want when ever i press the userid of that person that person information

i have provided everyting1) jsp dynpage coding 2)fisrt abst page coding 3)second abst coding

iam using two rfc for first abst iam using one rfc which gets data userid and employee name

and in second abst iam using one more rfc which gets that pernr information

1)This is my jsp dynpage coding where iam passing inputs:------

<%@ page language="java" %>

<html>

<head>

<title>

Title

</title>

</head>

<body>

<form name="form" action="http://srepldev.srhouse.com:50400/irj/servlet/prt/portal/prtroot/zess_pics.abst" method="post">

First Name :<br>

<input type="input" name="num1">

</br>

Last Name :

<br>

<input type="input" name="num2">

</br>

2)This is my first abstract page:----


coding

Writer out = response.getWriter();

String from = request.getParameter("num1");

String to = request.getParameter("num2");

//String Uname = ( "jshaik");

String Uname = request.getParameter( "PERNR");

//out.write("Hi servlet");

JCO.Client mconnection =

JCO.createClient("180",

"maheshs",

"Coolguy403",

"EN",

"150.0.150.141",

"04");

//out.write("created client");

try{

mconnection.connect();

// out.write("connnected");

JCO.Repository mrepository = new JCO.Repository("JCO Sample",

mconnection);

// out.write("connnected");

IFunctionTemplate functiontemplate =

mrepository.getFunctionTemplate("ZMI_EMPLOYEESEARCH");

// out.write("got fn template");

JCO.Function function = functiontemplate.getFunction();

// out.write("got fn template");

function.getImportParameterList().setValue(from.toUpperCase(), "FNAME");

function.getImportParameterList().setValue(to.toUpperCase(),"LNAME");

mconnection.execute(function);

// out.write("fn executed");

JCO.Table mytable = function.getTableParameterList().getTable("IT_P0002");

//response.setContentType("text/html");

// out.write("<html>" +

// "<body>" "<table border='2'> "

// "<th> <td> Employee Id <td><td><td><td></th>");

// for(int i=0; i<mytable.getNumRows(); i++, mytable.nextRow()){

// out.write("<tr>");

// out.write("<td>"(i1));

// out.write("<td>"+mytable.getString("PERNR"));

// out.write("<td>"+mytable.getString("NACHN"));

// out.write("<td>"+mytable.getString("VORNA"));

//for(int i=0; i<mytable.getNumRows(); i++, mytable.nextRow()){

out.write("<html> <body>");

//out.write("<A HREF='<%=http://srepldev.srhouse.com:50400/irj/servlet/prt/portal/prtroot/zess_pics.dyn%>'>"+mytable.getString("NACHN"));

//out.write("<br/><p align='center'> <A HREF= 'http://srepldev.srhouse.com:50400/irj/servlet/prt/portal/prtroot/zess_pics.abst?num1="+from " ' >"mytable.getString("NACHN"));

//out.write("<br/><p align='center'> <A HREF= 'http://srepldev.srhouse.com:50400/irj/servlet/prt/portal/prtroot/zess_pics.abst1?uname="+uname " ' >"mytable.getString("NACHN"));

// out.write(mytable.getString("NACHN"));

//

// out.write(mytable.getString("VORNA"));

for(int i=0; i<mytable.getNumRows(); i++, mytable.nextRow()){

out.write(mytable.getString("NACHN"));

out.write(mytable.getString("VORNA"));

out.write("<p align='left'> <A HREF= 'http://srepldev.srhouse.com:50400/irj/servlet/prt/portal/prtroot/zess_pics.abst1?pernr="+ Uname " ' >"mytable.getString("PERNR")+"</A>");

//out.write("<A HREF='<%=url %>' ><font size="5">Leave</font></A>"+mytable.getString("PERNR"));

}

out.write("</body> </html>");

// out.write(returnstruct.getName());

}catch(Exception e){

//out.write("exception");

//out.write(e.getLocalizedMessage());

}finally{

mconnection.disconnect();

}

3)This following coding for second abstract page:----


coding

Writer out = response.getWriter();

//String from = request.getParameter("num1");

//String to = request.getParameter("num2");

String from = request.getParameter( "PERNR").toString();

// String from = ("00000004");

//

//

// String to = ("00000002");

// String t = ("00000001");

//

//out.write("Hi servlet");

JCO.Client mconnection =

JCO.createClient("180",

"maheshs",

"Coolguy403",

"EN",

"150.0.150.141",

"04");

//out.write("created client");

try{

mconnection.connect();

// out.write("connnected");

JCO.Repository mrepository = new JCO.Repository("JCO Sample",

mconnection);

// out.write("connnected");

IFunctionTemplate functiontemplate =

mrepository.getFunctionTemplate("ZMSS_GETEMPLOYEECOMMN");

// out.write("got fn template");

JCO.Function function = functiontemplate.getFunction();

// out.write("got fn template");

//function.getImportParameterList().setValue(from, "PERNR");

function.getImportParameterList().setValue(from.toUpperCase(), "PERNR");

// function.getImportParameterList().setValue(to.toUpperCase(), "PERNR");

// function.getImportParameterList().setValue(t.toUpperCase(), "PERNR");

//function.getImportParameterList().getStructure("DESTINATION_TO").setValue(to,"CITY");

mconnection.execute(function);

//

String customer = function.getExportParameterList().getValue("EMPNAME").toString();

String customer2 = function.getExportParameterList().getValue("OFFICEMAIL").toString();

String customer3 = function.getExportParameterList().getValue("PERMAIL").toString();

String customer4 = function.getExportParameterList().getValue("OFFICECELL").toString();

String customer5 = function.getExportParameterList().getValue("EMERCELL").toString();

// String customer1 = function.getExportParameterList().getValue("LNAME").toString();

//JCO.Table mytable = function.getTableParameterList().getTable("PERSONALDATA");

//response.setContentType("text/html");

out.write("<html><body>");

out.write("Emp Name : "" " customer +"<br>");

out.write("Office Mail: "" " customer2+"<br>");

out.write("Per Mail : "" " customer3+"<br>");

out.write("Office Cell: "" " customer4+"<br>");

out.write("Emer Cell: "+ customer5+"<br>");

// out.write("Pernr from RFC: <input type='text' value=>"+ customer3);

//out.write(mytable.getString("EMPNAME"));

//

// out.write("Pernr from RFC: <input type='text' value=>"+ customer4);

// out.write("Pernr from RFC: <input type='text' value=>"+ customer5);

out.write("</body></html>");

//

}catch(Exception e){

//out.write("exception");

//out.write(e.getLocalizedMessage());

}finally{

mconnection.disconnect();

}

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