Skip to Content
0
Former Member
Jun 08, 2010 at 03:08 PM

Updating Matrix with XML

47 Views

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