String representation for a JCO.Structure

Hello,
I need to convert a JCO.Structure into a "SAP-understandable" String
because the RFC-Function used for communication accepts only
Strings as values.
Is there a way to achieve this in a generic way?
Thx.
Torsten

Hello,
I need to do something like that:
JCO.Structure myStruct = ...
myStruct.setValue(12345, "ORDER_NO");
myStruct.setValue(new BigDecimal(12.5d), "AMOUNT");
<b>String myStructString = "convert myStruct to String...";</b>
JCO.Function myFunction = ...
myFunction.getImportParameterList().setValue(myStructString, "STRUCT");
myJCOConnection.execute(myFunction);
Does anybody have an example on how to successfully do the struct to
string conversion mentioned above?
Torsten

Similar Messages

  • Cfchart and JSON string representation

    I am trying to pass a JSON string representation for the attribute "plotarea" in this way :
    <cfchart
    chartWidth="800"
    chartHeight="600"
    showLegend="yes"
    format="png"
    title="Commandes"
    plotarea='#{"margin-top":"dynamic"}#' >
    But I got following error :
    Error casting an object of type to an incompatible type. This usually indicates a programming error in Java, although it could also mean you have tried to use a foreign object in a different way than it was designed.
    Is there any documentation explaining how to use "JSON string representation" in cfchart attributes ?

    Code_Worm wrote:
    Is it possible for me to call my toString method of Manager class within Branch class?Sure as long as it is public. There is no magic or any difference in regards to the toString method to any other method that you create. So somewhere in your Branch class you have:
    String blah = manager.toString();

  • Help for a JCO rookie: How to feed import parameter into BAPI_USER_CREATE1

    Hi,
    I want to use JCO and BAPI_USER_CREATE1 to create users in SAP systems, following the steps in the JCO tutorial.
    I have difficulties with suppying the import parameters, for example "PASSWORD"
    function.getImportParameterList().setValue("XYZ","USERNAME");
    is working, but
    function.getImportParameterList().setValue("SECRET","PASSWORD");
    -->Cannot convert a value of 'GEHEIM' from type java.lang.String to STRUCTURE at field PASSWORD
    runs into an error.
    Can someone be so kind to provide a code snippet or a link to "how to deal with import structures in JCO"??
    Thanx in advance, Dieter

    Moin Dieter,
    the field password is of type Structure. Hence you will need to something like the following -
    JCO.Structure passStructure = function.getImportParameterList().getStructure("PASSWORD");
    passStructure.setValue("GEHEIM", "BAPIPWD");
    That should do the trick.
    T00th

  • Set BAPITID in JCO.Structure

    hello all,
    i'm using JCO to monitoring CCMS architecture; i need to read properties of each MTE of CCMS.
    my problem is:
    i have a TID set of value for an MTE and i want to get results from the bapi:
    BAPI_SYSTEM_MTE_GETPERFCURVAL
    my code:
    nodes = table "TREE_NODES" resulting from BAPI_SYSTEM_MON_GETTREE call;
    // set BAPITID structure as import param for bapi
    IMetaData metaTid      = myJCORepository.getStructureDefinition("BAPITID");
    JCO.Structure struTid = new JCO.Structure(metaTid);
    struTid.setValue(nodes.getString("MTSYSID"),          "MTSYSID");
    struTid.setValue(nodes.getString("MTCLASS"),          "MTCLASS");
    struTid.setValue(nodes.getString("MTNUMRANGE"),"MTNUMRANGE");
    struTid.setValue(nodes.getString("MTMCNAME"),      "MTNUMRANGE");
    struTid.setValue(nodes.getString("MTUID"),           "MTUID");
    struTid.setValue(nodes.getString("MTINDEX"),          "MTINDEX");
    struTid.setValue(nodes.getString("EXTINDEX"),      "EXTINDEX");
    JCO.Function getPerfData = createFunction("BAPI_SYSTEM_MTE_GETPERFPROP");
    if (getPerfData != null)
    JCO.ParameterList input6     = getPerfData.getImportParameterList();
    // input param:
    input6.setValue(struTid, "TID") ;
    input6.setValue(user, "EXTERNAL_USER_NAME");
    super.mConnection.execute(getPerfData);
    // leggo eventuali errori derivati dalla chiamata alla BAPI
    returnStructure = null;
    returnStructure =  getPerfData.getExportParameterList ().getStructure("RETURN");
    System.out.println( "BAPI_SYSTEM_MTE_GETPERFPROP RETURN : " + returnStructure.getString("TYPE") + " " +
    returnStructure.getString("ID") + " " + returnStructure.getString("NUMBER") + " " +returnStructure.getString("MESSAGE"));
    JCO.Structure propertiesStructure =  getPerfData.getExportParameterList ().getStructure("PROPERTIES");
    // at this point my code return:
    (error type 'E')
    RA 341 No additional information available (function BAPI_SYSTEM_MTE_GETPERFCURVAL)
    XAL 1.0 documentation write:
    RA 341 : An unknown problem occurred during the execution of the method.
    any idea?

    hello i have found a solution, i hope this will be helpful for anyone.
    this is an example using html auto generated template.
    1. method call
                this.debugBAPI_SYSTEM_MTE_GETPERFCURVAL(
                     nodes.getString("MTSYSID")
                     ,nodes.getString("MTCLASS")
                     ,nodes.getString("MTNUMRANGE")
                     ,nodes.getString("MTMCNAME")
                     ,nodes.getString("MTUID")
                     ,nodes.getString("MTINDEX")
                     ,nodes.getString("EXTINDEX")) ;
    2. method definition:
    public void debugBAPI_SYSTEM_MTE_GETPERFCURVAL(String MTSYSID, String MTCLASS, String MTNUMRANGE, String MTMCNAME, String MTUID, String MTINDEX, String EXTINDEX)
    System.out.println("debugBAPI_SYSTEM_MTE_GETPERFCURVAL") ;
    JCO.Function function = mRepository.getFunctionTemplate("BAPI_SYSTEM_MTE_GETPERFCURVAL").     getFunction();
    System.out.println("function : " + function) ;
    JCO.ParameterList input2 = function.getImportParameterList();
    JCO.Structure st = input2.getStructure("TID") ;
        st.setValue(MTSYSID,     "MTSYSID");
        st.setValue(MTCLASS,     "MTCLASS");
        st.setValue(MTNUMRANGE,      "MTNUMRANGE");
        st.setValue(MTMCNAME,     "MTMCNAME");
        st.setValue(MTUID,     "MTUID");
        st.setValue(MTINDEX,     "MTINDEX");
        st.setValue(EXTINDEX,     "EXTINDEX");
    input2.setValue(<myR3user>, "EXTERNAL_USER_NAME");
    mConnection.execute(function);
    JCO.Structure currValStructure =  function.getExportParameterList ().getStructure("CURRENT_VALUE");
    System.out.println("currValStructure : " + currValStructure) ;
    String oldMaxRows = JCO.getProperty("jco.html.table_max_rows");
    JCO.setProperty("jco.html.table_max_rows", "99999");
    currValStructure.writeHTML("c:
    BAPI_SYSTEM_MTE_GETPERFCURVAL.html");
    JCO.setProperty("jco.html.table_max_rows", oldMaxRows);
    JCO.Structure returnStructure =  function.getExportParameterList ().getStructure("RETURN");
    System.out.println( "BAPI_SYSTEM_MTE_GETPERFCURVAL RETURN : " + returnStructure.getString("TYPE") + " " +
    returnStructure.getString("ID") + " " +
    returnStructure.getString("NUMBER") + " " +     returnStructure.getString("MESSAGE"));
    open c:\BAPI_SYSTEM_MTE_GETPERFCURVAL.html and then check the result.

  • How to fix "no valid 'aps-environment' entitlement string found for application"?

    I am trying very very hard to create a simple simple iOS app which can recieve push notifications.  My only reason for doing this is to establish a procedure for some other team members to use.  Our shop is fairly new to iOS dev, I personally am completely inexperienced with iOS dev and Xcode.  I've stumbled through tens of tutorials, articles, and trouble posts from Apple and elsewhere and I feel like I'm nearly there.  Here is where I've got to (note I'm using Xcode 4.3 and trying initially to deploy just to iOS 5.1, and I gather that some things may have changed recently vs earlier versions of Xcode, but again I'm new to all this -- and finding it completely confusing and convoluted):
    1. I've got a provisioning profile on my iPhone which has Push enabled
    2. In my test Xcode project I've got that provisioning profile selected as the signing identity (in Build Settings > Code Signing)
    3. I've got my bundle identifier under Summary and Info > Custom iOS Target Properties set properly* (I think??)
    4. I've got registerForRemoteNotificationTypes being called in my delegate's didFinishLaunchingWithOptions
    5. I've got didRegisterForRemoteNotificationsWithDeviceToken and didFailToRegisterForRemoteNotificationsWithError in my delegate, set up to log the device token or error respectively
    6. I've got Enable Entitlements checked under Summary. 
    7. Right below that the Entitlements File selected is Tinker6 (the name of my project), which was generated automatically when I checked Enable Entitlements
    8. In the Tinker6.entitlements file I've got the following (which I've gathered is correct based on several different posts all over the web, but which I can't find anything definitive from Apple itself on):
    When I attempt to run this on my device, I get the following error in Xcode output:
    2012-06-11 12:45:23.762 Tinker6[13332:707] Failed to get token, error: Error Domain=NSCocoaErrorDomain Code=3000 "no valid 'aps-environment' entitlement string found for application" UserInfo=0x24a3b0 {NSLocalizedDescription=no valid 'aps-environment' entitlement string found for application}
    I've tried setting get-task-allow to NO, aps-environment to production, all four possible combinations, same thing.
    How can I get past this?  Where is definitive documentation on this?
    -- further background follows --
    *As far as the bundle id, I am still not clear on how this should be set in relation to App Ids and Profile ids in the Provisioning profile.  In the Provisioning portal under App Ids I have this (I've scrambled the number and domain but otherwise structurally will be the same):
    And the two places bundle id is set I have this:
    I am not at all sure these are correct or whether one or both should be set to 12355456A7.com.whatever.tinker, though I've tried those earlier in the process with no success...
    Message was edited by: jwlarson

    Solution: startover, do everything exactly the same (but with new IDs and certs for everything), and it worked.

  • Sender FCC for the following structure.

    Hi,
    I am using the following source structure:
    <Goods>      0..unbounded(Data Type)
           <HeaderData>(1..1)
                                <1>
                                <2>
                                 <3>
            <ItemData>(1..unbounded)
                             <10>
                             <11>
                             <12>
                              <13>
                                <n>
    1:What will be the FCC details for the above structure?
    2:Solution for the following error:
    "Conversion initialization failed: java.lang.Exception: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: 'xml.documentName' is a mandatory parameter if more than one recordset per message is specifiedMandatory parameter 'xml.keyfieldName': no value found"
    Regards,
    Vishal.

    P836340 wrote:>
    > 1:What will be the FCC details for the above structure?
    Document Name:  your msg type
    Document Offset:
    Recordset Name:
    Recordset Namespace:
    Recordset Structure:  HeaderData,1,ItemData,*
    Recordset Sequence:  Ascending\Descending
    Recordset per Message:  *
    KeyField Name:   give one value which u want to use as a key
    KeyField Type: String(Case Sensitive)
    header.fieldFixedLengths     fix length according to your requirement eg: 2,2,2
    header.keyFieldValue             value of field which fixed as key field in header
    header.fieldNames                     1,2,3
    body.fieldFixedLengths             fix length according to your requiremen   eg: 2,2,2,2
    body.keyFieldValue     02            value of field which fixed as key field in item
    body.fieldNames                     10,11,12,13
    > 2:Solution for the following error:
    > "Conversion initialization failed: java.lang.Exception: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: 'xml.documentName' is a mandatory parameter if more than one recordset per message is specifiedMandatory parameter 'xml.keyfieldName': no value found"
    It is because you would have missed the values for the mandatory fields like documentName and keyfieldName
    Thanks,
    Arivarasu
    Edited by: Arivarasu S on Aug 5, 2009 9:32 PM
    Edited by: Arivarasu S on Aug 5, 2009 9:33 PM
    Edited by: Arivarasu S on Aug 5, 2009 9:35 PM

  • JCO.Structure NullPointerException

    Hi All,
    I am having a java.lang.NullPointerException when I try to call an RFC, that my ABAP colleague makes for me..
    The execption happends when I try to get the Structure "RETURN".
    I think, the suspect is the data type thah the rFC returns, if returns something.
    I have executed the RFC in the SAP workbecnh, it seems to run Ok.
    Sicne I am foraigner in the SAP land, I am not sure if I am going in the wrong way, or in the correct way but with the worng map....
    Thanks in advance
    JCO.Function function = null;
    JCO.Table codes = null;
    try {
        function = this.createFunction("YFH_INTERFACE_DADOS_MESTR");
          if (function == null) {
            System.out.println("BAPI " +
                               " not found in SAP.");
            System.exit(1);
          mConnection.execute(function);
          JCO.Structure returnStructure =
            function.getExportParameterList().getStructure("RETURN"); // The ERROR happends here
          if (! (returnStructure.getString("TYPE").equals("") ||
                 returnStructure.getString("TYPE").equals("S")) ) {
            System.out.println("DADOS= "+returnStructure.getString("MESSAGE"));
            System.exit(1);

    Hi Bhavik,
    I follow your advice, an look at the SAP side.
    I realzie that I need to send a table as input parameter,
    and this RRFC returns me another table.
    So, I think, I need to create a METADATA, a try to pass the parameters.
    After that, I guess I am goint to need to call:
    function.getExportParameterList().getStructure("NAME_OUTPUT_TABLE");
    Tthe code that I am trying right now is, let me know what do you think:
        /---- PARAMETRO DE ENTRADA -/
        // Create metadata definition of the input parameter list
        JCO.MetaData input_md = new JCO.MetaData("INPUT");
        input_md.addInfo("PERNR", JCO.TYPE_NUM,  8, 35, 0);
        input_md.addInfo("ENDDA", JCO.TYPE_DATE, 8, 35, 0);
        input_md.addInfo("BEGDA", JCO.TYPE_DATE,  8, 35, 0);
        // Create the input parameter list from the metadata object
        JCO.ParameterList input = JCO.createParameterList(input_md);
        // Set the first (and only) input parameter
        input.setValue("0080055", "PERNR");
        input.setValue("09062005", "ENDDA");
        input.setValue("09062005", "BEGDA");
        /----FIM  PARAMETROS DE ENTRADA -/
        JCO.Function function = null;
        JCO.Table codes = null;
        try {
          function = this.createFunction(strFunction);
          if (function == null) {
            System.out.println("RFC " +strFunction +
                               " not found in SAP.");
            System.exit(1);
          System.out.println("RFC "+ strFunction + " EXISTE=OK.....\n");
    // Here we go...
          mConnection.execute(function);
          System.out.println("Debug:.. executou...");
          JCO.Structure returnStructure =
            function.getExportParameterList().getStructure("DM_END");
          System.out.println("Debug:.. antes del IF..");
          if (! (returnStructure.getString("TYPE").equals("") ||
                 returnStructure.getString("TYPE").equals("S")) ) {
            System.out.println("DADOS= "+returnStructure.getString("MESSAGE"));
            System.out.println("sAINDO....abort..");
            System.exit(1);
         codes =   function.getTableParameterList().getTable("DM_END");
          for (int i = 0; i < codes.getNumRows(); i++) {
            codes.setRow(i);
            System.out.println(codes.getString("CNAME") + '\t' +
                               codes.getString("FATXT"));
        catch (Exception ex) {
          ex.printStackTrace();
          System.exit(1);

  • Numeric Value to String representation

    Hi!
    I was wondering if there was an easy way to getting the String representation of a number (specifically an integer). I am trying to format a message that would be like this:
    Three (3) records have been updated.
    Getting the (3) is easy, but my problem is getting the word Three. There are numerous records, which means an Array would be close to impossible coz it will take time to produce an output.
    Is there an easy way? (1 = One, 2 = Two,..., 20 = Twenty)
    Thanks!

    I'd guess that a switch statement will be about as fast as anything else, since it's a static structure and the compiler should be able to optimize it effectively.
    int number = setMeToAValue;
    switch (number) {
        case 0:  System.out.println("zero"); break;
        case 1:  System.out.println("one"); break;
        case 2:  System.out.println("two"); break;
        case 3:  System.out.println("three"); break;
        case 4:  System.out.println("four"); break;
        case 5:  System.out.println("five"); break;
        case 6:  System.out.println("six"); break;
        case 7:  System.out.println("seven"); break;
        case 8:  System.out.println("eight"); break;
        case 9:  System.out.println("nine"); break;
        case 10: System.out.println("ten"); break;
        case 11: System.out.println("eleven"); break;
        case 12: System.out.println("twelve"); break;
        case 19  System.out.println("nineteen"); break;
        case 20  System.out.println("twenty"); break;
        case 30  System.out.println("thirty"); break;
        case 40  System.out.println("forty"); break;
    To get 21 go after the parts and concantenate them. case 20 + case 1 produces 21, etc

  • System.__ComObject String Representation

    I have what is probably a very noob question. I have a variable of type System.__ComObject, and I want to try to get a String representation of this for debugging purposes. When I simply print the variable, "System.__ComObject" is displayed.
    For context, I have a basic html page which looks like this:
    <html>
        <body>
            <table>
                <tr>
                    <th>...</th>
                </tr>
                <tr>
                    <td><a href...>...</a></td>
                </tr>
            </table>
        </body>
    </html>
    And I am trying to drill down to the href links in the table. I have this code:
    $webclient = new-object System.Net.WebClient
    $webclient.UseDefaultCredentials=$true
    $geturl = Invoke-WebRequest $url
    $webpage = $geturl.parsedhtml.body
    $list = $webpage.table#.tr
    echo "list: $webpage"
    if($list -eq $null) {
        echo "list is null"
    } else {
        echo "list is not null"
    Where $list is null for some reason. I am attempting to determine what $webpage contains so I can figure out why it can't find the table tag.
    Any help is appreciated.

    Hi Aussiemcgr,
    We can view the available methods via "$webpage|get-member" before you use the method.
    If there is tables inside this webpage, please try to use the script below:
    @($geturl.ParsedHtml.getElementsByTagName("table"))[0].OuterHTML
    For more detailed information about this script, please check this article:
    Importing Website Tables into Excel
    If there is anything else regarding this issue, please feel free to post back.
    Best Regards,
    Anna Wang

  • One Communication Channel for two XML-Structure

    Hi to all!
    i'm Newbee in XI.
    i register one Communication Channel to recieve two different XML-Structure and when i sent second structure there was a Mapping error, because XI waiting for first XML-Structure.
    I'd like to ask if there are any additional condition that i must tune up to make it possible or just it's impossible?

    Hi,
    Please refer below links
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/121b053d-0401-0010-539f-f9295efb7bad
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3a913f71-0601-0010-7a83-dfd3208a9a0b
    how to find the URL of deployed Web services?
    Creating .NET Web service
    http://www.15seconds.com/issue/010430.htm
    Also refer SOAP Framework to generate the common wsdl for both the messages with single SOAP CC
    http://help.sap.com/saphelp_nw04s/helpdata/en/bb/ddb33d2ae46b3be10000000a114084/frameset.htm
    Thanks
    swarup

  • Ensure field sequence is correct for data for mutiple source structure

    Hi,
    I'm using LSMW with IDOC message type 'FIDCC2' Basic type 'FIDCCP02'.
    I'm getting error that packed fields are not permitted.
    I'm getting Ensure field sequence is correct for data for mutiple source structures.
    Source Structures
           HEADER_STRUCT            G/L  Account Document Header
               LINE_STRUCT              G/L Account Document Line
    Source Fields
           HEADER_STRUCT             G/L  Account Document Header
               BKTXT                          C(025)    Document  Header Text
               BLART                          C(002)    Document Type
               BLDAT                          DYMD(008) Document Date
               BUDAT                          DYMD(008) Posting Date
               KURSF                          C(009)    Exchange rate
               WAERS                          C(005)    Currency
               WWERT                          DYMD(008) Translation Date
               XBLNR                          C(016)    Reference
               LINE_STRUCT               G/L Account Document Line
                   AUFNR                          C(012)    Order
                   HKONT                          C(010)    G/L Account
                   KOSTL                          C(010)    Cost Center
                   MEINS                          C(003)    Base Unit of Measure
                   MENGE                          C(013)    Quantity
                   PRCTR                          C(010)    Profit Center
                   SGTXT                          C(050)    Text
                   SHKZG                          C(001)    Debit/Credit Ind.
                   WRBTR                          AMT3(013) Amount
    I have changed PAC3 field for caracters fields of same length to avoid erreur message of no packed fields allowed.
    Structure Relations
           E1FIKPF FI Document Header (BKPF)         <<<< HEADER_STRUCT G/L  Account Document Header
                   Select Target Structure E1FIKPF .
               E1FISEG FI Document Item (BSEG)          <<<< LINE_STRUCT   G/L Account Document Line
                   E1FISE2 FI Document Item, Second Part of E1FISEG   (BSEG)
                   E1FINBU FI Subsidiary Ledger (FI-AP-AR) (BSEG)
               E1FISEC CPD Customer/Vendor  (BSEC)
               E1FISET FI Tax Data (BSET)
               E1FIXWT Extended Withholding Tax (WITH_ITEM)
    Files
           Legacy Data          On the PC (Frontend)
               File to read GL Account info   c:\GL_Account.txt
                                              Data for Multiple Source Structures (Sequential Files)
                                              Separator Tabulator
                                              Field Names at Start of File
                                              Field Order Matches Source Structure Definition
                                              With Record End Indicator (Text File)
                                              Code Page ASCII
           Legacy Data          On the R/3 server (application server)
           Imported Data        File for Imported Data (Application Server)
               Imported Data                  c:\SYNERGO_CREATE_LCNA_FI_GLDOC_CREATE.lsmw.read
           Converted Data       File for Converted Data (Application Server)
               Converted Data                 c:\SYNERGO_LCNA_FI_GLDOC_CREATE.lsmw.conv
           Wildcard Value       Value for Wildcard '*' in File Name
    Source Structures and Files
           HEADER_STRUCT G/L  Account Document Header
                         File to read GL Account info c:\GL_Account.txt
               LINE_STRUCT G/L Account Document Line
                           File to read GL Account info c:\GL_Account.txt
    File content:
    Document  Header Text     Document Type     Document Date     Posting Date     Exchange rate     Currency     Translation Date     Reference     
    G/L Account document     SA     20080401     20080409     1.05     CAD     20080409     Reference     
    Order     G/L Account     Cost Center     Base Unit of Measure     Quantity     Profit Center     Text     Debit/Credit Ind.     Amount
         44000022                    1040     Line item text 1     H     250
         60105M01     13431     TO     10          Line item text 2     S     150
    800000     60105M01                         Line item text 3     S     100
         60110P01     6617     H     40          Line item text 4     S     600
         44000022                    ACIBRAM     Line item text 5     H     600
    The file structure is as follow
    Header titles
    Header info
    Line titles
    Line1 info
    Line2 info
    Line3 info
    Line4 info
    Line5 info
    Could someone direct me in the wright direction?
    Thank you in advance!
    Curtis

    Hi,
    Thank you so much for yout reply.
    For example
    i have VBAK(Heder structure)
              VBAP( Item Structure)
    My file should be like this i think
    Identification content         Fieldnames
         H                               VBELN      ERDAT     ERNAM        
                                          Fieldvalues for header
          H                              1000          20080703   swapna
    Identification content         Fieldnames
        I                                   VBELP     AUART 
                                          Fieldvalues for item
        I                                  001             OR
                                           002             OR
    Is this format is correct.
    Let me know whether i am correct or not

  • How to extract data into the set-up table for 2LIS_06_INV LIS structure

    We are using ECC 6.0 and SAP BI NW 2004S. I activated the 2LIS_06_INV  (Invoice Verification) structure. Interestingly, I don't see any Events under this structure  (MC06M_0ITM) - my understanding is the events usually determine what type of data is generated for a given structure.
    I see Invoice Verification when I use the Inventory Management -Perform Setup  option when doing the set-up tables. However, when I use this option, I get a message saying " No extraction structure active or no BW connected".
    Can someone list the pre-requisites and the steps to load the set-up table for the 2LIS_06_INV structure.
    Thanks,
    Sanjay

    1: RSA5 Activate Data Source
    2: LBWE Activate datasource again
    3: SBIW Fill setup table 'Settings for Application-Specific DataSources (PI)'-> 'Initialization'->'Filling in the Setup Table'->'Application-Specific Setup of Statistical Data'->'Invoice Verification - Execute Reconstruction'

  • Calling a method via String representation of instance

    Is it possible to call a method of a specific (and already existing) instance of a class using a string representation of the instance?

    By "String representation of an instance," I simply mean a string that has the same format as a normal method call would have. So where a method would normally be called like this:
    ClassX itsInstance = new ClassX();
    itsInstance.methodX();
    The string representation would be:
    String instanceName = "itsInstance";
    And there would be some way of using this string to call the method referred to by instanceName.
    The idea here is that I want to use the existing instance, whereas using reflection, as below, would create a new instance:
    String className = "X";
    String methodName = "print";
    Class xClass = Class.forName(className);
    Method xMethod = xClass.getMethod(methodName,null);
    Object object = xClass.newInstance();
    xMethod.invoke(object,null);

  • [svn] 1751: Bug: BLZ-174 - MessageClient.testMessage() is incorrectly doing a string compare for the subtopic header of an inbound message against the subtopic value (which may contain wildcards) that the Consumer is using.

    Revision: 1751
    Author: [email protected]
    Date: 2008-05-15 14:21:43 -0700 (Thu, 15 May 2008)
    Log Message:
    Bug: BLZ-174 - MessageClient.testMessage() is incorrectly doing a string compare for the subtopic header of an inbound message against the subtopic value (which may contain wildcards) that the Consumer is using.
    QA: No - customer verified the fix.
    Doc: No
    Ticket Links:
    http://bugs.adobe.com/jira/browse/BLZ-174
    Modified Paths:
    blazeds/branches/3.0.x/modules/core/src/java/flex/messaging/MessageClient.java
    blazeds/branches/3.0.x/modules/core/src/java/flex/messaging/services/MessageService.java

    If you create a metadatatype with a single metdata block, and you reference that in your vm/cm cell attribute using a *one* based index, Excel seems to see the link and it honors it when saving the spreadsheet.
    So, I ended up with something like:
    <c ... cm="1"/> (I'm dealing with cell metadata, but the concept is equivalente to value metadata)
    <metadataTypes count="1">
      <metadataType name="MyMetaType" .../>
    </metadataTypes>
    <futureMetadata count="1" name="MyMetaType">
      <bk>
        <extLst><ext
    uri="http://example" xmlns:x="http://example"><x:val>87</x:val></ext></extLst>
      </bk>
    </futureMetadata>
    <cellMetadata count="1">
      <bk><rc
    t="1" v="0"/></bk> <!-- this is what gets referenced as cm=1 on the cell -->
    </cellMetadata>
    Hope this helps. 

  • Here's how to use DYNAMIC tables for almost any structure (4.6C onwards)

    Hi guys
    I'm describing a  feature  here that has been around since 4.6C that is not really well known but can really simplfy programming where you need to get data into some sort of internal table and then display it either as a classical list or as al ALV grid.
    This feature is RTTI which allows you to retrieve your structure, build a dynamic FCAT (Field catalog) and a Dynamic table.
    Here's a really quick little program which reads 200 entries from VAPMA into a dynamic table. Any structure will work if you use the code sample shown.
    To pass it to an ALV GRID  is then really simple as you've already got the Field Catalog, Table and Data.
    The method I'm showing below will work for almost ANY structure you care to name whether or not the fields are in the data dictionary.
    I create a dynamic FCAT and dynamic table based on the FCAT and then populate it.
    You can create field catalogs dynamically quite simply by using the new RTTI facility available from 4.6C onwards.
    (From here it's only a small step to dynamic tables and EASY ALV grid displays)
    Example to create dynamic FCAT and table and populate it with 200 entries from VAPMA
    PROGRAM ZZ_BUILD_FLDCATALOG.
    tables: vapma.
    Define any structure
    types: begin of s_elements,
    vbeln type vapma-vbeln,
    posnr type vapma-posnr,
    matnr type vapma-matnr,
    kunnr type vapma-kunnr,
    werks type vapma-werks,
    vkorg type vapma-vkorg,
    vkbur type vapma-vkbur,
    status type c,
    end of s_elements.
    end of your structure
    data lr_rtti_struc type ref to cl_abap_structdescr .
    data:
    zog like line of lr_rtti_struc->components .
    data:
    zogt like table of zog,
    wa_it_fldcat type lvc_s_fcat,
    it_fldcat type lvc_t_fcat ,
    dy_line type ref to data,
    dy_table type ref to data.
    data: dref type ref to data.
    field-symbols: <fs> type any,
    <dyn_table> type standard table,
    <dyn_wa>.
    *now I want to build a field catalog
    *First get your data structure into a field symbol
    create data dref type s_elements.
    assign dref->* to <fs>.
    lr_rtti_struc ?= cl_abap_structdescr=>describe_by_data( <fs> ).
    zogt[] = lr_rtti_struc->components.
    Now build the field catalog.  zogt has the structure in it from RTTI.
    loop at zogt into zog.
    clear wa_it_fldcat.
    wa_it_fldcat-fieldname = zog-name .
    wa_it_fldcat-datatype = zog-type_kind.
    wa_it_fldcat-inttype = zog-type_kind.
    wa_it_fldcat-intlen = zog-length.
    wa_it_fldcat-decimals = zog-decimals.
    wa_it_fldcat-coltext = zog-name.
    wa_it_fldcat-lowercase = 'X'.
    append wa_it_fldcat to it_fldcat .
    endloop.
    Let's create a dynamic table and populate it
    call method cl_alv_table_create=>create_dynamic_table
    exporting
    it_fieldcatalog = it_fldcat
    importing
    ep_table = dy_table.
    assign dy_table->* to <dyn_table>.
    create data dy_line like line of <dyn_table>.
    assign dy_line->* to <dyn_wa>.
    select vbeln posnr matnr kunnr werks vkorg vkbur
    up to 200 rows
    from vapma
    into corresponding fields of table <dyn_table>.
    from here you can pass your table to a GRID for display etc etc.
    Cheers
    Jimbo

    Thanks for the info.
    I went to their web site and also Googled.
    I found a great review on their photographer's books on nikonians.org
    They use an HP/Indigo Ultrastream 3000 digital offset press for all hardcover books, which is GREAT!
    I did sign up and requested the 45 day trial "photographer" account.
    I am curious if Shared Ink offers a size that matches the ONLY current book size from Aperture, the odd 8.5x11.
    In the above review, I saw that Shared Ink offers a 12x12 book.. very nice! Except you will need to design that one in CS2
    So then, all that Apple really needs to do is simply add the ability to select/create custom book sizes. Then we don't need a printing service from Apple, as there are plenty of options out there, and more arriving on the market each month!

Maybe you are looking for

  • CR2 Files Corrupting on Import

    Hi I have an issue with importing CR2 RAW and JPEG files into Windows 7. This isn't an Adobe issue but I'm hoping someone just might be able to put me on the right track A percentage of the files are being corrupted. I've tried importing directly fro

  • Trial version of Elements 13 won't recognise my printer. Anyone else had this problem?

    I'm running a trial version of Elements 13 and cannot print either a PSD file or JPG file. I get an error message that it does not recognise the default printer. I'm able to print emails and Word documents, so it is undoubtedly an Elements issue.

  • Synchronizing Address Book with Outlook Contacts

    Help please!  My 8120 Pearl will not synch with changes to my Outlook Contacts.  It seems to pick up a copy of my Contacts from a few months back each time I synch. Even if I clear my device address book from the device manager (backup and restore) a

  • Procedure truncating leading zeros

    Hello, I'm setting up sequences for my sample database, in my design I have my ID columns in this format Staff: S110001, Parents: P110001 etc. When I try to implement this in a sequence like: create sequence Pnt_seq1 start with 0001; insert into pare

  • Can I configure some ports on FI-6200UP GEM as server ports?

    Hi, I need your help! I know FI-6100 doesn't support to be configured its some port on GEM as server ports. Is it possible to configure some ports on FI-6200UP GEM as server ports? And also, I wonder that some ports(1/9-16) on a port group(Second) ca