100.dynamic Plant Determination Logic FSD
100.dynamic Plant Determination Logic FSD
Functional Specification
Revision: Draft
Author(s): SIVA
1. Revision History
The table below describes the versions of this document:
2. Introduction
This specification contains functional and technical requirements for the ship to plant determination for Orders
created from the Portal.
3. Solution Overview
3.4. Risks
None
4. Functional Design
4.1. GAP Analysis
SAP’s standard plant determination cannot support dynamic determination of Plant at the line item level based
on the Customer’s address. So, custom logic needs to be written to support Plant determination. The user exit
that has been identified is USEREXIT_SOURCE_DETERMINATION. This user exit supports dynamic
determination of plant at the line item level.
3 of 6
5. Technical Design
5.1. Overview
The user exit USEREXIT_SOURCE_DETERMINATION would contain the following logic
*&---------------------------------------------------------------------*
*& Form USEREXIT_SOURCE_DETERMINATION
*&---------------------------------------------------------------------*
* This Userexit is used to add additional logic for finding *
* the source of the plant or the item category. *
* *
* This form is called from form VBAP_FUELLEN *
* *
*----------------------------------------------------------------------*
FORM userexit_source_determination.
* set source
* VBAP-WERKS = zzfield1.
**------------------------------------------------------------------------- **
* Get the Ship-to's State
** ------------------------------------------------------------------------ **
4 of 6
IF sy-subrc = 0.
SELECT SINGLE * FROM kna1 WHERE kunnr = xvbpa-kunnr.
IF sy-subrc = 0.
CALL FUNCTION 'SD_ADDRESS_GET'
EXPORTING
fif_address_number = kna1-adrnr
IMPORTING
fes_address = v_vbadr.
ENDIF.
ENDIF.
**---------------------------------------------------------------------- **
* Get the mapping between the plant and the State.
** --------------------------------------------------------------------- **
**---------------------------------------------------------------------- **
* Assign the plant.
** --------------------------------------------------------------------- **
ENDFORM. "USEREXIT_SOURCE_DETERMINATION
*eject