Error looping at a table

Greetings Abapers
Im trying to loop at a table for certain criteria. My code is:
Loop at the relationships table and get dates for each salescode BP
   loop at lt_hrp1001 where lt_/ccdev01/a2scode-partner EQ lt_hrp1001-sobid
   and lt_hrp1001-sclas EQ 'BP'.
I get the following error though:
"No component exists with the name lt_/ccdev01/a2scode-partner"
-partner is a field in my local table and all tables have been declared. Please help.

Don't put the table name in the loop where clause
loop at lt_hrp1001
  where sobid = lt_/ccdev01/a2scode-partner
     and sclas EQ 'BP'.

Similar Messages

  • Declaring a message in abap and looping at a table

    Greetings all
    I would like to display an error message once some sort of validation is done. The code for my method is as follows:
    method if_ex_hrbas00infty~before_output.
    *Data declaration
    data: lt_hrp1001 type table of hrp1001,
    lv_sobid type sobid,
    lv_sclas type sclas,
    lv_rsign type rsign,
    lv_relat type relat,
    lv_otjid type otjid.
    Clear the local table and local variables
    refresh lt_hrp1001.
    clear: lv_sobid, lv_sclas, lv_rsign, lv_relat, lv_otjid.
    *Store the separated strings
    lv_sclas = old_innnn-vdata+0(2).
    lv_sobid = old_innnn-vdata+2(10).
    lv_rsign = old_innnn-subty+0(1).
    lv_relat = old_innnn-subty+1(3).
    lv_otjid = old_innnn-otype.
    *Check for existing relationships with other external objects
    select * from hrp1001 into table lt_hrp1001
    where plvar = old_innnn-plvar
    and sobid = lv_sobid
    and sclas = lv_sclas
    and rsign = lv_rsign
    and relat = lv_relat
    and otjid = lv_otjid.
    *Loop through the table and compare the existing relationship with the new one
    loop at lt_hrp1001 where.
    old_innnn-sobid = hrp1001-sobid.
    old_innnn-sclas = hrp1001-sclas.
    old_innnn-rsign = hrp1001-rsign.
    old_innnn-relat = hrp1001-relat.
    old_innnn-otjid = hrp1001-otjid.
    If statement to compare the start and end dates
    if lt_hrp1001-begda > old_innnn-endda
    or old_innnn-endda < lt_hrp1001-begda
    *Issue a warning informing the user about the overlap
    message 'ZEXERCISE' type 'E' number '000'.
    endif
    endloop.
    break lmandimika.
    endmethod.
    Ive created my message class which is ZEXERCISE but i have to declare the message somewhere using MESSAGE-ID ZEXERCISE. The only problem is that i cant declare it within this method. Any help as to where i can declare it.
    In addition to that, my loop at doesnt work because it tells me LOOP AT itab one of the additions INTO, ASSIGNING or TRANSPORTING NO FIELDS is required. I want to loop through the local table lt_hrp1001 and compare old_innn with all the entries in the table.
    Any help would be greatly appreciated.

    1. create a workarea like
    *Data declaration
    data: lt_hrp1001 type table of hrp1001,
            wa_hrp1001 type hrp1001 .
    in ur code                *Loop through the table and compare the existing relationship with the new one
    loop at lt_hrp1001 where.
    old_innnn-sobid = hrp1001-sobid.
    old_innnn-sclas = hrp1001-sclas.
    old_innnn-rsign = hrp1001-rsign.
    old_innnn-relat = hrp1001-relat.
    old_innnn-otjid = hrp1001-otjid.
    here u r checking this only for one time ,
    better u write like
    loop at lt_hrp1001 into wa_hrp1001 .
    *now check the condition .
    if                 old_innnn-sobid = wa_hrp1001-sobid     AND
                      old_innnn-sclas = wa_hrp1001-sclas        AND
                      old_innnn-rsign = wa_hrp1001-rsign         AND
                      old_innnn-relat = wa_hrp1001-relat          AND
                     old_innnn-otjid = wa_hrp1001-otjid       .
    *another  If statement to compare the start and end dates
    if lt_hrp1001-begda > old_innnn-endda
    or old_innnn-endda < lt_hrp1001-begda
         here give a message like
    message i001(ZEXERCISE).          " No need of defining message class in report
    endif.
    ENDIF.
    clear wa_hrp1001.
    endloop.
    2 . here we have to compulosry use a workarea , while making use of loop - Endloop .
    3 . You had not specified wether  "  old_innnn  "  is a table or just fields defined separately .
    Thanks ,
    reward poins if helpful.

  • Error:Unable to interpret "TABLE".

    When I use BTE, There is an error in FM Z_WRITE_TO_QUEUE in R/3.
    FUNCTION Z_WRITE_TO_QUEUE.
    ""Local interface:
    *"  IMPORTING
    *"     REFERENCE(I_DATASOURCE) TYPE  ROOSOURCE-OLTPSOURCE
    *"  TABLES
    *"      I_T_DATA OPTIONAL
    TYPE-POOLS:
        sbiwa.
      DATA:
        l_exstruct TYPE roosource-exstruct,
        l_initflag TYPE roosprmsc-initstate,
        l_subrc    TYPE sy-subrc,
        lr_is_data TYPE REF TO data,
        lr_es_data TYPE REF TO data,
        lr_et_data TYPE REF TO data,
        l_t_fields TYPE sbiwa_t_fields,
        l_t_select TYPE sbiwa_t_select.
      FIELD-SYMBOLS:
        <i_s_data> TYPE ANY,
        <e_s_data> TYPE ANY,
        <e_t_data> TYPE STANDARD TABLE.
    Check to see if Delta initialization has been performed.
      SELECT SINGLE initstate FROM roosprmsc INTO l_initflag
             WHERE  oltpsource  = i_datasource
             AND    rlogsys     NE space
             AND    slogsys     NE space
             AND    initrnr     NE space.
    If initialization has taken place continue
      IF sy-subrc EQ 0 AND l_initflag EQ 'X'.
      grab the extraction structure from roosource based on the
      datasource parameter input.
        SELECT SINGLE exstruct FROM roosource INTO l_exstruct
               WHERE  oltpsource  = i_datasource
               AND    objvers     = 'A'.
        CHECK sy-subrc = 0.
        CREATE DATA lr_is_data LIKE LINE OF i_t_data.
        ASSIGN lr_is_data->* TO <i_s_data>.
        CREATE DATA lr_es_data TYPE (l_exstruct).
        ASSIGN lr_es_data->* TO <e_s_data>.
        CREATE DATA lret_data TYPE STANDARD TABLE OF (l_exstruct)._
          ASSIGN lr_et_data->* TO <e_t_data>.
        LOOP AT i_t_data ASSIGNING <i_s_data>.
          CLEAR <e_s_data>.
          MOVE <i_s_data> TO <e_s_data>.
         MOVE-CORRESPONDING <i_s_data> TO <e_s_data>.
          INSERT <e_s_data> INTO TABLE <e_t_data>.
        ENDLOOP.
        CALL FUNCTION 'EXIT_SAPLRSAP_001'
          EXPORTING
            i_datasource             = i_datasource
            i_isource                = ''
            i_updmode                = ''
          TABLES
            i_t_select               = l_t_select
            i_t_fields               = l_t_fields
            c_t_data                 = <e_t_data>
          EXCEPTIONS
            rsap_customer_exit_error = 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.
        CALL FUNCTION 'RSC1_TRFC_QUEUE_WRITE'
          EXPORTING
            i_isource     = i_datasource
            i_no_flush    = 'X'
          IMPORTING
            e_subrc       = l_subrc
          TABLES
            i_t_data      = <e_t_data>
          EXCEPTIONS
            name_too_long = 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.
      ENDIF.
    ENDFUNCTION.
          FORM abs_type_to_rel_type                                     *
          The purpose of this subroutine is to convert an absolute type *
          name into a relative type name.                               *
    -->  TYPE_NAME                                                     *
    form abs_type_to_rel_type changing type_name.
      data junk(100) type c.
      split type_name at '\TYPE=' into junk type_name.
    endform.
    "CREATE DATA lr_et_data TYPE STANDARD TABLE OF (l_exstruct)" makes an Error "Unable to interpret "TABLE"."
    I don't why!
    So anbody can help me?
    Thank you!

    Hi,
    Use this statement.
    data:begin of lr_et_data occurs 0,
    include l_exstruct.
    end of lr_et_data.
    Ravi

  • Error while dropping a table

    Hi All,
    i got an error while dropping a table which is
    ORA-00600: internal error code, arguments: [kghstack_free1], [kntgmvm: collst], [], [], [], [], [], [], [], [], [], []
    i know learnt that -600 error is related to dba. now how to proceed.
    thanks and regards,
    sri ram.

    00600 errors should be raised as service request with Oracle as it implies some internal bug.
    You can search oracle support first to see if anyone has had the same class of 00600 error, and then if not (and therefore no patch) raise your issue with Oracle.
    http://support.oracle.com

  • Error when creating a Table...

    Hi,
    I'm getting an error as follows .
    create table asgnd_agent_bak as (Select * from ASGND_AGENT a, SCN s
    where
    a.CNTCT_KEY = s.CNTCT_KEY and a.SCN_NUM=s.SCN_NUM
    and a.ACTVTY_DT = to_date('03/17/2013','mm/dd/yyyy')
    and s.SCN_OPEN_DT = to_date('03/15/2013','mm/dd/yyyy')
    and a.SRC_SYS_DESC = 'FACET');
    create table asgnd_agent_bak as (Select * from ASGND_AGENT a, SCN s
    ERROR at line 1:
    ORA-00957: duplicate column name
    Please advise
    Regards,
    Narayan

    Fixed the issue

  • Error messages in a table

    Hi everyone,
    I have a problem when displaying error messages in a table (with values, not based on a model)
    In a column I have an inputText and a validation that checks valuechangelistener. If not true, throw an error message for that component.
    facesContext.addMessage (client, message);
    The table is a DropTarget so each time dragging the dragsource to the table renders the table and missed the error message.
    I had thought to save the id of the components in a list and the dragDropEndListener force to be redisplayed.
    The problem is that the IDs of the components varies each time the table is rendered so even save the id of the components is worthless because they are not the same.
    Anybody can help me?How I can re-display the errors of the components?
    I can not use validator instead of valuechangelistener

    I am not sure if you want something like highlighting the components which have errors -
    If yes , then try this code bit
    public void addMessage(UIComponent component, FacesMessage.Severity type,
    String message) {
    FacesContext fctx = FacesContext.getCurrentInstance();
    FacesMessage fm = new FacesMessage(type, message, null);
    fctx.addMessage(component.getClientId(fctx), fm);
    You can call the method like this addMessage(this.componentName,FacesMessage.SEVERITY_ERROR,ErroMessage)
    -Sudipto

  • Error while loading AS400 table

    Posted: 14 May 2014 08:11
    Post subject: Error while loading AS400 table
    Hi,
    I was trying to load an AS400 table using a flat file as source. The table and flat file has a single field only. I'm getting the error "<SQLExecute>: <[IBM][System i Access ODBC Driver]Error in assignment.>"
    The screenshot of the full error message is attached. can someone please help me to resolve this.
    Thanks,
    david

    Posted: 14 May 2014 08:11
    Post subject: Error while loading AS400 table
    Hi,
    I was trying to load an AS400 table using a flat file as source. The table and flat file has a single field only. I'm getting the error "<SQLExecute>: <[IBM][System i Access ODBC Driver]Error in assignment.>"
    The screenshot of the full error message is attached. can someone please help me to resolve this.
    Thanks,
    david

  • Error while altering a table.

    Hi All,
    When i tried to alter a table. I got the following error.
    SQL> ALTER TABLE SALES_ORDER_TRANS_IHST ADD(SUPER VARCHAR2(1),REASON_CD VARCHAR2(10));
    ERROR at line 1:
    ORA-00069: cannot acquire lock -- table locks disabled for SALES_ORDER_TRANS_IHST
    Then I tried to enable table lock for that table. Again got error.
    SQL> ALTER TABLE SALES_ORDER_TRANS_IHST enable table lock;
    ALTER TABLE SALES_ORDER_TRANS_IHST enable table lock
    ERROR at line 1:
    ORA-00054: resource busy and acquire with NOWAIT specified

    ORA-00054: resource busy and acquire with NOWAIT specified The table is currently in use by something else.
    Werner

  • Error in updating to table WRPT

    Hi All,
    I am trying to update lenght, width and height for Material .
    After i save the article and go back "It gives Express Document " which doesnot save the changes ..
    When i checked SM31 it gives error" Error in updating to table WRPT"
    Regards
    Vikrant M Kelkar

    Still not sorted

  • Error in updating OBNK Table ( Bank Statements and Reconciliations,Manual)

    PLease advise ,
    Bank Statements and Reconciliations,Manual Reconciliation
    Client is receiving the following message:
    Error in updating OBNK Table
    Edited by: Philip Eller on May 20, 2008 9:03 AM

    Hi Darpal Thiarha,
    Please kindly refer to note 1132591 and note 1128677 to see if these are relevant to this issue. Upgrading to  2007A PL15 or above may avoid such issues relevant with the error 'Error in updating OBNK Table'.
    Regards,
    Candice Ren
    SAP Business One Forums Team

  • Error in updating condition table 372

    Hello,
    While saving Excise Invoice I am facing error 'Error in updating condition table 372'.Could you please solve this probelm?
    Thanks in Advance

    Dear All,
    I done this--by doing some configuration changes.
    Normally while doing Exports we are tempted to use the same sales area and accordingly we may give the combination of excise grp+series grp+export type in IMG>>>Logistics General>>>India>>>Business transactions>>>Outgoing excise invoices>>>Maintain default excise groups and series groups.
    Once after removing the export type to your sales area combination--system will show this error--and we cannot even post the Excise invoices.(J1IIN)
    I tried in my IDES--that with export type(Ex.Export under Bond)--with this assignment--i am able to post my excise invoices.
    Once after removing this assignment of export type--again i am getting this error.
    Actually i am not even aware why it is happening--almost after two months of struggle--i find this.
    (i feel it is in the same way that we cannot even open/See a sales order by deleting sales group which was created&used previously)
    i am sharing this because somebody may get a little help with my thread.
    Mark this if helpful--there by others can easily find this thread.
    Phanikumar

  • NQS ERROR:14025 NO FACT TABLE EXISTS -after migrating from 10g to 11g

    NQS ERROR:14025 NO FACT TABLE EXISTS AT THE REQUESTED LEVEL OF DETAIL in all the reports after migrating from 10g to 11g ...
    then we applied the patch (One-off Patch for Bug: 11850704) for the error <<NQS ERROR:14025 NO FACT TABLE EXISTS AT THE REQUESTED LEVEL OF DETAIL>>
    But after applying the above the above patch we are still getting the same error.
    but in the above patch instructions file - Post deployment instructions to create the Variable
    Post Install Instructions:
    - To revert to the 10g navigator behavior for handling conforming dimensions,
    you must set the following session variable via an init block in the RPD:
    NO_FORCE_TO_DETAIL_BIN=1
    The default value for the above variable is 0.
    - Restart all servers (Admin Server and all Managed Server(s))
    but we didn’t find the process to create the specified variable and Initialization block in the RPD
    Can you please suggest us how to go further.
    Our questions are:

    Hi
    Refer the below thread.
    obiee 11g non-conforming dimensions and nQSError 14025
    Might be help you/
    Thanks,
    satya

  • Fetching SSIS error message into Audit table using SP

    Hi Experts,
    I want to fetch SSIS Error Info along with Task Name into Audit table 'Error_Info' column. This is nvarchar(max) datatype, i wrote below Stored Procedure for this (Column names passing dynamically in SP)
    CREATE PROC [dbo].[usp_AuditErrorHandler]
    @AuditTableName nvarchar(MAX)
    ,@Audit_Status nvarchar(100)
    ,@Audit_ErrorDescription sql_variant
    ,@Audit_PkgEnd_dttm nvarchar(100)
    ,@task sql_variant
    ,@errordescription sql_variant 
    ,@Audit_ID nvarchar(10)
    ,@LogID INT
    AS
    BEGIN
    DECLARE @STRQuery NVARCHAR(MAX)
    SET @STRQuery = ' 
    UPDATE '+@AuditTableName+'
    SET '+@Audit_Status+' = ''Failed''
    ,'+@Audit_PkgEnd_dttm+' = GETDATE()
    ,'+@Audit_ErrorDescription+' = ''Task['+ @task +']:'+@errordescription +'''
    WHERE ' +@Audit_ID+ ' = ' + CAST(@LogID AS NVARCHAR)
    The above procedure is working fine in SSMS and inserting complete error info into table, but when i am executing thru SSIS Pkg i am getting error like
    "[Execute SQL Task] Error: Executing the query "exec usp_AuditErrorHandler ?,?,?,?,?,?,?,?" failed with the following error: "Incorrect syntax near '@P1'.". Possible failure reasons: Problems with the query, "ResultSet"
    property not set correctly, parameters not set correctly, or connection not established correctly."
    So, i tot of checking with string lenght and modifed the code by adding left () to @errordescription as below.
    UPDATE '+@AuditTableName+'
    SET '+@Audit_Status+' = ''Failed''
    ,'+@Audit_PkgEnd_dttm+' = GETDATE()
    ,'+@Audit_ErrorDescription+' = ''Task['+ @task +']:'+LEFT(@errordescription ,100)+'''
    WHERE ' +@Audit_ID+ ' = ' + CAST(@LogID AS NVARCHAR)
    Here, it is inserting till 119 chars, if i give more than 119 chars pkg is failing with above error.
    I want to get insert Complete error info into the column.
    Can anybody suggest on this?? 
    Thanks in advance !!!

    Thanks Arthur for the response, i have tried with the Sql_Variant data type also, here  procedure itself not creating and throwing below error.
    "The data types nvarchar(max) and sql_variant are incompatible in the add operator."
    This is the procedure i am using to fetch error info into Audit table.
    ALTER PROC [dbo].[usp_AuditErrorHandler]
    @AuditTableName nvarchar(MAX)
    ,@Audit_Status nvarchar(100)
    ,@Audit_PkgEnd_dttm nvarchar(100)
    ,@Audit_Task_ErrorCode nvarchar(100)
    ,@Audit_ErrorDescription SQL_VARIANT
    ,@errorcode nvarchar(max)
    ,@task SQL_VARIANT
    ,@errordescription SQL_VARIANT 
    ,@Audit_ID nvarchar(10)
    ,@LogID INT
    AS
    BEGIN
    SET NOCOUNT ON;
    DECLARE @STRQuery SQL_VARIANT
    BEGIN TRY
    SET @STRQuery = '    
    UPDATE  '+@AuditTableName+'
    SET     '+@Audit_Status+' = ''Failed''
           ,'+@Audit_PkgEnd_dttm+' = GETDATE()
           ,'+@Audit_Task_ErrorCode+' = '''+@errorcode+'''
           ,'+@Audit_ErrorDescription+' = ''Task['+ @task +']:'+ @errordescription +'''
    (Error is giving in this line)
    WHERE   ' +@Audit_ID+ ' = ' + CAST(@LogID AS NVARCHAR)
    EXEC (@STRQuery)
    END TRY 
    Below is the Audit Table Schema

  • Error "No entry in table T589A for P" while creating new Infotype

    HI,
    I've created a new infotype (9605). All the tables, structures, screens etc. have been created using transaction PM01 successfully. But upon execution of Infotype from PA30, the infotype screen is displayed with the following error:
    "No entry in table T589A for P"
    Any input will be highly appreciated.
    Thank you,
    Farooq.

    Hi Farooq,
    Untill and unless the the field PSYST-IOPER is cleared explicitly in the program MP960500 (in PBO modules), this error should not occur.
    Also is this error is coming only for 9605 infotype ? Also is any other info availaible in the error message such as entry in table t589a is not available for which value of OPERA (INS, MOD, DEL, LIS etc) ?
    Regards,
    Shrinivas

  • Error "No entry in table T551A" while creating set work schedule rule.

    Dear Team,
    I am getting following error while creating set work schedule rule.
    Error "No entry in table T551A" for key 22 BBB [ here BBBB is my period work schedule]
    The actual prob is i configured all the necessary steps but when i tried to create work schedule rule im getting this error. Also, in the same screen there is one field DWS grouping initially value in this is 00 and gread mode. But after giving ES grp, holiday calander ID etc etc when i try to save that screen that value is chainging to 22 from 00.
    My ES grop=2 and PS grop=2 . Is that value is my ES and PS grouping..?? or some other thing.
    Request you to please help me out.
    Regards
    Shab.

    HI, there are 8 steps you need to do below:
    1. Group Personnel Subareas for the Daily Work Schedule
    2. Group Personnel Subareas for the Work Schedule
    3. Define Break Schedules
    4. Define Daily Work Schedules
    5. Define Period Work Schedules
    6. Define Employee Subgroup Groupings
    7. Define Groupings for the Public Holiday Calendar
    8. Set Work Schedule Rules and Work Schedules
    All of them belong to TIME MANAGEMENT. I think you miss some steps above.
    Please check it again.
    Regards!
    Minh

Maybe you are looking for