Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

To restrict End user to enter EAN code manually

Former Member
0 Kudos

In Premargin check when we go for Bar code scanning, the EAN code field appears in editable mode. After scanning an article that field gets the EAN code automatically from database table for that particular article. But one can modify that ean code as it appears in editable mode. I want to make that field to appear in grey mode so that end user can not enter ean code manually and if i scan an article this field gets the ean code from master data.

How can i restrict end user to enter the EAN code manually in the EAN code field.

5 REPLIES 5

sridhar_meesala
Active Contributor
0 Kudos

Hi,

Make the field as output only in the attributes window of that field.

Thanks,

Sri.

0 Kudos

Dear Sri,

Thanks for your reply but i have tried this option also. Let me explain you about the scenario.

In UI screen there is a field EAN code. It can be filled either by scanner or an end user can feed the data on his own without scanning the article.

What i want is to make this happen only by scanning not by manual entry.

Whenever an article is scanned its EAN code automatically should come in that field.

I have made the field in grey mode but while scanning it is not picking the EAN code of that article and throwing an error message as "EAN code field can not be left blank". When I am making that field in editable mode then it is able to pick the EAN code after scanning.

0 Kudos

Hi,

Then you can do one thing. You keep the field in the editable mode only and write a code to make the field non editable after it has fetched a value.

Hope it helps you.

Thanks,

Sri.

0 Kudos

Hi,

How to do that??

0 Kudos

Hi,

Suppose the field name is field1.

So you can write like this,

LOOP AT SCREEN.
 IF field1 IS NOT INITIAL.
  IF screen-name = 'field1'.
   screen-input = 0.
   MODIFY SCREEN.
  ENDIF.
 ENDIF.
ENDLOOP.

Thanks,

Sri.