Skip to content

Tips & Tricks - Parse Variables Between Methods

And a closer look on Technical Object References and Technical Attributes

In this example we have a closer look on how to migrate Technical Attributes +
performing same method multiple times on 1 selected row +
parse values from one method to another.

Note: It is a good practice always to enter data manually from the client, with the Debug Console active; to see what methods and attribute-strings look like.

File Layout

We expand our file with columns for Technical Class + 2 attributes for this class. This is a Technical Class
we will connect to our Sales Part.

Creating a Technical Object Reference

On the Method we insert a row with View Name TECHNICAL_OBJECT_REFERENCE

One of the important columns under Source Column is the KEY_REF. It is a concatenated string, and here we build it
by using string constants + column PART_NO.

Repetitive Execution of Same Method

The technical class is connected to a template with 2 attributes, as defined in our file layout. This means that we must execute
same method twice for each row.

  1. Here we enter View Name TECHNICAL_SPEC_ALPHANUM and choose option ViewNameUnique before saving the methods.
  2. Data migration will as usual fill in Method Name and check columns New and Modify,
    but will also add a suffix to View Name. This suffix has the same value as the sequence of the method.

The suffix is also  used under Source Column, so we can map both attribute-values from the file to different methods.

We enter a condition on the Method List, to execute the method only if there is a value in mapped column.

Mapping Values for Attribute-string in 3 Different Ways

When inserting a TechnicalObjectReference, the key-column TECHNICAL_SPEC_NO is generated from a sequence in method Insert___.
This item is added to the attribute string and is returned by method New__ (IN OUT parameter attr_).
For each method in the MethodList, attr_strings and OUT parameters are stored in memory, and may be used by methods
further down on the list by referring to item-name + method sequence like this <item-name>@<method-sequence>.

Now, below you can see how we build the attribute-string for method Technical_Spec_Alphanum_API.New__:

  2. TECHNICAL_CLASS + VALUE_TEXT is part of the input-file and is mapped under Source Mapping
  3. ATTRIBUTE is hardcoded in FixedValue for each method