cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

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

Former Member
0 Kudos

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

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

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

Answers (0)