cancel
Showing results for 
Search instead for 
Did you mean: 

Syntax Error in Object Dependancy in Class

Former Member
0 Kudos

Hi All,

We are working out bacth specific unit opf measurement in steel industry.

The base unit of measure in Tonne. The batch specific UOM is Pieces.

We want system to calculate the batch speific UOM from the production order quantity which is tonnes.

For this we have defined following charactsristics in class which is assigned to materilals,

1. PIECES- Number of pieces in batch

2. SECTIONWEIGHT- This is the fixed value for every material the unit is KG/M i.e. Kilogarm per meter

3. Z_LENGTH- Length of the material which is order specific

4. WEIGHT- Batch weight which is nothing but the production order quantity in Tonnes.

We are defining the following formula to calculate the number of pieces in object dependancy in 'Procedure',

$SELF.'PIECES'=$SELF.'WEIGHT'1000$SELF.'Z_LENGTH'/$SELF.'SECTIONWEIGHT'.

While consistency check that is whether the formula is correct or not, system throwing me an error, 'Syntax error in simple action/procedure'

Kindly help to resolve this and also give input to handle the above scenario.

SmanS

Accepted Solutions (0)

Answers (1)

Answers (1)

dhaval_choksi3
Active Contributor
0 Kudos

Dear,

Write Dependency as shown below,

$set_default($self,pieces,($self,weight1000(($Self.z_lenght/$self.sectionweight))

Regards,

Dhaval

Former Member
0 Kudos

Hi Dhaval,

Thanks for your prompt response.

But the formula is not getting accomodated in one line.

What to do now?

Pls. guide.

SmanS

dhaval_choksi3
Active Contributor
0 Kudos

Dear,

Use Split Tab.

In first line write $set_default($self,pieces,($self,weight1000 then press Split tan it will branch yout to second tab then write rest part of the formula (($Self.z_lenght/$self.sectionweight)) and check concistency.

Regards,

Dhaval

Former Member
0 Kudos

Hi Dhaval,

Did exactly what you asked me to do. but still system is throwing me the same error and in addition to that one more error is 'Reference to characteristic required'

Kindly respond.

SmanS

dhaval_choksi3
Active Contributor
0 Kudos

Dear,

Some correction are there in my earlier formula,

Write as below,

$set_default($self,pieces,($self.weight1000) press split tab and then

($Self.z_lenght/$self.sectionweight))

Regards,

Dhaval

Former Member
0 Kudos

Hi,

Done.

But system gives following messages,

E28050 Characteristic is multiple value Z_LENGTH

E28063 Reference to object $ROOT, $PARENT or $SELF required

E28051 Reference to characteristic required

E28038 Numeric expression required

E28024 Syntax error in simple action/procedure

Pls help.

SmanS

dhaval_choksi3
Active Contributor
0 Kudos

Dear,

I have check the same formula at my end and it works fine.

I think check in your Header data of Dependency, i guess you have not selected Dependency type procedure.May be you have selected selection condition or something else.

Regards,

Dhaval

Former Member
0 Kudos

Hi Dhaval,

The dependency type is procedure only.

What is selection conditon?

SmanS

dhaval_choksi3
Active Contributor
0 Kudos

Dear,

Check your Characterstic z_lenght, this characteristic is set as mulipal value allowed.Check it by changing to single value.

Regards,

Dhaval

Former Member
0 Kudos

Hi Dhaval,

I have changed the data as per your suggestion but the result is same.

SmanS

dhaval_choksi3
Active Contributor
0 Kudos

Dear,

If possible send or share screen shots of your Dependency (Header and Depedency Editor).You can find my id inmy business card, send it on indiatimes id.

Regards,

Dhaval

Former Member
0 Kudos

Fine will do the same.

SmanS

rupesh_brahmankar3
Active Contributor
0 Kudos

Dear,

Have you created your Variant Function using CU65?

Also have you created your Characteristic Value Assignment to match the Characteristics being used in your Characteristic Object Dependency and that you have Written ABAP Code in an ABAP Function Module from CU65.

Please refer this link,

If you are using the IS-Mill then use the standard Characteristic

$self.sap_millca_quantity =($self.sap_millca_factor * $self.SAP_MILLCA_LENGTH)

Regards,

R.Brahmankar

Former Member
0 Kudos

Dhaval,

Thank you.

I correcetd the error with your solution.

The syntax error has been resolved.

Could you please guide me further for resolving the main issue.

Let me explain you the scenario in details.

Client manufactures stell angle.

The base UOM is Tonnes.

It is having following dimensions,

Width, Thikness, height, Length.

We have created material codes with the combination of width, thikness & height.

Length would be part of classification as one of the characteristics.

Beside length the other characteristics are PIECES, Z_LENGTH & SECTIONWEIGHT.

My requirement is whenever the production order is created for specific quantity, say 5 tonnes, the pieces should be calculated automatically in the batch classification.

Also after GR when the batch comes into stock, it should get updated if the batch quantity in tonnes changes throughout the logistics chain.

How to incorporate this as it is hampering the process a lot.

I feel you could help me to solve this.

SmanS

Former Member
0 Kudos

Hi Rajesh,

I have brief my exact requirement in my earlier reply.

Please help to tackle the same.

I have not created any function in CU65.

We are not using variant configuration.

Please give me step by step procedure for the solution

SmanS