Extracting Custom Hierarchies, with additional filters to restrict data.

I am currently working on extracting custom hierarchies from SAP R/3.
I read a article related to it at
[http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/50cbb737-b36f-2c10-c78b-b63d116ce313?QuickLink=index&overridelayout=true]  authored by Nilesh Ramesh Ahir.
My requirement is slightly different though. Since the extraction takes long time, I need to add few fields to selection screen in data source to restrict the data.
P.S: I tried enhancing the extract structure ROHIEROS, but it cannot be enhanced.
So please guide me on this.

Hello Prakash,
Please check the function module RSSH_HIERARCHY_TRANSFER and see if it helps.
Regards,
Praveen

Similar Messages

  • Custom component with additional tags

    Hi. I need to write complicated custom JSF component.
    I know how to write simple custom components, and receive String variables from tag attributes e.g.
    https://github.com/devalentino/temp/blob/master/src/main/java/net/monopolyclub/components/component/UserData.java
    But now I need to write custom component with additional tags (for example like dataTable and column tags).
    How can I write such component? How can I receive collections in my component? How can I work with additional tags in my component.
    for example I need something like:
    <m:chat>
         <m:tab value="#{UserList}" />
         <m:message value="#{MesageMap}" />
    </m:chat>
    where UserList - Collection with current users and MessageMap is Map with User as key and message as value.

    Iam using pt:ptdata.joincurrcommunitydata
    here is some code
    <pt:ptdata.joincurrcommunitydata pt:id="menutabsjoin" />
    <pt:logic.foreach pt:var="temp2" pt:data="menutabsjoin">
    <span class="CommunityPage">
    <pt:core.html href="$temp2.url" pt:tag="a">
    <pt:core.html pt:tag="img" src="$temp2.img" alt="$temp2.title" border="0" align="absmiddle" height="$temp2.imgheight"      width="$temp2.imgwidth" />
                        <pt:logic.value pt:value="$temp2.title" />
                             </pt:core.html>
                             </span>
                             </pt:logic.foreach>
    But the URL that is generated is not having the CommunityID, hence it errors out saying object not found.
    Any help would be appreciated?
    Thanks
    kartik

  • Customer Clearing with additional open line item

    Dear All,
    Pl. consider the following scenario:
    A customer open line item is created wilth Billing Document/outgoing invoice. Alongwith this one more open line item is generated. Eg Accrued Sales Commission. Now, we need to clear this line item (with Accrued Sales Commission) alongwith the customer whenever the payment is received. We tried to look for enhancement/user exit, but  could not fine one.
    Can you pl. suggest the solution in SAP for the above scenario?
    Thanks & Regards,
    Raja

    Hi,
    If you manually clear customer open items then:
    1) Execute t-code F-32;
    2) Enter customer account, company code and other required fields;
    3) Press "process open items" button;
    4) Press "Res. items" tab;
    5) Select line items that you want to clear;
    6) Simulate it;
    7) Post the document;
    Residual payment  means it clears the  invoce amount for incoming payment.and ceate  line time for remaing outstanding amount.
    If you select "Part payment" tab then the payments that can be posted to an account without open items being cleared.orginal open items (credit invoice amount)and partly payment remains in open item category.
    Cheers!
    Martins

  • Customer Report with Sales Employee and Due date

    Hi,
    I need to configure a report for Customers with Sales Employee & Due date.is there any standard report for this combination in SAP or Do i need to Configure separate report for this.If i need to configure this -kindly help me with some guide lines to prepare this.It would be a great help if you provide some steps to configure this Report.
    Thanks in advance
    Suvarna

    Have you tried the txn code MC-Q or the report program RMCV0500.

  • Customer hierarchies in TCA

    In this project, we are moving from many divisional legacy systems to Oracle R12.  We are modelling a scenario where a customer has a head office but divisions in several countries.  An example could be Wal*Mart.  Wal*Mart has a head office in Bentonville but we sell to Wal*Mart Canada, Wal*Mart USA and others.  Sometimes when reporting sales, we would like to separate the information by country but still be able to consolidate sales at the parent-level.
    One option is to have the head office as a parent party with Wal*Mart Canada, Wal*Mart USA being child parties under it.  Please note most if not all demand will be for the divisions and not the head office.  Standard EBS reports e.g. the Orders Detail Report only provides sales by one customer or a selection of customers.  Ideally, we should be able to show consolidated sales if we report at the head office party level.  However, this means writing a brand new OBIEE report respecting the parent-child hierarchical relationships between the head office and its divisions.
    The other option is to have just one party for Wal*Mart with an account for each division.  If we'd like to report by country, there are standard reports that could be run by Ship-To country.  If consolidated sales is needed, we request information for the Wal*Mart party without specifically filtering by a particular destination.
    We would like your thoughts as to which option is better in the long-term.  It is important as our approach now will determine the future roadmap.
    Thanks,
    Sanjib

    Hi Vikram,
    Before you create a CRM account hierarchy from an ERP customer hierarchy, you first have to:
    1.Perform an initial load of the necessary Customizing settings from SAP ECC to SAP CRM.
    Use the initial load in CRM (transaction R3AS) in CRM Middleware and the Customizing object DNL_CUST_THIT.
    2. Map the ERP customer hierarchy categories to the CRM account hierarchies.
    For more information about mapping, see in the Implementation Guide (IMG) Customer Relationship Management - Master Data- Business Partner - Account Hierarchy - Data Exchange of ERP Customer Hierarchies with SAP CRM - Assign ERP Customer Hierarchy Type to CRM Hierarchy Category.
    3. Download the ERP table KNVH (customer hierarchies) to SAP CRM.
    Use the initial load in SAP CRM (transaction R3AS) with the business object DNL_BUPA_KNVH. A copy of the ERP table KNVH is replicated to SAP CRM to create the account hierarchy from it.
    Please refer below link:
    http://help.sap.com/saphelp_crm60/helpdata/en/a1/2bfc3f37c2e569e10000000a155106/frameset.htm
    Hope this helps!
    Thanks& Regards
    srikanth.naga

  • Interactive Report with additional search filters

    Hi all,
    I want to implement a functionality where I have an interactive report which comes with default Search / Filter option , but I also want to have additional filters which are drop-downs in this case and based on the values selected from the drop-down lists , report displays the values ! How can I implement this functionality where after selecting a value from the drop-down list and then further using interactive report filter to retrieve the results.
    Below is my SQL
    select * from Atoms_FULL
    WHERE (:P6_ANO IS NULL OR ANO = :P6_ANO )
    OR (:P6_ATYPENAME IS NULL OR ATYPENAME = :P6_ATYPENAME)
    When I implemented this , only the interactive report filters are working but not the customized filters WHICH ARE :P6_ANO AND :P6_ATYPENAME (Drop-down Lists)
    I hope I have made the question clear. Let me know if you need any more clarifications.
    Would really appreciate if anyone can help in this issue asap.
    Thanks,
    Rads

    What version of apex are you on?
    You have to set the session state of page items, this can be achieved by adding your items as comma seperated into the Page Items to Submit attribute, This attribute is available under Interactive Report region source, Dynamic Actions etc.
    Thanks,
    Vikram

  • Free goods secquence with customer hierarchie and product hierarchie

    Hi  guru's,
    I'm currently working with a secquency for free goods with customer hierarchie ans product hierarchie, but is giving me a lot of problems of dums ,  I think that SAP standard doesn't allow it because the customicing is diferent than the secquence for pricing that has 2 more fields open: V_T682Z-FSTST and V_T682Z-MBWRT that could allow me to set the levels of the hierarchie. Despite it works with the same table T682Z.
    Has anybody had the same problem as me? Can you help me please.
    Marta Gallego

    Maintain your entries in " Determine Item Category For Free Goods Item"
    For the combination of Order Type-ItemCatgrp(ERLA)-Usage(Free)-Item Category(Tan)
    Lets see if it works for you.

  • Customer Returns with Excise Duties.

    Hi all,
    Can any one explain the steps for Customer Returns with Excise Duties.
    I have sold the Material to customer from Manufacturing Plat to customer.
    Sales Orderm - VA01
    Outbound delivery- VL01N
    Pro forma -  JEX
    Excise Invoice - J1IIN
    Invoice - VF01
    Now customer wants to return the goods with the same Excise Invoice issued from Plant.
    Return Order - VA01
    Inbound Delivery - VL01N
    Now what are the steps to capture the Excise Details..........?
    We are using one more transaction (=/BEV1/SR0) here to keep the goods in to Unrestricted or Blocked stock and it will create Credit memo request automatically.
    so please guide me is this step need to be done before Excise details are captured ?
    It is very urgent to me. please send me the steps for the above mentioned scenario.
    Thanking you.
    Regards
    Jaya

    hi
    create return order in VA01 with order type RE with reference to billing (assign order reason)
    create delivery in VL01N and do PGR
    go to VA02 and remove billing block
    create billing document in VF01 with reference to return order.
    DO EXCISE JV MAIN MENU IN T.CODE J1IH
    SELECT ADDITIONAL EXCISE TAB
    ENTER DELIVERY DOCUMENT NUMBER
    SELECT DETAILS ICON IN THE EXTREEM LEFT OF THE APPLICATION TOOL BAR
    ENTER MATERIAL NUMBER, QUANTITY AND EXCISE DUTY
    SELECT DETERMINE G/L ACCOUNTS AND PRESS CONTINUE AND SAVE IT
    EXTRACT RG23APART2 IN J2I5
    IN PRINT RG23APART2 U CAN C THE OUTPUT
    NOTE MAINTAIN NUMBER RANGES FOR RG23APART2.

  • Data Extraction from hierarchies in BW info-object

    Dear All,
    I have a question here regarding master data extraction from hierarchies from BW info-object.
    we have a info-object called as Customer which is defined in the standalone BW system. under the hierarchies for the customer we have the Channel defined.
    Now I have created 2 info-objects in APO BW for Customer and Channel. channel is defined as an attribute of the customer.
    I am wondering to do I extract data from the Customer info-object in standalone BW to both these charactersitics in APO BW?
    Regards,
    Kedar Agarkar

    Hello Kedar,
    Please open this thread on the SDN Forum "DATA WAREHOUSING".
    I already talked with a BW colleague and he suggested to try there, it seems to be their issue.
    Thanks and regards,
    Michel Bohn
    SCM-APO forum moderator.
    Edited by: Michel Bohn on Mar 28, 2009 12:29 AM

  • Custom comparator with LimitFilter

    When I use a custom comparator with a LimitFilter, the results within the limit are returned first and then the comparator is applied, instead of applying the comparator on the complete result set, and then limit them. Is there a way to achieve the scenario I am expecting?
    Thank is advance

    I am also on coherence version 3.5.2
    1. custom-pof-config.xml:
    <?xml version="1.0"?>
    <!DOCTYPE pof-config SYSTEM "pof-config.dtd">
    <pof-config>
         <user-type-list>
              <include>coherence-pof-config.xml</include>
              <user-type>
                   <type-id>2001</type-id>
                   <class-name>com.biperf.cache.example.CacheItem</class-name>
              </user-type>
              <user-type>
                   <type-id>2002</type-id>
                   <class-name>com.biperf.cache.example.CacheSubItem1</class-name>
              </user-type>
              <user-type>
                   <type-id>2003</type-id>
                   <class-name>com.biperf.cache.example.CacheSubItem2</class-name>
              </user-type>
              <user-type>
                   <type-id>2004</type-id>
                   <class-name>com.biperf.cache.example.CustomFilter1</class-name>
              </user-type>
              <user-type>
                   <type-id>2005</type-id>
                   <class-name>com.biperf.cache.example.CustomComparator1</class-name>
              </user-type>
              <user-type>
                   <type-id>2006</type-id>
                   <class-name>com.biperf.cache.example.CustomProcessor1</class-name>
              </user-type>
         </user-type-list>
         <allow-interfaces>true</allow-interfaces>
         <allow-subclasses>true</allow-subclasses>
    </pof-config>2. Domain objects:
    public class CacheItem extends AbstractEvolvable implements EvolvablePortableObject, java.io.Serializable, com.tangosol.io.pof.PortableObject
      private static final int VERSION = 1;
      private static final long serialVersionUID = -1L;
      private long cacheItemId;
      private Set<CacheSubItem1> item1 = new HashSet<CacheSubItem1>();
      private Set<String> item2 = new HashSet<String>();
      private Set<Long> item3 = new HashSet<Long>();
      public long getCacheItemId()
        return cacheItemId;
      public void setCacheItemId( long cacheItemId )
        this.cacheItemId = cacheItemId;
      public Set<CacheSubItem1> getItem1()
        return item1;
      public void setItem1( Set<CacheSubItem1> item1 )
        this.item1 = item1;
      public Set<String> getItem2()
        return item2;
      public void setItem2( Set<String> item2 )
        this.item2 = item2;
      public Set<Long> getItem3()
        return item3;
      public void setItem3( Set<Long> item3 )
        this.item3 = item3;
      @SuppressWarnings( "unchecked" )
      @Override
      public void readExternal( PofReader reader ) throws IOException
        cacheItemId = reader.readLong( 0 );
        item1 = (Set<CacheSubItem1>)reader.readCollection( 1, item1 );
        item2 = (Set<String>)reader.readCollection( 2, item2 );
        item3 = (Set<Long>)reader.readCollection( 3, item3 );
      @Override
      public void writeExternal( PofWriter writer ) throws IOException
        writer.writeLong( 0, cacheItemId );
        writer.writeCollection( 1, item1 );
        writer.writeCollection( 2, item2 );
        writer.writeCollection( 3, item3 );
      @Override
      public int getImplVersion()
        return VERSION ;
    public class CacheSubItem1 extends AbstractEvolvable implements EvolvablePortableObject, java.io.Serializable, com.tangosol.io.pof.PortableObject
      private static final int VERSION = 1;
      private static final long serialVersionUID = -1L;
      private Map<Integer, CacheSubItem2> item1 = new HashMap<Integer, CacheSubItem2>();
      public Map<Integer, CacheSubItem2> getItem1()
        return item1;
      public void setItem1( Map<Integer, CacheSubItem2> item1 )
        this.item1 = item1;
      @SuppressWarnings( "unchecked" )
      @Override
      public void readExternal( PofReader reader ) throws IOException
        item1 = (Map<Integer, CacheSubItem2>)reader.readMap( 0, item1 );
      @Override
      public void writeExternal( PofWriter writer ) throws IOException
        writer.writeMap( 0, item1 );
      @Override
      public int getImplVersion()
        return VERSION ;
    public class CacheSubItem2 extends AbstractEvolvable implements EvolvablePortableObject, java.io.Serializable, com.tangosol.io.pof.PortableObject
      private static final int VERSION = 1;
      private static final long serialVersionUID = -1L;
      private int value;
      private boolean flag;
      public int getValue()
        return value;
      public void setValue( int value )
        this.value = value;
      public boolean isFlag()
        return flag;
      public void setFlag( boolean flag )
        this.flag = flag;
      @Override
      public void readExternal( PofReader reader ) throws IOException
        value = reader.readInt( 0 );
        flag = reader.readBoolean( 1 );
      @Override
      public void writeExternal( PofWriter writer ) throws IOException
        writer.writeInt( 0, value );
        writer.writeBoolean( 1, flag );
      @Override
      public int getImplVersion()
        return VERSION ;
    public class CustomComparator1 implements java.io.Serializable, Comparator<CacheItem>, com.tangosol.io.pof.PortableObject
      private static final long serialVersionUID = -1L;
      private int sortOrder = 1 ;
      private Integer key ;
      public CustomComparator1(){}
      public CustomComparator1( Integer key )
        this.key = key ;
      @Override
      public int compare( CacheItem item1, CacheItem item2 )
        return sortOrder * ( getValue( item1 ).compareTo( getValue( item2 ) )  ) ;
      private Integer getValue( CacheItem item )
        int value = item.getItem1().iterator().next().getItem1().get( key ).getValue() ;
        return new Integer( value ) ;
      @Override
      public void readExternal( PofReader reader ) throws IOException
        sortOrder = reader.readInt( 0 ) ;
        key = reader.readInt( 1 ) ;
      @Override
      public void writeExternal( PofWriter writer ) throws IOException
        writer.writeInt( 0, sortOrder ) ;
        writer.writeInt( 1, key ) ;
      public void setAscendingOrder()
        sortOrder = 1 ;
      public void setDescendingOrder()
        sortOrder = -1 ;
    public class CustomFilter1 implements Filter, java.io.Serializable, com.tangosol.io.pof.PortableObject
      private static final long serialVersionUID = -1L;
      private Integer key = null ;
      public CustomFilter1(){}
      public CustomFilter1( Integer key )
        super() ;
        this.key = key ;
      @Override
      public boolean evaluate( Object item )
        for( CacheSubItem1 subItem1: ((CacheItem)item).getItem1() )
          CacheSubItem2 subItem2 = subItem1.getItem1().get( key );
          if(null!=subItem2){
            return true ;
        return false ;
      @Override
      public void readExternal( PofReader reader ) throws IOException
        key = reader.readInt( 0 ) ;
      @Override
      public void writeExternal( PofWriter writer ) throws IOException
        writer.writeInt( 0, key ) ;
    public class CustomProcessor1 extends AbstractProcessor implements PortableObject
      private static final long serialVersionUID = -1L;
      private Integer key ;
      private Set<String> item2s = new HashSet<String>();
      public CustomProcessor1(){}
      public CustomProcessor1( Integer key, Set<String> item2s )
        this.key = key ;
        this.item2s = item2s ;
      @Override
      public Object process( com.tangosol.util.InvocableMap.Entry entry )
        if ( !entry.isPresent() )
          return null ;
        CacheItem item = (CacheItem)entry.getValue() ;
        return extract( item ) ;
      public CacheItem extract( CacheItem item )
        CacheItem extract = new CacheItem() ;
        extract.setCacheItemId( item.getCacheItemId() );
        Set<CacheSubItem1> item1s = item.getItem1() ;
        for( CacheSubItem1 item1: item1s )
          extract.getItem1().add( getExtractedItem1( item1 ) ) ;
        for( String item2: item2s )
          if( item.getItem2().contains( item2 ) )
            extract.getItem2().add( item2 );
        return extract ;
      private CacheSubItem1 getExtractedItem1( CacheSubItem1 hydrated )
        CacheSubItem1 extracted = new CacheSubItem1() ;
        extracted.getItem1().put( key, hydrated.getItem1().get( key ) ) ;
        return extracted ;
      public Integer getKey()
        return key;
      public void setKey( Integer key )
        this.key = key;
      public Set< String > getItem2s()
        return item2s;
      public void setItem2s( Set< String > item2s )
        this.item2s = item2s;
      @SuppressWarnings( "unchecked" )
      @Override
      public void readExternal( PofReader reader ) throws IOException
        key = reader.readInt( 0 ) ;
        item2s = (Set<String>)reader.readCollection( 1, item2s );
      @Override
      public void writeExternal( PofWriter writer ) throws IOException
        writer.writeInt( 0, key ) ;
        writer.writeCollection( 1, item2s );
    }3. Cache data loader:
    public class CacheDataLoader
      public static final String BASE_ITEM2_KEY = "12345678901234567890";
      public static final char[] VALID_CHARS =
      {'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'J',
      'K', 'L', 'M', 'N', 'P', 'Q', 'R', 'T', 'U',
      'V', 'W', 'X', 'Y', 'Z', '1', '2', '3', '4',
      '5', '6', '7', '8', '9', '0'} ;
      public static final int NUMBER_OF_ITEM2 = 1000 ;
      public static final int NUMBER_OF_ITEM3 = 1000 ;
      public static final int NUMBER_OF_ITEM = 20000;
      public static final int BATCH_LOAD_SIZE = 10000 ;
      public static final int NUMBER_OF_KEYS_PER_SUBITEM1 = 50;
      public static final int MULITPLE_ITEM1_FREQUENCY = 1000 ;
      public static final int NUMBER_OF_MULTIPLE_ITEM1 = 1;
      public static final int MULITPLE_ITEM2_FREQUENCY = 2;
      public static final int NUMBER_OF_MULTIPLE_ITEM2 = 3;
      public static final int MULITPLE_ITEM3_FREQUENCY = 2;
      public static final int NUMBER_OF_MULTIPLE_ITEM3 = 5;
      public static final long BASE_CACHE_ITEM_KEY = 10000000 ;
      public static final long BASE_ITEM3_KEY = 10000000;
      private long item3Count = 0;
      private long item2Count = 0;
      private long cacheItemCount = 0;
      private NamedCache cache = CacheFactory.getCache( "cache-data" ) ;
      public static void main( String[] args )
        CacheDataLoader loader = new CacheDataLoader() ;
        loader.load() ;
        loader.createIndices() ;
      private void createIndices()
        cache.addIndex( new KeyExtractor( IdentityExtractor.INSTANCE ), false, null );
        cache.addIndex( new ReflectionExtractor( "getItem2" ), false, null );
        cache.addIndex( new ReflectionExtractor( "getItem3" ), false, null );
      private void load()
        long start = System.currentTimeMillis();
        cache.clear();
        int iterations = NUMBER_OF_ITEM/BATCH_LOAD_SIZE ;
        for ( int i=0;i<iterations; i++ )
          cache.putAll( getCacheItems( BATCH_LOAD_SIZE ) );
        System.out.println( "CACHE LOAD: Instances: " + cache.size() + " keysize: " + NUMBER_OF_KEYS_PER_SUBITEM1 + " Time: " + ( System.currentTimeMillis() - start ) );
      private Map<Long, CacheItem> getCacheItems( int loadSize )
        Map<Long, CacheItem> cacheItems = new HashMap<Long, CacheItem>() ;
        for( int i=0; i<loadSize; i++)
          CacheItem cacheItem = getCacheItem();
          cacheItems.put( cacheItem.getCacheItemId(), cacheItem ) ;
        return cacheItems ;
      private CacheItem getCacheItem()
        CacheItem cacheItem = new CacheItem();
        cacheItem.setCacheItemId( getNextCacheItemId() );
        cacheItem.setItem1( getItem1() ) ;
        cacheItem.setItem2( getItem2() );
        cacheItem.setItem3( getItem3() );
        return cacheItem;
      private Set<Long> getItem3()
        Set<Long> item3s = new HashSet<Long>() ;
        //First item3
        item3s.add( getNextItem3Id() ) ;
        //Additional item3s
        if( isAdditionalItem3Required() )
          for(int i=0; i<NUMBER_OF_MULTIPLE_ITEM3; ++i){
            item3s.add( getNextItem3Id() ) ;
        return item3s;
      private Set<String> getItem2()
        Set<String> item2s = new HashSet<String>() ;
        //First item2
        item2s.add( getNextItem2Id() ) ;
        //Additional item2s
        if( isAdditionalItem2Required() )
          for(int i=0; i<NUMBER_OF_MULTIPLE_ITEM2; ++i){
            item2s.add( getNextItem2Id() ) ;
        return item2s;
      private Set<CacheSubItem1> getItem1()
        Set<CacheSubItem1> item1s = new HashSet<CacheSubItem1>() ;
        //First item1
        item1s.add( getSubItem1() ) ;
        //Additional item1s
        if( isAdditionalItem1Required() )
          for(int i=0; i<NUMBER_OF_MULTIPLE_ITEM1; ++i){
            item1s.add( getSubItem1() ) ;
        return item1s;
      private CacheSubItem1 getSubItem1()
        CacheSubItem1 item = new CacheSubItem1() ;
        item.setItem1( getSubItemMap( NUMBER_OF_KEYS_PER_SUBITEM1 ) ) ;
        return item;
      private Map<Integer, CacheSubItem2> getSubItemMap( int numberPriceKeys )
        Map<Integer, CacheSubItem2> items = new HashMap<Integer, CacheSubItem2>();
        for ( int x = 0; x < numberPriceKeys; x++ )
          Integer key = x;
          items.put( key, getSubItem2() );
        return items;
      private CacheSubItem2 getSubItem2()
        CacheSubItem2 item = new CacheSubItem2() ;
        item.setFlag( RandomUtils.nextBoolean() ) ;
        item.setValue( getRandomValue() ) ;
        return item;
      private boolean isAdditionalItem1Required()
        return cacheItemCount%MULITPLE_ITEM1_FREQUENCY == 0;
      private boolean isAdditionalItem2Required()
        return cacheItemCount%MULITPLE_ITEM2_FREQUENCY == 0;
      private boolean isAdditionalItem3Required()
        return cacheItemCount%MULITPLE_ITEM3_FREQUENCY == 0;
      private long getNextCacheItemId()
        return BASE_CACHE_ITEM_KEY + (++cacheItemCount);
      private long getNextItem3Id()
        return BASE_ITEM3_KEY + (++item3Count%NUMBER_OF_ITEM3);
      private String getNextItem2Id()
        return BASE_ITEM2_KEY + (++item2Count%NUMBER_OF_ITEM2);
      private int getRandomValue()
        return RandomUtils.nextInt( 10000 ) ;
    }4. Test Case:
    public class TestExampleCache extends TestCase
      public void testLimitFilter1()
        final Integer key = getKey();
        Set<String> item2 = getItem2();
        Set<Long> item3 = getItem3();
        CustomComparator1 comparator = new CustomComparator1(key);
        comparator.setAscendingOrder();
        Filter[] filterArray = { new ContainsAnyFilter( "getItem2", item2 ),
                                 new ContainsAnyFilter( "getItem3", item3 ),
                                 new CustomFilter1( key ) };
        Filter allFilter = new AllFilter( filterArray ) ;
        CustomProcessor1 processor = new CustomProcessor1(key,item2);
        Set<Map.Entry<Long, CacheItem>> result1 = CacheFactory.getCache( "cache-data" ).entrySet( allFilter,comparator );
        for(Map.Entry<Long, CacheItem> entry : result1 ){
          CacheItem item = processor.extract( entry.getValue() );
          System.out.println(item.getCacheItemId()+"-"+item.getItem1().iterator().next().getItem1().values().iterator().next().getValue());
        System.out.println();
      public void testLimitFilter2()
        final Integer key = getKey();
        final int numberOfProducts = 10;
        Set<String> item2 = getItem2();
        Set<Long> item3 = getItem3();
        CustomComparator1 comparator = new CustomComparator1(key);
        comparator.setAscendingOrder();
        Filter[] filterArray = { new ContainsAnyFilter( "getItem2", item2 ),
                                 new ContainsAnyFilter( "getItem3", item3 ),
                                 new CustomFilter1( key ) };
        Filter allFilter = new AllFilter( filterArray ) ;
        LimitFilter limitFilter = new LimitFilter(allFilter, numberOfProducts);
        CustomProcessor1 processor = new CustomProcessor1(key,item2);
        Set<Map.Entry<Long, CacheItem>> result1 = CacheFactory.getCache( "cache-data" ).entrySet( limitFilter,comparator );
        for(Map.Entry<Long, CacheItem> entry : result1 ){
          CacheItem item = processor.extract( entry.getValue() );
          System.out.println(item.getCacheItemId()+"-"+item.getItem1().iterator().next().getItem1().values().iterator().next().getValue());
        System.out.println();
        limitFilter.nextPage();
        Set<Map.Entry<Long, CacheItem>> result2 = CacheFactory.getCache( "cache-data" ).entrySet( limitFilter,comparator );
        for(Map.Entry<Long, CacheItem> entry : result2 ){
          CacheItem item = processor.extract( entry.getValue() );
          System.out.println(item.getCacheItemId()+"-"+item.getItem1().iterator().next().getItem1().values().iterator().next().getValue());
      private Integer getKey()
        return new Integer(10);
      private Set<String> getItem2()
        Set<String> items = new HashSet<String>();
        items.add( "12345678901234567890" + 1 );
        items.add( "12345678901234567890" + 2 );
        items.add( "12345678901234567890" + 3 );
        items.add( "12345678901234567890" + 4 );
        items.add( "12345678901234567890" + 5 );
        items.add( "12345678901234567890" + 6 );
        items.add( "12345678901234567890" + 7 );
        items.add( "12345678901234567890" + 8 );
        items.add( "12345678901234567890" + 9 );
        items.add( "12345678901234567890" + 10 );
        items.add( "12345678901234567890" + 11 );
        items.add( "12345678901234567890" + 12 );
        return items;
      private Set<Long> getItem3()
        Set<Long> items = new HashSet<Long>();
        items.add( new Long(10000001) );
        items.add( new Long(10000002) );
        items.add( new Long(10000003) );
        items.add( new Long(10000004) );
        items.add( new Long(10000005) );
        items.add( new Long(10000006) );
        items.add( new Long(10000007) );
        items.add( new Long(10000008) );
        items.add( new Long(10000009) );
        items.add( new Long(10000010) );
        return items;
    }5. Results:
    a. testLimitFilter1()
    10010001-109
    10002002-121
    10002004-487
    10006003-726
    10008004-762
    10000004-845
    10010003-922
    10014003-1157
    10012002-1426
    10008002-1585
    10002003-1709
    10004004-2004
    10004001-2179
    10018002-2452
    10016004-3073
    10012004-3145
    10008001-3249
    10018001-3270
    10008003-3319
    10016002-3778
    10012001-4256
    10012003-4391
    10002001-4921
    10006002-5072
    10000002-5162
    10016003-5777
    10014004-6068
    10000001-6260
    10000003-6373
    10004002-6615
    10014001-7679
    10006001-7729
    10006004-7794
    10010002-8188
    10010004-8215
    10018004-8258
    10016001-8383
    10018003-8760
    10004003-9652
    10014002-9876
    b. testLimitFilter2()
    Page-1
    10002004-487
    10000004-845
    10012002-1426
    10008002-1585
    10004004-2004
    10018001-3270
    10016003-5777
    10006004-7794
    10016001-8383
    10018003-8760
    Page-2
    10018002-2452
    10008001-3249
    10008003-3319
    10016002-3778
    10012001-4256
    10012003-4391
    10014004-6068
    10000003-6373
    10010002-8188
    10010004-8215
    c. Expected results:
    Page-1
    10010001-109
    10002002-121
    10002004-487
    10006003-726
    10008004-762
    10000004-845
    10010003-922
    10014003-1157
    10012002-1426
    10008002-1585
    Page-2
    10002003-1709
    10004004-2004
    10004001-2179
    10018002-2452
    10016004-3073
    10012004-3145
    10008001-3249
    10018001-3270
    10008003-3319
    10016002-3778
    Edited by: user8065775 on Oct 21, 2009 3:02 PM
    PS : Looks like the following thread addresses the problem that I have mentioned, which has links to download the source code but they do not work. Is there a way that I can access the java source pointed to in the post pointed to by the following link?
    Re: The question about the locking of the cache
    SortByMethodNameAggregator.java
    SortByMethodNameCaller.java
    Can you please email me the code to [email protected]

  • Extract open reservation (with open demand in MRP)

    Dear PP experts,
    Would you know how we can extract a list of open reservations (ie. with demand still visible in MRP) ? We essentially manage sales orders, production orders, services orders and PIRs. We were able to extract open reservation for production orders using various criteria on RESB table (eg. bulk material blank, final issue blank, etc...). However criteria for services orders are differents...
    Is there any MRP related table which provide this information? Or would you have some hints to accomplish this. My customer want to be able to extract a basic list for sanity review.
    Thanks in advance for your help,
    BR,
    Francois Paquet BA

    Hi,
    I can think of 2 options:
    1. Use report - MB25, to get a list of material reservations. In the scope of list you can check open reservations. Also there are other selection options with which you can restrict the data read, check the same.
    2. Build a Z report using FM - MD_STOCK_REQUIREMENTS_LIST_API this would give the same info as MD04 & you can then have custom input & output fields as per your business need.
    Adopt the one which best suits your need.
    Regards,
    Vivek

  • Migration of customer Hierarchies

    Hello
    I am trying to create customer hierarchies within version 46c but cannot get the BAPI
    'BAPI_CUSTOMER_HIERARCHIE_INS' to insert the customer to the hierarchie nodes.
    It will work fine manually using VDH1N - I tried to use the record function in LSMW using VDH1N and VDH1 (this one created the link if there was only 1 relationship).
    I have approximately 2000 customers to link to the hierarchy nodes.
    anyone got any ideas.  or is there another way to do it?
    cheers
    Nick

    I am running the BAPI through the se37 in test mode and with the additional fileds you mention ... why i think that it is the type is that i get no errors in the return structure and the hierachy is not updated / inserted. I have debugged the BAPI and in 2 places but have not found any clues.
    Although I have 5 years data migration and abap experience .. this is the first time i have tried to create hierarchies!  I will get the config guys to check the type again.
    thanks for you help so far.

  • FPBW: Extract Open Items with a posting date in the future

    Dear all,
    I'm are currently searching for possibilities to extract Open Items with a posting date in the future from SAP IS-U 4.72 into SAP BW 3.5.
    Currently I'm using the Business Content extractor 0FC_OP_01 together with the mass transaction FPBW in IS-U.
    The problem I'm facing is within the mass transaction FPBW. I've have set the key date at 01.11.2007, but this job already runs for 52.000 seconds on the same database select-statement.
    Does anybody know a possible solution to improve the performance of the statement below? (I pasted it from the process overview)
    ================================
    SELECT
    /*+
      INDEX("DFKKOP" "DFKKOP~1" "DFKKOP^1" "DFKKOP____1" "DFKKOP____1__X" "DFKKOP_1")
      "BETRH" , "BETRW" , "BUDAT" , "BUKRS" , "FAEDN" , "GPART" , "GSBER" , "INKPS" , "SPART" , "VKONT" ,
      "WAERS" , "MAHNV" , "ABWBL" , "APPLK" , "AUGBD" , "AUGBL" , "AUGBT" , "AUGDT" , "AUGRD" , "AUGST" ,
      "AUGWA" , "BLART" , "BLDAT" , "EMGPA" , "GRKEY" , "HVORG" , "MANSP" , "MWSKZ" , "OPBEL" , "OPSTA" ,
      "OPUPK" , "PERSL" , "PYMET" , "QSSHB" , "SBETW" , "SPZAH" , "STUDT" , "TVORG" , "VTREF" , "XBLNR" ,
      "XMANL" , "HKONT" , "OPUPZ" , "OPUPW" , "STAKZ" , "WHGRP" , "AUGBS" , "XANZA" , "XRAGL" , "ABWTP" ,
      "ASTKZ"
    FROM
      "DFKKOP"
    WHERE
      "MANDT" = :A0 AND "AUGST" = :A1 AND "GPART" BETWEEN :A2 AND :A3 AND ( "AUGDT" = :A4 OR "AUGDT" > :A5
      AND ( "BUDAT" <= :A6 OR "AUGBD" <= :A7 ) OR "WHGRP" <> :A8 AND "OPUPW" = :A9 )
    ORDER BY
      "AUGST" , "GPART"#
    =================================
    I have already tried to create an index on the following fields (in the same order):
    - MANDT           Client
    - AUGST           Clearing status
    - GPART           Business Partner Number
    - AUGDT           Clearing date
    - BUDAT           Posting Date in the Document
    Any help would be appreciated!
    Thanks in advance,
    Steven Groot

    Hi Marcos,
    When you have created the Restricted keyfigures for Open Items, You have to add the date characteristic on which you are looking open item and add the variable there.Here you have to use a variable of type Interval and select the operator "<" the date of the Variable.If you go through, there are standard variable for keydate, which you can use directly.
    Hope you got the idea
    Regards
    Happy Tony

  • Customization of "Positive Pay file with additional parameters"  template

    Hi,
    We've a requirement to customize the eText template of the Positive Pay file with additional parameters report. The setup is done , now the program is picking up the new format. Since the payments involves multilines hierarchy, we are unable to print the data in the hierarchical format. Our requirement is to print a Header with information like BankAccountNumber,Total Amount in Dollars , Total number of lines. And Detail segment with all the infomation like BankNumber, BankAccount Number, Amount, Print 'V' if the check is voided etc. please let me know how to achieve this format in eText.
    Thanks
    Elan

    Did you introduce a new LEVEL for the detail info?
    Refer user guide on the syntax of usage.

  • Using a custom tag with a 2.3 servlet descriptor BUG?

    Hi,
    I just developed a Custom Tag and I'd like to use in my jsps.
    If I add the jsp in my JDev project with the custom tag when I try to build the project I got this error:
    Error(11): oracle.xml.parser.v2.XMLParseException: Invalid element 'listener' in content of 'web-app', expected elements '[context-param, servlet, servlet-mapping, session-config, mime-mapping, welcome-file-list, error-page, taglib, resource-ref, security-constraint, login-config, security-role, env-entry, ejb-ref]'.
    It seems like when the jsp parser encounters the line with taglib it tries to parse the web.xml against a 2.2 version of the dtd. My web.xml begins with the correct dtd version (2.3). Can anyone tell me if this is a bug and eventually tell me how to solve it?
    thanks,
    Giovanni

    I repost this issue again, now with a simple test case.
    If I wrote a simple custom tag:
    import java.io.IOException;
    import javax.servlet.jsp.tagext.TagSupport;
    public class MyCustomTag extends TagSupport {
    public int doStartTag() {
    try {
    pageContext.getOut().print("FOO");
    } catch (IOException ioe) {
    pageContext.getServletContext().log(ioe.getMessage(),ioe);
    return(SKIP_BODY);
    with the associated tld:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <taglib>
    <tlibversion>1.0</tlibversion>
    <jspversion>1.2</jspversion>
    <shortname>try</shortname>
    <uri>try</uri>
    <info>A short description...</info>
    <tag>
    <name>mytag</name>
    <tagclass>MyCustomTag</tagclass>
    <bodycontent>EMPTY</bodycontent>
    </tag>
    </taglib>
    and a jsp using the custom tag:
    <%@ page contentType="text/html;charset=windows-1252"%>
    <HTML>
    <HEAD>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
    <TITLE>
    Hello World
    </TITLE>
    </HEAD>
    <BODY>
    <H2>
    The current time is:
    </H2>
    <P>
    <% out.println((new java.util.Date()).toString()); %>
    <%@ taglib uri="try.tld" prefix="try" %>
    <try:mytag />
    </P>
    </BODY>
    </HTML>
    all runs fine if I have a web.xml with the dtd version 2.2
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
    <web-app>
    <description>Empty web.xml file for Web Application</description>
    <session-config>
    <session-timeout>30</session-timeout>
    </session-config>
    <mime-mapping>
    <extension>html</extension>
    <mime-type>text/html</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>txt</extension>
    <mime-type>text/plain</mime-type>
    </mime-mapping>
    <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>index.html</welcome-file>
    </welcome-file-list>
    </web-app>
    but if I use the version 2.3 because I want filters,context listeners and so on:
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/j2ee/dtds/web-app_2_3.dtd">
    <web-app>
    <description>Empty web.xml file for Web Application</description>
    <filter>
    <filter-name>FilterRedirector</filter-name>
    <filter-class>org.apache.cactus.server.FilterTestRedirector</filter-class>
    </filter>
    <!-- Filter Redirector URL mapping -->
    <filter-mapping>
    <filter-name>FilterRedirector</filter-name>
    <url-pattern>/FilterRedirector/</url-pattern>
    </filter-mapping>
    <session-config>
    <session-timeout>30</session-timeout>
    </session-config>
    <mime-mapping>
    <extension>html</extension>
    <mime-type>text/html</mime-type>
    </mime-mapping>
    <mime-mapping>
    <extension>txt</extension>
    <mime-type>text/plain</mime-type>
    </mime-mapping>
    <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>index.html</welcome-file>
    </welcome-file-list>
    </web-app>
    I get the error I report in my last post. (the jsp doesn't compile) If I remove the custom tag from my jsp all works fine (filters, listeners,etc). In my project settings I use the 2.3 version of servlet.jar instead of the ServletRuntime that comes with JDeveloper.
    Can anyone tell me how to resolve this issue (Using simple custom tag with a web application using the 2.3 servlet specs)?
    Thanks in advance,
    Giovanni
    If I remove the filter secion all

Maybe you are looking for