cancel
Showing results for 
Search instead for 
Did you mean: 

Procedure with || concat function

0 Kudos


Hi

I'm trying to create a procedure to dynamicly create a string for my BOM

I have created 2 chareteristics to help me with this:

STPO_SORTF wich is a Reference to a table field

AUX_CHAR10 a help char to hold parts of concatenation

my procedure is as follows

Working

$self.AUX_CHAR10 = 'FOO' || 'BA',

$self.STPO_SORTF = $self.AUX_CHAR10

IF($Parent.SPC_RP = 5)

NOT working

$self.AUX_CHAR10 = 'FOO' || $self.STPO_SORTF,

$self.STPO_SORTF = $self.AUX_CHAR10

IF($Parent.SPC_RP = 5)

It seems as if every time I try to mix in the STPO_SORTF it just ignores my procedure, I have tried to see if this is because there is at type difference between chars but STPO_SORTF = DB field SORTF in STPO(also inherits this) = AUX_CHAR10

I have tried to force longer string than 10 wich produces a 10 char string even if concat is > 10 fx. 'FOO' || 'BAAAAAAAAAAAA' results in FOOBAAAAAA

Does anyhere have a suggestion to what I am doing wrong?

Accepted Solutions (1)

Accepted Solutions (1)

Flavio
Active Contributor
0 Kudos

Hi,

Just a question to better understand: when it is not working, is the characteristic STPO_SORTF getting the value 'FOO'? Or is it empty?

Thank you and bye,

Flavio

0 Kudos


No the value is not touched, and the result is whatever is already set in BOM so if value is 'G1234'

It will remain the same and not being concatnated. It is the same if I try using 2 help chars

$self.AUX_CHAR10 = 'G',

$self.AUX_CHAR102 = '1234' || $self.STPO_SORTF,

$self.STPO_SORTF = $self.AUX_CHAR10 || $self.AUX_CHAR102

It seems like it completly ignores the Procedure when I try to get the value $self.STPO_SORTF into a string.

Flavio
Active Contributor
0 Kudos

Hi,


Could you please try to read the reference characteristic adding MDATA?


Like the following, for instance:


$self.AUX_CHAR10 = 'FOO' || MDATA $self.STPO_SORTF,


Just let me know the result....


Thank you and bye,


Flavio

0 Kudos


Woooho that worked!, Excelent!

Thank you very much for the help, now I just need to read up on MDATA and why it is needed

Flavio
Active Contributor
0 Kudos

You are welcome!

I am happy that it works. And yes, in the LO-VC document, there is a brief explaination of the MDATA usage.

Thank you and bye,

Flavio

Answers (0)