MediaPrintableArea determine problem:ClassCastException

Hi,
I have a problem determining the printable area:
After the attribute value is obtained it throws ClassCastException when
trying to cast to MediaPrintableArea. Below is my code/of course service is a PrintService instance/
The question: What is the returned class? Is it some container?
    PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
    aset.add(MediaSizeName.ISO_A4);
    Object oArea = service.getSupportedAttributeValues
        MediaPrintableArea.class,
        null,
        aset
    System.out.println("Area::" + oArea.getClass());
    MediaPrintableArea area = (MediaPrintableArea)oArea;Output:
Area::class [Ljavax.print.attribute.standard.MediaPrintableArea;
Exception in thread "main" java.lang.ClassCastException
Exception is thrown at this line:
MediaPrintableArea area = (MediaPrintableArea)oArea;
Thanks in advance
Mike

Great thanks, Levi
MediaPrintableArea areaItems[] = (MediaPrintableArea[])oArea;
Works fine.
Is there a case when there MediaPrintableArea will be returned
instead of MediaPrintableArea[], as is in the user guide?
Thanks
Mike

Similar Messages

  • F110 and Bank Determination Problem

    Hi Expert,
    I have problem / question on the bank determination problem on F110, as follows:
    My Payment method (PM): N
    Ranking order for PM: N is:
    Rank 1: House Bank is ... ABMB
    Rank 2: ABMB2
    Rank 3: ABMB3
    Rank 15: MBB
    In my F110, at my setting for printout/data medium, variant created (Program: RFFOD__S) for PM:N and for House Bank: MBB (Not ABMB).
    Question:
    I have vendor open items of PM:N, and when I run the F110 (using the above setting / variant) , why SAP always clear the open items using house bank ABMB, and not MBB?  I expect F110 will use house bank MBB, as I set variant for program: RFFOD__S is MBB for PM:N.
    Thanks in advance for your help.
    Regards,
    sbmel

    Hi,
    Payment program will select house bank from bank determination which you made for your payment method and house bank combination.
    The house bank you have entered in payment media program variant is used to generate payment advice or payment media. It has nothing to do with house bank through which you want to make this payment.
    For any reason you want to make payments to the vendor using specific house bank you can enter house bank ID directly in vendor master data.
    Thanks!
    Raju
    Edited by: M V Narayana Raju on Sep 14, 2010 5:20 AM

  • Agent determination problem

    I have a workflow that has been in production for almost a year.  We are in the middle of integration testing for another rollout and I'm getting agent determination errors in this workflow.  There are three steps involved.  The first two use the exact same rule.  The first of these two works fine.  When it tries to run the rule again for the second step, it gets no agent found.  If I test the rule it works.  If I restart the workflow, it works.  When it moves on to the third work item using a different rule, it errors out no agent found.  When I test this rule, it works.  When I restart at this step, it also works.
    This is a new integration client that was copied from production.  I've performed the standard workflow customization like I always do.  I've run several other workflows and only notice the agent determination problems in this one.  The workflow hasn't changed in months although there have been some user security changes...I'm not sure how that could really affect the agent determination during the creation of work items. 
    One thing that might be important...userA created the first workitem and the agent determination resolves to userB.  When userB executes the first work item and completes, the second work item should also resolve to userB using the exact same rule.  This fails.  I restarted it using my account and it resolves to userB.  UserB executes work item #2 and work item #3 should resolve to userC but the agent determation fails again.  I don't know whether the work item agent is "used" to perform the creation of the next workitem or not but this is the only difference between the first two work items and one works while the other does not.
    It's almost like userA can perform the agent determination but userB cannot.  I can't manually execute the agent determination as userB so I ran se37 as myself in debug and changed SYST-UNAME to userB and it worked fine and returned userB as the agent.  That would seem to eliminate security as an issue with the agent determination.

    Hi,
    Are you absolutely sure that it is not an authorisation issue? Can you give SAP_ALL (and the possible structural authorisations) to all the users that are involved in the process? (I don't think that changing sy-uname in debug mode to another user really is a correct way to try to prove whether this is an authorisation issue.)
    The agent determination of the following step is executed by the previous WF agent, if there is no background steps between. So if the previous agent doesn't have enought authorisations, the agent determination will fail.
    Regards,
    Karri

  • Multiple pricing procedure determination problem

    Dear Experts,
    I have a situation in pricing procedure determination. Please advice. The details are given below.
    Pricing procedure is determined for the combination of Sales Org,
    Division, Distribution Channel, Customer Pricing Procedure and Document
    Pricing procedure.
    Say there is a sale happening through following organizational units.
    Company Code: 4260
    Sales Org: 3260
    Division: 02
    Distribution Channel: D1
    Customer: 9000000
    But the material is delivered from the plant that belongs to a different
    company code.
    Plant company code: 4262
    The customer 9000000 has customer pricing procedure maintained as 1 in
    the customer master.
    This will create following documents
    Sales order OR from 3260 to 9000000
    LF delivery
    F2 invoice from CC 4260 to customer 9000000.
    IV inter-company invoice from 4262 to 4260 through following sales area.Sales org: 3262
    Division: 04
    Distribution Channel: 99 (inter-company)
    Here the payer is 4260 which will have a customer pricing procedure
    maintained in the customer master (say 1-standard). The document pricing
    procedure is A.
    The pricing procedures determined for F2 invoice and IV invoice will be
    as per the below assignment.
    3260 02 D1 A 1 PRIPRO1
    3262 04 99 A 1 PRIPRO1
    The requirement is to determine another pricing procedure say PRIPROF
    which is specific to formula average pricing for both the invoice types
    i.e. F2 and IV. The determination will happen from below assignment.
    3260 02 D1 A F PRIPROF
    3262 04 99 A F PRIPROF
    The problem here is that we can not maintain two different customer
    pricing procedures (1 and F) for a single inter-company customer 4260.
    Therefore 3262 04 99 A F PRIPROF assignment is not possible as 4260 can
    either have 1 or F as Customer pricing procedure.
    And 3262 04 99 A 1 PRIPRO1 assignment is already in use so we can not
    replace 1 with F and change the pricing procedure from PRIPRO1 to
    PRIPROF.
    Can you please advice how can we resolve the issue of having multiple
    customer pricing procedure requirements for same customer to determine
    different pricing procedures?
    Thank you.
    WIth regards,
    Sahir Gaulkar

    Hi Ashish,
    Refer this links to understand links b/w the tables.
        http://www.sap-img.com/general/sap-r3-tables.htm.
        http://www.sap-img.com/sap-sd/important-tables-for-sap-sd.htm
    Thanks,
    Swamy H P

  • Controlling - Cost Center Determination Problem - MM

    Hi everyone,
    I have a problem concerning Cost Center determination.
    My Valuation Area is company code and I use division in order to input to diferent Plants.
    I filled all the fields on the OMJ7 transaction.
    I also filled all the data in the OKB9 transaction.
    The problem appears while posting a Goods Receipt: When a goods receipt is posted, the system just picks the Cost Center informed in the "Valuation Area - Division" and not in the "Plant-Division" of transaction OMJ7.
    The data informed in the "Plant-Division" part is working fine in SD, but during GR it does not work and it gets the data in the "Valuation Area - Division" part.
    Does anyone can tell me how to make it work the same way in SD and in MM ?
    Thanks in advance !
    Best regards,
    Remi

    In OMJ7, there are two linksto maintain the values:
    1. Plant - Division (T134G)
    2. Valuation Area- Division (T134H)
    Both of these refer to two different tables (in brackets above).
    SD transactions read the G table and MM transactions read the H table. Hence you need to maintain the settings in both tables.
    In my situation, though the plant is the Val area, I had to maintain the entries in both tables.
    Cheers.

  • Account determination problem

    In tcode MIGO i am getting error '' Account determination  for entry CAIN BSX -
    3000 not possible'' { Message no. M8147 } .Can you please guide me ?
    I am online.

    Hi,
    Goto OBYC T.code and Transaction key BSX where you are missing a GL account for Valuation area 3000 under CAIN chart of accounts.
    Assign GL account  for BSX transaction for valuation area 3000 under CAIN chart of account and this is solve your problem
    Thanks,
    Rau

  • Webservice to file (receiver determination problem)

    Hi ...
        I am doing webserive to file scenario in PI7.0 server. I have completed doing the scenario. But there is a problem in receiver side. In SXMB_MONI it is showing the below error.
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Receiver Identification
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>XIServer</SAP:Category>
      <SAP:Code area="RCVR_DETERMINATION">NO_RECEIVER_CASE_BE</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>No receiver could be determined</SAP:Stack>
      <SAP:Retry>N</SAP:Retry>
      </SAP:Error>
    Could you please help me out in this.

    hi,
    When you have used the WSDL wizard in the Integration Directory and have clicked on "Propose URL" in the second screen, did you ever wonder, why the URL does not point to a sender SOAP adapter channel, it is the URL of the Integration Server instead?
    When you want to use the inbound channel of the Integration Server, you have to use following URL for the web service client:
    http://<server>:<ABAP-port>/sap/xi/engine?type=entry&version=3.0&Sender.Service=<YourService>&Interface=<YourNamespace>%5E<YourInterface>
    The namespace must be written with escaped characters. (%5E stands for "^")
    Note: The WSDL wizard creates an address with the escape sequence &amp; instead of &. Some SOAP clients (for example XPLSpy) do not automatically restore the character and you have to do this manually.
    By default the SOAP call is treated as a synchronous call. If you want an asynchronous call, you have to add &QualityOfService=ExactlyOnce to the URL.
    Additionally your web service client must provide the HTTP header parameter "SOAP action" = http://sap.com/xi/WebService/soap1.1
    The Web Service Wizard of the Integration Repository creates a WSDL concerning this URL and this SOAP action automatically. Only for asynchronous calls you need to change the URL inside the WSDL file with an editor and add &QualityOfService=ExactlyOnce.
    Advantage
    When you send SOAP messages directly to the Integration Server, you reduce the message load on the adapter engine. This can improve the performance.
    Restrictions
    The SOAP inbound channel of the Integration Server does not support attachments. SOAP messages with content type "multipart" are rejected.
    Hint
    For testing purpose it is possible to add logon data directly to the URL. The parameters are the same as in the HTTP sender adapter: &sap-user=<username>&sap-password=<password>
    /people/stefan.grube/blog/2006/09/21/using-the-soap-inbound-channel-of-the-integration-engine
    regards
    chandra

  • File to RFC scenario - receiver determination problems

    Hi ,
    Im trying to work out a flat file to RFC scenario, and am facing problems in configuring the receiver determination .
    While creating my receiver determination, in the configured receivers, when i click on the F4 help to select service, i do not see the business system that i configured in SLD .
    This system i have configured as an WAS ABAP system and provided all relevant data. I can also import objects from this system into IR, so i dont think i have set it up wrongly. I have also created RFC destination .
    Is there some setting that has to be made that im missing ? Could somebody point out why im not able to see this system in the list of business services available at receiver configuration time ?
    Thanks,
    Joe
    I also cleared the SLD cache by the way.. that didnt work either .
    Message was edited by:
            Joe Stein

    Thanks a lot for you replies guys , but problems still not solved ;
    1. I looked at the blog given and ive done everything pretty much as given . My problem lies in not finding the business system itself  in the list of services for the configured receiver. How to implement this has not been shown in the blog.
    2. I tried refreshing the cache and checking again, but it still doesnt show me the necessary step.
    SOS !
    I checked in the inbound system , and found that an RFC wasnt created for the XI system . I created that but i still cant see this system as a business system when i try to create the receiver determination . Do i need to recreate the technical system in the landscape to incorporate this change ?
    Any pointers at all ??
    Message was edited by:
            Joe Stein

  • ML single-level determination problems

    Hi,
    we have some problems about single-level determination:
    category                        quantity                  prelimval                   price diff             price
    Beginning Inventory      55,821,791.824      4,326,188.88            0.00                     77.50
    Receipts                        84,472,000             7,301,759.68            3,116,204.28      123.33
       Cumulative Inventory 140,293,791.824    12,126,995.37          3,116,204.28      108.65
    Consumption                 93,890,170             8,115,866.30            2,085,487.50       108.65
         Not Allocated           0                             0.00                          *592,153.96*
         Production               48,880,000              4,225,187.20            *493,568.10*
             6.1111004 LG01 387,000                   33,452.28                 8,596.04              108.65
             6.1111009 LG01 693,000                   59,902.92                 15,392.91            108.65
             6.4510111 LG01 39,939,000              3,452,327.16            *298,671.23          93.92*
             6.1111005 LG01 387,000                   33,452.28                 8,596.04              108.65
             7.5710050200 LG01 94,000               8,125.36                   2,087.93               108.65
    Ending Inventory          46,403,621.824       4,011,129.07            1,030,716.78        108.65
    material 6.4510111 was allocated 298,671.23, but 887,124.66 (2,085,487.50 * 39,939,000 / 93,890,170) is the correct amount, who can tell me y ? tks..

    Hi
    Single level price determination is to calculate the unit price of material for a period. It takes into account the price differneces arising out of Price Differences like GR/IR Differences, Exchange Rate Differences, and revaluation differences to calculate the actual price of  a material.
    You can have more information of Single Level Price Determination at the following link:
    http://help.sap.com/saphelp_47x200/helpdata/en/d2/cb4f37455611d189710000e8322d00/frameset.htm
    Regards,
    Suraj

  • HTTP to RFC Interface Determination problem

    Hi experts,
    I am doing HTTP <-> RFC scenario mentioned in blog
    /people/community.user/blog/2006/12/12/http-to-rfc--a-starter-kit
    almost everthing is done; but while configuring the interface determination, i am not able to see the inbound interface.
    your valuable help would be appreciated
    Regards
    Sumit Bhutani

    Hi Bhavesh,
    Thanks for your quick response; this problem has been resolved, but while testing my scenario using RWB i am getting this error.
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Request Message Mapping
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>XIServer</SAP:Category>
      <SAP:Code area="MAPPING">CANNOT_READ_PAYLOAD</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>Unable to read payload from the message object</SAP:Stack>
      <SAP:Retry>N</SAP:Retry>
      </SAP:Error>
    Please suggest on this
    Thanks
    Sumit

  • Extended Receiver Determination problem

    Hi,
    I am making use of extended receiver determination to send 1 source to multiple target systems. When I was testing so that the interface would just send to 1 target system while still making use of the extended receiver determination, I got the following error CO_TXT_OUTBINDING_NOT_FOUND and "No receiver agreement found". The red flag error occurs during Technical Routing and when I checked the details SOAP Header -> Main, I found that the following:
    Sender Service: ServiceA (correct)
    Sender Interface: InterfaceA (correct)
    Sender namespace: NamespaceA (correct)
    Receiver Service: ServiceB (correct)
    Receiver Interface: InterfaceA (wrong)
    Receiver namespace: InterfaceA (wrong)
    It seems that extended receiver determination was able to successfully determine the receiver service but fail in determining the correct receiver interface and receiver namespace. Does anybody know why this happen and how to correct the problem?
    Some investigation that I already done:
    1.) I temporarily changed the extended receiver determination to a standard receiver determination and specifying the 1 target system explicity without changing any other object in both IR and ID as well as using the same test file. The result is that this worked and the file was sent succefully to my intended target system. This tells me that the problem might either be in the extended receiver determination or in the message mapping or message interface Receivers. Also, this means that all the other objects in ID for this interface is configured correctly.
    2.) I tried hard coding the target system as a constant in the message mapping for the Receivers message type and still make use of the extended receiver determination and I got the same problem mentioned above.
    3.) I tried deleting the receiver determination, activating the changes, re-create the object and activate it and I still got the problem
    4.) I tried checking sxi_cache and everything is up to date and correct
    Any suggestions is highly appreciated.

    Elbert,
    I you are doing only standard receiver determination only and using certain condition you are sending to different targets. If yes check this url:
    /people/prasadbabu.nemalikanti3/blog/2006/09/20/receiver-determination-based-on-the-payload-of-input-dataextended-xpathcontext-object
    Can you please put the payload after message mapping and the xpath condition you mentioned. or if you are doing enhanced receiver determination please check this:
    Re: Error in enhanced receiver determination
    ---Satish
    Edited by: Satish Reddy on Jun 23, 2009 9:08 AM

  • Interface determination problem

    Hi experts,
    I hae a scenario in which i need to split a given message to multiple message(1:n) multimapping.
    I am doing without BPM,and my scenario is working fine and good when i test in message mapping giving various inputs.
    when i test in configuration or runtime it throws an error saying that  interface determaination not found
    The funniest part is if i give some payload it will work fine,and determines the interface....
    but for some conditions it shows interface determaination not found....
    Can anyone throw light on this problem please..
    Thnks,
    Babu

    The funniest part is if i give some payload it will work fine,and determines the interface....
    but for some conditions it shows interface determaination not found....
    This would mean that for some payload the condition is not met. Verify that the payloads for whom you are receiving the error are having the fields/ values that are required to satisfy the condition.
    Regards,
    Abhishek.

  • Org determination problem for an Opportunity created through CIC0.

    Dear all,
    I have a problem with org determination in an opportunity createde through CIC0. I initially created a BP, then a contact person for the same BP and then created an opportunity for the BP where in system is not picking up the Org Data.
    The determination rule says that
    if BP has sales area data --> present those sales areas
    if BP has no sales area data --> pick up from the user assignement in the org structure.
    Now case 2 should be applicable to me. I have maintianed a user as BP under Sales Org. I have activated obj permitted for determination at sales org level.
    When I am creating opp from cic0, user is getting picked properly. However, org data is not getting picked.
    The scenario works fine when opportunity is created through CRMD_ORDER
    What is that I am missing out??? PLEASE HELP ME OUT...
    Regards,
    Rajesh

    Dear Rajesh,
    this might be caused by wrong partner determination customizing for CIC0. please check note 600116
    and related. Also please check note 487734 regarding missing pop-ups in CIC0.
    Regards, Gerhard

  • Startup problems - ClassCastException

    Hi,
    I have written a strtup class to bind the AQjmsQueueConnectionFactory & AQjmsDestination to Sun's JNDI. No exceptions are thrown while binding the Referenceable objects to the Sun's JNDI tree. I have checked the .binding file as well. It has entries for AQJMSQueueConnectionFactory and AQJMSQueue. But, when I am looking up for the entries through a JSP or a stand-alone Java class, I get the same exception -"javax.naming.NamingException: unexpected exception. Root exception is java.lang.ClassCastException".
    I get the same exception even If I lookup from the startup class. I have pasted the relevant part of the code below.
    Can anyone suggest anything to alleviate this problem ?
    Dips
    AQjmsQueueConnectionFactory factory = new AQjmsQueueConnectionFactory("mcname", "dbinst", 1521, "thin");
    AQjmsConnection queueConn = (AQjmsConnection) factory.createQueueConnection("user", "pwd") ;
    queueConn.start();          
    AQjmsSession queueSession = new AQjmsSession( queueConn , 1, false, 10 );
    AQjmsDestination queue = (AQjmsDestination)queueSession.getQueue(user, aqQueueName);
    Hashtable env = new Hashtable(11);
    env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.fscontext.RefFSContextFactory");
    env.put(Context.PROVIDER_URL,"file:/c:/jndi");
    InitialContext context = new InitialContext(env);
    context.bind("AQJMSConnectionFactory", factory );
    context.bind("AQJMSQueue", queue );
    context.lookup("AQJMSConnectionFactory");

    I am pleased to report that I think the problem has been solved. Apparently the strange behavior can be attributed to overheating. After some on line research and the help of people on this list I opened the case and found that the logic board fan was clogged full of lint and dust. After cleaning it I discovered that the fan is inoperable. The computer is now operating with the case open and a small electric fan directed at the logic board heat sink. The computer has been operating flawlessly now for several hours. Will have to replace the bad cooling fan and clean the computer regularly. Thanks so much to all of the people who have responded to my request for help. Would like to mention that a firm with a canine connection charged me over a hundred dollars to report that their diagnosis is a faulty logic board.
    Thank you.

  • Business area determination problem

    Dear Experts,
    From few days I am facing issue relating to business area determination and unable to get the solution, please kindly anybody give the solution.
    my client requirement is as follows.......
    there are 3 plants ex: A, B and C
    Bus Area Determination maintained is    Plant + Division =     Bus Area
                                                                                  A    + D1          =    1000
                                                               B(New Plant)     + D1          =    2000
                                                                                  C     + D1          =    1000
    My problem:
    Plant C is receiving the goods (same material having Div D1) from Plant A and B through STO , and despatches to depots through STO. Here (at Plant C) we want to identify the stock movement  values which received from A and B through Business Area ,
    ex: if at C goods received / issues which received from A need 1000 BA, as well as goods belongs to BA 2000.
    *as at plant C 'Plant and Div' same, so we are unable to get separate Bus Areas for A and B as per standard SAP,
    So, i need to Populate the Business area 2000 in material document(VL02N PGI), based on Storage location(as we are using new St.Loc for B related stock for inventory identification).
    we gone through feasibility of Enhancement, but unfortunately we couldnu2019t get any,
    *please suggest the solution either from standard SAP or enhancement, it would be very helpful and appreciable.
    *Regards,*
    *MMReddy,*

    In configuration, you can assign a business area to a plant and division combination or to a sales area.  There is also some additional configuration for cost centers where you can assign sales org, distribution channel, division along with an order reason code to a cost center and a business area. 
    The menu path in IMG is Sales and Distribution > Basic Functions > Account Assignment/Costing > Business Area Account Assignment or Assign Cost Centers.
    I hope this helps.

Maybe you are looking for

  • I can't get my purchased Elements 10 to download correctly, can you help me?

    I purchased the adobe photoshop/premier elements 10 - upon installation, I ran into numerous errors.  So, I went out and "tried" to fix it by downloading the "fix."  This too would not let me properly install my new software.  I then read online that

  • File Info problems in Photoshop CC & CS5.1 on OS X 10.8

    I have recently upgraded my Macs, running OS X Mountain Lion, from Photoshop CS5.1 to Photoshop CC for two reasons: 1. Because it most the most cost efficeint way to obtain the latest Camera Raw plugins that are no longer supported in CS5.1 2. Becaus

  • PS - Project Version Reporting

    Hi Dear, For project verson wise reporting  i need to get Amount (Plan and actual cost , revenue) and Quantity (Plan work and actual work --durations). I have done the development by pulling amont from RPSCO and Quantity from RPSQT  by giving the OBJ

  • OWA iViews and EP - configuration problem

    Hi All, since EP60 SP2 P3 HF3 there are several OWA iViews under Collaboration folder. According to SAP note 739911 alias of portal user and exchange user (or exchange mailbox) MUST be identical to connect to OWA. Using Application Integrator "HOW TO

  • Transparency issue bolding text

    I've had this issue and I thought it was resolved... On my pages, any text that has any transparent layer over or under it gets auto bolded. This is causing test to look ugly on some parts. I was told to place the text as top layer, but this is not f