Error in bdc programing code-pls help
hi friends,
I was tring to do a bdc program.But it shows me an error. MY bdc program is jus to upload a 2 fields in vendoe master table.
That is LIFNR,NAME1 field for the new vendors.
I worked out an execl sheet for this, and jus copied it to the text file by selecting all and pasting.
Even then i get an error code that BDC_open does not exits.
MY code is this, please help me if iam wrong.
If anyone can help to make it more understandable,I Kindly request you to try out this program with the screen shot and mail to this id [email protected] would be very thankful for your timely help.
report Z_PK_BDC
no standard page heading line-size 255.
include bdcrecx1.
parameters: dataset(132) lower case.
parameters: p_file like rlgrap-filename default
'C:\SAP TESTING\p_file.txt'.
DO NOT CHANGE - the generated data section - DO NOT CHANGE ***
If it is nessesary to change the data section use the rules:
1.) Each definition of a field exists of two lines
2.) The first line shows exactly the comment
'* data element: ' followed with the data element
which describes the field.
If you don't have a data element use the
comment without a data element name
3.) The second line shows the fieldname of the
structure, the fieldname must consist of
a fieldname and optional the character '_' and
three numbers and the field length in brackets
4.) Each field must be type C.
Generated data section with specific formatting - DO NOT CHANGE ***
data: begin of record OCCURS 0,
data element: LIF16
LIFNR_001(016),
data element: BUKRS
BUKRS_002(004),
data element: KTOKK
KTOKK_003(004),
data element: ANRED
ANRED_004(015),
data element: NAME1_GP
NAME1_005(035),
data element: SORTL
SORTL_006(010),
data element: NAME2_GP
NAME2_007(035),
data element: STRAS_GP
STRAS_008(035),
data element: ORT01_GP
ORT01_009(035),
data element: ORT02_GP
ORT02_010(035),
data element: PFORT_GP
PFORT_011(035),
data element: LAND1_GP
LAND1_012(003),
data element: SPRAS
SPRAS_013(002),
end of record.
End generated data section ***
start-of-selection.
CALL FUNCTION 'WS_UPLOAD'
EXPORTING
FILENAME = P_FILE
FILETYPE = 'DAT'
TABLES
DATA_TAB = record
EXCEPTIONS
CONVERSION_ERROR = 1
FILE_OPEN_ERROR = 2
FILE_READ_ERROR = 3
INVALID_TYPE = 4
NO_BATCH = 5
UNKNOWN_ERROR = 6
INVALID_TABLE_WIDTH = 7
GUI_REFUSE_FILETRANSFER = 8
CUSTOMER_ERROR = 9
OTHERS = 10.
IF SY-SUBRC <> 0.
WRITE:/ 'SY-SUBRC:', SY-SUBRC.
ENDIF.
LOOP AT RECORD.
*perform open_dataset using dataset.
*perform open_group.
*do.
*read dataset dataset into record.
*if sy-subrc <> 0. exit. endif.
perform bdc_dynpro using 'SAPMF02K' '0105'.
perform bdc_field using 'BDC_CURSOR'
'RF02K-KTOKK'.
perform bdc_field using 'BDC_OKCODE'
'/00'.
perform bdc_field using 'RF02K-LIFNR'
record-LIFNR_001.
perform bdc_field using 'RF02K-BUKRS'
record-BUKRS_002.
perform bdc_field using 'RF02K-KTOKK'
record-KTOKK_003.
perform bdc_dynpro using 'SAPMF02K' '0110'.
perform bdc_field using 'BDC_CURSOR'
'LFA1-SPRAS'.
perform bdc_field using 'BDC_OKCODE'
'=UPDA'.
perform bdc_field using 'LFA1-ANRED'
record-ANRED_004.
perform bdc_field using 'LFA1-NAME1'
record-NAME1_005.
perform bdc_field using 'LFA1-SORTL'
record-SORTL_006.
perform bdc_field using 'LFA1-NAME2'
record-NAME2_007.
perform bdc_field using 'LFA1-STRAS'
record-STRAS_008.
perform bdc_field using 'LFA1-ORT01'
record-ORT01_009.
perform bdc_field using 'LFA1-ORT02'
record-ORT02_010.
perform bdc_field using 'LFA1-PFORT'
record-PFORT_011.
perform bdc_field using 'LFA1-LAND1'
record-LAND1_012.
perform bdc_field using 'LFA1-SPRAS'
record-SPRAS_013.
perform bdc_transaction using 'FK01'.
**enddo.
**perform close_group.
endloop.
**perform close_dataset using dataset.
Thanks in Advance
Rinky123
Hi,
If you are using GUI_UPLOAD in 4.7 then the file path whatever you are using currently it won't work. Replace the file path like this.
P_FILE LIKE RLGRAP-FILENAME.
DATA: V_FILE TYPE STRING.
V_FILE = P_FILE.
Now take this v_file for function module.Then only it will open the file otherwise you won't get unable to open file error message.
I observerd that you are getting so many fields from the file to the internal table.
Similar Messages
-
Urgent,showing error while running form..pls,help...
Hi,
I have created my own view named GP_NUIF_V and have also successfully established a Database connection,using FWK_TBX_TUTORIAL.I have developed a personal page in Oracle9i JDeveloper ,which is to fetch particular details from my view and show it .. but whenever I run my form I am continuously getting this type of error..pls,help me out ,as my project delivery is nearing..for this I am not been able to head on to registering the form..I have checked from Pl/Sql developer that my query is just running fine as I wanted it to be..I have also changed the FNDNAM in the .dbc file to my view name but it is giving me the same error..please,look at my error and suggest all other ways in how I can solve my problem ,as early as possible..
Error Page
Exception Details.
oracle.apps.fnd.framework.OAException: oracle.adf.mds.exception.MDSRuntimeException
at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:888)
at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1064)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1794)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:463)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:384)
at OA.jspService(OA.jsp:40)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
at java.lang.Thread.run(Thread.java:534)
## Detail 0 ##
oracle.adf.mds.exception.MDSRuntimeException
at oracle.adf.mds.internal.MUnResolvedState.resolveState(MUnResolvedState.java:193)
at oracle.adf.mds.internal.ElementData.resolveState(ElementData.java:509)
at oracle.adf.mds.internal.ElementData.getUntransAttrVal(ElementData.java:922)
at oracle.adf.mds.internal.ElementData.getAttrVal(ElementData.java:835)
at oracle.adf.mds.internal.ElementData.getAttributeValue(ElementData.java:260)
at oracle.adf.mds.internal.Cache.getAttribute(Cache.java:237)
at oracle.adf.mds.internal.MetadataManagerBase.getAttributeValueInternal(MetadataManagerBase.java:1069)
at oracle.adf.mds.internal.MElementImpl.getAttrValueOrExpression(MElementImpl.java:620)
at oracle.adf.mds.internal.MElementImpl.getAttributeValue(MElementImpl.java:230)
at oracle.adf.mds.MElement.getLocalRef(MElement.java:291)
at oracle.apps.fnd.framework.webui.JRADWebBeanMetaData.getUINodeName(JRADWebBeanMetaData.java:1812)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.addAkChildren(OAWebBeanContainerHelper.java:223)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.setMetaDataProperties(OAWebBeanContainerHelper.java:197)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.setMetaDataProperties(OAWebBeanContainerHelper.java:123)
at oracle.apps.fnd.framework.webui.OARowLayoutHelper.setMetaDataProperties(OARowLayoutHelper.java:74)
at oracle.apps.fnd.framework.webui.OARowLayoutHelper.createWebBean(OARowLayoutHelper.java:53)
at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.createWebBeanUsingHelper(OAWebBeanFactoryImpl.java:1046)
at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.createWebBeanFromCustomTables(OAWebBeanFactoryImpl.java:782)
at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.createWebBean(OAWebBeanFactoryImpl.java:469)
at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.createWebBean(OAWebBeanFactoryImpl.java:460)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.addAkChildren(OAWebBeanContainerHelper.java:229)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.setMetaDataProperties(OAWebBeanContainerHelper.java:197)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.setMetaDataProperties(OAWebBeanContainerHelper.java:123)
at oracle.apps.fnd.framework.webui.OAContentContainerHelper.setMetaDataProperties(OAContentContainerHelper.java:74)
at oracle.apps.fnd.framework.webui.OAContentContainerHelper.createWebBean(OAContentContainerHelper.java:55)
at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.createWebBeanUsingHelper(OAWebBeanFactoryImpl.java:1046)
at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.createWebBeanFromCustomTables(OAWebBeanFactoryImpl.java:782)
at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.createWebBean(OAWebBeanFactoryImpl.java:469)
at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.createWebBean(OAWebBeanFactoryImpl.java:460)
at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.addAkChildren(OAPageLayoutHelper.java:657)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.setMetaDataProperties(OAWebBeanContainerHelper.java:197)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.setMetaDataProperties(OAWebBeanContainerHelper.java:123)
at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.setMetaDataProperties(OAPageLayoutHelper.java:243)
at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.createWebBean(OAPageLayoutHelper.java:194)
at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.createWebBeanUsingHelper(OAWebBeanFactoryImpl.java:1046)
at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.createWebBeanFromCustomTables(OAWebBeanFactoryImpl.java:993)
at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.createWebBean(OAWebBeanFactoryImpl.java:902)
at oracle.apps.fnd.framework.webui.OAPageBean.createRootWebBean(OAPageBean.java:3966)
at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:1962)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1562)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:463)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:384)
at OA.jspService(OA.jsp:40)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
at java.lang.Thread.run(Thread.java:534)
oracle.adf.mds.exception.MDSRuntimeException
at oracle.adf.mds.internal.MUnResolvedState.resolveState(MUnResolvedState.java:193)
at oracle.adf.mds.internal.ElementData.resolveState(ElementData.java:509)
at oracle.adf.mds.internal.ElementData.getUntransAttrVal(ElementData.java:922)
at oracle.adf.mds.internal.ElementData.getAttrVal(ElementData.java:835)
at oracle.adf.mds.internal.ElementData.getAttributeValue(ElementData.java:260)
at oracle.adf.mds.internal.Cache.getAttribute(Cache.java:237)
at oracle.adf.mds.internal.MetadataManagerBase.getAttributeValueInternal(MetadataManagerBase.java:1069)
at oracle.adf.mds.internal.MElementImpl.getAttrValueOrExpression(MElementImpl.java:620)
at oracle.adf.mds.internal.MElementImpl.getAttributeValue(MElementImpl.java:230)
at oracle.adf.mds.MElement.getLocalRef(MElement.java:291)
at oracle.apps.fnd.framework.webui.JRADWebBeanMetaData.getUINodeName(JRADWebBeanMetaData.java:1812)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.addAkChildren(OAWebBeanContainerHelper.java:223)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.setMetaDataProperties(OAWebBeanContainerHelper.java:197)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.setMetaDataProperties(OAWebBeanContainerHelper.java:123)
at oracle.apps.fnd.framework.webui.OARowLayoutHelper.setMetaDataProperties(OARowLayoutHelper.java:74)
at oracle.apps.fnd.framework.webui.OARowLayoutHelper.createWebBean(OARowLayoutHelper.java:53)
at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.createWebBeanUsingHelper(OAWebBeanFactoryImpl.java:1046)
at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.createWebBeanFromCustomTables(OAWebBeanFactoryImpl.java:782)
at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.createWebBean(OAWebBeanFactoryImpl.java:469)
at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.createWebBean(OAWebBeanFactoryImpl.java:460)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.addAkChildren(OAWebBeanContainerHelper.java:229)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.setMetaDataProperties(OAWebBeanContainerHelper.java:197)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.setMetaDataProperties(OAWebBeanContainerHelper.java:123)
at oracle.apps.fnd.framework.webui.OAContentContainerHelper.setMetaDataProperties(OAContentContainerHelper.java:74)
at oracle.apps.fnd.framework.webui.OAContentContainerHelper.createWebBean(OAContentContainerHelper.java:55)
at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.createWebBeanUsingHelper(OAWebBeanFactoryImpl.java:1046)
at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.createWebBeanFromCustomTables(OAWebBeanFactoryImpl.java:782)
at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.createWebBean(OAWebBeanFactoryImpl.java:469)
at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.createWebBean(OAWebBeanFactoryImpl.java:460)
at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.addAkChildren(OAPageLayoutHelper.java:657)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.setMetaDataProperties(OAWebBeanContainerHelper.java:197)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.setMetaDataProperties(OAWebBeanContainerHelper.java:123)
at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.setMetaDataProperties(OAPageLayoutHelper.java:243)
at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.createWebBean(OAPageLayoutHelper.java:194)
at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.createWebBeanUsingHelper(OAWebBeanFactoryImpl.java:1046)
at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.createWebBeanFromCustomTables(OAWebBeanFactoryImpl.java:993)
at oracle.apps.fnd.framework.webui.OAWebBeanFactoryImpl.createWebBean(OAWebBeanFactoryImpl.java:902)
at oracle.apps.fnd.framework.webui.OAPageBean.createRootWebBean(OAPageBean.java:3966)
at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:1962)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1562)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:463)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:384)
at OA.jspService(OA.jsp:40)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
at java.lang.Thread.run(Thread.java:534)Don't put reposts. Follow the issue at one place Re: Urgent,showing error while running form..pls,help...
--Shiv -
HT3743 how i can fix error 1015 in my 3g , pls help,,
how i can fix error 1015 in my 3g , pls help,,
You can't. Error 1015 occurs when trying to restore a jailbroken phone.
Jailbreaking your phone voids any warranty remaining with Apple and forfeits your right to any assistance from Apple including from this forum.
You're on your own. From what other people have posted, it's extremely unlikely you'll ever get your phone working again. -
Error while unpacking program, code 2 Win Server 2008
When trying to run an application (specifically "Image for Windows" by Terabyte Unlimited), I receive the following error message:
"Error while unpacking program, code 2. Please report to author."
I have seen numerous hits for this error while searching Google and nearly all of them point to an issue with a Windows Update. However, it's nearly always for Windows Vista.
I'm getting this error Windows Server 2008.
I have another machine running Windows Server 2008 that does not have this issue.
Is this an issue with a particular Windows Update or could something else be the cause?C:\Users\administrator>net helpmsg 2
returns with
The system cannot find the file specified.
The package may be corrupt.
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows]
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights. -
Encountered : A system error has occurred while locking, pls help
Dear All..
pls help..
while executing some of our remote function module we encountered some locking error.. the message returned by SAP is :
A system error has occurred while locking
from message class : M3 #021
the remote function module is running bapi_goodsmvt_create in background..
the question is.. why this error occured and how to solve it ? and what is the root cause.. ?
because the error is only happened once (until now) we cannot simulate to get the error again.. so it is hard to find out the root cause..
thanks for the help..
sasmenteHi,
I am also having the same problem. I am running the BAPI_MATPHYSINV_CHANGECOUNT' to count the Articles.
When I print the error on screen, some the data shown as counted. Some are not changed and some with the following error.
System error while locking the data
Furthermore I went to the BASIS and saw that when we run this particular program its showing the locks on MARC and several tables with the same System ID from which we run the program
Can anyone come up ? Its getting too hard to resolve. -
Error in BDC program for Block vendor in SAP R/3
Hello friends,
I wrote a BDC program to block vendor using FK02.
When I debug the program in <b>No screen</b> mode
the program gives a error 'No batch input data for screen SAPMSSY3 0131.
But the screen name and screen number is not available in the program.
When I execute without debugging in No screen mode, the program works correctly.
When I run in ALL screen mode, the program works correctly and the program does not prompt for SAPMSSY3 0131 screen.
Is there any solution for this problem.check this
... MODE mode
Effect
The processing mode can take the following values:
'A' Display screen
'E' Display only if an error occurs
'N' Do not display
<b>'P' Do not display; debugging possible</b>
If the MODE addition is omitted, then the processing mode is 'A'.
If a screen is displayed in processing mode 'E' because the system reached the end of the BDC data, the system automatically switches to processing mode 'A'.
If breakpoints are set in a transaction tcod called using the CALL TRANSACTION tcod USING itab variant, these are not actually reached in 'N' mode. The system tries to insert data in the Debugger screen; the call ends with SY-SUBRC = 1001 and the message "Batch input data is not available for screen SAPMSSY3 0131" (S 00 344).
Conversely, in 'P' mode, transaction screens are processed in the background (as in 'N' mode) and debugging is possible.
Regards
Prabhu -
Error in BDC program which is creating Work Order IW31
Hi All,
I am getting an error - 532 - " Specify only one start time/date " when running bdc program for txn IW31 in back ground. I run the same program in the foreground.. there is no error.. but when I run in background.. I am experiencing the above error.
Thank for Ur time.
Cheers
SenthilHi,
Are you facing this issue during Normal order creation with that functional location ?
Please check CC assignment to functional location and settlement rule applied while saving order.
Thanks
Riyaj -
Error in change Number ..pls Help Me..urjent
<b>Hi all..
when i run a transaaction ( Zasd) in PRD with change number 11784 the report works fine. But when i enter
change number 11929 . iwill get error change order not found. but when i use CC03 transactoin with this change number i saw the details for this number..
pls suggest me what i do..i think report is ok.is it right ???? what i do..pls help me..
thanks in advance...
the selection sereen is below....
PARAMETERS: p_chgnr TYPE aennr.
PARAMETERS: p_width TYPE int4 DEFAULT cv_maxmodels.
PARAMETERS: p_anego TYPE c AS CHECKBOX DEFAULT co_true.
get all engineering change details
CREATE OBJECT go_engchange EXPORTING changeorder = p_chgnr.</b>Hello Papai
In order to track down the problem I would suggest two things you should check with change number 11929:
(1) Does your report actually pass the CREATE OBJECT statement or do the other select-parameters prevent that this change number is found?
(2) If the class used for go_engchange can be publicly instantiated, then call the class builder (SE24) with the class and test it. In test mode you can create an instance using your change number as input.
(3) If instantiation fails then repeat it in debugging mode. Sooner or later you must find the error source.
Regards
Uwe -
Start Website error on OAS 4.0, Pls help.
When i started OAS 4.0, i received the following error message from Dr.Watson for WinNT :
An application error has occurred
and an application error log is being generated
oasoctl.cgi.exe
exception .....
And the overall status when started OAS as follow :
Site
Please wait while the command is being processed on host berlinsvr1 ...
Starting ORB process...
waiting for ORB to be ready...
oassrv: Starting wrb service 0
ConfigProvider Server accepting requests...
oassrv: Starting wrb service 1
Log Server is accepting requests now...
oassrv: Starting wrb service 2
Web Request Broker (Version: RM 4.0.8 Windows_NT 4 00 10/20/99 21:57:40):
Accepting requests.
oassrv: Starting wrb service 3
The WRB Authentication Host Server is now running.
oassrv: Starting wrb service 4
The WRB Authentication Engine is now running.
oassrv: Starting wrb service 5
Web Request Resource Manager Proxy is accepting requests.
oassrv: Starting wrb service 6
Initializing wrbmon ..........
oassrv is accepting requests
OWS-08821: oassrv process 'oassrv' is started up at pid 367.
OWS-08849: Waited 60 secs. Didn't receive initialization complete message.
OWS-08820: Unable to start wrksf process 'wrksf'.
Initialization Failure- Exiting OAS...
Execute STOP of all the OAS Processes from the OAS Manager
I don't know why it cannot be started, pls help me. TQ
Regard,
Berlin
system :
WinNT 4.00.1381
OAS 4.0
Oracle 8iHow many Mb of ram has installed your server?
Including physicall and swap.
Which service packs has installed?
Best regards, Marcelo. -
Error in the following code.need help asap
hi i have written a block which bulk collects into a pl/sql table.
Getting an error as shown below.
PLz help asap
declare
type summary_upd_tab is table of summary%rowtype;
summary_upd_var summary_upd_tab;
begin
select
min(a.start_time_utc),
max(a.end_time_utc),
sum(duration_seconds),
sum(upload_bytes),
sum(download_bytes)
bulk collect into summary_upd_var ------GEETTING AN ERROR --TOO MANY VALUES???
from aaa_sessions a
group by user_id;
---,type_of_summary,ispeak;
end;
Edited by: user8731258 on Jul 20, 2010 10:16 PMi think the no. of columns should match(and that too in Order) else how will it know which value should go in which field of the collection ?
-
Iam getting error in controlling under kp06 t.code pls help me on this.
Version 0 is not defined for fiscal year 2010.
Message no. GP626
Diagnosis
The version 0 is not defined in controlling area FAB for the fiscal year 2010.
You have to maintain the fiscal year-dependent version parameters for all actual versions for which multiple valuation is updated.
System Response
The version 0 cannot be used for fiscal year 2010.
Procedure
Maintain the fiscal year-dependent version parameters for the version 0.
Execute functionhi.
SPRO > Gen Controlling > Maintain Version > Double click on version "0" . select controlling area setting > Settings for fiscal year.
kkumar -
I require to develop a bdc for T. CODE vk11. while running the bdc in foreground mode an error message is coming
"Screen 0000 is too large for internal batch input area".
can anyone help me out on this.REPORT z_vk11_zprc
NO STANDARD PAGE HEADING LINE-SIZE 255.
PARAMETERS: p_file LIKE rlgrap-filename.
PARAMETERS: m_mode(1) DEFAULT 'P'.
PARAMETERS : p_item TYPE i DEFAULT 18.
DATA: BEGIN OF irec OCCURS 0,
zzlocn LIKE komg-zzlocn,
zzpcode LIKE komg-zzpcode,
zzbqcode LIKE komg-zzbqcode,
kunnr LIKE komg-kunnr, "Customer No
kbetr LIKE konp-kbetr, "Value
konwa LIKE konp-konwa, "Rate unit (INR)
kpein LIKE konp-kpein, "Condition pricing unit (1)
kmein like KONP-KMEIN, "Condition unit (tO)
konp LIKE konp-kmein,
datab LIKE rv13a-datab, "FROM DATE
datbi LIKE rv13a-datbi, "TO DATE
zterm LIKE konp-zterm, "TERM
END OF irec.
DATA : irec_item LIKE irec OCCURS 0 WITH HEADER LINE ,
it_bdc TYPE TABLE OF bdcdata WITH HEADER LINE .
DATA : bdcmsgcoll LIKE bdcmsgcoll OCCURS 0 .
DATA: m_irec_item TYPE i.
DATA : w_pbset(30) VALUE 'DF05B-PSBET',
w_kunnr(30) VALUE 'KOMG-KUNNR',
w_kbetr(30) VALUE 'KONP-KBETR',
w_konwa(30) VALUE 'KONP-KONWA',
w_kpein(30) VALUE 'KONP-KPEIN',
w_kmein(30) VALUE 'KONP-KMEIN',
w_datab(30) VALUE 'RV13A-DATAB',
w_datbi(30) VALUE 'RV13A-DATBI',
w_zterm(30) VALUE 'KONP-ZTERM',
w_counter(2) TYPE n VALUE '00'.
at selection-screen on value-request for p_file.
perform open_window.
*include bdcrecx1.
START-OF-SELECTION.
PERFORM fill_itab.
end-OF-SELECTION.
sort irec by zzlocn zzpcode zzbqcode.
loop at irec.
move-corresponding irec to irec_item.
append irec_item.
endloop.
delete adjacent duplicates from irec comparing zzlocn zzpcode zzbqcode.
*perform open_group.
perform fill_bdc.
form fill_bdc.
LOOP AT irec.
PERFORM bdc_dynpro USING 'SAPMV13A' '0100'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RV13A-KSCHL'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=ANTA'.
PERFORM bdc_field USING 'RV13A-KSCHL'
'ZPRC'.
PERFORM bdc_dynpro USING 'SAPLV14A' '0100'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RV130-SELKZ(07)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=WEIT'.
PERFORM bdc_field USING 'RV130-SELKZ(01)'
PERFORM bdc_field USING 'RV130-SELKZ(07)'
'X'.
PERFORM bdc_dynpro USING 'SAPMV13A' '1916'.
PERFORM bdc_field USING 'BDC_CURSOR'
'KOMG-KUNNR(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'KOMG-ZZLOCN'
IREC-ZZLOCN."'040'.
PERFORM bdc_field USING 'KOMG-ZZPCODE'
IREC-ZZPCODE."'C02'.
PERFORM bdc_field USING 'KOMG-ZZBQCODE'
IREC-ZZBQCODE."'TATXGP'.
CLEAR w_counter.
LOOP AT irec_item WHERE zzlocn = irec-zzlocn AND zzpcode = irec-zzpcode
AND zzbqcode = irec-zzbqcode.
w_counter = w_counter + 01.
w_kunnr = 'KOMG-KUNNR'.
w_kbetr = 'KONP-KBETR'.
w_konwa = 'KONP-KONWA'.
w_kmein = 'KONP-KMEIN'.
w_kpein = 'KONP-KPEIN'.
w_kmein = 'KONP-KMEIN'.
w_datab = 'RV13A-DATAB'.
w_datbi = 'RV13A-DATBI'.
w_zterm = 'KONP-ZTERM'.
CONCATENATE w_kunnr '(' w_counter ')' INTO w_kunnr.
CONCATENATE w_kbetr '(' w_counter ')' INTO w_kbetr.
CONCATENATE w_konwa '(' w_counter ')' INTO w_konwa.
CONCATENATE w_kpein '(' w_counter ')' INTO w_kpein.
CONCATENATE w_kmein '(' w_counter ')' INTO w_kmein.
CONCATENATE w_datab '(' w_counter ')' INTO w_datab.
CONCATENATE w_datbi '(' w_counter ')' INTO w_datbi.
CONCATENATE w_zterm '(' w_counter ')' INTO w_zterm.
PERFORM bdc_field USING w_kunnr "'KOMG-KUNNR(01)'
irec_item-kunnr.
PERFORM bdc_field USING w_kbetr "'KONP-KBETR(01)'
irec_item-kbetr.
PERFORM bdc_field USING w_konwa "'KONP-KONWA(01)'
irec_item-konwa.
PERFORM bdc_field USING w_kpein "'KONP-KPEIN(01)'
irec_item-kpein.
PERFORM bdc_field USING w_kmein "'KONP-KMEIN(01)'
irec_item-kmein.
PERFORM bdc_field USING w_datab "'RV13A-DATAB(01)'
irec_item-datab.
PERFORM bdc_field USING w_datbi "'RV13A-DATBI(01)'
irec_item-datbi.
PERFORM bdc_field USING w_zterm "'KONP-ZTERM(01)'
irec_item-zterm.
if w_counter eq p_item . "no of visible line items in user screen.
PERFORM bdc_dynpro USING 'SAPMV13A' '1916'.
PERFORM bdc_field USING 'BDC_CURSOR'
'KOMG-KUNNR(01)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=NEWP'.
PERFORM bdc_dynpro USING 'SAPMV13A' '1916'.
PERFORM bdc_field USING 'BDC_CURSOR'
'KOMG-KUNNR(02)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
w_counter = 2.
endif.
ENDLOOP.
PERFORM bdc_dynpro USING 'SAPMV13A' '1916'.
PERFORM bdc_field USING 'BDC_CURSOR'
'KOMG-KUNNR(02)'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=SICH'.
call TRANSACTION 'VK11' USING it_bdc update 'S' mode m_mode MESSAGES INTO bdcmsgcoll.
ENDLOOP.
ENDFORM.
*& Form bdc_dynpro
text
-->PROGRAM text
-->DYNPRO text
FORM bdc_dynpro USING program dynpro.
CLEAR it_bdc.
it_bdc-program = program.
it_bdc-dynpro = dynpro.
it_bdc-dynbegin = 'X'.
APPEND it_bdc.
ENDFORM. "bdc_dynpro
*& Form bdc_field
text
-->FNAM text
-->FVAL text
FORM bdc_field USING fnam fval.
if fval <> nodata.
CLEAR it_bdc.
it_bdc-fnam = fnam.
it_bdc-fval = fval.
APPEND it_bdc.
endif.
ENDFORM. "bdc_field
*& Form OPEN_WINDOW
text
--> p1 text
<-- p2 text
form OPEN_WINDOW .
call function 'KD_GET_FILENAME_ON_F4'
exporting
PROGRAM_NAME = SYST-REPID
DYNPRO_NUMBER = SYST-DYNNR
field_name = 'P_FILE'
STATIC = ' '
MASK = ' '
changing
file_name = p_file
EXCEPTIONS
MASK_TOO_LONG = 1
OTHERS = 2
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
endform. " OPEN_WINDOW
*& Form FILL_ITAB
text
--> p1 text
<-- p2 text
form FILL_ITAB .
data: l_file type string.
l_file = p_file.
call function 'GUI_UPLOAD'
exporting
filename = l_file
filetype = 'ASC'
has_field_separator = '|'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
IMPORTING
FILELENGTH =
HEADER =
tables
data_tab = irec[]
exceptions
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
others = 17
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
endform. " FILL_ITAB -
Install error -look at the code. plz help
I have the simple applet that I'm able to compile and load on to a JCOP10 cartd. When I try to install the applet so that I can start interacting with it, I get the following error. How do I go beyond this point? I'll appreciate your help.
JCOP shell
Load report:
747 bytes loaded in 0.0 seconds
effective code size on card:
+ package AID 6
+ applet AIDs 13
+ classes 21
+ methods 470
+ statics 0
+ exports 0
overall 510 bytes
end
/set-var J 0
while ${J} < ${PKG_${I}_APP_COUNT}
install -i ${PKG_${I}_APP_${J}_INST_AID} -q C9#(${PKG_${I}_APP_${J}_INST_DATA}) ${PKG_${I}_AID} ${PKG_${I}_APP_${J}_AID}
=> 80 E6 0C 00 24 06 11 11 11 11 11 11 06 22 22 22 ....$........"""
22 22 22 06 22 22 22 22 22 33 01 00 0B C9 09 23 """."""""3.....#
42 38 47 36 74 63 76 73 00 00 B8G6tcvs..
(0 msec)
<= 6A 80 j.
Status: Wrong data
Error code: 6a80 (Wrong data)
Offending APDU: 6A80
Here is the code.
* Package: myWallet
* Filename: MyWallet.java
* Class: MyWallet
* Date: Jan 23, 2004 2:01:58 PM
package myWallet;
import javacard.framework.*;
//import javacardx.framework.*;
public class MyWallet extends Applet
/* constants declaration */
// code of CLA byte in the command APDU header
final static byte Wallet_CLA =(byte)0x80;
// codes of INS byte in the command APDU header
final static byte VERIFY = (byte) 0x20;
final static byte CREDIT = (byte) 0x30;
final static byte DEBIT = (byte) 0x40;
final static byte GET_BALANCE = (byte) 0x50;
// maximum balance
final static short MAX_BALANCE = (byte)0x7FFF;
// maximum transaction amount
final static byte MAX_TRANSACTION_AMOUNT =(byte)0x007F;
// maximum number of incorrect tries before the
// PIN is blocked
final static byte PIN_TRY_LIMIT =(byte)0x03;
// maximum size PIN
final static byte MAX_PIN_SIZE =(byte)0x08;
// signal that the PIN verification failed
final static short SW_VERIFICATION_FAILED = 0x6300;
// signal the the PIN validation is required
// for a credit or a debit transaction
final static short SW_PIN_VERIFICATION_REQUIRED = 0x6301;
// signal invalid transaction amount
// amount > MAX_TRANSACTION_AMOUNT or amount < 0
final static short SW_INVALID_TRANSACTION_AMOUNT = 0x6A83;
// signal that the balance exceed the maximum
final static short SW_EXCEED_MAXIMUM_BALANCE = 0x6A84;
// signal the the balance becomes negative
final static short SW_NEGATIVE_BALANCE = 0x6A85;
/* instance variables declaration */
OwnerPIN pin;
short balance;
private MyWallet (byte[] bArray,short bOffset,byte bLength)
// It is good programming practice to allocate
// all the memory that an applet needs during
// its lifetime inside the constructor
pin = new OwnerPIN(PIN_TRY_LIMIT, MAX_PIN_SIZE);
byte iLen = bArray[bOffset]; // aid length
bOffset = (short) (bOffset+iLen+1);
byte cLen = bArray[bOffset]; // info length
bOffset = (short) (bOffset+cLen+1);
byte aLen = bArray[bOffset]; // applet data length
// The installation parameters contain the PIN
// initialization value
pin.update(bArray, (short)(bOffset+1), aLen);
register();
} // end of the constructor
public static void install(byte[] bArray, short bOffset, byte bLength){
// create a Wallet applet instance
MyWallet me = new MyWallet(bArray, bOffset, bLength);
me.register(bArray, bOffset, bLength);
} // end of install method
public boolean select()
// The applet declines to be selected
// if the pin is blocked.
if ( pin.getTriesRemaining() == 0 )
return false;
return true;
}// end of select method
public void deselect() {
// reset the pin value
pin.reset();
public void process(APDU apdu) {
// APDU object carries a byte array (buffer) to
// transfer incoming and outgoing APDU header
// and data bytes between card and CAD
// At this point, only the first header bytes
// [CLA, INS, P1, P2, P3] are available in
// the APDU buffer.
// The interface javacard.framework.ISO7816
// declares constants to denote the offset of
// these bytes in the APDU buffer
byte[] buffer = apdu.getBuffer();
// check SELECT APDU command
buffer[ISO7816.OFFSET_CLA] = (byte)(buffer[ISO7816.OFFSET_CLA] & (byte)0xFC);
if ((buffer[ISO7816.OFFSET_CLA] == 0) &&
(buffer[ISO7816.OFFSET_INS] == (byte)(0xA4)) )
return;
// verify the reset of commands have the
// correct CLA byte, which specifies the
// command structure
if (buffer[ISO7816.OFFSET_CLA] != Wallet_CLA)
ISOException.throwIt
(ISO7816.SW_CLA_NOT_SUPPORTED);
switch (buffer[ISO7816.OFFSET_INS]) {
case GET_BALANCE: getBalance(apdu);
return;
case DEBIT: debit(apdu);
return;
case CREDIT: credit(apdu);
return;
case VERIFY: verify(apdu);
return;
default: ISOException.throwIt (ISO7816.SW_INS_NOT_SUPPORTED);
} // end of process method
private void credit(APDU apdu)
// access authentication
if ( ! pin.isValidated() )
ISOException.throwIt(
SW_PIN_VERIFICATION_REQUIRED);
byte[] buffer = apdu.getBuffer();
// Lc byte denotes the number of bytes in the
// data field of the command APDU
byte numBytes = buffer[ISO7816.OFFSET_LC];
// indicate that this APDU has incoming data
// and receive data starting from the offset
// ISO7816.OFFSET_CDATA following the 5 header
// bytes.
byte byteRead =
(byte)(apdu.setIncomingAndReceive());
// it is an error if the number of data bytes
// read does not match the number in Lc byte
if ( ( numBytes != 1 ) || (byteRead != 1) )
ISOException.throwIt(ISO7816.SW_WRONG_LENGTH);
// get the credit amount
byte creditAmount = buffer[ISO7816.OFFSET_CDATA];
// check the credit amount
if ( ( creditAmount > MAX_TRANSACTION_AMOUNT)
|| ( creditAmount < 0 ) )
ISOException.throwIt
(SW_INVALID_TRANSACTION_AMOUNT);
// check the new balance
if ( (short)( balance + creditAmount) > MAX_BALANCE )
ISOException.throwIt
(SW_EXCEED_MAXIMUM_BALANCE);
// credit the amount
balance = (short)(balance + creditAmount);
} // end of deposit method
private void debit(APDU apdu)
// access authentication
if ( ! pin.isValidated() )
ISOException.throwIt
(SW_PIN_VERIFICATION_REQUIRED);
byte[] buffer = apdu.getBuffer();
byte numBytes =
(byte)(buffer[ISO7816.OFFSET_LC]);
byte byteRead =
(byte)(apdu.setIncomingAndReceive());
if ( ( numBytes != 1 ) || (byteRead != 1) )
ISOException.throwIt
(ISO7816.SW_WRONG_LENGTH);
// get debit amount
byte debitAmount =
buffer[ISO7816.OFFSET_CDATA];
// check debit amount
if ( ( debitAmount > MAX_TRANSACTION_AMOUNT)
|| ( debitAmount < 0 ) )
ISOException.throwIt
(SW_INVALID_TRANSACTION_AMOUNT);
// check the new balance
if ( (short)( balance - debitAmount ) < (short)0 )
ISOException.throwIt(SW_NEGATIVE_BALANCE);
balance = (short) (balance - debitAmount);
} // end of debit method
private void getBalance(APDU apdu) {
byte[] buffer = apdu.getBuffer();
// inform system that the applet has finished
// processing the command and the system should
// now prepare to construct a response APDU
// which contains data field
short le = apdu.setOutgoing();
if ( le < 2 )
ISOException.throwIt
(ISO7816.SW_WRONG_LENGTH);
//informs the CAD the actual number of bytes
//returned
apdu.setOutgoingLength((byte)2);
// move the balance data into the APDU buffer
// starting at the offset 0
buffer[0] = (byte)(balance >> 8);
buffer[1] = (byte)(balance & 0xFF);
// send the 2-byte balance at the offset
// 0 in the apdu buffer
apdu.sendBytes((short)0, (short)2);
} // end of getBalance method
private void verify(APDU apdu) {
byte[] buffer = apdu.getBuffer();
// retrieve the PIN data for validation.
byte byteRead =(byte)(apdu.setIncomingAndReceive());
// check pin
// the PIN data is read into the APDU buffer
// at the offset ISO7816.OFFSET_CDATA
// the PIN data length = byteRead
if ( pin.check(buffer, ISO7816.OFFSET_CDATA,byteRead) == false )
ISOException.throwIt(SW_VERIFICATION_FAILED);
} // end of validate method
} // end of class WalletHow do I set a breakpoint in my install method in order to identify the error?
I've tried changing my install method and making it look exactly like the sample wallet applications accompanying the javacard kit, but I'm still getting the same error? here else could be the possible source of the error?
Thomas -
Error in activating Digital Editions - pls help
Hi...
I keep getting the following error code and told to 'try again'. I've seen other posts (much older) where they received the same error, but don't know what the solution is. I am not very techy at all and just wanted to be able to read some library books on my new Kobo over the Christmas break.
E_ADEPT_IOActivationServiceInfoError%20#2032
Can anyone help???Hi...
This is not really replying to the above post ...its just the first place I found to tell my story...
I have been having lots of trouble activating my e-reader on the ADE site...The ADE would not "see" my e-reader...
I tried lots of different combinations of fixes ..installing..uninstalling, using different browsers ...on and on..
using forum help and tech help...nothing worked...
So I did 2 things which no one had suggested...
First I created a new g-mail address and second I reset my e-reader to the factory defaults...and started over....
Everything worked perfectly....just be sure your computer "sees" your e-reader before you start...
If this helps anyone I'd like to know...
Thanks
BJ -
Client/server program: Urgent, pls help!!
I am new to Java, particularly Networking in Java, while writing client/server application I have got completely strucked now. Can any one give me an idea where I am wrong?
I am writing a simple client server application in Java using Socket and ServerSocket classes as a part of my course work. Through client I am just establishing connection with server, getting user inputs/commands, sending the same input to server (server will capitalize this input and return it back to client), receiving and displaying server�s response.
The connection is established fine. Even it is accepting users input well but I am getting runtime NullPointerException while trying to send it to server. Here is the working of my client command window.
C:\Program Files\j2sdk_nb\j2sdk1.4.2\bin\abc>javac TClient.java
C:\Program Files\j2sdk_nb\j2sdk1.4.2\bin\abc>java TClient
Enter the message
hello
Exception in thread "main" java.lang.NullPointerException
at TClient.Send_Message(TClient.java:46)
at TClient.main(TClient.java:76)
C:\Program Files\j2sdk_nb\j2sdk1.4.2\bin\abc>
As soon as I get this exception the connection with server is lost and I get this in server command window.
C:\Program Files\j2sdk_nb\j2sdk1.4.2\bin\abc>javac TCPServer.java
C:\Program Files\j2sdk_nb\j2sdk1.4.2\bin\abc>java TCPServer
Exception in thread "main" java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:168)
at java.io.ObjectInputStream$PeekInputStream.read(ObjectInputStream.java
:2150)
at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream
.java:2163)
at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputS
tream.java:2631)
at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:734
at java.io.ObjectInputStream.<init>(ObjectInputStream.java:253)
at TCPServer.main(TCPServer.java:17)
C:\Program Files\j2sdk_nb\j2sdk1.4.2\bin\abc>
Here is my code for server (TCPServer.java)
import java.io.*;
import java.net.*;
class TCPServer {
public static void main(String argv[]) throws Exception
String clientSentence;
String capitalizedSentence;
ServerSocket welcomeSocket = new ServerSocket(80);
while(true) {
Socket connectionSocket = welcomeSocket.accept();
ObjectInputStream inFromClient = new ObjectInputStream(connectionSocket.getInputStream());
ObjectOutputStream outToClient =
new ObjectOutputStream(connectionSocket.getOutputStream());
clientSentence = (String ) inFromClient.readObject();
capitalizedSentence = clientSentence.toUpperCase() + '\n';
outToClient.writeObject(capitalizedSentence);
And this is for Client (TClient.java)
import java.io.*;
import java.net.*;
import java.util.*;
class TClient {
private ObjectOutputStream server_output;
private ObjectInputStream server_input;
private Socket client;
private void server_connect() throws IOException
client = new Socket(InetAddress.getLocalHost(), 80);
private void getstreams() throws IOException
server_output = new ObjectOutputStream (client.getOutputStream());
server_output.flush();
server_input = new ObjectInputStream(client.getInputStream());
private String get_cmd_frm_usr() throws IOException
BufferedReader inFromUser =
new BufferedReader(new InputStreamReader(System.in));
String sentence;
System.out.println("Enter the message");
sentence = inFromUser.readLine();
/*StringTokenizer st = new StringTokenizer(sentence);
while (st.hasMoreTokens()) //separating n printing words of inputted sentence
System.out.println(st.nextToken());
return(sentence);
private void Send_Message(String msg) throws IOException
//System.out.println("within send_message method :"+ msg);
server_output.writeObject( msg );
server_output.flush();
private void recieve_n_disp_mess() throws Exception
String modifiedSentence;
modifiedSentence = ( String ) server_input.readObject();
System.out.println("\n\n by SERVER: " + modifiedSentence);
private void close_connection() throws IOException
client.close();
public static void main(String args[]) throws Exception
TClient client = new TClient();
try{
client.server_connect();
String command=client.get_cmd_frm_usr();
//System.out.println("this is returned from input method n ready to sent to server soon: "+ command);
client.Send_Message(command);
client.recieve_n_disp_mess();
client.close_connection();
} catch(EOFException eofException) {}
catch (IOException ioException) {}you never initialized the server_output and the server_input vriables...
I see you have the getstreams() function which should initialize them but you never call it...
so untill you will call it those variables will stay null.
I can also see you do not implement constructors, its much easier just to implement these instead of functions initializing variables...
Hope it will help
private void getstreams() throws IOException
server_output = new ObjectOutputStream
(client.getOutputStream());
server_output.flush();
server_input = new
ObjectInputStream(client.getInputStream());
public static void main(String args[]) throws
Exception
TClient client = new TClient();
try{
client.server_connect();
String command=client.get_cmd_frm_usr();
//System.out.println("this is returned from input method n ready to sent to server soon: "+ command);
client.Send_Message(command);
client.recieve_n_disp_mess();
client.close_connection();
} catch(EOFException eofException) {}
catch (IOException ioException) {}
Maybe you are looking for
-
I have apple tv which is set up to my PC. Sometimes when I want to listen to my music through my entertainment system via PC and airplay, the airplay does not appear on the computer. Therefore I cannot access apple tv/entertainment system speakers.
-
I've had my iPhone 4 for just under a year now and a couple weeks ago the lock button broke. At first, it was just difficult to press down and now it's just completely stuck. I've been using the assistive touch but it's kind of a hassle. I still have
-
Clipnotes error using Premiere Pro CS3
I would like to know if anyone has a solution to this problem: When trying to use Clip notes I get an error: Export Error - Writer not found. I am using Windows Vista and Windows media not Quick Time. This is to create the clip notes in PDF. Your hel
-
Null Pointer exception in Webshop
Hi, We are facing a problem of null pointer exception in the webshop when opening the product details (only in case of handful of products and not for other products) from the hyperlink of the product in the basket. The product itself appears with sh
-
Copy paste from pdf without the formatting
I've never understood how to copy and paste from pdf to word without getting the line return characters which mess up the formatting. Why doesn't text flow from line to line as it does in a normal word processor? Why does adobe insist on copying the