cancel
Showing results for 
Search instead for 
Did you mean: 

Updating Matrix with XML

Former Member
0 Kudos

I've seen a bit of dicussion on XML in the forum, and I've made a reasonble search for XML content. So if there is something that I missed, I apologize in advance.

Environment: SAP B1 2007 A (8.0).

I am trying to update a matrix by adding a column. This is being done with the LoadBatchActions function. I have successfully updated native fields on other forms, i.e. Sales Quotation, Sales Order, Purchase Order, but I've never updated a matrix.

The form I'm currently trying to update is the Service Contract form under the Service module; specifically, the matrix under the Service Calls tab. Below is the XML which gives me the error "Column - already exists . . . Unique ID: SVCCNTCT"

<action type="update">

<item uid="89" type="-1" left="-1" tab_order="-1" width="-1" top="-1" height="-1" visible="-1" enabled="-1"

from_pane="-1" to_pane="-1" disp_desc="-1" right_just="-1" description="" linkto="" forecolor="-1" backcolor="-1"

text_style="-1" font_size="-1" supp_zeros="-1" AffectsFormMode="-1">

<AutoManagedAttribute/>

<specific SelectionMode="-1" layout="-1" titleHeight="-1" cellHeight="-1">

<columns>

<action type="add">

<column uid="SVCNTCT" type="16" title="Service Contact" description="" visible="1"

AffectsFormMode="1" width="100" disp_desc="0" editable="1" right_just="0" val_on="Y" val_off="N"

backcolor="-1" forecolor="-1" text_style="0" font_size="-1">

<databind databound="1" table="OSCL" alias="SvcCntct"/>

<ExtendedObject/>

</column>

</action>

</columns>

</specific>

</item>

</action>

My questions, then, are:

1. Are you allowed to put an 'add' tag inside an 'update' tag?

2. Why would I be getting an "already exists" error when I know, in fact, there is not a column that already exists with that name.

Thanks!

- Lock

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Allow me to add some information to this post. I am not trying to add a new field with the XML or in code, I'm just tring to expose it. The field has already been added through the User Defined Fields Management Tool.