How to use custom logic to set Incoterms in Sales Documents (2024)

In a sales document, by default, Incoterms are always determined from the sold-to party and not from the ship-to party.

From CE2202, it is possible for Incoterms to be derived from the ship-to party when creating or changing the sales document. You can set or change the following fields by implementing custom logic in the Business Add-Ins (BAdIs) Sales Header Business Data ModificationandSales Item Business Data Modification:


  • Incoterms version

  • Incoterms classification

  • Incoterms location 1

  • Incoterms location 2

To customize your BAdI logic, logon to the SAP Fiori launchpad as an Administrator and openCustom Logic app:

How to use custom logic to set Incoterms in Sales Documents (1)

ChooseCustom Logicin top menu bar and chooseCreate.

How to use custom logic to set Incoterms in Sales Documents (2)


Custom Logic app

You can implement the custom logic at the header level using Sales Header Business Data Modification (SD_SLS_MODIFY_HEAD_BUSINESS) or at the item level using Sales Item Business Data Modification (SD_SLS_MODIFY_ITEM_BUSINESS). It really depends on your business process.

You can follow as an example, the following implementation on the header level and on the item level.


  1. Header level - Fill the following entries and chooseCreate.



  • Business Context: Sales: Sales Document

  • BAdI Description: Sales Header Business Data Modification

  • Implementation Description: Modify Incoterms at the header level (for example)

  • Implementation ID: Generated by default


How to use custom logic to set Incoterms in Sales Documents (3)

ChooseDraft, implement your logic in Draft Logic page.

Sample Code:

MOVE-CORRESPONDING salesdocument to salesdocument_businessdata.

data: ls_customersalesarea type i_customersalesarea.

read table salesdocumentpartners WITH KEY partnerfunction = 'WE' INTO data(lv_shipto).

Select single incotermsclassification, incotermsversion, incotermslocation1, incotermslocation2
from I_CustomerSalesArea into CORRESPONDING FIELDS OF @ls_customersalesarea
where customer = @lv_shipto-customer and
salesorganization = @salesdocument-salesorganization and
distributionchannel = @salesdocument-distributionchannel and
division = @salesdocument-organizationdivision.

salesdocument_businessdata-incotermsversion = ls_customersalesarea-incotermsversion.
salesdocument_businessdata-incotermsclassification = ls_customersalesarea-incotermsclassification.
salesdocument_businessdata-incotermslocation1 = ls_customersalesarea-incotermslocation1.
salesdocument_businessdata-incotermslocation2 = ls_customersalesarea-incotermslocation2.

ChooseSave Draftand thenPublish.

With this customized logic, when creating or changing a sales document, the system will read the values of incotermsclassification, incotermsversion, incotermslocation1, incotermslocation2 fields of the ship-to party and then set/update the matched values at the sales header level.

How to use custom logic to set Incoterms in Sales Documents (4)


Create Sales Orders (VA01) app



  1. Item Level - Fill the following entries and chooseCreate.



  • Business Context: Sales: Sales Document Item

  • BAdI Description: Sales Item Business Data Modification

  • Implementation Description: Modify Incoterms at the item level (for example)

  • Implementation ID: Generated by default


How to use custom logic to set Incoterms in Sales Documents (5)

ChooseDraft, implement your logic in Draft Logic page.

Sample Code:


MOVE-CORRESPONDING salesdocumentitem to salesdocumentitem_businessdata.

data: ls_customersalesarea type i_customersalesarea.

if line_exists( salesdocumentitempartners[ salesdocumentitem = salesdocumentitem-salesdocumentitem partnerfunction = 'WE' ] ).
read table salesdocumentitempartners WITH KEY partnerfunction = 'WE' salesdocumentitem = salesdocumentitem-salesdocumentitem INTO data(ls_shipto).
Select single incotermsclassification, incotermslocation1, incotermslocation2
from I_CustomerSalesArea into CORRESPONDING FIELDS OF @ls_customersalesarea
where customer = @ls_shipto-customer and
salesorganization = @salesdocument-salesorganization and
distributionchannel = @salesdocument-distributionchannel and
division = @salesdocument-organizationdivision.

salesdocumentitem_businessdata-incotermsclassification = ls_customersalesarea-incotermsclassification. salesdocumentitem_businessdata-incotermslocation1 = ls_customersalesarea-incotermslocation1.
salesdocumentitem_businessdata-incotermslocation2 = ls_customersalesarea-incotermslocation2.

endif.


ChooseSave Draftand thenPublish.

With this customized logic, the system will read the values of incotermsclassification, incotermslocation1, incotermslocation2 fields of the ship-to party and then set/update the matched values at the sales item level.

How to use custom logic to set Incoterms in Sales Documents (6)


Create Sales Orders (VA01) app


Custom Configuration

Just a brief reminder that Incoterms setup is dependent on the following configuration steps. For example, in the Manage Your Solution app, choose Configure Your Solution. You can find this configuration activity under Sales -> Sales Master Data Management -> Set up Incoterms.

How to use custom logic to set Incoterms in Sales Documents (7)


Manage Your Solution app

Troubleshooting Tips


  1. Note: The Incoterms version is only editable for sales order with status open.



  1. When an item at the sales document is partially or fully delivered, it is not possible to change the Incoterms.


A message will be displayed, and the Incoterm details will not be taken over:

The system has collected messages. For more information, see the log.


How to use custom logic to set Incoterms in Sales Documents (8)


Message no. V2720



  1. Note: The Incoterms version is not changeable on item level.


A message will be displayed, and the Incoterms version won’t to be changed:

The system has collected messages. For more information, see the log.


How to use custom logic to set Incoterms in Sales Documents (9)


Message no. V2721

This blog post only shows a simple case using BAdI to set or change Incoterms at the sales documents. Basically, you can achieve various enhancement against your business process.

How to use custom logic to set Incoterms in Sales Documents (2024)
Top Articles
What is Green Insurance for Your Home? | Chase
What's the difference between a standard user and a read-only user? | FutureproofedCities Help Center
Www.politicser.com Pepperboy News
Ou Class Nav
Mylife Cvs Login
Buckaroo Blog
shopping.drugsourceinc.com/imperial | Imperial Health TX AZ
Craigslist/Phx
6001 Canadian Ct Orlando Fl
Simon Montefiore artikelen kopen? Alle artikelen online
House Party 2023 Showtimes Near Marcus North Shore Cinema
N2O4 Lewis Structure & Characteristics (13 Complete Facts)
Classic | Cyclone RakeAmerica's #1 Lawn and Leaf Vacuum
Craigslist Mt Pleasant Sc
Noaa Ilx
Evil Dead Rise - Everything You Need To Know
Iroquois Amphitheater Louisville Ky Seating Chart
Rqi.1Stop
Barber Gym Quantico Hours
Football - 2024/2025 Women’s Super League: Preview, schedule and how to watch
How many days until 12 December - Calendarr
Teen Vogue Video Series
8005607994
Craigslist Pennsylvania Poconos
Panola County Busted Newspaper
Chamberlain College of Nursing | Tuition & Acceptance Rates 2024
Weathervane Broken Monorail
Bra Size Calculator & Conversion Chart: Measure Bust & Convert Sizes
Harrison 911 Cad Log
Tomb Of The Mask Unblocked Games World
Rek Funerals
lol Did he score on me ?
UPC Code Lookup: Free UPC Code Lookup With Major Retailers
Grandstand 13 Fenway
Sports Clips Flowood Ms
RFK Jr., in Glendale, says he's under investigation for 'collecting a whale specimen'
#scandalous stars | astrognossienne
Heavenly Delusion Gif
Watchseries To New Domain
Captain Billy's Whiz Bang, Vol 1, No. 11, August, 1920
America's Magazine of Wit, Humor and Filosophy
Dr Adj Redist Cadv Prin Amex Charge
Sam's Club Gas Prices Deptford Nj
About My Father Showtimes Near Amc Rockford 16
Firestone Batteries Prices
Janaki Kalaganaledu Serial Today Episode Written Update
Atom Tickets – Buy Movie Tickets, Invite Friends, Skip Lines
Saline Inmate Roster
Login
Mynord
Kjccc Sports
Benjamin Franklin - Printer, Junto, Experiments on Electricity
Latest Posts
Article information

Author: Pres. Lawanda Wiegand

Last Updated:

Views: 6553

Rating: 4 / 5 (51 voted)

Reviews: 82% of readers found this page helpful

Author information

Name: Pres. Lawanda Wiegand

Birthday: 1993-01-10

Address: Suite 391 6963 Ullrich Shore, Bellefort, WI 01350-7893

Phone: +6806610432415

Job: Dynamic Manufacturing Assistant

Hobby: amateur radio, Taekwondo, Wood carving, Parkour, Skateboarding, Running, Rafting

Introduction: My name is Pres. Lawanda Wiegand, I am a inquisitive, helpful, glamorous, cheerful, open, clever, innocent person who loves writing and wants to share my knowledge and understanding with you.