Help with writing and retrieving data from a table field with type "LCHR"

Hi Experts,
I need help with writing and reading data from a database table field which has a type of "LCHR". I have given an example of the original code but don't know what to change it to in order to fix it and still read in the original data that's stored in the LCHR field.
Basically we have two Function modules, one that saves list data to a database table and one that reads in this data. Both Function modules have an identicle table which has an array of fields from type INT4, CHAR, and type P. The INT4 field is the first one.
Incidentally this worked in the 4.7 non-unicode system but is now dumping in the new ECC6 Unicode system.
Thanks in advance,
C
SAVING THE LIST DATA TO DB
DATA: L_WA(800).
LOOP AT T_TAB into L_WA.
ZDBTAB-DATALEN = STRLEN( L_WA ).
MOVE: L_WA to ZDBTAB-RAWDATA.
ZDBTAB-LINENUM = SY-TABIX.
INSERT ZDBTAB.
READING THE DATA FROM DB
DATA: BEGIN OF T_DATA,
             SEQNR type ZDBTAB-LINENUM,
             DATA type ZDBTAB-RAWDATA,
           END OF T_TAB.
Select the data.
SELECT linenum rawdata from ZDBTAB into table T_DATA
     WHERE repid = w_repname
     AND rundate = w_rundate
     ORDER BY linenum.
Populate calling Internal Table.
LOOP AT T-DATA.
APPEND T_DATA to T_TAB.
ENDLOOP.

Hi Anuj,
The unicode flag is active.
When I run our report and then to try and save the list data a dump is happening at the following point
LOOP AT T_TAB into L_WA.
As I say, T_TAB consists of different fields and field types whereas L_WA is CHAR 800. The dump mentions UC_OBJECTS_NOT_CONVERTIBLE
When I try to load a saved list the dump is happening at the following point
APPEND T_DATA-RAWDATA to T_TAB.
T_DATA-RAWDATA is type LCHR and T_TAB consists of different fields and field types.
In both examples the dumps mention UC_OBJECTS_NOT_CONVERTIBLE
Regards
C

Similar Messages

  • Writing and Retrieving data from an Excel spreadsheet

    Hi all
    I am working on some battery chargers and need to record the data from my DAQ to an Excel Spreadsheet. How do i do that?
    I don't wanna purchase the Office toolkit from Labview!
    Please Help!
    RJ

    Hi smercurio_fc
    Hi Smercurio_fc,
    Thanks for the reply. I really appreciate your help.
    However, I would like to point out that after making numerous searches, I could not get any VI or thread working for my case. Most of the files complain regarding any of their missing sub-VI(s).
    I myself don't understand the problem. I have even re-installed the application to shoot any of the possible installation errors. I m not a spammer.
    I'll try to do what you have suggested in the former part of your reply.
    Regards,
    RJ

  • How to retrieve data from edcauditentity table?

    Hello!
    I am interested how to connect to edcauditentity table and retrieve data from this table.
    I have sql query but i don't have idea how to start. For now i can connect to LiveCycle and retrieve policy name.
    Thank in advance!

    Hello Mohan,
    if u already have data and u want to populate it in F4 help then use below code -
    u Have to make use of FM - 'F4IF_INT_TABLE_VALUE_REQUEST'
    REPORT  ZGILL_VALUE_REQUEST                     .
    data: begin of lt_all occurs 0.
            include structure DYNPREAD.
    data  end of lt_all.
    data: begin of lt_selected occurs 0.
           include structure DDSHRETVAL.
    data: end of lt_selected.
    DATA: BEGIN OF lt_code OCCURS 0,
                code LIKE zgill_main-PERNR,
          END OF lt_code.
    data no_dyn like sy-dynnr.
    Parameters : ECODE like zgill_main-PERNR.
    *parameters: pernr like pa0001-pernr .
    no_dyn =  sy-dynnr.   "give the scren no directly or sy-dynnr in case of report.
    At selection-screen on value-request for ECODE.
    select PERNR into table lt_code from zgill_main.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
          EXPORTING
            retfield               = 'ECODE'
            dynpprog               = sy-repid
           dynpnr                  = no_dyn
          dynprofield              =       'ECODE'
          window_title           = 'Employee Details'
           value_org              = 'S'
          DISPLAY                = 'F'
       TABLES
            value_tab             = lt_code
           RETURN_TAB             = lt_selected.
    EXCEPTIONS
      PARAMETER_ERROR        = 1
      NO_VALUES_FOUND        = 2
      OTHERS                 = 3
    *if sy-subrc eq '0' .
      write: 'success'.
    *endif.
    read   table lt_selected index sy-tabix.
    move lt_selected-fieldval to ECODE.

  • Is it possible to retrieve data from an Oracle db with an LDAP query?

    Our application uses an LDAP query to retrieve data from Microsoft Active Directory. Is it also possible to retrieve data from an Oracle database with an LDAP query?

    if you have Oracle Internet Directory, you will retrieve with ldapsearch data, which are physically stored in the database. But to select * from emp where ename='SCOTT', it is probably not possible.
    At least I have never heard of such a product which translate ldap query in sql query. But feel free to write your own one in perl :-)

  • How to retrieve data from catsdb table and convert into xml using BAPI

    How to retrieve data from catsdb table and convert into xml using BAPI
    Points will be rewarded,
    Thank you,
    Regards,
    Jagrut BharatKumar Shukla

    Hi,
    This is not your requirment but u can try this :
    CREATE OR REPLACE DIRECTORY text_file AS 'D:\TEXT_FILE\';
    GRANT READ ON DIRECTORY text_file TO fah;
    GRANT WRITE ON DIRECTORY text_file TO fah;
    DROP TABLE load_a;
    CREATE TABLE load_a
    (a1 varchar2(20),
    a2 varchar2(200))
    ORGANIZATION EXTERNAL
    (TYPE ORACLE_LOADER
    DEFAULT DIRECTORY text_file
    ACCESS PARAMETERS
    (FIELDS TERMINATED BY ','
    LOCATION ('data.txt')
    select * from load_a;
    CREATE TABLE A AS select * from load_a;
    SELECT * FROM A
    Regards
    Faheem Latif

  • Retrieving data from 3 tables

    Hi,
    I am working on a report where I have to retrieve data from 3 tables(marc,mara,makt).For this I have used 3 select statements for retriving data from 3 tables.There r some fields which r not present in marc table where as present in mara and makt tables.So added thos fields in marc internal table t_marc.I have looped at marc table and used the read statement to read the data from mara table using the key field matnr from both the tables.This read statement is giving the sy-subrc value as 4.Could u pls tell me why this is happening?I am sending my code.
    SELECT matnr
           werks
           pstat
           lvorm
    FROM  marc
    INTO  TABLE t_marc
    PACKAGE SIZE 500
    WHERE matnr IN s_matnr
    AND   werks IN s_werks.
    IF NOT t_marc[] IS INITIAL.
    SELECT matnr
            ersda
            laeda
            meins
       FROM mara
       INTO TABLE t_mara
       FOR ALL ENTRIES IN t_marc
       WHERE matnr = t_marc-matnr
       AND   ersda IN s_ersda
       AND   laeda IN s_laeda.
      IF NOT t_mara[] IS INITIAL.
         SELECT matnr
                maktx
         FROM  makt
         INTO  TABLE t_makt
         FOR ALL ENTRIES IN t_mara
         WHERE matnr = t_mara-matnr.
       LOOP AT t_marc INTO wa_marc.
         READ TABLE t_mara INTO wa_mara WITH KEY matnr = t_marc-matnr.
         IF sy-subrc IS INITIAL.
            wa_marc-meins = wa_mara-meins.
            MODIFY t_marc.
            APPEND wa_marc TO t_output.
          ENDIF.
          READ TABLE t_makt INTO wa_makt WITH KEY matnr = t_marc-matnr.
          IF sy-subrc IS INITIAL.
            wa_marc-maktx = wa_makt-maktx.
            MODIFY t_marc.
            APPEND wa_marc TO t_output.
          ENDIF.
        ENDLOOP.

    hi hema,
    Dont use three select stements for this scenario.
    Just use innerjoin and join all the three tables.
    Three tables should contain  MATNR (material number).
    By using that retrieve data from 3 tables by using a single select statement.
    Eg:
    SELECT DISTINCT a~matnr    "MATERIAL NUMBER
             a~ersda    "CREATED ON
             a~mtart    "MATERIAL TYPE
             a~meins    "BASE UNIT OF MEASURE
             a~bstme    "ORDER UNIT
             b~maktx    "MATERIAL DESCRIPTION
             c~bwkey    "VALUATION AREA
             c~lbkum    "TOTAL VALUED STOCK
             c~salk3    "VALUE OF TOTAL VALUED STOCK
             c~stprs    "STANDARD PRICE
             c~peinh    "PRICE UNIT
             c~bklas    "VALUATION CLASS
             INTO TABLE it_matdetails
             FROM mara AS a INNER JOIN makt AS b ON a~matnr = b~matnr
                            INNER JOIN mbew AS c ON a~matnr = c~matnr
                            INNER JOIN marc AS d ON a~matnr = d~matnr
                            INNER JOIN mard AS e ON a~matnr = e~matnr
             WHERE b~spras = sy-langu AND a~matnr IN matnr AND d~werks IN werks AND e~lgort IN lgort.
    pls reward if helpful.

  • How to Retrieve data from Variant Table

    Can anyone help me by telling how to retrieve data from variant table which was created by user. I am able to see data of variant table only thru cu60 transaction but not se11. I s there any function module to do this?

    Hello Mohan,
    if u already have data and u want to populate it in F4 help then use below code -
    u Have to make use of FM - 'F4IF_INT_TABLE_VALUE_REQUEST'
    REPORT  ZGILL_VALUE_REQUEST                     .
    data: begin of lt_all occurs 0.
            include structure DYNPREAD.
    data  end of lt_all.
    data: begin of lt_selected occurs 0.
           include structure DDSHRETVAL.
    data: end of lt_selected.
    DATA: BEGIN OF lt_code OCCURS 0,
                code LIKE zgill_main-PERNR,
          END OF lt_code.
    data no_dyn like sy-dynnr.
    Parameters : ECODE like zgill_main-PERNR.
    *parameters: pernr like pa0001-pernr .
    no_dyn =  sy-dynnr.   "give the scren no directly or sy-dynnr in case of report.
    At selection-screen on value-request for ECODE.
    select PERNR into table lt_code from zgill_main.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
          EXPORTING
            retfield               = 'ECODE'
            dynpprog               = sy-repid
           dynpnr                  = no_dyn
          dynprofield              =       'ECODE'
          window_title           = 'Employee Details'
           value_org              = 'S'
          DISPLAY                = 'F'
       TABLES
            value_tab             = lt_code
           RETURN_TAB             = lt_selected.
    EXCEPTIONS
      PARAMETER_ERROR        = 1
      NO_VALUES_FOUND        = 2
      OTHERS                 = 3
    *if sy-subrc eq '0' .
      write: 'success'.
    *endif.
    read   table lt_selected index sy-tabix.
    move lt_selected-fieldval to ECODE.

  • Hi, experts. I want  retrieve data from 8 tables

    Hi, experts. I want  retrieve data from 8 tables.
    On which table i have to write for all entries query.
    Thanks in advance.

    Hai   Reddy,
    Actually IF we Use Join's Actually The Performance Will Be Good For  4 tables.
    So It Is Better  To  Create Two Joins  With  4 Tables Each.
    First Retrive The Data For First  View.
    Then Use For ALL  Entries For  First Table And Then   Get Data For Second data.
    Reward  If Found usefull.
    Regards.
    Eshwar.

  • Retrieve data from oracle table, table name passed in runtime into JSP

    Hello All,
    I am new to JSP, i have a requirement,
    I need to retrieve data from oracle table, here table is passed at random. how to get the data displayed in JSP page.
    can any one help me in that
    thanks

    1) Learn SQL.
    2) Learn Java.
    3) Learn JDBC.
    4) Learn DAO.
    5) Learn HTTP.
    6) Learn HTML.
    7) Learn JSP/Servlet.
    8) Learn JSTL.
    9) Apply learned things and develop.
    Whenever you stucks, please come back and post the specific coding/technical problem here.

  • Retrieve data from nested tables

    Hi All,
    I have big trouble to retrieve data from nested tables..
    From java code developer are passing struct data type to Oracle procedure.. So equal data type in oracle has been created as created as object
    CREATE OR REPLACE TYPE TXNDATA AS OBJECT
      TRAN_ID            NUMBER             ,
      EVENT_ID                   NUMBER             ,
      EVENT_CD                   VARCHAR2(10 BYTE))and create a procedure which has a IN parameter as TXNDATA
    now i need to retrieve the column data's through SELECT clause such as
    TYPE Proc_txn  IS TABLE OF  TXNJOURNALDATA;
    EVENT_JOURNAL_SEQ Proc_txn;
    select  * from table(cast(EVENT_JOURNAL_SEQ));but above SQL will give all column data's but i need to retrieve only 2 column values such as
    select EVENT_ID , EVENT_CD  from table(cast(EVENT_JOURNAL_SEQ))how can i achieve the above result set?
    Thanks & Regards
    Sami.

    use a table alias in your query
    SQL> set serveroutput on
    SQL> create TYPE TXNDATA AS OBJECT
      2  (
      3    TRAN_ID            NUMBER             ,
      4    EVENT_ID                   NUMBER             ,
      5    EVENT_CD                   VARCHAR2(10 BYTE));
      6  /
    Type created.
    SQL>
    SQL> create type txnjournaldata
      2  as table of txndata;
      3  /
    Type created.
    SQL>
    SQL> declare
      2     txn txnjournaldata := txnjournaldata (
      3                             txndata(10, 20, 'One')
      4                             ,txndata(10, 20, 'Two')
      5                           );
      6  begin
      7     for rec in (select tx.event_id
      8                       , tx.event_cd
      9                    from table (txn) tx
    10                 )
    11     loop
    12        dbms_output.put_line (rec.event_id||' - '||rec.event_cd);
    13     end loop;
    14  end;
    15  /
    20 - One
    20 - Two
    PL/SQL procedure successfully completed.Edited by: Alex Nuijten on Oct 24, 2011 12:24 PM

  • Creating a external content type for Read and Update data from two tables in sqlserver using sharepoint designer

    Hi
    how to create a external content type for  Read and Update data from two tables in  sqlserver using sharepoint designer 2010
    i created a bcs service using centraladministration site
    i have two tables in sqlserver
    1)Employee
    -empno
    -firstname
    -lastname
    2)EmpDepartment
    -empno
    -deptno
    -location
    i want to just create a list to display employee details from two tables
    empid firstname deptno location
    and same time update  in two tables
    adil

    When I try to create an external content type based on a view (AdventureWorks2012.vSalesPerson) - I can display the data in an external list.  When I attempt to edit it, I get an error:
    External List fails when attached to a SQL view        
    Sorry, something went wrong
    Failed to update a list item for this external list based on the Entity (External Content Type) 'SalesForce' in EntityNamespace 'http://xxxxxxxx'. Details: The query against the database caused an error.
    I can edit the view in SQL Manager, so it seems strange that it fails.
    Any advice would be greatly GREATLY appreciated. 
    Thanks,
    Randy

  • Retrieve data from cluster tables

    hi
    can any one explain me how to retrieve data from cluster tables
    Regards
    sachin

    you can write a select
    select * from KONV
           into table it_konv
    where <condition>
    you cant join.. cluster tables..

  • How to get data from COSP table, field HRKFT as the key to data from PM?

    Dear ladies and gentlemen!
    I need to get data from COSP table, field HRKFT as the key to data from PM tables (AFKO and AUFK).
    The problem is that it is a key field to the COSP, and all non-key fields as an alternative to HRKFT are not suitable for this task.
    All this is necessary for the extractor, which loads the data from the R \ 3 systems in the BW-system. I need to perform SELECT from a table COSP and maybe also JOIN, most likely between tables COSP and AUFK.
    What should I do in this case?
    Thank you very much in advance!

    From information on help.sap.com I've made a conclusion that one of possible solutions in theory is to modify standard extractor PM_OM_OPA_1 in order to make HRKFT field available for work, because by default it is hidden by SAP and not available for use as a key field.
    Of course, it's not a very good solution, but for now I know no other way to solve this problem.
    Maybe someone knows better ways? In this case I will be very grateful for any help!
    Moderator: You'd better post it on BI forums

  • How to save, update and retrieve data from two diffrent table

    Hi,
    I can save and retrieve data into an user defined SBO form from one database table only. How can I save retrieve and update records from two or more different tables in a single screen?
    Regards,
    Sudeshna.

    Sudeshna,
    Are these tables external to SAP Business One and do not have a Business Object?  If there is a Business Object available such as if you were to enter an order, that order would use the Documents object which abstracts you, the programmer, from the underlying tables that need to be updated.  If you are handling multiple business objects you would need to wrap the transaction with the StartTransaction - EndTransaction methods.  This information is detailed in the SAP Business One SDK Help Center that comes with the SDK.
    HTH,
    Eddy

  • How to retrieve data from a table?

    I creat a Java application that connect to a database at address 10.4.4.204 and I also creat a table in this database by SQL Navigator. This table contain colums PID, Name, history.
    How can I retrieve these colums and put results to Microsoft Word. I also want these results arrange to colums in Microsoft Word too.
    Then how this line become?
    Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@10.4.4.204:1999:db", "tung", "tung12345");
    I need documents and sample code in this case ( retrive and display data from remote database host). Any one help me?

    This may not answer your question, but what about a pure SQL solution?
    NOTE THIS IS UNTESTED:
    SELECT *
    FROM     ERROR_TABLE
    WHERE     ERROR_CD IN
              SELECT      1
              FROM      table1
              HAVING      COUNT(*) > 0
              UNION ALL
              SELECT      2
              FROM      table2
              HAVING      COUNT(*) > 0     
         )HTH!

Maybe you are looking for

  • How to setup TV Resolution

    HI, I need help setting up my new appleTV, I follow all the installation instruction to the letter, but when I check in the apple TV menu under About it shows that I got only 480P connection with the TV. The TV is able the show 1080P full resolution,

  • Not able to preview localhost in any devices

    I can't open the localhost web page on my iPad or iPhone. Its is very important because im working in my app locallly, so i need to open it locally in my devices. I got the message: "An error occurred" "Web page not available" Follow the check list:

  • How do I find what jars are being used...?

    Hi all, I'm wondering if any of you could help me. I am looking for a method or tool that helps to find what library jars are being used within an application to try and help me erradicate unneccesary files since I find myself in a scenario similar t

  • Message " ipod is synced with other itune library"

    After every 4-5 days when I connect my ipod touch second generation to my Sony VAIO I get a message that it is synced with another I tune library . All my data in the library disappears . I have to transfer all my purchased application to this blank

  • Can recieve mail however can not send mail

    Hello, i am hoping someone can help me. i am able to recieve mail from my mail app using outlook however i can not send mail. it is saying my connection has failed. does anyone know what i can do to fix that. thank you so much