Passing regexp_replace backreference to a function; type conversion problem

I am trying to convert some text within my CLOB field to HTML links.
The format of the (part of the link I am having problems with) is:
<link 12>
which I wish to convert to
url_dest
I am trying to pass the backreference \1 (being the number 12 in this case) in regexp_replace to a simple function I have made and when I run it I receive the error:
ORA-06502: PL/SQL: numeric or value error: character to number conversion error
I have tested the function on its own with passing a string and it works fine.
I have passed the string from the backreference to the function and back out as the return value and it works fine.
However, when I try to pass the string back reference (a set of digits) to use as the NUMBER ID in my where clause, it always returns this error. I have tried CASTing / TO_NUMBER in every way possible I can think of, using temporary variables etc. and still the same error.
=====
CREATE OR REPLACE
FUNCTION GETLINK (linkid IN CLOB)
RETURN VARCHAR2 AS
linkstring VARCHAR2(4000);
linkchar VARCHAR(4000);
linkint NUMBER;
BEGIN
linkchar := TO_CHAR(linkid);
linkint := TO_NUMBER(linkchar);
SELECT url_dest INTO linkstring FROM TABLE WHERE ID = linkint;
RETURN linkstring;
END;
=====
Offending calling code:
tempcontent := regexp_replace(myClobField, '<link ([[:digit:]]*)>', GETLINK('\1'));
=====
I have tried implicit and explicit type conversions that vary the above function; in parameters as VARCHAR2; etc.; no joy.
Is this a bug within the database, is it by design, or is it just me making a hash of things? I really don't want to have to pull the XML into PHP then run the PHP regex functions with Oracle DB queries to do this!
Many thanks for your assistance.
Ingram

Many thanks for the reply, but I'm not sure how that would work. I wish to do a global regexp_replace on all instances of '<link> ([[:digit:]]*)>' within my XML document, with the return value from the GETLINK function.
So for instance.
The return value of GETLINK could be in format:
&lt;a href="\1"&gt;
so an XML document of:
=====
&lt;doc&gt;
&lt;link 12&gt;Test Link&lt;/link&gt;
some content
&lt;link 783&gt;A second Test Link&lt;/link&gt;
&lt;/doc&gt;
=====
would return as:
=====
&lt;doc>
&lt;a href="12"&gt;Test Link&lt;/link&gt;
some content
&lt;a href="783"&gt;A second Test Link&lt;/link&gt;
&lt;/doc&gt;
=====
Obviously I would then do the other replacements to fix broken XML with the non matching end tags etc.
TIA

Similar Messages

  • Character array type conversion problem

    Hi, I'm using BlazeDS (v3.0.0.544) to remotely call Java code on the server from my Flex client. I'm having trouble when converting a character array type from Java to ActionScript and vice-versa. In my Flex code, if the ActionScript class uses a String type to map to the char[] then the char[] is successfully converted from Java to ActionScript, but not from ActionScript to Java.
    // Extract from ActionScript code
    private var m_charArray:String;
    public function get charArray():String
    return m_charArray;
    public function set charArray(value1:String):void
    m_charArray = value1;
    Alternatively, if my ActionScript class uses an Array type then I can successfully send data from the client and populate a char[] field on the server, but can't send an updated char[] back to my ActionScript class.
    In fact the Flex console reports:
    TypeError: Error #1034: Type Coercion failed: cannot convert "myString" to Array.
    The code this time:
    // Extract from ActionScript code
    private var m_charArray:Array;
    public function get charArray():Array
    return m_charArray;
    public function set charArray(value1:Array):void
    m_charArray = value1;
    All the other types I have tried work successfully, it's only with char arrays that I've hit a problem.
    Any help would be appreciated, thanks.

    Hi Graeme,
    It is how it works. I can see the inconsistency. You can find an example how of echo char[] in blazeds\trunk\qa\apps\qa-regress\testsuites\mxunit\tests\remotingService\dataTypes\CharTy pesTest.mxml. It echos a char[] in return of a string. You can get the char in a string easily string.charAt() and get its length using length(). I think it may be the reason remoting decided to use a string to represent a char[] instead of a generic objects array. It should be more memory efficient. However, I can see that it can turn into problem as what you descibed. When the data has to send back to server, it has to convert back to array. If the char[] type is used inside an object, it is impossible to do the conversion unless the getter and setter are generic
    public function get charArray():Object
    return m_charArray;
    public function set charArray(value1:Object):void
    if (value1 is String)
    m_charArray = new Array();
    //copy the string elements to it
    else
    m_charArray = value1;
    I know it is ugly, but it the only work around I can think of. I think it needs to log a bug to correct this conversion behavior
    William

  • Unicode Type Conversion Error

    Hi Friend,
    I am working in UNICODE project,i need one help,
    I have one error .
    Actually, im using one structure(Z0028) and passing values to internal table.
    At that time i shows one error.
    Actually,this error is due to type conversion problem.
    In that structure,i ve one packed datatype ,so, if i select
    unicode check it shows error.
    I will sent example prg and error also.
    Please give some solution to slove.
    REPORT  YPRG1                                   .
    TABLES: Z0028.
    DATA:I_Z0028 TYPE Z0028 OCCURS 0 WITH HEADER LINE .
    SELECT * FROM Z0028 INTO TABLE I_Z0028 .
    IF SY-SUBRC <> 0 .
      WRITE:/ ' NO DATA'.
    ENDIF.
      LOOP AT I_Z0028.
        WRITE:/ I_Z0028.
      ENDLOOP.
    Regards,
    Kalidas.T

    Hi,
    Display fields
    do like this..
    REPORT YPRG1 .
    TABLES: Z0028.
    DATA:I_Z0028 TYPE Z0028 OCCURS 0 WITH HEADER LINE .
    SELECT * FROM Z0028 INTO TABLE I_Z0028 .
    IF SY-SUBRC 0 .
    WRITE:/ ' NO DATA'.
    ENDIF.
    LOOP AT I_Z0028.
    WRITE:/ I_Z0028-field1,
                  I_Z0028-field2
    I_Z0028-field3.
    ENDLOOP.
    Regards,
    Prashant

  • Need Help with data type conversion

    Hello People,
    I am new to java, i need some help with data type conversion:
    I have variable(string) storing IP Address
    IPAddr="10.10.103.10"
    I have to call a library function which passes IP Address and does something and returns me a value.
    The problem I have is that external function call in this library excepts IP Address in form of a byte array.
    Here is the syntax for the function I am calling through my program
    int createDevice (byte[] ipAddress).
    now my problem is I don't know how to convert the string  IPAddr variable into a byte[] ipAddress to pass it through method.

    Class InetAddress has a method
    byte[]      getAddress() You can create an instance using the static method getByName() providing the IP address string as argument.

  • Data type conversion from packed to numeric

    Hi Experts,
    i have a question on data type conversion. My requirement is:
    i have fields of type packed decimal in my internal table itab. I need to convert the values of packed decimal fields in itab to numeric type.
    Example:
    Data: begin of itab occurs 0,
                ebeln like ekko-ebeln,
                ebelp like ekpo-ebelp,
                menge(15) type p decimals 2,
                netpr(15) type p decimals 2,
              end of itab. 
    if itab-menge has a value of 2.00, i need to convert that value to '         200'.  Right justified.
    if itab-netpr has a value of 1,234.56, i need to convert that to '         123456'.
    The above internal table itab is passed to the Function module GUI_DOWNLOAD and the itab data is downloaded to a text file.
    Please let me know how to acheive this objective.

    Hi ,
    You can use
    SPLIT at '.' into v1 v2
    concatenate v1 v2 into vv1.
    REPORT ZDN_TEST_001 .
    data: lv_var1(15) type p decimals 2 value '123.00'.
    data: lv_var2(15) type p decimals 5 value '123.12121'.
    data: lv_varc1(15) type c.
    data: lv_varc2(15) type c.
    data: lv_varc1d(2) type c.
    data: lv_varc2d(5) type c.
    data: lv_varc11(15) type c.
    data: lv_varc21(15) type c.
    write:/ lv_var1.
    write:/ lv_var2.
    *1)write & REPLACE.
    write lv_var1 to lv_varc1.
    write lv_var2 to lv_varc2.
    REPLACE '.' WITH SPACE INTO lv_varc1.
                 CONDENSE lv_varc1 NO-GAPS.
    REPLACE '.' WITH SPACE INTO lv_varc2.
                 CONDENSE lv_varc2 NO-GAPS.
    write:/ lv_varc1.
    write:/ lv_varc2.
    *2)split & concatinate
    write lv_var1 to lv_varc1.
    write lv_var2 to lv_varc2.
    split lv_varc1 at '.' into lv_varc1 lv_varc1d.
    concatenate lv_varc1 lv_varc1d into lv_varc11.
    split lv_varc2 at '.' into lv_varc2 lv_varc2d.
    concatenate lv_varc2 lv_varc2d into lv_varc21.
    write:/ lv_varc11.
    write:/ lv_varc21.

  • Is it possible to pass an argument to the function triggered by an event handler?

    Hello All,
    Trying to migrate my way of thinking from AS2 to CS4/AS3.
    Ok, I have 2 buttons on the stage. Each button does almost
    the same thing, so I want to create a single function, and each
    button calls that same function (we'll name that function
    "Navigate")... however, the function will need to end up doing
    something different dependant on which button was clicked.
    So, previously, in AS2, I would've added some code onto the
    buttons themselves with on(release) methods (see CODE EXAMPLE 1)
    So, each button effectively calls the Navigate function, and
    passes a different frame label to the function.
    Now, I'm trying to recreate this functionality in AS3. As you
    all know, on(release) has been done away with (still don't know
    why), but we now have to use event handlers, so I'm trying to
    figure out a way to pass a different frame label argument to the
    Navigate function. Currently I can achieve that by using a switch
    statement to test which button was clicked, and act accordingly
    (see CODE EXAMPLE 2).
    In this over-simplified example, this works fine, but in the
    real world I'm going to have more than 2 buttons, and the Navigate
    function would probably be much more complicated...
    So, I would like to be able to pass an argument(s) (like in
    the AS2 example) to the Navigate function... perhaps in the
    addEventListener() method? I tried this, but got compiler errors
    (see CODE EXAMPLE 3):
    The Million Dollar Question:
    Is it possible to dynamically pass/change an argument(s) to a
    function which is triggered by an event listener? (Or is the event
    that triggered the function the only argument you can have?)
    If this isn't possible, I'd greatly like to hear how you
    folks would handle this (other than having a switch statement with
    12 cases in it)???

    I've found a couple solutions that I'll post below for
    prosperity...
    You could create a Dictionary keyed by the prospective event
    targets and store any information in there you want associated with
    them. Then the navigate function can check that dictionary to get
    it's parameters:
    // Code //
    Button1.addEventListener(MouseEvent.CLICK, Navigate, false,
    0, true);
    Button2.addEventListener(MouseEvent.CLICK, Navigate, false,
    0, true);
    var buttonArgs:Dictionary = new Dictionary();
    buttonArgs[Button1] = "FrameLabel1";
    buttonArgs[Button2] = "FrameLabel2";
    function Navigate(e:MouseEvent):void{
    gotoAndStop(buttonArgs[e.target]);
    This in my eyes, is about the same amount of work as writing
    a long switch statement, but a little more elegant I suppose.
    I had a little trouble understanding the next solution,
    because I didn't quite understand an important piece of information
    about event listeners. The addEventListener () requires a Function
    as the 2nd argument passed to it.
    It didn't quite click until someone pointed it out to me:
    Navigate is a Function...
    Navigate("FrameLabel1") is a Function
    call...
    So by writing just
    Navigate, I'm not actually calling the function at the time
    of the addEventListener call, I'm just supplying the event listener
    with a reference to the name of the function. Then, when the
    listener is triggered, the listener will call (and pass a
    MouseEvent argument to) the Navigate function.
    Conversely, by writing
    Navigate("FrameLabel1") as the 2nd argument, the event
    listener trys to execute the Navigate function at the time the
    addEventListener is instantiated. And, since, in this example, the
    Navigate function returned as ":void" a compile error would occur
    because as I stated, an event listener requires a Function data
    type as the 2nd argument. This would basically be like writing
    addEventListener(MouseEvent.Click,
    void, false, 0, true)
    However, there is a way around this... basically, instead of
    defining the Navigate function as returning a void data type, you
    define it as returning a Function data type, and then nest another
    function (which actually contains the actions you want to perform)
    inside of it.
    Button1.addEventListener(MouseEvent.CLICK,
    Navigate("FrameLabel1"), false, 0, true);
    Button2.addEventListener(MouseEvent.CLICK,
    Navigate("FrameLabel2"), false, 0, true);
    function Navigate(myLabel:String):Function{
    return function(evt:MouseEvent):void{
    gotoAndStop(myLabel);

  • Passing Session variable of DATE data type to opaque view filter

    Hi Everyone,
    Can you guys please help me in passing session variable of DATE data type in RPD's physical layer 'opaque view' filter for Oracle database
    I tried following syntax, syntax wise I didn't got getting any error, but at the same time this opaque view is not fetching any records as well. my session variable is "END_DATE" and its value is 1998/12/31:00:00:00(as shown in RPD session windows, datatype is DATETIME)
    SELECT AMOUNT_SOLD, CHANNEL_ID, CUST_ID, PROD_ID, PROMO_ID, QUANTITY_SOLD, TIME_ID FROM SH.SALES
    WHERE TIME_ID =TO_DATE( 'VALUEOF(NQ_SESSION.END_DATE)','MM/DD/YYYY')
    SELECT AMOUNT_SOLD, CHANNEL_ID, CUST_ID, PROD_ID, PROMO_ID, QUANTITY_SOLD, TIME_ID FROM SH.SALES
    WHERE TIME_ID = TO_DATE( 'VALUEOF(NQ_SESSION."END_DATE")','MM/DD/YYYY')
    SELECT AMOUNT_SOLD, CHANNEL_ID, CUST_ID, PROD_ID, PROMO_ID, QUANTITY_SOLD, TIME_ID FROM SH.SALES
    WHERE TRUNC(TIME_ID) = TO_DATE( 'VALUEOF(NQ_SESSION."END_DATE")','MM/DD/YYYY')
    In past, I was able to pass a session variable into a opaque view filter using DATEOF function, but that was in DB2.
    I appreciate your time and help

    Finally, I got right format. here it is
    to_date(substr('valueof(NQ_SESSION.END_DATE)',1,10), 'yyyy-mm-dd')
    and here is the source from where I got this information
    Using OBIEE Session Variables in Select Tables in the Physical Layer

  • Passing request table to Jco function

    Hello Experts,
      We have one requirement where we need to pass the table data from the BLS to SAP Jco Function Module call.  For example we are reading the material numbers from the oracle database and then we need to pass these material numbers to SAP Function Module as a table to read the further details from SAP for the given material numbers. 
      We wrote a custom function module in SAP which accepts the material number as table.  Is it possible to pass the table request parameter to Function Module?  If possible how can we do this?  I tried to pass the XML document to Function Module table, but no luck.
    Thanks
    Mohan

    Mohan,
    in the BLT, configure the JCO action to use you custom function. After pressing enter, MII reads the xml structure of the function (if the connection MII to SAP is working). In the further processing of the BLT, you can fill the RFC table which you can see in the link editor using your query results and the link editor types "AppendXML" or "AppendAfter".
    The following thread might help: [RFC call with multiple input|http://forums.sdn.sap.com/click.jspa?searchID=34070350&messageID=8134561].
    Michael

  • How to pass an array to a function from a SELECT statement

    Hi all. I have a problem with passing an array to a function directly from a SELECT statement.
    Here is what I want. If I have a function
    function AAA(arrayVar <ArrayType>) return number;
    I want to be able to call this function this way
    select AAA((2,3,4))
    from dual
    or this way
    select AAA((10,12))
    from dual
    In other words I want to be able to pass an arbitrary number of numbers to the function. And I want this to work in a SELECT statement.
    Does anyone have any ideas how to implement this? What <ArrayType> should I use?(I've read about VARRAY, nested tables in the Oracle documentation but as far as I've understood these array types are meant to be used within PL/SQL blocks).
    I found only this http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:208012348074 through Google but it didn't help me.
    Thank you in advance.

    > What <ArrayType> should I use?
    SQL data types - as 3360 showed above. You cannot use PL/SQL structures and user types in the SQL Engine.
    You can however use all SQL structures and types in PL/SQL.
    Arrays in SQL is created as collection type - basic o-o. The collection type (or class) serve as a container for instantiated objects or scalar type.
    This is covered in detail in [url http://download-uk.oracle.com/docs/cd/B19306_01/appdev.102/b14260/toc.htm]
    Oracle® Database Application Developer's Guide - Object-Relational Features

  • How to pass select-option filed to Function Module Exporting Parameter

    Hi,
        How to pass select-option filed to Function Module Exporting Parameter.
    Thanks

    Hi,
    DATA: BEGIN OF ITAB5_WRK OCCURS 0,
            KUNNR     TYPE KNKK-KUNNR,  "CUSTOMER #
            SBGRP     TYPE KNKK-SBGRP,  "CREDIT REP
            KLIMK     TYPE KNKK-KLIMK,  "CREDIT LIMIT
            NAME1     TYPE KNA1-NAME1,  "CUSTOMER NAME
            SKFOR     TYPE KNKK-SKFOR,  "TOTAL A/R
            AMT1      TYPE KNKK-SKFOR,  "CURRENT
            AMT2      TYPE KNKK-SKFOR,                          "01-30
            AMT3      TYPE KNKK-SKFOR,                          "31-60
            AMT4      TYPE KNKK-SKFOR,                          "61-90
            AMT5      TYPE KNKK-SKFOR,                          "91-120
            AMT6      TYPE KNKK-SKFOR,                          "OVR 120
            BZIRK     TYPE KNVV-BZIRK,
          END OF ITAB5_WRK.
    SELECT-OPTIONS P_COMP     FOR  T001-BUKRS
      SELECT KUNNR SBGRP  FROM KNKK
             INTO TABLE ITAB5_WRK
             WHERE SBGRP IN P_REP
               AND KUNNR GE '0001000000'
               AND SKFOR NE 0.
      LOOP AT ITAB5_WRK.
        DELETE ADJACENT DUPLICATES FROM ITAB5_WRK COMPARING KUNNR.
      ENDLOOP.
      PERFORM GET_CREDIT_LIMITS.
    *=======================================================================
      IF P_DIST NE SPACE.
        LOOP AT ITAB5_WRK.
          SELECT SINGLE * FROM KNVV WHERE KUNNR EQ ITAB5_WRK-KUNNR
                                      AND VKORG EQ P_COMP
                                      AND VTWEG EQ '20'
                                      AND SPART EQ '10'
                                      AND BZIRK IN P_DIST.
          IF SY-SUBRC EQ 0.
            MOVE KNVV-BZIRK TO ITAB5_WRK-BZIRK.
            MODIFY ITAB5_WRK.
          ELSE.
            DELETE ITAB5_WRK.
          ENDIF.
        ENDLOOP.
      ENDIF.
    *==============================================================
      LOOP AT ITAB5_WRK.
        MOVE: 'F/S'            TO WRK-KKBER,
               ITAB5_WRK-KUNNR TO WRK-KUNNR.
        PERFORM AGING.
        ADD: W_SNFAE  TO ITAB5_WRK-AMT1,
             W_SFAE1  TO ITAB5_WRK-AMT2,
             W_SFAE2  TO ITAB5_WRK-AMT3,
             W_SFAE3  TO ITAB5_WRK-AMT4,
             W_SFAE4  TO ITAB5_WRK-AMT5,
             W_SFAE5  TO ITAB5_WRK-AMT6,
             W_SFAEL  TO ITAB5_WRK-SKFOR,
             W_SNFAE  TO ITAB5_WRK-SKFOR.
        MOVE: 'SPEC'            TO WRK-KKBER,
               ITAB5_WRK-KUNNR TO WRK-KUNNR.
        *PERFORM AGING.*
        ADD: W_SNFAE  TO ITAB5_WRK-AMT1,
             W_SFAE1  TO ITAB5_WRK-AMT2,
             W_SFAE2  TO ITAB5_WRK-AMT3,
             W_SFAE3  TO ITAB5_WRK-AMT4,
             W_SFAE4  TO ITAB5_WRK-AMT5,
             W_SFAE5  TO ITAB5_WRK-AMT6,
             W_SFAEL  TO ITAB5_WRK-SKFOR,
             W_SNFAE  TO ITAB5_WRK-SKFOR.
        MODIFY ITAB5_WRK.
      ENDLOOP.
    FORM AGING.
      *CALL FUNCTION 'CUSTOMER_DUE_DATE_ANALYSIS'* 
      EXPORTING
          BUKRS             = P_COMP           
          KKBER             = WRK-KKBER
          KUNNR             = WRK-KUNNR
          RASID             = 'FEND'
          KLIMP             = 'X'
        IMPORTING
          SFAE1             = W_SFAE1
          SFAE2             = W_SFAE2
          SFAE3             = W_SFAE3
          SFAE4             = W_SFAE4
          SFAE5             = W_SFAE5
          SFAE6             = W_SFAE6
          SFAEL             = W_SFAEL
          SNFA1             = W_SNFA1
          SNFA2             = W_SNFA2
          SNFA3             = W_SNFA3
          SNFA4             = W_SNFA4
          SNFA5             = W_SNFA5
          SNFA6             = W_SNFA6
          SNFAE             = W_SNFAE
        EXCEPTIONS
          NO-AGING_SCHEDULE = 1
          NO_TABLE_INPUT    = 2.
      CASE SY-SUBRC.
        WHEN 1.
          MESSAGE E999 WITH 'PLEASE ENTER AGING SCHEDULE'.
        WHEN 2.
          MESSAGE E999 WITH 'DO NOTHING ??'.
      ENDCASE.
    ENDFORM.                    "AGING
    Thanks

  • Need information/documentation related to ADFx function type

    Hi Guru's,
    We have a requirement to invoke external ADF application from EBS/OAF R12.1.3.
    Form the forum sources, I found that we can make use of "ADFx" function type in R12.1.3 to invoke external ADF URL.
    We need to pass some parameters while we invoke the ADF URL.
    Please help me with any dev guide/documentation on the usage of ADFx function type.
    Any help in this regard would be a great help!!
    Thanks!!
    Subba.

    hI patil
    check tadir table for all related types of objects...
    reward points to all helpful answers
    kiran.M

  • Passing parameters to event triggered functions

    hi all,
    i have created a button and added EventListener.
    as mybutton.addEventListener(MouseEvent.CLICK,clickSt art);
    when i implement the clickStart (event:MouseEvent) function i
    want to pass
    an array ,a String to this function as parameters .how can i
    do this.
    is it possible or not.
    thanx.

    Well, not in that way.
    The function automatically receives a parameter when you
    create a callback with that function by "addEventListener", such
    parameter is datatyped as the event type you defined in the
    callback, in your case "MouseEvent". If you want to pass more data
    when the function is called then you have to create your own event
    class because almost all events just inform when something has
    happened and send limited information. You can check the
    documentation about creating a custom event class, there is a lot
    of info about the topic.

  • Standard Planning function Type

    Hi,
    Would anybody give some example of standard planning function type except COPY and REVALUATION.
    Points will be awarded to the suitable reply
    Regards,

    Hi ,
      Kindly go through the below link for more details on all standard functions,
    [http://help.sap.com/SAPHELP_NW04s/helpdata/EN/43/37d8c2af4c1bcbe10000000a1553f7/frameset.htm]
    1. Unit conversion:
               Consider that all your planned records are in "G" unit and if you want to convert this to any other unit like "Pound", then you can use this planning function. The prerequisite for this is, you need to create a suitable "Unit conversion type" using the tcode: RSUOM, for converting "G" to "Pounds".
    2. Currency Translation:
               Consider that all your planned records are in "EUR" currency and if you want to convert this to any other currency like "USD", then you can use this planning function. The prerequisite for this is, you need to create a suitable "Currency translation type" using the tcode: RSCUR, for converting "EUR" to "USD".
    3. Deleting Invalid Combinations:
                Consider that you did not have any characteristicc relationships in your project and hence you have invalid data in your planning cube. For example, you have 'Product' and 'Product Group' in your cube and the end user has entered wrong values for 'product group' for a corresponding 'product'. In this case you can create a characteristic relationship for 'Product' and 'Product Group' and then execute this planning function so that all the records with invalid relationships between 'Product' and 'Product Group' will be deleted.
    4. Repost:
             This is similar to 'Copy' planning function. But the only difference is 'Copy' copies the records from source to target. But 'Repost' moves the records from source to target, (i.e.) after the records are copied they are deleted in the source.
    5. Repost (Characteristic Relationships):
             This is similar to 'Deleting Invalid Combinations' but the only difference is, instead of deleting the invalid combinations, this function reposts the old relationships to the new correct ones based on active characteristic relationships.
    6. Distribution by Key:
            You can use the Distribution by Key function type to generate the characteristic combinations to which data is distributed in accordance with the master data and characteristic relationships. The key figure values are distributed according to the expressly specified distribution keys. These are distribution functions that determine the weighting of the distribution.
    For example, you have planned revenue based on 'Country' but you have some part of the revenue which is "not assigned" to any country. You can use this planning function to distribute this "Not Assigned" revenue to any particular "Country".
    7. Distribution by Reference Data:
              You use the Distribution by Reference Data function type to generate combinations of characteristics that correspond to the reference data. The system distributes data in accordance with these combinations. The key figure values are distributed by percentage in accordance with the reference data. You use the table for key figure selection to select the key figures that you want to distribute.
    For example, you have actual values for the year '2011' and you want to use this data to distribute it to the future year '2012'.
    In this case you can use this planning function, to distribute the '2011' data to '2012'. The prerequisite for this is there should be planned data already available for the year '2012'. This function is used after the manual planning is done for the future year.
    Hope this clears your doubt.
    Regards,
    Balajee

  • Porting from win to mac / expected constructor destructor or type conversion before

    I am porting a plugin that works well with CS3/4/5 on Windows to CS3 on Mac.
    I am able to compile the SDK samples with XCode. My plugin also compiles with XCode if i remove one cpp file from the project. If i try to compile it with the file (actioncomponent.cpp) compiling fails with the error:
    expected constructor destructor or type conversion before .....
    I tried to trace the error by commenting out ceveral includes and functions in that file. The error then point's to another place in the file itself or in one included in it, the error is the same.
    I generated the project with dollyx, added my .fr, compiled it, added the .fr.rsrc, added source files and built it.
    Since this is my first Indesign plugin for Mac I am sure that i miss something general.
    Any suggestions?

    I checked my code against every SDK sample where context/session is used and cannot find any difference. I also took a sample project, included my sources what resulted in the same error messages.
    One of them:
    Checking Dependencies
    CompileC build/myPluginName.build/Default/Release.build/Objects-normal/ppc/myPluginNameActionCompo nent.o /Volumes/daten/adobe_indesign_cs3_products_sdk_504mac/build/mac/prj/../../../source/sdksa mples/myPluginName/myPluginNameActionComponent.cpp normal ppc c++ com.apple.compilers.gcc.4_0
        cd /Volumes/daten/adobe_indesign_cs3_products_sdk_504mac/build/mac/prj
        /Developer/usr/bin/gcc-4.0 -x c++ -arch ppc -pipe -Wno-trigraphs -fno-exceptions -fpascal-strings -fasm-blocks -O3 -Werror -Wreturn-type -Wunused-value -DMACINTOSH -DBIB_NO_THROW -fmessage-length=0 -mtune=G5 -fvisibility=hidden -fvisibility-inlines-hidden -fno-threadsafe-statics -Wno-deprecated-declarations -mmacosx-version-min=10.4 -gdwarf-2 -I/Volumes/daten/adobe_indesign_cs3_products_sdk_504mac/build/mac/prj/build/myPluginName. build/Default/Release.build/myPluginName.hmap -Wno-deprecated -F/Volumes/daten/adobe_indesign_cs3_products_sdk_504mac/build/mac/prj/../release/sdk -F../../../build/mac/release/packagefolder/contents/macos -F../../../build/mac/release/packagefolder/contents/Frameworks -I/Volumes/daten/adobe_indesign_cs3_products_sdk_504mac/build/mac/prj/../release/sdk/incl ude -I/Developer/SDKs/MacOSX10.4u.sdk/Developer/Headers/FlatCarbon -I../../../external/adobesourcelibrary/third_party/boost_tp/boost -I../../../external/afl/includes -I../../../source/precomp/common -I../../../source/precomp/msvc -I../../../source/public/includes -I../../../source/public/interfaces/architecture -I../../../source/private/includes/architecture -I../../../source/private/interfaces/architecture -I../../../source/public/includes/utils -I../../../source/public/interfaces/utils -I../../../source/precomp/msvc -I../../../source/public/interfaces/xmedia -I../../../source/public/interfaces/ui -I../../../source/public/interfaces/tables -I../../../source/public/interfaces/text -I../../../source/public/interfaces/graphics -I../../../source/public/components/widgetbin/includes -I../../../source/public/interfaces/workgroup -I../../../source/public/interfaces/interactive -I../../../source/public/interfaces/interactive/ui -I../../../source/public/interfaces/colormgmt -I../../../source/public/interfaces/utils -I../../../source/public/interfaces/incopy -I../../../source/public/interfaces/layout -I../../../source/public/interfaces/architecture -I../../../source/public/interfaces/cjk -I../../../source/precomp/common -I../../../source/public/includes -I../../../source/public/components/publiclib/plugins -I../../../source/public/components/publiclib/files -I../../../source/public/components/publiclib/objectmodel -I../../../external/boost -I../../../source/sdksamples/common -I../../../external/afl/includes -I../../../source/sdksamples/myPluginName -I/Volumes/daten/adobe_indesign_cs3_products_sdk_504mac/build/mac/prj/build/myPluginName. build/Default/Release.build/DerivedSources -isysroot /Developer/SDKs/MacOSX10.4u.sdk -include build/SharedPrecompiledHeaders/Release/PluginPrefix-hkopdumatdlxfjbkpugezhwgmujv/PluginPr efix.pch -c /Volumes/daten/adobe_indesign_cs3_products_sdk_504mac/build/mac/prj/../../../source/sdksa mples/myPluginName/myPluginNameActionComponent.cpp -o /Volumes/daten/adobe_indesign_cs3_products_sdk_504mac/build/mac/prj/build/myPluginName.bu ild/Default/Release.build/Objects-normal/ppc/myPluginNameActionComponent.o
    ../../../source/public/includes/KeyValuePair.h:36: error: expected constructor, destructor, or type conversion before 'template'
    ../../../source/public/includes/KeyValuePair.h:82: error: expected ',' or '...' before '<' token
    ../../../source/public/includes/KeyValuePair.h:82: error: ISO C++ forbids declaration of 'KeyValuePair' with no type
    ../../../source/public/includes/KeyValuePair.h:82: error: 'bool operator==(int)' must have an argument of class or enumerated type
    ../../../source/public/includes/KeyValuePair.h:82: error: 'bool operator==(int)' must take exactly two arguments
    ../../../source/public/includes/KeyValuePair.h: In function 'bool operator==(int)':
    ../../../source/public/includes/KeyValuePair.h:84: error: '__x' was not declared in this scope
    ../../../source/public/includes/KeyValuePair.h:84: error: '__y' was not declared in this scope
    ../../../source/public/includes/KeyValuePair.h: At global scope:
    ../../../source/public/includes/KeyValuePair.h:97: error: expected ',' or '...' before '<' token
    ../../../source/public/includes/KeyValuePair.h:97: error: ISO C++ forbids declaration of 'KeyValuePair' with no type
    ../../../source/public/includes/KeyValuePair.h:97: error: 'bool operator==(int)' must have an argument of class or enumerated type
    ../../../source/public/includes/KeyValuePair.h:97: error: 'bool operator==(int)' must take exactly two arguments
    ../../../source/public/includes/KeyValuePair.h:97: error: redefinition of 'template<class _T1, class _T2> bool operator==(int)'
    ../../../source/public/includes/KeyValuePair.h:82: error: 'template<class _T1, class _T2> bool operator==(int)' previously declared here
    ../../../source/public/includes/KeyValuePair.h: In function 'bool operator==(int)':
    ../../../source/public/includes/KeyValuePair.h:99: error: '__x' was not declared in this scope
    ../../../source/public/includes/KeyValuePair.h:99: error: '__y' was not declared in this scope
    ../../../source/public/includes/KeyValuePair.h: At global scope:
    ../../../source/public/includes/KeyValuePair.h:112: error: expected ',' or '...' before '<' token
    ../../../source/public/includes/KeyValuePair.h:112: error: ISO C++ forbids declaration of 'KeyValuePair' with no type
    ../../../source/public/includes/KeyValuePair.h: In function 'bool operator==(const _T1&, int)':
    ../../../source/public/includes/KeyValuePair.h:114: error: '__x' was not declared in this scope
    ../../../source/public/includes/KeyValuePair.h: At global scope:
    ../../../source/public/includes/KeyValuePair.h:124: error: expected ',' or '...' before '<' token
    ../../../source/public/includes/KeyValuePair.h:124: error: ISO C++ forbids declaration of 'KeyValuePair' with no type
    ../../../source/public/includes/KeyValuePair.h:124: error: 'bool operator<(int)' must have an argument of class or enumerated type
    ../../../source/public/includes/KeyValuePair.h:124: error: 'bool operator<(int)' must take exactly two arguments
    ../../../source/public/includes/KeyValuePair.h: In function 'bool operator<(int)':
    ../../../source/public/includes/KeyValuePair.h:126: error: '__x' was not declared in this scope
    ../../../source/public/includes/KeyValuePair.h:126: error: '__y' was not declared in this scope
    ../../../source/public/includes/KeyValuePair.h: At global scope:
    ../../../source/public/includes/KeyValuePair.h:135: error: expected ',' or '...' before '<' token
    ../../../source/public/includes/KeyValuePair.h:135: error: ISO C++ forbids declaration of 'KeyValuePair' with no type
    ../../../source/public/includes/KeyValuePair.h:135: error: 'bool operator<(int)' must have an argument of class or enumerated type
    ../../../source/public/includes/KeyValuePair.h:135: error: 'bool operator<(int)' must take exactly two arguments
    ../../../source/public/includes/KeyValuePair.h:135: error: redefinition of 'template<class _T1, class _T2> bool operator<(int)'
    ../../../source/public/includes/KeyValuePair.h:124: error: 'template<class _T1, class _T2> bool operator<(int)' previously declared here
    ../../../source/public/includes/KeyValuePair.h: In function 'bool operator<(int)':
    ../../../source/public/includes/KeyValuePair.h:137: error: '__x' was not declared in this scope
    ../../../source/public/includes/KeyValuePair.h:137: error: '__y' was not declared in this scope
    ../../../source/public/includes/KeyValuePair.h: At global scope:
    ../../../source/public/includes/KeyValuePair.h:146: error: expected ',' or '...' before '<' token
    ../../../source/public/includes/KeyValuePair.h:146: error: ISO C++ forbids declaration of 'KeyValuePair' with no type
    ../../../source/public/includes/KeyValuePair.h: In function 'bool operator<(const _T1&, int)':
    ../../../source/public/includes/KeyValuePair.h:148: error: '__x' was not declared in this scope
    ../../../source/public/includes/KeyValuePair.h: At global scope:
    ../../../source/public/includes/KeyValuePair.h:157: error: expected ',' or '...' before '<' token
    ../../../source/public/includes/KeyValuePair.h:157: error: ISO C++ forbids declaration of 'KeyValuePair' with no type
    ../../../source/public/includes/KeyValuePair.h:157: error: 'bool operator!=(int)' must have an argument of class or enumerated type
    ../../../source/public/includes/KeyValuePair.h:157: error: 'bool operator!=(int)' must take exactly two arguments
    ../../../source/public/includes/KeyValuePair.h: In function 'bool operator!=(int)':
    ../../../source/public/includes/KeyValuePair.h:158: error: '__x' was not declared in this scope
    ../../../source/public/includes/KeyValuePair.h:158: error: '__y' was not declared in this scope
    ../../../source/public/includes/KeyValuePair.h: At global scope:
    ../../../source/public/includes/KeyValuePair.h:167: error: expected ',' or '...' before '<' token
    ../../../source/public/includes/KeyValuePair.h:167: error: ISO C++ forbids declaration of 'KeyValuePair' with no type
    ../../../source/public/includes/KeyValuePair.h:167: error: 'bool operator>(int)' must have an argument of class or enumerated type
    ../../../source/public/includes/KeyValuePair.h:167: error: 'bool operator>(int)' must take exactly two arguments
    ../../../source/public/includes/KeyValuePair.h: In function 'bool operator>(int)':
    ../../../source/public/includes/KeyValuePair.h:168: error: '__y' was not declared in this scope
    ../../../source/public/includes/KeyValuePair.h:168: error: '__x' was not declared in this scope
    ../../../source/public/includes/KeyValuePair.h: At global scope:
    ../../../source/public/includes/KeyValuePair.h:177: error: expected ',' or '...' before '<' token
    ../../../source/public/includes/KeyValuePair.h:177: error: ISO C++ forbids declaration of 'KeyValuePair' with no type
    ../../../source/public/includes/KeyValuePair.h:177: error: 'bool operator<=(int)' must have an argument of class or enumerated type
    ../../../source/public/includes/KeyValuePair.h:177: error: 'bool operator<=(int)' must take exactly two arguments
    ../../../source/public/includes/KeyValuePair.h: In function 'bool operator<=(int)':
    ../../../source/public/includes/KeyValuePair.h:178: error: '__y' was not declared in this scope
    ../../../source/public/includes/KeyValuePair.h:178: error: '__x' was not declared in this scope
    ../../../source/public/includes/KeyValuePair.h: At global scope:
    ../../../source/public/includes/KeyValuePair.h:187: error: expected ',' or '...' before '<' token
    ../../../source/public/includes/KeyValuePair.h:187: error: ISO C++ forbids declaration of 'KeyValuePair' with no type
    ../../../source/public/includes/KeyValuePair.h:187: error: 'bool operator>=(int)' must have an argument of class or enumerated type
    ../../../source/public/includes/KeyValuePair.h:187: error: 'bool operator>=(int)' must take exactly two arguments
    ../../../source/public/includes/KeyValuePair.h: In function 'bool operator>=(int)':
    ../../../source/public/includes/KeyValuePair.h:188: error: '__x' was not declared in this scope
    ../../../source/public/includes/KeyValuePair.h:188: error: '__y' was not declared in this scope
    ../../../source/public/includes/KeyValuePair.h: At global scope:
    ../../../source/public/includes/KeyValuePair.h:197: error: expected initializer before '<' token
    ../../../source/public/includes/KeyValuePair.h:225: error: expected ',' or '...' before '<' token
    ../../../source/public/includes/KeyValuePair.h:225: error: ISO C++ forbids declaration of 'KeyValuePair' with no type
    ../../../source/public/includes/KeyValuePair.h: In member function 'bool KeyMatchPredicate<Key, Value>::operator()(int)':
    ../../../source/public/includes/KeyValuePair.h:225: error: 'x' was not declared in this scope
    ../../../source/public/includes/KeyValuePair.h: At global scope:
    ../../../source/public/includes/KeyValuePair.h:252: error: expected ',' or '...' before '<' token
    ../../../source/public/includes/KeyValuePair.h:252: error: ISO C++ forbids declaration of 'KeyValuePair' with no type
    ../../../source/public/includes/KeyValuePair.h: In member function 'bool ValueMatchPredicate<Key, Value>::operator()(int)':
    ../../../source/public/includes/KeyValuePair.h:252: error: 'x' was not declared in this scope
    ../../../source/public/includes/KeyValuePair.h: In function 'void InsertKeyValue(Container&, const Key&, const Value&)':
    ../../../source/public/includes/KeyValuePair.h:282: error: 'KeyValuePair' was not declared in this scope
    ../../../source/public/includes/KeyValuePair.h:282: error: expected primary-expression before ',' token
    ../../../source/public/includes/KeyValuePair.h:282: error: expected primary-expression before '>' token
    ../../../source/public/includes/KeyValuePair.h: In function 'void InsertOrReplaceKeyValue(Container&, const Key&, const Value&)':
    ../../../source/public/includes/KeyValuePair.h:298: error: 'KeyValuePair' was not declared in this scope
    ../../../source/public/includes/KeyValuePair.h:298: error: expected primary-expression before ',' token
    ../../../source/public/includes/KeyValuePair.h:298: error: expected primary-expression before '>' token
    ../../../source/public/includes/KeyValuePair.h: In function 'int32 InsertKeyValueInSorted(Container&, const Key&, const Value&)':
    ../../../source/public/includes/KeyValuePair.h:326: error: expected initializer before '<' token
    ../../../source/public/includes/KeyValuePair.h:328: error: 'el' was not declared in this scope
    ../../../source/public/includes/KeyValuePair.h: In function 'int32 InsertOrReplaceKeyValueInSorted(Container&, const Key&, const Value&)':
    ../../../source/public/includes/KeyValuePair.h:345: error: 'KeyValuePair' was not declared in this scope
    ../../../source/public/includes/KeyValuePair.h:345: error: expected primary-expression before ',' token
    ../../../source/public/includes/KeyValuePair.h:345: error: expected primary-expression before '>' token
    ../../../source/public/interfaces/architecture/IActiveContext.h: At global scope:
    ../../../source/public/interfaces/architecture/IActiveContext.h:56: error: ISO C++ forbids declaration of 'KeyValuePair' with no type
    ../../../source/public/interfaces/architecture/IActiveContext.h:56: error: expected ';' before '<' token
    ../../../source/public/interfaces/architecture/IActiveContext.h:57: error: 'ContextInfo' was not declared in this scope
    ../../../source/public/interfaces/architecture/IActiveContext.h:57: error: template argument 1 is invalid
    ../../../source/public/interfaces/architecture/IActiveContext.h:57: error: template argument 2 is invalid
    ../../../source/public/interfaces/architecture/ISelectionMessages.h:59: error: 'KeyValuePair' was not declared in this scope
    ../../../source/public/interfaces/architecture/ISelectionMessages.h:59: error: template argument 1 is invalid
    ../../../source/public/interfaces/architecture/ISelectionMessages.h:59: error: expected unqualified-id before '>' token
    ../../../source/public/interfaces/architecture/ISelectionMessages.h:172: error: ISO C++ forbids declaration of 'SuiteBroadcastData' with no type
    ../../../source/public/interfaces/architecture/ISelectionMessages.h:172: error: 'SuiteBroadcastData' declared as a 'virtual' field
    ../../../source/public/interfaces/architecture/ISelectionMessages.h:172: error: expected ';' before '*' token
    ../../../source/public/interfaces/architecture/ISelectionMessages.h:366: error: 'KeyValuePair' was not declared in this scope
    ../../../source/public/interfaces/architecture/ISelectionMessages.h:366: error: template argument 1 is invalid
    ../../../source/public/interfaces/architecture/ISelectionMessages.h:366: error: expected unqualified-id before '>' token
    ../../../source/public/interfaces/architecture/ISelectionManager.h:166: error: 'SuiteBroadcastData' has not been declared
    ../../../source/public/interfaces/architecture/ISelectionManager.h:212: error: 'SuiteBroadcastData' has not been declared
    /Volumes/daten/adobe_indesign_cs3_products_sdk_504mac/build/mac/prj/../../../source/sdksam ples/myPluginName/myPluginNameActionComponent.cpp:43: error: definition of implicitly-declared 'virtual myPluginNameActionComponent::~myPluginNameActionComponent()'
    CompileC build/myPluginName.build/Default/Release.build/Objects-normal/i386/myPluginNameDialogObse rver.o /Volumes/daten/adobe_indesign_cs3_products_sdk_504mac/build/mac/prj/../../../source/sdksa mples/myPluginName/myPluginNameDialogObserver.cpp normal i386 c++ com.apple.compilers.gcc.4_0
        cd /Volumes/daten/adobe_indesign_cs3_products_sdk_504mac/build/mac/prj
        /Developer/usr/bin/gcc-4.0 -x c++ -arch i386 -pipe -Wno-trigraphs -fno-exceptions -fpascal-strings -fasm-blocks -O3 -Werror -Wreturn-type -Wunused-value -DMACINTOSH -DBIB_NO_THROW -fmessage-length=0 -fvisibility=hidden -fvisibility-inlines-hidden -fno-threadsafe-statics -Wno-deprecated-declarations -mmacosx-version-min=10.4 -gdwarf-2 -I/Volumes/daten/adobe_indesign_cs3_products_sdk_504mac/build/mac/prj/build/myPluginName. build/Default/Release.build/myPluginName.hmap -DMACTEL_SKIP -Wno-deprecated -F/Volumes/daten/adobe_indesign_cs3_products_sdk_504mac/build/mac/prj/../release/sdk -F../../../build/mac/release/packagefolder/contents/macos -F../../../build/mac/release/packagefolder/contents/Frameworks -I/Volumes/daten/adobe_indesign_cs3_products_sdk_504mac/build/mac/prj/../release/sdk/incl ude -I/Developer/SDKs/MacOSX10.4u.sdk/Developer/Headers/FlatCarbon -I../../../external/adobesourcelibrary/third_party/boost_tp/boost -I../../../external/afl/includes -I../../../source/precomp/common -I../../../source/precomp/msvc -I../../../source/public/includes -I../../../source/public/interfaces/architecture -I../../../source/private/includes/architecture -I../../../source/private/interfaces/architecture -I../../../source/public/includes/utils -I../../../source/public/interfaces/utils -I../../../source/precomp/msvc -I../../../source/public/interfaces/xmedia -I../../../source/public/interfaces/ui -I../../../source/public/interfaces/tables -I../../../source/public/interfaces/text -I../../../source/public/interfaces/graphics -I../../../source/public/components/widgetbin/includes -I../../../source/public/interfaces/workgroup -I../../../source/public/interfaces/interactive -I../../../source/public/interfaces/interactive/ui -I../../../source/public/interfaces/colormgmt -I../../../source/public/interfaces/utils -I../../../source/public/interfaces/incopy -I../../../source/public/interfaces/layout -I../../../source/public/interfaces/architecture -I../../../source/public/interfaces/cjk -I../../../source/precomp/common -I../../../source/public/includes -I../../../source/public/components/publiclib/plugins -I../../../source/public/components/publiclib/files -I../../../source/public/components/publiclib/objectmodel -I../../../external/boost -I../../../source/sdksamples/common -I../../../external/afl/includes -I../../../source/sdksamples/myPluginName -I/Volumes/daten/adobe_indesign_cs3_products_sdk_504mac/build/mac/prj/build/myPluginName. build/Default/Release.build/DerivedSources -isysroot /Developer/SDKs/MacOSX10.4u.sdk -include build/SharedPrecompiledHeaders/Release/PluginPrefix-ajenzpjyosjkeodzeqpqmcfnvjiw/PluginPr efix.pch -c /Volumes/daten/adobe_indesign_cs3_products_sdk_504mac/build/mac/prj/../../../source/sdksa mples/myPluginName/myPluginNameDialogObserver.cpp -o /Volumes/daten/adobe_indesign_cs3_products_sdk_504mac/build/mac/prj/build/myPluginName.bu ild/Default/Release.build/Objects-normal/i386/myPluginNameDialogObserver.o
    What am I doing wrong?

  • Enhance planning function type exit in BPS

    Hello,
    I have 2 questions concerning planning functions type exit in BPS:
    1. Is there any way to do a check, if the data is from the selection of the planning package itself or created in the planning function, when looping over the XTH_DATA table. I mentioned, that the loop is done also over the newly created data. Now, I copy the XTH_DATA into a working version, add the data to it and assign it afterwardws.
    2. I create new lines of data in the planning function. These lines can also contain data, which is not in the package selection. Now I need a condition for not writing the data, which checks, if the data can be added to the XTH_DATA or otherwise skips this particular line.
    Background is, I don't want to read the variable values from the package selection to keep it more generic.
    Hope anyone of you can help me solving these problems. Thanks in advance...

    Hello Jerrit,
    there's no indication in XTH_DATA if data was already existing or is new. You have to program this logic yourself.
    The selection of the planning package is passed to the exit in ITO_CHASEL. So you do not have to read the package or variables. However, checking data (XTH_DATA) against this selection can be quite performance intensive. If you are dealing with high data volumes such a check will probably take too long.
    Regards
    Marc
    SAP NetWeaver RIG

Maybe you are looking for

  • My web browser is not working

    Dear sir, I'm using blackberry 9320.. Now the problem is facebook is not work properly in my web browser.. This problem is only for facebook site.. Other sites is work well.. When I open facebook my web browser is showing error like this ..( Destinat

  • Balance Confirmation thru mail

    Dear All, Client requirement is to mail the balance confirmation letter directly thru SAP after executing F.17. I want to know, if this is possible and what are the settings that are required to be done. If any there is any document for the same. Ple

  • Get Summary Finish date to Subtask

    Hi, Is there (Except from creating a macro) a way to get a subtask finish date to reflect the finish date of the summary task. Am aware of that it is the dates from the sub tasks that sets the finish date of the summary task, but are wondering if the

  • Using SFTP? {subject edited/truncated by moderator}

    I need help troubleshooting a secure file transfer protocol (SFTP). The check boxes are there in the site definition pages so the option is available but there is nothing in the manual or in the accompanying DVDs. I am getting a box that talks about

  • 2 phase commit for entity bean

    Hi all, Does the 2-phase commit capability in WL6.X applies to entity bean? Thanks, Rick