Quantcast
Channel: SCN : Discussion List - SAP Sourcing
Viewing all articles
Browse latest Browse all 1416

Updating Big text from ToolBar Script

$
0
0

We are not able to update a field from Subagreement to Contract of type Big Text

 

Can you please point out where the issue is, i know the code is custom.

 

Steps we followed

1. Create a extension field of type Big text in Subagreement(SA)- 1003

2. Create a extension field of type Big text in Contract Document(CD) - 2002

3. Create a Tool Bar Script in SA to update the field from SA to CD - code attached

4. Create a SD and save

5. fill some value in the extension of type Big text in SA

6. Execute the toolbar script again

7. change the value in the extension of type Big text in SA

8. Execute the toolbar script again

9. you will get error "target Exception"

 

Code:

 

//Purpose of this contract action
if(doc.getExtensionField("ZCLMSCDEXECSCP").get().getTextString(session) != null){

import com.sap.odp.api.common.types.TypeFactory;
act = TypeFactory.createBigText(doc.getExtensionField("ZCLMSCDEXECSCP").get().getTextString(session));

cont_doc.getExtensionField("ZCLMSCDAPPSCPE").get().setText(act.getTextString(session));

 

}

 

Error when running the Script to Update the Text Extension Field:

“ Target exception: java.lang.illegalArgumentException: text can not be changed”.

 

 

Any help will be appreciated,

Vaibhav.


Viewing all articles
Browse latest Browse all 1416

Trending Articles