Skip to Content
author's profile photo Former Member
Former Member

Read COMM port using ABAP w/o third party software

We are implementing ECC 6.0. The first and foremost transaction is receiving of

material . We have a scenario where weight and quality data of a product

needs to be captured via serial port (COMM1).

In case of weight capturing, the local computer is connected to a

digital weight display device via COMM1 port, which has typical COMM

port properties like Parity Bits/Baud Rate/Stop Bits/Bits per second

etc. We need to read COMM Port data through ABAP (through some FM/Piece

of code/ service/Class, whichever is possible) without using any other

third party application.


Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Posted on Feb 27, 2012 at 07:41 AM

    Dear Kalpaj,

    is this issue closed now? Are you able to read COMM Port data using ABAP without involving third party s/w?



    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      In my case, my program is getting sy-subrc = 3 for the code "SET PROPERTY OF o_obj 'PortOpen' = 1". It is because there is another program using the CommPort (My hyperterminal is currently accessing the CommPort).

      I dont get sy-subrc = 3 again when i disconnected my hyperterminal.

      Just make sure there is no other program accessing the CommPort when the program is running.

      Kind Regards,

  • Posted on Feb 27, 2012 at 12:28 PM

    Hello Kalpaj,

    with my experience, this is not possible. Due to the fact, that the SAPGUI is "just" a presentation-layer for the Netweaver ABAP AS, you cannot expect, that there is a standard FM to access directly to the hardware of your system.

    Indeed, it is possible to call programs on the workstation through a FM via RFC. So, you can build a small programm, which just read the COMM-Port and communicates via RFC with the SAP-System.

    We have solved this problem, by creating a small java-rfc-server with the Java-Connector and then communicate via native protocol to the COMM-Port and send the results to the SAP-System via RFC.

    Kind regards,


    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Fausto,

      I have encountered the same problem before,

      In my case, it happened because of the difference port setting between the receiver (SAP) and the sender port (the weight bridge). I solved my problem by matching the properties between them,

      Maybe you can check the properties of the port (Parity Bits/Baud Rate/Stop Bits/Bits per second) in your function module which you use to call the ActiveX Control and the properties (Parity Bits/Baud Rate/Stop Bits/Bits per second) which your weight bridge use.

      I hope it helps.

      Thank you.

  • Posted on Jun 02, 2015 at 08:04 AM

    hi kapil,

    Did u resolve the issue..

    i am facing the same problem..

    pls guide..



    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 22, 2016 at 04:08 PM

    HI Firoz,

    I am usigng above one code for weighbridge but i got value in output like '#' so how to convert value in string.

    I configured in WIN7 system for COM2 port.

    Please help me.



    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.