RMI and Threading: Urgent, pls help!
Hi everyone,
I read the previous topics in multithreading but i'm still confused about how RMI works in this case.
I have a client server application with RMI where client runs some time-consuming executables on the server.
(i use Process proc = Runtime.getRuntime().exec(cmd...)...)
Basically I want to make sure that simultaneous requests from different clients execute concurrently, instead of waiting for each other to finish. So my questions are:
1) When mutiple clients are making remote calls, does RMI map each client request to separate thread and execute them simultaneously (if yes, does it have some limit on number of threads that can be created?);
Or will I have to take care of creating threads on the server side for each request myself? if the later is the case, how could I go about doing that?
2) What if all (or some of) the clients are connected from the same VM? How can I ensure that they get executed in different threads, concurrently. Could you pls direct me to ways of implementing it.
any help is greatly appreciated,
yulduz
1) When mutiple clients are making remote calls, does RMI map each client request to separate
thread and execute them simultaneously (if yes, does it have some limit on number of threads
that can be created?); Yes, RMI takes care of launching a thread on each remote call. It actually maintains a pool of threads from which, a free thread is assigned a new request. From then on, you have different threads running in server VM (one per each client call).
Or will I have to take care of creating threads on the server side for each request myself? if the
later is the case, how could I go about doing that?No, you dont have to create any thread just for the purpose of handling a remote call.
2) What if all (or some of) the clients are connected from the same VM? How can I ensure that
they get executed in different threads, concurrently. Could you pls direct me to ways of
implementing it.You dont have to do anything extra for achieving this. It doesnt matter whether you are running clients in the same VM or different VMs. If you want concurrency on the client side, you have to make remote calls from different threads. The following code outlines the difference between concurrency and non-concurrency in client VM (and NOT server VM).
class CallerThread extends Thread {
public void run() {
remoteRef.callMethod();
public class Client {
... main() {
// these are not concurrent in client VM bcos the second call happens only after first one returns
remoteRef.callMethod1();
remoteRef.callMethod2();
CallerThread t1, t2;
// these two calls are concurrent on the client side as they're called from two different threads
t1.start();
t2.start();
}regds,
CA
Similar Messages
-
How do I delete my old iMessage email and change to my current one, that Im using when I buy apps and so on. The old one wont go away when I turn iMessage on and of again. pls help
Anyone had the same?How do I delete my old iMessage email and change to my current one, that Im using when I buy apps and so on. The old one wont go away when I turn iMessage on and of again. pls help
Anyone had the same? -
Very URGENT: PLS HELP:canno resolve symbol session.setAttrribute
hi everbody,
i'm new at this and have got a presentation after 1 day!....pls help
when i compile the servlet i get :
cannot resolve symbol
metod: setAttribute (java.lang.String,java.lang.String)
location: interface(javax.servlet.http.HttpSession)
the servlet that gets te error when comiled is:
* Authenticate.java
// this places all user variables in session
//to access use session.getAttribute
//dispatcher stuff
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpServlet;
import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import java.sql.*;
import java.io.*;
import java.util.*;
* @author Gudiya
* @version
public class Authenticate extends HttpServlet {
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, java.io.IOException {
HttpSession session = request.getSession(true);
Connection con=null;
String sessionid;
String deptcode;
String desig;
String add1;
String add2;
String contname;
PrintWriter out = response.getWriter();
try
response.setContentType("text/html");
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:SACFA","","");
System.out.println("connection established");
catch(ClassNotFoundException e){
System.out.println("database driver not found");
System.out.println(e.toString());
catch(Exception e){System.out.println(e.toString());
// ServletContext context=getServletContext();
String username=request.getParameter("username");
String password=request.getParameter("password");
try{
PreparedStatement stmt=con.prepareStatement("SELECT * FROM AUTHENTICATION,mb_add where AUTHENTICATION.NAME=? AND AUTHENTICATION.PASSWORD=? AND mb_add.DEPT_NAME=?");
stmt.setString(1,username);
stmt.setString(2,password);
stmt.setString(3,username);
ResultSet rs=stmt.executeQuery();
boolean rowfound=false;
rowfound=rs.next();
if (rowfound==true)
sessionid=session.getId();
System.out.println(sessionid);
//context.setAttribute("userid",sessionid);
// session.setAttribute("user",username);
rs.beforeFirst();
while (rs.next())
deptcode=rs.getString("DEPT_CODE");
desig=rs.getString("DESIGNATION");
add1=rs.getString("ADDRESS1");
add2=rs.getString("ADDRESS2");
contname=rs.getString("NAME");
session.setAttribute("dept_code",deptcode);
session.setAttribute("designation",desig);
session.setAttribute("address1",add1);
session.setAttribute("address2",add2);
session.setAttribute("cont_name",contname);
//context.getRequestDispatcher(request.getParameter("dispatcho")).forward(request,response);
} out.println("<html>");
out.println("<head>");
out.println("<title>Successful Login Screen</title>");
out.println("</head>");
out.println("<body bgcolor='ORANGE'>");
out.println("<script language='Javascript'>");
out.println("<!--function send_onclick(mydispatcho) {var dispatcho;if(mydispatcho=='Noc'){ dispatcho='/Noc1';}if(mydispatcho=='Ce'){ dispatcho='/Ce1';} if(mydispatcho=='Bye'){ dispatcho='/Bye1';}}-->");
out.println("</script>");
out.println("WELCOME MEMBERS FROM "+ username);
//print decorative html statements here
out.println(" SELECT NY ONE ACTION:-");
out.println("<form Action="+"\"servlet/noc\""+" method =post>");//call for your noc servlet
//print decorative html statements here
out.println("<INPUT TYPE=submit VALUE='GENERATE NOC' NAME='NOC' language='javascript'>");
out.println("</form>");
//print decorative html statements here
out.println("<form Action="+"\"servlet/comments\""+" method =post>");//call for your comment servlet
out.println("<INPUT TYPE=submit VALUE='ENTER/ MODIFY COMMENTS' NAME='COMMENTS' language='javascript' >");
out.println("</form>");
//print decorative html statements here
out.println("<form Action="+"\"servlet/bye\""+" method = post>");
out.println("<INPUT TYPE=submit VALUE=EXIT NAME=EXIT language='javascript' >"); //place javascript fucction for exiting window
out.println("</form>");
out.println("</body>");
out.println("</html>");
con.close();
} catch( SQLException e){ }
out.close();}
NOTE: I'M USING JDK1.3 and jsdk2.0
pls help me....
Thank u all,
ashnaHTTP Status 404 - /mywork/servlet/Authenticate
hi dheeraj,
thank u so much the servlet comiled!!!
now i have a new problem....the Tomcat server cannot find its class file. i have placed the class file in C:\Program Files\Apache Group\Tomcat 4.1\webapps\mywork\WEB-INF\classes.
the error it shows is as follows:
type Status report
message /mywork/servlet/Authenticate
description The requested resource (/mywork/servlet/Authenticate) is not available.
Apache Tomcat/4.1.18-LE-jdk14
PLEASE HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!11 -
Help Please!!!!! RMI and Threads
My server has 10 threads doing constant polling of network equipment through use of SNMP. I have a servlet that connects to my server and retrieves collected information by using RMI and displays it in the browser window. Browser refreshes the information very often. So, there is a constant flow of RMI traffic between the server and the servlet.
Here is the problem:
There are times when my server stops responding to RMI requests issued by the servlet. All 10 threads that are doing SNMP polling stop being scheduled by the JVM. They block! This picular situation occurs with the server only during RMI requests coming from servlet. It doesn't always happen though. Also, I've noticed that if RMI load is high this problem emerges again.
I get no RMI exceptions.
I am using Apache and Jserv.
All of my attempts to understand and fix the problem have been futile so far. Could a heavy RMI load between my server and servlet be causing my threads to block? Should I decrease my RMI traffic?You have the same problem I had. You need to set the timeout .. so once the timeout is exceeded, an exception is thrown. You need to create a custom RMISocketFactory ... trust me, its easier than it sounds ..check the answers to my post at:
http://forums.java.sun.com/thread.jsp?forum=58&thread=167287
hope that helps. -
Very Urgent Pls help : Change of payload type to user-defined types
Hello Experts
I was using sys.xml_type as payload type in my queue table creation.
consider xml message
<order>
<id>1</id>
<load rerer="mq" erere='gg" > </load>
</order>
This i inserted into queue table using enqueue process.
this is done.
BUT NOW My manager wants to change the payload type.
he created a type
create or replace type systype as object (msg varchar2(4000));
Now payload type of queue table is changed to
PayloadType==>aq.systype.
Pls help me how can i insert xml messages into this queue table.
This is very urgent. Pls help me
SI've just read this thread three times and I have absolutely no idea what you are doing, in what version, and what you are asking for help with.
Do you want to change the message type? If you do you MUST drop the queue and start over again from the beginning.
Do you want to enqueue messages?
Post your DDL and other relevant information or you are on your own. We can not guess at your issue. -
Hello Everyone,
We all know whenever we try to connect to a PC which is not on network, we get UnKnownHostException etc..... by which we can detect that the corresponding PC is not an network(intranet/internet)
But when i send a msg from my PC to my PC, it works fine even if the network is down. I hv provided my PC's IP address instead of using localhost or 127.0.0.1 which reduces the possibility that the msg will not be traversed thru the network.
Any IDEA how this works.
Is There any possible way by which i can detect that my PC is not on network or the PC to which i'm trying to connect is not on network .......
Pls help me out, its really urgent as to be implemented in my Project
Thanks In Advance
Sahil ShaikhHello Surtee
I have developed a Messeging Service for the eCRM Apllication my company is developing and we r in the final stage of debugging.
Now whenever a user sends a msg to a PC which is not on network, the messaging service automatically sends an Offline mssg to that PC. But know i want ot distinguish wheather the PC to which i'm sending the msg is not on network or am I not on network based on this i need to perform diff. actions, hence i wanted to know that how can i detect .......
Pls see if u canhelp me out ......
Thanks
Sahil Shaikh -
A problem in RMI with JSP..pls help
RMI with Java is working fine,but...
1. I am facing a problem when i use RMI with JSP..its throwing an exception during "Naming.lookup"..here is my code snippet:
// i have stored the ServerInf and other classes in a package and i have imported it in the jsp code....object ref is getting created but lookup is throwing an exception...thoguh RMI registry is working(started)
<%
try {
ServerInf ref = (ServerInf)Naming.lookup("rmi://localhost:1098/Server_bind");
catch (Exception ex) {
ex.printStackTrace();
%>
Pls tel me the cause.
2. If i try to use RMI with Servlet and JSP, then wen the JSP runs then, it simply calls the servlet file and displayes a lonk to it instead of executing the servlet class. pls help me with this too...below is the invoking statement:
<form method=post action='http://localhost:8080/servlet/MyRMIservlet'>
hello <input type=submit value=submit>And the exception and error message is.....
-
UnsatisfiedLinkError Problem.(Urgent)Pls Help!!
Hi,
I just want to run a swing under win98 OS platform and an error message appeared :
Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\jdk1.4\jre\bin\awt.dll: An attempt was made to load a program with an incorrect format
I have changed different version of JDK including 1.3.1 and 1.4beta, but the problem still exists.
Is that any special setting need for running interface as I can run the java program in no trouble at all if there is no any interface.
Another thing when i double click the java plug-in, there is an error message: "Could not found the main class. The Program would exit. ". How come?
Pls Help and many thx.Post you code.
-
Its urgent pls help me .
how can i call a portal from webdynpro application
my requirment is
i was created webdynpro application.
in that i was created one view . in that i was created one button (go).
if i click that button i want move some other portal.
how can i acchive pls help me.
its urgent.
pls send any example programe
Message was edited by:
madipadiga nagaraju
Message was edited by:
madipadiga nagarajuhi,
there is no direct tcode for going to webdynpro component/interfaces in ecc 6.0.
but u have se58 in ecc 5.0,as webdynpro convertor.u give ur program name and click web dynpro convertor button then it takes u to se80 .but this wda(webdynpro abap) component comes as in application tree hierarchy .
i can say in wda component refers a class .if u select webdynpro component/interface,it ask u to create a class or interface.
after that it automatically generate component controller(it is also a class),
interface view and windows.all these 3 are classes.for every window one interface view will be created.ie.. window is internal visible where as interface view is external visible.
u create view and embed these views in windows.by going to the window layout,right click on the window name and click embed view.u can enbed as many view as u wish.in order to navigate from one view to other view ,click "create navigation" by right clicking the view plugs.
by default windows and view have inbound plugs.this is literally a event of that class.
if u want to navigate from view1 to view2 ,create outbound plug for view1,the click outbound plug of view1 and right click the click create navigation the select inbound plug of view2.
then create a application .this is simillar of creating an object.
click on this object and test .this will open in browser.
for deploying u have use "sap webdynpro iview". -
Delete duplicate entriess from the internal table its urgent pls help.
Hi friends,
Hope everybody is doing good,Here is m query on delete duplicate data from the intenal table.
I have an internal table which contain data in the following format.
Doc No Comp Cod Vendor Assignment
1500000009 JM11 00000000
1500000008 JM11 20070212(Repeating)
1500000007 JM11 20070212
1500000006 JM11 00000000
1500000005 JM11 00000000
1500000004 JM11 00000000(Repeating)
1500000003 JM11 00000000 (Repeating)
1500000002 JM11 00000000
1500000001 JM11 20050302
1500000000 JM11 00000000
1500000003 JM11 10000088
1500000001 JM11 10000088
1500000030 JM11 10006260
1500000010 JM11 10006269
1500000008 JM11 10006269
1500000006 JM11 10006269
1500000004 JM11 10006269
if you see the document numbers,there are some document number which are repeating here,there are some document numer which contain vendor number but not the assignments,some of the document numbers contain the assignments but not the vendors.
If my internal table contain this kind of data with repeted document numbers than i want the document number which contains only the vendor number.
Pls help me with the appropriate logic,its urgent.
Thanks a lot
mrutyun^Hi,
<u><b>Deleting Adjacent Duplicate Entries</b></u>
To delete adjacent duplicate entries use the following statement:
DELETE ADJACENT DUPLICATE ENTRIES FROM <itab>
[COMPARING <f1> <f2> ...
|ALL FIELDS].
The system deletes all adjacent duplicate entries from the internal table <itab>. Entries are
duplicate if they fulfill one of the following compare criteria:
Without the COMPARING addition, the contents of the key fields of the table must be
identical in both lines.
If you use the addition COMPARING <f1> <f2> ... the contents of the specified fields <f1>
<f2> ... must be identical in both lines. You can also specify a field <fi> dynamically as
the contents of a field <ni> in the form (<ni>). If <ni> is empty when the statement is
executed, it is ignored. You can restrict the search to partial fields by
specifying offset and length.
If you use the addition COMPARING ALL FIELDS the contents of all fields of both lines
must be identical.
You can use this statement to delete all duplicate entries from an internal table if the table is
sorted by the specified compare criterion.
If at least one line is deleted, the system sets SY-SUBRC to 0, otherwise to 4.
Examples
DATA: BEGIN OF LINE,
COL1 TYPE I,
COL2 TYPE I,
END OF LINE.
DATA ITAB LIKE HASHED TABLE OF LINE WITH UNIQUE KEY COL1.
DO 4 TIMES.
LINE-COL1 = SY-INDEX.
LINE-COL2 = SY-INDEX ** 2.
INSERT LINE INTO TABLE ITAB.
ENDDO.
LINE-COL1 = 1.
DELETE TABLE ITAB: FROM LINE,
WITH TABLE KEY COL1 = 3.
LOOP AT ITAB INTO LINE.
WRITE: / LINE-COL1, LINE-COL2.
ENDLOOP.
The output is:
2 4
4 16
The program fills a hashed table with a list of square numbers. The DELETE
statement delete the lines from the table where the key field COL1 has the contents 1 or 3.
Regards,
Bhaskar -
I forgot my icloud email and my password pls help me ineed my phone fix
i forgot my icloud email and password what can i do ? pls help me
Welcome to the Apple community.
Unfortunately, you cannot do very much with your phone unless you get assistance from the previous owner, they should either provide you with the password to unlock it or remove their account from the phone entirely remotely through iCloud.com > Find My Phone. -
Hi guys (very urgent pls help me out)
i have an doubt that iam using JBoss AS, my scienraio is
inital when start my Application Server it will connects to mysql DB datasource, i will retrieve some values those are DB Names like oracle,sql server,db2 etc in my JSP page iam placed at combo box upto this i am very much successful but now my problem is after gettinh those values in html select box.
if user selects Oracle and in the same screen user can enter connection config details and after submitting the request. At runtime App Server want to connect for that particular Database.
for ex Oracle and its connection parameters then it want to connect that particular Database without restarting the server.
so mysql is internal DB and Oracle is external db. how to manage this scienraio
please anyone knows solution, pls help me out......
regards
Yadavhi
the message is very clear that the sold to party ur refering is not from the same sales area. if u have the customer already then extend the same to the said sales area, by common division and distribution channel
<b>reward points</b>
Regards -
I am using the reports 6i and running it on web in excel format and pdf format.
I want to highlight a particular row with some color based on some condition on of the column
how do i do this, pls help me
VinodBear in mind that your 'Excel' format is really just delimited data and a pure ASCII file, which doesn't support the type of highlighting that you're requesting.
In 9i you can use jsp technology to embed reports data directly into an Excel spreadsheet. In this case you could probably also include either an Excel macro, or execute some java code that highlighted the appropriate row/values.
There's an example of this jsp approach available on the demos page available at http://otn.oracle.com/products/reports/htdocs/getstart/demonstrations/index.html
Hope this helps,
Danny -
How to get date and time? pls help~ ~.~
i tried to get time and date, but dint noe hw to get it.. anyone knows hw to get it? pls help mi ~.~
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import java.util.Calendar.*;
public class Login extends JFrame
private JFrame mainFrame;
private JPanel p1;
private JLabel lblUserId, lblPassword;
private JTextField tf1, tf2;
private JButton btnLogin, btnClear;
public Login()
mainFrame=new JFrame();
mainFrame.setTitle("Student Attendance System");
mainFrame.setSize(400,200);
mainFrame.setLocation(100,100);
mainFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
p1=new JPanel();
p1.setLayout(new GridLayout(3,2));
lblUserId=new JLabel("User ID");
lblPassword=new JLabel("Password");
tf1=new JTextField(20);
tf2=new JTextField(20);
btnLogin=new JButton("Login");
btnLogin.addActionListener(new ButtonHandler());
btnClear=new JButton("Clear");
btnClear.addActionListener(new ButtonHandler());
p1.add(lblUserId);
p1.add(tf1);
p1.add(lblPassword);
p1.add(tf2);
p1.add(btnLogin);
p1.add(btnClear);
mainFrame.add(p1);
mainFrame.setVisible(true);
//inner class event handler
public class ButtonHandler implements ActionListener
public void actionPerformed(ActionEvent evt)
Calendar rightNow = Calendar.getInstance();
if(evt.getSource()==btnLogin)
String login=tf1.getText();
String password=tf2.getText();
JOptionPane.showMessageDialog(mainFrame, "Student ID "+login+" Login at " + rightNow ,
"Response", JOptionPane.PLAIN_MESSAGE);
if(evt.getSource()==btnClear)
tf1.setText("");
tf2.setText("");
public static void main(String []args)
JFrame.setDefaultLookAndFeelDecorated(true);
Login l=new Login();
}First off, from http://www.catb.org/~esr/faqs/smart-questions.html
h1. How To Ask Questions The Smart Way:
h3. Write in clear, grammatical, correctly-spelled language
More generally, if you write like a semi-literate boob you will very likely be ignored. So don't use instant-messaging
shortcuts. Spelling "you" as "u" makes you look like a semi-literate boob to save two entire keystrokes. Worse: writing like
a l33t script kiddie hax0r is the absolute kiss of death and guarantees you will receive nothing but stony silence (or, at best,
a heaping helping of scorn and sarcasm) in return.
Next, use a SimpleDateFormat object. You can use it directly or use a date format string to tell it how you want your date string formatted. The API will give you lots of information on how to use this. Note that you'll have to translate the Calendar object to a date object via the getTime() method:
class ButtonHandler implements ActionListener
public void actionPerformed(ActionEvent evt)
Calendar rightNow = Calendar.getInstance();
//** use SimpleDateFormat
SimpleDateFormat dateFormat = new SimpleDateFormat();
String dateString = dateFormat.format(rightNow.getTime());
if (evt.getSource() == btnLogin)
String login = tf1.getText();
String password = tf2.getText();
JOptionPane.showMessageDialog(mainFrame, "Student ID " + login
+ " Login at " + dateString,
"Response",
JOptionPane.PLAIN_MESSAGE);
if (evt.getSource() == btnClear)
tf1.setText("");
tf2.setText("");
}Finally, when posting your code, please use code tags so that your code will retain its formatting and be readable. To do this, either use the "code" button at the top of the forum Message editor or place the tag [code] at the top of your block of code and the tag [/code] at the bottom, like so:
[code]
// your code block goes here.
[/code] -
Download data to Excel- very urgent pls help
Hi Experts
Following is my coding. i need to download and save the it_material table as Excel file.
pls help me out
REPORT zvio1001 LINE-SIZE 190
LINE-COUNT 55
MESSAGE-ID zz
NO STANDARD PAGE HEADING.
TABLES: mara,marce,makt,marc,mvke,zmpkg,t005t,cdhdr.
DATA : BEGIN OF it_mara OCCURS 0,
mandt LIKE mara-mandt, "Client
matnr LIKE mara-matnr,
meins LIKE mara-meins,
laeda LIKE mara-laeda,
aenam LIKE mara-aenam,
END OF it_mara.
DATA : BEGIN OF it_marc OCCURS 0,
matnr LIKE marc-matnr,
werks LIKE marc-werks,
END OF it_marc.
DATA : BEGIN OF it_makt OCCURS 0,
matnr LIKE makt-matnr,
maktx LIKE makt-maktx,
END OF it_makt.
DATA : BEGIN OF it_zmpkg OCCURS 0,
matnr LIKE makt-matnr,
zppqt LIKE zmpkg-zppqt,
zspqt LIKE zmpkg-zspqt,
zpmqt_3 LIKE zmpkg-zpmqt_3,
END OF it_zmpkg .
DATA : BEGIN OF it_material OCCURS 0,
mandt LIKE mara-mandt, "Client
werks LIKE marc-werks,
matnr LIKE marc-matnr,
maktx LIKE makt-maktx,
meins LIKE mara-meins,
zppqt LIKE zmpkg-zppqt,
zspqt LIKE zmpkg-zspqt,
zpmqt_3 LIKE zmpkg-zpmqt_3,
laeda LIKE mara-laeda,
aenam LIKE mara-aenam,
date LIKE sy-datum,
time LIKE sy-uzeit,
user LIKE sy-uname,
END OF it_material.
P a r a m e t e r s *
Start of tabbed screens
SELECTION-SCREEN BEGIN OF TABBED BLOCK list FOR 20 LINES.
SELECTION-SCREEN TAB (30) gc_gen USER-COMMAND gen_tab
DEFAULT SCREEN 1001.
SELECTION-SCREEN TAB (30) gc_view USER-COMMAND view_tab
DEFAULT SCREEN 1002.
SELECTION-SCREEN TAB (30) gc_outp USER-COMMAND outp_tab
DEFAULT SCREEN 1003.
SELECTION-SCREEN END OF BLOCK list.
SELECTION-SCREEN BEGIN OF SCREEN 1001 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK box01 WITH FRAME TITLE text-401.
PARAMETERS : p_werks LIKE marc-werks OBLIGATORY.
PARAMETERS : p_vkorg LIKE mvke-vkorg OBLIGATORY.
SELECT-OPTIONS : s_matnr FOR mara-matnr.
SELECT-OPTIONS : s_mtart FOR mara-mtart.
SELECT-OPTIONS : s_mmsta FOR marc-mmsta. "A01
SELECT-OPTIONS : s_dispo FOR marc-dispo.
SELECT-OPTIONS : s_beskz FOR marc-beskz.
SELECT-OPTIONS : s_lgpro FOR marc-lgpro.
SELECT-OPTIONS : s_lgfsb FOR marc-lgfsb.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(31) text-014.
PARAMETERS : p_repall RADIOBUTTON GROUP sel2 DEFAULT 'X'.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(31) text-011.
PARAMETERS : p_change RADIOBUTTON GROUP sel2.
SELECTION-SCREEN COMMENT 36(1) text-013.
PARAMETERS : p_chgdat LIKE sy-datum DEFAULT sy-datum.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(31) text-010.
PARAMETERS : p_excdel AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK box01.
SELECTION-SCREEN END OF SCREEN 1001.
View Selection Screen
SELECTION-SCREEN BEGIN OF SCREEN 1002 AS SUBSCREEN.
SELECTION-SCREEN BEGIN OF BLOCK box05 WITH FRAME TITLE text-403.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(77) text-109.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(31) text-021.
PARAMETERS: p_sales AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN COMMENT 38(20) text-022.
PARAMETERS: p_mrp AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(31) text-023.
PARAMETERS: p_store AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN COMMENT 38(20) text-024.
PARAMETERS: p_accnt AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(31) text-025.
PARAMETERS: p_cost AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN COMMENT 38(20) text-026.
PARAMETERS: p_purch AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK box05.
SELECTION-SCREEN END OF SCREEN 1002.
SELECTION-SCREEN BEGIN OF SCREEN 1003 AS SUBSCREEN.
extract format selection
SELECTION-SCREEN BEGIN OF BLOCK box04 WITH FRAME TITLE text-402.
PARAMETERS : p_vari LIKE ltdxt-variant OBLIGATORY.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(31) text-009.
PARAMETERS: p_report RADIOBUTTON GROUP sel1 DEFAULT 'X'.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(31) text-016.
PARAMETERS : p_repcoo RADIOBUTTON GROUP sel1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(31) text-017.
PARAMETERS : p_reppak RADIOBUTTON GROUP sel1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(31) text-008.
PARAMETERS: p_extun RADIOBUTTON GROUP sel1.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(31) text-007.
PARAMETERS: p_extpc RADIOBUTTON GROUP sel1.
SELECTION-SCREEN END OF LINE.
PARAMETERS: p_pcfile LIKE rlgrap-filename
DEFAULT 'c:\#ups\CLIENTIDCCYYMMDDHHMMSS.ITM'.
DEFAULT 'd:\P0121205MMM_YYYYMMDD HHMMSS.XLS'.
SELECTION-SCREEN BEGIN OF LINE.
SELECTION-SCREEN COMMENT 1(40) text-015.
SELECTION-SCREEN END OF LINE.
SELECTION-SCREEN END OF BLOCK box04.
SELECTION-SCREEN END OF SCREEN 1003.
F i e l d S y m b o l s *
FIELD-SYMBOLS: <f>.
D a t a *
common include for file layouts
INCLUDE zvin1010.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF screen-name = 'P_PCFILE'.
screen-input = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
I N I T I A L I Z A T I O N *
INITIALIZATION.
gc_gen = text-401.
gc_outp = text-402.
gc_view = text-403.
SET up the file directory depending on the system id.
GET PARAMETER ID 'WRK' FIELD p_werks.
GET PARAMETER ID 'VKO' FIELD p_vkorg.
CLEAR s_mtart.
s_mtart-sign = 'E'.
s_mtart-option = 'EQ'.
s_mtart-low = 'ROH'.
s_mtart-high = ''.
APPEND s_mtart.
CLEAR s_mtart.
s_mtart-sign = 'E'.
s_mtart-option = 'EQ'.
s_mtart-low = 'MFPK'.
s_mtart-high = ''.
APPEND s_mtart.
CLEAR s_mtart.
s_mtart-sign = 'E'.
s_mtart-option = 'EQ'.
s_mtart-low = 'VERP'.
s_mtart-high = ''.
APPEND s_mtart.
START-OF-SELECTION.
check that the download is active
PERFORM get_data.
*& Form GET_DATA
text
--> p1 text
<-- p2 text
FORM get_data .
SELECT mandt matnr meins laeda aenam
FROM mara
INTO TABLE it_mara
WHERE matnr IN s_matnr.
IF NOT it_mara[] IS INITIAL.
SELECT matnr werks
FROM marc
INTO TABLE it_marc
FOR ALL ENTRIES IN it_mara
WHERE matnr = it_mara-matnr
AND werks = p_werks.
SELECT matnr maktx
FROM makt
INTO TABLE it_makt
FOR ALL ENTRIES IN it_marc
WHERE matnr = it_marc-matnr
AND spras = 'E'.
SELECT matnr zppqt zspqt zpmqt_3
INTO TABLE it_zmpkg
FROM zmpkg
FOR ALL ENTRIES IN it_marc
WHERE matnr = it_marc-matnr
AND werks = p_werks.
ENDIF.
LOOP AT it_mara.
READ TABLE it_marc WITH KEY matnr = it_mara-matnr.
IF sy-subrc EQ 0.
READ TABLE it_makt WITH KEY matnr = it_mara-matnr.
IF sy-subrc EQ 0.
READ TABLE it_zmpkg WITH KEY matnr = it_mara-matnr.
IF sy-subrc EQ 0.
it_material-mandt = it_mara-mandt.
it_material-matnr = it_mara-matnr.
it_material-maktx = it_makt-maktx.
it_material-meins = it_mara-meins.
it_material-laeda = it_mara-laeda.
it_material-aenam = it_mara-aenam.
it_material-werks = it_marc-werks.
it_material-zppqt = it_zmpkg-zppqt.
it_material-zspqt = it_zmpkg-zspqt.
it_material-zpmqt_3 = it_zmpkg-zpmqt_3.
it_material-date = sy-datum.
it_material-time = sy-uzeit.
it_material-user = sy-uname.
APPEND it_material.
ENDIF.
ENDIF.
ENDIF.
ENDLOOP.
ENDFORM. " GET_DATAHi Kumar,
After building your it_material internal table, try using GUIO_DOWNLOAD to load the data into an excel sheet.
check this sample code.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
FILENAME = SELECT_FILE " Filename
FILETYPE = 'ASC'
APPEND = ' '
TABLES
DATA_TAB = ITAB_STR_1
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
OTHERS = 22.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
EXIT.
ENDIF.
Hope this is helpful to you. If you need further information, revert back.
Reward all the helpful answers.
Regards
Nagaraj T
Maybe you are looking for
-
Error while billing document releasing to accounting.
Hi Experts, Please give me possible reasons for below error while billing document releasing to accounting. "Valuation with material cost estimate: error with product "500258045" Message no. KE350 Diagnosis In Profitability Analysis (CO-PA), the syst
-
Hi, I am creating a PDF interactive, The pdf contains text, images, audio and video and must be shown in pc machines and Tablet Devices (Android and Ios) I have tryed to export from indesign cs5 directly to PDF interactive. It works fine for Pc machi
-
Nokia 5800 - What news about the new version of fi...
Hi, Everything is said in the subject : it was announced on 1st July as for the N97 one. Regards, ThieRy
-
I need to strike through existing text on a PDF I am trying to edit. strikethrough like this but I cannot seem to locate this key on the page where I am editing the pdf in adobe. Where do I locate this?
-
Mercury Playback Engine does not work in new PP 2014 release?
Hi everyone, I've just downloaded the new 2014 version of PP to get the following message whilst uploading a project I've been working on: 'This project was last used with mercury playback engine GPU acceleration (cuda), which is either not available