cancel
Showing results for 
Search instead for 
Did you mean: 

Assigning default value to characteristic , if not specified.

Former Member
0 Kudos

My Function is not getting triggered in dependency, when no value is assigned to Characteristic D1 which is numeric.

I am trying to give a value 0 if the value of D1 is not specfied, as given below

$SELF.D1 = 0 IF ( NOT SPECIFIED $SELF.D1 ),

FUNCTION ZSD_NONSTD_DETERMINATION

( PRODUCT = $SELF.PRODUCT,

D1 = $SELF.D1).

But it gives the follwing error. Pl suggest on how to tackle this issue.

E28021 Error: remaining part of expression cannot be interpreted

Pl help

Sunke.

Accepted Solutions (0)

Answers (4)

Answers (4)

Ritz
Active Contributor
0 Kudos

Sunke,

seems there is error in syntax , and thats why you are getting this message.

please check where exactly the cusor is pointing with "E28021 Error: remaining part of expression cannot be interpreted".

there may be a unveven space between words , please check carefully ,

also try to use below syntax.

$SELF.D1 = '0' IF NOT SPECIFIED $SELF.D1,

FUNCTION ZSD_NONSTD_DETERMINATION

( PRODUCT = $SELF.PRODUCT,

D1 = $SELF.D1).

also you can make default value directly in characterstic value tab of characterstic, go to CT04 , open characterstic D1 in change mode and if you have assigned values 0 , put a tick mark in default value , so with this 0 will be defaulted to this characterstic.

Hope it may help you.

Thanks

Ritesh

Former Member
0 Kudos

Hello Ritesh,

It doesnt work.

The basic prolem is that, the Function is not getting triggered with the D1 is not specified.

How to trigger a function  even if one of the parameter is not specied. This would resolve my issue.

Sunke

Ritz
Active Contributor
0 Kudos

Sunke Shivprasad,

I didnt understand what doesnt work?

the way i asked to set default using characterstic maintainace in CT04 ?

please explain step by step what you are doing with the function ? and before this function is gettig trigger , what you are expecting from user to set values?

if in your case D1 is a important parameter , please create a mandatory characterstic for it so that user cant go ahead without setting its value, if its a option characterstic do not use it in Variant Tables or function as without a value itw ill not work.

so now , reply what exactly is your expectations from this dependency and possible share the bussiness process.

Thanks

Ritesh

Former Member
0 Kudos

I would suggest that you set 0 as the default-value for the characteristic D1 using

$SET_DEFAULT($SELF, D1, 0)

this way it is set to 0 by default but it is still changeable.

alternatively, you can use the syntax

$SELF.D1 ?= 0

best regards,

eric

Lakshmipathi
Active Contributor
0 Kudos

Moved from SAP ERP SD Sales to SAP ERP PLM - Classification and Variant Configuration

G. Lakshmipathi

sambit_mishra
Active Participant
0 Kudos
Former Member
0 Kudos

Dear Sambit,

thanx for threads but i my issue still remains.

I am writing the dependency using cu01.

rgds

sunke