on 09-03-2012 8:25 AM
Dear All
I want to multiply two characteristic values, Length and Breadth to get Square Inches.
I have used a procedure as below.
$SET_DEFAULT($SELF,SQUARE_INCHES,($SELF.Length$SELF.Breadth)), but I am getting Syntax error as below.
E28013 Error in parentheses: "(" without ")" to close
E28024 Syntax error in simple action/procedure
Can somebody help me in this.
Also, I need to add two characteristic values. You can take the example of the above and help me in writing syntax for adding also.
Thanks and Regards
Adithya
Hi Amber,
Your links have been very helpful. However, I tried changing the procedure as per your link as below.
$SET_DEFAULT ($SELF, SQUARE_INCHES, ($SELF.LENGTH * $SELF.BREADTH)), but still I am getting the same error with below error details. I am not able to rectify my syntax with the below error diagnosis.
Can you please help me out in this.
The syntax check found errors in the condition. Please note that, as a rule, keys (names of characteristics, classes, tables, and functions) containing hyphens can only be used in dependencies if preceded with the expression SKEY and entered in quote marks, for example:
SKEY 'EXT-COLOR'
Also, changes to master data that are made in parallel to object dependency maintenance are not always recognized due to buffering of data.
The cursor marks the place where the error occurs. You may have a list of detailed causes of errors to choose from.
Check your entry and correct the error. You have the following options for analyzing and correcting the error:
Regards
Adithya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Adithya,
As Markus said , it seems that you are using character type. I was able to create characteristics with numeric without any syntax error.
$SET_DEFAULT ($SELF, AN_SQUARE, ($SELF.AN_LENGTH * $SELF.AN_WIDTH)).
Do you have the comma in the end ? as that can raise a syntax error. The one you mentioned above has comma ?
$SET_DEFAULT ($SELF, SQUARE_INCHES, ($SELF.LENGTH * $SELF.BREADTH)),
Please remove and confirm if all are numeric characteristics.
Thanks
Amber
Hi Amber
As Markus had mentioned, the problem was with the Datatype. I deleted the assignments and changed the datatype to Numeric. Now it is working completely fine.
However, I am not able to give decimal places, for example; 6 can be given but not 6.375.
It is giving the below error. I am not able to change the template also.
Message no. C4002
The value you entered does not correspond to the template defined for the characteristic format.
Correct the value according to the template shown in the error message. For further information, press F1 to refer to the online help.
Kindly require your valuable inputs on this.
Thanks and Regards
Adithya
Dear Adithya Shekhar,
in transaction ct04 you have to set the count of chars (e.g 😎 and the count of decimal places (e.g. 2) to get a mask for floating point data up to 999999,99 if you have a comma or 999999.99 if you have a dot for decimal separation. Have a look to the attachement.
Your template shows, that you haven't specified decimal places. There are only commata for separating thousands parts of the number.
Your template should be _,___,___,___,___.__ <= a dot two chars from the right
Then you can set decimals correctly.
About comma and dot you have to check system specific settings for this.
A german setting for 6 chars, 2 decimal places gives a template _.___,__
Good luck !
Regards,
Markus
Perhaps u fail because your characteristics are type of character ?
Why not using transaction CU65/66/67 to create a function module ZCL_GET_AREA for this.
Then you can call the function module like this in the editor of object dependencies:
000010 FUNCTION ZCL_GET_AREA
000020 (LENGTH = $SELF.LENGTH,
000030 WIDTH = $SELF.WIDTH,
000040 AREA = $SELF.AREA)
Respect the definition of import/export of data for the function module to get a result.
So you can also fix unit correction, if WIDTH is like inch an LENGTH is given in milimeters.
Greetings from Germany
Markus
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Adithya,
Please create a procedure per the example in the following link.
http://help.sap.com/saphelp_47x200/helpdata/EN/92/58c2eb417011d189ec0000e81ddfac/content.htm
I dont see any multiple or add in the syntax. Also please review the following
http://help.sap.com/saphelp_47x200/helpdata/EN/0f/9b58b3752611d183670000e8a49aad/content.htm
Thanks
Amber
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.