Convert data from datatype RAW to Char.

Hi All,
I have a requiement, which has to use a standard report to get the data and add few more custom fields to enhance the output.
I'm using the EXPORTING LIST TO MEMORY AND RETURN approach.
From Zreport I'm calling standard program rakopl02 using SUBMIT rakopl02 EXPORTING LIST TO MEMORY AND RETURN.
and then using below FM's.
CALL FUNCTION 'LIST_FROM_MEMORY'
CALL FUNCTION 'WRITE_LIST'
problem is: in RFC 'WRITE_LIST' , data is displaying in ABAPLIST(structure) which has a field RFCRECORD (  RAW  Data type)
field                 component type        data type                  length
RFCRECORD    RFCRECORD_            RAW                        1000
need to convert the RAW datatype to Char/String for the requirement.
how do convert the data...
need help on this.
-waiting for d response.

Hi Praveen.,
Pls check the below Function Module.,
DATA : t_table1 TYPE STANDARD TABLE OF str_itab,
         i_data TYPE STANDARD TABLE OF string.
  CALL FUNCTION 'HR_KR_XSTRING_TO_STRING'
    EXPORTING
      in_xstring = l_xstring
    IMPORTING
      out_string = l_string.
        SPLIT l_string  AT cl_abap_char_utilities=>newline INTO TABLE i_data.
        LOOP AT i_data INTO l_string.
    SPLIT l_string AT cl_abap_char_utilities=>horizontal_tab INTO TABLE fields.
     READ TABLE fields INTO lv_field INDEX 1.
    fs_table-name = lv_field.
     READ TABLE fields INTO lv_field INDEX 2.
    fs_table-age = lv_field.
    READ TABLE fields INTO lv_field INDEX 3.
    fs_table-gender = lv_field.
     APPEND fs_table TO t_table1.
hope this will help u.,
Thanks & Regards
Kiran

Similar Messages

  • Need to convert  Date from calendar to String in the format dd-mom-yyyy

    Need to convert Date from calendar to String in the format dd-mom-yyyy+..
    This is absolutely necessary... any help plz..
    Rgds
    Arwinder

    Look up the SimpleDateFormat class: http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html
    Arwinder wrote:
    This is absolutely necessary... any help plz..For you maybe, not others. Please refrain from trying to urge others to answer your queries. They'll do it at their own pace ( if at all ).
    People on the forum help others voluntarily, it's not their job.
    Help them help you.
    Learn how to ask questions first: http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch
    (Yes I know it's on JavaRanch but I think it applies everywhere)
    ----------------------------------------------------------------

  • How to convert date from "yyyymmdd" to "MM/DD/YYYY" format

    1. I have one BLDAT field in my internal table.
       its getting updated from input file.
    2. The value in the input file is like yyyymmdd.
       So the internal table field is filled like this
       "YYYYMMDD".
    3. After this,I have to compare this internal table  
       field with BSAD table.
    4. The BLDAT field in BSAD table is in the format of 
       "MM/DD/YYYY".
    5. the BLDAT field is having diff format in internal  table and BSAD table.So I am unable to check this value.
    How to convert it as like the BSAD table format."MM/DD/YYYY" format.
    Thanks in advance!!

    Using the WRITE statement
      data: gd_date(10).  "field to store output date
    * Converts date from 20020901 to 09.01.2002
      write sy-datum to gd_date mm/dd/yyyy.
    OR u can
    CONCATENATE gd_date+4(2) gd_date+6(2) gd_date+0(4)
    into gd_date seperated by '/' .
    Hope this helps.
    Kindly reward points and close the thread for the
    answer which helped u OR get back with queries.

  • How to I convert data from oracle database into excel sheet

    how to I convert data from oracle database into excel sheet.
    I need to import columns and there datas from oracle database to microsoft excel sheet.
    Please let me know the different ways for doing this.
    Thanks.

    asktom.oracle.com has an excellent article on writing a PL/SQL procedure that dumps data to an Excel spreadsheet-- search for 'Excel' and it'll come up.
    You can also use your favorite connection protocol (ODBC, OLE DB, etc) to connect from Excel to Oracle and pull the data out that way.
    Justin

  • Convert data from internal table to XML file.

    Hi All,
    I am selecting data from database into one internal table.
    Now I want to convert data from internal table to xml file format and save in to my desktop. Please suggest me how I can achieve my requirement.
    Kindly reply me ASAP.

    Use this FM. SAP_CONVERT_TO_XML_FORMAT
    Check this link too -
    Re: Data Export in XML format
    XML files from ABAP programs

  • How can i convert data from DBF to oracle database 10g?

    Sir,
    How can i convert data from DBF to oracle database 10g?

    I assume you at least know how to dump the contents of foxpro dbf file into CSV format.
    Regarding SQL*Loader, hope this demo makes it a bit clear to you...
    http://www.princeton.edu/~storacle/sqlloader_demo.shtml
    I agree that it is an old web page (references Oracle 8.0.5) but basics remain the same.
    If it is still unclear to you after referring above link, then get an Oracle consultant.

  • Converting date from DD.MM.YYYY  to  YYYY - MM - DD  format

    Hi All,
    Can you give me a way to convert date from DD.MM.YYYY  to  YYYY - MM - DD  format. Actually frm tables i am getting date in DD.MM.YYYY format.  And i want to print it in YYYY-MM-DD format.
    Please reply.
    Thanks And Regards,
    Mayank Verma
    Moderator message - Please search before asking. Date formatting is one of the most common questions asked - post locked
    Edited by: Rob Burbank on Jul 6, 2009 10:42 AM

    Hi,
    Hey you can make use of offset  and concatenate statement to convert the date.
    regards,
    Ankur Parab

  • Convert date from YYYYMMDD to DDMMYYYY

    Please help if anyone knows any function module to convert date from YYYYMMDD to DDMMYYYY format..
    Thanks in Advance,
    manjari

    Hello.
    Simply do like this:
    DATA: datum TYPE char10.
    WRITE sy-datum TO datum <format option>.
    <format options>:
    DD/MM/YY and MM/DD/YY:
    Both additions have the same effect. The date output has a two-digit year value and a separator. The separator and the order are taken from the definition for date output in the user master record.
    DD/MM/YYYY und MM/DD/YYYY:
    Both additions have the same effect. The date output has a four-digit year value and separator. The separator and the order are taken from the definition for date output in the user master record.
    DDMMYY und MMDDYY:
    Both additions have the same effect. The date output has a two-digit year value and no separator. The order is taken from the definition for date output in the user master record.
    YYMMDD:
    This addition provides a date output with a two-digit year value without a separator in the format YYMMDD.
    Regards.
    Valter Oliveira.

  • How to convert date from ccyymm format to mmddyy

    hi,
    How to convert date from ccyymm format to mmddyy

    Please don't multipost. This question has been answered in your first post.
    How to convert date to ccyymm format
    Regards,
    Jo

  • I want to convert date from Microsoft Access to Oracle.

    I want to convert date from Microsoft Access to Oracle.
    My Oracel date format is 21-Jul-2004 02:24:09 AM
    I use sqlldr in Oracle 9i Database and I
    write control file
    load data
    infile 'test.txt'
    into table test
    fields terminated by "," optionally enclosed by '"'
    trailing nullcols
    name,
    birthday
    data file 'test.txt' for input
    "dao","21-Jul-2004 02:24:09 AM"
    why did error? ORA-01843: not a valid month
    Thank.

    replace birthday with
    birthday "to_date(:birthday, 'DD-Mon-YYYY HH:MI:SS AM', 'NLS_LANGUAGE=''american''')"Of course, if your monthes are in German, then set the language to german (JUL=JUL but DEZ<>DEC)
    Regards
    Laurent

  • ALE, use bd79 (converting data from sender to receiver to blank out fields)

    Hi, I am trying to blank four fields out in our FI IDOC for a certain business reason.  These fields must be blank (it is the FIDCC1 message type).   I am trying to use transaction bd79 (converting data from sender to receiver) maintain rules.  Is there a way to blank out these fields using a conversion rule?  I can change data fine but I cannot find a way to blank or null a field out.  Thanks in advance.

    You should have a look at the inbound function module (linked to your inbound process code). sometimes there are checks that if fields are initial that nothing will be changed.

  • Convert data from AS/400

    When I make a query to AS/400 table, the character field appear in Hexa presentation, How can I translate that to human readable format?
    Thanks

    You can retrieve data from your database, and then perform some convertions between datacodifications.
    You can cast an int to a char to a String:
    int vInt = 50;
    char vChar = (char)vInt;
    String vString = ""+vChar;
    System.out.println("int=" + vInt + ", char=" + vChar + ", str=" + vString);
    // output: int=50, char=2, str=2
    All think that your stoed data are in the form of strings like "0x56" for hex 56, Integer.decode() are useful here.

  • What is the best way to load and convert data from a flat file?

    Hi,
    I want to load data from a flat file, convert dates, numbers and some fields with custom logic (e.g. 0,1 into N,Y) to the correct format.
    The rows where all to_number, to_date and custom conversions succeed should go into table STG_OK. If some conversion fails (due to an illegal format in the flat file), those rows (where the conversion raises some exception) should go into table STG_ERR.
    What is the best and easiest way to archive this?
    Thanks,
    Carsten.

    Hi,
    thanks for your answers so far!
    I gave them a thought and came up with two different alternatives:
    Alternative 1
    I load the data from the flat file into a staging table using sqlldr. I convert the data to the target format using sqlldr expressions.
    The columns of the staging table have the target format (date, number).
    The rows that cannot be loaded go into a bad file. I manually load the data from the bad file (without any conversion) into the error table.
    Alternative 2
    The columns of the staging table are all of type varchar2 regardless of the target format.
    I define data rules for all columns that require a later conversion.
    I load the data from the flat file into the staging table using external table or sqlldr without any data conversion.
    The rows that cannot be loaded go automatically into the error table.
    When I read the data from the staging table, I can safely convert it since it is already checked by the rules.
    What I dislike in alternative 1 is that I manually have to create a second file and a second mapping (ok, I can automate this using OMB*Plus).
    Further, I would prefer using expressions in the mapping for converting the data.
    What I dislike in alternative 2 is that I have to create a data rule and a conversion expression and then keep the data rule and the conversion expression in sync (in case of changes of the file format).
    I also would prefer to have the data in the staging table in the target format. Well, I might load it into a second staging table with columns having the target format. But that's another mapping and a lot of i/o.
    As far as I know I need the data quality option for using data rules, is that true?
    Is there another alternative without any of these drawbacks?
    Otherwise I think I will go for alternative 1.
    Thanks,
    Carsten.

  • Convert data from one table to another

    SQL> select * from A;
    empid | mon_tips | tues_tips | wed_tips | thu_tips | fri_tips
    ----------------- ------------  --------- ----------+----------
    1 | 10 | 20 | 30 | 20 | 10
    2 | 10 | 20 | 30 | 40 | 50
    i want a SQL query that will convert the data from table A into table B with the following format:
    B(empid, Day, tips) where the column Day can take the values (Mon, Tue, Wed, Thu, Fri).
    Thanks in adavnce for the replies
    sqllearner

    creaate table B as (select empid, 'MONDAY' day_1, mon_tips tips from a
    union
    select empid, 'TUESDAY' day_1, tues_tips tips from a
    union
    select empid, 'WEDNESDAY' day_1, wed_tips tips from a
    union
    select empid, 'THURSDAY' day_1, thu_tips tips from a
    union
    select empid, 'FRIDAY' day_1, fri_tips tips from a)Cheers
    Sarma.

  • Convert data from cobol to SAP-R/3

    Hi Experts,
    Plz let me to know, How to Convert data in cobol format to SAP-R3?
    I get Cobal data in a file that should be updated to SAP..
    Thanks & Regards,
    SarathS.

    Hi.
    It should be in excel sheet if you want transafer data from any Legacy to SAp,Not only cobol,so first convert data to excel then trasfer to SAP.
    Regards.
    jay

Maybe you are looking for

  • Will Not Copy After Being Idle

    THIS IS A COPYING ISSUE!!!  After installing the upgraded version of Comcast's latest modem/router, our HP 6550 would not print.  I contacted Comcast and reported the difficulty and they informed me it was a printer problem - not their new modem.  Co

  • Session Timeout Thoughts

    I saw a post from awhile ago that you can't change the session timeout in iTunes U. Is this still true? Our users are having timeout issues and we have an unfortunately lengthy login process to get back into iTunes U so I had some thoughts on the Sit

  • CFolders error in bid. Integration with SAP SRM

    Hi All, I have a problem with bids for bid invitation with collaborations. Cfolders installed as addon to SRM, SAP xRPM/cProjects/cFolders 4.50 (ABAP). I have done the foll steps: u2022 define a LS for cFolders( you have to duplicate SRM LS if it is

  • Whats my web server - JWS or apache

    Folks- How do I know if my ifs setup is using JWS or Apache? Thanks in advance. Ramana

  • No internet, how to connect? BB curve 8520

    Hi, i have a BB curve 8520, i bought it through Optus (it is unlocked now) but am connected through virgin australia Virgin has no settings for it and tell me to ring blackberry but i cannot find a number in australia to ring can anyone give me any i