Reading table: /SAPAPO/AM_ALERT or using FM: /SAPAPO/AMPLLP_SDP_ALERTS

Hello all,
I am trying to build a logic that retrieves the database alerts from the table: /SAPAPO/AM_ALERT.
Problem is the mapping of the OBJECT ID's on this table where I encounter some for which I cannot find a correspondence.
Currently I have the following:
OBJECT ID1 = Macro Book
OBJECT ID2 = Data view
OBJECT ID3 = ???
OBJECT ID4 = ???
OBJECT ID5 = ???
OBJECT ID6 = ???
This fields have a content with some ID. I have tried to check either this ID's are the material ID from /SAPAPO/MATKEY or the location from /SAPAPO/LOC but there is no findings.
Does anyone know the correct mapping and how to properly read the table?
This is because I would need to filter the database alerts retrieved from this table by product/location...
As an alternative does anyone know about how to correctly populate the import parameters of FM: /SAPAPO/AMPLLP_SDP_ALERTS?
I believe this would also be an option to read the database alerts.
Thank you all.
Joao

AAL,
I have never tried to delete alerts under the condition where there are several million entries, so I cannot speak from memory.  I had a similar problem once with BackOrder Processing logs, which caused me all kinds of grief to reorg....
If you have an old version of APO (3.1 and previous) there are some notes that may be helpful.  Search on OSS under /SAPAPO/AMON_REORG.  Particularly http://service.sap.com/sap/support/notes/513553.  These problems have mostly been corrected in later versions.
As far as your question,  the two 'times' you asked about refer to the record creation date.  Records that are older than the absolute date/time will be deleted.  Relative Date time refer to 'difference from today'.  I would start with a very old value under 'absolute', say around the date that your first alerts were created.  To avoid session timeout issues, I would create a variant which selected only the oldest records, and then run in background.  I would try first to select only one alert monitor application, preferably one that has the smallest number of records, to start.  Once these are fully reorg'ed, move to another A/M application.
For internal table storage, there are settings that your Basis Team can make, that may improve the situation.  Print the error log and take it to your Basis team.
Best Regards,
DB49

Similar Messages

  • Reading Tables in MS WORD using LabView & ActiveX

    I would like to be able to read tables contained in an MS WORD document using LabView and ActiveX. (I've been successful in doing this with Excel files.  ( I am not using the report generation toolkit.)  After searching numerous posts with similar questions about LV & ActiveX  I've not found any solution to my specific app.  In LabView I'm successful doing an "Automation Open", followed by a Property Node, to an Invoke Node ("Documents" Open) and then a Property Node with "TABLES" selected. That's where I get stuck. Now that I have a reference (?) to "Tables" I can't seem to figure out what I need to connect and follow that with in order to now read the Tables in my document.  I guess that's due to my lack of understanding as to what exactly this "Table" property node output actually is.  Can someone tell me what this reference output is referring to and how I can get to the Tables within the document from it?  I've tried connecting both a property node and invoke node to no avail.  Can someone point me in the right direction?
    Thanks. Ed

    Dear Ed,
    Figuring out "what I need to connect and follow that with" relates to the organization of the MS Word Object Model.  Please refer to the Word Object Model Reference MSDN >> MSDN Library >> Office Development >> 2007 Microsoft Office System >> Word 2007 >> Word 2007 Developer Reference >> Word Object Model Reference.  You can think of the Object Model as a software hierarchy.  You must start at the top of the hierarchy and work your way down to the item of interest.  You must descend the hierarchy one level at a time; you cannot skip levels.
    At each level of the hierarchy, you have access to the methods and properties of that "level".
    Click on the Tables Collection link from the Word Object Model Reference page.  Notice how Tables is at the top of the hierarchy.  When you have a LabVIEW reference to a Tables object (technically speaking a collection), you then have access to the methods and properties supported by this "level".  Click on the Tables Object Members link.  Here you will see that the Tables collection supports two methods, Add and Item, and also supports five properties, Application, Count, Creator, NestingLevel, and Parent.
    Notice how Mike gets the Count property of the Tables object.  He then uses the Item method to return a reference to an individual table.  The key thing to take away from this is how Mike uses the Item output node to gain access to the methods and properties of the Table object (not the Tables collection).  Mike has descended the hierarchy from Tables to Table.  He descends the hierarchy again with the Cell method and Range property of the Table and Cell object respectively.  Lastly, the Text property of the Range object, "Returns or sets the text in the specified range or selection."
    Effective LabVIEW programming with this type of ActiveX control requires a fair understanding of how Microsoft organized its software libraries.  The Object Model Reference is a good place to start visualizing how these libraries are organized.  Thank you for using the forums Ed, and thanks for your post, Mike.

  • Read   table and loop at

    Hi EXpert,
    I have an internal table say itab and I need to fetch a single record with some given conditions.
    Hence I have used READ table statement ,
    But on using this read table statement , I am unable to fetch the record :-(((( . It gives sy-subrc  =  4.
    And the same conditions when are put in Loop at itab  statement, then I am able to fetch the data .
    My requirement is only 1 record for the given conditions ( in where clause in case of loop at statement).
    I think I am probably missing out on some minor thing..
    <removed_by_moderator>
    Warm Regards,
    SUDHA
    Edited by: Julius Bussche on Feb 7, 2009 2:48 PM

    Hi,
    Test the following Code hope it will solve out your problem,
    PARAMETERS: key TYPE i .
    TYPES: BEGIN OF t_test,
      s_no TYPE i,
      name(15),
      END OF t_test.
    DATA: it_test TYPE STANDARD TABLE OF t_test WITH HEADER LINE.
    DO 10 TIMES.
      it_test-s_no = sy-index.
      it_test-name = 'SDN'.
      APPEND it_test TO it_test.
    ENDDO.
    READ TABLE it_test INTO it_test WITH KEY key.
    IF sy-subrc = 0.
      WRITE: 'sy-subrc = ' , sy-subrc,
             /1 it_test-s_no, 15 it_test-name.
    ELSE.
      WRITE: 'sy-subrc = ' , sy-subrc,
             / 'Sorry there is no Records with this Key'.
    ENDIF.
    Kind Regards,
    Faisal
    Edited by: Faisal Altaf on Feb 7, 2009 6:59 PM

  • How to get the /sapapo/bophead-description using tbtcp-variant.

    Hi All,
             I need to pick the field /sapapo/bophead-description using the tbtcp-variant. The tbtcp-variant is a dynamic value which will be generated during process run. How to relate these tables and fetch the data ?

    Hi  Raja ,
                  Use the FM RS_VARIANT_VALUES_TECH_DATA and pass the report name and variant name from TBTCP . From the resulting table read the second entry where SELNAME column is VARIANT . You will get the variant . Pass this into table  /sapapo/bophead and  you can pick the needed records.

  • Split SNP PDS using BADI /SAPAPO/CURTO_SNP Method CIF_IMPORT

    Hello APO ABAP experts,
    The requirement is to split SNP PDS based on the number of modes. Meaning, the PDS should have only Mode per Activity in the Operations.
    My plan was to change the changing internal tables in the method CIF_IMPORT to create number of SNP PDS depending up on Modes. But, i am not sure whether it is possible or not. Please suggest.
    Note: BADI will be triggered once per each PDS.
    Thanks,
    Shaun.

    Saurabh,
    Let me explain you what i am doing:
    Since i need to split one PDS into multiple PDS, I am changing the fields EXT_PLANNR and EXT_NAME just by appending a counter. Once after i change them, adding the entries to the changing internal tables (CT_*). At the end of CIF_IMPORT, i am deleting the original PDS entries.
    Example code:
      LOOP AT ct_planactz INTO ls_planactz.
        ls_planactz-ext_plannr = lv_new_ext_plannr.
        APPEND ls_planactz TO lt_planactz.
      ENDLOOP.
      APPEND LINES OF lt_planactz TO ct_planactz.
    Right now, for testing purpose - i am not splitting the PDS. I am just trying to create 2 SNP PDS by using one PDS. I want to test my code first to create multiple PDS.
    When doing this, i get the following error:
    Error: Activity 250006007010001-012 000600000004 P  does not exist
    Message no. /SAPAPO/CURTO005
    Piece of standard code cuasing the problem:
    LN 64 in method GET_APO_GUIDS.
        READ TABLE ct_cif_planactz INTO ls_cif_planactz
                  WITH KEY actnr   = ls_apo_planactz-r3actnr
                           plnkn   = ls_apo_planactz-plnkn
                           zaehl   = ls_apo_planactz-zaehl
                           phasenr = ls_apo_planactz-phasenr
                           uvorn   = ls_apo_planactz-uvorn
                  BINARY SEARCH.
    Call stack:
    METHOD     GET_APO_GUIDS
    METHOD     CREATE_RTO
    METHOD     CREATE_SNP_RTO
    FUNCTION     /SAPAPO/CUSLNTRTO_CREATE_RTO
    Question:
    May i know what is the significance of other fields in internal table ct_cif_planactz ? Since i am chaning only EXT_PLANNR field, above binary search is picking up the same entries and ignoring my second PDS.
    I would appreciate if you can share your ideas.
    Thanks,
    Shaun.

  • Authorization check using FM /SAPAPO/MCP_PERMISSION_CHECK2

    Hi All,
          I have to perform the Authorization check using FM /SAPAPO/MCP_PERMISSION_CHECK2 based on 2 characteristics.
    What will be the inputs to the FM. Please tell with an example as in SE37 it is giving permission check parameter as 'X' even if I dont enter any value in the input
    Win full points for the answer.
    Best Regards,
    Chandan Dubey

    Hi Chandan,
         If you go through the function module the export parameter e_permission is marked as 'X' in the first line i.e before processing the code. Then it loops at table T_BOBJECTS ( need to pass the Name of Authorization Object). So if u don't have the authorization, then parameter e_permission is modified as space (Which means u don't have the authority). So when u test the function make sure that u pass the corresponding Authorization Object. If you execute just without passing any parameter u always get 'X' for the parameter e_permission. Let me know if you have further queries.
    <u>Test Data :</u>
    Fill the T_BOBJECTS (I think in your case it's 'C_APO_IOBJ'..... just make sure of it),
    i_actvt ,
    01     Create or Generate
    02     Change
    03     Display
    06     Delete
    16     Execute                                                                 
    i_pareaid,
    i_keyfigure2.
    Regards,
    Siva.

  • Question while using report /SAPAPO/SDORDER_DEL

    Hello all,
    While using Report /SAPAPO/SDORDER_DEL and going through system documentation, I found that:
    "Normally, the order data remains in the database (it is not deleted as in live Cache)."
    From the above statement I am assuming that data gets deleted in live cache on a timely basis, Can someone please let me know how frequently the data gets deleted in live cache?
    Thanks for your time,
    Venkat.

    Hi Venkat,
    There is no specific frequency for data getting deleted from the live cache.
    It depend on the transactions which are taking place in R3 and APO.
    For eg. Sales orders create a requirement in the R3 which is transferred to APO.
    Now when this sales order is delivered, the requirements gets deleted from R3 and similarly from APO livecache. But this information does not get deleted from the APO database tables.
    So this report is used to delete R3 document data that is no longer required in APO.
    Cleaning of the database tables in APO leads to better performance.
    So as a best practice, this report should be scheduled to run weekly.
    Regards,
    Asheesh Gupta
    Message was edited by:
            asheesh gupta

  • Using View Tables in SQ01 and SQ02, getting 'Not Authorized to Read Table'

    We are trying to use a SAP Standard View Table (CAUFV) in an SQ01 and SQ02 transaction. Even though there is no Authorization Group assigned to the View we still get "You have no authorization to read table caufv' when running the linked transaction. We tried assigning the CA and KA authorization groups to the role and got the same results. (The tables used to create the View are AFKO and AUKF and thier Authorization groups are CA and KA.) We tried other views and received the same results. Does anyone have any experience with this?

    Hello Chuck,
    There are 2 ways to restrict this
    1: The user should be a part of at least one user group to run the corresponding ABAP query. This automatically restricts the access of the user to specific functional areas, and thus the corresponding underlying logical databases.
    2: The authorization object S_QUERY should be used to give proper authorizations to the user for a query. This authorization object has a field named ACTVT, which can take values 02 for Change, 23 for Maintain and 67 for Translate.
    This value determines whether the user can create and modify the query. The possible authorizations in the object are as follows:
    S_QUERY_ALL          Change, maintain and translate query
    S_QUERY_UPD         Change and Translate

  • How will use Select-Options in Read table Concept.

    Hi All,
                  How will use Select-Options in Read table. For  example,
          Select-Options : test for bseg-prctr.
           Select * from bseg into table ITAB.
    Read table ITAB with key prctr in test.
    Last line is showing error. If any way to read ITAB as conditions given per select options.
    Thankx Advance,,,

    HI,
    you cannot use " IN " with read statement , read statement is used as:
    READ TABLE it_collect  ASSIGNING <fs_collect>
                      WITH KEY   rbpl = <fs_wkdet>-arbpl
                                 ufnr = <fs_wkdet>-aufnr.
    anyways you can use  loop at statement before read to use  " into "  statement as:
    LOOP AT it_master INTO l_master
                                           WHERE werks       = l_werks
    hope it will help you
    regards
    rahul
    Edited by: RAHUL SHARMA on Dec 30, 2008 9:14 AM

  • Regarding the internal table data by using read table it_mard into wa_mard

    hi,
    i am reading the internal table it_mard with key matnr .
    my code is like this.
    *loop at it_final into wa_final.*
    *wa_second-matnr  = wa_final-matnr.*
      wa_second-bwart = wa_final-bwart.
    wa_second-bwtar = wa_final-bwtar.
    *read table it_mard into wa_mard with key matnr = wa_final-matnr*
                                                                              *binary search.*
    *if sy-subrc = 0.*
    *wa_second-labst = wa_mard-labst.*
    *endif.*
    *append wa_second to it_second.*
    clear :wa_final.
    *endloop.*
    final internal table haveing duplicate values because this table it_final having movement types
    so that i am not using delete statement .
    is there any logic for handling the duplicate values inside the loop statement
    by using read table statement.
    could u plz explain clearly  \[removed by moderator\]
    Edited by: Jan Stallkamp on Jul 11, 2008 2:11 PM

    this is my code could u plz explain  regarding duplicate material number .
    LOOP AT IT_MSEG INTO WA_MSEG.
        WA_FINAL-MBLNR = WA_MSEG-MBLNR.
        WA_FINAL-MATNR = WA_MSEG-MATNR.
        WA_FINAL-BWART = WA_MSEG-BWART.
        WA_FINAL-BWTAR = WA_MSEG-BWTAR.
        WA_FINAL-MENGE = WA_MSEG-MENGE.
        WA_FINAL-SOBKZ = WA_MSEG-SOBKZ.
        COLLECT WA_FINAL INTO IT_FINAL.
        CLEAR WA_FINAL.
      ENDLOOP.
      LOOP AT IT_FINAL INTO WA_FINAL.
        READ TABLE IT_MARD INTO WA_MARD WITH KEY MATNR = WA_FINAL-MATNR
                                                                                    BINARY SEARCH.
    this is reading the duplicate records i need to control duplicate records here .
    the   labst       value is repeating the number of times because of the meterial number duplication
    how can i restrict plz explain
        IF SY-SUBRC = 0.
          WA_FINAL-LABST = WA_MARD-LABST.
        ENDIF.
        READ TABLE IT_MKPF INTO WA_MKPF WITH KEY MBLNR = WA_FINAL-MBLNR
                                                                                    BINARY SEARCH.
        IF SY-SUBRC = 0.
          WA_FINAL-BUDAT = WA_MKPF-BUDAT.
        ENDIF.
        MODIFY IT_FINAL FROM WA_FINAL.
        CLEAR WA_FINAL.
      ENDLOOP.
      LOOP AT IT_FINAL INTO WA_FINAL.
        WA_SECOND-BWTAR = WA_FINAL-BWTAR.
        IF WA_FINAL-BWART = '101' OR WA_FINAL-BWART = '501' OR WA_FINAL-BWART = '561'.
          WA_SECOND-MENGE11 = WA_FINAL-MENGE.
        ENDIF.
        IF WA_FINAL-BWART = '201'.
          WA_SECOND-MENGE12 = WA_FINAL-MENGE.
        ENDIF.
        IF WA_FINAL-BWART = '541' AND WA_FINAL-SOBKZ = 'O' .
          WA_SECOND-MENGE13 = WA_FINAL-MENGE.
        ENDIF.
        IF WA_FINAL-BWART = '601'.
          WA_SECOND-MENGE14 = WA_FINAL-MENGE.
        ENDIF.
        IF WA_FINAL-BWART = '543'.
          WA_SECOND-MENGE15 = WA_FINAL-MENGE.
        ENDIF.
        IF WA_FINAL-BWART = '702'.
          WA_SECOND-MENGE16 = WA_FINAL-MENGE.
        ENDIF.
        IF WA_FINAL-BWART = '313'.
          WA_SECOND-MENGE17 = WA_FINAL-MENGE.
        ENDIF.
        IF WA_FINAL-BWART = '315'.
          WA_SECOND-MENGE18 = WA_FINAL-MENGE.
        ENDIF.
        IF WA_FINAL-BWART = '122' OR WA_FINAL-BWART = '161'.
          WA_SECOND-MENGE19 = WA_FINAL-MENGE.
        ENDIF.
        COLLECT WA_SECOND INTO IT_SECOND.
        CLEAR WA_SECOND.
      ENDLOOP.

  • Can I use Read table

    Can I use read table instead of multiple select & loop statements.
    Any one please give me the sample code ..how to do it.
    Thanks in advance

    Hi,
    Yes you can use read instead of nested loops and select which will affect the performance.
    REPORT  zkeerthi_ITABLE9                          .
    tables:vbap,vbak,vbkd.
    data:begin of it_vbap occurs 0,
         vbeln like vbap-vbeln,
         matnr like vbap-matnr,
         end of it_vbap.
    data:begin of it_vbak occurs 0,
         erdat like vbak-erdat,
         ernam like vbak-ernam,
         vbeln like vbak-vbeln,
         end of it_vbak.
    data:begin of it_vbkd occurs 0,
         konda like vbkd-konda,
         kdgrp like vbkd-kdgrp,
         vbeln like vbkd-vbeln,
         end of it_vbkd.
    data:begin of it_final occurs 0,
         vbeln like vbap-vbeln,
         matnr like vbap-matnr,
         erdat like vbak-erdat,
         ernam like vbak-ernam,
          konda like vbkd-konda,
         kdgrp like vbkd-kdgrp,
         end of it_final.
    parameters:v_matnr  type vbap-matnr.
    select vbeln
           matnr
           from vbap
           into table  it_vbap
           where matnr = v_matnr.
    select erdat
           ernam
           vbeln
           from vbak
           into table it_vbak
           for all entries in it_vbap
           where vbeln = it_vbap-vbeln.
    select konda
           kdgrp
           vbeln
           from vbkd
           into table it_vbkd
           for all entries in it_vbap
           where vbeln = it_vbap-vbeln.
    loop at it_vbap.
    read table it_vbak with key vbeln = it_vbap-vbeln.
    move :it_vbak-erdat to it_final-erdat,
          it_vbak-ernam to it_final-ernam,
          it_vbap-vbeln to it_final-vbeln,
          it_vbap-matnr to it_final-matnr.
          append it_final.
    read table it_vbkd with key vbeln = it_vbap-vbeln.
    move:it_vbkd-konda to it_final-konda,
         it_vbkd-kdgrp to it_final-kdgrp.
         append it_final.
    endloop  .
    sort it_final by matnr.
    loop at it_final.
    write:/ it_final-vbeln,
         it_final-matnr,
         it_final-erdat,
         it_final-ernam,
          it_final-konda,
         it_final-kdgrp.
    endloop.

  • How to use Read table with out key fields

    Hi Experts,
    I need to retrieve the 2 internal tables data into single table.
    I have 3 common fields between the 2 tables but I don't have the Key fields. Then how to use the read table in this.
    Thanks in Advance.
    Edited by: satish4abap on Mar 10, 2010 9:39 AM

    Hi Satish,
    Key fields are nothing but the common fields with which you can pick the data from the second internal table.
    If you can paste your Internal table fields then we will be able to assit you better.
    However, in genral scenarios you can use it as below :
    In this scenario, we are putting data from 3 internal table to another single internal table.
    LOOP AT T_PRGEN INTO WA_PRGEN.
           WA_FINAL-GUID_PR       = WA_PRGEN-GUID_PR.
           WA_FINAL-ATTR20A       = WA_PRGEN-ATTR20A.
           WA_FINAL-ATTR05A       = WA_PRGEN-ATTR05A.
           WA_FINAL-ATTR05B       = WA_PRGEN-ATTR05B.
           WA_FINAL-ATTR05C       = WA_PRGEN-ATTR05C. " + DG1K902190
           WA_FINAL-ATTR10A       = WA_PRGEN-ATTR10A.
        READ TABLE T_V_TCAV201 INTO WA_V_TCAV201 WITH KEY ATTRV20 = WA_PRGEN-ATTR20A BINARY SEARCH.
        IF SY-SUBRC = 0.
          WA_FINAL-TEXT1   = WA_V_TCAV201-TEXT1.    "SUBID-TEXT1
        ENDIF.
        READ TABLE T_PNTPR INTO WA_PNTPR WITH KEY GUID_PR = WA_PRGEN-GUID_PR BINARY SEARCH.
        IF SY-SUBRC = 0.
           WA_FINAL-PRVSY  = WA_PNTPR-PRVSY.   "PROD NO
           WA_FINAL-GRVSY  = WA_PNTPR-GRVSY.   "LOGICAL SYS GROUP
        ENDIF.
      append wa_final to t_final.
    endloop.

  • Sy-tabix in relation to LOOP AT and READ TABLE

    Hi All,
    As per SAP documentation,
    1) While looping through an internal table (LOOP AT), sy-tabix contains the index number of current row(for standard and sorted tables)
    2)When successfully reading from an internal table(READ TABLE), sy-tabix is set to the index of the result row.
    But what happens when READ TABLE is used while looping through another internal table?
    i.e. Loop at TAB1...
    write sy-tabix.
    READ TABLE TAB2...
    write sy-tabix.
    endloop.
    If we are looping through 1st row of TAB1 and the result of read statement is found in 3rd row of TAB2, I expected that sy-tabix before READ would be 1 and after the READ be 3.
    But, I found that sy-tabix remains unchanged at 1. Can someone expalin why?
    Thanks,
    Jagan

    Hi
    If after reading the table TAB2 the system variable SY-TABIX has still the previous value, that menas the READ TABLE fails or it was read the first record of TAB2.
    After READ TABLE TAB2 try to check the SY-SUBRC:
    LOOP AT TAB1.
       WRITE: / 'TAB1 index:', SY-TABIX.
       READ TABLE TAB2 .........
       IF SY-SUBRC = 0.
         WRITE: 'TAB2 index:', SY-TABIX.
    Try this:
    DATA: BEGIN OF ITAB OCCURS 0,
            FIELD1,
          END   OF ITAB.
    DATA: BEGIN OF ITAB2 OCCURS 0,
            FIELD1,
          END   OF ITAB2.
    DATA: INDEX TYPE I.
    DO 10 TIMES.
      APPEND ITAB.
    ENDDO.
    DO 10 TIMES.
      APPEND ITAB2.
    ENDDO.
    LOOP AT ITAB.
      WRITE: / 'ITAB:', SY-TABIX.
      INDEX = SY-TABIX + 2.
      READ TABLE ITAB2 INDEX INDEX.
      IF SY-SUBRC = 0.
        WRITE:  'ITAB2:', SY-TABIX.
      ENDIF.
    ENDLOOP.
    Max

  • Conflict: READ TABLE itab2 INDEX 1 vs  Modify itab1 from index sy-tabix

    The below simple code is for each itab1 line, create a new itab2 by using select statement, and then grab the max value of field f in itab2 and fill it into a corresponding field in itab1.
    However the statement:
    READ TABLE itab2 into gs_itab1 INDEX 1.
    causes the conflict with our another statement in the end of itab1 loop:
    Modify itab1 from gs_itab1 index sy-tabix.
    that the below Modify statement always modify itab1 at 1st row and also causes an unlimited loop that the program is hung up. Our code looks as the following:
    Loop AT itab1 into gs_itab1.
             use Select statement to fill in itab2...
             SORT itab2 BY f DESCENDING. "f is a field of itab2
             READ TABLE itab2 into gs_itab1 INDEX 1.
             Modify itab1 from gs_itab1 index sy-tabix.
    EndLoop.
    However the last two lines of statements in the itab1 loop causes the program hang!
    Any solution?
    Thanks in advance!

    Hi,
    I got confused while going thru the code...
    according to code
    first u loop itab1 and get tht in gs_itab1 and then a select query to get data from some table and store in itab2.
    Here are u using any where condition, if yes u may probably check aganst gs_itab1 rite? if yes
    first suggestion...why cant u put the select statement above the loop and get all the values to an internal table and then read the internal table in the loop stmt. Yes i can see u r sorting it based on some 'f'..just a suggestion
    Now here can u follow this code...
    Loop AT itab1 ASSIGNING <fs_itab1>,
             use Select statement to fill in itab2...
             SORT itab2 BY f DESCENDING. "f is a field of itab2
             READ TABLE itab2 into <fs_itab1> index 1.
    EndLoop.
    Please let me know if its not ok
    <REMOVED BY MODERATOR>
    Regards,
    ABAPer007
    Edited by: Alvaro Tejada Galindo on Apr 11, 2008 12:26 PM

  • How to get the number of hits ("returned rows") in read table statement

    Hi Experts
    I have the statement shown below, which seems not to work as I would like it to. My problem is that I would like to do two different things depending on weather or not a read table statement results in 0 hits or 1 (or more) hits.
        READ TABLE g_ship_item
            WITH KEY
         l_ztknum = DATA_PACKAGE-/bic/ztknum
         BINARY SEARCH.
          IF sy-subrc is initial.
          no hits found
            DATA_PACKAGE-/BIC/ZSTAGEERR = 1.
          ELSE.
          hits where found and we will do something else...
            DATA_PACKAGE-/BIC/ZSTAGEERR = 0.
    Hope someone can help me out of my problem...
    Thanks in advance, regards
    Torben

    Hi,
    As you are using READ statement with Binary search, check whether the internal table g_ship_item is sorted with field /bic/ztknum or not. If it is not sorted then the result of this READ statement is not correct.
    Below is the correct code.
    sort  g_ship_item by /bic/ztknum.
    READ table g_ship_item with key g_ship_item = xxx.
    Thanks,
    Satya

Maybe you are looking for

  • Square root symbol

    Hi, I need to display square root symbol in sql query. Thanks !!!

  • Adobe Acrobat x Pro 10.0

    We are going to use the Digital signature feature of Adobe Acrobat x pro 10.0 for students' assignment. Once student done their assignments they send their work to their supervisors (internal and external) to comment and sign. If we are going to use

  • How to cancel/reverse an inbound idoc?

    I wish to cancel then reverse an inbound idoc specifically, WPUUMS01 (sales data compressed) as if the idoc never existed and wasn't processed in SAP. The said idoc was already processed in SAP and the material and billing documents (in WPER) were al

  • FM Error: No assignment object determined for P100 / 457000

    Dear GURUS, we are facing the problem while changing the PO and system is giving the error message as CB item 00010: No assignment object determined for P100 / 457000 we checked in FM9K and reconstructed in FMBV and run the report . pl suggest... Mes

  • Need to install ODI studio and ODI sdk(Developer Installation)

    HelloHi every one, Can any one suggest me in brief, how to install them, and also what are the things that I need to do before installing them, And where do I get them. can you give me the brief guidance. configuration:- Windows XP service pack 3 pro