cancel
Showing results for 
Search instead for 
Did you mean: 

How to make change the Extension definition field data type

former_member227405
Participant
0 Kudos

Hi All

I want to change the String data type  length of some custom field in SAP Sourcing application under Master agreement.

But I am not able to change the length of that field in extension definition even in Edit mode(standard behavior may be)

As the particular field is integrated through PI to ECC I can not  simply inactive and make the new one.

So could some one help me or provide me any workaround to make it possible without making new filed and again integrate the same  to ECC?

Could we can achieve this using script in script definition?

Thanks for your kind feedback.

Thanks

Peeyush Ranjan

Accepted Solutions (1)

Accepted Solutions (1)

former_member89217
Contributor
0 Kudos

Extensions when created actually generate physical database modifications. These can't be changed after the fact. If you needed fewer characters you could probably use scripting to truncate the values. However, if you need more characters than there are now your only course of action would be to create a new field of proper type/size and reintegrate that.  You could  script a way to move data from the old field to the new one in cases where it existed if need be.

Regards,

Gary

former_member190023
Contributor
0 Kudos

Hi,

In the provided situation, even the increase of size would be technically possible, although it might prove to be a bit complicated for inexperienced admins. (triggering an ALTER TABLE, then updating the internal CLM extension definition tables)

Still, there is a solution that could be classified as 'simple':

1. Assuming that your extension field is named Z_STRING, create a new extension field (temporary) named Z_STRING_COPY (same data type, same size)

2. Code a script, or use your DB admin to copy values from Z_STRING to Z_STRING_COPY

  • For a DB admin it will be as simple as "UPDATE table_name SET Z_STRING_COPY=Z_STRING"

3. Making use of , inactivate and remove Ext. Def. Z_STRING

4. Re-create Extension Definition Z_STRING, only this time with the correct new column size

5. Repeat step 2, copying from Z_STRING_COPY to the new Z_STRING column

6. Repeat step 3, to remove the temporary Z_STRING_COPY column

The end result would be a larger Z_STRING column with all the data from the old column, ensuring that no records are missed out and all the data is aligned to the initial values.

Regards,

Bogdan

former_member227405
Participant
0 Kudos

Thanks for your important feedback.

Thanks

Peeyush Ranjan

former_member227405
Participant
0 Kudos

Hi Toma,

As I just want to decresase the defined size of the field so I think it  is ok to put some validation perticular on that filed.

like doc.getExtensionField("Z_STRING").length()> 10

then trow exception on that filed to make it up to 10 size

Please kindly suggest if any .

Thanks

Peeyush Ranjan

Answers (0)