We have added search box. Key in SAP issue keyword to search
TopBottom

Announcement: wanna exchange links? contact me at sapchatroom@gmail.com.

[sap-dev] READ DATA from TCPIP Port using MSWINSCK - OLE2

Posted by Admin at
Share this post:
Ma.gnolia DiggIt! Del.icio.us Yahoo Furl Technorati Reddit

Question from NMGajjar on Jan 29 at 11:21 PM
Dear Gurus,

I am developing a interface to communicate with the Control System over TCP/IP Port.
first I tested the same using VB6 Program and every thing is working Fine

I have to achieve the same in SAP.

I Have written a Function to call mswinsck using OLE2


I am able to Connect to the System.
I am able to Send data to the System.
but the Only Problem is I am not able to receive data from the System,

DATA: O_OBJ TYPE ole2_object.
Code 1.

*----------------------------------
DATA : RDATA TYPE c LENGTH 255.
GET PROPERTY OF o_OBJ 'BytesReceived' = BUFFR .
CLEAR XSTATE.
GET PROPERTY OF o_OBJ 'State' = XSTATE .
CLEAR XSTATE.
CALL METHOD OF
o_OBJ
'GETDATA' = REC_STR
EXPORTING
#1 = 'vbString'
#2 = buffr.
CLEAR XSTATE.



Code 2



DATA : RDATA TYPE c LENGTH 255.
GET PROPERTY OF o_OBJ 'BytesReceived' = BUFFR .
CLEAR XSTATE.
GET PROPERTY OF o_OBJ 'State' = XSTATE .
CLEAR XSTATE.
CALL METHOD OF
o_OBJ
'GETDATA' = REC_STR.
CLEAR XSTATE.



in both Code I am receiving Length and Connection Status properly.
but I am unable to receive the Data .

Help me resolve the Issue


Thank you in advance.


Regards,
Nilesh M Gajjar
 
Reply to this email to post your response.
 
__.____._
Manage Settings | Unsubscribe | Create FAQ | Send Feedback
  
Copyright © 2013 Ziff Davis, Inc. and message author.
Ziff Davis, Inc. 28 E 28th Street New York, NY 10016
NMGajjar  
 
View this online
Ask a new question
 
In the Spotlight
Toolbox.com for iPhone & Android: Ask Questions & Get Answers Anywhere. Download the Free App

_.____.__

0 comments:

Post a Comment

T r a n s l a t e to your language