logo

Are you need IT Support Engineer? Free Consultant

Updating Sales Order Header and Sales Order Item u…

  • By sujay
  • 26/06/2026
  • 2 Views

In RAP, business processes are encapsulated within Business Objects (BOs), which define the data model and business logic. Developers interact with these Business Objects using the Entity Manipulation Language (EML), a modern ABAP syntax that supports operations such as CREATE, UPDATE, DELETE, and EXECUTE. By leveraging RAP and EML, applications become more maintainable, extensible, and upgrade-safe while adhering to SAP's Clean Core strategy and cloud-ready development standards.

Example : – 

 

MODIFY ENTITIES OF i_salesordertp

ENTITY salesorder

UPDATE FIELDS ( zz1_testdata_sdh )

WITH VALUE #( (

%keysalesorder = keys[ 1 ]-salesorder

zz1_testdata_sdh = ‘TestingData'

) )

ENTITY salesorderitem

UPDATE FIELDS ( zz1_status1_sdi )

WITH VALUE #(

(

%keysalesorder = keys[ 1 ]-salesorder

%keysalesorderitem = keys[ 1 ]-itemno

zz1_status1_sdi = keys[ 1 ]-%paramstatus

)

).

 

Note: The approach described here is not limited to custom fields. It applies to any field exposed by the SalesOrder or SalesOrderItem Business Object, regardless of whether the field is standard or custom.

If you introduce a custom field by directly appending standard database tables (for example, VBAK or VBAP), you must manually extend the entire data exposure layer. This typically involves extending CDS views, updating OData services, enhancing APIs, and ensuring the field is propagated across all relevant artifacts, which increases development effort and maintenance complexity.

A more Clean Core–compliant approach is to create custom fields using the Custom Fields and Logic (CFL) framework. When configured and enabled correctly, CFL automatically extends the relevant CDS views, OData services, and Business Objects, significantly reducing manual development. To ensure end-to-end availability of the custom field, enable the required UIs, SAP GUI, CDS Views, and APIs during field creation. For implementing custom business logic, use Cloud BAdIs instead of classical enhancement techniques.

For a detailed walkthrough on enabling CFL artifacts and implementing Cloud BAdIs, please refer to my previous blog.

– https://community.sap.com/t5/technology-blog-posts-by-sap/custom-field-and-logic-from-scratch/ba-p/1…

Source link

Leave a Reply

Your email address will not be published. Required fields are marked *