Tween/Transition import code gives a syntax error

Basicly, I'm using Tweens and transitions, and am having
trouble making them appear in some parts.
On a multipage website, pasting in the code:
import mx.transitions.Tween;
import mx.transitions.easing.*;
Gives me a syntax error for where the two lines appear. -
This will make any transitions and tweens not appear (the two lines
above need to be commented out for it to compile). However, when a
page is loaded that contains the code (and gives no syntax error),
the transitions and tweens in the first movie as well as the loaded
clip all work fine.
What would cause a synax error when trying to use the import
code?
The actual site itself you can see in progress at
http://cressaid.brettjamesonline.com/us
. The drop down menus just appear, until you load either the logos,
corporate id or brochures section in folio. Then they smoothly roll
down

SuperRoach,
> I think I found the solution - which was to use
Actionscript 2.0
> in the publish settings. This got rid of the error, and
made it
> work fine.
Yes, that makes sense, then. You can look up these classes
and
keywords, by the way, in the ActionScript 2.0 Language
Reference and
Components Language Reference. Both sets of documentation
indicate the
availability of everything you look up. For example, the
"import statement"
entry says:
Availability: ActionScript 2.0; Flash Player 6
David Stiller
Adobe Community Expert
Dev blog,
http://www.quip.net/blog/
"Luck is the residue of good design."

Similar Messages

  • Include program gives a syntax error

    Hello experts,
    I have a code piece as follows:
    REPORT  z_obj_emp.
    INCLUDE z_class_emp.
    z_class_emp is another z report.
    When I compile the report z_obj_emp, I get an syntax error:
    "Each ABAP program can contain only one "REPORT", "PROGRAM", "FUNCTION-POOL" statement."
    Could you please help me out to rectify this issue?
    Thanks,
    Mohit.

    Hello Sachin,
    Thanks for the reply. I have done as you have mentioned. Now when I execute the report z_obj_emp,
    I get a syntax error at the line:
    create object obj_emp.
    It says: "Statement is not accessible."
    The whole code of z_obj_emp is:
    REPORT  Z_OBJ_EMP.
    INCLUDE Z_CLASS_EMP.
    data: p_name type string,
          p_designation type string,
          obj_emp type ref to c_employee.
    create object obj_emp.
    p_name = 'EMP1'.
    p_designation = 'ACCOUNTANT'.
    call method obj_emp->set_attributes exporting
                         im_name = p_name,
                         im_designation = p_designation.
    call method obj_emp->display_attributes.
    call method c_employee=>display_count.
    The code of include z_class_emp is:
    *&  Include           Z_CLASS_EMP
    class c_employee  definition.
    defining the access specifiers.
      public section.
        constants: position type i value 30.
    parameterized method
        methods: set_attributes importing im_name type string
                                          im_designation type string.
    method
        methods: display_attributes.
    static method.
       class-methods: display_count.
      private section.
        data: name           type string,
                  designation type string.
    static variable.
       class-data: st_count type i.
    endclass.
    class Implementation
    class c_employee  Implementation.
    presenting the logic the methods.
       method set_attributes.
         name               = im_name.
         designation     = im_designation.
         st_count          = st_count + 1.
       endmethod.
       method display_attributes.
         write: / 'Name of Employee: '(001), at position name.
                / u2018Designation:'(002), at position designation.
       endmethod.
      method display_count.
       write: / 'Total Number of Employees ',
                             at position st_count left-justified.
      endmethod.
    endclass.
    Could you please let me know what the problem is now?
    Thanks,
    Mohit.

  • After converting a page to xhtml 1.0 Transitional compliant, Dreamweaver indicates a syntax error warning in the head section

    I had authored a few pages in HTML4.0 using templates, and all was well.  I decided to convert them to xhtml 1.0 transitional. So I modified the tags to lower case and closed everything and it all validates.
    The problem is that in Dreamweaver, it is indicatinga syntac error and I can't figure out why.  The result of this is that the Template path substitution breaks, rendering the generated pages totaly munged.
    Here is the head section:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    <!-- TemplateBeginEditable name="head" -->
    <title>TITLE</title>
    <meta name="Description" content="Description of page." />
    <!-- TemplateEndEditable -->
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="CACHE-CONTROL" content="NO-CACHE" />
    <meta name="robots" content="all follow" />
    <link rel="SHORTCUT ICON" href="favicon.ico" />
    <script src="../common/checkflash.js" language="JavaScript" type="text/JavaScript" />
    <script src="../common/runflash.js" language="JavaScript" type="text/JavaScript" />
    <script src="../common/rollover.js" language="JavaScript" type="text/JavaScript" />
    <script src="../common/weddings.js" language="JavaScript" type="text/JavaScript" />
    <script src="../common/preload-normal.js" language="JavaScript" type="text/JavaScript" />
    <link href="../common/weddings.css" rel="stylesheet" type="text/css"  />
    And here is the screen showing the error:
    Is this something simple that I have forgotton? Or is this a bug?
    ...Mike

    This seems to have been fixed by changing the format of the JS line from
    <script src="../common/checkflash.js" language="JavaScript" type="text/JavaScript" />
    to
    <script src="../common/checkflash.js" language="JavaScript" type="text/JavaScript"></script>
    Still not sure if this is proper markup that DW is screwing up, or if it's improper markup and DW has identified it, although on the wrong line
    ...Mike

  • [solved] my C code gives floating point errors.

    I've tried to create a simple function to determine if a number is prime or not.. whenever I compile and try to run I get a floating point exception and can't quite figure out why, I'm very new to C and compiling manually using gcc so any help is appreciated.
    here's my code: http://pastebin.com/m2f19dbac
    Last edited by zandaa (2008-10-01 06:36:35)

    I'm quite useless at programming:
    for (i=0; i <= x; i++) {
    if (x%i == 0 && i != 1) {
    result = 0;
    //break;
    if (i == x) {
    result = 1;
    //printf("%d\n", x);
    break;
    This loop always ends with result=1 because the last loop has i=x and therefore it changes the result value to 1.
    There are also many checks you could avoid with a "smart" for cycle:
    for (i=2; i <= x; i++) {
    if (x%i == 0) {
    return 0;
    return 1
    I was able to remove the "i != 1" part by having the for loop starting from 2.
    I removed all the if (i == x) clause because that only happens at the end of the for cycle.
    Also you could be smart and eliminate some values from the loop: for example you could avoid checking all the numbers higher than n/2 or than sqrt(n), but that's more related to the mathematics behind than to the programming
    Hope this helps
    edit: beaten
    Last edited by carlocci (2008-09-25 21:36:04)

  • Merged dimension gives #syntax error

    Hi everybody,
    i have a simple report that contains 2 query.
    i merged two dimensions and everything looks like fine.
    but when i just refresh the query it gives me syntax error;
    bo system : 4.1 sp3 and both of queries are bex queries.any suggestion please.

    Hi Veer,
    1) same behaviour with Applet as well as web mode
    2) No
    3) I created a webi report, added two bex queries, Country Code is the common dimension which I'm trying to merge. Once both BEx queries are freshed and the objects from both queries are available in in the report to choose from, I try to merge them Country Code, however the merge option isn't even available (i.e. it does not allow merging by selecting objects or choosing the merge from the menu). As a work around I pull the Country code in the report pane from each query as a seprarate objects, ( i notice Country code object from Query one has the values while the Country Code from the second query has the #TOREFRESH, although both query were refreshed at start).
    Since both Country Code objects are on the report cavas, I refresh both queries again. Now I see the values in both objects. Now if I select the Country code from the left hand panel it allows merging. After merging, I drag the new merage counry code on the report Cavas i see the combined values (so far so good). Next I refresh the report again and magically the merged objects is disappeared from the report canvas and the #SYNTAX erro is it remains there.
    As I said, I am using 4.1 with Sup Pak 3, build 1257.
    Any help would be appreciated.
    Regards
    WAK

  • Syntax errors for smarty code

    I work with smarty a lot, and I mean a lot.  Every single day in fact, all day long.  Is there a way to turn off the syntax errors for my smarty code?  Basically every file I open is going to tell me there are syntax errors all over the page...
    Thanks!

    I am not familiar with smarty but the options for disabling syntax errors can be found under the view menu,
    View > Code View Options > Syntax Error Alerts in Info Bar (tick or untick)
    Richard

  • Bug: syntax error in code editor breaks layout and redrawing windows incorrect

    I'm working with "SQL Developer" version:
    Oracle IDE    4.0.0.13.80
    Plataforma Java(TM)    1.7.0_45
    installed on windows 7  64 bits.
    when I execute some ddl command in the code editor with syntax error, all layout windows are incorrectly drawn, and I have to close "SQL Developer" application to go on.
    Example:
       COMMENT ON COLUMN "TABLE"."COLUMN1" IS 'comments on column 1';
       COMMENT ON COLUMN "TABLE"."COLUMN2" AS 'comments on column 2';
    First comment is correctly aplied but second comment has a syntax error (AS is wrong) but you no receive error output, layout it hangs.
    I tested with thick/OCI and using jdbc, and I always go to the same problem.

    Good Morning
    Did you ever get this working without restoring ?
    Kind Regards
    Marius

  • Select-options in SELECT query - syntax error

    Hi all,
      I get the error below when I try to use the select options in a SELECT query . Please help me.
    "The IN operator with "SO_AWART" is followed neither by an internal
    table nor by a value list."
    The code i have used(Logical database  PNP is used):
    TABLES: pernr,
            catsdb.
    INCLUDE ztime_cwtr_top.    " global Data
    INCLUDE ztime_cwtr_f01.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME.
    SELECT-OPTIONS SO_AWART FOR CATSDB-AWART.
    PARAMETERS P_THRES TYPE I.
    SELECTION-SCREEN END OF BLOCK B1.
    Get data from CATSDB table. Workdates within the date interval are considered.
      SELECT pernr workdate awart catsquantity beguz enduz status
      FROM catsdb
      INTO TABLE it_catsdb
      WHERE pernr  = pernr-pernr    AND
           workdate GE pn-begda     AND
           workdate LE pn-endda     AND
           status   IN ('20', '30') AND
           awart    IN  so_awart .
          awart    IN ('1100', '1137', '1138', '1139', '1140',
                      '1147', '1148', '1149', '1157', '2003' ).
    when I give the values directly i do not get any syntax error, but when I use select options in the where condition I get the syntax error.
    I have tried different options like using only the select-options in the where condition.
    Thanks in advance.....
    Madhu

    Solved.
    Code with syntax error:
    include z...top .
    include z...fo1.
    select-options: xxxxxxx
    Code  with no syntax error:
    select-options: xxxxxxx
    include z...top .
    include z...fo1.
    Thanks for all your help,
    Madhu

  • How to fix Syntax Error: Expected end of line, etc. but found end of script. in applescript?

    I am making an applescript for my modding tool for Minecraft. It used to use multiple apps and I am now trying to make one app for all the tasks.
    Here is the code:
    say "You are running iCraft version one point one for minecraft version 1.2.5"
    display dialog "Which tool do you want to use?" buttons {"Mod Installer", "Backup", "Restore"} default button 3
    set the button_pressed to the button returned of the result
    if the button_pressed is "Mod Installer" then
    do shell script "~/desktop/iCraft/iCraft.app/contents/re…
    display dialog "Insert all mod files into the Mods folder."
    display dialog "Have you inserted all Mod files into the Mods folder?" buttons {"Yes", "No"} default button 2
    if the button_pressed is "Yes" then
    do shell script "~/desktop/iCraft/iCraft.app/contents/re…
    display dialog "Finished"
    else
    display dialog "Insert mod files into the Mods folder and restart iCraft.app."
    end if
    if the button_pressed is "Backup" then
    display dialog "Are you sure you want to backup your Minecraft.jar in it's current state?" buttons {"Yes", "No"} default button 2
    if the button_pressed is "Yes" then
    do shell script "~/desktop/iCraft/iCraft.app/contents/re…
    display dialog "Finished, find it in your Backups directory in the iCraft folder"
    else
    display dialog "Backup aborted"
    end if
    if the button_pressed is "Restore" then
    display dialog "Are you sure you want to restore your Minecraft.jar with your backup?" buttons {"Yes", "No"} default button 2
    if the button_pressed is "Yes" then
    do shell script "~/desktop/iCraft/iCraft.app/resources/s…
    else
    display dialog "Restore aborted"
    end if
    end
    When I try to compile/run it gives me Syntax Error: Expected end of line, etc. but found end of script.

    Your script got mangled when pasting it into your message, but the main problem looks like you are missing a bunch of end if statements.  Unless your if statements are contained on one line, you need to terminate them with a matching end if statement - for example, the following are equivalent:
    if someString is "whatever" then display dialog "foo"
    if someString is "whatever" then
      display dialog "foo"
    end if

  • Getting syntax error while executing keyfigure routine BI 7.0

    Hello,
    I am writing a very simple keyfigure routine to calculate sales revune using sales quantity and sales price, I am getting error as follows
    - I am in 'Rules Details' screen and I have selected 'Routine' as the rule type. I enter the following code in routine
         RESULT = SOURCE_FIELDS_RULE-/BIC/IO_VB_QU *
         SOURCE_FIELDS_RULE-/BIC/IO_VB_PRC .
    - I hit the check button on the routine page, it says no syntax errors
    - Now I am back in the 'Rules Details' page and I hit the 'Check' button it gives me the following error
    Rule(target IO_VB_REV, group: Standard Group): Syntax error in routine
    Please tell me what is wrong. what should i check

    Hi Vaibhav,
    Here are the details
    - I am loading data from flatfile to an Infocube with 3 keyfigures: IO_VB_PRC (Sales Price) , IO_VB_QU (Sales Quantity), IO_VB_REV (Sales Revune). Getting values for IO_VB_QU and IO_Vb_PRC from flatfile and calculating for IO_VB_REV using routine
    - I created Transformations, and under  Rule Group: Standard Group box I see 'X' sign against 'IO_VB_REV' field, meaning not mapped to any datasource field
    - In rules detail screen, I add two source fields of Rule , IO_VB_QU and IO_VB_PRC. I see IO_VB_REV already added under 'Target fields of Rule' section
    - I then add the only following line to routine
    RESULT = SOURCE_FIELDS_RULE-/BIC/IO_VB_QU *    SOURCE_FIELDS_RULE-/BIC/IO_VB_PRC .
    Clicking on check button it gives no syntax error message. I save and exit back to Rule Details page.
    - I specify 'USD' as the Conversion Type and then click on check button it initially gives me 'Incorrect Input'  written in an information message box and then error that Syntax error in routine
    Let me know what is that I am missing
    Thanks for helping

  • Syntax Error after creating enhancements for subroutine

    Problem:
    Creating enhancement sections gives a syntax error when creating enhancement options and implementations for a subroutine and then ceating enhancement options and implementations for the call to that same subroutine.
    <p>
    Syntax Error:
    "Different number of parameters in FORM and PERFORM (routine: SET_LAYOUT, number of formal parameters: 2, number of actual parameters: 1)
    </p>
    <p>
    Here's the following scenario:
    </p>
    <p>
    A subroutine is defined in a program.
    The subroutine is called within the same program.
    </p>
    <p>
    I then executed these steps:
    <br>     1. Defined an enhancement section around the subroutine definition
    <br>     2. Defined an enhancement section around the subroutine call.
    <br>     3. Implemented the enhancement section around the subroutine definition and add an additional parameter.
    </p>
    <p>
         Currently, this gives a syntax error as expected, since the call to the subroutine needs 1 more parameter.
    </p>
    <p>
         4. Implemented the enhancement section for the subroutine call.  I change the call in the implementation so it passes the new parameter.
    </p>
    <p>
    A syntax check to this gives an error.  The syntax checker is not only checking the new implementation, but also the original subroutine that should have been overwritten.
    </p>
    <p>
    The enhancement sections use the same enhancement spot, and the enhancement implementations use the same implementation.
    </p>
    <p>
    I tried various combinations of using different enhancement spots and/or implementations, but all give the same syntax error.  I tried separating the subroutine in a different include and  retried my testing, but it still gave the same syntax error.
    </p>
    <p>
    Here's the sample code I first created to try troubleshooting the problem:
    </p>
    <p>
    <pre>
    ENHANCEMENT-SECTION ZEP_Z_MICHAEL_02 SPOTS ZES_Z_MICHAEL .
         PERFORM set_layout
              CHANGING
              wa_layout.
    END-ENHANCEMENT-SECTION.
    $$-Start: ZEP_Z_MICHAEL_02----
    $$
    ENHANCEMENT 2  ZEI_TEST_SECTIONS.
         "inactive version
         PERFORM set_layout
         using 'X'
              CHANGING
              wa_layout.
    ENDENHANCEMENT.
    $$-End:   ZEP_Z_MICHAEL_02----
    $$
    ENHANCEMENT-SECTION ZEP_Z_MICHAEL_01 SPOTS ZES_Z_MICHAEL STATIC .
    FORM set_layout
    CHANGING p_wa_layout TYPE slis_layout_alv.
    p_wa_layout-zebra = 'X'.
    wa_layout-no_colhead = 'X'..
    p_wa_layout-colwidth_optimize ='X'.
    wa_layout-window_titlebar = 'Woot'.
    ENDFORM. "set_layout
    END-ENHANCEMENT-SECTION.
    $$-Start: ZEP_Z_MICHAEL_01----
    $$
    ENHANCEMENT 1  ZEI_TEST_SECTIONS.
         "inactive version
    FORM set_layout
    using p_test type boolean
    CHANGING p_wa_layout TYPE slis_layout_alv.
    p_wa_layout-zebra = 'X'.
    wa_layout-no_colhead = 'X'..
    p_wa_layout-colwidth_optimize ='X'.
    wa_layout-window_titlebar = 'Woot'.
    ENDFORM. "set_layout
    ENDENHANCEMENT.
    $$-End:   ZEP_Z_MICHAEL_01----
    $$
    </pre>
    </p>
    <p>
    Please let me know if you think I am doing something wrong. 
    </p>
    <p>
    Thanks, <br>
    Mike
    </p>
    Edited by: Michael Herman on Mar 8, 2010 8:11 PM

    Yes, Sandra.  That is what did and it worked with no syntax errors!
    I'm not sure if this is getting off topic or not, but the SAP documentation(taken from the SAP help after pressing F1 on the keyword static in ERP6) seems misleading:
    "The STATIC addition is intended for the enhancement of data declarations, while the statement ENHANCEMENT-POINT without the STATIC addition is designed for the enhancement of executable coding."
    I would think the enhancement section ZEP_Z_MICHAEL_02 would fall under the category of executable code, while the enhancement section ZEP_Z_MICHAEL_01 would fall under the category of declarative code.
    Unfortunately, all the SAP enhancement sections I come accross are dynamic.  The SAP help explains the reasoning for this:
    "In contrast to the statement ENHANCEMENT-POINT, the addition STATIC of the statement ENHANCEMENT-SECTION can only be used with maximum caution for changes of data declarations, because a replacement and no completion is carried out. Especially application development within SAP should not use the addition STATIC at all with ENHANCEMENT-SECTION as the change will be active in the entire customer system. "
    I do not know what the word "completion" means in the previous quote, so I can't determine why it would matter.  Regardless, if a developer wanted to change a standard subroutine declaration, they would also have to mod an enhancement section to change it to static.  This seems to defeat the purpose of using enhancements, but maybe this scenario is not what enhancements were intended for.

  • Syntax error caused by duplicate methods in class.

    We've applied service patches to CRM 7 and afterwards I found that there were two versions of a method in a class. There was the original (shown in blue) which should point to the superclass, but does not and point to the ZL.... class. Then there's the second copy of the method, shown in black, which is the Redefined method. But, I have never seen both in existance at the same time when view via se24 or the component workbench.
    This is what I have tried:
    Redefined the method (shown in blue). But then I have two methods of the same name (SET_COUNTRY)  both shown in black. If I reverse the redefiniation it does successfully remove one of the redefintions, so I'm back to the state that started with, having the origianl superclass method and its redefiinition present. 
    This problem is in out QAS environment. I corrected this issue in DEV by deleting the Redefined method. However, the transport created fails when moved into QAS and gives a syntax error saying that duplicate methods exist, or is called twice. Which happens to be the problem that the transport should fix.
    Can anyone suggest anything to try and fix this?.
    As a last resort I opened our QAS envirnment for changes and within SE24 choose the option Utilities/Check.... But this did not resolved anything as all the sub-options said that everything was okay.
    Desperate now, the ledge of this window is not very wide but it's starting to look appealing, even though the building is only one storey high.
    [RESOLVED]
    My sanity is restored. No matter what I tried I could not get a transport through to correct this issue. In the end I had to open up QAS for changes and delete the redefined method from ZL... class by commenting out the call statement, and then answer yes to the question 'Do you want to delete the method?'. After this I re-activated all and the WebUI now works okay.
    The trouble is I'll need to repeat this process in production after the upgrade.
    When the problem was fixed in DEV a transport was created, but this just gave an error 8 when imported into QAS. The message given was exactly the problem that it was trying to fix.
    Jason
    Edited by: Jason Stratham on Sep 14, 2010 3:10 PM

    I think you should ask this on the ML or open a feture request on the bugtracker.

  • Syntax error  while executing Key Figure routine

    Hello,
    I am posting my question again, as I have not got any solution. Please help it will be really appreciated. Here's the description
    I am loading data from flatfile to an Infocube with 3 keyfigures: Sales Price , Sales Quantity, Sales Revune. Getting values for Sales Price and Salea Quantity  from flatfile and calculating for Sales Revunue IO_VB_REV using routine
    - I created Transformations, and under Rule Group: Standard Group box I have not mapped IO_VB_REV  any datasource field and see 'X' sign against the field.
    - In rules detail screen, I add two source fields of Rule , IO_VB_QU and IO_VB_PRC. I see IO_VB_REV already added under 'Target fields of Rule' section
    - I then add the only following line to routine
    RESULT = SOURCE_FIELDS_RULE-/BIC/IO_VB_QU * SOURCE_FIELDS_RULE-/BIC/IO_VB_PRC .
    - Clicking on check button it gives no syntax error message. I save and exit back to Rule Details page.
    - For IO_VB_REV field If I select any of 2 options i.e. Fixed Unit or No conversion it gives me a dump. So I select 'from conversion' option. In that case I enter USD against 'Conversion Type' field. It gives me information box popup with 'Incorrect Input Message'
    - When check button hit on 'Rule Details' page, it gives me error message ' Syntax error in routine '
    Why is it giving me syntax error, inspite of the fact that I get 'no syntax error' message on routine page. Also why am I getting short dumps on changing Conversion Type

    Hi Olivier,
    I really thank you for ur efforts in helping me solving this problem. Below is complete description of KF defined,
    1. Created InfoObjects for Sales Quantity, Sales Price, Sales Revunue
    Definition of <b>Sales Quantity</b>
    Name: IO_VB_QU
    Type/Data Type : Quantity
    Data Type: QUAN - Quantity field, points to unit field with format UN
    Currency / unit of measure
    Unit / Currency: 0UNIT
    Definition of <b>Sales Price</b>
    Name: IO_VB_PRC
    Type/Data Type : Amount
    Data Type: CURR - Currency field, stored as DEC
    Currency / unit of measure
    Fixed Currency: USD
    Definition of <b>Sales Revunue</b>
    Name: IO_VB_REV
    Type/Data Type : Amount
    Data Type: CURR - Currency field, stored as DEC
    Currency / unit of measure
    Fixed Currency: USD
    2. As the data is being read from flatfile, created DataSource with fields for Sales ID, Sales Price, Sales Quantity. As I am reading unit for quantity from file (has values EA,BOX,CSE), I have a corresponding field UNIT in DataSource. No field for Sales Revunue.
    3. I use 'Create Transformation' functionality to automatically create transformations.
    4. Rule Details page of each of 3 KFs has following values
    <b>Rule Details page of Sales Quantity</b>
    Rule Type: Direct Assignment
    Aggregation : Summation
    Target Unit: 0UNIT
    Unit: from Source
    Source Unit: UNIT
    Source Fields of Rule: /BIC/IO_VB_QU, UNIT
    Target Fields of Rule: 0UNIT, IO_VB_QU
    <b>Rule Details page of Sales Price</b>
    Rule Type: Direct Assignment
    Aggregation : Maximum
    Fixed Target Currency : USD
    Currency: No Conversion
    Source Fields of Rule: /BIC/IO_VB_PRC
    Target Fields of Rule:  IO_VB_PRC
    <b>Rule Details page of Sales Revunue</b>
    Rule Type: Routine   
    Aggregation : Summation
    Fixed Target Currency : USD
    Currency: from Conversion
    Conversion Type: ??????.....(I entered USD it gives me Incorrect Input message)
    Source Fields of Rule: /BIC/IO_VB_PRC, /BIC/IO_VB_QU, UNIT
    Target Fields of Rule:  IO_VB_REV
    I have this line is the routine 
    RESULT = SOURCE_FIELDS_RULE-/BIC/IO_VB_QU *   SOURCE_FIELDS_RULE-/BIC/IO_VB_PRC.
    Let me know if u need any other info......
    I really appreciate u trying  to help me
    Vidya

  • Java syntax error : RFC Lookup

    My UDF Source code has an syntax error: missing return statement }
    but i can´t find the error.
    any ideas ?
    //write your code here
    String content = "";
    MappingTrace importanttrace;
    importanttrace = container.getTrace();
    // filling the string with our RFC-XML (with values)
    String m ="<?xml version="1.0" encoding="UTF-8"?><ns0:Z_GET_PRODH xmlns:ns0="urn:sap-com:document:sap:rfc:functions"><IN_MATNR>2100018693</IN_MATNR></ns0:Z_GET_PRODH>";
    RfcAccessor accessor = null;
    ByteArrayOutputStream out = null;
    try
         // 1. Determine a channel (Business system, Communication channel)
         Channel channel = LookupService.getChannel("xxxxxxxxxx","yyyyyyyy");
         // 2. Get a RFC accessor for a channel.
         accessor = LookupService.getRfcAccessor(channel);
         // 3. Create a xml input stream representing the function module request message
         InputStream inputStream = new ByteArrayInputStream(m.getBytes());
         // 4. Create xml payload
         XmlPayload payload = LookupService.getXmlPayload(inputStream);
         // 5. Execute lookup.
         Payload result = accessor.call(payload);
         InputStream in = result.getContent();
         out = new ByteArrayOutputStream(1024);
         byte[] buffer = new byte[1024];
         for (int read = in.read(buffer); read > 0; read = in.read(buffer))
              out.write(buffer, 0, read);
         content = out.toString();
    catch(LookupException e)
         importanttrace.addWarning("Error while lookup " + e.getMessage() );
    catch(IOException e)
         importanttrace.addWarning("Error " + e.getMessage() );
    finally
         if (out!=null)
               try
              out.close();
               catch (IOException e)
                   importanttrace.addWarning("Error while closing stream " + e.getMessage() );
         // 7. close the accessor in order to free resources.
         if (accessor!=null)
               try
              accessor.close();
               catch (LookupException e)
                   importanttrace.addWarning("Error while closing accessor " + e.getMessage() );
    Message was edited by:
            Gordon Breuer

    I have a solution without DOM parser. The XML code is seen as a sting and the code looks for a specific tag. In my case it is OUTPUT, you can adjust the code to your tag.
    String content = "";
    MappingTrace importanttrace;
    importanttrace = container.getTrace();
    // filling the string with our RFC-XML (with values)
    String m = "<rfc:ZZSG_TEST_XSLT_LOOKUP xmlns:rfc="urn:sap-com:document:sap:rfc:functions">"
                                + "<INPUT>" + request + "</INPUT></rfc:ZZSG_TEST_XSLT_LOOKUP>";
    RfcAccessor accessor = null;
    ByteArrayOutputStream out = null;
    try
    // 1. Determine a channel (Business system, Communication channel)
    Channel channel = LookupService.getChannel("Airline_Group_Two","RFC");
    // 2. Get a RFC accessor for a channel.
    accessor = LookupService.getRfcAccessor(channel);
    // 3. Create a xml input stream representing the function module request message.
    InputStream inputStream = new ByteArrayInputStream(m.getBytes());
    // 4. Create xml payload
    XmlPayload payload = LookupService.getXmlPayload(inputStream);
    // 5. Execute lookup.
    Payload result = accessor.call(payload);
    InputStream in = result.getContent();
    out = new ByteArrayOutputStream(1024);
    byte[] buffer = new byte[1024];
    for (int read = in.read(buffer); read > 0; read = in.read(buffer)) {
    out.write(buffer, 0, read);
    content = out.toString();
    catch(LookupException e)
    importanttrace.addWarning("Error while lookup " + e.getMessage() );
    catch(IOException e)
    importanttrace.addWarning("Error " + e.getMessage() );
    finally
    if (out!=null) {
    try {
    out.close();
    } catch (IOException e) {
    importanttrace.addWarning("Error while closing stream " + e.getMessage() );
    // 7. close the accessor in order to free resources.
    if (accessor!=null) {
    try {
    accessor.close();
    } catch (LookupException e) {
    importanttrace.addWarning("Error while closing accessor " + e.getMessage() );
    //returning the result – RFC-XML.response
      int start = content.indexOf("<OUTPUT>") + 8;
      int end = content.indexOf("</OUTPUT>");
      if (end > start && start > 8)
        content = content.substring(start,end);
    return content;

  • Syntax errors possible at runtime?

    Hello,
    i need to know something about those, i didn't really find any good explinations at google..
    so a syntax error is an error because we write something wrong: it's not written like it should
    so a syntax error is a compile time error, but now im a bit unsure if it is possible to have a syntax error which doesnt give an error at compile time, but does at run time
    i think like having
    public void main(String[] args) // we forgot the static declaration
    //do stuff
    it won't give an syntax error because it is fine, but when we run it it gives an error... is this then a syntax error hidden at compile time but a detected syntax error at runtime?
    anyone can confirm and if possible with my/an example?
    thanks in advance

    796870 wrote:
    public void main(String[] args) // we forgot the static declaration
    //do stuff
    it won't give an syntax error because it is fine, but when we run it it gives an error... is this then a syntax error hidden at compile time but a detected syntax error at runtime?Not really, since there's nothing wrong with the syntax. It's just not the right syntax for a class intended to run as a program.

Maybe you are looking for