Error in TYPES internal table

I am trying to fetch data from table1 and based on the entries I get from first select qry, I  am fetching the records from the another table2
Code :
TYPES:  BEGIN of tag,
                   data_field type c,
              END of tag.
DATA: my_tab type table of tag.
SELECT  fild FROM  table1 INTO TABLE my_tab .
SELECT  xyz  FROM table2 .............WHERE xyz IN my_tab
I am getting the error as  "the tag structure of the table "my_tab" is incorrect. " in the last SELECT statement.
What is an error in above code ?
Can we specify "IN" with an internal table or do we need to have the subquery with "IN" ?

Hi,
Use the following statement:
select xyz from table2 into table it_tab for all the entries in my_tab where xyz = my_tab-fild.
This above statement will work only if  field 'fild' of table 'my_tab' is same as that of 'xyz' of table2.
Please reward points if helpful.

Similar Messages

  • Error in passing internal table to smartform

    I have created a structure type in the driver program as below.
    tYPES : BEGIN OF gy_final,
              matnr TYPE mara-matnr,
              ersda TYPE mara-ersda,
              ernam TYPE mara-ernam,
              laeda TYPE mara-laeda,
              mtart TYPE mara-mtart,
              matkl TYPE mara-matkl,
              meins TYPE mara-meins,
              lgort TYPE mard-lgort,
              werks TYPE mard-werks,
            END OF gy_final.
    Then i created internal table and its work area of the above structure type as below
    data: it_final type STANDARD TABLE OF gy_final,
             wa_final type gy_final.
    I fetched the records in to the internal table it_final.
    Now i wanted to pass this in to smartform.
    nasi
    CALL FUNCTION 'fname'
    EXPORTING
        it1_final = it_final.
    I have created a similar structure in DDIC and declared in the smartform
    still it shows the error 
    The following syntax error occurred in program "/1BCDWB/SAPLSF00000239 " in
      include "/1BCDWB/LSF00000239F01 " in
    line 669:
    ""IT_FINAL" is neither specified under "TABLES" nor is it defined as an"
    " internal table."
    Please help me to sove this issue.

    In form interface -> go to tab TABLE then declare as IT1_FINAL LIKE <structure DDIC>.
    And i think when call form it should:
    CALL FUNCTION 'fname'
    TABLES
    it1_final = it_final.
    Regards,
    Edited by: Thien M. Pham on Sep 15, 2010 3:28 PM
    Edited by: Thien M. Pham on Sep 15, 2010 3:29 PM
    Edited by: Thien M. Pham on Sep 15, 2010 3:30 PM

  • Error while passing internal table between methods at design time

    Hi,
    In a method (say method1 for eg) I have declared an internal table, IT_RANGE2 as:
    DATA: IT_RANGE2 TYPE STANDARD TABLE OF ZTTRANGE
    ZTTRANGE is a tabletype in SE11 and has a line type ZRANGE.
    In this method, I am calling another method (method2)
    WD_COMP_CONTROLLER->HOLD_DATA( CHANGING IT_RANGE = IT_RANGE2 ).
    IT_RANGE has been declared as;
    PARAMETER       TYPE                    REFTO       ASSOCIATED TYPE
    IT_RANGE           CHANGING                                  ZTTRANGE.
    I am getting an error: IT_RANGE2 is not type-compatible with formal parameter IT_RANGE.
    Please help.
    MIck

    change it_range2 like this
    DATA: IT_RANGE2 TYPE ZTTRANGE

  • Runtime error in Dynamic internal table with AMOUNT and Quantity Fields..

    Dear friends,
    I am attempting write a dymanic Select Statement (with joins).
    And the sleect query looks like this..
      SELECT (LT_SEL_LIST)
      INTO CORRESPONDING FIELDS OF
      TABLE <DYN_TABLE>
      FROM (LT_FROM_LIST)
      WHERE (LT_WHERE3).
    Here the into table is a dynamically created internal table..
    which is created by ...this
    CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
        EXPORTING
          IT_FIELDCATALOG = IT_OUTPUT2[]
        IMPORTING
          EP_TABLE        = DY_TABLE.
    the it_output2 contains the the fieldcatlog information of dynamically given fields :-
    like:-
           TABNAME
           FIELDNAME
           DATATYPE
           LENG
           INTTYPE
           ROLLNAME
           DECIMALS
           REFTABLE
           REFFIELD
    i mean the internal table is constructed with reference to all the bove metadata.
    Problem:- This query run fine with all the fields Except AMOUNT AND QUANTITY fields....
    When the selection list contain VBAK-NETWR or MSEG-MENGE..It throws a runtime error.
    "The data read during a SLECT access couldnt be inserted into the target field,either conversion is not supported for
    the target field's type or the target field is too short."
    after this I even tried to construct the dynamic table with CFILEDNAME and QFIELDNAME in the Fieldcatalog.
    so now my fieldcatlog looks like this:---
    LOOP AT IT_DD03L..
      IF IT_DD03L-DATATYPE = 'CURR'.
           TABLEFIELD-CFIELDNAME = IT_DD03L-FIELDNAME .
           ENDIF.
       IF IT_FIELDCAT3-DATATYPE = 'QUAN'.
           TABLEFIELD-QFIELDNAME = IT_DD03L-FIELDNAME .
      ENDIF.
           TABLEFIELD-TABNAME     = IT_DD03L-TABNAME.
           TABLEFIELD-FIELDNAME   = IT_DD03L-FIELDNAME.
           TABLEFIELD-DATATYPE    = IT_DD03L-DATATYPE.
           TABLEFIELD-INTLEN      = IT_DD03L-LENG.
           TABLEFIELD-INTTYPE     = IT_DD03L-INTTYPE .
           TABLEFIELD-ROLLNAME    = IT_DD03L-ROLLNAME.
           TABLEFIELD-DECIMALS    = IT_DD03L-DECIMALS.
           TABLEFIELD-REF_TABLE   = IT_DD03L-REFTABLE.
           TABLEFIELD-REF_FIELD   = IT_DD03L-REFFIELD.
    APPEND TABLEFIELD.
    CLEAR TABLEFIELD.
    ENDLOOP.
    Note:- this is a test code so ignore performance issues...
    Please help me with some code ...to avoid the Runtime erorr.
    Thanks,
    jeevan.

    Hi Jeevan,
    Why are moving only few fields from DD03L table to your field catalog? Why don't you use move-corresponding? The following code works for me in ECC6.0.
    data: it_dd03l type table of dd03l initial size 0,
          ls_dd03l type dd03l,
          lt_fldcat TYPE lvc_t_fcat,
          ls_fldcat TYPE lvc_s_fcat,
          ls_where(72) TYPE c,
          lt_where LIKE TABLE OF ls_where,
          lt_fld LIKE TABLE OF ls_where,
          lt_data_dy TYPE REF TO data.
    field-symbols: <ft_data> TYPE STANDARD TABLE.
    select * into table it_dd03l from dd03l
        where tabname = 'VBAK'
          and ( fieldname = 'VBELN' or fieldname = 'NETWR' ).
    check sy-subrc eq 0.
    loop at it_dd03l into ls_dd03l.
      move-corresponding ls_dd03l to ls_fldcat.
      append ls_fldcat to lt_fldcat.
      move ls_dd03l-fieldname to ls_where.
      append ls_where to lt_fld.
      if ls_dd03l-fieldname = 'VBELN'.
        clear ls_where.
        concatenate ls_dd03l-fieldname ' <> ''''' into ls_where.
        append ls_where to lt_where.
      endif.
    endloop.
    check not lt_fldcat is initial.
    CALL METHOD cl_alv_table_create=>create_dynamic_table
          EXPORTING
            it_fieldcatalog           = lt_fldcat
          IMPORTING
            ep_table                  = lt_data_dy
          EXCEPTIONS
            generate_subpool_dir_full = 1
            OTHERS                    = 2.
        IF sy-subrc <> 0.
          RAISE no_configuration_data.
        ENDIF.
        ASSIGN lt_data_dy->*  TO <ft_data>.
    check sy-subrc eq 0.
    select (lt_fld) from VBAK into corresponding fields of table
        <ft_data>
        where (lt_where).
    Thanks
    Bala

  • How to create CMPCTRL attribute of the type internal table (as global list)

    Hi,
    I want to create global internal table to be able to access it across all my webdynpro views.
    Ideally I will create this global internal table in CMPCTRL and will add different values from diffent methods of one view and use in another view as table of values. So I am thinking to use CMPCTRL Attribute declaration to my make internal table as global internal table. How do I achieve this ? Please help
    Thanks
    Praveen

    Thanks Aditya, But I am getting "comp_attr" unknown.
    I am pasting here What I am doing, Please let me know ehere is the error?
    CMPCTRL:
    it_pod     Public clicked, Type Clikced  Assoc Type:Element_<node_name>.
    View access
    DATA lo_nd_<node_name> TYPE REF TO if_wd_context_node.
      DATA lo_el_nd_<node_name> TYPE REF TO if_wd_context_element.
      DATA ls_nd_<node_name> TYPE wd_this->Element_<node_name>.
    data podetails TYPE TABLE OF WD_COMP_CONTROLLER->IT_POD.
    Here it says IT_POD unknown. any issues?
    Thanks
    Praveen

  • Error in passing internal table as returning parameter

    Hi
    Im new to ABAP OO.
    I declared a parameter ret_kna1 Returning Type KNA1.
    Inside the method, I am retrieving data from table KNA1 into internal table and then I want return the interal table value.
    But Im not able to assing the internal table for eg : code
    method READ_CUSTOMER_LIST.
    data: lt_kna1 type TABLE OF kna1,
          wa_kna1 LIKE LINE OF lt_kna1.
    data: lv_kunnr type kna1-kunnr,
          lv_land1 type kna1-LAND1.
    SELECT * FROM kna1
    INTO TABLE lt_kna1
    WHERE land1 eq lv_land1.
    insert LINES OF lt_kna1 INTO TABLE ret_kna1.
    endmethod.
    when I try to activate the error says 'ret_kna1 is not an internal table  "OCCURS n" specification is missing.
    but I can not declare the internal table 'ret_kna1' once again in the code, as it already defined in the parameter as type KNA1.
    please help me how to assign internal table values to the returing structur.

    Are you passing it as an EXPORT parameter?
    use and define it in the TABLES section of your function module as so:
    *"  IMPORTING
    *"     VALUE(INCLUDE_X_LEVELS) TYPE  CHAR1 OPTIONAL
    *"  TABLES
    *"      I_SELECTED_OU STRUCTURE  HRROOTOB
    *"      I_SELECTED_EE STRUCTURE  OBJEC
    *"      E_VIP_EPM_DISTR STRUCTURE  ZHR_VIP_EPM_DISTR
    *"      E_RETURN STRUCTURE  BAPIRET1
    That way you can pass value in the table (if needed) and then pass the table with your values based on your own logic

  • Error while extending internal table

    Hi,
    We have a data load going on from one ODS to another, this is a daily load but for but last few days data load is failing saying
    "Runtime Error: TSV_TNEW_PAGE_ALLOC_FAILED - You attempted to extend an internal table, but the required space was not available. "
    What all measures can be taken to make this load happen regularly?
    Regards,
    Kironmoy Banerjee.

    Hi ,
    Please check below threads.
    http://forumsa.sdn.sap.com/click.jspa?searchID=32822064&messageID=4660903
    http://forumsa.sdn.sap.com/click.jspa?searchID=32822064&messageID=6806983
    http://forumsa.sdn.sap.com/click.jspa?searchID=32822064&messageID=6794034
    http://forumsa.sdn.sap.com/click.jspa?searchID=32822064&messageID=5618979
    http://forumsa.sdn.sap.com/click.jspa?searchID=32822064&messageID=8059962
    http://forumsa.sdn.sap.com/click.jspa?searchID=32822064&messageID=6678629
    http://forumsa.sdn.sap.com/click.jspa?searchID=32822064&messageID=5989583
    Hope it helps.
    Thanks & Regards,
    Ramnaresh.P.

  • Error when deletting internal table

    Hi to all,
       I have small requirement. Am getting runtime error , when am deleting internal table when that internal table will have only one record. how i can solve this problem. Give me some clues.

    Hi Geetha, you can do this
    IF itab[] IS NOT INITIAL.
      LOOP AT it_ekbe.
        IF it_ekbe-bwart_i NE '101' AND it_ekbe-bwart_i NE '105' AND it_ekbe-bwart_i NE '201' OR it_ekbe-bwart_i NE '202' AND
           it_ekbe-bwart_i NE '221' AND it_ekbe-bwart_i NE '222' AND it_ekbe-bwart_i NE '231' AND it_ekbe-bwart_i NE '232' AND
           it_ekbe-bwart_i NE '241' AND it_ekbe-bwart_i NE '242' AND it_ekbe-bwart_i NE '251' AND it_ekbe-bwart_i NE '252' AND
           it_ekbe-bwart_i NE '261' AND it_ekbe-bwart_i NE '262' AND it_ekbe-bwart_i NE '281' AND it_ekbe-bwart_i NE '282' AND
           it_ekbe-bwart_i NE '291' AND it_ekbe-bwart_i NE '292'.
          DELETE itab WHERE mblnr   = it_ekbe-lfbnr_i
                        AND matnr_i = it_ekbe-matnr_i
                        AND ebeln_i = it_ekbe-ebeln_i
                        AND ebelp_i = it_ekbe-ebelp_i
                        AND werks_i = it_ekbe-werks_i.
        ENDIF.
      ENDLOOP.
    ENDIF.
    This routine does the same but with better performance, I hope this help you.
    Regards
    David Carballido

  • Error Passing an internal table between BSP pages

    Any time there is data in the internal table and I try to pass it from one BSP page to the next I get an Web error.  I've heard that it is possible to pass an internal table from one page to the next.  can anyone point me in the right direction here?

    You can do this with the navigation object only if the table is very small. Overwise it overflows 2+KB limitation of URLs.
    Alternative ideas is to use server side cookies (search forum for many examples).
    If stateful, just hang stuff of your application class.

  • Getting error when creating internal table

    hi i m creating internal table giving erro like 'VBELN' must be flat structure.
    DATA: BEGIN OF INT_VBAK,
            VBELN  LIKE VBELN-VBAK,
            AUDAT  LIKE AUDAT-VBAK,
            KWMENGE LIKE KWMENGE-VBAP,
            ARKTX LIKE ARKTX-VBAP,
            WERKS LIKE WERKS-VBAP,
            LFIMG LIKE LFIMG-VBAP.
          END OF INT_VBAK.
    thanks .

    Hii Laxman..
    DATA: BEGIN OF INT_VBAK,
    VBELN LIKE VBELN-VBAK,
    AUDAT LIKE AUDAT-VBAK,
    KWMENGE LIKE KWMENGE-VBAP,
    ARKTX LIKE ARKTX-VBAP,
    WERKS LIKE WERKS-VBAP,
    LFIMG LIKE LFIMG-VBAP.
    END OF INT_VBAK.
    This is Not itab declaration.. it will only Create a work area.
    So Declare like this
    DATA: BEGIN OF INT_VBAK <b>occurs 100,</b>
    VBELN LIKE VBELN-VBAK,
    AUDAT LIKE AUDAT-VBAK,
    KWMENGE LIKE KWMENGE-VBAP,
    ARKTX LIKE ARKTX-VBAP,
    WERKS LIKE WERKS-VBAP,
    LFIMG LIKE LFIMG-VBAP.
    END OF INT_VBAK.
    or
    DATA: BEGIN OF ST_VBAK ,
    VBELN LIKE VBELN-VBAK,
    AUDAT LIKE AUDAT-VBAK,
    KWMENGE LIKE KWMENGE-VBAP,
    ARKTX LIKE ARKTX-VBAP,
    WERKS LIKE WERKS-VBAP,
    LFIMG LIKE LFIMG-VBAP.
    END OF ST_VBAK.
    DATA : INT_VBAK LIKE TABLE OF ST_VBAK.
    Then it works.
    <b>Reward if Helpful</b>

  • ABAP runtime error in TSV_ILLEGAL_REFERENCE "Internal Table Destroyed"

    Hi Experts,
    I am getting an error in Transaction CV01N.
    In Function Group CTMS, there is a statement REFRESH CONTROL  tab_con FROM SCREEN nnnn.
    In data decleration tab_con is decalred as :
    Controls: tab_con TYPE TABLEVIEW  screen nnnn.
    I am getting short dump in Dev system. However there is no short dump in Q system.
    Thanks,
    Naidu

    More information, e.g. more details from the actual dump would be needed.
    This may be related to a classification-related enhancement that is only there in DEV but not in QA... but it's hard to say what's going on without knowing more specifics about the exact error or location.

  • To get Code Inspector Errors into an internal table

    Friends,
    My requirement is to report if there exists any Error, warning or information in the Code Inspector & SLIN. I need to include these values in a report.
    For this i will have to get these values into my program. Any idea how can this be achieved?
    Many Thanks!
    Abhinav siddharth

    Hi Lakshman,
    Could you please help me figuring out the parameters requried to execute these FM's?
    I could run 'EXTENDED_PROGRAM_CHECK' but i could not see the result.
    Thanks,
    Abhinav Siddharth

  • System error on reading internal table DYNTAB, screen 7313

    Hello,
    I'm trying to create a customer master in batch mode. I get this error when saving. If I create the customer on-line, I'm able to create with no errors. When I create using a program, I get the error and have to exit.
    Does anyone have a clue on what to do?
    Thanks,
    Theresa

    Looks like its having a hard time doing something with the tabstrip on the screen.  Does your XD01 screen look the same as it does during the BDC recording?  If not, you may have to compensate.  I don't really now exactly what your problem is, but I can make some guesses.  During the recording,  do you click on the tabs or do you switch tabs by using the tab selector on the right of the tabstrip?
    Regards,
    Rich Heilman

  • Catching error message from standard function module to internal table.

    Hi,
    i am calling a FM in my custom prog.
    After execution of the FM some auto generated errors is getting displayed.
    I want to pass this error to an internal table.
    Please tell me how to do this?
        CALL FUNCTION 'FORMAT_CHECK'
          EXPORTING
            i_checkrule   = t005-prbkn
            i_checkfield  = it_ven-bankn
            i_checklength = t005-lnbkn
            i_checkmask   = space
            i_fname       = fname
          EXCEPTIONS
            not_valid     = 1
            OTHERS        = 2.
      IF sy-subrc <> 0.
           MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
    I want to catch this particular error message in the itab.
    Thanks,
    SAM.

    Even we can create an internal table  nad move the messages to it.
    DATA : BEGIN OF L_ERR OCCURS 0,
            SNO LIKE SY-tabix,                                  "serial no
            MSGTY LIKE SY-MSGTY,                         "message type
            MSGNO LIKE SY-MSGNO,                        "message no
            ERR_TEXT LIKE T100-TEXT,                     "message text
           END OF L_ERR. 
       IF SY-SUBRC <> 0.
              L_ERR-SNO      = SY-TABIX.
              L_ERR-MSGTY    = SY-MSGTY.
              L_ERR-MSGNO    = SY-MSGNO.
              L_ERR-ERR_TEXT = TEXT-015.                        "Problem encounterd in uploading data.
              APPEND L_ERR.
              clear L_ERR.
         ENDIF.

  • Internal Table occurs n Error - BSP

    I have declared a type as
    Types: BEGIN OF ty_mara
           MATNR TYPE MARA-MATNR,
    ENDOF ty_mara.
    Problem is it is giving me error that "NO INTERNAL TABLE IS CREATED, OCCURS N SPECIFICATION".
    Need Directions.
    Edited by: NiksRules on Feb 14, 2011 6:25 AM

    Hi,
    I assume that you declared the types in "Type definitions" and trying the use this in page attributes for an internal table.
    Is this correct?
    If so, you need to have another type declaration like
    types: ty_mara_table type table of ty_mara.
    use the type ty_mara_table in the page attributes.
    Regards,
    Ravi.

Maybe you are looking for

  • I didn't receive an email...

    So after I talk with one of the employee about getting my laptop fix. he said he sent me a email. I can't remember exactly what the email is for but he also gave me codes for it. long story short, I didn't receive an email for a few days. should I ge

  • How to assign default cost center and G/L account in Purchase requisition

    Hi, While creating the  purchase requisition ME51N in account assignment we have to enetr cost center name and G/L account but every time we have to enter this how to assign this as defaut value , like cost center : MSMISC and account 42XXXXX.   REGA

  • Question about configuring REST web service in EBS instance

    I am from EBS SCM team. From one wiki page, it says OA Framework provides REST framework to expose OAF BC4J objects as web services. Can you provide more details about how to configure REST web service for one EBS instance? Any related information is

  • Reg:table maintance generator

    hi, i have one  z table with 5 fields now i added another one field . in sm30 previouly showing in header 5 fields description , but now why the new field description is not visible why??? i think it should automatically added ... please help me rega

  • 4.4 update doesnt show the Fuji x pro 1 camera for lens adjustments etc

    Looking forward to this update because i use a Fuji X pro 1 and I had read that lightroom 4.4 now supports this camera and sensor. However after updating all I get in the Lens adjustment under Fuji is the Fuji x100 which has been their for some time.