Readline() function is not reading the message sent
Hi I developed a small socket server to receive GPS positions over IP. the system is very simple it listen to a port using the following syntax
Server.this.socket = Server.this.ssocket.accept();
and when a client is connected a new thread will be created using the following syntax
try {
Server.this.clientThread = new ClientThread(Server.this.socket);
Thread t = new Thread(Server.this.clientThread);
Server.this.clientThread.addObserver(Server.this);
Server.this.clients.addElement(Server.this.clientThread);
System.out.println("System reading the process 4");
t.start();
} catch (IOException ioe) {
System.out.println("Thread Error");
try{
System.out.println("Start reading the buffer ");
in = new BufferedReader(new InputStreamReader(Server.this.socket.getInputStream()));
out = new PrintWriter(Server.this.socket.getOutputStream(), true);
} catch (IOException e) {
System.out.println(e);
System.exit(-1);
line = in.readLine();
Normally when I run it in a lan environment the system is well functionning and I recieve the data properly. but when I upload it to the hosting server the software is blocked on the level of
line = in.readLine();
and stop execution after that line and if I disconnect the client software that I am using for testing the software will crash.
thank you for your response in fact I surely made some research while developping and had a lo of code and sample that I combined together. In my question I added small part of the code. In Fact the exceptions for readline can be througn be on level "WriteLog("Thread Error "+ioe);"
In fact this program function very good in local environment. it seems the program is crashing on the level of readline() but nothing is writen on the log file.
in our lan environment I can send messages from several stations in the same time and insert them in the database properly.
package com.usal.serverPattern;
import java.net.*;
import java.util.*;
import java.io.*;
import java.sql.*;
import java.text.*;
import java.awt.*;
public class Server implements Observer {
private Socket socket;
private Vector clients;
private ServerSocket ssocket; //Server Socket
private StartServerThread sst; //inner class
private SimpleDateFormat formatter; // Formats the date displayed
private ClientThread clientThread;
/** Port number of Server. */
private int port;
private boolean listening; //status for listening
public Server() {
this.clients = new Vector();
this.port = 2029; //default port
this.listening = false;
public void startServer() {
if (!listening) {
this.sst = new StartServerThread();
this.sst.start();
this.listening = true;
System.out.println("Server Started");
WriteLog("Server Started");
public void stopServer() {
if (this.listening) {
this.sst.stopServerThread();
//close all connected clients//
System.out.println("Threadclosed");
WriteLog("Thread closed");
java.util.Enumeration e = this.clients.elements();
while(e.hasMoreElements()) {
ClientThread ct = (ClientThread)e.nextElement();
ct.stopClient();
this.listening = false;
public void update(Observable observable, Object object) {
//notified by observables, do cleanup here//
this.clients.removeElement(observable);}
public int getPort()
return port;
public void setPort(int port)
this.port = port;
private class StartServerThread extends Thread {
private boolean listen;
public StartServerThread() {
this.listen = false;
public void run() {
String line;
BufferedReader in = null;
PrintWriter out = null;
this.listen = true;
try {
Server.this.ssocket = new ServerSocket(Server.this.port);
while (this.listen) {
//wait for client to connect//
Server.this.socket = Server.this.ssocket.accept();
System.out.println("Client connected ");
WriteLog("Client connected ");
try {
Server.this.clientThread = new ClientThread(Server.this.socket);
WriteLog("System reading the process 1");
System.out.println("System reading the process 1");
Thread t = new Thread(Server.this.clientThread);
WriteLog("System reading the process 2");
System.out.println("System reading the process 2");
Server.this.clientThread.addObserver(Server.this);
WriteLog("System reading the process 3");
System.out.println("System reading the process 3");
Server.this.clients.addElement(Server.this.clientThread);
WriteLog("System reading the process 4");
System.out.println("System reading the process 4");
t.start();
System.out.println("Server Thread Server Started ");
WriteLog("Server Thread Server Started ");
} catch (IOException ioe) {
//some error occured in ClientThread //
WriteLog("Thread Error 1"+ioe);
System.out.println("Thread Error"+ioe);
try{
WriteLog("Start reading the buffer ");
System.out.println("Start reading the buffer ");
in = new BufferedReader(new InputStreamReader(Server.this.socket.getInputStream()));
out = new PrintWriter(Server.this.socket.getOutputStream(), true);
} catch (IOException e) {
System.out.println("Accept failed: 2029"+e);
WriteLog("Accept failed: 2029");
System.exit(-1);
WriteLog("Start reading the Info ");
line = in.readLine();
WriteLog("Finish reading the info ");
java.util.Date currentDate;
currentDate = new java.util.Date();
formatter = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss", Locale.getDefault());
Statement stmt = null;
//making the database connection
try {
String dsn = "jdbc:odbc:IntegralFleet";
String user = "paty";
String password = "takingflight501";
// Connect to the database
Connection conn = DriverManager.getConnection(dsn, user, password);
stmt = conn.createStatement();
stmt.execute("Insert into socketvehi (IDVEHI, Message, Date) Values('Vehi1', '"+ line +"', '"+ formatter.format(currentDate) +"')");
System.out.println("DataBase Updated");
WriteLog("DataBase Updated");
stmt.close();
stmt = null;
catch (SQLException ex) {
// handle any errors
System.out.println("SQLException: " + ex.getMessage());
WriteLog("SQLException: " + ex.getMessage());
System.out.println("SQLState: " + ex.getSQLState());
WriteLog("SQLState: " + ex.getSQLState());
WriteLog("VendorError: " + ex.getErrorCode());
} catch (IOException ioe) {
WriteLog("Thread Error "+ioe);
public void stopServerThread() {
try {
Server.this.ssocket.close();
catch (IOException ioe) {
//unable to close ServerSocket
WriteLog("unable to close ServerSocket "+ioe);
this.listen = false;
public void ExecSQL(String strSQL){
Statement stmt = null;
//making the database connection
try {
//Connection conn = DriverManager.getConnection("jdbc:mysql://Localhost/MapServer?user=gas&password=test");
Connection conn = DriverManager.getConnection("jdbc:microsoft:sqlserver://GISLEB1:1433","sa","");
stmt = conn.createStatement();
stmt.execute(strSQL);
stmt.close();
stmt = null;
catch (SQLException ex) {
// handle any errors
System.out.println("SQLException: " + ex.getMessage());
WriteLog("SQLException: " + ex.getMessage());
System.out.println("SQLState: " + ex.getSQLState());
WriteLog("SQLState: " + ex.getSQLState());
WriteLog("VendorError: " + ex.getErrorCode());
public void ParseMessage(String strValue){
//Variables Declaration
String strTime;
String[] strSplitValue;
String strDate;
String strLatitude;
String strLongitude;
String strMinutes;
String strREQ;
float fltMinutes;
strSplitValue = strValue.split(",");
strTime = strSplitValue[1].substring(0,2)+":";
strTime = strTime+strSplitValue[1].substring(3,2)+":";
strTime = strTime+strSplitValue[1].substring(4,2);
strLatitude = strSplitValue[3].substring(0,2);
strMinutes = strSplitValue[3].substring(3,7);
fltMinutes = Float.parseFloat(strMinutes)/60;
strLatitude = strLatitude+":"+fltMinutes;
strLongitude = strSplitValue[5].substring(0,2);
strMinutes = strSplitValue[5].substring(3,7);
fltMinutes = Float.parseFloat(strMinutes)/60;
strLongitude = strLongitude+":"+fltMinutes;
strDate = strSplitValue[9].substring(0,2)+"-";
strDate = strDate+strSplitValue[9].substring(3,2)+"-";
strDate = strDate+strSplitValue[9].substring(4,2);
strREQ = "Insert into socketvehi (Time, Valid, Latitude, Longitude, Speed, Date) Values('"+strTime+"', '"+strSplitValue[2]+"', "+
strLatitude+", "+strLongitude+","+strSplitValue[7]+",'"+strDate+"')";
ExecSQL(strREQ);
public void WriteLog(String Value) {
String textline = null;
String AddText = "";
java.util.Date currentDate;
currentDate = new java.util.Date();
try {
FileReader file=new FileReader("LOG.DAT");
BufferedReader buffer=new BufferedReader(file);
while((textline = buffer.readLine()) != null)
AddText = AddText+textline+"\t\n";
buffer.close();
catch (IOException e) {System.out.println(e);
AddText = AddText+Value+" " + currentDate.toString();
try {
FileWriter file = new FileWriter("LOG.DAT");
BufferedWriter buffer1 = new BufferedWriter(file);
buffer1.write(AddText);
buffer1.close();
catch (IOException e) {System.out.println(e);
public static void main(String[] args){
//Loading the db Drivers
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
} catch (Exception ex) {
System.out.println(ex);
System.exit(-1);
Server Svr = new Server();
Svr.startServer();
}
Similar Messages
-
New Email notification only looks unread for about 3 minutes even if I have not read the message
I have just started using Microsft Outlook to use my yahoo account. Both of those services show a new message as unread indefinitely but for some reason, my 8310 only shows the new email as new for about 3 minutes.
In the BB Mail-Options General options - I have the Display Message count as Unread, and the Display New Message INdicator as Yes, and under the Email Reconciliation it reads On. It used to work fine but all of the sudden something has changed.
Does anyone have any tips on this issue? I would hate to miss an important new message when I am traveling.Take it to apple store and don't replace it with the new one my son had the same problem he was in there about 10 minutes and walked out with a new phone
-
The messages sent with PC suite are not saved in m...
I have a bluetooth device to connect my phone (Nokia 6233) to PC. When I'm trying to send a message everything goes perfect (the message is sent) only one problem appear: the message is not saved in my phone.
Any ideas for this problem?
Why the messages sent with PC suite are not saved in my phone?there may be differencies between phone models here (S60 devices or S40 devices, you have S40). Also if I recall right, it used to be so that some older versions of PC Suite did not save the PC sent sms's to phone.
However, with my N95 the messages are saved. So make sure you have the latest Pc Suite and then try again. If it fails, then it might be that message saving is not supported with S40 phones (Anyone having a S40 phone could verify this) -
I am trying to import cr2files from the camera into lightroom 5 and keep getting an error message saying Lightroom can not read the files and therefore will not import them. Has anyone had a similar problem….thanks
If you are having the same problem, i.e. a disk permission problem, open your favorite search engine and search on, "change disk permissions", and I think you'll find plenty of information on how to fix the problem. This is a Lightroom forum. Your problem is with your operating system. There is no sense in rewriting instructions that are already available if you do a simple search.
-
The storage location/batch function * is not defined here - Message no. M7116
Hi Experts,
we have a scenario - Project Subcontracting Purchase Order, Item Category - L and Account Assignment - Q.
Delivery created, one of the component is Batch managed and with Batch Spli Exists.
When performing Good Receipt in MB01 t-code for movement type 543 R (Special Stock), batch determination fails for batch split scenarios; we get the following error message:
The storage location/batch function * is not defined here:
Message no. M7116
The batch determination works fine, if the PO is with Item Category - L and Account assignment - Blank, then the movement type will be 543 O
Steps for Reconstruction
MB01, Mvt 101, enter SUBCON PO (Item Cat L and Account assignment
Q), SL
Delivery should have batch split
for 101 Mvt, system determine the batch
543 R Mvt should allow for wildcard search in batch field, the
wildcard search works for other Mvt like 543 O.
Note:
we foresee we have to maintain an entry in OMCG for Movement type 543 and Special Stock R.
543 o already exists there. But we are unable to Add/Delete any entry there.
Please advise.
Thanks and Regards,
Nagaraja Achar.Hello Dennis,
try the new transaction (MIGO): Use the 'Distribute qty' pushbutton. For all goods receipts (with or without special stock) it is possible to create several batches.
Regards
Michael -
Windows error message "Setup could not read the CD you inserted..."
I partitioned my Macbook HD using bootcamp assistant and allowed 32GB for the partition. Then I tried installing windows using the assistant. I only get as far as verifying the windows CD (not far as which file system to use FAT32 or NTFS). Then I receive the error message, "Setup could not read the CD you inserted, or the CD is not a vaild windows CD." I am using the Windows XP Service Pack 2 version - not an upgrade. Also I tried booting up straight to the CD but that did not help either. Any suggestions?
Please disregard my question. Although my Windows XP Pro documentation and folder did not say upgrade I just looked at the CD for the tenth time and just saw Upgrade printed on the CD. I'm not making excuses but the holographic images make the CD a little hard to read. Sorry for the trouble. I guess I will be going out and buying the full version now.
-
My wife, daughter and I have iPhones with iMessage and Send Read Receipts activated. All the messages sent between the three of us are blue however, when my wife messages me, the message appears in green on her iPhone. Can anyone explain why.
Because some kind of error occured. This is only from her iPhone to your iPhone? Whenever she sends a message to any other iPhone, it is sent as blue? And when anyone else sends you a message from an iPhone, it sends as blue?
-
My iphone has displayed a warning message two days ago that if i dont ..... i cannot purchase anymore applications but I could not read the first sentence and now I am unable to purchase
That error message suggest you have a permissions issue. Make sure you have full read/write privileges for the Drive/ Folder location that you are copying the files to.
-
Contacts not shown in messages sent via PC Suite
Hi all,
OS : Windows XP SP2
Connectivity : USB CA 101
Handset : Nokia N 82
Handset details : V 30.0.019
RM-313
Issue : If i send any message from my phone, in sent folder the contact person's name will display whereas for the messages sent via pc suite's communication centre, in sent folders only numbers are displayed despite the contacts are stored in the phone, same contacts' name will displayed if a message is sent via phone??? Is it an issue? Known bug from PC Suite ???there may be differencies between phone models here (S60 devices or S40 devices, you have S40). Also if I recall right, it used to be so that some older versions of PC Suite did not save the PC sent sms's to phone.
However, with my N95 the messages are saved. So make sure you have the latest Pc Suite and then try again. If it fails, then it might be that message saving is not supported with S40 phones (Anyone having a S40 phone could verify this) -
Function module to read the the idoc
Hi abap gurus,
I have an inbound idoc coming form a wms system .The IDOC is for goods recieved . how can I read the idoc to update the inbound delivery data in the sap system ? Is there any function module to read the data from teh inbound idoc ?Hi Gaurab,
Creating a Function Module (Direct Inbound Processing)
This step describes how to create a function module which is identified by the IDoc Interface using a new process code and called from ALE (field TBD52-FUNCNAME). Direct inbound processing using a function module (not using a workflow) always includes the ALE layer. This setting (processing with function module and ALE layer) is identified by the value 6 in the field TEDE2-EDIVRS, which is read by the function module IDOC_START_INBOUND. IDOC_START_INBOUND then calls ALE.
Prerequisites
You must have completed the required steps in Defining and Using a Basic Type .
Procedure
Choose Tools ® ABAP Workbench ® Development ® Function Builder, and create a new function module.
Create the segments as global data in your function group. The function module should copy the application data from the segments into the corresponding application tables and modify the IDoc status accordingly. If an error occurs, the function module must set the corresponding workflow parameters for exception handling.
Activate the function module: From the initial screen of the Function Builder select .
In the example, create the function module IDOC_INPUT_TESTER with a global interface. The function module is called when an IDoc of type TESTER01 is received for inbound processing. You will assign an application object ("standard order") to this IDoc type and therefore maintain tables from SD. To do this, call transaction VA01 using the command CALL TRANSACTION. Please note that the intention here is not to simulate a realistic standard order, but only to illustrate how data reaches application tables from an IDoc table via segment structures (form routine READ_IDOC_TESTER) and how the function module triggers an event for exception handling (by returning suitable return variables to the ALE layer in the FORM routine RETURN_VARIABLES_FILL).
A comprehensive example of the code for an inbound function module is provided in the ALE documentation in the SAP Library under Example Program to Generate an IDoc. This function module, for example, also checks whether the logical message is correct and calls a (fictitious) second function module which first writes the application data and then returns the number of the generated document. In addition, status 53 is only set if the application document was posted correctly.
Administration parameters for IDOC_INPUT_TESTER
Application abbreviation
V (Sales and Distribution)
Processing type
Normal, start immediately
Interface for IDOC_INPUT_TESTER (global interface)
Formal parameters
Reference structure
Explanation
Import parameters
INPUT_METHOD
BDWFAP_PAR-INPUTMETHD
Describes how the function module is to be processed (example: in the background)
MASS_PROCESSING
BDWFAP_PAR-MASS_PROC
Mass inbound processing? (indicator)
Export parameters
WORKFLOW_RESULT
BDWFAP_PAR-RESULT
Set to 99999 if an event is to be triggered for error handling.
APPLICATION_VARIABLE
BDWFAP_PAR-APPL_VAR
Variable freely available from application for workflow
IN_UPDATE_TASK
BDWFAP_PAR-UPDATETASK
Asynchronous update? (indicator is not set in example)
CALL_TRANSACTION_DONE
BDWFAP_PAR-CALLTRANS
Transaction called? (indicator is not set in example)
Table
IDOC_CONTRL
EDIDC
IDoc control record
IDOC_DATA
EDIDD
IDoc data records
IDOC_STATUS
BDIDOCSTAT
IDoc status records for ALE
RETURN_VARIABLES
BDWFRETVAR
IDoc assigned to Object type method parameters.
SERIALIZATION_INFO
BDI_SER
If several IDocs are to be processed in a certain sequence: this structure contains the necessary information
Example
FUNCTION IDOC_INPUT_TESTER.
""Globale Schnittstelle:
*" IMPORTING
*" VALUE(INPUT_METHOD) LIKE BDWFAP_PAR-INPUTMETHD
*" VALUE(MASS_PROCESSING) LIKE BDWFAP_PAR-MASS_PROC
*" EXPORTING
*" VALUE(WORKFLOW_RESULT) LIKE BDWFAP_PAR-RESULT
*" VALUE(APPLICATION_VARIABLE) LIKE BDWFAP_PAR-APPL_VAR
*" VALUE(IN_UPDATE_TASK) LIKE BDWFAP_PAR-UPDATETASK
*" VALUE(CALL_TRANSACTION_DONE) LIKE BDWFAP_PAR-CALLTRANS
*" TABLES
*" IDOC_CONTRL STRUCTURE EDIDC OPTIONAL
*" IDOC_DATA STRUCTURE EDIDD
*" IDOC_STATUS STRUCTURE BDIDOCSTAT
*" RETURN_VARIABLES STRUCTURE BDWFRETVAR
*" SERIALIZATION_INFO STRUCTURE BDI_SER
initialize SET/GET Parameter and internal tables
PERFORM INITIALIZE_ORGANIZATIONAL_DATA.
Move IDOC to internal tables of application
PERFORM READ_IDOC_TESTER.
call transaction Order Entry VA01
PERFORM CALL_VA01_IDOC_ORDERS USING ERRORCODE.
set status value
perform write_status_record using errorcode.
return values of function module
PERFORM RETURN_VARIABLES_FILL USING ERRORCODE.
ENDFUNCTION.
FORM INITIALIZE_ORGANIZATIONAL_DATA.
initialize SET/GET parameters
SET PARAMETER ID 'VKO' FIELD SPACE.
SET PARAMETER ID 'VTW' FIELD SPACE.
SET PARAMETER ID 'SPA' FIELD SPACE.
SET PARAMETER ID 'VKB' FIELD SPACE.
SET PARAMETER ID 'VKG' FIELD SPACE.
initialize internal tables
REFRESH BDCDATA.
CLEAR BDCDATA.
CLEAR BELEGNUMMER.
CLEAR ERRTAB.
REFRESH ERRTAB.
REFRESH XBDCMSGCOLL.
CLEAR XBDCMSGCOLL.
ENDFORM. " INITIALIZE_ORGANIZATIONAL_DATA
FORM READ_IDOC_TESTER.
PERFORM INITIALIZE_IDOC.
LOOP AT IDOC_DATA
WHERE DOCNUM = IDOC_CONTRL-DOCNUM.
CASE IDOC_DATA-SEGNAM.
header data
WHEN 'E1HEAD'.
MOVE IDOC_DATA-SDATA TO E1HEAD.
PERFORM PROCESS_SEGMENT_E1HEAD.
position data
WHEN 'E1ITEM'.
MOVE IDOC_DATA-SDATA TO E1ITEM.
PERFORM PROCESS_SEGMENT_E1ITEM.
ENDCASE.
ENDLOOP.
only when there were one or more items
CHECK FIRST NE 'X'.
APPEND XVBAP. "last one
ENDFORM. " READ_IDOC_TESTER
FORM INITIALIZE_IDOC.
CLEAR XVBAK.
REFRESH XVBAP.
CLEAR XVBAP.
POSNR = 0.
FIRST = 'X'.
ENDFORM. " INITIALIZE_IDOC
FORM PROCESS_SEGMENT_E1HEAD.
requested date of delivery
WLDAT = E1HEAD-WLDAT.
delivery date
XVBAK-BSTDK = E1HEAD-BSTDK.
customer number
XVBAK-KUNNR = E1HEAD-AUGEB.
order number
XVBAK-BSTNK = E1HEAD-BELNR.
division
XVBAK-SPART = E1HEAD-SPART.
distribution channel
XVBAK-VTWEG = E1HEAD-VTWEG.
sales organization
XVBAK-VKORG = E1HEAD-VKORG.
order type
XVBAK-AUART = E1HEAD-AUART.
do not fill incoterms (inco1, inco2)
customer function
CALL CUSTOMER-FUNCTION '001'
EXPORTING
PI_VBAK621 = XVBAK
IMPORTING
PE_VBAK621 = XVBAK
TABLES
PT_IDOC_DATA_RECORDS = IDOC_DATA.
ENDFORM. " PROCESS_SEGMENT_E1HEAD
FORM PROCESS_SEGMENT_E1ITEM.
position number
XVBAP-POSNR = XVBAP-POSNR + 1.
amount
XVBAP-WMENG = E1ITEM-MENGE.
unit
CALL FUNCTION 'ISO_TO_SAP_MEASURE_UNIT_CODE'
EXPORTING
ISO_CODE = E1ITEM-BMEINH
IMPORTING
SAP_CODE = XVBAP-VRKME
EXCEPTIONS
OTHERS = 0.
material number
XVBAP-MATNR = E1ITEM-LMATNR.
CALL CUSTOMER-FUNCTION '002'
EXPORTING
PI_VBAP621 = XVBAP
IMPORTING
PE_VBAP621 = XVBAP
TABLES
PT_IDOC_DATA_RECORDS = IDOC_DATA.
APPEND XVBAP.
ENDFORM. " PROCESS_SEGMENT_E1ITEM
FORM CALL_VA01_IDOC_ORDERS USING ERRORCODE.
call transaction first dynpro
PERFORM DYNPRO_START.
call transaction double-line entry
PERFORM DYNPRO_DETAIL2.
incoterms
PERFORM DYNPRO_HEAD_300.
call transaction item datas
PERFORM DYNPRO_POSITION.
PERFORM DYNPRO_SET USING 'BDC_OKCODE' 'SICH'.
determine input method
IF INPUT_METHOD IS INITIAL.
INPUT_METHOD = 'N'.
ENDIF.
call transaction VA01
CALL TRANSACTION 'VA01' USING BDCDATA
MODE INPUT_METHOD
UPDATE 'S'
MESSAGES INTO XBDCMSGCOLL.
errorcode = SY-SUBRC. " remember returncode for status update
ENDFORM. " CALL_VA01_IDOC_ORDERS
form write_status_record using errorcode.
FILL IDOC_STATUS
IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
IF ERRORCODE = 0.
IDOC_STATUS-STATUS = BELEG_GEBUCHT. "value 53
GET PARAMETER ID 'AUN' FIELD BELEGNUMMER.
IDOC_STATUS-MSGID = 'V1'.
IDOC_STATUS-MSGNO = '311'.
IDOC_STATUS-MSGV1 = 'Terminauftrag'.
IDOC_STATUS-MSGV2 = BELEGNUMMER.
ELSE.
IDOC_STATUS-STATUS = BELEG_NICHT_GEBUCHT. "value 51
IDOC_STATUS-MSGID = SY-MSwGID.
IDOC_STATUS-MSGNO = SY-MSGNO.
IDOC_STATUS-MSGV1 = SY-MSGV1.
IDOC_STATUS-MSGV2 = SY-MSGV2.
IDOC_STATUS-MSGV3 = SY-MSGV3.
IDOC_STATUS-MSGV4 = SY-MSGV4.
ENDIF.
APPEND IDOC_STATUS.
ENDFORM.
FORM DYNPRO_START.
PERFORM DYNPRO_NEW USING PROGRAMM_AUFTRAG
DYNPRO-EINSTIEG
CHANGING LAST_DYNPRO.
ordertype
PERFORM DYNPRO_SET USING 'VBAK-AUART' XVBAK-AUART.
sales organization
PERFORM DYNPRO_SET USING 'VBAK-VKORG' XVBAK-VKORG.
Distribution channel
PERFORM DYNPRO_SET USING 'VBAK-VTWEG' XVBAK-VTWEG.
Division
PERFORM DYNPRO_SET USING 'VBAK-SPART' XVBAK-SPART.
Sales office
PERFORM DYNPRO_SET USING 'VBAK-VKBUR' XVBAK-VKBUR.
Sales group
PERFORM DYNPRO_SET USING 'VBAK-VKGRP' XVBAK-VKGRP.
ENDFORM. " DYNPRO_START
FORM DYNPRO_NEW USING PROGNAME
DYNPRONR
CHANGING LAST_DYNPRO.
CLEAR BDCDATA.
BDCDATA-PROGRAM = PROGNAME.
BDCDATA-DYNPRO = DYNPRONR.
BDCDATA-DYNBEGIN = 'X'.
APPEND BDCDATA.
LAST_DYNPRO = DYNPRONR.
ENDFORM. " DYNPRO_NEW
FORM DYNPRO_SET USING FELDNAME
FELDINHALT.
CLEAR BDCDATA.
CHECK FELDINHALT NE SPACE.
dynpro field name
BDCDATA-FNAM = FELDNAME.
contents
BDCDATA-FVAL = FELDINHALT.
APPEND BDCDATA.
ENDFORM. " DYNPRO_SET
FORM DYNPRO_DETAIL2.
okcode
PERFORM DYNPRO_SET USING 'BDC_OKCODE' PANEL-UER2.
fix dynpro number 4001
PERFORM DYNPRO_NEW USING PROGRAMM_AUFTRAG
'4001'
CHANGING LAST_DYNPRO.
order party
PERFORM DYNPRO_SET USING 'KUAGV-KUNNR' XVBAK-KUNNR.
purchase order number
PERFORM DYNPRO_SET USING 'VBKD-BSTKD' XVBAK-BSTNK.
requested delivery date
PERFORM DYNPRO_DATE_SET USING 'VBKD-BSTDK' XVBAK-BSTDK.
purchase order date
PERFORM DYNPRO_DATE_SET USING 'RV45A-KETDAT' WLDAT.
ENDFORM. " DYNPRO_DETAIL2
FORM DYNPRO_DATE_SET USING FELDNAME
FELDINHALT.
DATA: DATE TYPE D.
CLEAR BDCDATA.
CHECK FELDINHALT NE SPACE.
BDCDATA-FNAM = FELDNAME.
WRITE FELDINHALT TO DATE.
BDCDATA-FVAL = DATE.
APPEND BDCDATA.
ENDFORM. " DYNPRO_DATE_SET
FORM DYNPRO_HEAD_300.
PERFORM DYNPRO_SET USING 'BDC_OKCODE' PANEL-KKAU.
incoterms part 1
IF NOT XVBAK-INCO1 IS INITIAL.
PERFORM DYNPRO_SET USING 'VBKD-INCO1' XVBAK-INCO1.
ENDIF.
incoterms part 2
IF NOT XVBAK-INCO2 IS INITIAL.
PERFORM DYNPRO_SET USING 'VBKD-INCO2' XVBAK-INCO2.
ENDIF.
PERFORM DYNPRO_SET USING 'BDC_OKCODE' 'BACK'.
ENDFORM. " DYNPRO_HEAD_300
FORM DYNPRO_POSITION.
LOOP AT XVBAP.
dynpro item double line entry
PERFORM DYNPRO_SET USING 'BDC_OKCODE' 'UER2'.
IF XVBAP-POSNR = 1.
material number
PERFORM DYNPRO_SET USING 'VBAP-MATNR(01)' XVBAP-MATNR.
order quantity
PERFORM DYNPRO_SET USING 'RV45A-KWMENG(01)' XVBAP-WMENG.
desired delivery date
PERFORM DYNPRO_DATE_SET USING 'RV45A-ETDAT(1)' WLDAT.
sales unit
PERFORM DYNPRO_SET USING 'VBAP-VRKME(1)' XVBAP-VRKME.
ELSE.
PERFORM DYNPRO_SET USING 'BDC_OKCODE' 'POAN'.
material number
PERFORM DYNPRO_SET USING 'VBAP-MATNR(02)' XVBAP-MATNR.
order quantity
PERFORM DYNPRO_SET USING 'RV45A-KWMENG(02)' XVBAP-WMENG.
desired delivery date
PERFORM DYNPRO_DATE_SET USING 'RV45A-ETDAT(02)' WLDAT.
sales unit
PERFORM DYNPRO_SET USING 'VBAP-VRKME(02)' XVBAP-VRKME.
ENDIF.
ENDLOOP.
ENDFORM. " DYNPRO_POSITION
FORM RETURN_VARIABLES_FILL USING ERRORCODE.
allocate IDOC numbers to Workflow output parameters
IF MASS_PROCESSING <> SPACE.
IF ERRORCODE = 0.
RETURN_VARIABLES-WF_PARAM = PID.
RETURN_VARIABLES-DOC_NUMBER = IDOC_CONTRL-DOCNUM.
APPEND RETURN_VARIABLES.
RETURN_VARIABLES-WF_PARAM = APO.
RETURN_VARIABLES-DOC_NUMBER = BELEGNUMMER.
APPEND RETURN_VARIABLES.
WORKFLOW_RESULT = C_WF_RESULT_OK.
ELSE.
RETURN_VARIABLES-WF_PARAM = EID.
RETURN_VARIABLES-DOC_NUMBER = IDOC_CONTRL-DOCNUM.
APPEND RETURN_VARIABLES.
WORKFLOW_RESULT = C_WF_RESULT_ERROR.
ENDIF.
ELSE.
IF ERRORCODE = 0.
RETURN_VARIABLES-WF_PARAM = APE.
RETURN_VARIABLES-DOC_NUMBER = BELEGNUMMER.
APPEND RETURN_VARIABLES.
WORKFLOW_RESULT = C_WF_RESULT_OK.
ELSE.
WORKFLOW_RESULT = C_WF_RESULT_ERROR.
ENDIF.
ENDIF.
ENDFORM. " RETURN_VARIABLES_FILL
Globale Daten von IDOC_INPUT_TESTER
TABLES: E1HEAD, E1ITEM.
DATA: BEGIN OF BDCDATA OCCURS 500.
INCLUDE STRUCTURE BDCDATA.
DATA: END OF BDCDATA.
DATA: BEGIN OF XVBAK. "Kopfdaten
INCLUDE STRUCTURE VBAK621.
DATA: END OF XVBAK.
DATA: BEGIN OF XVBAP OCCURS 50. "Position
INCLUDE STRUCTURE VBAP.
DATA: WMENG(18) TYPE C.
DATA: LFDAT LIKE VBAP-ABDAT.
DATA: KSCHL LIKE KOMV-KSCHL.
DATA: KBTRG(16) TYPE C.
DATA: KSCHL_NETWR LIKE KOMV-KSCHL.
DATA: KBTRG_NETWR(16) TYPE C.
DATA: INCO1 LIKE VBKD-INCO1.
DATA: INCO2 LIKE VBKD-INCO2.
DATA: YANTLF(1) TYPE C.
DATA: PRSDT LIKE VBKD-PRSDT.
DATA: HPRSFD LIKE TVAP-PRSFD.
DATA: END OF XVBAP.
DATA: BEGIN OF DYNPRO,
EINSTIEG LIKE T185V-DYNNR VALUE 101,
KKAU LIKE T185V-DYNNR,
UER2 LIKE T185V-DYNNR,
KBES LIKE T185V-DYNNR,
ERF1 LIKE T185V-DYNNR,
PBES LIKE T185V-DYNNR,
PKAU LIKE T185V-DYNNR,
PEIN LIKE T185V-DYNNR,
EID1 LIKE T185V-DYNNR,
POPO LIKE T185V-DYNNR,
EIPO LIKE T185V-DYNNR,
KPAR LIKE T185V-DYNNR,
PSDE LIKE T185V-DYNNR,
PPAR LIKE T185V-DYNNR,
KDE1 LIKE T185V-DYNNR,
KDE2 LIKE T185V-DYNNR,
PDE1 LIKE T185V-DYNNR,
PDE2 LIKE T185V-DYNNR,
PKON LIKE T185V-DYNNR,
END OF DYNPRO.
DATA: BEGIN OF PANEL,
KKAU LIKE T185V-PANEL VALUE 'KKAU',
UER2 LIKE T185V-PANEL VALUE 'UER2',
KBES LIKE T185V-PANEL VALUE 'KBES',
ERF1 LIKE T185V-PANEL VALUE 'ERF1',
PBES LIKE T185V-PANEL VALUE 'PBES',
PKAU LIKE T185V-PANEL VALUE 'PKAU',
PEIN LIKE T185V-PANEL VALUE 'PEIN',
EID1 LIKE T185V-PANEL VALUE 'EID1',
EIAN LIKE T185V-PANEL VALUE 'EIAN',
POPO LIKE T185V-PANEL VALUE 'POPO',
EIPO LIKE T185V-PANEL VALUE 'EIPO',
KPAR LIKE T185V-PANEL VALUE 'KPAR',
PSDE LIKE T185V-PANEL VALUE 'PSDE',
POAN LIKE T185V-PANEL VALUE 'POAN',
PPAR LIKE T185V-PANEL VALUE 'PPAR',
KDE1 LIKE T185V-PANEL VALUE 'KDE1',
KDE2 LIKE T185V-PANEL VALUE 'KDE2',
PDE1 LIKE T185V-PANEL VALUE 'PDE1',
PDE2 LIKE T185V-PANEL VALUE 'PDE2',
PKON LIKE T185V-PANEL VALUE 'PKON',
KOAN LIKE T185V-PANEL VALUE 'KOAN',
END OF PANEL.
DATA: BEGIN OF ERRTAB OCCURS 20,
TRANS LIKE TSTC-TCODE,
ARBGB LIKE T100-ARBGB,
CLASS(1) TYPE C,
MSGNR LIKE T100-MSGNR,
TEXT LIKE T100-TEXT,
TEXT(123) TYPE C,
MSGV1 LIKE SY-MSGV1,
MSGV2 LIKE SY-MSGV2,
MSGV3 LIKE SY-MSGV3,
MSGV4 LIKE SY-MSGV4,
END OF ERRTAB.
*---- Hilfsfelder -
DATA: PROGRAMM_AUFTRAG LIKE T185V-AGIDV VALUE 'SAPMV45A'.
DATA: LAST_DYNPRO LIKE T185V-DYNNR,
WLDAT LIKE VBAK-BSTDK,
POSNR LIKE VBAP-POSNR,
FIRST(1) TYPE C VALUE 'X'.
DATA: BEGIN OF XBDCMSGCOLL OCCURS 10.
INCLUDE STRUCTURE BDCMSGCOLL.
DATA: END OF XBDCMSGCOLL.
Terminauftrag ( Auftragsart wird fest gesetzt !)
DATA: BELEGNUMMER LIKE VBAK-VBELN.
DATA: ERRORCODE LIKE SY-SUBRC.
Statuswerte fuer IDOC-Status
DATA: BELEG_NICHT_GEBUCHT LIKE TEDS1-STATUS VALUE '51'.
DATA: BELEG_GEBUCHT LIKE TEDS1-STATUS VALUE '53'.
*- Direktwerte für Return_variables -
data:
eid like bdwfretvar-wf_param value 'Error_IDOCs',
pid like bdwfretvar-wf_param value 'Processed_IDOCs',
apo like bdwfretvar-wf_param value 'Appl_Objects',
ape like bdwfretvar-wf_param value 'Appl_Object'.
*- Direktwerte für Workflow_Result -
DATA: C_WF_RESULT_ERROR LIKE BDWFAP_PAR-RESULT VALUE '99999'.
thanks
karthik
DATA: C_WF_RESULT_OK LIKE BDWFAP_PAR-RESULT VALUE '0'. -
[svn] 3143: Fix the AC_AddExtension function to not add the extension if
Revision: 3143
Author: [email protected]
Date: 2008-09-08 11:21:14 -0700 (Mon, 08 Sep 2008)
Log Message:
Fix the AC_AddExtension function to not add the extension if
it already exists on the path.
Modified Paths:
flex/sdk/branches/3.0.x/templates/html-templates/metadata/AC_OETags.js67Tommy Guns wrote:
Adobe as a whole seems to have VERY low communications skills.
Putting it generously, they're a unique beast with very Adobe ways of doing things. Same goes for Microsoft and others.
Once you learn the lingo, they're a friendly enough bunch but the bureaucracy can prove labyrinthine and exasperating at times (even for Adobe staff, I gather).
What I do know is that once you eventually find the correct forum, form, department or knowledgeable individual to speak to, they're usually really helpful.
I do avoid contacting Adobe for Help at all costs though. That DOES need lots of work. The forums are far quicker and easier for me to deal with. -
URLConnection.getInputStream() not reading the full HTML
I need code to read a html file after posting a request. The code is as follows:
URLConnection connection = url.openConnection();
connection.setDoInput( true );
connection.connect();
BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
if(in.equals(null)){
throw new IOException();
while((inputLine = in.readLine()) != null){
System.out.println("line is: " + inputLine);
Sometimes it works fine. Sometimes it can not read full content.(may be the low network). but i view the source in my browser, I can find it just fine.
Any ideas? Has anyone encountered this kind of problem?my code is same for reading input from a servlet, but it sometimes get and inputstream, sometimes, don't, it always can not read the second one. mine code is inside applet and chat with other applet thourgh a servlet. The server side does write message out.
Any insight how to debug this, I am totally out!! -
Apple Mail cannot find replies or forwarded emails -- the little arrows on the left of the list of emails: "Mail was unable to find your reply to the message '[subject of message]'. You may have deleted the message." I did not delete the message. Bug in the program, or am I missing something?
Of course they're in my Sent folder. Then why can't Apple Mail find them?
-
JDBC Sender channel not processing the messages
Hello,
From yesterday onwards JDBC Sender channel not processing the messages. In CC monitoring it is showing in Green Led and status is functioning. Cahnnel is polling for messages to DB server as per polling interval. But it is not processing the msg's. Under Processing detials for cluster node it is showing only "Processing Started" for each polling interval.
I have done the check in DB server by executing the query in the channel, whether there are any records are exisitng or not. There are 1000+ records.
Previously the parameter "Disconnect from DB after processing each message" was not set. I have set the parameter and activated in Productiion. Still the messages are not processing by channel
What was the problem? How to rectify with this.
Cheers
VeeraCheck in the Visual Admin >Cluster> "LOCKING ADAPTER"
we get a option of Display Locks .Check for an entry with
NAME : $XIDBAD.JDBC2XI
reset the locks and restart the CC ,now it works fine.
Note 1083488 - XI FTP/JDBC sender channel stop polling indefinitely(04/04S) -
Help required please. "Itunes can not read the contents of my iphone"
Greetings all,
I know this question has been asked before and I apologize for asking again but all the solutions provided don't seam to work for me, can anyone help me please.
I am receving the message: "Itunes can not read the contents of the iPhone. Go to the summary tab In iPhone Preferences and click restore torestore this Iphone to factory settings".
Now a little about my iphone, Itunes and my laptop and what steps i havealready tried.
I have an iPhone 4 running software 5.0
My itunes version is 10.5.0.142
I know these are not the most up to date versions but I have had this issue for almost 3 months now and updating the software back then was the first step I tried. I don’t believe updating to the latest will fix this issue as updating the last two times did nothing.
Every so often after starting Itunes, The program will stop responding and will require the three finger death kill (CTRL, ALT, DELETE) to open task manager to end the task of Itunes. Once it shuts down, I restart the iTunes and it runs smoothly, apart from not reading my iPhone.
When I run a diagnostic in itunes under the help tab, I get these fail messages:
Network Connectivity test: Secure link to Itunes store fail
Device connectivity test: Under support services: Itunes helper is not running. And under ports: No iPod, iPhone or iPad found.
Device Sync test: No iPod touch, iPhone or iPad found.
*See below for full diagnostic report*
I have restored back to factory settings twice.
I have shut down and restarted both my iPhone and laptop.
I am running Windows 7 32-bit on my laptop.
I am using ZoneAlarm as my fire wall, and have been disabling it when syncing my iPhone to prevent other error messages.
The iPhone is plugged into a genuine Iphone USB cable and is plugged into a USB port not a USB hub on my laptop, I have tried plugging it into all 4 USB ports and this issue still persist. The Cable is less then 5 months old, is not frayed or damaged in any way, have also borrowed 2 other cables from friends and still the same issue.
The iPhone does not even come up in windows explorer as a digital camera.
The iPhone is NOT jailbroken
I do not live close to a so called genius bar, however I have made the journey to them on 3 separate occasions last year when I first received my iPhone for a different issue, the so called genius's could not fix the problem so they just gave me a new (refurbished) iPhone, which did not extend my warranty. I will not be taking the iPhone back to them as I believe they can not resolve many issues, this is why I am reaching out to the power of the people in the wider apple community.
I have read in other forums about ifunbox and other programs for jail broken iPhones to isolate folders “iTunesDB” and "iTunesCDB" and delete them. If this is the issue is there a way to access these files through windows explorer as my iphone is not jailbroken.
I hope I have provided enough information and someone can help me fix this issue. If I have left anything out, please let me know. I thank everyone in advance for your patience and support.
Thanks
Hoggie27
FULL DIAGNOSITC REPORT
Microsoft Windows 7 Home Premium Edition Service Pack 1 (Build 7601)
Hewlett-Packard HP Pavilion dv6 Notebook PC
iTunes 10.5.0.142
QuickTime not available
FairPlay 1.13.35
Apple Application Support 2.1.5
iPod Updater Library 10.0d2
CD Driver 2.2.0.1
CD Driver DLL 2.1.1.1
Apple Mobile Device 4.0.0.96
Apple Mobile Device Driver 1.57.0.0
Bonjour 3.0.0.10 (333.10)
Gracenote SDK 1.9.3.494
Gracenote MusicID 1.9.3.106
Gracenote Submit 1.9.3.136
Gracenote DSP 1.9.3.44
iTunes Serial Number 001BAD14XXXXEA78
Current user is an administrator.
The current local date and time is 2011-11-16 10:04:53.
iTunes is not running in safe mode.
WebKit accelerated compositing is enabled.
HDCP is supported.
Core Media is supported.
Video Display Information
NVIDIA, NVIDIA GeForce GT 230M
**** External Plug-ins Information ****
No external plug-ins installed.
The drive H: Vodafone USB SCSI CD-ROM Rev USB is a USB 1 device.
**** Network Connectivity Tests ****
Network Adapter Information
Adapter Name: {97524DB0-B9DC-41DB-8AFA-0CE6938F7C95}
Description: PC
IP Address: (HAS BEEN REMOVED FOR PERSONAL REASONS)
Subnet Mask: 255.255.255.255
Default Gateway: 0.0.0.0
DHCP Enabled: No
DHCP Server:
Lease Obtained: Thu Jan 01 11:00:00 1970
Lease Expires: Thu Jan 01 11:00:00 1970
DNS Servers: 10.143.147.147
10.143.147.148
Adapter Name: {BFF0456E-DE42-4FEF-B1FA-1EA1C5EDEE42}
Description: Vodafone Mobile Broadband Network Adapter (ZTE)
IP Address: 0.0.0.0
Subnet Mask: 0.0.0.0
Default Gateway: 0.0.0.0
DHCP Enabled: No
DHCP Server:
Lease Obtained: Thu Jan 01 11:00:00 1970
Lease Expires: Thu Jan 01 11:00:00 1970
DNS Servers:
Adapter Name: {D5511FFD-0CA8-4F62-B3CA-E90384FFCD03}
Description: Broadcom 43225 802.11b/g/n
IP Address: 0.0.0.0
Subnet Mask: 0.0.0.0
Default Gateway: 0.0.0.0
DHCP Enabled: Yes
DHCP Server:
Lease Obtained: Thu Jan 01 11:00:00 1970
Lease Expires: Thu Jan 01 11:00:00 1970
DNS Servers:
Active Connection: PC
Connected: Yes
Online: Yes
Using Modem: Yes
Using LAN: No
Using Proxy: No
SSL 3.0 Support: Enabled
TLS 1.0 Support: Enabled
Firewall Information
Windows Firewall is on.
iTunes is NOT enabled in Windows Firewall.
ZoneAlarm Firewall is installed.
Connection attempt to Apple web site was successful.
Connection attempt to browsing iTunes Store was successful.
Connection attempt to purchasing from iTunes Store was successful.
Connection attempt to iPhone activation server was successful.
Connection attempt to firmware update server was unsuccessful.
The network connection timed out.
Connection attempt to Gracenote server was successful.
Last successful iTunes Store access was 2011-11-16 09:59:57.
**** CD/DVD Drive Tests ****
LowerFilters: Afc (1.0.0.2),
UpperFilters: GEARAspiWDM (2.2.0.1),
F: hp CDDVDW TS-L633N, Rev 0300
Drive is empty.
**** Device Connectivity Tests ****
iPodService 10.5.0.142 is currently running.
iTunesHelper is currently not running.
Apple Mobile Device service 3.3.0.0 is currently running.
Universal Serial Bus Controllers:
Intel(R) 5 Series/3400 Series Chipset Family USB Enhanced Host Controller - 3B34. Device is working properly.
Intel(R) 5 Series/3400 Series Chipset Family USB Enhanced Host Controller - 3B3C. Device is working properly.
FireWire (IEEE 1394) Host Controllers:
1394 OHCI Compliant Host Controller. Device is working properly.
Most Recent Devices Not Currently Connected:
iPhone 4 (GSM) running firmware version 5.0
Serial Number: 85107XQLA4S
**** Device Sync Tests ****
No iPod, iPhone, or iPad found.
< Edited By Host >Hi AM_Kidd.
Thanks for your reply.
I have done a complete uninstall and re install of iTunes and all related apple programs from my laptop through control panel, add remove programs and also by going through program files and deleting all tracers of any left over folders remove programs may have missed.
My apologies for forgetting to add this in my original post.
Thanks again
Maybe you are looking for
-
One of the interviewr asking the question). QUESTION IS THE:- 2 company codes is production the same material, OR DIFFERENT MATERIAL when we received the material from ONE co code, 50 units, and SECOND co code, 50 units, HOW UR POSTING THE G/L ACCOUN
-
Hi - I have a psd made using CS2. I can only see a single layer, and I have verified that the file opens correctly in CS2. How can I open the layers in CS5?
-
ALE Conversion rules not processed
Hi all, I defined some conversion rules for an inbound IDoc with trascation BD79 in my backend system. If I send an IDoc from XI to the backend system the rules are ignored: Status 64 No filters , <b>No conversion</b> , No version change . If I try t
-
Net info manager, Help Needed
Good Morning all I have a Mac that is on my network and I am trying to get it to connect to a web server, so I can do some browser testing. It will connect OK if I use the IP in the browser. But not when I try and use Net info manager This works fine
-
Can you make a composition widget act like an accordion widget?
Is it possible to make a composition widget act like an accordion widget? The reason I ask is because the styling that I can do inside of a composition widget is much more than that of a accordion widget which is just a simple text frame, makes it im