A class of a different type

If I have Two classes, Class Student, and Class UnderGrad
I declare:
Student stud =  new UnderGrad();     What does this mean, can stud use all of the methods in Student, Undergrad, or both?
How is this useful?
Thank You

Sort of. Say you've got a bunch of different types of students (undergrads, postdocs, highschoolers, whatever) and you want to store them all in an array. You could do something like: Student[] eng101class=new Student[20];
eng101class[0]=new UnderGrad("Alice");
eng101class[1]=new PostDoc("Bill");
eng101class[2]=new HighSchooler("Carl");...and so on. Basically, any time a variable can be one of multiple subclasses, you'll want to declare it as its superclass. You can then use instanceof to determine which subclass it is.

Similar Messages

  • Layer 7 class-map with different match types

    Hello,
    I am fighting with a problem on an ACE-4710 version A3(2.4) configuation. I just want to configure a layer 7 class-map that matches if one of two conditions is true. The problem is that these conditions are not from the same type and the ACE refuses the second match statement. However, in the configuration guide, it is clearly defined that it should be possible :
    Here is what the configuration guides says :
    host1/Admin(config)# class-map type http loadbalance match-any CLASS3
    host1/Admin(config-cmap-http-lb)# 100 match http url .*.gif
    host1/Admin(config-cmap-http-lb)# 200 match http header Host header-value XYZ
    host1/Admin(config-cmap-http-lb)# exit
    If I test exactly the same configuration in a context of my ACE, I receive an error message :
    CH01AC03/P-104-A(config)# class-map type http loadbalance match-any CLASS3
    CH01AC03/P-104-A(config-cmap-http-lb)# 100 match http url .*.gif
    CH01AC03/P-104-A(config-cmap-http-lb)# 200 match http header Host header-value XYZ
    Error: Match-any classmap can not have different type of match
    If I use nested class-maps, I receive the same error message !
    Is it a known problem or is it a solution for it ?
    Thank you for any help
    Yves

    Hello Yves,
    The command error is correct.  I'll take a look at the docs and see about getting them corrected, if necessary.
    Basically, for a match-all, you would have to use different types.  For example, there will only be one Host header, so you would only specify it once using regex or a fixed string.  As you found out, the match-any requires that they all be of the same type.  See my example below:
    class-map type http loadbalance match-all HEADER-AND-URL
      100 match http url /login.*
      200 match http header Host header-value "XYZ"
    class-map type http loadbalance match-any URLS
      100 match http url .*\.gif
      200 match http url .*\.jpg
    class-map type http loadbalance match-any HEADER
      200 match http header Host header-value "CISCO"
    policy-map type loadbalance first-match SLB_LOGIC
      class HEADER-AND-URL
        serverfarm LOGIN-FARM
      class URLS
        serverfarm IMAGES-FARM
      class HEADER
        serverfarm CISCO-FARM
      class class-default
        serverfarm WWW-FARM
    So let's say you want to match requests for URLs ending in .jpg or for requests with Host header XYZ, and if it matches either one, then send to the same serverfarm.
    class-map type http loadbalance match-any URL-JPG
      2 match http url .*\.jpg
    class-map type http loadbalance match-any HOST-XYZ
      2 match http header Host header-value "XYZ"
    policy-map type loadbalance first-match SLB_LOGIC
      class URL-JPG
        serverfarm SERVER-FARM
      class HOST-XYZ
        serverfarm SERVER-FARM
    If you wanted to send these requests to the farm only if they matched BOTH matches, then you could do it as follows:
    class-map type http  loadbalance match-all HEADER-AND-URL
       100 match http url /login.*
       200 match http header Host header-value "XYZ"
    policy-map type  loadbalance first-match SLB_LOGIC
       class HEADER-AND-URL
         serverfarm LOGIN-FARM
    Hope this helps,
    Sean

  • Sample CLASSES for different types of OIM components!!!

    Hi Experts
    Can any one provide me sample classes for different types of OIM components, adapters, scheduled tasks, etc. with your best practices for OIM java development and documentation? It would Help me lot.
    Please let us know Links/Documentations.
    Thanks
    \oim_user

    for schedulers
    1. Create a java class that extends the SchedulerBaseTask (see example below)
    2. Write your business logic
    3. Compile and jar
    4. Place the jar in the ScheduleTask directory in your OIM install
    5. Create a new scheduled task using the OIM developer console
    6. link in the new class into your new scheduled task.
    7. Done!
    Example code for a scheduled task:
    import com.thortech.xl.scheduler.tasks.SchedulerBaseTask;
    public class ScheduledtaskExample extends SchedulerBaseTask {
    public void init()
    //this method is run before execute by the scheduler
    public void execute() {
    //is executed by the scheduler
    runMyBusinessLogic();
    private void runMyBusinessLogic(){
    //place your business logic here
    }

  • Plz tell me about  different types of derived classes used in Java program

    i wan't to learn about different types of derived classes used in Java programming

    cool down bro i am new here i don't how it works
    here.well i will try to be specific frm now on. thank
    anywaysIt's not about "how things work here". The same is true for anything in life. How do you expect anyone to give you an answer when you cannot give a clear description.
    You: "My car sorta ya know don't work. Canya sorta ya know fix it"
    Mechanic:"WTF?"

  • While running my app I get the below error  - have different Class objects for the type javax/servlet/http/HttpServletRequest used in the signature

    I am running ATG[10.1.2] app on Jboss [EAP 5.1.0 GA] I am able to open dyn/admin however when I start my app I get the below error
    java.lang.LinkageError: loader constraint violation: when resolving method "atg.servlet.ServletUtil.setSessionConfNumCacheRequest(Ljavax/servlet/http/HttpServletRequest;)Ljavax/servlet/http/HttpServletRequest;" the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) of the current class, atg/filter/dspjsp/PageFilter, and the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) for resolved class, atg/servlet/ServletUtil, have different Class objects for the type javax/servlet/http/HttpServletRequest used in the signature
      at atg.filter.dspjsp.PageFilter.doFilter(PageFilter.java:215)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at atg.servlet.ForwardFilter.doFilter(ForwardFilter.java:263)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at atg.servlet.ErrorFilter.doFilter(ErrorFilter.java:279)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:638)
      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:446)
      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:382)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:310)
      at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:416)
      at org.apache.catalina.core.StandardHostValve.status(StandardHostValve.java:342)
      at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:286)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      at java.lang.Thread.run(Thread.java:680)
    11:22:47,413 ERROR [[localhost]] Exception Processing ErrorPage[errorCode=500, location=/global/errorPage500.jsp]

    The supported JBoss version for 10.1.2 is JBoss EAP 5.1.2 but I don't think that your issue is caused because of this. Your issue is more of an environmental thing as you are probably getting two different versions getting loaded of class javax.servlet.http.HttpServletRequest and so correspondingly two different Class objects as the error shows. One reason for this could be if you include any server-specific libraries (in present case the Servlet API JAR which contains the class javax.servlet.http.HttpServletRequest) of a different version in the /WEB-INF/lib of your web application. Try removing it from there if so and see if that helps.

  • How to shift valuation class from one material type to another material type ?

    I have came across following weird scenario:
    We already created huge no.of materials of material type say ZABC with two valuation classes say 1100 and 1200(GL accounts for these VCs for different posting keys in OBYC settings are same). Account category reference for this material type is 0010.
    After that we created new material type say ZPQR  with new Account category reference 0025, and valuation class 1200 is linked with this ACR 0025. Because of this, valuation class 1200 disappeared from material type ZABC. In order to avoid inconsistency, we need to have valuation class 1200 linked with older material type i.e.ZABC.How we can do this ? What impacts must have happened in this period (from MM/FI) in the system, where valuation class get shifted from one material type(ZABC) to another material type(ZPQR)....please help us in this scenario.

    Thanks Sana,
    We are also looking for the solution provided by you i.e. reassign ACR 0010 to Valuation class 1200.
    Your are also correct in terms of  statement "config doesnt allow me to assign same valuation class to 2 different AREF (Account reference number/Account category reference).
    I wanted to know, what are the possible impacts in the system during this re-assignment of ACR to old material type ZABC.
    Regards,
    Sudarshan.

  • What�re the different types of reference?

    Hello there:
    I was asked a question during the interview:
    What�re the different types of reference?
    They meant sth like weak reference... anyone can give a more detailed explaination?
    Also someone can talk a little bit about the memory leak in Java? IWhen will it happen? One senario on my mind is that: an array filled with the references of a class, when the program is done with the array, it doesn't apply removeall on the array. Will it cause memory leak?
    Thanks a lot,
    Sway

    They meant sth like weak reference... anyone can give
    a more detailed explaination?[url http://java.sun.com/j2se/1.5.0/docs/api/java/lang/ref/package-summary.html]Read, and ye shall learn.

  • Trying to uderstand different types of methods.

    Well, basically, I'm trying to uderstand the different types of methods there are.
    I uderstand private static, public static, private void and public void. Public means the method can be called from another class, private means method can only be called from within its own class. Static - some value is going to be returned, Void - no values are returned.
    These are the ones I don't understand for sure;
    static {
       try { ... }
       catch(...) { ... }
    } This method tries to do something and catches exception. But, it isn't public or private and it doesn't have a name, how does it fire?
    A void someName() method with no public or private prefix. Who can fire this method?
    final void someName(), static class someName(), and protected void someName() are other methods I don't understand.
    All help appreciated.

    Static - some
    value is going to be returned, No. Static means the method is associated with the class as a whole, not with any particular instance of the class. It has nothing to do with what, if anything, it returns.
    These are the ones I don't understand for sure;
    static {
    try { ... }
    catch(...) { ... }
    This method tries to do something and
    catches exception. But, it isn't public or private
    and it doesn't have a name, how does it fire?It's not a method. It's a static initializer. It runs when the class is loaded.
    A void someName() method with no public or
    private prefix. Who can fire this method?Without public, protected, or private, it's "default access" or "package access." It's only accessible within that class or to classes in the same package.
    >
    final void someName()[/i
    ], static class
    someName(), and protected void someName()
    are other methods I don't understand.
    You should go through a tutorial or introductory text.
    See Resources for Beginners for a list.
    http://www.thejword.com/3.html#beginner_resources

  • Good design choice, different types of customers, from webservice

    Hi, I have thoughts about good design pattern, when doing this:
    You have a webservice where customers coming into your system. The customers are private ones, business ones, and big business types.
    These 3 customer types has different needs, and must have different values like companyname, social security number, etc etc.
    The customer also has some shared types, like customerid, created, updated, etc.
    So what you want to do is to have an interface or an abstract class containing common methods for the customer, then you will create subclasses for the different types.
    I was thinking about creating a factory class and pass in the customer object retreived from the webservice, and in the factory process method create objects on the different subclasses based on what kind of object you get in (private, business, etc).
    So, webservice gets a private customer object, you serialize it and then you pass it into your factory class. And back you get a customer object.
    Now you want to do business logic on the object, storing it to a database, etc.
    So you might still have to create different scenarios based on if its customer type.
    The basic idea is that you want to get the object from webservice, pass it to a factory and get back a customer object which you want to do things with.
    What do you think, what is a good design solution to the problem described?

    To be clear "pattern" has a specific meaning. Your description is a design not a pattern.
    Is the small business one never going to become a big business one?
    Is a big business one never going to become a small business one?
    If the answer to either is yes, then you have one entity with different attributes, not two.
    I have no idea why serialization would matter in this. And your description doesn't explain that either. If you are talking about communication between different boxes then you need a communication layer (and it doesn't appear you are at the level yet where you need to decide the specifics of how that is handled.)
    It is unclear why you would want a factory. But if you just want the experience then you could probably use it.
    Your description isn't nearly complete enough to define how the overall system should behave which is what you seem to be also describing. You need to seperate what the system will do for how it will do it (the design.)

  • How select different type views in MM01

    Hi abapers,
    plz tell me how to handle diffrent different type views in MM01.
    thanks in addvance

    hi,
    After the recording, you might see, that the selection of the views is
    monething like that: SELECTION(3) = 'X'
    SELECTION(4) = 'X'
    SELECTION(5) = 'X'
    you have to address the selected
    views by their index in the table.
    in Tcode SHDB, record MM01 transaction only for the MRP1 MRP2 MRP3 and use the same code in ur BDC prog.
    Look at the below code for MM01
    http://www.sap-img.com/abap/example-how-views-are-dealt-in-bdc.htm
    You have + button in the MK01 trasaction code, if you press that you
    can enter new record in the table control, so every time, enter a New
    record and press that + button, then enter the record then press + , like this we need to handle the table control
    Check the links -
    bdc -- mm01
    MM01 BDC
    mm01
    example:
    Example how Views are dealt in BDC
    Can any body tell me some views of MM  that we can use in BDC?
    ***This is a BDC for Semi finished Materials*******
    report ZBDC_SEMIFIN
           no standard page heading line-size 255.
    include bdcrecx1.
    Tables: Mara,"General Material Data
            mard,"Storage Location Data for Material
            mvke,"Sales Data for Material
            Makt,"Material Descriptions
            marc,"Plant Data for Material
            mbew,"Material Valuation
            rlgrap."Program Fields/Screen Fields for SAPLGRAP
    Data: begin of ITAB occurs 0,"Internal table for Semi-Finished Material
    Initial data
          matnr like mara-matnr,  "Material Code
          mbrsh like mara-mbrsh,  "Industry Data
          mtart like mara-mtart,  "Material Type
    Org Data
          Werks like marc-werks,  "Plant
          lgort like mard-lgort,  "Storage Location
          vkorg like mvke-vkorg,  "Sales Orgnization
          vtweg like mvke-vtweg,  "Distribution Chanel
    Basic 1
          Maktx Like makt-maktx,  "Description
          meins like mara-meins,  "Uom
          matkl like mara-matkl,  "Material Group
          BISMT LIKE MARA-BISMT, " Old Material Number
          spart like mara-spart,  "Division
          brgew(7),"like mara-brgew,  "Gross Weight
          gewei like MARA-GEWEI,  "Weight Unit
          ntgew(7)," like mara-ntgew,  "Net Weight
    Purchasing
           MAKTL LIKE MARA-MATKL, "Material Group
           ekwsl like MARA-EKWSL, " Purchasing Value Key
           ekgrp like MARC-EKGRP, " Purchasing Group
    Mrp 1
          disgr like MARC-DISGR,  "Mrp Group
        ekgrp like MARC-EKGRP,  "Purchasing group
          dismm like MARC-DISMM,  "Mrp Type
          dispo like MARC-DISPO,  "Mrp Controller
          disls like MARC-DISLS,  "Lot Size
          BSTMI like MARC-BSTMI,
          BSTMA like MARC-BSTMA,
          BSTRF like MARC-BSTRF,
          BSTFE like MARC-BSTFE,
    Mrp 2
          beskz like MARC-BESKZ,  "Procurement type
          lgpro like MARC-LGPRO,  "Production Storage Location
          dzeit(3),"like MARC-DZEIT,  "In house Production time
          plifz(3),"like MARC-PLIFZ,  "Planned delivery time
          fhori(3),"like MARC-FHORI,  "Sched margin key
          eisbe like MARC-EISBE,  "Safety stock
    Mrp 3
          PERKZ LIKE MARC-PERKZ,
          vrmod like MARC-VRMOD,  "Consumption mode
          vint1(3)," like MARC-VINT1,  "Backward Consumption period
          vint2(3),"like MARC-VINT2,  "Forward Consumption period
          mtvfp like MARC-MTVFP,  "Availability Check
    Mrp 4
          sbdkz like MARC-SBDKZ,  "Individual/ Collective
          SAUFT like MARC-SAUFT,  "Repetitive Manufacturing
          SFEPR like MARC-SFEPR,  "REM Profile
    Work Scheduling View
          ausme like MARC-AUSME,  "Unit of issue
          FEVOR LIKE MARC-FEVOR, "Production Scheduler
          SFCPF like MARC-SFCPF, "Production Scheduler Profile
          umren(5)," like RMMZU-UMREN,  "Val for base uom
          umrez(5) ,"like RMMZU-UMREz,  "Value for uo issue
    Accounting 1
          bklas like MBEW-BKLAS,  "Valuation Class
          vprsv like MBEW-VPRSV,  "Price Control Indicator
          verpr(7)," like MBEW-VERPR,  "Value/Price
          STPRS like MBEW-STPRS,
    *COSTING
         EKALR LIKE MBEW-EKALR," With qty str
         LOSGR like MARC-LOSGR, " Costing Lot size
        end of ITAB.
    Data: W_record type  I,  "Record Allready exists.
          w_trecord type I. "Total record processed
    start-of-selection.
    perform upload.        "Upload Data from Text File
    Perform Open_group.    "Create a session
    clear : w_record,w_trecord.
    perform semi. "Create Semi Finish Materials
    if w_trecord gt 0 or w_record gt 0.
      perform batch_job.
    endif.
    perform close_group.   "Close session
    FORM SEMI.
    loop at ITAB.
      Check for material in master        select single * from mara where matnr eq ITAB-matnr.
             if sy-subrc ne 0.
              w_trecord = w_trecord + 1.
    *Initial Screen
    perform bdc_dynpro      using 'SAPLMGMM' '0060'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RMMG1-MTART'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=AUSW'.
    perform bdc_field       using 'RMMG1-MATNR'
                                  ITAB-MATNR.
    perform bdc_field       using 'RMMG1-MBRSH'
                                  'M'.
    perform bdc_field       using 'RMMG1-MTART'
                                  'HALB'.
    **********************Views*********************************
    *Select Views
    perform bdc_dynpro      using 'SAPLMGMM' '0070'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MSICHTAUSW-DYTXT(17'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'MSICHTAUSW-KZSEL(01)'
                                   'X'.
    perform bdc_field       using 'MSICHTAUSW-KZSEL(09)'
                                  'X'.
    perform bdc_field       using 'MSICHTAUSW-KZSEL(12)'
                                  'X'.
    perform bdc_field       using 'MSICHTAUSW-KZSEL(13)'
                                  'X'.
    perform bdc_field       using 'MSICHTAUSW-KZSEL(14)'
                                  'X'.
    perform bdc_field       using 'MSICHTAUSW-KZSEL(15)'
                                  'X'..
    perform bdc_field       using 'MSICHTAUSW-KZSEL(17)'
                                  'X'.
    **********************Views*****************************
    *perform bdc_dynpro      using 'SAPLMGMM' '0070'.
    *perform bdc_field       using 'BDC_CURSOR'
                                 'MSICHTAUSW-DYTXT(01)'.
    *perform bdc_field       using 'BDC_OKCODE'
                                 '/00'.
    *perform bdc_dynpro      using 'SAPLMGMM' '0070'.
    *perform bdc_field       using 'BDC_CURSOR'
                                 'MSICHTAUSW-DYTXT(17)'.
    *perform bdc_field       using 'BDC_OKCODE'
                                 '/00'.
    *perform bdc_field       using 'MSICHTAUSW-KZSEL(17)'
                                 ITAB-KZSEL_17_011.
    *perform bdc_dynpro      using 'SAPLMGMM' '0070'.
    *perform bdc_field       using 'BDC_CURSOR'
                                 'MSICHTAUSW-DYTXT(01)'.
    *perform bdc_field       using 'BDC_OKCODE'
                                 '/00'.
    *perform bdc_dynpro      using 'SAPLMGMM' '0070'.
    *perform bdc_field       using 'BDC_CURSOR'
                                 'MSICHTAUSW-DYTXT(13)'.
    *perform bdc_field       using 'BDC_OKCODE'
                                 '=ENTR'.
    *perform bdc_field       using 'MSICHTAUSW-KZSEL(13)'
                                 ITAB-KZSEL_13_012.
    *Org Data
    perform bdc_dynpro      using 'SAPLMGMM' '0080'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RMMG1-LGORT'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_field       using 'RMMG1-WERKS'
                                  ITAB-WERKS.
    perform bdc_field       using 'RMMG1-LGORT'
                                  ITAB-LGORT.
    *Basic 1
    perform bdc_dynpro      using 'SAPLMGMM' '4004'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SP09'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  ITAB-MAKTX.
    perform bdc_field       using 'MARA-MEINS'
                                  ITAB-MEINS.
    perform bdc_field       using 'MARA-MATKL'
                                  ITAB-MATKL.
    perform bdc_field       using 'MARA-BISMT'
                                  ITAB-BISMT.
    perform bdc_field       using 'MARA-SPART'
                                  ITAB-SPART.
    perform bdc_field       using 'MARA-MTPOS_MARA'
                                  'NORM'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MARA-NTGEW'.
    perform bdc_field       using 'MARA-BRGEW'
                                  ITAB-BRGEW.
    perform bdc_field       using 'MARA-GEWEI'
                                  ITAB-GEWEI.
    perform bdc_field       using 'MARA-NTGEW'
                                  ITAB-NTGEW.
    *Purchasing
    perform bdc_dynpro      using 'SAPLMGMM' '4000'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SP12'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  ITAB-MAKTX.
    perform bdc_field       using 'MARA-MEINS'
                                  ITAB-MEINS.
    perform bdc_field       using 'MARC-EKGRP'
                                  ITAB-EKGRP.
    perform bdc_field       using 'MARA-MATKL'
                                  ITAB-MATKL.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MARA-EKWSL'.
    perform bdc_field       using 'MARA-EKWSL'
                                  ITAB-EKWSL.
    *MRP 1
    perform bdc_dynpro      using 'SAPLMGMM' '4000'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SP13'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  ITAB-MAKTX.
    perform bdc_field       using 'MARA-MEINS'
                                  ITAB-MEINS.
    perform bdc_field       using 'MARC-EKGRP'
                                  ITAB-EKGRP.
    perform bdc_field       using 'MARC-DISMM'
                                  ITAB-DISMM.
    perform bdc_field       using 'MARC-DISPO'
                                  ITAB-DISPO.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MARC-DISLS'.
    perform bdc_field       using 'MARC-DISLS'
                                  ITAB-DISLS.
    IF ITAB-DISLS EQ 'EX'   .
    perform bdc_field       using 'MARC-BSTMI'
                                  ITAB-BSTMI."MIN LOT SIZE
    perform bdc_field       using 'MARC-BSTMA'
                                  ITAB-BSTMA."MAX LOT SIZE
    perform bdc_field       using 'MARC-BSTRF'
                                  ITAB-BSTRF."RNDING
    ELSEIF ITAB-DISLS EQ 'FX'.
    perform bdc_field       using 'MARC-BSTFE'
                                  ITAB-BSTFE.
    ENDIF.
    *MRP 2
    perform bdc_dynpro      using 'SAPLMGMM' '4000'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SP14'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  ITAB-MAKTX.
    perform bdc_field       using 'MARC-BESKZ'
                                  ITAB-BESKZ.
    perform bdc_field       using 'MARC-LGPRO'
                                  ITAB-LGPRO.
    perform bdc_field       using 'MARC-DZEIT'
                                  ITAB-DZEIT.
    perform bdc_field       using 'MARC-PLIFZ'
                                  ITAB-PLIFZ.
    perform bdc_field       using 'MARC-FHORI'
                                  ITAB-FHORI.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MARC-EISBE'.
    perform bdc_field       using 'MARC-EISBE'
                                  ITAB-EISBE.
    *MRP 3
    perform bdc_dynpro      using 'SAPLMGMM' '4000'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SP15'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  ITAB-MAKTX.
    perform bdc_field       using 'MARC-PERKZ'
                                  ITAB-PERKZ.
    perform bdc_field       using 'MARC-VRMOD'
                                  ITAB-VRMOD.
    perform bdc_field       using 'MARC-VINT1'
                                  ITAB-VINT1.
    perform bdc_field       using 'MARC-VINT2'
                                  ITAB-VINT2.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MARC-MTVFP'.
    perform bdc_field       using 'MARC-MTVFP'
                                  ITAB-MTVFP.
    *MRP 4
    perform bdc_dynpro      using 'SAPLMGMM' '4000'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SP17'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  ITAB-MAKTX.
    perform bdc_field       using 'MARC-SBDKZ'
                                  ITAB-SBDKZ.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MARC-SFEPR'.
    perform bdc_field       using 'MARC-SAUFT'
                                  ITAB-SAUFT.
    perform bdc_field       using 'MARC-SFEPR'
                                  ITAB-SFEPR.
    *Work Scheduling
    perform bdc_dynpro      using 'SAPLMGMM' '4000'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SP24'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  ITAB-MAKTX.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MARC-SFCPF'.
    perform bdc_field       using 'MARA-MEINS'
                                  ITAB-MEINS.
    perform bdc_field       using 'MARC-FEVOR'
                                  ITAB-FEVOR.
    perform bdc_field       using 'MARC-LGPRO'
                                  ITAB-LGPRO.
    perform bdc_field       using 'MARC-SFCPF'
                                  ITAB-SFCPF.
    perform bdc_field       using 'MARC-DZEIT'
                                  ITAB-DZEIT.
    *Check for Conversation Factor
              if ITAB-MEINS ne iTAB-ausme and iTAB-umren gt  0
                                          and iTAB-umrez gt  0.
              perform bdc_dynpro      using 'SAPLMGMM' '0510'.
              perform bdc_field       using:
                                      'BDC_OKCODE'    '=ENTR',
                                      'RMMZU-UMREN'   ITAB-UMREN,
                                      'RMMZU-UMREZ'   ITAB-UMREZ.
            endif.
    perform bdc_field       using 'MARC-LGPRO'
                                  itab-LGPRO.
    perform bdc_field       using 'MARC-DZEIT'
                                  itab-DZEIT.
    *Accounting
    perform bdc_dynpro      using 'SAPLMGMM' '4000'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=SP26'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  ITAB-MAKTX.
    perform bdc_field       using 'MARA-MEINS'
                                  ITAB-MEINS.
    perform bdc_field       using 'MARA-SPART'
                                  ITAB-SPART.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MBEW-STPRS'.
    perform bdc_field       using 'MBEW-BKLAS'
                                  ITAB-BKLAS.
    perform bdc_field       using 'MBEW-VPRSV'
                                  ITAB-VPRSV.
    perform bdc_field       using 'MBEW-STPRS'
                                  ITAB-STPRS.
    IF ITAB-VPRSV = 'S'.
    perform bdc_field       using 'MBEW-STPRS' "FILLS STD PRICE
                                  ITAB-VERPR.
    ELSEIF ITAB-VPRSV ='V'.
    perform bdc_field       using 'MBEW-VERPR' "FILLS VALUE
                                  ITAB-VERPR.
    ENDIF.
    *Cost Estimate
    perform bdc_dynpro      using 'SAPLMGMM' '4000'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=BU'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  ITAB-MAKTX.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MARC-PRCTR'.
    perform bdc_field       using 'MARA-MEINS'
                                  ITAB-MEINS.
    perform bdc_field       using 'MBEW-EKALR'
                                  ITAB-EKALR.
    perform bdc_field       using 'MARC-LOSGR'
                                  ITAB-LOSGR.
    perform bdc_transaction using 'MM01'.
    REFRESH BDCDATA.
        else.
             w_record = w_record + 1.
        endif.
    ENDLOOP.
    ENDFORM.
    form Upload.
    CALL FUNCTION 'UPLOAD'
    EXPORTING
       CODEPAGE                      = ' '
       FILENAME                      = ' '
       FILETYPE                      = ' '
      TABLES
        DATA_TAB                      = ITAB
    EXCEPTIONS
       CONVERSION_ERROR              = 1
       INVALID_TABLE_WIDTH           = 2
       INVALID_TYPE                  = 3
       NO_BATCH                      = 4
       UNKNOWN_ERROR                 = 5
       GUI_REFUSE_FILETRANSFER       = 6
       OTHERS                        = 7.
    ENDFORM.
    form batch_job.
        uline.
          format color col_heading.
            if w_trecord gt 0.
            Write:/ 'Background Job has been Created for ',
                  w_trecord right-justified, 'Semi-Fin', 80 ''.
            write:/ 'Please follow the following steps to run this job',
                                                               80 ''.
            write:/ 'as listed below.', 80 ''.
            format color col_normal.
            skip.
            write:/05 '1.Goto Transaction SM35', 80 ''.
            write:/05 '2.Select your Session Name', 80 ''.
            write:/05 '3.Click On Execute Button', 80 ''.
           endif.
           if w_record gt 0.
             format color col_negative.
             write:/ w_record ,'records already existed', 80 ''.
             format color off.
           endif.
        uline.
    endform.

  • Duplicate class names under different multi match policies

    We've inherited an ACE SM 3.0 (A5.1a) config, where we noticed duplicate class names under different multi match policies, similar to this:
    policy-map multi-match POLICY1
       class CLASS1-cm
        loadbalance vip inservice
        loadbalance policy CLASS1-pm
        loadbalance vip icmp-reply active
    policy-map multi-match POLICY2
       class CLASS1-cm
        loadbalance vip inservice
        loadbalance policy CLASS1-pm
        loadbalance vip icmp-reply active
        appl-parameter http advanced-options HTTP-8K-HEADER
    How would the ACE know which multi match policy to use?
    Thanks.

    Hi,
    It's always first match. If if the first one satisfies the condition, we don't even look at the second. We would move on to another type. I guess below explanation would answer all your doubts.
    The term "multi-match" refers to execution semantics of the policy; In other words it depicts how the actions are executed for a given flow that matches the classifications in the policy.
    The policy has multi-match semantics because the policy allows configuring  multiple types of features like loadbalancing, NAT inspect etc; so potentially this policy can result in taking multiple actions (if multiple features are configured) for a given matching flow.
    Now given that there can be multiple classifications configured for the same feature type within the policy, the rule is that we always execute *only* the first matching action for a given feature type;
    for .eg consider the below;; just for brevity I am ommiting the exact syntax 
    of the cmds
    policy-map multi-match MYPOLICY
      class LB1
        loadbalance policy L7-1
        loadbalance vip inservice
      class NAT1
        nat dynamic 100 vlan 20
      class INSP1
        inspect http
      class LB2
        loadbalance policy L7-2
        loadbalance vip inservice
      class NAT2
        nat dynamic 200 vlan 30
    interface vlan 10
       service-policy input MYPOLICY
    please note above that there are 2 classes each with features loadbalance and 
    NAT configured and one class with inspect action; 
    For an incoming flow, we try to match and *execute* *ONLY* the action specified 
    against first matching class per feature. In otherwords, if flow matches class 
    LB1 then we will execute "loadbalance action L7-1" and we wont even try to see 
    if class LB2 matches as it is of the same feature type. Only if class LB1 does 
    not match we look at LB2.  However we continue matching other class'es since 
    they have different feature types;
    This happens for each feature type; Essentially between the class-maps of same 
    feature type think of this as first-match and across features its multiple match.
    potentially for above policy the flow can match the below possible classes:
    LB1, NAT1, INSP1
    LB2, NAT1, INSP1
    LB2, NAT2, INSP1
    LB1, NAT2, INSP1
    but the below is not possible;
    LB1, LB2, NAT1, INSP1
    LB2, NAT1, NAT2, INSP1
    you can visualize the above multi-match policy like below; (pls note that below 
    syntax is not supported and is strictly for illustration purposes only) below has 
    policy types per FEATURE and each such policy can result in ONLY ONE match/action 
    being executed;
    policy-map type SLB first-match LBPOLICY
      class LB1
        loadbalance policy L7-1
        loadbalance vip inservice
      class LB2
        loadbalance policy L7-2
        loadbalance vip inservice
    policy-map type NAT first-match NATPOLICY
      class NAT1
        nat dynamic 100 vlan 20
      class NAT2
        nat dynamic 200 vlan 30
    policy-map type inspect first-match INSPECTPOLICY
      class INSP1
        inspect http
    interface vlan 10
       service-policy input LBPOLICY
       service-policy input NATPOLICY
       service-policy input INSPECTPOLICY
    Regards,
    Kanwal
    Note: Please mark answers if they are helpful.

  • Problem refactor classes residing in different development components?

    Hi!
    In dc1 defined class "ClassExample" added to public part.
    When in dc2 apply refactoring for "ClassExample" to "ClassExampleNew" issue error message - Method to be renamed is binary.
    Support nwds refactoring classes defined in different dc?
    Wbr, Ivan.

    Hi Pooja,
    thank you very much for your response. But - the problem lies in custom portal development component. When I want to use some custom portal service in my web dynpro, I should write into sharing reference "PORTAL:vendor.com/MyAmazingService". MyAmazing service is name of development domponent (PAR type) deployed on portal before.
    No problem here - problem begins in developing this  custom portal service as development component. When I want to build my portal service as DC, there is problem of used libraries. It's not the same as classpath in NWDS (it would be nice if it will be connected, but it isn't). The classpath for DC build is generated from "used DC's" and that's the problem - how to add KM or RF classes as "used DC"? Where can I found them?
    I'm asking for correct design and component architecture - maybe my current attitude is wrong. Every example and tutorial works only with "create new project by this way..." "your first sample..." but some turorial for component architecture, making some reusable applications etc... I didn't found any.
    This helped me a little bit, but I want more:
    /people/chris.whealy/blog/2006/01/13/when-creating-a-java-web-dynpro-application-dont-use-the-project-type-quotweb-dynpro-projectquot
    A bit of (impractical) scripting for Web Dynpro
    Thanks,
    Martin

  • Are Vector Integer and Vector String different types?

    Maybe I am missing something.
    Are Vector <String> and Vector <Integer> different types? Can I have to methods of the same name with arguments of these types? That would be the point of method overloading.
    Appearently not. The following code does not compile:
    import java.util.*;
    public class b {
            public static void doit(Vector <String> what) {
                    what.add(new String(""));
            public static void doit(Vector <Integer> what) {
                    what.add(new Integer(0));
    }$ javac -target 1.5 -source 1.5 b.java
    b.java:3: name clash: doit(java.util.Vector<java.lang.String>) and doit(java.util.Vector<java.lang.Integer>) have the same erasure
    public static void doit(Vector <String> what) {
    ^
    b.java:6: name clash: doit(java.util.Vector<java.lang.Integer>) and doit(java.util.Vector<java.lang.String>) have the same erasure
    public static void doit(Vector <Integer> what) {
    ^
    2 errors

    So it is not possible to have both methods in a class. Let us do instanceof instead.
    import java.util.*;
    public class b {
            public static void doit(Vector what) {
                            if (what instanceof Vector<String>) {
                                   what.add(new String(""));
                            else if (what instanceof Vector<Integer>) {
                                   what.add(new Integer(0));
    }javac -target 1.5 -source 1.5 b.java
    b.java:4: illegal generic type for instanceof
    if (what instanceof Vector<String>) {
    ^
    b.java:7: illegal generic type for instanceof
    else if (what instanceof Vector<Integer>) {

  • The workflow could not update the item, possibly because one or more columns for the item require a different type of information. Outcome: Unknown Error

    Received this error (The workflow could not update the item, possibly because one or more columns for the item require a different type of information.) recently on a workflow that was
    working fine and no changes were made to the workflow.
    I have tried a few suggestions, i.e. adding a pause before any ‘Update’ action (which didn’t help because the workflow past this action without incident); checked the data type being written
    to the fields (the correct data types are being written); and we even checked the list schema to ensure the list names and the internal names are aligned (they
    are), but we still cannot figure out why the workflow is still throwing this error.
    We located the area within the workflow step where it is failing and we inserted a logging action to determine if the workflow would execute the logging action but it did not, but wrote the same error message.
    The workflow is a Reusable Approval workflow designed in SharePoint Designer 2010 and attached to a content type. 
    The form associated with the list was modified in InfoPath 2010. 
    Approvers would provide their approval in the InfoPath form which is then read by the workflow.
    Side note - items created after the workflow throws this Unknown Error some seem to be working fine. 
    We have deleted the item in question and re-added it with no effect. 
    Based on what we were able to determine there don’t seem to be any consistency with how this issue is behaving.
    Any suggestions on how to further investigate this issue in order to find the root cause would be greatly appreciated?
    Cheers

    Hi,
    I understand that the reusable workflow doesn’t work properly now. Have you tried to remove the Update list item action to see whether the workflow can run without issue?
    If the workflow runs perfectly when the Update list item action is removed, then you need to check whether there are errors in the update action. Check whether the values have been changed.
    Thanks,
    Entan Ming
    Entan Ming
    TechNet Community Support

  • The workflow could not update the item, possibly because one or more columns for the item require a different type of information using Update Item action

       I got error  "The workflow could not update the item, possibly because one or more columns for the item require a different type of information "I  found out the cause is  Update Item action       
    I need to update item in another List call Customer Report ,the field call "Issues"  with data type  "Choice"   to yes
    then the error arise .   please help..

    Thanks for the quick response Nikhil.
    Our SPF 2010 server is relatively small to many setups I am sure. The list with the issue only has 4456 items and there are a few associated lists, eg lookups, Tasks, etc see below for count.
    Site Lists
    Engagements = 4456 (Errors on this list, primary list for activity)
    Tasks = 7711  (All workflow tasks from all site lists)
    Clients = 4396  (Lookup from Engagements, Tslips, etc)
    Workflow History = 584930 (I periodically run a cleanup on this and try to keep it under 400k)
    Tslips = 3522 (Engagements list can create items here, but overall not much interaction between lists)
    A few other lists that are used by workflows to lookup associations that are fairly static and under 50 items, eg "Parters Admin" used to lookup a partners executive admin to assign a task.
    Stunpals - Disclaimer: This posting is provided "AS IS" with no warranties.

Maybe you are looking for