Quantcast
Channel: SCN : All Content - ABAP Development
Viewing all articles
Browse latest Browse all 8332

Enhancements for Foreign Trade License entry in Sales Order

$
0
0

Requirement:

This enhancement is needed when the Order entry personnel need to manually enter the license number of the individual licenses in the sales order item. This kind of a situation may arise if an organisation decides not to maintain license data in ECC due to the large volume of the data that would need to be entered and maintained in the system. For instance, if an organisation decides to use another system for license check instead of using standard SAP functionality, the license check in SAP will be turned off. This will lead to SAP not determining the license number by its own system. As a result, it becomes necessary to capture the license information at the time of order entry by manual input.


Affected Transactions:

VA01, VA02, VL01N, VL02N


Assumptions:

Delivery documents will be created with reference to the Sales Order.


Solution Overview:

  1. To store the new License Data, a new field needs to be added to Sales Document: Item Data (VBAP) table definition.
  2. Similarly, as the data needs to flow from Sales Order to the Delivery, this field also needs to be added to SD document: Delivery: Item data (LIPS) table definition.
  3. A screen enhancement needs to be performed at the Sales Order item level. This is the place where the user will manually enter the License Data. The data so entered, should be saved in the VBAP table in the field defined in Step 1. For explanation purpose, consider this field is to be added on the '
  4. Another screen enhancement will be required at the Delivery item level. Adding a new tab to the Delivery item view can be considered as an option here.
  5. To implement the transfer of License Data from the Order to Delivery, copying routine 101 in the Delivery copying control needs to be modified to copy the License data field from CVBAP to LIPS.


Flow Logic:

Flow Logic - Sales Order.jpg

Flow Logic - Delivery - 1.jpg


Step-by-step Solution:

  • Create and append structure to add License data field in VBAP and LIPS table.VBAP-License field.jpgLIPS-License field.jpg
  • Create a custom field in 'Additional Data B' tab in the Sales Order Item level (transaction VA01/VA02).
    • This can be achieved by using the screen exit for the program: SAPMV45A.
    • Add the custom field to the screen 8459.Screen 8459.jpg
    • Logic to retrieve the custom License value will need to be added in the PBO of the screen. Include MV45AOZZ can be used to add PBO logic.Screen 8459 - PBO.jpg
    • Code should be written keeping in mind the following point:
      • The custom License field should be editable for TCodes VA01 and VA02 but not for VA03.
    • Custom field addition at Delivery level:
      • Make a Function Group
      • Define a global variable for License data field in TOP include of the Function Group.
      • Create a new screen 9002. This screen will contain the License data field that will be displayed in the Delivery.Screen 9002 Layout.jpgScreen 9002 Element List.jpg
      • In the PBO of 9002, write code to enable/disable editing of the License field.Screen 9002 PBO.jpg
      • Add 2 Function Modules:
        • FM_SET - This will hold the code to get the License data from VBAP table and set it to be displayed at Delivery item level. If called from VL01N, this FM should set the global variable for license data based on the Sales Order Item. If called from VL02N or VL03N, it should get the data stored in LIPS.
    •                         

      IMPORTING PARAMETERS

      Parameter Name

      Associated Type

      Optional (Y/N)

      Description

      IV_VBELN

      VBELN_VL

      N

      Delivery Document Number

      IV_POSNR

      POSNR_VL

      N

      Item Number

      IV_VGPOS

      POSNR

      N

      Sales and Distribution Document Number

      IV_VGBEL

      VGBEL

      N

      Item number of the SD document

          

      EXPORTING PARAMETERS - NONE


        • FM_GET - This will hold the code to pass the value of License data to LIPS table in case it was changed at delivery level (if requirement allows changing at delivery level).


        IMPORTING PARAMETERS - NONE

         

        EXPORTING PARAMETERS

        Parameter Name

        Associated Type

        Optional (Y/N)

        Description

        CS_LIPS

        LIPS

        N

        SD document: Delivery: Item data

         

          • Create a BADI Implementation for BADI - LE_SHP_TAB_CUST_ITEM.BADI Interface.jpg
            • Use method ACTIVATE_TAB_PAGE to activate the user tab by passing the custom Function Group and screen details.
            • Use method TRANSFER_DATA_TO_SUBSCREEN to fetch the data from table LIPS and display on screen. If a new Delivery is being created no data will exist in LIPS table, so get the value from VBAP table. Use the Function Module FM_SET created in steps above to achieve this functionality. Add any logic concerning the edit-ability of the License data field in this method.
            • Use method TRANSFER_DATA_FROM_SUBSCREEN to fetch date from the subscreen and populate table LIPS. Use Function Module FM_GET created in steps above to achieve this functionality.
        • In the copying control from order to delivery, clone and modify FV50C101 (copying routine 101 in delivery copying control) to a custom routine and in the enhancement section of the new include, copy the license field from CVBAP to LIPS.VOFM - Data transfer - Delivery.jpg

        Viewing all articles
        Browse latest Browse all 8332

        Trending Articles



        <script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>