How to read data from bar code scanner of ET1 in a programmatic way?

What I am looking for specifically is, ET1 populates the data from bar code scanner automatically into any editable text field. Due to the user flow complexities, I need a way to read data directly from the code and then populate my view elements.