cancel
Showing results for 
Search instead for 
Did you mean: 

Error while using Export to CSV fundtionality in VC

aparida
Explorer
0 Kudos

Hi,

I was following the steps in How to Guide on exporting VC data...

I created a simple application for Export to CSV but not able to deploy it. It gives following erros.

Error in compiling Flex application: Error 1002: String literal was not properly terminated

(/usr/sap/ABS/DVEBMGS00/j2ee/cluster/server0/GUIMachine_Business_Packages/Purchasing_Export_39156/FLEX_COMPILATION_FOLEDR/AAD1MH.mxml:400)

Error 1033: ')' expected

(/usr/sap/ABS/DVEBMGS00/j2ee/cluster/server0/GUIMachine_Business_Packages/Purchasing_Export_39156/FLEX_COMPILATION_FOLEDR/AAD1MH.mxml:401)

Error 1205: The statement 'dd_ons' is incomplete.

(/usr/sap/ABS/DVEBMGS00/j2ee/cluster/server0/GUIMachine_Business_Packages/Purchasing_Export_39156/FLEX_COMPILATION_FOLEDR/AAD1MH.mxml:401)

Error 1025: Left side of assignment operator must be variable or property.

(/usr/sap/ABS/DVEBMGS00/j2ee/cluster/server0/GUIMachine_Business_Packages/Purchasing_Export_39156/FLEX_COMPILATION_FOLEDR/AAD1MH.mxml:403)

Error 1033: ':' expected

(/usr/sap/ABS/DVEBMGS00/j2ee/cluster/server0/GUIMachine_Business_Packages/Purchasing_Export_39156/FLEX_COMPILATION_FOLEDR/AAD1MH.mxml:404)

Error 1025: Left side of assignment operator must be variable or property.

(/usr/sap/ABS/DVEBMGS00/j2ee/cluster/server0/GUIMachine_Business_Packages/Purchasing_Export_39156/FLEX_COMPILATION_FOLEDR/AAD1MH.mxml:407)

Error 1033: ';' expected

(/usr/sap/ABS/DVEBMGS00/j2ee/cluster/server0/GUIMachine_Business_Packages/Purchasing_Export_39156/FLEX_COMPILATION_FOLEDR/AAD1MH.mxml:408)

Error 1205: The statement '' is incomplete.

(/usr/sap/ABS/DVEBMGS00/j2ee/cluster/server0/GUIMachine_Business_Packages/Purchasing_Export_39156/FLEX_COMPILATION_FOLEDR/AAD1MH.mxml:406)

Error 1128: Attribute used outside class.

(/usr/sap/ABS/DVEBMGS00/j2ee/cluster/server0/GUIMachine_Business_Packages/Purchasing_Export_39156/FLEX_COMPILATION_FOLEDR/AAD1MH.mxml:408)

Error 1030: Statement block must be terminated by '}'

(/usr/sap/ABS/DVEBMGS00/j2ee/cluster/server0/GUIMachine_Business_Packages/Purchasing_Export_39156/FLEX_COMPILATION_FOLEDR/AAD1MH.mxml:19)

Error 1000: Syntax error.

(/usr/sap/ABS/DVEBMGS00/j2ee/cluster/server0/GUIMachine_Business_Packages/Purchasing_Export_39156/FLEX_COMPILATION_FOLEDR/AAD1MH.mxml:1342)

Failed to compile AAD1MH.mxml

Any clues?

Any help will be highly appreciated (Not to be mentioned with points )

Regards,

Anurag.

Accepted Solutions (0)

Answers (5)

Answers (5)

aparida
Explorer
0 Kudos

Hi Benni,

Thanks for your valueable input.

The first one ( Calling from Portal) works perfectly fine. When I check the mxml code, it looks suspicious. The mxml code for the complex formula is like this...

private function FN1() { initMacros();return ("pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex?QUERY="ROW1.REPTNAME<b>)</b>"BI_COMMAND_1-

BI_COMMAND_TYPE=EXPORT&BI_COMMAND_1-EXPORT_FORMAT=CSV&BI_COMMAND_1-

ITEM_REF_LIST-ITEM_REF_1=ANALYSIS&BI_COMMAND_1-null=";}

Does it look fine to you? I am lil worried abt the extra brace ( in Bold) in the code.

And my complex formula goes like this...

"pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex?QUERY=" &STORE@REPTNAME&"BI_COMMAND_1-

BI_COMMAND_TYPE=EXPORT&BI_COMMAND_1-EXPORT_FORMAT=CSV&BI_COMMAND_1-

ITEM_REF_LIST-ITEM_REF_1=ANALYSIS&BI_COMMAND_1-null="

As I cant modify the mxml code. How can I change this formula to get rid of this error?

Regards,

Anurag.

aparida
Explorer
0 Kudos

Hi Benni,

Can you please explain a little bit more in this regard? How do I call this link from portal? I mean from where in portal?

And how do i go the the .mxml file in VC where I can get the option to copy the code?

Regards,

Anurag.

Former Member
0 Kudos

Hi Anurag,

I tried to call the csv-export-method for a query in the portal directly and it worked, so I think the error is in your VC-model. Here's what I did:

1. drag a line from the info-port of your query to the in-port of an existing or of a new form.

2. select the form.

3. check the created field "REPTNAME", so that it is displayed in the form.

4. remove the complex formula that generates the export functipon

5. deploy your model and run it in the portal

6. once the query is executed, the field REPTNAME should show the reportname (.e.g. ZZ_AB_C01_Q001 or similar).

7. change the following URL to the settings of your portal, i.e. replace <yourhost>,<yourport>,<yourreportname>

http://<yourhost>:<yourport>/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.sap.pct!2fpla...

dd_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.b

ex?QUERY=<yourreportname>&BI_COMMAND_1-

BI_COMMAND_TYPE=EXPORT&BI_COMMAND

1-EXPORTFORMAT=CSV&BI_COMMAND_1-

ITEM_REF_LISTITEM_

REF_1=ANALYSIS&BI_COMMAND_1-

null=

8. execute this url in the portal (i.e. paste it to the adress-field of your browser

After some time, an attempt to download the csv-file should appear. If not, you have to trace the bug in your vc-application.

As I mentioned, try to copy the mxml-file to clipboard (compile, click "view source code", select "AAD1MH.mxml", copy to clipboard, that's the 4th button on the left). Paste it to an editor, goto the line, that is mentioned in the error-message after deploying your original model. By doing this, try to find the cause of your error in the vc-model.

Hope this helps,

Benni

Message was edited by:

Benjamin Leunig

Former Member
0 Kudos

Hi Anurag,

I don't know whether you have to make specific changes to that formula. That depends on your environment. Try to call the csv from the portal directly. I.e. take the formula, replace the part " & STORE@REPTNAME &" by the reportname (also the two " at the beginning and at the end and call this link in your portal. Maybe this works?

You may also take a look at the source code after compiling. Go to AAD1MH.mxml, push the "copy to clipboard" button, paste it to your favorite editor and go to line number 400. Maybe this gives you a clue where the missing ')' comes from.

I'm sorry I can only give you hints where to look for the error yourself. I'm not familiar with the export How-To-Guide you mentioned.

Good luck and best regards,

Benni

aparida
Explorer
0 Kudos

Hi,

Strangely enough...I had checked the formula by pressing the "Check" button and there was no error at that time. I had simply copied the formula fromt he How to Guide. Do I need to make any specific change to that?

Apart from this small formula there is no coding whatsoever. So just wondering how i got this syntax error

Former Member
0 Kudos

Hi Anurag,

Your first line says "String literal was not properly terminated", so I assume that all following errors are due to the wrong termination of a string.

So make sure you did not ommit any brackets in the huge formula of step 6 (chapter 3.2) of the How to Guide. In the formula editor you should use the "Check" button.

Best regards,

Benni