Skip to Content
0

how to copy from standar field to extension with modify event script

Nov 13, 2017 at 10:51 PM

87

avatar image
Former Member

Hi, We need to copy value from standar field (purchasing unit) to an extension field in order to add it to WC:Invoicing Supplier/Invoice Entry. How is that script?. . We have SAP Cloud Application Studio SDK but still havent do this kind of things.Thanks in advance

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Horst Schaude
Nov 14, 2017 at 11:49 AM
0

Hello Gerardo,

In general you need to find the Business Object (BO) and the node to which the element belongs to.

Second, if this BO is released in the Public Solution Model (PSM) and the BO is marked as extendable you can create an Extension to this BO in the SDK.
Next you add an AfterModify script in which you assign the standard field to an extension field.

Can you elaborate a little bit about the "WC:Invoicing Supplier/Invoice Entry":

  • Shall the element / value simply appear in the Invoice?

You know that you can use Process Extension Scenarios to have an automated transfer of the element form node to node / query / ... including the values.

HTH,
. Horst

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Thank You: Horst I really appreciate your help; Following your indications I have a problem trying do association between "purchase unit" from PurchaseOrder BO and Supplier Invoice, it sends this error: "Error 2 Association 'ToPurchaseOrder' is a cross-deployment-unit association", I understand because BOs are different deployment unit from. Is there any way to do this? Thanks again. regard

0

Hello Gerardo,

A Deployment Unit is - as by its name - something which need to be deployed.

So, you cannot predict - at development - if the resp. DU is deployed or not.

As consequence we cannot ensure if this association is able to work or not. Therefore you nee to annotate this association with [CrossDeplyomentUnit]

HTH,
. Horst

0