Char to Num or Num To Char

Hi Gurus,
Can any one tell the conversion from char to num or num to char in ABAP. we are using abap extractor .where we are  joining num --> char Field.
select c1 c2 c3 from table x,y
where xcolumn(num) = ycolumn(char).
I got a CHAR_NUMC_CONVERSION but how i can implement in select is still a question.
Any quick suggestions would be great.
Marks will be rewarded.

assign char type value in to variable of type n and compare in where statement.

Similar Messages

  • PO Num,GR Num,GR Date in a single query

    Dear friends,
    There is requirement, where I need to have PO Num,GR Num,GR Date in a single query.Is there any standard provider or standard Infosource for this kind of query.Even if its not there kindly help me with ur valuable suggestions.

    Hi,
    There is no standard extrction and Standard report as per your reuirement.
    Here to get your query, you have to do enhancements.I think,
    GR Num,GR Date can be available from 2lis_12_vcitm. So enhance
    this DS to get respetive PO ( in case the reocrd from 2lis_12_vcitm is a delivery document of PO) .
    You can also enhance PO extractors ( GR Num,GR Date )to get ,but in case ,if a PO has multiple delivery documents, then we donot get multiple records to BW. 
    Discuss with ABAP team to get proper knowledge on flow of document processing and on Tables are being used.
    With rgds,
    Anil Kumar Sharma .P

  • Encoding Issue: Change UTF8 with BOM char file to UTF16LE without BOM char.

    i am trying to read UTF 8 file with BOM char .. if BOM mark present then i want to remove that BOM char
    and write same file with UTF16LE with out BOM char ..
    Please suggest solution on this .
    FileInputStream fis = new FileInputStream(file);
                   long size = file.length();
                   byte[] b = new byte[(int) size];
                   int bytesRead = fis.read(b, 0, (int) size);
                   if (bytesRead != size) {
                        throw new IOException("cannot read file");
                   byte[] srcBytes = b;
                            int b0 = srcBytes[0] & 0xff;
                   int b1 = srcBytes[1] & 0xff;
                   int b2 = srcBytes[2] & 0xff;
                   int b3 = srcBytes[3] & 0xff;
                   if (b0 == 0xef && b1 == 0xbb && b2 == 0xbf) {
                        System.out.println("Hint: the file starts with a UTF-8 BOM.");
                             String srcStr = new String(b ,"UTF8");
                     String      encoding= "UnicodeLittle";
                            writeFile(filePath, srcStr,encoding);// Here is writing file with UTF16LE
         But files gets written with BOM char .
    how do i remove this .
    Please suggest solution on this

    'uncle_alice' - in the OP's other thread on this topic I posted a decorated InputStream class that will strip of any (well any I could find definitions of) BOM prefix. Using this it is almost trivial for the OP to convert a file from one encoding to another without worrying about the BOM. I showed him the water but I can't make him drink.

  • Write (char)147 to output file become (char)63 when read.

    Hi,
    I was doing an encryption for my assignment. And here I found a problem.
                   FileWriter fstream = new FileWriter("output.out");
                   BufferedWriter dos = new BufferedWriter(fstream);
    dos.write((char)147);
    dos.close(); fstream.close();
    When I tried to read the output.out file using this function:
                   File inputFile = new File(filename);
                   FileInputStream fis = new FileInputStream(inputFile);
                   BufferedInputStream bis = new BufferedInputStream(fis);
                   BufferedReader dis = new BufferedReader(new InputStreamReader(bis));
    char test = dis.read();
    dis.close(); bis.close(); fis.close();
    It shows that the test character is representing (char)63 (question mark). Any idea on how to solve this? I want to write (char)147 to the file and read it as (char)147, not as (char)63.
    Thanks in advance,
    Dennis A.

    dennis_lin007 wrote:
    Ok thanks a lot!!
    I'm using RSA encryption, and if the mod is > 255, there are probabilities that its result may contain a value greater than 255. The implication of this is that you are encrypting byte-by-byte which does not make sense. Assuming that you are writing the RSA code from scratch and not using the JCE then consider using BigInteger. BigInteger has all the ancillary methods you will need to implement RSA.

  • URG: Converting encoded greek char from HTML page to greek char

    String geekvalues = "&# 966;&# 948;&# 945;&# 963;&# 966;&# 945;&# 963;&# 948;&# 966;";
    ( i have inserted space b/w &# ddd; because while framing the query they get converted to
    greek char)
    I parse the following string and insert the integer values in the following
    o/p stream with UTF8 ecoding.
    I can see proper greek char in the file, but when i read the contents of the file
    and try inserting these values to the DB, they appear as ���������(not what i see on my m/c) some junk char.
    bufferWriter = new BufferedWriter
    (new OutputStreamWriter(new FileOutputStream("d:\\tempAA.txt",false),"UTF8"));
    bufferWriter.write(x);
    bufferReader = new BufferedReader
    (new InputStreamReader(new FileInputStream("d:\\tempAA.txt"),"UTF8"));
    retGreekValue =bufferReader.readLine();
    String sqlStr = "INSERT INTO test_table VALUES('"+retGreekValue+"')";
    Could anybody suggest how do i insert proper greek characters in Database from the encoded string from browser.
    Thanks in advance,

    You could try the Internationalization forum. Although the question "I need to get data in script X from my database through the Internet to a browser and back, and it doesn't work" is asked frequently there, and never seems to get an answer.

  • @ char is replaced with a weird char by OCSG

    IT looks like OCSG is replacing some of the speacial chars like '@' and '$' in the message body to some characters. Has anybody had similar problem? Any resolution details is highly appreciated as it is affecting the customer.

    Thank you, FXChrome did the trick.

  • Cannot convert a char value to money. The char value has incorrect syntax.

    USE [RealEstate]
    GO
    /****** Object:  StoredProcedure [dbo].[search]   
    Script Date: 03/18/2014 13:32:53 ******/
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    ALTER proc [dbo].[search]    
    --location      
    @locationName nvarchar(50),      
    @parentId int, --*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-    
    @locatioTypeName nvarchar(50),      
    --property      
    @propertyDetailsName nvarchar(50),      
    @propertyDetailsStatus nvarchar(50),      
    @propertyDetailsPriceFrom money,  
    @propertyDetailsPriceTo money,     
    @propertyDetailsQuantityFrom int,  
    @propertyDetailsQuantityTo int,     
    @propertyDetailsAreaFrom int,  
    @propertyDetailsAreaTo int,      
    @propertyDetailsRoomNumberFrom int,      
    @propertyDetailsRoomNumberTo int,  
    @propertyName nvarchar(50)     
    as      
    begin      
    SELECT * from viewSearch       
    where  (@locationName is null or (location_name like '%'+@locationName+'%' ) or location_name=@locationName  )
    and ( @parentId is null or(parent_id=@parentId ))
    and (@locatioTypeName is null or(location_type_name like '%'+ @locatioTypeName +'%'  ) or location_type_name=@locatioTypeName  )
    and (@propertyDetailsName is null or(property_details_name like '%'+ @propertyDetailsName+'%' ) or property_details_name=@propertyDetailsName  )
    and (@propertyDetailsStatus is null or (property_details_status like '%'+@propertyDetailsStatus +'%' ) or property_details_status=@propertyDetailsStatus      )
    and (@propertyDetailsPriceFrom is null or @propertyDetailsPriceTo is null or(property_details_price between '%'+@propertyDetailsPriceFrom +'%' and '%'+@propertyDetailsPriceTo +'%' )  or property_details_price=@propertyDetailsPriceFrom or
    property_details_price=@propertyDetailsPriceTo  )
    and (@propertyDetailsQuantityFrom is null or @propertyDetailsQuantityTo is null or(property_details_quantity between '%'+@propertyDetailsQuantityFrom +'%'  and '%'+@propertyDetailsQuantityTo+'%'   )or property_details_quantity
    =@propertyDetailsQuantityFrom or property_details_quantity=@propertyDetailsQuantityTo  )
    and (@propertyDetailsRoomNumberFrom is null or @propertyDetailsRoomNumberTo is null or(property_details_roomNo between '%'+ @propertyDetailsRoomNumberFrom +'%'  and '%'+ @propertyDetailsRoomNumberTo +'%' )  or property_details_roomNo
    =@propertyDetailsRoomNumberFrom or property_details_roomNo=@propertyDetailsRoomNumberTo   )
    and (@propertyName is null or (property_name like '%'+@propertyName+'%' ) or property_name=@propertyName  )
    and (@propertyDetailsAreaFrom is null or @propertyDetailsAreaTo is null or (property_details_area between '%'+@propertyDetailsAreaFrom+'%' and '%'+@propertyDetailsAreaTo+'%' ) or property_details_area=@propertyDetailsAreaFrom or property_details_area=@propertyDetailsAreaTo 
    end

    Fadi,
    Can you try the below?? :
    (Have removed '%' marks for searching wrt Between clause as string wise wildcard search is not needed for integer or money values - provided the columns are NOT in varchar but in int/money types.)
    ALTER proc [dbo].[search]
    --location
    @locationName nvarchar(50),
    @parentId int, --*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
    @locatioTypeName nvarchar(50),
    --property
    @propertyDetailsName nvarchar(50),
    @propertyDetailsStatus nvarchar(50),
    @propertyDetailsPriceFrom money,
    @propertyDetailsPriceTo money,
    @propertyDetailsQuantityFrom int,
    @propertyDetailsQuantityTo int,
    @propertyDetailsAreaFrom int,
    @propertyDetailsAreaTo int,
    @propertyDetailsRoomNumberFrom int,
    @propertyDetailsRoomNumberTo int,
    @propertyName nvarchar(50)
    as
    begin
    SELECT * from viewSearch
    where
    (@locationName is null or (location_name like '%'+@locationName+'%' ) or location_name=@locationName )
    and ( @parentId is null or(parent_id=@parentId ))
    and (@locatioTypeName is null or(location_type_name like '%'+ @locatioTypeName +'%' ) or location_type_name=@locatioTypeName )
    and (@propertyDetailsName is null or(property_details_name like '%'+ @propertyDetailsName+'%' ) or property_details_name=@propertyDetailsName )
    and (@propertyDetailsStatus is null or (property_details_status like '%'+@propertyDetailsStatus +'%' ) or property_details_status=@propertyDetailsStatus )
    and (@propertyDetailsPriceFrom is null or @propertyDetailsPriceTo is null or(property_details_price between @propertyDetailsPriceFrom and @propertyDetailsPriceTo ) or property_details_price=@propertyDetailsPriceFrom or property_details_price=@propertyDetailsPriceTo )
    and (@propertyDetailsQuantityFrom is null or @propertyDetailsQuantityTo is null or(property_details_quantity between @propertyDetailsQuantityFrom and @propertyDetailsQuantityTo )or property_details_quantity =@propertyDetailsQuantityFrom or property_details_quantity=@propertyDetailsQuantityTo )
    and (@propertyDetailsRoomNumberFrom is null or @propertyDetailsRoomNumberTo is null or(property_details_roomNo between @propertyDetailsRoomNumberFrom and @propertyDetailsRoomNumberTo ) or property_details_roomNo =@propertyDetailsRoomNumberFrom or property_details_roomNo=@propertyDetailsRoomNumberTo )
    and (@propertyName is null or (property_name like '%'+@propertyName+'%' ) or property_name=@propertyName )
    and (@propertyDetailsAreaFrom is null or @propertyDetailsAreaTo is null or (property_details_area between @propertyDetailsAreaFrom and @propertyDetailsAreaTo ) or property_details_area=@propertyDetailsAreaFrom or property_details_area=@propertyDetailsAreaTo )
    end
    If your table columns are of varchar datatype and you'd wanna do a sequential (characater) search, then you may have the CAST/CONVERT operators in your Proc as suggested by Olaf ..
    Thanks,
    Jay
    <If the post was helpful mark as 'Helpful' and if the post answered your query, mark as 'Answered'>

  • Obtain a value of the  char ( In a FOX formula) when CHAR is Modifiable

    Hi ,
      We are doing Integrated planning in NW04S BI.
      Assume we have a Agg level field1, field2, field3, field4 and Amount field.
    we defined a filter with Field1 and Field2.
    We have defined Field3 and Field4 as changeable in the Planning function ( FOX)
    In the planning function, we can use OBJ() to obtain values for Fiield1 and Field2 BUT not Field3 and Field4.
    We have processing logic where we need to know the field value of Field4 and Field5 for the data object.
    Is there a way to obtain Charteristic value, when the chartestics are actually defined as' To be changed' in the FOX planning function?
    Appreciate your help.
    BPSIP

    Shyam,
    While your answer is helpful, I would request you to provide a little detail of the exact syntax. For example, I have provided the logic below. Please let me know if I get the correct syntax of the FOREACH .
    Thanks
    assume field1, field2, field3, field4 all are info object in BI and are part of the Aggregation level.
    field3 and field4 are configured as 'To be changed' in the planning function.
    Here is the FOX CODE
    data   v_field1 type field1.
    data   v_field2 type field2.
    data   v_field3 type field3.
    data   v_field4 type field4.
    v_field1 = obj().
    v_field2 = obj().
    foreach v_field3.
    if v_field3 is initial.
    I like to do some complex processing here. for some
    reason, looks like it's not working, PLEASE HELP WITH *THE CORRECT SYNTAX for reading and comparing the value *of v_field1 for this data block.
    endif.
    endfor.
    end of  FOX CODE

  • What is a Material Num, Catalog Num, Part Num and Variant??

    Hi All,
    Can anyone explain me & gimme the definition of
    1. Material Number
    2. Catalog Number
    3. Part Number
    4. Variant
    What are these & where are they used??
    Please explain this with respect to a Configurable materail..
    If this is not the right forum for this discussion, please let me know the right forum..
    Any help would be highly appreciated..
    Thanks in Advance,
    Shridhar..

    I think you should post it under "Supply Chain Management (SCM)" forum topic

  • MS-LDAP usernames are 15 char long SAP only allows 12 Char

    I have a customer that has a MS-Active Directory consolidation project going on as well as an SAP implementation. There will need to be new standards set for the Active Directory and there will be a large data cleanup. I am not sure if they will use portal but it is an ECC, BI and PI implementation at least. They wish to set up Single sign on with LDAP.  The issue is some of their LDAP user names are 15 charcters long but SAP only accepts 12 characters - what will happen when we connect this up?
    Is there any way around it?
    Thanks in advance.

    Hello,
    but I would not cut off the username without searching for duplicates.
    A good way to solve this could be to introduce an IdM username based upon numbers, like A00001, A00002 and so on. And then join in the usernames from AD and SAP storing their usernames in the ACCOUNT attributes or something.
    For the duplicate check you could use the fields firstname, lastname, mail address, personal number, ... It can be a bit tricky though and you may need to manually synchronize some users, but this is worth it.
    Regards
    Dominik

  • Measuring Point during IK01 not allowing characteristics with CHAR type

    Hi Experts,
    Measuring Point during IK01 not allowing characteristics with CHAR type Only allows NUM,
    could you anyone suggest on this.
    Regards
    Nitin

    May i know the reason of such implementation?
    You can use group code and valuation code for assigning predefined values to measuring documents.
    Moreover text field can be used for assigning short text to it.

  • Displaying the Attribute of a Char

    Hi All,
    I have to display a CHAR in the report. But that CHAR is an attribute of another CHAR. I am unable to display the attribute with out displaying the main CHAR means I have to display only the attribute and not the main CHAR i.e
    for ex: If I have to display the prod. hierarchy code which is an attribute of the CHAR Material, I have to display the Product Hierarchy with out displaying the Material.
    Any Ideas please???
    Best Regards,
    James.

    Hi All,
    I solved my problem with ur suggestions...
    Thanks a lot...
    Points Assigned...
    Best Regards,
    James.

  • Counting a Char in relation to KF

    Hi
       I Have the following fields in my report.
    Account #    >Char
    Open Amount > KF
    of Invoices > Char
    I need to get the '# of Invoices' with a Unique 'Open Amount'. For example if there are 40 invoices each with an open amount of $15.40.
    Your thoughts appreciated
    Message was edited by:
            xcaliber
    Message was edited by:
            xcaliber

    This is not possible in Bex.
    This would not be a regular business requirement I assume.
    To trace such invoices, you may want to do SE16 on F or E table, get the DIMIDs for the invoice no dimension, go to the dimension table with these DIMIDs to get the SIDs of the invoice no, and finally to the SID table to get the actual invoices.
    If SE16 doesn't allow you to select on a number, you may have to do this using ABAP.
    Or do a Bex report with all invoice no / amount and then do a search in excel itself for the values you are interested.
    cheers,

  • How to create a blank field parameter for lenth 400 char

    hi,
    in my coading i want
    selection-screen skip 1.
    selection-screen begin of line.
    parameters:select1 like dd02l-tabname ,
                a(400) .
    selection-screen end of line.
    but in selection screen the lenth of a coming only up to 45 char.
    i want at lease 300 char.
    how to do???
    thanks
    navketan

    Max length is 132 . You cannot have more than that. The maximum visible length of the input field is between 39 and 45.
    You can do like this . Create as many parameters like p1(45) ,p2(45) ,p3(45) ,p4(45) ,................till the count is 400
    Then you concatenate p1 p2 p3 p4 ..... into one  .
    Edited by: Karthik Arunachalam on Mar 23, 2009 5:12 PM

  • How to add a new char in Update rule

    Hi Gurus:
    I copied update rules from an old cube. This new cube is a copy of old cube - almost.
    One of the char is missing in the new cube when compared to old cube. There is a small update routine for that char which I need to introduce to new cube.
    My problem is, I'm not able to figure out how to add the new char in the update rule & start the mapping process..
    Thanks & Regards

    Dear Bhanu: This is what happened.
    When I copied - it defaulted this char with what present in comm structure. Basically the old cube has a routine for this char...
    And the position of this char in the update rule for chars..got realigned.
    I'm sorry - I should have check it properly.
    Thanks a LOT for your time & input...I will assign the points
    Best Regards

Maybe you are looking for