Function Syntax Conversion

I'm trying to convert an html function into my PL/SQL program, but I just can't get the syntax right. It's a function that checks to see if a radio button is unchecked, a corresponding checkbox unselects. I have the radio buttons and checkbox in the body of the sql code just fine, but I can't get the correct syntax on the function. I keep getting one syntax error after another. I do what I think fixes one error and 2 more crop up. I just need help converting the below function to sql readable. I would be very grateful for any help. Here is the code for the function in html:
function VfyChoice(){
  if (window.document.the_form.choice[0].checked == false) {
    window.document.the_form.chkbx.checked = false;
  else{
    if (window.document.the_form.chkbx.checked == false){
      alert("If you select 'Choice A': \nThen you must acknowledge and check 'SubChoice A'");
}And here is the code for the whole html page (including the function) in case it helps to see the big picture of where the code is coming from.
<html>
<head><title>check box w/ radio buttons</title>
<script language = "JavaScript">
<!-- hide script from old browsers
function VfyChoice(){
  if (window.document.the_form.choice[0].checked == false) {
    window.document.the_form.chkbx.checked = false;
  else{
    if (window.document.the_form.chkbx.checked == false){
      alert("If you select 'Choice A': \nThen you must acknowledge and check 'SubChoice A'");
// end hiding comment -->
</script>
</head>
<body>
<form name = "the_form">
<Input type = "radio"    name = "choice" onClick = "VfyChoice();"> Choice A <br>
<Input type = "checkbox" name = "chkbx"  onClick = "VfyChoice();"> SubChoice A <br>
<Input type = "radio"    name = "choice" onClick = "VfyChoice();"> Choice B <br>
<Input type = "radio"    name = "choice" onClick = "VfyChoice();"> Choice C <br>
<p>
<input type = "button" value="ok" onClick = "VfyChoice();">
</form>
</body>
</html>

Here's what I have at this moment:
function VfyChoice(i_number IN varchar2) RETURN BOOLEAN
IS
BEGIN
if (window.document.the_form.choice(0).checked.false) then
    window.document.the_form.chkbx.checked := false; 
  else
    if (window.document.the_form.chkbx.checked.false) then
      alert("If you select 'Choice A':...........");
    end if;
end if;The only error I am getting right now is about the window.document part:
Error Text = PLS-00201: identifier 'WINDOW.DOCUMENT' must be declaredWhen I take out window.document.the_form, I get an error about the function choice not in this scope. Even though 'choice' is the name of my radio button, not a function.
Oh, and as for the (i_number IN varchar2) variable declaration. I was just throwing that in to get past that error, I don't know how I should declare that part.

Similar Messages

  • PL/SQL Function Syntax help please...

    Can someone help me with the syntax here please? I am sure i am doing something wrong in my LOOP.
    create or replace FUNCTION fcn_chk_dec(p_date number)
    return NUMBER
    as
    --DECLARE
    v_date NUMBER;
    v_active NUMBER;
    v_prev NUMBER;
    v_delta NUMBER;
    v_perc_delta NUMBER:
    CURSOR c_prev_active IS
         select date,people,
    lag(people,1) over (order by date)
         from stats
    where date between to_date(p_date, 'YYYYMMDD')-2 and to_date(p_date, 'YYYYMMDD')-1
         order by date desc
    BEGIN
         OPEN c_prev;
    loop
         FETCH c_prev INTO v_date,v_active,v_prev;
         exit when c_prev%NOTFOUND;
         v_delta:=v_active-v_prev;
    v_perc_delta:=trunc((v_delta/v_active*100),2)
    end loop;
    close c_prev;
    return v_perc_delta;
    END fcn_chk_dec;

    what i am trying to do is create a funtion that will return one value for the first row that comes back.
    here is my initial query. the reason i did not go with this query is because there are too many selects and i was told that's not good and slows down the system. Plus, i need to have a function call in another program that will access this function to compare it's output to a value in a table.
    here was my initial start:
    select date,people,delta,trunc((delta/people*100),2) as perc_delta
    from (select date, people,people-prev_dly_people as delta
    from
    (select date,people,
    lag(people,1) over (order by date) as prev_dly_people
    from stats
    where date between to_char(sysdate-2,'YYYYMMDD') and to_char(sysdate-1,'YYYYMMDD')
    order by date desc))
    basically, i have a table that has a total number of people. I want to get the percentage growth and decline from the most recent date and the date before it. This will give me a day to day percentage of people population change as of the most recent date.
    I need this to be a function becaus i want to be able to pass any date i want into it and get the given delta percentage at the time for the people's population.
    hope this makes sense.

  • OBIEE timestampdiff function syntax error

    Hi all,
    I am getting an error while applying timestampdiff function .help me to sort it out.
    TIMESTAMPDIFF(SQL_TSI_DAY,"- Sanction and Disbursment"."Value Date" , VALUEOF(NQ_SESSION.VAR_CAL_CURR_DATE))
    error details
    Formula syntax is invalid.
    [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 22025] Function TimestampDiff is called with an incompatible type.Please have your System Administrator look at the log for more details on this error. (HY000)
    SQL Issued: SELECT TIMESTAMPDIFF(SQL_TSI_DAY,"- Sanction and Disbursment"."Value Date" , VALUEOF(NQ_SESSION.VAR_CAL_CURR_DATE)) FROM "SIDBI Master"

    Aswin,
    Syntax looks to be fine but before applying it here can you check if both these 2 parameters returns date in same format:
    "- Sanction and Disbursment"."Value Date" = 08/21/2011 (No Timestamp)
    VALUEOF(NQ_SESSION.VAR_CAL_CURR_DATE) = 08/21/2011 (No Timestamp)
    Both shud have same format.
    Also, try this for verification
    TIMESTAMPDIFF(SQL_TSI_DAY,"- Sanction and Disbursment"."Value Date" , CURRENT_DATE)
    Hope this helps

  • Proper function syntax

    I can not seem to find documentation explaining proper syntax for the Rank function. Can anyone help with locating syntax or even provide the syntax? Your assistance is greatly appreciated.

    http://download-west.oracle.com/docs/cd/A97630_01/server.920/a96540/functions95a.htm#1000677

  • Analytical function syntax help

    The following query sorts by most occuring hesid descedning and requires TWO full table scans of the episodes_full_test table :
    create table episodes_full_test (epikey number, hesid number, dob date) tablespace analysis_ip_d;
    insert into episodes_full_test values (100, 20, to_date('31-07-1975','DD-MM-YYYY'));
    insert into episodes_full_test values (101, 20, to_date('31-07-1975','DD-MM-YYYY'));
    insert into episodes_full_test values (102, 20, to_date('31-07-1975','DD-MM-YYYY'));
    insert into episodes_full_test values (103, 20, to_date('31-07-1975','DD-MM-YYYY'));
    insert into episodes_full_test values (104, 10, to_date('31-07-1985','DD-MM-YYYY'));
    insert into episodes_full_test values (105, 30, to_date('31-07-1995','DD-MM-YYYY'));
    insert into episodes_full_test values (106, 30, to_date('31-07-1995','DD-MM-YYYY'));
    insert into episodes_full_test values (107, 30, to_date('31-07-1995','DD-MM-YYYY'));
    commit;
    select eft.hesid, eft.epikey, eft.dob
    from episodes_full_test eft
    join (select hesid, count(hesid) count_hesid
    from episodes_full_test
    group by hesid) v1
    on eft.hesid = v1.hesid
    order by v1.count_hesid desc, eft.epikey;     
    HESID EPIKEY DOB
    20 100 31/07/1975
    20 101 31/07/1975
    20 102 31/07/1975
    20 103 31/07/1975
    30 105 31/07/1995
    30 106 31/07/1995
    30 107 31/07/1995
    10 104 31/07/1985
    I'm sure there's a way to use analytical functions such that Oracle only needs to perform ONE full table scan of episodes_full_test, but I can't figure out the syntax
    Can anyone advise please ?
    (Oracle 9r2)
    Thanks, Gus

    Thank you for providing the create table, insert commands and required output as it makes answering the question much easier (once I'd removed the tablespace specification)
    SQL> select hesid, epikey, dob
      2  from
      3      (
      4      select eft.hesid, eft.epikey, eft.dob,
      5          count(*) over (partition by eft.hesid) count_hesid
      6      from episodes_full_test eft
      7      )
      8  order by count_hesid desc;
         HESID     EPIKEY DOB
            20        100 31-JUL-75
            20        101 31-JUL-75
            20        102 31-JUL-75
            20        103 31-JUL-75
            30        105 31-JUL-95
            30        106 31-JUL-95
            30        107 31-JUL-95
            10        104 31-JUL-85
    8 rows selected.
    SQL>

  • 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

  • Illustrator CC 2014 Graph function, SVG conversion to text outline option for web Firefox etc. compatibility

    In order to have Firefox and other browsers display text as designed in Illustrator, I've been converting text to outline when exporting to SVG. It's not ideal but it works generally - except now I am using the graphing function and it won't create outline fonts even when that option is selected.
    I've not been able to break the link with the graph function, e.g. by exporting to SVG or EPS and then opening those files and trying to export to SVG from there.
    Any suggestions e.g. about other ways of forcing illustrator to break the link with the graph data function - I'd keep the original file, this is just about getting a SVG file that will display text as intended in all browsers
    Cheers, Malcolm

    Make a copy of the AI file, select the graph object and expand is one way of doing it. You might also find this interesting, esp the later messages
    Does anybody know why type might render strangely when viewing a PDF in Chrome, Firefox and IE?

  • Instr function syntax error in MDX quary

    Hi all
    Wen Iam excuting this MDX quary its giving error;syntax error line at 3 ','
    SELECT
    Filter( [PERIOD].Generations(5).Members,
    InStr( [PERIOD].currentmember.[2010], "Cola" ) >0 )
    ON COLUMNS
    FROM REP.Rep;
    but wen iam excuting this below example
    SELECT
    Filter( [PERIOD].Generations(4).Members,
    InStr( "cocaCola", "Cola" ) >0 )
    ON COLUMNS
    FROM REP.Rep;
    its fine
    Plz can any help would be appriciated
    Edited by: user8815661 on 13 avr. 2010 04:17

    Hi gary,
    plz help on this , i already posted in forum but iam confident on u ,
    Ihave one scenario like calculate the ytd values using cross join like
    IIF(is ([Flow].CurrentMember,[YTD]),
    (case
    when
    is ([PERIOD].CurrentMember,[2008.01])
    Then (Sum (crossjoin({[DI-3]},CrossJoin({[FLOW].[MtD]},{[PERIOD].[2008.01],[PERIOD].[2008.01] })))/2)
    when
    is ([PERIOD].CurrentMember,[2008.02])
    Then (Sum (crossjoin({[DI-3]},crossjoin({[FLOW].[MtD]},{[PERIOD].[2008.01],[PERIOD].[2008.02]}))))
    when
    is ([PERIOD].CurrentMember,[2008.03])
    Then (Sum (crossjoin({[DI-3]},CrossJoin({[FLOW].[MtD]},{[PERIOD].[2008.01],[PERIOD].[2008.02],[PERIOD].[2008.03]))))
    etc,othercase)
    but I am trying other oneto decrese the size of formula
    IIF(is ([Flow].CurrentMember,[YTD]),
    (Sum (crossjoin({[DI-3]},CrossJoin({[FLOW].[MtD]},
    {filter([PERIOD].Generations(5).members,StrToNum(Right([PERIOD].CurrentMember.MEMBER_NAME,2)) <= StrToNum(Right([PERIOD].CurrentMember.MEMBER_NAME,2)) AND StrToNum(Left([PERIOD].CurrentMember.MEMBER_NAME,4))=StrToNum(left([PERIOD].CurrentMember.MEMBER_NAME,4)) ) }))))
    , othercase )
    but its result is same value for all the YTDs for every month, something is going wrong some where
    plz any help would be appriociated

  • String Function Syntax Needed to get Text after "@"

    Hi. I need to use a CF Function to get the domain name
    following the "@" charcter in an email address. For example,
    [email protected] would be converted to company.com. Does
    anyone know how to do this?
    Thanks!

    Hello Art,
    I did something similar, just leaving off the .com, etc. Not
    the most elegant
    I'm sure, but it works:
    <!--- Find position of '@' in users email --->
    <cfset stest=findnocase("@",#form.contactEmail#)>
    <!--- Now find the '.' --->
    <cfset etest=findnocase(".",#form.contactEmail#,stest)>
    <!--- Take everything inbetween the two, 1 is added to
    stest to get 1 space
    past the @, and same for etest, get prior to '.' --->
    <cfset
    email_test=trim(mid(#form.contactEmail#,(stest+1),((etest-1)-stest)))>
    Steve
    > Hi. I need to use a CF Function to get the domain name
    following the
    > "@" charcter in an email address. For example,
    [email protected]
    > would be converted to company.com. Does anyone know how
    to do this?
    >
    > Thanks!
    >

  • Pipeline function syntax issues

    What am I doing wrong:
    I get an error on pipe row (l_var)
    says "of wrong type"
    This code is just like the code from here:
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:4447489221109
    sqlplus >create or replace type mytesttype as object (a varchar2(1000));
    2 /
    function PipeTest return myTableType
    pipelined
    is
    l_query sys_refcursor;
    l_var mytesttype;
    begin
    open l_query for
    select object_name from user_objects where rownum < 11;
    loop
    fetch l_query into l_var;
    pipe row(l_var);
    exit when l_query%notfound;
    end loop;
    return;
    end;

    Your return type is return myTableType , whereas l_var is mytesttype.

  • JDBC MySQL INET_NTOA() Function & IP Conversion

    Firstly,
    Using the MySQL connector, any idea's why the select statement does not work ?
    The MySQL Database Table:
    mysql> select INET_NTOA(IPV4) from pptip;
    +-----------------+
    | INET_NTOA(IPV4) |
    +-----------------+
    | 255.255.255.255 |
    +-----------------+
    1 row in set (0.00 sec)
    SELECT * FROM PPTIP;
    +------------+
    | ipv4       |
    +------------+
    | 4294967295 |
    +------------+
    1 row in set (0.00 sec)Works perfectly in MySQL command line but I receive the following java runtime error:
    SQLException: Column 'IPV4' not found.
    SQLState: S0022
    try {
                Connection connection = DriverManager.getConnection("jdbc:mysql://127.0.0.1:3306/ppt","root", "password");
                System.out.println("Creating score card database");
                String sql = "SELECT INET_NTOA(ipv4)  FROM pptip";
                Statement stat = connection.createStatement();
                ResultSet rs = stat.executeQuery(sql);
                while (rs.next()) {
                    System.out.println( rs.getString("IPV4"));
                // Close everyting
                rs.close();
                stat.close();
                connection.close();
            } catch (SQLException ex) {
                // handle any errors
                System.out.println("SQLException: " + ex.getMessage());
                System.out.println("SQLState: " + ex.getSQLState());
                System.out.println("VendorError: " + ex.getErrorCode());
            }Thanks for your help..
    Rob

    Thanks for your response, but MySQL statements are not case sensitive.
    The actual error comes from the SQL Comment:
    String sql = "SELECT INET_NTOA(ipv4) FROM pptip";
    Both
    String sql = "SELECT ipv4 FROM pptip";
    and
    String sql = "SELECT IPV4 FROM pptip";
    works fine.. the INET_NTOA function does not.
    I suspect the driver does not support this... not 100%.
    Rob

  • MDX syntax conversion

    does anyone have an idea how to convert this MDX statement:
    ALTER CUBE cubeName
    DROP DIMENSION MEMBER memberName
    [WITH DESCENDANTS]
    I got this from the SQL Server Analysis Services 2005, I couldn't find a similar to this in Essbase technical reference.
    Thank you

    You won't find a comparison. Essbase's use of MDX is not as robust as Analysis Services.
    Remember MDX is a Microsoft language and Hyperion adopted it later on. Over time perhaps they will increase the functionality but for now it does query related functions, it does not impact the outline or security as it does in MSAS.

  • List Function Syntax

    I feel so stupid asking some of these questions because I
    just came out of a semester of Director MX2004 and I feel like I
    should know this...but it really wasn't addressed in class.
    I'm trying to make Director check a list for a set of items.
    For example, a list of numbers [1,3,4,1,1,6]. I want the program to
    check for a specific set of numbers [1,1,1] so that it will trigger
    a specific response. I know how to trigger the response using an on
    mouseUp handler, but I can't figure out how to make it check for
    the sets of numbers I need.
    It's a dice game. The player uses a mouse click to roll 6
    individual dice. The results (like 1,3,4,1,1,6) show up in text
    fields above the roll button. The player then chooses which dice to
    keep. From what was kept, the program figures a score and then (if
    applicable) gives the player a chance to roll again with the
    remaining dice. What the player keeps from the second roll is added
    to the first score.
    I can make it roll [random(6)] and put the result into the
    field and I can even make it add all the field contents to a
    list...but I can't make it check the list for patterns.
    Am I making any sense at all? I feel like someone's going to
    say "go back to the sandbox, little girl, you don't have enough
    experience to be here" but I'm too frustrated not to ask.
    Taking a Risk,
    Shadowhawk's serenity

    Handler: a separate chunk of code that you can execute. In
    other programming languages it might be called a method or a
    function.
    Parameter: an item of data that you send to a handler. In
    other languages, this might be called an attribute.
    In my example "FindPatternInList()" is a handler, and "aList"
    and "aPattern" are parameters.
    Depending on what type of data you pass as a parameter, the
    data may be the original data or a copy. The technical terms are
    "reference" and "value". If you pass a list as a parameter to a
    handler, Director will pass the original list. Any changes to that
    list in the handler will affect the list anywhere else it is
    referred to. Lists are "passed by reference".
    Strings, on the other hand, are "passed by value". Director
    will make a copy of the string and the handler will work on that
    copy. The original string will not be affected.
    Suppose you want to change the original string. In that case,
    you must return the modified copy. Example:
    aString = "This is "
    aString = Concatenate(aString, "a string") -- the equals sign
    places a new value in aString
    put aString
    -- "This is a string"
    The Concatenate() handler might look like this:
    on Concatenate(aString1, aString2)
    put aString2 after aString1
    return aString1
    end
    If you comment out the line "return aString1" above, then
    aString will become <Void>, as no value will be returned from
    the Concatenate() handler.
    Variable names (and parameters are variables) are merely
    human-readable labels that refer to the place in the computer's
    Random Access Memory (RAM) where the beginning of a particular
    piece of data is stored. When you pass a list as a parameter,
    Director actually passes this memory address. You can thus have two
    or more variables which "point" to the same chunk of memory. If you
    use one variable to change the data at that memory address, the
    other variable will instantly see the same change.
    This is true of all "objects": lists, points, rects,
    instances of Parent Scripts, images, sprites, members, colors and
    so on are all objects.
    Strings, floating point numbers and integers are not objects.
    They are "primitives". When a primitive is passed to a handler,
    Director copies the data from its current memory address and
    creates a new copy at a new memory address. Because both objects
    and primitives look like variable names, it is not immediately
    evident whether the data is an object being passed by reference or
    a non-object being passed by value.

  • Function modules for unit conversion

    hai gurus.
    what is the function module to make one qty to the same unit as other qty.
    if one is in kg and other in pounds
    i want to make both in pounds.
    pls help me with this

    Hi
    chk UNIT_CONVERSION_SAMPLE
    also chk this
    CF_UT_UNIT_CONVERSION
    Some Insights-
    Unit conversions
    with NW2004s the HOW-TO GUIDE for qty conversion is obsolete.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/27/b65c42b4e05542e10000000a1550b0/content.htm
    As of SAP NetWeaver 2004s you can create quantity conversion types using transaction RSUOM.
    The business transaction rules of the conversion are established in the quantity conversion type. The conversion type is a combination of different parameters (conversion factors, source and target units of measure) that determine how the
    conversion is performed.
    In terms of functionality, quantity conversion is structured similarly to currency translation.
    Quantity conversion allows you to convert key figures with units that have different units of measure in the source system into a uniform unit of measure in the BI system when you update them into InfoCubes
    http://help.sap.com/saphelp_nw04s/helpdata/en/27/b38c4284a8c353e10000000a1550b0/content.htm
    It is entered in ODS table linked to info object (0material)
    What you need to do basically is-
    1 ) Goto your infoobject for eg- 0material
    2 ) In Info object Maintenance- Tab page- Bex Explorer
    3 ) Enter 0BASE_UOM in Base unit of measure
    4 ) Generate UOM ODS (System generates it with prefix UOM)
    It is made of 4 fields (1 more in case of compounding) with SID for them. This is the place where you enter numerator and
    denominator to calculate conversion factor
    5 ) Load the UOM ODS with conversion from 0MAT_UNIT_ATTR or flat file
    6 ) Define conversion type
    7 ) In the conversion type, then you can select 0Material in the dynamic determination of conversion factor
    8 ) Select source unit and target unit
    For more help refer SAP help file on NW2004s. It is comprehensive and even explain - How to do unit conversion in
    transformation rule?
    http://help.sap.com/saphelp_nw04s/helpdata/en/4f/707242df019c60e10000000a1550b0/content.htm
    Check this sample code,
      CALL FUNCTION 'CONVERT_TO_LOCAL_CURRENCY'
        EXPORTING
    *     CLIENT                  = SY-MANDT
          DATE                    = pdate
          FOREIGN_AMOUNT          = p_amt1
          FOREIGN_CURRENCY        = p_curr1
          LOCAL_CURRENCY          = p_curr2
    *     RATE                    = 0
    *     TYPE_OF_RATE            = 'M'
    *     READ_TCURR              = 'X'
        IMPORTING
          EXCHANGE_RATE           = w_rate
          FOREIGN_FACTOR          = w_fact1
          LOCAL_AMOUNT            = w_amt
          LOCAL_FACTOR            = w_fact2
    *     EXCHANGE_RATEX          =
    *     FIXED_RATE              =
    *     DERIVED_RATE_TYPE       =
        EXCEPTIONS
          NO_RATE_FOUND           = 1
          OVERFLOW                = 2
          NO_FACTORS_FOUND        = 3
          NO_SPREAD_FOUND         = 4
          DERIVED_2_TIMES         = 5
          OTHERS                  = 6.
      IF SY-SUBRC <> 0.
        write: / 'Conversion to loc.curr. failed:',
                 p_curr1, '->', p_curr2, 'err.code=', sy-subrc.
      ELSE.
        write: / 'to Loc.curr:', p_amt1 currency p_curr1, p_curr1, '->',
               w_amt currency p_curr2, p_curr2,
               '(', w_rate, ')', w_fact1, w_fact2.
      ENDIF.
    http://www.geocities.com/victorav15/sapr3/examples/currconv.txt
    Check this
    CONVERSION_FACTOR_GET
    Measurement unit conversion: Get measurement unit conversion factor Not for Dimensionless Units of Measure
    UNIT_CONVERSION_SIMPLE Measurement unit conversion by table T006, with rounding
    UNIT_OF_MEASURE_SAP_TO_ISO 
    UNIT_OF_MEASURE_ISO_TO_SAP
    MATERIAL_UNIT_CONVERSION Material quantity conversion from Base Unit of Measure to Alternative Unit of Measure and vice versa. For Dimensionless Units of Measure (Each, Piece, Box etc.) conversion depends on the given Material (see table MARM). For other Units of Measure (Length, Weigth etc.) conversion can be calculated from the T006 table or via CONVERSION_FACTOR_GET.
    CONVERSION_EXIT_CUNIT_INPUT Conversion exit for commercial (3-char) measurement unit INPUT
    CONVERSION_EXIT_CUNIT_OUTPUT Conversion exit for commercial (3-char) measurement unit OUTPUT
    CONVERSION_EXIT_LUNIT_INPUT Conversion exit for technical (6-char) measurement unit INPUT
    CONVERSION_EXIT_LUNIT_OUTPUT Conversion exit for technical (6-char) measurement unit OUTPUT
    UNIT_OF_MEASUREMENT_HELP Input help for measurement units of a predefined dimension
    http://www.geocities.com/victorav15/sapr3/abapfun.html
    Reward all helpfull answers
    Regards
    Pavan

  • Function to Sub Conversion

    Howdy,
    I've got a very basic question, I have a simple function, I wanna convert it to sub!
    Private Function getActiveHyperlink() As IHTMLElement
    Dim element As IHTMLElement = HtmlEditor1.StateQuery.GetActiveHtmlElement()
    While String.Compare(element.tagName, "BODY", StringComparison.OrdinalIgnoreCase) <> 0
    If String.Compare(element.tagName, "A", StringComparison.OrdinalIgnoreCase) = 0 Then
    Return element
    End If
    element = element.parentElement
    End While
    Return Nothing
    End Function
    The conversion is so easy, just remove the "Private Function" and "End Function" but I don't know how to do with Return(s) in a sub!
    Cheers.

    The conversion is so easy, just remove the "Private Function" and "End Function" but I don't know how to do with Return(s) in a sub!
    Why?
    Private Sub getActiveHyperlink(ByRef thisIHTMLElement As IHTMLElement)
    Dim element As IHTMLElement = HtmlEditor1.StateQuery.GetActiveHtmlElement()
    While String.Compare(element.tagName, "BODY", StringComparison.OrdinalIgnoreCase) <> 0
    If String.Compare(element.tagName, "A", StringComparison.OrdinalIgnoreCase) = 0 Then
    thisIHTMLElement = element
    End If
    thisIHTMLElement = element.parentElement
    End While
    thisIHTMLElement = Nothing
    End Sub

Maybe you are looking for

  • Change to list of snooze times in 10.9.5?

    Holding down the Snooze button on a notification has, since the original 10.9, allowed you to select a time until the notification will reappear.  (Yes, the list is different depending on whether the event has already occurred.)  I just tried to snoo

  • I know, another external monitor question...

    Can someone please point me to a link or suggest some keywords to find a solution for adding an external video monitor? Apparently I'm not using the right ones. FCP manual says to use a "3rd party video interface". I would like to monitor my video on

  • Looking for opinions, experiences

    Hello. I'm evaluating Contribute for my company's needs, and while I've gone through all the marketing collateral, I wanted to get some feedback from the users in the field, as it were. What do you love about Contribute? What do you think can be impr

  • Will not Load WebSites after Upgrade today. Most of the plugins errored & were deemed incompatible with the new update.

    Will not connect to ANY website - my other Browsers (IE & Safari are still working) I downloaded & reinstalled Firefox but this didn't fix the problem.

  • RAM for RAC implementation

    Dear All, It is not a core requirement of RAC that the RAM in both machines has to be exactly the same? I have 2 linux machines with 16 GB and 14 GB RAM respectively. After installation the RAM might be updated to 16 GB in both machines. Regards, Imr