Read COMM Port Using ABAP W - o Third Party Software - in My IT Knowledge

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Read COMM port using ABAP w/o third party software | in My IT Kno... http://inmyitkb.blogspot.com/2017/03/read-comm-port-using-abap-wo-th...

Read COMM port using ABAP w/o third party software


Read COMM port using ABAP w/o third party software [https://archive.sap.com/discussions/thread/1688977] :

Good news is that It's very much possible from ABAP without involving third party s/w.We have tested this
succesfully.

Step 1: Create a Function Module (code given below)

Step 2: Register the Windows activeX control MSCOM32.OCX on the client PC where the Weighbridge's serial port
is connected.

Step 3: Implement this control in Transaction SOLE in SAP (Create an entry MSCOMMLIB.MSCOMM.1 and enter
the CLSID. {648A5600-2C6E-101B-82B6-000000000014}

Step 4: Active this MSCOMM32.OCX with Licence Key on the client PC where the Weighbridge's serial port is
connected.

Open RUN execute : regedit

Go to u201CHKEY_CLASSES_ROOT\Licenses\u201D

Create new key (Folder) name with '4250E830-6AC2-11cf-8ADB-00AA00C00905'

Give the default VALUE: kjljvjjjoquqmjjjvpqqkqmqykypoqjquoun

Restart the system and run the FM. if the data is coming on the serial port then you will get the result.

FM Code:

Copy Code

FUNCTION z_serial_comport.

"-------------------------------------------------------------------------------"

""""Local Interface:

"" IMPORTING

5. "" REFERENCE(MODE) TYPE I DEFAULT 0

"" REFERENCE(COMMPORT) TYPE I DEFAULT 1

"" REFERENCE(SETTINGS) TYPE C DEFAULT '2400,N,8,1'

"" REFERENCE(OUTPUT) TYPE C OPTIONAL

"" EXPORTING

10. "" REFERENCE(INPUT) TYPE C

1 of 5 28-Feb-19, 9:33 AM

You might also like