Enterprise Resource Planning Blogs by Members
Gain new perspectives and knowledge about enterprise resource planning in blog posts from community members. Share your own comments and ERP insights today!
cancel
Showing results for 
Search instead for 
Did you mean: 
One of the most important changes in Customer and Vendor Masters in SAP S/4HANA is centrally managed Business Partner approach has replaced individually managed Customer and Vendor Masters R/3 system.  The Business Partner (Customer-Vendor Integration [CVI]) approach is mandatory in SAP S/4HANA. Business Partner is a Person, Organization, Group of persons, or Group of organizations in which a company has a business interest. The user interface for SAP S/4HANA on premise edition 1511 is transaction BP.

This Blog explains auto determination of below mentioned points in BP transaction

  1. Transportation Zone determination

    1. For BP Person Creation

    2. For BP Organization Creation



  2. Sales District determination for BP Organization creation

  3. Delivery Plant determination for BP Organization creation


To achieve all the above business scenarios, a custom table has been created and maintained in system with required data for Transportation Zone, Sales District and Delivery plant.

1.Transportation Zone determination:

1.For BP Person Creation:
Execute the transaction “BP” and select Person as shown in below screen shot and input the required data, along with Postal code and Country then the Transportation Zone gets populated automatically as highlighted below.


Create an implementation enhancement point ‘ENH_LSZAO02’ in include ‘LSZA7O02’ as shown in below screen shot.

 

      Logic in enhancement implementation:



      • Check for transaction BP using SY-TCODE as this enhancement needs to be implemented for BP Customer.

      • Check for title ‘CREATE’ as this enhancement needs to be executed for only creation of BP Person.

      • Read Business partner type to know Person or Organization or Group as this enhancement needs to be executed for only BP Person and as we can’t access partner type at this enhancement implementation so read screen field ‘(SAPLBUD0)BUT000′ of BP which holds the business partner type and assign to local variable LV_BP_TYPE as given below.

      • DATA: lv_bp_type(16)   TYPE c VALUE ‘(SAPLBUD0)BUT000’.
        ASSIGN (lv_bp_type) TO <fs_bp_type>.
        IF sy-subrc EQ 0.
        MOVE <fs_bp_type> TO ls_but000.
        ENDIF.
        Check ls_but000-type EQ 1 to know is BP person Creation.



      • Business Partner roles can be maintained in a custom table and can be read mentioning the condition that this enhancement gets executed for only specific BP roles. Example of BP roles shown in below screen shot. We can restrict in coding to execute this enhancement for only certain BP roles.



      • Read BP role which the user has selected in screen using screen field                   ‘(SAPLBUPA_DIALOG_JOEL)BUS_JOEL_MAIN’ as we cannot access this value read using field symbol.DATA:lv_bp(40) TYPE c VALUE ‘(SAPLBUPA_DIALOG_JOEL)BUS_JOEL_MAIN’
        ASSIGN (lv_bp) TO <fs_bp>.
        IF sy-subrc EQ 0.
        MOVE <fs_bp> TO ls_bus_joel_main.
        ENDIF.



      • Read business partner roles for which this enhancement to be executed and compare with screen field BP role.

      • Check for Postal code and Country are entered at screen and also check for Country is ‘US’ then fetch Transportation Zone from custom table by comparing first 5-digits of entered postal code and country. If country is not ‘US’ then compare full postal code and country and get TZONE.                                            ADDR2_DATA holds address data of BP screen
        Populate ADDR2_DATA-TRANSPZONE from fetched custom table value.
        addr2_data-transpzone = ls_zip_map-transportation_zone.

      • Update newly populated Transportation Zone description by fetching description from TZONT comparing language, country and Transportation zone.

      • Check if postal code and country in BP screen are initial then clear Transportation zone.





2. For BP Organization Creation:
Execute the transaction “BP” and select Organization as shown in below screen and input the required data, along with Postal code and Country then the Transportation Zone gets populated automatically as highlighted below.


Create an implementation enhancement point ‘ENH_LSZA1O02’ in include ‘LSZA1O02’ as below.



Logic in enhancement implementation: 


  • Check for transaction BP using SY-TCODE as this enhancement needs to be implemented for BP Customer.

  • Check for title as this enhancement needs to be executed for only BP Create.

  • Read Business partner type to know Person or Organization or Group as this enhancement needs to be executed for only BP Person or Organization. As we can’t access partner type at this enhancement implementation so read screen field ‘(SAPLBUD0)BUT000′ of BP which holds the business partner type and assign to local variable LV_BP_TYPE as given below.
    DATA: lv_bp_type(16)   TYPE c VALUE ‘(SAPLBUD0)BUT000’.
    ASSIGN (lv_bp_type) TO <fs_bp_type>.
    IF sy-subrc EQ 0.
    MOVE <fs_bp_type> TO ls_but000.
    ENDIF.

  •  Check business partner type ls_but000-type EQ 2 then only populate transportation
    zone.

  • Business Partner roles can be maintained in a custom table and can be read into internal table LT_BPROLE[] mentioning the condition that this enhancement gets executed for only for these BP roles. Example of BP roles shown in below screen shot. We can restrict in coding to execute this for only certain BP roles.

  • Read BP role which the user has selected in screen using screen field (SAPLBUPA_DIALOG_JOEL)BUS_JOEL_MAIN’ as we cannot access this value read using field symbol.
    DATA:lv_bp(40) TYPE c VALUE ‘(SAPLBUPA_DIALOG_JOEL)BUS_JOEL_MAIN’
    ASSIGN (lv_bp) TO <fs_bp>.
    IF sy-subrc EQ 0.
    MOVE <fs_bp> TO ls_bus_joel_main.
    ENDIF.

  • Read business partner roles fetched with the screen field BP role ls_bus_joel_main-partner_role.

  • Check for Postal code and Country entered at screen and also check for Country is ‘US’ then fetch Transportation Zone from custom table by comparing first 5-digits of entered postal code and country. If country is not ‘US’ then compare full postal code and country and get TZONE. ADDR1_DATA holds address data of BP screen for Organization.

  • Populate screen field ADDR1_DATA-TRANSPZONE from fetched custom table value.
    addr1_data-transpzone = ls_zip_map-transportation_zone.

  • Update newly populated Transportation Zone description using TZONT table comparing language, country and transportation zone.

  • Check if postal code and country in BP screen are initial then clear Transportation zone.


2. Sales District determination for BP Organization creation:
Execute the “BP” transaction and select Organization to create enter the required data to transaction as shown below first select BP role, enter Address data and click on Sales & Distribution push button there enter Sales Organization, Distribution Channel and Division and press enter then order tab shows with default sales district value from implemented enhancement based on postal code & country as shown in below screen shot.

Create an implicit enhancement ‘ZOTC_UD_SALESDISTRICT_ORG’ in FM ‘CVIC_BUPA_PBO_CVIC79’ of BP and also create an include program as shown in below screen shot.



Logic in enhancement implementation:

  • Check for transaction BP using SY-TCODE as this enhancement needs to be implemented for BP Customer

  • Check for title as this enhancement needs to be executed for only BP Create.
    Read Address data from screen as it can’t be accessed from this enhancement using reference.
    DATA: lv_add_data(20)  TYPE c VALUE ‘(SAPLSZA1)ADDR1_DATA’,
     ASSIGN(lv_add_data)TO<fs_add_data>.
    IF sy-subrc EQ 0.
    MOVE <fs_add_data> TO ls_add_data.
    ENDIF.

  • Read Business partner type to know Person or Organization or Group as this enhancement needs to be executed for only BP Organization. As we can’t access partner type at this enhancement implementation so read screen field ‘(SAPLBUD0)BUT000′ of BP using reference which holds the business partner type and assign to local variable LV_BP_TYPE as given below.
    DATA: lv_bp_type(16)   TYPE c VALUE ‘(SAPLBUD0)BUT000’.
    ASSIGN (lv_bp_type) TO <fs_bp_type>.
    IF sy-subrc EQ 0.
    MOVE <fs_bp_type> TO ls_but000.
    ENDIF.

  • Check for BP Organization as this enhancement needs to be executed for Organization only.
    Check ls_but000-type EQ ‘2’.

  • Business Partner roles can be maintained in a custom table and can be read into internal table LT_BPROLE[] mentioning the condition that this enhancement gets executed for only for these BP roles. Example of BP roles shown in below screen shot. We can restrict in coding to execute this logic for only certain BP roles.

  • Read BP role which the user has selected in screen using screen field (SAPLBUPA_DIALOG_JOEL)BUS_JOEL_MAIN’ as we cannot access this value read using field symbol.
    DATA:lv_bp(40) TYPE c VALUE ‘(SAPLBUPA_DIALOG_JOEL)BUS_JOEL_MAIN’.
    ASSIGN (lv_bp) TO <fs_bp>.
    IF sy-subrc EQ 0.
    MOVE <fs_bp> TO ls_bus_joel_main.
    ENDIF.

  • Read business partner roles fetched with the screen field BP role ls_bus_joel_main-partner_role.

  • Read existing customer master sales data from LT_KNVV and check if user has entered Sales Organization, Distribution Channel and Division in screen if so read postal code and country from LS_ADD_DATA if country is US then compare first 5-digits of postal code and sales district from custom table and if not ‘US’ compare full postal code and fetch sales district.

  • Check if Country is ‘US’ get sales district from custom table by comparing first 5-digits
    of entered postal code and update to internal table LT_KVV from which screen field
    Sales District value gets  populated.
    ls_knvv-bzirk = ls_zip_map-sales_district.
    MODIFY lt_knvv FROM ls_knvv INDEX 1 TRANSPORTING bzirk.

  • Populate screen field sales district  by assigning into GS_KNVV.
    gs_knvv-bzirk = ls_knvv-bzirk.


3.Delivery Plant determination for BP Organization creation  
Execute the “BP” transaction and select Organization to create enter the required data to transaction as shown below first select BP role, enter Address tab data and click on Sales & Distribution pushbutton then enter Sales Organization, Distribution Channel and Division and press enter then click on shipping tab delivery plant gets populated from implemented enhancement based on postal code & country as shown in below screen.


Create an implicit enhancement ‘ZOTC_UD_DEL_PLANT_ORG’ in FM ‘CVIC_BUPA_PBO_CVIC83’ of BP also create an include program ‘ZOTC_UD_DEL_PLANT_ORG’ to implement required code for this enhancement.



      Logic in enhancement implementation: 

  • Check for transaction BP using SY-TCODE as this enhancement needs to be implemented for BP Customer.

  • Check for title as this enhancement needs to be executed for only BP Create.

  • Read Address data from screen to have entered postal code and country and assign to a field symbol as address data can’t be accessed from this enhancement using reference.
    DATA: lv_add_data(20)  TYPE c VALUE ‘(SAPLSZA1)ADDR1_DATA’,
    ASSIGN (lv_add_data) TO <fs_add_data>.
    IF sy-subrc EQ 0.
    MOVE <fs_add_data> TO ls_add_data.
    ENDIF.

  • Read Business partner type to know Person or Organization or Group as this enhancement needs to be executed for only BP Organization. As we can’t access partner type at this enhancement implementation so read screen field ‘(SAPLBUD0)BUT000′ of BP which holds the business partner type and assign to local variable LV_BP_TYPE as given below.
    DATA: lv_bp_type(16)   TYPE c VALUE ‘(SAPLBUD0)BUT000’.
    ASSIGN (lv_bp_type) TO <fs_bp_type>.
    IF sy-subrc EQ 0.
    MOVE <fs_bp_type> TO ls_but000.
    ENDIF.

  • Check for BP Organization as this needs to be executed for only BP Organization.

  • Check ls_but000-type EQ 2.

  • Business Partner roles can be maintained in a custom table and can be read into internal table LT_BPROLE[] mentioning the condition that this enhancement gets executed for only these BP roles. Example of BP roles shown in below screen shot. We can restrict in coding to execute this for only certain BP roles.

  • Read BP role which the user has selected in screen using screen field (SAPLBUPA_DIALOG_JOEL)BUS_JOEL_MAIN
    DATA:lv_bp(40) TYPE c VALUE ‘(SAPLBUPA_DIALOG_JOEL)BUS_JOEL_MAIN’
    ASSIGN (lv_bp) TO <fs_bp>.
    IF sy-subrc EQ 0.
    MOVE <fs_bp> TO ls_bus_joel_main.
    ENDIF.

  • Read business partner roles fetched and compare with the screen field BP role entered by user.

  • Read existing customer master sales data from LT_KNVV and check if user has entered Sales Organization, Distribution Channel and Division in screen if so read postal code and country from LS_ADD_DATA if country is US then compare first 5-digits of postal code and sales district from custom table and if not ‘US’ compare full postal code .

  • Check if Country is ‘US’ get Delivery Plant from custom table by comparing first
    5-digits of entered postal code and update to internal table LT_KVV which screen value
    gets populated.
    ls_knvv-vwerk = ls_zip_map-plant.
    MODIFY lt_knvv FROM ls_knvv INDEX 1 TRANSPORTING vwerk.

  • Populate screen field Delivery Plant by assigning to GS_KNVV.
    gs_knvv-vwerk = ls_knvv-vwerk.

Labels in this area