Record Missing in COEP Table

Hi Experts,
I tried to display report Internal Order Actual Line Item (KOB1), but when i execute, it said " There is no actual line item".
Actually i have posted several line item for this Internal Order and I checked the FBL3n, I can see some posted line item to this Internal Order. I also checked from COEP table, the record is also missing there.
FYI, this issue happened today, and yesterday I can see actual line item in this report and COEP table.
Please kindly advise
Thank you

Btw i can found the CO document in COBK table. Very strange..

Similar Messages

  • Cisco Unity 7 Problem in Message Store Wiard. Showing some SRV Records Missing in DNS Table. Please suggest and help on this matter.

    Installed Cisco Unity 7 on Windows Server 2000 and Unity Server is on Domain,and Exchange we are using is Exhcnage 2007. When we reach at Message Store Wizard it is showing some error at the end that " Failed reaching for Unity in Active Directory Global Catalog. The SVR Record may be missing in DNS Table" . It shows when we slected Exchange in Process and the Selected Storage Group. And the it takes time and then shows error. Please try to resolve this issue soon, we need this solution urgently. We have already spent several days on different issues regarding Unity.
    If you need to talk regarding this matter, Please contact on +919780660619, and the conatct person name is Manav.
    Thanks in Advance
    Rosy

    Rosy,
    We cannot call you from this forum. If you truly need a call, you can open a TAC case. The info I can tell you is that you need to fix this in your dns. A simple google search of "no SRV record Windows 2000 server" comes up with numerous resources that can help you fix this. Here is just one example.
    http://support.microsoft.com/kb/241505
    and
    http://www.petri.co.il/active_directory_srv_records.htm
    I would also advise you, if you are doing a new install with Unity 7 and that version of Exchange, that you use Windows 2003 as the OS. Even MS doesn't support Windows 2000 Server any more so if you end up having an OS issue on your Unity server, we will not be able to get MS to help you. From a support perspective, I would advise you to use Windows 2003 Server in this implimentation.
    Thanks!
    Tray

  • Dimension key 16 missing in dimension table /BIC/DZPP_CP1P

    Hi all,
    I have a problem with an infocube ZPP_CP1. I am not able to delete nor load any data. It was working fine till some time back.
    Below is the outcome of running RSRV check on this cube. I tried to run the error correction in RSRV. But n o use
    Please help.
    Dimension key 16 missing in dimension table /BIC/DZPP_CP1P
    Message no. RSRV018
    Diagnosis
    The dimension key 16 that appears as field KEY_ZPP_CP1P in the fact table, does not appear as a value of the DIMID field in the dimensions table /BIC/DZPP_CP1P.
    There are 17580 fact records that use the dimension key 16.
    The facts belonging to dimension key 16 are therefore no longer connected to the master data of the characteristic in dimension.
    Note that errors that are reported for the package dimension are not serious (They are thus shown as warnings (yellow) and not errors (red). When deleting transaction data requests, it can arise that the associated entries in the package dimension have already been deleted. As a result, the system terminates when deleting what can be a very large number of fact records. At the moment, we are working on a correction which will delete such data which remains after deletion of the request. Under no circumstances must you do this manually. Also note that data for request 0 cannot generally be deleted.
    The test investigates whether all the facts are zero. If this is the case, the system is able to remove the inconsistency by deleting these fact records. If the error cannot be removed, the only way to re-establish a consistent status is to reconstruct the InfoCube. It may be possible for SAP to correct the inconsistency, for which you should create an error message.
    Procedure
    This inconsistency can occur if you use methods other than those found in BW to delete data from the SAP BW tables (for example, maintaining tables manually, using your own coding or database tools).

    Hi Ansel,
                 There has been no changes in the cube. I am getting this problem in my QA server. So I retransported the cube again from Dev to QA. But did not help me..
    Any other ideas??
    Regards,
    Adarsh

  • PR00 is missing in the table PRCC_COND_CT

    Hi Experts
    I have successful replicated all conditional Objects like DNL_CUST_CNDALL,DNL_CUST_CND,DNL_CUST_PRC from ECC to CRM2007,
    when i try to create a Sales Order in crm Condition types are missing ,i can able to see only values  with Zero in the condition Tab page for which i have maintained the conditional maitainece gp for PRODUCTCRM inorder to see condition types in CRM product conditions as per Building Block(c03).
    so what i was observed is condition types like PR00,K004,K005,K007 are missing in the table PRCC_COND_CT.which are not properly replicated into CRM system for which i have done the initial replication for all conditional objects so many time.
    Hence i request you all could you please tell me, is there any way to get all condition types into crm
    will it possible to add manually condition types in crm system.
    i would appreciate you help
    thanking you in advance
    Regards
    Rao

    Hi Bhanu
    I have checked in SLG1 there are following errors  and warnings
    Errors are:Table PRCC_COND_PPD has been posted in the database with errors
    Message no. CND_MAP155
    Table PRCC_COND_CT has been posted in the database with errors
    Message no. CND_MAP155
    1 .Error converting field FIELD_TIMESTAMP into /SAPCND/T685 for condition type BGEW.
        Message no. CND_MAP181
    Diagnosis
    Data records from the tables mentioned are required for converting field contents. These tables show inconsistencies that could have the following causes:
    A required entry is not available in one of the tables.
    Field contents for table entries are not compatible with each other.
    System Response
    Only those data records are modified in the table for which consistent table entries exist, and for which conversion of field entry is possible.
    Procedure
    With the help of OSS Note 314542 and instructions contained therein, analyze causes, and make necessary corrections.
    2. Error converting field FIELD_TIMESTAMP into /SAPCND/T685 for condition type BI00.
        Message no. CND_MAP181
    Diagnosis
    Data records from the tables mentioned are required for converting field contents. These tables show inconsistencies that could have the following causes:
    A required entry is not available in one of the tables.
    Field contents for table entries are not compatible with each other.
    System Response
    Only those data records are modified in the table for which consistent table entries exist, and for which conversion of field entry is possible.
    Procedure
    With the help of OSS Note 314542 and instructions contained therein, analyze causes, and make necessary corrections.
    3.Error converting field FIELD_TIMESTAMP into /SAPCND/T685 for condition type PR00.
    Message no. CND_MAP181
    Diagnosis
    Data records from the tables mentioned are required for converting field contents. These tables show inconsistencies that could have the following causes:
    A required entry is not available in one of the tables.
    Field contents for table entries are not compatible with each other.
    System Response
    Only those data records are modified in the table for which consistent table entries exist, and for which conversion of field entry is possible.
    Procedure
    With the help of OSS Note 314542 and instructions contained therein, analyze causes, and make necessary corrections.
    ther are follwoing Warnings:
    1. Double entry for table PRCC_COND_PPD. For details, see long text.
        Message no. CND_MAP815
    Diagnosis
    An error occurred during the update. You tried to update a data record with the key KAPPL = CRM and KALSM = 18CBCL in table PRCC_COND_PPD. A data record with the above key already exists in table PRCC_COND_PPD.
    System Response
    Data records with identical keys conflict with data integrity. The above data record was not updated for this reason.
    Procedure
    Use SAP Note 0314315 to eliminate the cause of the error.
    2. Double entry for table PRCC_COND_CT. For details, see long text.
    Message no. CND_MAP812
    Diagnosis
    An error occurred during the update. You tried to update a data record with the key KAPPL = CRM and KSCHL = 18CL in table PRCC_COND_CT. A data record with the above key already exists in table PRCC_COND_CT.
    System Response
    Data records with identical keys conflict with data integrity. The above data record was not updated for this reason.
    Procedure
    Use SAP Note 0314315 to eliminate the cause of the error.
    Edited by: padmarao mota on Mar 13, 2009 9:47 PM

  • Record missed in a SQL

    hi experts
    I run a SQL like :
        SELECT UC_POD_EXT
               UC_DATEFRO
               UC_DATETO
               /BIC/ZKWH_MR
               /BIC/ZKWH_BILL
               /BIC/ZBI_MRCON
          FROM /BIC/AZFC_D9900 INTO TABLE LT_BILL
          FOR ALL ENTRIES IN SOURCE_PACKAGE
         WHERE UC_POD_EXT = SOURCE_PACKAGE-UC_POD_EXT.
    SOURCE_PACKAGE only has 1 record, and this reocrd's UC_POD_EXT is 10032789420750421. and it return 31 records.
    and I test another SQL like
        SELECT UC_POD_EXT
               UC_DATEFRO
               UC_DATETO
               /BIC/ZKWH_MR
               /BIC/ZKWH_BILL
               /BIC/ZBI_MRCON
          FROM /BIC/AZFC_D9900 INTO
          corresponding fields of TABLE LT_BILL
         WHERE UC_POD_EXT = '10032789420750421'.
    it return 34 reocrds
    so some records missed in the first SQL, i don't know why.

    Please retrive all the key fields of table /BIC/AZFC_D9900, as this is because of FOR ALL ENTRIES CLAUSE (as mentioned by Neil), which will delete duplicate records from the fields you are selecting.  Since now you'll retrieve all the key fields of the table /BIC/AZFC_D9900, you are assured of getting unique records.
    Regards
    Ranganath

  • 0CRM_SALES_ACT_1 - records missing from extraction

    Hi.
    We are using an enhanced version of the extractor 0CRM_SALES_ACT_1, but when comparing the number of records retrieved by the extractor using RSA3, with the number of records in the base tables (e.g. 0CRM_ORDERADM_H), several records are missing (RSA3 = c. 9200 records, Table = c. 10500 records).
    Analysing the differences, we cannot see any patterns in the 'rejected' data or reasons why the records should not have been extracted.  Documents of varying types saved with/without errors, and with or without various key fields are all extracted, or not as the case may be.  Also, we have eliminated the enhanced BADI as the source of the problem.
    We are on CRM 5.0 SP 9 and BI 7 SP 13.
    Any ideas what the problem could be or how to progress?
    Many thanks,
    Ian.

    Thanks for your reply Doris.  We do not use opportunities - some of the transaction types that we would expect to be extracted are not.  Table CRMD_ACTIVITY_H contains 10,708 records so we are still some way away from reconciling with that table too. . .
    Since I posted we have identified that one particular transaction type, when it is automatically generated by the CRM system when a different transaction type is created (i.e. a document to record the interaction with the customer, is created and coupled to a service order, which details the customer's enquiry - this is a custom enhancement to the Web IC in CRM), is not extracted.
    Any ideas why these system generated records may be missed by the extractor, but transactions of the same type when created manually are picked up?
    Thanks,
    Ian.

  • COEP Table

    Dear All
               In COEP table Value COCurr field how to calculate
    Thanks and Regards
    Suresh

    Hi,
    well, what do you mean how to calculate? You do not need to calculate it yourself, the system does it without asking you. You cannot change the logic behind, at least not directly.
    There are 3 fields in a line - beware the 2nd character in the field names:
    wTgbtr  = value in Transaction currency
    wOgbtr = value in Object currency
    wKgbtr = value in Controlling area (german Kostenrechnungskreis) currency.
    The Transaction currency is the currency which is used for the original document. Assuming you are posting a vendor invoice in Japanese Yen JPY, this is the transaction currency then, WTGBTR = the value in JPY.
    The Object currency is entered in the master record of the controlling object you are using, say, a cost centre. Let's say the cost centre has object currency EUR. If the company code has local currency EUR, then the EUR value from the FI document is just copied to WOGBTR. But if the company code has no EUR currency at all (say, company code currency is GBP), so there is no EUR amount in the FI document, only JPY and GBP. In this case, the conversion JPY to EUR (object currency) takes place in controlling only. Exchange rate type and date are specified in the fiscal-year specific version parameters for controlling, tranaction OKEVN or OKEQN. So WOGBTR becomes the converted EUR value then.
    Finally, and this was your question, the controlling area currency was defined for the controlling area (not very surprisingly), in transaction OKKP Say, in this example in should be USD. Then the JPY value in transaction currency is translated to USD using the exchange rate type and date specified in OKEVN / OKEQN, and this will be insrted in WKGBTR.
    To make it short:
    document / transaction currency JPY --> COEP-WTGBTR
    company code currency GBP           --> not (necessarily) in CO
    object (cost centre currency)  EUR      -->  COEP-WOGBTR
    controlling area currency USD           -->  COEP-WKGBTR
    That should be clear now, if not please let me know.
    Hope that helps, points welcome
    Csaba

  • Insert statement does not insert all records from a partitioned table

    Hi
    I need to insert records in to a table from a partitioned table.I set up a job and to my surprise i found that the insert statement is not inserting all the records on the partitioned table.
    for example when i am using select statement on to a partitioned table
    it gives me 400 records but when i insert it gives me only 100 records.
    can anyone help in this matter.

    INSERT INTO TABLENAME(COLUMNS)
    (SELECT *
    FROM SCHEMA1.TABLENAME1
    JOIN SCHEMA2.TABLENAME2a
    ON CONDITION
    JOIN SCHEMA2.TABLENAME2 b
    ON CONDITION AND CONDITION
    WHERE CONDITION
    AND CONDITION
    AND CONDITION
    AND CONDITION
    AND (CONDITION
    HAVING SUM(COLUMN) > 0
    GROUP BY COLUMNS

  • Need Help : Urgent : Making one of the record Bold in a Table

    Hi Frds,
    I am new to OAF.......
    I am  facing the issue that i have to make one of the record bold in a table...........
    By using the query, i m trying to display the payslip
    It contains the list of Earnings ,Deductions and NetPay amount..........
    this is the part of the query........
    select payment_date,element_name,arabic_name,val,balance from
      select '0' flag,assignment_id,null payment_date,'Payslip for the Month'  element_name,to_char(payment_date,'Month-YYYY')arabic_name,
       null val, null balance from xx_payroll_info
    where 1 =1
    and payment_date = last_day(:2) 
    and assignment_id = (select assignment_id from xx_people_reporting_info
        where person_id = :1)
    union all
    select '1'flag,assignment_id,payment_date,element_name,arabic_name,
       value val,null,balance
      from xx_payslip_details_mv
    where 1 = 1
    and payment_date = last_day(:2)
    and earn_deduct = ('E')
    and assignment_id in (select assignment_id from xx_people_reporting_info)
    union all
    select '2' flag,assignment_id,payment_date,'Earnings-Total',null,sum(value) val,null
      from xx_payslip_detail_mv
    where 1 =1
    and payment_date = last_day(:2)
    and earn_deduct = 'E'
    and assignment_id in (select assignment_id from xx_people_reporting_info
           where 1 =1
                and person_id = :1 )
    group by assignment_id,payment_date
    My Requirement is : I have to make the Payslip For the month of , Date, Earnings-Total  into Bold.....  How can i do this.... plz... help me out in this......
    Thanks &Regards,
    Jaya

    Hi Jaya,
    Set CSS Class property as  OraDataText for respectiveb column.
    OR
    /In Controller PR
                    import oracle.cabo.style.CSSStyle;
                    CSSStyle customCss = new CSSStyle();
                     customUnCss.setProperty("text-transform","uppercase");
                     customUnCss.setProperty("font","bold 16px \"Trebuchet MS\", Verdana, sans-serif");//# -red
                     OAMessageStyledTextBean styledTextBean =(OAMessageStyledTextBean)webBean.findIndexedChildRecursive("POCommentsItem");
                     if(styledTextBean!=null)
                      styledTextBean.setInlineStyle(customUnCss);
           Thanks,
            Dilip

  • How to get the last record of an internall table ....

    Hi All..
    i want to get the last record of an internal table itab, and i want the the value of the last record.

    Hi,
         Use describe statment.
    data: lv_line type i.
        Describe table itab lines lv_line.
        read table itab into wa_itab index lv_line.
    regards,
    Santosh Thorat

  • How to record the records deleted in a table

    Hi Experts
    I want to run a report as a batch which should deleted the records
    which are sysdate - 60 and The report should log the number of records deleted
    from each table at End Of Run.
    Criteria for selecting records to be deleted are as follows:
    1.     ZINT_DATA
    u2022     ZINT_DATA.CREATED_ON <= (Today u2013 60 Days)
                   and ZINT_DATA.STATUS = u2018OKu2019
    So I want to create a table for log history recorded as
    Delete Date         Log description
    01.01.2008        1500 rows deleted
    30.03.2008        2000 rows deleted.
    30.04.2008        300  rows deleted.
    Eg The table are ZINT_DATA.
    The report starts like this
    REPORT z_eslp_command.
    DATA:
      fs_zint_data TYPE zint_data.
    DATA:
      t_zint_data TYPE
              TABLE OF
                      ZINT_DATA.
    START-OF-SELECTION.
    SELECT *
       FROM ZINT_DATA
       INTO TABLE t_ZINT_DATA PACKAGE SIZE 10000.
    ENDSELECT.
    LOOP AT t_zint_data INTO fs_zint_data.
    INSERT INTO ZINT_DATA_DEL
          VALUES fs_zint_data.
    select count(*) from zint_data_del.
    ENDLOOP.
    IF sy-subrc EQ 0.
      WRITE:
        'DATA INSERTED FROM ZINT_DATA into ZINT_DATA_DEL'.
    ENDIF.
    But Instead of creating another table , I want only log to be recorded as described.
    Thanks
    Regards
    Piroz

    Hi Kiran
    See the final modification of the report but I am getting an error as
    Field " Corresponding_fields" is unknown, it is neithere in one of the specified tables nor defined by a
    DATA statement, but I have already created an internal table itab1 , could you check and revert with the correction.
    REPORT  ZSD1DELETION                .
    TYPE-POOLS:SLIS.
    *Used in ZSDI_INTERFACE1 Program.
    TABLES:ZINT_DATA_DEL  . 
    *DATA: BEGIN OF ITAB1 OCCURS 0.
    *DATA: SL_NO TYPE SY-TABIX.
         INCLUDE STRUCTURE zint_data_del.
    *DATA:END OF ITAB1.
    DATA: BEGIN OF ITAB1 occurs 0 ,
          MANDT type zint_data_del-mandt,
          ZINT_ID type zint_data_del-zint_id,
          ZINT_TY type zint_data_del-zint_ty,
          CREATED_ON type zint_data_del-created_on,
          KEY_VAL type zint_data_del-key_val,
          SEQUENCE type zint_data_del-sequence,
          STATUS type zint_data_del-status,                 
          LENGTH type zint_data_del-length,           
          RAW_DATA type zint_data_del-raw_data,       
          end of itab1.
    *DATA: i_data TYPE TABLE OF ITAB1, " internal table
    *wa_data TYPE ITAB1. " work area
    DATA:LINE1(10) TYPE C,
         LINE2(10) TYPE C,
         date1(10) type c,
         date2(10) type c,
         name1(60),
         string1(100),
         title1(65),
         title2(100) type c,
         FNAME TYPE STRING.
    *Declarations for ALV
    DATA:itfieldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE.
    DATA:itrepid TYPE sy-repid.
    itrepid = sy-repid.
    DATA:itevent TYPE slis_t_event.
    DATA:itlistheader TYPE slis_t_listheader.
    DATA:walistheader LIKE LINE OF itlistheader.
    DATA:itlayout TYPE slis_layout_alv.
    DATA:top TYPE slis_formname.
    DATA:itsort TYPE slis_t_sortinfo_alv WITH HEADER LINE.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    *PARAMETERS:P_WERKS LIKE BSEG-WERKS.
    SELECT-OPTIONS: S_DATE FOR ZINT_DATA_DEL-CREATED_ON OBLIGATORY.              
    SELECTION-SCREEN END OF BLOCK B1.
    *Validations w.r.t the Date
    AT SELECTION-SCREEN ON S_DATE.
    IF S_DATE IS INITIAL.
    MESSAGE 'Enter the Date' type 'E'.
    *Records from 2007 can't be deleted.
    ELSEIF S_DATE-LOW+0(4) >= '2007' AND
           S_DATE-HIGH+0(4) >= '2007'.
    MESSAGE 'Records from the Year 2007 cannot  be Deleted' type 'E'.
    ENDIF.
    CONCATENATE  s_DATE-low6(2) '.' s_DATE-low4(2) '.' s_DATE-low+0(4)
    INTO date1.
    CONCATENATE  s_DATE-high6(2) '.' s_DATE-high4(2) '.' s_DATE-high+0(4)
    INTO date2.
    PERFORM GETDATA.
    *&      Form  DOWNLOAD
          text
    -->  p1        text
    <--  p2        text
    form GETDATA.
    SELECT * FROM ZINT_DATA_DEL
             INTO CORRESPONDING_FIELDS OF TABLE ITAB1
             WHERE CREATED_ON IN S_DATE.
    IF ITAB1[] IS NOT INITIAL.
    DESCRIBE TABLE ITAB1 LINES LINE1.
    PERFORM DELETION.
    PERFORM ALV.
    ELSE.
    MESSAGE 'No Data' type 'S'.
    ENDIF.
    endform.                    " GETDATA
    *&      Form  DELETION
          text
    -->  p1        text
    <--  p2        text
    form DELETION .
    DELETE FROM ZINT_DATA_DEL WHERE CREATED_ON IN S_DATE.
    endform.                    " DELETION
    *&      Form  alv
          Fieldcatalog for ALV Report
    FORM alv.
    LOOP AT ITAB1.
    ITAB1-SL_NO = SY-TABIX.
    MODIFY ITAB1.
    ENDLOOP.
      DEFINE m_fieldcat.
        itfieldcat-fieldname = &1.
        itfieldcat-col_pos = &2.
        itfieldcat-seltext_l = &3.
        itfieldcat-do_sum = &4.
        itfieldcat-outputlen = &5.
        itfieldcat-edit = &6.
        append itfieldcat to itfieldcat.
        clear itfieldcat.
      END-OF-DEFINITION.
      m_fieldcat 'MANDT'     '' 'Client' '' 03 ''.
      m_fieldcat 'ZINT_ID' ''   'Id' '' 10 ''.
      m_fieldcat 'ZINT_TY'   '' 'Type.'  '' 05 ''.
      m_fieldcat 'CREATED_ON' '' 'Date Created on' '' 25 ''.
      m_fieldcat 'KEY_VAL'       '' 'key value'  '' 04  ''.
      m_fieldcat 'SEQUENCE' '' 'sequence' '' 06 ''  .
      m_fieldcat 'STATUS'   '' 'status.' '' 10 ''.
      m_fieldcat 'LENGTH'    '' 'Length.' '' 18 ''.
      m_fieldcat 'RAW_DATA'    '' 'Raw Data' '' 15 '' .
      itlayout-zebra = 'X'.
      itlayout-colwidth_optimize = 'X'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
          EXPORTING
            i_callback_program      = sy-repid
            is_layout               = itlayout
          i_callback_user_command =  ' '
            i_callback_top_of_page  = 'TOP'
            it_fieldcat             = itfieldcat[]
            i_save                  = 'A'
         is_variant              = ITVARIANT
            it_events               = itevent[]
         is_print                = ITPRINTPARAMS
            it_sort                 = itsort[]
          TABLES
            t_outtab                = itAB1
            EXCEPTIONS
            program_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.
    ENDFORM.                    "alv
    *&      Form  TOP
        Top of page for ALV Report
    FORM top.
       CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
         EXPORTING
            i_list_type           = 0
         IMPORTING
            et_events             = itevent
    EXCEPTIONS
      LIST_TYPE_WRONG       = 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.
    string1 = 'Records from'.
    CONCATENATE string1 date1 'to' date2 INTO title1
    SEPARATED BY space.
    walistheader-typ = 'H'.
    walistheader-info = title1.
    APPEND walistheader TO itlistheader.
    CONCATENATE 'Records Deleted' '-' LINE1 INTO title2.
    walistheader-typ = 'H'.
    walistheader-info = title2.
    APPEND walistheader TO itlistheader.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          it_list_commentary      = itlistheader
        I_LOGO                   = ''.
        I_END_OF_LIST_GRID       =
       ENDIF.
      CLEAR itlistheader.
    ENDIF.
    ENDFORM.                    "TOP
    Regrds
    Piroz

  • Count the Records in  an internal table without a loop.

    How do i count the number of records in an internal table without using the loop  statement.
    The Describe statement give the total no. of records in the internal table.But i want the count of the key fields in the internal table
    For eg
    Row Field
    1       A
    2       A
    3       A
    4       B
    5       B
    6       C
    Count of A = 3
    Count of B = 2
    Count of C = 1

    Dilip,
      I think isn't posible. Only 3 ideas:
    1ª, make other table "table2", similar to your actual table.
         table2[] = yourtable[].
         delete table2 where key <> 'A'.
         describe table table2 lines contA.
        But depending the amount of data, you may have problems in performance or memory consumption...
    2ª, make other table, only with the keys fields and a count field,
        data begin table2
           key_field1,
           cont type i.
        end data.
       when you append lines to yourdata, make a collect to this table:
        table2-keys = yourtable-keys.
        table2-cont = 1.
       collect table2.
       But only works if you can modify the program where data is appended, and you may be carefull when data is deleted :-(...
    3ª if your data if filled in a select, you may fill the table2 of point 2ª, making a similar select but:
       select keyfields count( * ) into table table2
      from ...
      where (the same you have to fill your original table...)
       group by keys.
    But you have the same problem is data is deleted later...
    I hope that any of the three is useful for you...
    Edited by: Diego Alvarez on Jan 5, 2010 5:09 PM

  • How to process each records in the derived table which i created using cte table using sql server

    I want to process each row from the CTE table I created, how can I traverse from first row to second row and so on....
    how to process each records in the derived table which i created using  cte table using sql server

    Ideally you would be doing a set based processing rather than traversing row by row as thats more efficient. To answer it specific to your scenario we may need more info. Can you explain with some sample data your exact requirement?
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • A sample code to check records of a system table?

    hi ABAP4 experts,
    We are pretty new at ABAP4.  We would be appreciated if you can provide a sample code to check how many records and calculate a total amount for a specific field, e.g., DMBTR in a system table, e.g., BSEG.  Note: there is no any selection for this table BSEG, we just want to get the total record count in this table and also the total amount for a specific field e.g. DMBTR in this table.
    Do we have to use an internal table to transfer all the records of BSEG into the internal table to get the result?
    We will give you reward points!

    Hi Kevin,
    Using SUM directly in SQL will NOT work for table BSEG because BSEG is pool table. You will get an ABAP error.
    "Aggregate functions and the addition DISTINCT are not supported in field lists for pooled and cluster tables".
    You need an internal table to transfer all data from BSEG and perform calculation for count and sum.
    Concerning about performance running perhaps you can code something like this.
    REPORT ZZFLTEST NO STANDARD PAGE HEADING.
    TABLES: BSEG.
    DATA: CURS          TYPE CURSOR,
          PACKAGE_SIZE  LIKE RMCS4-MC_CM_PSIZE VALUE '10000'.                                                                               
    DATA: BEGIN OF I_BSEG OCCURS 0,
            BELNR TYPE BSEG-BELNR,
            BURKS TYPE BSEG-BURKS,
            GJAHR TYPE BSEG-GJAHR,       
            BUZEI TYPE BSEG-BUZEI,       
            DMBTR TYPE BSEG-DMBTR,
            SHKZG TYPE BSEG-SHKZG.
    DATA: END OF I_BSEG.
    DATA: TOT_DMBTR TYPE BSEG-DMBTR,
          TOT_REC   TYPE I.
    SELECTION-SCREEN BEGIN OF BLOCK B01 WITH FRAME TITLE TEXT-001.
    SELECTION-SCREEN SKIP.
    PARAMETERS: P_SIZE LIKE RMCS4-MC_CM_PSIZE DEFAULT '10000'.
    SELECTION-SCREEN SKIP.
    SELECTION-SCREEN END OF BLOCK B01.
    START-OF-SELECTION.
      PACKAGE_SIZE = P_SIZE.
      OPEN CURSOR WITH HOLD CURS FOR
      SELECT BELNR BURKS GJAHR BUZEI DMBTR SHKZG
      FROM BSEG
      WHERE BELNR <> SPACE
        AND BURKS <> SPACE
        AND GJAHR <> SPACE
        AND BUZEI <> SPACE.
    *Fetch internal table I_BSEG for every 10000 records.
      DO.
        FETCH NEXT CURSOR CURS
        INTO TABLE I_BSEG PACKAGE SIZE PACKAGE_SIZE.
        IF SY-SUBRC <> 0.
          EXIT.
        ENDIF.
      ENDDO.
      CLOSE CURSOR CURS.
      LOOP AT I_BSEG.
        TOT_REC = TOT_REC + 1.
        IF I_BSEG-SHKZG = 'S'.
          TOT_DMBTR = TOT_DMBRT + I_BSEG-DMBTR * -1.
        ELSE.
          TOT_DMBTR = TOT_DMBTR + I_BSEG-DMBTR.
        ENDIF.
      ENDLOOP.
      WRITE: / 'TOTAL BSEG-DMBTR:', TOT_DMBTR,
             / 'TOTAL RECORD:    ', TOT_REC.
    END-OF-SELECTION.
    Hope this will help.
    Regards,
    Ferry Lianto

  • How to display records into a non table base block..

    Hi,
    Can anybody help me how to display records into a non table base block....
    Find below is my coding but it only display the last record in the first line
    in the block.
    PROCEDURE CREATE_CARTON_QUESTION IS
    CURSOR car_c IS
    select /*+ rule */ question_id, question_description
    from WHOP.QADB_QUESTIONS
    where question_category = 'Carton'
    and question_active_flag = 'Y';
    v_found VARCHAR2(10);
    v_status boolean;
    v_error      varchar2(150);
    v_count number;
    car_r car_c%rowtype;
    begin
    begin
    select count(*) into v_count
    from WHOP.QADB_QUESTIONS
    where question_category = 'Carton'
    and question_active_flag = 'Y';
         exception
         when no_data_found then
         v_count := 0;
    end;
    if v_count > 0 then
    for car_r in car_c loop
    ---populating carton questions
    :la_carton.carton_question_id     := car_r.question_id;
    :la_carton.carton_question_answer     := 'N';
    :la_carton.carton_error_details     := null;
    :la_carton.attribute2          := car_r.question_description;
    end loop;
    end if;
    end;
    Thanks in advance.
    Regards,
    Jun

    Hi SNatapov,
    Thanks for you reply but still I get this error...
    FRM-40737 Illegal restricted procedure GO_BLOCK in WHEN-VALIDATE-ITEM trigger.
    Please note that I call that program unit in the last field of my control block inside when-validate-item trigger the questions should be display in la_carton block which is my non-base table block.
    Find below is the code....
    begin
    go_block('la_carton');
    first_record;
    for car_r in car_c loop
    ---populating carton questions
    :la_carton.carton_question_id := car_r.question_id;
    :la_carton.carton_question_answer := 'N';
    :la_carton.carton_error_details := null;
    :la_carton.attribute2 := car_r.question_description;
    next_record;
    end loop;
    end;
    Hoping you can help me this problem...
    Thanks in advance.
    Regards,
    Jun

Maybe you are looking for