cancel
Showing results for 
Search instead for 
Did you mean: 

How to set default values with SAP Cloud Application Studio

perage
Participant
0 Kudos

Hi,

I want to set dafault values for payment terms, incoterms etc when creating a new customer. Can anyone point me in the right direction for how this is acheived in cloud application studio?  Can I use code or just enhance screen for this? (e.g if defaults could vary depending on the org. the customer is created in.

Thanks in advance!

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

Hi Per,

Using the cloud application studio:

Extend the Customer Business Object.

  1. Add an indicator "IsInitialized" to the Customer.
  2. Create an AfterModifyEvent to the Customer on Root level

Now inside the AfterModify-Event you can add your code to initialize the Customer:


if (!this.IsInitialized) {

     this.IsInitialized = true;

     //

     // your initialization code follows here:

     //

}

Best regards

Ludger

--

Custom development with all4cloud.de

perage
Participant
0 Kudos

Thanks for the input. I'll try that, but when I want to fill e.g payment terms with 'ZX01' for a new cust - how do I get hold of the correct field (payment terms)


And - the 'AfterModifyEvent' - will it fire when you open the 'create new customer/convert from prospect' windows so that the user can see that the fields are automatically populated, or will they be populated when the user hits save?

former_member190501
Active Contributor
0 Kudos

Hi,

Did you try using Code list Restriction with out writing any logic in SDK.

Thanks,

Raju

Former Member
0 Kudos

Hi Per,

"AfterModify" will trigger on create.

There is a separate Event for when the user hits save "BeforeSave".

Best regards,

Ludger

--

Custom development with all4cloud.de

Answers (1)

Answers (1)

kumar_rituraj
Active Participant
0 Kudos

Hi Per,

Did u initialize payment terms in event after modify .

Regards

Kumar Rituraj