04-15-2009 12:24 PM
hi friends,
any body have idea ,that after reading(scanning) the bar code we need to pick the barcode value into
our sap.shell i create any interface for this or sap provides any interface to pick the data into sap.will it possible to capture that into sap.please share your experience and suggestions.
04-15-2009 1:15 PM
hi,
u can save urreading into text file then u can use
FM 'WS_EXECUTE' TO READ AND 'WS_UPLOAD TO SAVE THAT READINGS INTO SAP.
u can write code like this
refresh itab3.
clear itab3.
* Executing VB EXE file to get the weight from weigh bridge
call function 'WS_EXECUTE'
exporting
* DOCUMENT = ' '
* CD = ' '
* COMMANDLINE = ' '
inform = 'X'
cd = 'C:\SAPWEI'
program = 'C:\sapwei\MyVB.exe'
* STAT = ' '
* WINID = ' '
* OSMAC_SCRIPT = ' '
* OSMAC_CREATOR = ' '
* WIN16_EXT = ' '
* EXEC_RC = ' '
* IMPORTING
* RBUFF
* EXCEPTIONS
* FRONTEND_ERROR = 1
* NO_BATCH = 2
* PROG_NOT_FOUND = 3
* ILLEGAL_OPTION = 4
* GUI_REFUSE_EXECUTE = 5
* OTHERS = 6
.
* IF sy-subrc 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
* ENDIF.
* Fetching Value from VB text file
call function 'WS_UPLOAD'
exporting
* CODEPAGE = ' '
filename = 'C:\sapwei\w1.txt'
* FILETYPE = 'ASC'
* HEADLEN = ' '
* LINE_EXIT = ' '
* TRUNCLEN = ' '
* USER_FORM = ' '
* USER_PROG = ' '
* DAT_D_FORMAT = ' '
* IMPORTING
* FILELENGTHtables
data_tab = itab3
* EXCEPTIONS
* CONVERSION_ERROR = 1
* FILE_OPEN_ERROR = 2
* FILE_READ_ERROR = 3
* INVALID_TYPE = 4
* NO_BATCH = 5
* UNKNOWN_ERROR = 6
* INVALID_TABLE_WIDTH = 7
* GUI_REFUSE_FILETRANSFER = 8
* CUSTOMER_ERROR = 9
* NO_AUTHORITY = 10
* OTHERS = 11
.
if sy-subrc 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
loop at itab3.
v1 = itab3-num.
pgrwt = v1.
endloop.
message 'Save Gross Weight' type 'S'.
endform. " grosswt
04-15-2009 12:30 PM
04-15-2009 12:32 PM
thank u but i can create bar codes , problem is reading those into sap.
04-15-2009 12:34 PM
Hi,
You do need an interface. Something like a vb script which would get the data into an excel,notepad file where it can be uploaded.
But in some case as if you have to read, for example, a barcode that holds the legal number of an invoice using a barcode scanner and this number should be sent to migo-> bktxt then you don't need an interface. The scanner itself acts like a fast operator entering the characters using a keyboard and filling in the field. Hope this helps.
Thanks
04-15-2009 12:37 PM
04-15-2009 12:39 PM
Hello,
Kindly go through the following link.
http://www.sap-img.com/abap/details-information-about-sap-barcodes.htm
regards
04-15-2009 12:45 PM
thanks for your reply ,but above link is for creating barcodes.
Edited by: sudheer b on Apr 15, 2009 1:45 PM
Edited by: sudheer b on Apr 15, 2009 2:04 PM
04-15-2009 1:15 PM
hi,
u can save urreading into text file then u can use
FM 'WS_EXECUTE' TO READ AND 'WS_UPLOAD TO SAVE THAT READINGS INTO SAP.
u can write code like this
refresh itab3.
clear itab3.
* Executing VB EXE file to get the weight from weigh bridge
call function 'WS_EXECUTE'
exporting
* DOCUMENT = ' '
* CD = ' '
* COMMANDLINE = ' '
inform = 'X'
cd = 'C:\SAPWEI'
program = 'C:\sapwei\MyVB.exe'
* STAT = ' '
* WINID = ' '
* OSMAC_SCRIPT = ' '
* OSMAC_CREATOR = ' '
* WIN16_EXT = ' '
* EXEC_RC = ' '
* IMPORTING
* RBUFF
* EXCEPTIONS
* FRONTEND_ERROR = 1
* NO_BATCH = 2
* PROG_NOT_FOUND = 3
* ILLEGAL_OPTION = 4
* GUI_REFUSE_EXECUTE = 5
* OTHERS = 6
.
* IF sy-subrc 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
* ENDIF.
* Fetching Value from VB text file
call function 'WS_UPLOAD'
exporting
* CODEPAGE = ' '
filename = 'C:\sapwei\w1.txt'
* FILETYPE = 'ASC'
* HEADLEN = ' '
* LINE_EXIT = ' '
* TRUNCLEN = ' '
* USER_FORM = ' '
* USER_PROG = ' '
* DAT_D_FORMAT = ' '
* IMPORTING
* FILELENGTHtables
data_tab = itab3
* EXCEPTIONS
* CONVERSION_ERROR = 1
* FILE_OPEN_ERROR = 2
* FILE_READ_ERROR = 3
* INVALID_TYPE = 4
* NO_BATCH = 5
* UNKNOWN_ERROR = 6
* INVALID_TABLE_WIDTH = 7
* GUI_REFUSE_FILETRANSFER = 8
* CUSTOMER_ERROR = 9
* NO_AUTHORITY = 10
* OTHERS = 11
.
if sy-subrc 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
loop at itab3.
v1 = itab3-num.
pgrwt = v1.
endloop.
message 'Save Gross Weight' type 'S'.
endform. " grosswt
04-15-2009 1:39 PM
thank u ,but we need not to execute from sap , he externally scan the barcode with scanner .
when he scanned it, it will automatically get into sap. that is the requirement.
04-17-2009 6:33 AM
04-17-2009 6:39 AM
U need a RF gun ,load the SAP console into that . It will read ur barcode data for the appropriate fields on screen. We did that for Warehouse Management there we used LM01 transaction. U need not code anything for barcode reading. The Basis guy will take care of configuring ur SAP in the RF gun, u can run ur SAP transaction on the RF device.
04-17-2009 6:45 AM
Hi thank u very much,
will it works for any transaction ? or only for warehouse management tcodes ?
04-17-2009 6:48 AM
04-17-2009 6:54 AM
ok could u please tell me any other information regarding this ? what are the prerequisites for this ?
04-17-2009 7:06 AM
Hi
Check this function module /AIN/UI_BARCODE_AI_SCAN
otherwise in SE37 search for the function modules corresponding to barcode identifiers and to get values of barcode.