Creating thread (service)? in storage nodes using my custom classes?

Is it possible to create one's own thread in a storage node - say, by defining a service with a custom class?
The service configuration element states
+"<service-component>      Required      Specifies either the fully qualified class name of the service or the relocatable component name relative to the base Service component. "+
I have tried specifying my own class (fully qualified class name) here, which is in the classpath and implements com.tangosol.net.InvocationService but it is never loaded, and throws the following exception into my app when it calls CacheFactory.getService(name):
Exception in thread "main" java.lang.IllegalArgumentException: Unknown service type: Invocation
at com.tangosol.coherence.component.net.Cluster.ensureService(Cluster.CDB:65)
at com.tangosol.coherence.component.util.SafeCluster.ensureSafeService(SafeCluster.CDB:14)
at com.tangosol.coherence.component.util.SafeCluster.ensureService(SafeCluster.CDB:11)
at com.tangosol.net.DefaultConfigurableCacheFactory.ensureService(DefaultConfigurableCacheFactory.java:808)
at com.tangosol.net.DefaultConfigurableCacheFactory.ensureService(DefaultConfigurableCacheFactory.java:294)
at com.tangosol.net.CacheFactory.getService(CacheFactory.java:644)
Is this the wrong way to do it? Is there another way (other than something ugly like creating a thread in an invocable)?
Thanks

Hi
Can you explain what you are trying to accomplish in more detail? Are you trying to run a background thread on the member that owns the data?
In any case your really shouldn't be adding new service types or service components in the cluster configuration file. See this thread Re: <service-name> tag in config XML file
thanks
Paul

Similar Messages

  • Loading XML using a custom class and accessing it from other classes?

    I began with a class for a movie clip rollover function
    FigureRollOver. It works marvellously. Three things happen:
    1) it loads XML from a file "mod1_fig1.xml" and uses another
    class, XMLMember, to retool the scoping of the XML so that I can
    get at it
    2) an onload call inside of XMLMember calls the myOnLoad
    function and transfers the XML into an array.
    3) so long as the array is finished building, rolling over a
    movie clip attaches a new movie clip with the rollover text in it.
    But I don't want all those functions in one because I need it
    to be more dynamic, starting with being able to load any old xml
    file instead of just "mod1_fig1.xml", plus it seems like
    overbuilding to have all of that in one class, so I've separated
    out the loading of the XML and building of the array into its own
    class, FigureXMLLoader. FigureRollOver is then left to just attach
    the rollover with text in it, extracted from the array built by the
    new class.
    Problem is, though the array builds inside FigureXMLLoader, I
    can't figure out how to make it available outside the class. I know
    that I'm constructing things in the wrong order, and that the array
    needs to be somehow built inside the class function to be
    available, but I can't figure out how to do that. A cruddy
    work-around is to put a function call at the end of the building of
    the array, which calls yet ANOTHER function on the main timeline of
    my .swf to put the array I've just built into a new variable. This
    works, but it's messy. It seems like I should be able to have one
    line of script in the .swf that generates an array on the main
    timeline (or just a public array) which I can then access from my
    FigureRollOver class:
    var myRollOvers:Array = new FigureXMLLoader("mod1_fig1.xml");
    Here is FigureXMLLoader (see comments in the code for more
    details) which obviously does not return an array as it is, because
    of all the working around I've had to do. Note the "testing"
    variable, which can be traced from the main timeline of the .swf,
    but I will get "not what I want" because of course the array hasn't
    been built yet, and never will be, inside of the declaration as it
    is. How do I get it in there so I can return an array?
    Thanks!

    Suggest you ask this question in the Actionscript forum as
    this forum is
    more tuned to database integration questions.
    You can create arrays outside a class and pass them into it
    by reference and
    visa versa build arrays inside a class and pass out via
    reference.
    The preferred approach is to place the array in a class and
    not expose it.
    Then add methods to use the array or should we say to use the
    class.
    Lon Hosford
    www.lonhosford.com
    Flash, Actionscript and Flash Media Server examples:
    http://flashexamples.hosfordusa.com
    May many happy bits flow your way!
    "maija_g" <[email protected]> wrote in
    message
    news:ed4i43$9v0$[email protected]..
    > Update: I've now put this on the main timeline of the
    .swf:
    >
    > myRollOversLoaded = false;
    > var myRollOvers:Array;
    > var roll_content = new FigureXMLLoader("mod1_fig1.xml");
    >
    > And inside the "myOnLoad" function in FigureXMLLoader,
    just after the
    > while
    > loop I've put this:
    >
    > _root.myRollOversLoaded = true;
    > _root.myRollOvers = figure_arr;
    >
    > The movie clip rollover won't act until
    myRollOversLoaded is true. It
    > works,
    > but it still seems klugey. Any suggestions for a more
    elegant solution
    > would be
    > appreciated.
    >

  • Why does my console NOT run as a storage node

    help!
    I created a minimal console script, for testing, to run as a storage node, with my own classes in the classpath.
    Unfortunately, it does not act as a storage node, even though I patterned it after the console script in the coherence/bin directory.
    The failure symptom is that my application, run on a non-storage-enabled jvm, fails with "storage is not configured."
    If instead of the console, I run as a storage node a jvm, with the same command line options, except with my own mainline that loops dumping the cache, the application in the other jvm works.
    The console does work as a client node, and is able to use my custom classes from the classpath. Hence it is participating in the cluster (the whole cluster runs on my PC).
    I assume there is something simple wrong here, but it escapes me.
    Thanks in advance
    Run Command
    /java/SDK_EE/jdk/bin/java
    -cp '/tmp/rvcinf-test/bin;../../../dist/rvcicache.jar;../../../lib/coherence.jar'
    -server -Xms256m -Xmx512m
    -Dtangosol.coherence.management=all -Dtangosol.coherence.management.remote=true
    -Dtangosol.coherence.distributed.localstorage=true -Dlogfile=logs/runsvrx-coherence.log
    com.tangosol.net.CacheFactory
    How the Working Java Storage Node is Run
    /java/SDK_EE/jdk/bin/java
    -cp '/tmp/rvcinf-test/bin;../../../dist/rvcicache.jar;../../../lib/coherence.jar'
    -server -Xms256m -Xmx512m
    -Dtangosol.coherence.management=all -Dtangosol.coherence.management.remote=true
    -Dtangosol.coherence.distributed.localstorage=true -Dlogfile=logs/runsvrx-coherence.log
    test.MainlineStorageNode
    Notes:
    My classes in:/tmp/rvcinf-test/bin and ../../../dist/rvcicache.jar
    Shown on multiple lines for readibility - was executed as one line (this is an output of bash after set -x)
    Coherence3.4.1/407
    Edited by: mesocyclone on Sep 18, 2009 11:10 PM

    Hi,
    The CacheFactory console does not automatically join all cache services. If you join the cache-service that your application is using from the console, e.g.:
    Map (?): cache foo
    2009-09-19 20:55:07.606/6.305 Oracle Coherence GE 3.6/480 <Info> (thread=main, member=1): Loaded cache configuration from "file:/Users/rhlee/work/coherence/env_configs/v2/coherence-cache-config.xml"
    2009-09-19 20:55:07.779/6.478 Oracle Coherence GE 3.6/480 <D5> (thread=DistributedCache, member=1): Service DistributedCache joined the cluster with senior service member 1
    ...it should work.
    thanks,
    -Rob

  • Problem Using Custom Classes in UCCX8.5.1 SU3

    Dear All,
    My team is facing problem in using Java custom classes for UCCX 8.5.1 SU3
    The problem is that we have created some conditional prompts for currency in different languages, our custom java class contains two mathods GetEnglishString(parameter set) and GetUrduString(parameter set). We are able to use/call both methods one by one and both at same time in CCX Editor and validate the script successfully but when we set the script as application it failed.
    We tried to use both methods one by one and found that script with GetEnglishString is working ok but when we place GetUrduString (alone as well) MIVR logs say that method is unknown altough CCX Editor does not give us any error. We triend to restard Administration and Engine Services several time but to no avail. If somebody know the reason and solution kindly share it ASAP.
    Regards
    Kashif Surhio

    Hi
    In that case I would double check you have uploaded the file, and restart the server completely. In testing we found that restarting the engine didn't always reload the classes.
    Aaron

  • Can't create a service for failover on 2 node windows2008 RAC

    To create a new service for failover,
    1)Enterprise Manager can not be used by prompting an error: many people already mentioned.
    2)Net Manager could create a service but it fails to test showing:
    Attempting to connect using userid: qa1
    The test did not succeed.
    ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
    Q1: According to doc, it should be used ONLY for Non-cluster and single instance. Is this why I have an error?
    Q2: If not, what should I need to do to fix this problem?
    3)Using command line like
    C:\Users\administrator.QAPF2>srvctl add service -d ORCL -s NLS -r orcl1 -a orcl2
    C:\Users\administrator.QAPF2>srvctl start service -d ORCL -s NLS
    C:\Users\administrator.QAPF2>srvctl status service -d ORCL -s NLS
    Service NLS is running on instance(s) orcl1
    C:\Users\administrator.QAPF2>sqlplus /nolog
    SQL> connect sys as sysdba
    SQL> alter system register;
    When I try to connect from client using "jdbc:oracle:thin:@orarac-scan:1521:NLS" connection string, I got the following error:
    Listener refused the connection with the following error:
    ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
    The Connection descriptor used by the client was:orarac-scan:1521:NLS
    Note: If I use "ORCL1" instead of NLS, then it works. ORCL1=SID on node1, NLS=service name.
    Q3: Are there anything I should do more?
    Q4: How do I add a listener for this new service(NLS)? I added the following using Net Manager but no effect:
    (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = orarac-scan)(PORT = 1521)))

    Yes, it worked with sqlplus commandline(local or from remote) like:
    C:\>sqlplus system@NLS
    SQL*Plus: Release 11.2.0.3.0 Production on Fri Apr 20 17:11:19 2012
    Copyright (c) 1982, 2011, Oracle. All rights reserved.
    From a remote client:
    C:\oracle>sqlplus qa1@NLS
    SQL*Plus: Release 11.1.0.6.0 - Production on Tue Apr 24 10:12:31 2012
    Copyright (c) 1982, 2007, Oracle. All rights reserved.
    Enter password:
    Connected to:.............................................................................
    However, if I use the connection string suggested by you:
    C:\oracle>sqlplus qa1@\"orarac-scan:1521/NLS\"
    SQL*Plus: Release 11.1.0.6.0 - Production on Tue Apr 24 10:14:30 2012
    Copyright (c) 1982, 2007, Oracle. All rights reserved.
    Enter password:
    ERROR:
    ORA-12514: TNS:listener does not currently know of service requested in connect
    descriptor
    additional information:
    From a remote client:
    C:\oracle>nslookup orarac-scan
    Server: admin01.qalab01.nextlabs.com
    Address: 10.23.57.5
    Name: orarac-scan.qapf2.qalab01.nextlabs.com
    Addresses: 10.23.57.35, 10.23.57.34, 10.23.57.36
    The followings are from node1:
    C:\>srvctl status service -d ORCL -s NLS
    Service NLS is running on instance(s) orcl1
    C:\Users\administrator.QAPF2>srvctl status scan
    SCAN VIP scan1 is enabled
    SCAN VIP scan1 is running on node orarac2
    SCAN VIP scan2 is enabled
    SCAN VIP scan2 is running on node orarac2
    SCAN VIP scan3 is enabled
    SCAN VIP scan3 is running on node orarac2
    C:\Users\administrator.QAPF2>srvctl status scan_listener
    SCAN Listener LISTENER_SCAN1 is enabled
    SCAN listener LISTENER_SCAN1 is running on node orarac2
    SCAN Listener LISTENER_SCAN2 is enabled
    SCAN listener LISTENER_SCAN2 is running on node orarac2
    SCAN Listener LISTENER_SCAN3 is enabled
    SCAN listener LISTENER_SCAN3 is running on node orarac2
    C:\Users\administrator.QAPF2>srvctl status listener
    Listener LISTENER is enabled
    Listener LISTENER is running on node(s): orarac2,orarac1
    C:\Users\administrator.QAPF2>srvctl config service -d orcl -s NLS
    Service name: NLS
    Service is enabled
    Server pool: ORCL_NLS
    Cardinality: 1
    Disconnect: false
    Service role: PRIMARY
    Management policy: AUTOMATIC
    DTP transaction: false
    AQ HA notifications: false
    Failover type: NONE
    Failover method: NONE
    TAF failover retries: 0
    TAF failover delay: 0
    Connection Load Balancing Goal: LONG
    Runtime Load Balancing Goal: NONE
    TAF policy specification: NONE
    Edition:
    Preferred instances: orcl1
    Available instances: orcl2
    Edited by: 928042 on Apr 24, 2012 10:36 AM

  • How to create the service lines in a sales order using Process_order API

    Hi ,
    I have to create the service lines in a Config to order using process Order API. When i am trying to create a sercvice line , it is comming as new line all together. but i need that one to happen in the configuration itself after the option item but not like standalone line.
    what are the manditory fields for service lines to create using Process_order API.
    Apprciate your help on this.
    Thanks
    Rags

    Moderator message - Please do some analysis before posting here - thread locked
    Rob

  • When we create  one service as preferred on both nodes in  two node RAC

    How to configure listener,tnsnames.ora & listener file When we create one service as preferred on both nodes in two node RAC ... ( I don't need load balancing here but i just want to create service as preferred on both nodes)
    please some one help me in this ..

    Thanks alot Sebastain for your reply..
    I am using 10.2.0.4 version and below tns entry is from my client side tns entry ..
    M4AMPRD_TEST=
    (DESCRIPTION=
    (ADDRESS= (PROTOCOL=TCP) (HOST=153.88.184.228) (PORT=1521))
    (ADDRESS= (PROTOCOL=TCP) (HOST=153.88.184.229) (PORT=1521))
    (FAILOVER=ON)
    (CONNECT_DATA=(SERVICE_NAME=M4AMPRD_TEST)
    (FAILOVER_MODE=
    (TYPE=SELECT)
    (METHOD=BASIC)
    (RETRIES=20)
    (DELAY=5)
    service creation: srvctl add service -d M4AMPRD -s M4AMPRD_TEST -r M4AMPRD1,M4AMPRD2
    But when i connect to database usign above service from client some times its working fine and some times its failing please see below log with timings how it is behaving ..
    SQL> set time on
    18:39:46 SQL> CONN m4owner/iamm4amdev!@M4AMPRD_TEST
    Connected.
    18:39:48 SQL> CONN m4owner/iamm4amdev!@M4AMPRD_TEST
    ERROR:
    ORA-12545: Connect failed because target host or object does not exist
    Warning: You are no longer connected to ORACLE.
    18:39:52 SQL> CONN m4owner/iamm4amdev!@M4AMPRD_TEST
    Connected.
    18:39:53 SQL> CONN m4owner/iamm4amdev!@M4AMPRD_TEST
    Connected.
    18:39:55 SQL> CONN m4owner/iamm4amdev!@M4AMPRD_TEST
    Connected.
    18:39:57 SQL> CONN m4owner/iamm4amdev!@M4AMPRD_TEST
    ERROR:
    ORA-12545: Connect failed because target host or object does not exist
    Warning: You are no longer connected to ORACLE.
    18:39:59 SQL> CONN m4owner/iamm4amdev!@M4AMPRD_TEST
    Connected.
    Thanks for your help in advance
    Anil Vejendla..

  • What is the use of creating proxy services using WSDL.

    Hi
    Am a beginner in ALSB and i have a basic question. Business services are created using WSDL,thats sounds logical as we need to invoke the actual backend services .
    Proxy services are connected to business services and what is the need that it can be e created using WSDL.
    What is the use of creating proxy services using WSDL.

    Hi,
    I beleive you are confused because of the apparent inclusion of transport information in WSDL (that is the host:port/endpoint where the service is hosted). However, if you refer to the w3c specification of WSDL1.0 ([url http://www.w3.org/TR/wsdl]www.w3.org/TR/wsdl), you will find that WSDL has three separate sections:
    1. The schema information that describes data element(s): specified in types
    2. The message information ie message and port sections that specify the parameters and the operations
    3. The service section that specify the actual protocol and endpoint binding.
    Ideally, a WSDL can be broken down into these three separate components. Any WSDL containing the first two is called an abstract WSDL and is used for a top-down approcah for web services, and if the third part is used, then you get a concrete WSDL, containing invocation end-point also.
    Comming back to your question one can typically use an Abstract WSDL for creating proxy service. This way, the service requester and integration can go on two separate threads where the common denominator or agreement between these two parties in terms of operation name and data element are imposed using the WSDL.
    Thanks and Regards
    Vivek Nandey
    BEA Certified Developer for Integration Solutions

  • Creating a service report using SQVI

    Hi experts
    I am creating a service report using SQVI
    The report should have the following fiels
    SrvPO No | SrvPO Data | vendor | Stata  | City | Type of Srv (Ad\banner|maintnc.)  | Amount | Status(open or closed)
    I am using the following tables using table join fnc
    1. EKKO
      EBELN-PO No
    AEDAT - PO Data
    LIFNR - Vendor
    PROCSTAT - Status of PO doc
    2.LIFNR
    REGIO - State
    ORTO1 - City
    3. ESSR
    TXZ01 - Type of Service (Short text)
    4.EKPO
    NETWE - Net amount of PO
    All the tables are legally join but after executing I am not able to fetch any data or hardly one service PO.
    And the selection field will be only From Date and To date.or the Service PO No.
    Immediate response is urgent
    Regards
    Partha

    Moderator message: you said your  issue is solved but did not mark your discussion as such, please see
    How to close a discussion and why

  • Error  while creating a Service PO using BAPI_PO_CREATE1

    Hi,
    Im facing Error as "In case of account assignment, please enter acc. assignment data for item" while creating Service PO using BAPI_PO_CREATE1.
    Header Data
          w_poheader-comp_code = w_src-bukrs.  "Company Code
          w_poheader-doc_type = w_src-bsart.   "Document type
         w_poheader-delete_ind = w_src-vrtkz. "Deletion Indicator
          CLEAR: lv_date.
          CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
            EXPORTING
              date_external            = w_src-aedat
            IMPORTING
              date_internal            = lv_date
            EXCEPTIONS
              date_external_is_invalid = 1
              OTHERS                   = 2.
          w_poheader-creat_date = lv_date.    "Creation Date
          w_poheader-created_by = sy-uname.    "Creator Name
          w_poheader-vendor = w_src-lifnr.     "Vendor
          w_poheader-pmnttrms = w_src-zterm.   "Payment Terms
          w_poheader-purch_org = w_src-ekorg.  "Purchase Organization
          w_poheader-pur_group = w_src-ekgrp.  "Purchase Group
          w_poheader-ref_1    = w_src-ihrez.   "OLD PO
          w_poheaderx-comp_code = 'X'.  "Company Code
          w_poheaderx-doc_type = 'X'.   "Document type
         w_poheaderx-delete_ind = 'X'.      "Deletion Indicator
          w_poheaderx-creat_date = 'X'.    "Creation Date
          w_poheaderx-created_by = 'X'.
          w_poheaderx-vendor = 'X'.
          w_poheaderx-pmnttrms = 'X'.   "Payment Terms
          w_poheaderx-purch_org = 'X'.  "Purchase Organization
          w_poheaderx-pur_group = 'X'.  "Purchase Group
          w_poheaderx-ref_1 = 'X'.
    Item Data
          w_poitem-po_item = w_src-ebelp.
          IF NOT w_src-elikz IS INITIAL.
            w_poitem-delete_ind = w_src-elikz.
          ENDIF.
          IF NOT w_src-txz01 IS INITIAL.
            w_poitem-short_text = w_src-txz01.
          ENDIF.
          IF NOT w_src-werks IS INITIAL.
            w_poitem-plant = w_src-werks.
          ENDIF.
    Material group
          IF NOT w_src-matkl IS INITIAL.
            w_poitem-matl_group = w_src-matkl.
          ENDIF.
    Open or Partial Qty
          IF w_src-opqty IS  NOT INITIAL.
            w_poitem-quantity = w_src-opqty.
          ELSEIF NOT w_src-paqty IS INITIAL.
            w_poitem-quantity = w_src-paqty.
          ENDIF.
          IF NOT w_src-meins IS INITIAL.
            w_poitem-po_unit = w_src-meins. "Base Unit of Measure
          ENDIF.
          IF NOT w_src-netpr IS INITIAL.
            w_poitem-net_price = w_src-netpr.  "Net Price
          ENDIF.
          IF NOT w_src-mwskz IS INITIAL.
            w_poitem-tax_code = w_src-mwskz.
          ENDIF.
          IF NOT w_src-pstyp IS INITIAL.
            w_poitem-item_cat = w_src-pstyp.
          ENDIF.
          IF NOT w_src-knttp IS INITIAL.
            w_poitem-acctasscat = w_src-knttp.
          ENDIF.
          IF NOT w_src-vrtkz IS INITIAL.
            w_poitem-distrib = w_src-vrtkz.
          ENDIF.
    Package No
          IF NOT w_src-packno IS INITIAL.
            w_poitem-pckg_no = w_src-packno.  "Package no
          ENDIF.
          IF w_poitem-delete_ind IS INITIAL AND
             w_poitem-short_text IS INITIAL AND
             w_poitem-plant IS INITIAL AND
             w_poitem-matl_group IS INITIAL AND
             w_poitem-quantity IS INITIAL AND
             w_poitem-po_unit IS INITIAL AND
             w_poitem-net_price IS INITIAL AND
             w_poitem-tax_code IS INITIAL.
            CLEAR lv_item.
          ELSE.
            APPEND w_poitem TO i_poitem.
            CLEAR: w_poitem.
            lv_item = 'X'.
          ENDIF.
          w_poitemx-po_item = w_src-ebelp.
          w_poitemx-delete_ind = 'X'.
          w_poitemx-short_text = 'X'.
          w_poitemx-plant = 'X'.
          w_poitemx-matl_group = 'X'.
          w_poitemx-quantity = 'X'.
          w_poitemx-po_unit = 'X'.
          w_poitemx-net_price = 'X'.
          w_poitemx-tax_code = 'X'.
          w_poitemx-item_cat = 'X'.
          w_poitemx-acctasscat = 'X'.
          w_poitemx-distrib = 'X'.
          IF NOT w_src-packno IS INITIAL.
            w_poitemx-pckg_no = 'X'.
          ENDIF.
          IF lv_item = 'X'.
            APPEND w_poitemx TO i_poitemx.
            CLEAR: w_poitemx,
                   lv_item.
          ENDIF.
    PO Deliery Address
          w_poaddrdelivery-po_item = w_src-ebelp.
          IF NOT w_src-adrn2 IS INITIAL.
            w_poaddrdelivery-addr_no = w_src-adrn2.
            APPEND w_poaddrdelivery TO i_poaddrdelivery.
            CLEAR w_poaddrdelivery.
          ENDIF.
    POschedule
          w_poschedule-po_item = w_src-ebelp.
          CLEAR: lv_date.
          CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
            EXPORTING
              date_external            = w_src-eindt
            IMPORTING
              date_internal            = lv_date
            EXCEPTIONS
              date_external_is_invalid = 1
              OTHERS                   = 2.
          IF NOT lv_date IS INITIAL.
            w_poschedule-del_datcat_ext = 'D'. "Delivery Date in Day Format
            w_poschedule-delivery_date = lv_date.
            w_poschedule-quantity = w_src-menge.
            APPEND w_poschedule TO i_poschedule.
            CLEAR w_poschedule.
            lv_schd = 'X'.
          ENDIF.
          w_poschedulex-po_item = w_src-ebelp.
          w_poschedulex-del_datcat_ext = 'X'.
          w_poschedulex-delivery_date = 'X'.
          w_poschedulex-quantity = 'X'.
          IF lv_schd = 'X'.
            APPEND w_poschedulex TO i_poschedulex.
            CLEAR : w_poschedulex,
                    lv_schd.
          ENDIF.
    PO Account Assignment
          w_poaccount-po_item = w_src-ebelp.
          w_poaccount-serial_no = w_src-zekkn.
    Distribution Indicator is 1
          IF w_src-vrtkz EQ '1'.
            w_poaccount-distr_perc = w_src-vproz.
            IF NOT w_src-menge IS INITIAL.
              CLEAR lv_menge.
              lv_menge = w_src-menge.
            ENDIF.
            lv_acct_qty = lv_menge * w_src-vproz / 100.
    Get Round value of Quanity
            frac = FRAC( lv_acct_qty ).
            IF frac EQ 0.
              lv_acct_qty = FLOOR( lv_acct_qty ).
            ELSE.
              lv_acct_qty = CEIL( lv_acct_qty ).
            ENDIF.
            w_poaccount-quantity = lv_acct_qty.
          ELSEIF w_src-vrtkz IS INITIAL.
            w_poaccount-quantity = w_src-menge.
          ENDIF.
          w_poaccount-gl_account = w_src-saknr.
          w_poaccount-costcenter = w_src-kostl.
          w_poaccount-asset_no = w_src-anln1.
          w_poaccount-wbs_element = w_src-wbs.
          w_poaccount-network = w_src-nplnr.
          w_poaccount-tax_code = w_src-mwskz.
          w_poaccount-activity = w_src-vornr.
          APPEND w_poaccount TO i_poaccount.
          CLEAR w_poaccount.
          w_poaccountx-po_item = w_src-ebelp.
          w_poaccountx-serial_no = w_src-zekkn.
          IF w_src-vrtkz EQ '1'.
            w_poaccountx-distr_perc =  'X'.
          ENDIF.
          w_poaccountx-quantity = 'X'.
          w_poaccountx-gl_account = 'X'.
          w_poaccountx-costcenter = 'X'.
          w_poaccountx-wbs_element = 'X'.
          w_poaccountx-network = 'X'.
          w_poaccountx-tax_code = 'X'.
          w_poaccountx-activity = 'X'.
          APPEND w_poaccountx TO i_poaccountx.
          CLEAR w_poaccountx.
    PO Services
          w_poservices-pckg_no = w_src-packno.  "Package no
          w_poservices-line_no = w_src-srv_line_no.    "Line item
          w_poservices-ext_line = w_src-extrow.    "External line
         w_poservices-outl_level = 0.
         w_poservices-outl_ind = 'X'.
          w_poservices-subpckg_no = w_src-sub_packno.  "Sub package no
          w_poservices-quantity = w_src-srqty.  "Service Quantity
          w_poservices-base_uom = w_src-srmeins.  "Service Basic unit of Measure
          w_poservices-price_unit = '1'.
         w_poservices-from_line = '1'.
          w_poservices-gr_price  = w_src-brtwr.  "GR Price
          w_poservices-short_text = w_src-sh_text1.    "Service Short Text
         w_poservices-matl_group = w_src-matkl.  "Material Group
          APPEND w_poservices TO i_poservices.
          CLEAR w_poservices.
    PO Service Access values
          w_posrvacc-pckg_no = w_src-packno.  "Package no
          w_posrvacc-line_no = w_src-srv_line_no. "Line item
          w_posrvacc-serno_line = w_src-zekkn.                  "'01'..
          IF w_src-vproz IS INITIAL.
            w_posrvacc-percentage = '100.0'.
          ENDIF.
          w_posrvacc-serial_no = w_src-zekkn.                   "'01'.
          w_posrvacc-quantity = w_src-srqty.  "Service Quantity
          w_posrvacc-net_value = w_src-srqty.  "Net value
          APPEND w_posrvacc TO i_posrvacc.
          CLEAR w_posrvacc.
        ENDIF.
    ***Create a NEW PO
        AT END OF ihrez.
    Call BAPI
          CALL FUNCTION 'BAPI_PO_CREATE1'
            EXPORTING
              poheader          = w_poheader
              poheaderx         = w_poheaderx
            IMPORTING
              exppurchaseorder  = gv_ebeln
            TABLES
              return            = i_return
              poitem            = i_poitem[]
              poitemx           = i_poitemx[]
              poaddrdelivery    = i_poaddrdelivery[]
              poschedule        = i_poschedule[]
              poschedulex       = i_poschedulex[]
              poaccount         = i_poaccount[]
              poaccountx        = i_poaccountx[]
              poservices        = i_poservices[]
              posrvaccessvalues = i_posrvacc[]
              extensionin       = i_extensionin[].
    Commit the Transaction
          CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
           EXPORTING
             WAIT          = 'X'.
    Regards,
    Deepthi.

    1. If we get error as  "In case of account assignment, please enter acc. assignment data for item" than First cehck whetaher u have authorization to Tcode ME23n or not. In my case, I din't had authorization to Me23n tcode.
    2. If we get Error as "Please Mainatain Services or Limits". Please create a Service PO in the following Order.
    *& Internal Table Declaration
    DATA : i_intern         TYPE STANDARD TABLE OF alsmex_tabline WITH HEADER LINE,
           i_poitem         TYPE STANDARD TABLE OF bapimepoitem,
           i_poitemx        TYPE STANDARD TABLE OF bapimepoitemx,
           i_poaddrdelivery TYPE STANDARD TABLE OF bapimepoaddrdelivery,
           i_poschedule     TYPE STANDARD TABLE OF bapimeposchedule,
           i_poschedulex    TYPE STANDARD TABLE OF bapimeposchedulx,
           i_poaccount      TYPE STANDARD TABLE OF bapimepoaccount,
           i_poaccountx     TYPE STANDARD TABLE OF bapimepoaccountx,
           i_poservices     TYPE STANDARD TABLE OF bapiesllc,
           i_posrvacc       TYPE STANDARD TABLE OF bapiesklc,
           i_extensionin    TYPE STANDARD TABLE OF bapiparex,
           i_return         TYPE STANDARD TABLE OF bapiret2.
    *& Work Area Declaration
    DATA:
          w_poheader       TYPE bapimepoheader,
          w_poheaderx      TYPE bapimepoheaderx,
          w_poitem         TYPE bapimepoitem,
          w_poitemx        TYPE bapimepoitemx,
          w_poaddrdelivery TYPE bapimepoaddrdelivery,
          w_poschedule     TYPE bapimeposchedule,
          w_poschedulex    TYPE bapimeposchedulx,
          w_poaccount      TYPE bapimepoaccount,
          w_poaccountx     TYPE bapimepoaccountx,
          w_poservices     TYPE bapiesllc,
          w_posrvacc       TYPE bapiesklc,
          w_extensionin    TYPE bapiparex,
          w_return         TYPE bapiret2.
    START-OF-SELECTION.
    Header Data
      w_poheader-comp_code = '5791'.  "Company Code
      w_poheader-doc_type = 'Z0CM'.   "Document type
      w_poheader-creat_date = sy-datum.  "lv_date.    "Creation Date
      w_poheader-created_by = sy-uname.    "Creator Name
      w_poheader-vendor = '0005012343'.     "Vendor
      w_poheader-pmnttrms = 'Z004'.   "Payment Terms
      w_poheader-purch_org = 'P000'.  "Purchase Organization
      w_poheader-pur_group = '001'.  "Purchase Group
      w_poheader-ref_1    = '004500007671'.   "OLD PO
      w_poheaderx-comp_code = 'X'.  "Company Code
      w_poheaderx-doc_type = 'X'.   "Document type
      w_poheaderx-creat_date = 'X'.    "Creation Date
      w_poheaderx-created_by = 'X'.
      w_poheaderx-vendor = 'X'.
      w_poheaderx-pmnttrms = 'X'.   "Payment Terms
      w_poheaderx-purch_org = 'X'.  "Purchase Organization
      w_poheaderx-pur_group = 'X'.  "Purchase Group
      w_poheaderx-ref_1 = 'X'.
    Item Data
      w_poitem-po_item = '000010'.
      w_poitem-short_text = 'Z0CM - Default Appr. Test  '.
      w_poitem-plant = '5368'.
      Trackign no
      w_poitem-trackingno = ''.
    Material group
      w_poitem-matl_group = '119'.
      w_poitem-po_unit = 'EA'. "Base Unit of Measure
      w_poitem-net_price = '17500.00'.  "Net Price
      w_poitem-tax_code = 'I0'.
      w_poitem-item_cat = '9'.
      w_poitem-acctasscat = 'K'.
      w_poitem-distrib = space.
    Package must be given in item to create Service PO
      w_poitem-pckg_no = 0000000001.
      APPEND w_poitem TO i_poitem.
      CLEAR: w_poitem.
      w_poitemx-po_item = '000010'.
      w_poitemx-delete_ind = 'X'.
      w_poitemx-short_text = 'X'.
      w_poitemx-plant = 'X'.
      w_poitemx-trackingno = 'X'.
      w_poitemx-matl_group = 'X'.
      w_poitemx-quantity = 'X'.
      w_poitemx-po_unit = 'X'.
      w_poitemx-net_price = 'X'.
      w_poitemx-tax_code = 'X'.
      w_poitemx-item_cat = 'X'.
      w_poitemx-acctasscat = 'X'.
      w_poitemx-distrib = 'X'.
      w_poitemx-pckg_no = 'X'.
      APPEND w_poitemx TO i_poitemx.
      CLEAR: w_poitemx.
    PO Deliery Address
          w_poaddrdelivery-po_item = '000010'.
            w_poaddrdelivery-addr_no = '0000061208'.
            APPEND w_poaddrdelivery TO i_poaddrdelivery.
            CLEAR w_poaddrdelivery.
    POschedule
          w_poschedule-po_item = '000010'..
    DATA : LV_DATE TYPE SY-DATUM,
           lv_schd.
          CLEAR: lv_date.
          CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
            EXPORTING
              date_external            = '12/2/2009'
            IMPORTING
              date_internal            = lv_date
            EXCEPTIONS
              date_external_is_invalid = 1
              OTHERS                   = 2.
          IF NOT lv_date IS INITIAL.
            w_poschedule-del_datcat_ext = 'D'. "Delivery Date in Day Format
            w_poschedule-delivery_date = lv_date.
            w_poschedule-quantity = '1.000'.
            APPEND w_poschedule TO i_poschedule.
            CLEAR w_poschedule.
            lv_schd = 'X'.
          ENDIF.
          w_poschedulex-po_item = '000010'.
          w_poschedulex-del_datcat_ext = 'X'.
          w_poschedulex-delivery_date = 'X'.
          w_poschedulex-quantity = 'X'.
          IF lv_schd = 'X'.
            APPEND w_poschedulex TO i_poschedulex.
            CLEAR : w_poschedulex,
                    lv_schd.
          ENDIF.
    PO Account Assignment
      w_poaccount-po_item = '000010'.
      w_poaccount-serial_no = '01'.
      w_poaccount-distr_perc = ''.
      w_poaccount-quantity = '1.000'.
      w_poaccount-gl_account = '0000603064'.
      w_poaccount-costcenter = '0053680100'.
      w_poaccount-asset_no = ''.
      w_poaccount-wbs_element = ''.
      w_poaccount-network = ''.
      w_poaccount-tax_code = 'I0'.
      w_poaccount-activity = ''.
      APPEND w_poaccount TO i_poaccount.
      CLEAR w_poaccount.
      w_poaccountx-po_item = '000010'.
      w_poaccountx-serial_no = '01'.
      w_poaccountx-distr_perc =  'X'.
      w_poaccountx-quantity = 'X'.
      w_poaccountx-gl_account = 'X'.
      w_poaccountx-costcenter = 'X'.
      w_poaccountx-wbs_element = 'X'.
      w_poaccountx-network = 'X'.
      w_poaccountx-tax_code = 'X'.
      w_poaccountx-activity = 'X'.
      w_poaccountx-cmmt_item = 'X'.
      APPEND w_poaccountx TO i_poaccountx.
      CLEAR w_poaccountx.
    Extension for ZZSub
      w_extensionin-structure = 'BAPI_TE_MEPOACCOUNTING'.
      w_extensionin-valuepart1+0(5) = '00010'..
      w_extensionin-valuepart1+5(2) = '01'.
      w_extensionin-valuepart1+28(5) = ''.
      APPEND w_extensionin TO i_extensionin.
      CLEAR w_extensionin.
      w_extensionin-structure = 'BAPI_TE_MEPOACCOUNTINGX'.
      w_extensionin-valuepart1+0(5) = '00010'.
      w_extensionin-valuepart1+5(2) = '01'.
      w_extensionin-valuepart1+11(1) = 'X'.
      APPEND w_extensionin TO i_extensionin.
      CLEAR w_extensionin.
    Extension to add Expense Type only
      w_extensionin-structure = 'BAPI_TE_MEPOHEADER'.
      w_extensionin-valuepart1+10(4) = '0131'.
      APPEND w_extensionin TO i_extensionin.
      CLEAR w_extensionin.
      w_extensionin-structure = 'BAPI_TE_MEPOHEADERX'.
      w_extensionin-valuepart1+10(4) = 'X'.
      APPEND w_extensionin TO i_extensionin.
      CLEAR w_extensionin.
      EXPORT i_extensionin[] TO MEMORY ID 'SUB'.
    PO Services
    PO Services( One Line Iem)
    Assign the dummy no as Pacakage no
      w_poservices-pckg_no = 0000000001.  "(assign package no as a dummy number)
      w_poservices-line_no = 0000000001.      "Line item
      w_poservices-outl_ind = 'X'.
    Assign Dummy no as sub package no
      w_poservices-subpckg_no = 0000000003.   "(Dummy No.) "Sub package no
      w_poservices-from_line = '1'.
      APPEND w_poservices TO i_poservices.
      CLEAR w_poservices.
    PO Services(Second Line Item )
    Assign the same sub package dummy no which is mentioned above
      w_poservices-pckg_no = 0000000003.   "(Dummy No.) "Sub package no
      w_poservices-line_no = 0000000002.
      w_poservices-ext_line = '0000000010'.     "External line
      w_poservices-quantity = '17500.0'.    "Service Quantity
      w_poservices-base_uom = 'EA'.    "Service Basic unit of Measure
      w_poservices-price_unit = '1'.
      w_poservices-gr_price  = '1'.    "GR Price
      w_poservices-short_text = 'Z0CM - Default Appr. T'.      "Service Short Text
    w_poservices-matl_group = '119'.  "w_src-matkl.  "Material Group
      APPEND w_poservices TO i_poservices.
      CLEAR w_poservices.
    PO Service Access values
      w_posrvacc-pckg_no = 0000000003.  "w_src-sub_packno.  "Sub package no
      w_posrvacc-line_no = 0000000002.  "w_src-srv_line_no. "Line item
      w_posrvacc-serno_line = '01'.
      w_posrvacc-percentage = '100.0'.
      w_posrvacc-serial_no = '01'.
      w_posrvacc-quantity = '17500.0'.  "w_src-srqty.  "Service Quantity
      APPEND w_posrvacc TO i_posrvacc.
      CLEAR w_posrvacc.
      DATA : gv_ebeln TYPE ebeln.
    Call BAPI
      CALL FUNCTION 'BAPI_PO_CREATE1'
        EXPORTING
          poheader          = w_poheader
          poheaderx         = w_poheaderx
        IMPORTING
          exppurchaseorder  = gv_ebeln
        TABLES
          return            = i_return
          poitem            = i_poitem[]
          poitemx           = i_poitemx[]
          poaddrdelivery    = i_poaddrdelivery[]
          poschedule        = i_poschedule[]
          poschedulex       = i_poschedulex[]
          poaccount         = i_poaccount[]
          poaccountx        = i_poaccountx[]
          poservices        = i_poservices[]
          posrvaccessvalues = i_posrvacc[]
          extensionin       = i_extensionin[].
    Commit the Transaction
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          wait = 'X'.
      WRITE:/5 gv_ebeln COLOR 5.
      SKIP 2.
      DATA : lv_msg TYPE string.
      LOOP AT i_return INTO w_return WHERE type = 'E'.
        CALL FUNCTION 'FORMAT_MESSAGE'
          EXPORTING
            id        = w_return-id
            lang      = 'EN'
            no        = w_return-number
            v1        = w_return-message_v1
            v2        = w_return-message_v2
            v3        = w_return-message_v3
            v4        = w_return-message_v4
          IMPORTING
            msg       = lv_msg
          EXCEPTIONS
            not_found = 1
            OTHERS    = 2.
        WRITE:/10 lv_msg.
      ENDLOOP.

  • How to create 'Planned service line' using BAPI_ENTRYSHEET_CREATE? Pl. help

    I need to create service entry sheet ( SES ) using input data from text file through BAPI_ENTRYSHEET_CREATE.
    If the input contains service line items, which are not present in PO, it should be treated as an unplanned service and correspondingly 'unplanned' indicator is to be set on ML81N ( Service netry sheet ) display.
    I want to make an entry unplanned if the input field external no. ( Field: BAPIESLLC-EXT_LINE ) is not matching with external no. field of corresponding purchase order to which the SES refers.
    The BAPI works fine for all cases except one. If the unplanned service line contains field SERVICE_NO value which is matching with a SERVICE_NO in PO, it is invariable treated by BAPI as  'PLANNED'. ie. BAPI decides whenther a service line is planned or unplanned based on SERVICE_NO only.
    For eg. Let a PO contains one service line with SERVICE_NO value 1008505.
                If SES input file contains 2 service entries with SERVICE_NO value 1008505.
                While creating SES, the BAPI should treat first entry as 'planned' and second line as 'unplanned'.
                But while running the program, both lines are created as 'Planned'  only, since SERVICE_NO value 1008505 exists in the PO.
    I need to set the service line planned/unplanned through my prgram, overriding the automatic setting up of BAPI_ENTRYSHEET_CREATE.
    Hope this clarifies my requirement.
    Grateful if somebody cam provide a solution.
    Thanks & Regards,
    Manju

    Do NOT USE BAPI_SALESORDER_CREATEFROMDATA, that FM is obsolete!
    Use BAPI_SALESORDER_CREATEFROMDAT1 .
    To build a reference to your contract you have to supply ORDER_HEADER_IN.
    Here´s a sample:
    MOVE:
    gs_vbak-vbeln TO ls_bapisdhd1-refobjkey,
    gs_vbak-vbeln TO ls_bapisdhd1-ref_doc,
    gs_vbak-vbtyp TO ls_bapisdhd1-refdoc_cat,
    gs_vbak-auart TO ls_bapisdhd1-refdoctype.
    also gothrouh the links
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/abap%2b-%2bsimple%2bprogram%2bto%2bcreate%2bsales%2border%2busing%2bbapi

  • Creating a service call using DI API

    Hi all,
    I have written code to connect to businessone.It is connecting.But after that the error is coming....
    code written is.....
    String c="C40001";
                        getConnection();
                        System.out.println("Connected");
                        IDocuments objServiceCall=SBOCOMUtil.newDocuments(company,SBOCOMConstants.BoObjectTypes_oServiceCalls);
                        objServiceCall.setCardCode(c);
                        objServiceCall.setDocDate(new Date());
    int i=objServiceCall.add();
    String callId=company.getNewObjectKey();
    Error:
    com.sap.smb.sbo.wrapper.com.ComFailException: Invoke of: GetBusinessObject
    Source: SAPbobsCOM.Company.6.7
    Description: You are not connected to a company
         at com.sap.smb.sbo.wrapper.com.Dispatch.invokev(Native Method)
         at com.sap.smb.sbo.wrapper.com.Dispatch.invokev(Unknown Source)
         at com.sap.smb.sbo.wrapper.com.Dispatch.callN(Unknown Source)
         at com.sap.smb.sbo.wrapper.com.Dispatch.call(Unknown Source)
         at com.sap.smb.sbo.api.Company.getBusinessObject(Unknown Source)
         at com.sap.smb.sbo.api.SBOCOMUtil.newDocuments(Unknown Source)
         at in.mobileone.www.b1.CreateServiceCall.main(CreateServiceCall.java:35)
    Exception in thread "main"
    Is it the correct approach or not.
    any one guide me in this issue.
    Thanks&Regards
    Madhu

    Hi Gianluigi,
        What you said is correct.At that time my system has some problem with businessone.Now the company object is creating.But the error is showing at
    the line of code....
         objServiceCall.setCardCode("C40001");
    no mapping found for cardcode...
    Is the above send code is correct? or there is another way to approach to create a service call through DI API.
    Thanks
    Madhu

  • Creating a service order using FM

    Hello everyone,
    I am new to CRM technical. I have a requirement to create a service order using standard function module passing only 3 parametrs like category1, category2 and short text. How should I start the report. Can anyone help me in posting the code and the approach.
    Thanks in advance!

    Hi Sandeep,
    The best approach to learn this development is to debug the standard functionality by providing the data which you need in your requirement. Then you will get familiar with what are structures which needs to be populated and send to One Order API - CRM_ORDER_MAINTAIN.
    This above mentioned API will be the one which you need to use in the creation of Service Order. So, you can also search with the above mentioned Module.
    Hope this helps. Scan the Forum for FAQ's on problems that you might get in the development.
    Thanks,
    Samantak.

  • XML Parser Error while creating Web service Client using JAX RPC

    hello evryone,
    Im facing XML Parser Error while creating web service client using JAX RPC. Im using Net Beans IDE for development purpose. I have wrote configuration file for client. Now i want to create Client stub. However i dont know how to do this in Net Beans. So i tried to do it from Command promt using command :
    wscompile -gen:client -d build -classpath build config-wsdl.xml
    here im getting Error:
    error parsing configuration file: XML parsing error: com.sun.xml.rpc.sp.ParseException:10: XML declaration may only begin entities
    Please help me out.
    Many thanks in advance,
    Kacee

    Can i use the client generated using jdeveloper 11g to import into the oracle forms 10g, i.e., form builder 10g. Currently this is the version we have in our office.

  • Creating Service Entry Sheet without using Service Master/Service lines

    We are invoking the BAPI_EntrySheet_Create to create the service entry sheet. We are currently facing this issue...
    1) For assigned PO's, we are getting the PO item and Account assignment information from BAPI_PO_GetDetail. We are using these values to populate the parameters/tables to invoke BAPI_EntrySheet_Create. For population the Entrysheetservices table, we are not using information from Service Master/Service lines but use the information we get from an external system to populate the Service lines(ESLL). We do not provide a Package No/Service information when invoking the BAPI but populate the service lines with short text, quantity, Gross price etc without service information like package no, outline indicator etc. The BAPI creates a service enty sheet successfully(this is without the SES Acceptance indicator not being set) but when we lookup the SES# from ML81n transaction the ESLL details lines are not displayed.
    When displaying the SES using transaction ML81N, the header information is displayed correctly but the lines are not displayed. The Header information is correctly populated in ESSR table and detail is also populated in ESLL table. I think the cross reference information is correctly set in ESLH table to pull up the detail when ML81N as it is missing the package/sub pack information.
    Your expert advise in resolving this issue is very much appreciate. Please advise.

    Hi,
    Creating Service entry sheet using bapi  BAPI_ENTRYSHEET_CREATE
    For creating service entry sheet follow below link and it helps to you.
    http://wiki.sdn.sap.com/wiki/display/ABAP/CreatingServiceEntrySheetusing+BAPI
    Regards,
    Sekhar

Maybe you are looking for

  • How to access loudspeaker in J2ME app

    How to access loudspeaker in J2ME app and know a status of a call which is initiated through app.

  • How to put a video within a video (not related to opacity!)

    Hi everyone! I ve been all over the internet for an answer but cant find one! This is getting really fustrating. This is my first serious editing project and I want it to be perfect So what I wanna do is make a transition from one clip to another by

  • Urgent SAPScript help

    hi i need to know the steps of changing the form for purchase order.i have chnaged the name of from using spro but when i go to me23n and click on print preview there is no output. Kindly list down the places where i should make the chnages. Any mate

  • [SOLVED] Banshee does not play rtsp protocol

    rtsp streams (radio station) does not work in the last version of banshee (1.5.1-1). in fact it worked fine in previous version. After launching banshee in the terminal there appears: [miguel@miguel ~]$ banshee-1 [Info 21:14:42.263] Running Banshee 1

  • Change Document - bulk of record

    Hi, I have a maintenace screen and changing the exisint value for 10 set of records. Now,  i'm passing these change records to change document f/n mod and the change documents are generated.  when i check cdpos table the change numbers are identifcal