Create Sales Order – Automatic Extraction app extensibility: Custom Proposal for Fields by Cloud BAdl

After uploaded document was extracted, the sales order request data may need to adapt with different business scenario or requirement. To address these specific needs, key user can create and maintain implementations of custom logic to enhance application and change application behavior.

The implementation can be maintained easily in Custom Logic app under Extensibility group.

Navigate to Custom Logic tab, there are a lots of enhancement implementations, if you have created the implementation for some specific BAdl, then you can maintain them from the implementation list. and you can also create a new implementation by click create icon.

To create a new enhancement implementation, select Sales:Sales Order Request from business context dropdown list, and choose the BAdl description as well. then give your implementation description, then implementation ID will be generate automatically.

Example: Fill Sales area and Request delivery date

When company code is 0001, set sales area with 0001, 01, 01. And if request delivery date is initial, then set 7 days later as default request delivery date.

Create a new implementation:

Implementation includes 3 parts: Input parameters, code logic and output parameters. The example code will be taken as default code so that user can do the changes conveniently.

Set default value for sales area:

Set default value for request delivery date, current system date can retrieve from class cl_abap_context_info method get_system_date.

Tips: The code editor support auto-completion, you can press “Ctrl + Space” to get the suggestion and press “Shift + Enter” to insert full signature.

Once the code is complete, click “Save Draft” button on the bottom, you can test your logic or publish it directly. but the test is recommended.

How to do the test:

To do the testing, you need to give the test data in importing parameters manually, then click “Test” button on the bottom, then check the test result from output parameters.

Input test data “0001” to company code in importing parameter sales order request header:

Input 1 row test data to importing parameter sales order request source item:

Input 1 row test data to importing parameter sales order request item with empty request delivery date:

Check test result, sales area and request delivery date are set with expected value:

Publish implementation:

Click “Publish” button, once the implementation be published successfully, you can see the status become “Published“.