Cann't move data between two internal table in Unicode program

Hello expert,
I import a program from old sap system to new system, but syntax error occurred --- ' L_T_S776[] = T_DATA_RECORDS[]. ',
it is said ' internal table L_T_S776 and T_DATA_RECORDS are not mutually convertible, in unicode program, two internal tables must have the same structure layout'.
The coding is:
DATA: L_T_S776 LIKE S776 OCCURS 0 WITH HEADER LINE.
DATA: L_T_S777 LIKE S777 OCCURS 0 WITH HEADER LINE.
FIELD-SYMBOLS: <F_S776> TYPE S776.
FIELD-SYMBOLS: <F_S777> TYPE S777.
IF NOT ZCL_USEREXIT=>IS_ACTIVE( PROJN = 11 EXITN = 34 ) IS INITIAL.
  CASE I_RMCP2-SCTYP.
    WHEN 'Z776'.
      L_T_S776[] = T_DATA_RECORDS[].
      LOOP AT L_T_S776 ASSIGNING <F_S776>.
        <F_S776>-ZZCUSER = SY-UNAME.
        <F_S776>-ZZCDATE = SY-DATUM.
        <F_S776>-ZZCTIME = SY-TIMLO.
      ENDLOOP.
     T_DATA_RECORDS[] = L_T_S776[].
    WHEN OTHERS.
  ENDCASE.
internal table T_DATA_RECORDS is defined to like INDX.
this program is in function module EXIT_SAPMMCP6_011, it is a user_exit.
I also confuse the meaning of this part of coding, could anybody help me?
reward if got useful reply, thank you.
H.B

Hi,
The structure are different thats why you getting this error. But there must be some fields common to which you want to move data. So you change in that way.
And there will be no impact whatsoever because of such change.
Regards,
Atish

Similar Messages

  • How to move data between two similar tables?

    Hi All,
    I have two tables with almost the same columns. Table A has 50 columns, Table B has 51 columns, which are defined exactly the same except one more column as LOAD_TIME.
    Is there any easy way for me to move the data from Table A to B? the Extra column LOAD_TIME will be set as current system time. All I want is to avoid list all 50 column names. The following SQL has error ORA-00923 error.
    INSERT INTO TB_B
    SELECT *, sysdate from TB_A;
    Thanks,

    939569 wrote:
    Hi All,
    I have two tables with almost the same columns. Table A has 50 columns, Table B has 51 columns, which are defined exactly the same except one more column as LOAD_TIME.
    Is there any easy way for me to move the data from Table A to B? the Extra column LOAD_TIME will be set as current system time. All I want is to avoid list all 50 column names. The following SQL has error ORA-00923 error.
    INSERT INTO TB_B
    SELECT *, sysdate from TB_A;
    Thanks,You could create a view based on TB_A.
    However i don't understand why you feel the need to avoid specifying the columns. That's a better way to code.
    Granted, i also don't understand why you'd have 2 copies of the same data, the only differentiation being when you copied the data from the source to the redundant table.
    Cheers,

  • How to pass data between two internal sessions using ABAP memory?

    Hi,
    How to pass data between two internal sessions using ABAP memory?
    It would be fine if you could explain with an example.
    And also let me clear about the data passing between two main sessions and two external sessions with specific examples.
    Thanks.

    Hi ,
      check the example.
    Reading Data Objects from Memory
    To read data objects from ABAP memory into an ABAP program, use the following statement:
    Syntax
    IMPORT <f1> [TO <g 1>] <f 2> [TO <g 2>] ... FROM MEMORY ID <key>.
    This statement reads the data objects specified in the list from a cluster in memory. If you do not use the TO <g i > option, the data object <f i > in memory is assigned to the data object in the program with the same name. If you do use the option, the data object <f i > is read from memory into the field <g i >. The name <key> identifies the cluster in memory. It may be up to 32 characters long.
    You do not have to read all of the objects stored under a particular name <key>. You can restrict the number of objects by specifying their names. If the memory does not contain any objects under the name <key>, SY-SUBRC is set to 4. If, on the other hand, there is a data cluster in memory with the name <key>, SY-SUBRC is always 0, regardless of whether it contained the data object <f i >. If the cluster does not contain the data object <f i >, the target field remains unchanged.
    In this statement, the system does not check whether the structure of the object in memory is compatible with the structure into which you are reading it. The data is transported bit by bit. If the structures are incompatible, the data in the target field may be incorrect.
    PROGRAM SAPMZTS1.
    DATA TEXT1(10) VALUE 'Exporting'.
    DATA ITAB LIKE SBOOK OCCURS 10 WITH HEADER LINE.
    DO 5 TIMES.
      ITAB-BOOKID = 100 + SY-INDEX.
      APPEND ITAB.
    ENDDO.
    EXPORT TEXT1
           TEXT2 FROM 'Literal'
      TO MEMORY ID 'text'.
    EXPORT ITAB
      TO MEMORY ID 'table'.
    SUBMIT SAPMZTS2 AND RETURN.
    SUBMIT SAPMZTS3.
    The first part of this program is the same as the example in the section Saving Data Objects in Memory. In the example, the programs SAPMZTS1 and SAPMZTS2 are called using SUBMIT. You can create and maintain the programs called using the SUBMIT statement by double-clicking their names in the statement. For further information about the SUBMIT statement, refer to Calling Executable Programs (Reports)
    Example for SAPMZTS2:
    PROGRAM SAPMZTS2.
    DATA: TEXT1(10),
          TEXT3 LIKE TEXT1 VALUE 'Initial'.
    IMPORT TEXT3 FROM MEMORY ID 'text'.
    WRITE: / SY-SUBRC, TEXT3.
    IMPORT TEXT2 TO TEXT1 FROM MEMORY ID 'text'.
    WRITE: / SY-SUBRC, TEXT1.
    Example for SAPMZTS3:
    PROGRAM SAPMZTS3.
    DATA JTAB LIKE SBOOK OCCURS 10 WITH HEADER LINE.
    IMPORT ITAB TO JTAB FROM MEMORY ID 'table'.
    LOOP AT JTAB.
      WRITE / JTAB-BOOKID.
    ENDLOOP.
    The output is displayed on two successive screens. It looks like this:
    and
    The program SAPMZTS2 attempts to read a data object TEXT3 from the data cluster "text", which does not exist. TEXT3 therefore remains unchanged. The existing data object TEXT2 is placed in TEXT1. In both cases, SY-SUBRC is 0, since the cluster "text" contains data.
    The program SAPMZTS3 reads the internal table ITAB from the cluster "table" into the internal table JTAB. Both tables have the same structure, namely that of the ABAP Dictionary table SBOOK.
    Pls. reward if useful.....

  • How to move data from 2 internal table to 1 internal table

    Can any body send me code that how to move data from 2 internal table into one internal table.
    Moderator message : Read ABAP documentation. Thread locked.
    Edited by: Vinod Kumar on Jun 13, 2011 11:45 AM

    Hi Mohdarif92;
    I don't know your full needs. But general method should be as below code.
    Please check exam below code.
    Best regards.
    data : begin of gt_result.
                ... like mkpf-...
                ... like mkpf-...
                ... like mseg-...
                ... like mseg-...
              end of gt_result
    select *
    into table gt_mkpf
    from mkpf where ...
    select *
    into table mseg
    from mseg where ...
    loop at gt_mkpf.
         loop at gt_mseg where ... = mkpf-...
            move-corresponding gt_mkpf to gt_result.
            move-corresponding gt_mseg to gt_result.
            append gt_result
         endloop.
    endloop.

  • Can we get the data from two internal tables in ALV.

    hi friends i would like to display the data using two internal tables using alv grid.please guide me.

    Hi,
    ALV would be having a specific layout say :
    MATNR
    MAKTX
    QTY
    Now, if you have two internal tables, then do they have a different structure. If they have different structures, then what kind of ALV layout you expect. The ALV output should be as per the structure of 1st or 2nd internal table.
    If both internal table have same layout, then populate the data from 2nd internal table into 1st internal table and pass the 1st internal table ( it will have data of both internal tables) to ALV.
    Best regards,
    Prashant

  • Intervals, synchronize the data between two oracle tables located in diffe

    Hi Experts,
    Is there any way I can, at set intervals, synchronize the data between two oracle tables located in different servers? What is the software, if there is any? If there are steps I can follow, so much the better.
    Thanks!

    I'm not sure what you want to achieve here...
    I want to synchronize both the Servers , so that it can update HO servers as well as Factory Server with the complete data. Could you please elaborate a little bit more; basing on your description I could also tell you how to setup timesync for those two servers if I understand "complete data" as the current date and time...
    Also a lot of solutions are platform and version specific so it would help if you could indicate OS and Database Versions (4 digit).
    And I still fail to see what this has to do with forms. You might want to post your question to the Database General forum: General Database Discussions
    cheers

  • Regarding Passing two internal Tables from Driver Program to Smartform

    hi all,
              I am Passing Two Internal Tables from Driver Program to Smartform it is going to dump and message is showing like this " one of the parameters eded according to the interface description was not specified ".
              When i am passing one Internal Table Output is coming Perfectly. Is there any restriction for passing of internal tables.
    Regards
    Rami

    HI,
    Check the names specified in the smartfrom and FM whcih you are calling in the driver program. Both might be different....

  • Data Transfer between two internal tables

    Hi SDN,
    If I have two internal tables itab_a and Itab_b and I want to copy a subset of itab_a to itab_b using a conditional statement, is it possible and how?
    Second, what if I want to append the smaller internal table itab_b to itab_a, how would you do that.
    My task is to take some of the rows from a into b, change one field and append back to a. So if a had 100 rows, now it would have 110.
    Please help.
    Thanks.
    Saf.

    If I have two internal tables itab_a and Itab_b and I want to copy a subset of itab_a to itab_b using a conditional statement, is it possible and how?
    LOOP AT ITAB_A.
      IF ITAB_A-SOME_FIELD = SOME_VALUE.
         MOVE-CORRESPONDING ITAB_A TO ITAB_B.
         APPEND ITAB_B.
      ENDIF.
    ENDLOOP.

  • Find the difference between two internal table

    how can i see the difference between two interal tables?
    The requirement is as follows
    1. We have a transparent table, which stores the employee data with EMP ID as key.
    2. We load the transp table data into a interal table (B).
    3. We get data from legecy system as file and it gets loaded into another internal table (A) (this also has the same EMP ID key and this will have latest addition/update to those emplyees).
    Now we need to seperate out these data into three interal table Inserted (I), Deleted (D) and Updated (U).
    We want to do followign things
    I = A - B
    D = B - A
    Both A and B will have around 40k records. Hence we are trying to avoid the looping.
    Please suggest the best option for us.
    Thank you in advance.
    Raghavendra

    >
    RAGHAV URAL wrote:
    > how can i see the difference between two interal tables?
    > The requirement is as follows
    >
    > 1. We have a transparent table, which stores the employee data with EMP ID as key.
    > 2. We load the transp table data into a interal table (B).
    > 3. We get data from legecy system as file and it gets loaded into another internal table (A) (this also has the same EMP ID key and this will have latest addition/update to those emplyees).
    >
    > Now we need to seperate out these data into three interal table Inserted (I), Deleted (D) and Updated (U).
    >
    > We want to do followign things
    > I = A - B
    > D = B - A
    >
    > Both A and B will have around 40k records. Hence we are trying to avoid the looping.
    >
    > Please suggest the best option for us.
    >
    > Thank you in advance.
    > Raghavendra
    Hi Raghavendra,
      Currently as of my knowledge, these operations are only possible through LOOPs. But LOOPign can be really fast here if you properly utilize the SORTING, READ with BINARY SEARCH and FIELD-SYMBOLS usage. I would say:-
    Steps for Insert:-
    SORT: A, B.
    LOOP AT A ASSIGNING <WA_A>.
      READ TABLE B WITH TABLE KEY key = <WA_A>-key BINARY SEARCH.
      IF SY-SUBRC NE 0.
        APPEND <WA_A> TO I.
      ENDIF.
    ENDLOOP.
    Steps for Delete:-
    SORT: A, B.
    LOOP AT B ASSIGNING <WA_B>.
      READ TABLE A WITH TABLE KEY key = <WA_B>-key BINARY SEARCH.
      IF SY-SUBRC NE 0.
        APPEND <WA_B> TO D.
      ENDIF.
    ENDLOOP.
    Regards,
    Ravi.

  • DIFFERENCE BETWEEN TWO INTERNAL TABLES,THESE TABLES HAVE SAME FILEDS

    TYPES: BEGIN  OF
    TY_AS_UP,
    WERKS  LIKE  
                      MARC-WERKS,
    MATNR LIKE  
                       MARC-MATNR,
    LGORT LIKE  
                      MARD-LGORT,
    LABST(13) TYPE C,             
    (MARD-LABST)
    END OF TY_AS_UP.
    TABLES:
    1) FLAT FILE DATA.:
    DATA: WA_FILEDATA 
                 TYPE TY_AS_UP,
    I_FILEDATA TYPE STANDARD TABLE OF TY_AS_UP INITIAL SIZE 0.
    2) SAP DATA (SELECT QUREY)
    DATA: WA_SAPDATA
                  TYPE TY_AS_UP,
    I_SAPDATA TYPE STANDARD TABLE OF TY_AS_UP INITIAL SIZE 0.
    NOTE:
    I brought data to above table(2) from two internal tables I_MARC and I_MARD .
    My requirement is to display difference between  tables  1) and 2) based on quantity field(MARD-LABST)..
    report layout:
          top-of-page
    plant  diff qty  distri.qty   sap  
    01       -20       30        50  
            end-of-page
              page no 1.
    Kindly help me,it is urgent

    hi micky,
         thanks for your solution.
    another problem:
    I could not understand below
    requirement, could you please
    explain me.
    8)     Format the report based on the display options specified in the selection screen.
    a)     Display option “EQUAL IN QTY” show report lines where the difference is between the distributor file quantity and the SAP quantity is 0.
    b)     Display option “DIFFERENCE IN QTY” show report lines where the difference between the distributor file quantity and the SAP quantity is not 0.
    c)     If both options are selected, show report lines where the difference is both 0 and not 0.
    d)     Display SKUs in the distributors file not found in SAP as “Missing SKUs”
    regards,
    saritha.

  • Compare multiple variable selections between two internal tables

    I am trying to work out the syntax for the following, however i am stumped on the 2nd part of the requirement....
    I have two internal tables.  and i need to compare the records.
    1st, line by line, which i can do, however the 2nd requirement, i need to check a range of data against the same table...
    here is an example of the tables:
    Internal Table1 has the following records.
    TL1
    TL2
    TL3
    TL4
    TL5
    TL6
    Internal table 2 has the following records...
    LDOC1     TL1
    LDOC1     TL2
    LDOC1     TL3
    LDOC1     TL7
    LDOC2     TL1
    LDOC2     TL5
    LDOC3     TL6
    LDOC3     TL7
    but for the 2nd requirement, i have to group the LDOC1 (2, 3)  and search for all TL* and report if they all exist, some exist or none exist within the 1st internal table.
    so for requirement 1, the answer would be yes (as i can do a read table using the TL*), however i am not sure how i can check "for all entries" for TL1, Tl2, TL3, TL7 and return that only some entries exist....  LDOC1 should return "some", LDOC2 should return "all" and LDOC3 should return "none".
    Hopefully that makes sense???
    Can someone give me a keyword to investigate as i am not sure the At new would work....  Unless i do an at new and then loop and maybe add the record to a "range" to then compare and log the result as it runs through each result...
    so if Itab1 = itab2 then variable = yes. else None.
    if variable = yes, and itab1 = itab2 then variable = yes.
    if variable = yes and itab1 <> itab2 then variable = some.
    would that work??  i am worried about performance too as there could be 1000's of records....
    and can i have an "at end" so at end, if variable = yes, then variable = all?
    i have written all the rest of the report to get all the data into these tables...  i am just a little baffled as to how i can validate and compare the multiple selection....  :o(

    Hi,
    It is really confusing :-).. But i have tried to figure out.. may be this could be useful for you.
    Internal Table1 has the following records.
    TL1
    TL2
    TL3
    TL4
    TL5
    Internal table 2 has the following records...
    LDOC1 TL1
    LDOC1 TL2
    LDOC1 TL3
    LDOC1 TL7
    LDOC2 TL1
    LDOC2 TL5
    LDOC3 TL6
    LDOC3 TL7
    itab3[] = itab2[]
    sort itab3 by field1.
    delete adjacent duplicates from itab3 comparing field1.
    itab3
    LDCO1 
    LDCO2
    LDCO3
    loop at itab3.
    clear: lv_flag, index, ind.
    loop at itab2 where field1 = itab3-field1.
    index = index + 1.
    read table itab1 with key field1 = itab2-field2.
    if sy-subrc NE 0.
    lv_flag = 'X'.
    ind = ind + 1.
    endif.
    endloop.
    if lv_flag = 'X'.
    if ind = index.
      lv_val = 'NONE'.
    elseif ind NE index.
      lv_val = 'SOME'.
    endif.
    else.
      lv_val = 'ALL'.
    endif.
    "here you can modify itab3 with lv_val in one field, so that you can figure out which is SOME, NONE, ALL
    endloop.
    Regards,
    senthil

  • Matching data for two internal Table

    hi guru's,
    i have two internal table that is ITAB and itab1, and both has more than 2000 records, but MATNR is common field in both, so i want to update itab from itab1 according to matnr. can anyone please help me? actually i was using read table but it was not doing correct.
    regards Nitin.

    dear all,
    thanx for reply again...but still same problem. actually i m making a report for material price comparison
    purchased in current month and same material if purchased in before months. so i need maintain the final ITAB with including same material if purchased in previus months.
    ITAB1 :   EBELN      BLDAT       MATNR    WRBTR
                 100023     20080101      abcd        100.00
                 100025     20080106      xyzr         250.00
                 100028     20080102      abcd        100.00
                 100129     20080117      xyzr         150.00
                 100159     20080126       uvwx        170.00
    ITAB2 :   EBELN      BLDAT1       MATNR    WRBTR1
                 200026     20080201      abcd        105.00
                 200024     20080206      xyz_r4      250.00
                 200023     20080201      abcd        100.00
                 200129     20080217      xyzrw        150.00
                 200152     20080225      uvwx        190.00
    Final record which i need.
    ITAB3:  EBELN      BLDAT       MATNR    WRBTR   WRBTR1
                       100023     20080101      abcd        100.00     105.00
                       100023     20080101      abcd        100.00     105.00
                       100159     20080126       uvwx        170.00    190.00
    please suggest me accordingly...
    regards nitin.

  • Can we apply join between two internal tables?

    Itab has fields A,B,C.
    Data: begin of itab occurs 1,
             A  type I,
             B type I,
             C type I,
             End of itab.
    Jtab has fields A, I, J.
    Data: begin of itab occurs 1,
             A  type I,
             I type I,
             J type I,
             End of itab
    The common field between itab and jtab is u201CAu201D.
    Now I need to collect A,B,C,I, J in another internal table ktab.
    How should I be doing this.
    If I use a SELECT query with inner join between itab and jtab it says u201Citab is not a database tableu201D.
    How should I get the result  ktab with A B C I J fields?
    Please help, nay help will be highly appreciated?

    a®s wrote:
    >
    > sort itab_all by A
    > delete adjacent duplicates from itab_all comparing A.
    >
    >
    Do you have the above code in ?
    Here A is common field between both tables, first we are appending itab_1 & itab_2 into table itab_all then deleting the adjacent duplicates from itab_all. then we are reading itab_1 & itab_2 for possible matches and update the same values in itab_all
    so there will NOT be a chance of duplicates in itab_all

  • Want to move data from 1 internal table to other?

    Hi,
    i have values in one internal table like in 1 st column 13 value..in second column first 13 value blank &
    from 14 value starts.....so i want such internal table in another internal table having no blank values ....means in 2nd column value starts from 1st no.
    Thanks,
    Sagar

    show an example how is ur data is currently and how shud it look.
    are u trying to say smthing like this.
    col1        col2
    1
    2
    3
    4              
    .                 .5
    .                 .6
    .                 .7
    like this?
    and want second column to be shifted upwards unconditional;ly or sm matching shud be thr?
    Edited by: kartik tarla on Dec 10, 2008 2:24 PM
    Edited by: kartik tarla on Dec 10, 2008 2:25 PM

  • How to append records between two internal tables

    hi all,
    im trying to append from an internal table to another internal table with same structure. i tried the following but it overwrites previous contents of i_dest:
    move i_src to i_dest
    thanks,
    sid

    hey u try to move it record by record
    <b>itab2 = itab.
    append itab2.</b>
    This should work I guess
    just check the code below, if u want to move the whole itab into itab2 then use <b>itab2[] = itab.</b>
    <b>loop at it_pgm.
      read table itab with key obj_name = it_pgm-pgm_name.
      if sy-subrc = 0.
        itab_final-obj_name = itab-obj_name.
        itab_final-func_spec = itab-func_spec.
        itab_final-func_area = itab-func_area.
        itab_final-dev_class = itab-dev_class.
        append itab_final.
    else.
       itab_alt-pgm_name = it_pgm-pgm_name.
       append itab_alt.
      endif.</b>
    please reward points if found helpful

Maybe you are looking for

  • Video looks fine in preview... goes mosaic, loses audio on DVD????

    I have 3 and 1/2 hours of video edited in FCP and burned on a dual-layer DVD with iDVD. The video looked good in FCP and looked fine in preview in iDVD. The DVD burned without any pop-up warnings of problems, BUT when I put it in to check it, it goes

  • Tax config steps for women in ecc 5.0 version

    Hi to all Guru's, I want to configure tax for women in ECC5.0 VERSION. The tax tables are V_T7INT1 AND V_T7INT3. in V_T7INT1 i have maintained tax code for men and in V_T7INT3 I have maintained tax slabs for the men for corresponding the tax code. Bu

  • Measures from dimension table

    Hi, Here is part of my logical layer (BMM): Dim - Time: TIME_KEY, ... Dim - Client: CLIENT_KEY, ... Fact - Encounters: # Visits ( i.e., count(distinct(EVENT_ID) ) The above fact table contains foreign keys (TIME_KEY, CLIENT_KEY, etc.) to all dimensio

  • LUMIX TZ7 movies import unsuccessful: is this normal in FCE4.0.1?

    I tried to make a search of my problem but not fully successfully. As said in the title , I have a lumix TZ7 that can record AVCHD movies: in spite of this, if I try to import them in FCE4.0.1, with the log and transfer function, they are readable bu

  • Can't connect to the update server.

    When I try to update Firefox, it never connects with the update server.