cancel
Showing results for 
Search instead for 
Did you mean: 

How to change the name of an XML data element in link editor?

Former Member
0 Kudos

Hi,

Is it possible to change the name of a data element dynamically while doing the assignment in the link editor?

Something like Transaction.ReceiveXML{/Rowsets/Row/Name1 (name="Name2")}?

Regards,

V M.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi VM,

in the link editor you can use the Dynamic Link (see [Expression Editor|http://help.sap.com/saphelp_mii121/helpdata/EN/45/b89adfaf1447f7e10000000a114a6b/frameset.htm]).

With the dynamic link, you can enclose the property that contains the value with "#", which makes MII evaluate the value rather than use the property name. In your example, it looks something like this:

ReceiveXML{/Rowsets/Row[name='#MyProperty#']}

Hope this helps.

Michael

Edited by: Michael Otto on Oct 27, 2010 8:09 AM

Former Member
0 Kudos

That didn't work.

Former Member
0 Kudos

Hi VM,

could you give some more infos what has not worked? How did you implement the example from above? What is your goal, what do you want to achieve? Have you played around a bit with the dynamic link?

Michael

Former Member
0 Kudos

I am appending a ReceiveXML{/Rowset/SERIALNO} to a ResponseXML{/Rowset}. But, I want change the row name from 'SERIALNO' to 'serial'. Can I do this in the expression editor?

As suggested by you, I used the expression ReceiveXML{/Rowset/SERIALNO[name=#'serial'#]}. It gave me errors.

jcgood25
Active Contributor
0 Kudos

There is an action block for Column Aliasing.

Former Member
0 Kudos

Tried that too. But it doesn't list the columns available in the source XML. Something wrong with this action block.

jcgood25
Active Contributor
0 Kudos

The Alias action block can only provide you column names in the configure dialog box drop-down if the selected Document Source object has a valid reference document in Rowset/Rowset/Row format (like a query action block).

If there is no reference document embedded by default (like from generating sample content or configured columns in a document), like you would have in an empty transaction output property, then you can easily assign one by associating it with another object that does have one. The Alias block will then show you the columns in the configure dialog. If your column name it is only available at runtime, then you'll need to map then in the link editor with ColumnName1 / ColumnAlias1

Former Member
0 Kudos

The columns still won't show up even after assigning a reference doucment. Do you have a sample transaction somewhere in the module libraries or so?