‎2013 Aug 16 9:14 AM
I have a specific requirement to convert one standard to another.
The length of given standard is 13 where first two and last two alphabets are Characters...all the others are numeric values. for e.g. FF123456789JJ.
I have to convert it into EPC (Electronic Product code) standard so that EM (Event Management) Module can understand it,
Is there any function module available for conversion purpose??
Also If I have to work with individual bits for conversion purpose.. Any Idea , how it can be achieved?
‎2013 Aug 17 11:27 AM
Is FF123456789JJ the unique serial number?
If yes, you can try this if it works.
UPC + Unique Serial number = EPC
The RFID/EPC tag contains the UPC plus a serial number which differentiates one like item from another.
If FF123456789JJ is a unique serial number you have to get details to generate bar code and concatenate the UPC with this unique serial number which as a whole acts as a EPC for differentiating an item from one another.
‎2013 Aug 17 11:27 AM
Is FF123456789JJ the unique serial number?
If yes, you can try this if it works.
UPC + Unique Serial number = EPC
The RFID/EPC tag contains the UPC plus a serial number which differentiates one like item from another.
If FF123456789JJ is a unique serial number you have to get details to generate bar code and concatenate the UPC with this unique serial number which as a whole acts as a EPC for differentiating an item from one another.
‎2013 Aug 17 11:37 AM
not sure about any FM though that would be preferable idea. if you want to process individual bit you can use offsets.
‎2013 Aug 17 6:05 PM
It seems, offsets can only be used for hexadecimal objects. Can It be used for decimal objects??
Example
The hexadecimal value "1B" is assigned to the data object hex and its bits are read from front to back. The output is "00011011", which corresponds to the binary display of decimal 27 or hexadecimal "1B".
DATA: len TYPE i,
res TYPE i,
hex TYPE xstring.
hex = '1B'.
len = XSTRLEN( hex ) * 8.
WHILE sy-index <= len.
GET BIT sy-index OF hex INTO res.
WRITE (1) res NO-GAP.
ENDWHILE.
In the above example, I want to pass decimal value through hex variable(type p) and get desired result. Well, I don't think , It is possible through offsets. Is it?
‎2013 Aug 17 12:03 PM
hi ratnakar,
EPC code is FF123456789JJ what is EM code ? any example is there?
‎2013 Aug 17 5:47 PM
FF123456789JJ is not EPC Code. To convert the given unique code (for e.g. FF123456789JJ) to EPC, basically i have to convert it to binary format. I can covert it to binary format through this way ...GIVEN UNIQUE CODE--->ASCII CODE(in decimal)--->BINARY FORMAT.So Is there any specific fm to convert decimal to binary in abap?