How to know from which input device data is entered into application [message #432921] |
Fri, 27 November 2009 05:38 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
shashikoor
Messages: 25 Registered: April 2006 Location: india
|
Junior Member |
|
|
Hi,
Is there any way to know from which input device data is entered into froms 6i application.
We are supporting point of sales (retail domain)application .
Normally items will be scanned through bar code scanner at teh time of biling.
Some times when items will not get scanned cashiers enter the barcode data through key board.
We want to capture those bar codes which are entered though key board.
Can you please help?
thanks,
shashanka.
[3 topics MERGED by LF]
[Updated on: Fri, 27 November 2009 07:17] by Moderator Report message to a moderator
|
|
|
|
how to know whether the input is given through keyboard or any other device like bar code [message #432923 is a reply to message #432921] |
Fri, 27 November 2009 05:46 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
shashikoor
Messages: 25 Registered: April 2006 Location: india
|
Junior Member |
|
|
Hello ,
is there any way to know whether the input is given through keyboard or any other device like bar code scanner in oracle9i/forms 6i application.
I am a IT team member in an organization which is into retail business.
The above question is one of the requirements to capture how many times a particular bar code is captured manually through key board rather than bar code scanner.
Thanks in advance,
shashanka.
|
|
|
|
Re: how to know whether the input is given through keyboard or any other device like bar code [message #648357 is a reply to message #432934] |
Mon, 22 February 2016 03:22 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](//www.gravatar.com/avatar/5dff2040b6fb6a8da3167f5e96704fab?s=64&d=mm&r=g) |
siva_1959
Messages: 2 Registered: February 2016 Location: INDIA
|
Junior Member |
|
|
How to distinguish a data captured in a form is from manual input or barcode scanner interface.
Usually barcode scanner is used for capturing data in a form like Library, Departmental store applications etc.
The User sometimes makes a manual key-in data for the field or data captured through barcode interface. The manual entry may be wrong due to human errors but barcode scanner interface will be right always. So it is necessary to differentiate in the programming level itself and make necessary field to insert data in the underlying table.
To distinguish the data whether it is from manual entries or barcode scanner the following procedure has been followed in oracle forms6i and achieved the result.
WHEN-NEW-ITEM-INSTANCE
Begin
select to_char(sysdate,'HH:MM:SS') into :global.cursor_in_time from dual;
end;
KEY-NEXT-ITEM
Begin
select to_char(sysdate,'HH:MM:SS') into :global.cursor_out_time from dual;
end;
In the Save Button as you designed :
-------------------------------------------
WHEN_BUTTON_PRESSED
--------------------------------------
Declare
data_passing_from_time number(5) := 0; -- in seconds
data_passing_to_time number(5) := 0; -- in seconds
passing_duration number(5) := 0; -- in seconds
usr_id varchar2(20) := null;
Begin
if :system.form_status = 'CHANGED' then
--
-- Conversion to Hours to Minutes + Minutes and total Minutes to Seconds + Seconds ..
--
data_passing_to_time := ((to_number(substr(:global.cursor_out_time,1,2)) * 60) +
to_number(substr(:global.cursor_out_time,4,2))) * 60) +
to_number(substr(:global.cursor_out_time,7,2));
data_passing_from_time := ((to_number(substr(:global.cursor_in_time,1,2)) * 60) +
to_number(substr(:global.cursor_in_time,4,2))) * 60) +
to_number(substr(:global.cursor_in_time,7,2));
--
-- Now we can get the passing duration in Seconds of the Scanner / Manual Entry.
--
passing_duration := data_passing_to_time - data_passing_from_time;
--
-- If you want to see the passing duration, put in message .. other-wise put -- before message ..
--
message('Passing Duration : '|| passing_duration||' secs');
--
-- We can conclude the data read by the Scanner would be 1 or 2 seconds
-- otherwise we could easily conclude the data entered by manually.
--
select user into usr_id from dual;
:USER_ID := usr_id||'-'||passing_duration||' secs';
commit_form;
--
-- The information saved into the concern database for later use.
--
end if;
end;
|
|
|
|
|
|