on 11-08-2010 12:14 PM
Hello Experts,
I'm new to SAP NWDI and have been working on NWDI since last couple of months, without any formal training.
I was working on one View and dunno how some auto-generated code has got added in the Implementation.
Below is that piece of Code:-
/*
* The following code section can be used for any Java code that is
* not to be visible to other controllers/views or that contains constructs
* currently not supported directly by Web Dynpro (such as inner classes or
* member variables etc.). </p>
*
* Note: The content of this section is in no way managed/controlled
* by the Web Dynpro Designtime or the Web Dynpro Runtime.
*/
//@@begin others
//@@end
}
I tried deleting this code, but every time i click 'Save Metadata', this code gets inserted again.
During Deployment, System gives following errors:-
*Syntax error on token "}", "interface", "class" expected*
*Unmatched bracket*
The system obviously won't get any opening paranthesis
I tried alot to remove this error but of no help.
I would be very grateful if this gets resolved.
Thanks alot in advance.
Regards,
Ashu R
Hi,
After Deleting unwanted code, check //@@ begin, //@@ End messages in the methods.
if you miss the order of begin, end messages, we will get this problem.
Regards,
Lakshmi Prasad.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ashu,
This "}" bracket related to the your Class <View name>
Like
public class <VIEW NAME>
{
/*
* The following code section can be used for any Java code that is
* not to be visible to other controllers/views or that contains constructs
* currently not supported directly by Web Dynpro (such as inner classes or
* member variables etc.). </p>
*
* Note: The content of this section is in no way managed/controlled
* by the Web Dynpro Designtime or the Web Dynpro Runtime.
*/
//@@begin others
//@@end
}
Inside this class you will find methods with opening and closing brakets static and with your custum method if any.
public <VIEW NAME>(IPrivateTesst wdThis)
public void wdDoInit()
public void wdDoExit()
public static void wdDoModifyView
Check and verify the opening and closing brakets and make appropriate changes.
Hope it will helps
Regards
Arun Jaiswal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi everyone,
Thank you for the replies.
Trust me, i have compared each and evry pair of brackets in the 2000 lines of code 5 times manually since yesterday.
Every pair is intact.
As you must be aware, when we place the cursor on the opening bracket or closing bracket, its corresponding bracket gets highlighted. I have tested that way as well.
The 1st opening bracket after the public class <classname> highlights the 2nd to last closing bracket in the form.
Also, i would like to add, that when i remove these unnecessary closing brackets, the error goes away. But as soon as i Save All Metadata, the system inserts these brackets again and throws error.
The system is behaving wierdly, if i change anything, it inserts closing brackets anywhere.
Thanks and Regards,
Ashu R
Edited by: Ashu Rupani on Nov 10, 2010 11:10 AM
Hi Ashu,
Please try to do the following things :-
1. One the view implemetation >> Right Click >> Local History >> Do the Compare With.. or any other as apprpriate. and check it.
2. Select the project >> Repair >> Do the 'Project Structure and Classpath' and 'Remove Orphaned and text'
If this not resolved your issue, then copu whole code in the Edit plus and check and verify the opening and closing brackets.
Hope it will helps
Regards
Arun Jaiswal
Hi Arun,
Thanks for the reply.
Nothing seems to be of any help in my case.
I can't compare the code with earlier versions as they are only yesterdays' erroneous versions and i did Repair, it did not remove the error.
Now i would again compare every bracket for the nth time.
Thanks again for taking time.
Regards,
Ashu R
Hi,
It looks like there is some mismatch of brackets in between the code. Don't bother about the opening brace in the start of lines
/*
The following code section can be used for any Java code that is
not to be visible to other controllers/views or that contains constructs
currently not supported directly by Web Dynpro (such as inner classes or
member variables etc.). </p>
*
Note: The content of this section is in no way managed/controlled
by the Web Dynpro Designtime or the Web Dynpro Runtime.
*/
//begin others
//end
}
as the opening brace corresponding to this last closing brace is in the start of the code just after the Documentation header
//begin documentation
//end
public class <View/Comp name>
{
So, check for the mis-match of brackets in the middle of the code...
Thanks
RV
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rohit,
I have again checked each and every paranthesis in the code but there is no mis-match.
There is a closing bracket for the Public Class just before these lines of code.
Also, i would like to add here that this commented code and closing bracket is present twice at the end of this form, while other forms have it only once.
It is wierd how it has appeared of nowhere.
Please help.
Thanks and Regards,
Ashu R
Edited by: Ashu Rupani on Nov 9, 2010 8:02 AM
Hi,
Whenever you create a WD component or a WD View, some of the is auto-generated, which will not be removed after deletion. Right click on the WD project and rebuild the project.
This should help you.
Regards,
Poojith MV
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The error is because of the missing bracket "}". First check the number of open brackets and closed brackets. there could be a difference in the numbers.
The code which u have given in the post is a section where u can use plain Java coding and your own classes and other methods which will be treated as global attributes.
Regards,
Poojith MV
fyi: moved to webdynpro as I think this is not related to NWDI.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.