Monthly Archives: February 2012

ALV Excel Download Functionality

*– ALV field catalog declaration
DATA : tl_fcat TYPE kkblo_t_fieldcat,
wl_fcat LIKE LINE OF tl_fcat.

*– Create the KKBLO Field Catalogue from LVC
CALL FUNCTION ‘LVC_TRANSFER_TO_KKBLO’
EXPORTING
it_fieldcat_lvc = t_lvc_fcat
IMPORTING
et_fieldcat_kkblo = tl_fcat
EXCEPTIONS
it_data_missing = 1
it_fieldcat_lvc_missing = 2
OTHERS = 3.

IF sy-subrc IS INITIAL.
wl_fcat-tabname = space.
MODIFY tl_fcat FROM wl_fcat TRANSPORTING tabname
WHERE tabname space.
ENDIF.

*– Call XXL Download
CALL FUNCTION ‘ALV_XXL_CALL’
EXPORTING
i_tabname = space
it_fieldcat = tl_fcat
TABLES
it_outtab =
EXCEPTIONS
fatal_error = 1
no_display_possible = 2
OTHERS = 3.

IF sy-subrc 0.
MESSAGE ID sy-msgid TYPE ‘E’ NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.

Duration between two dates and times in seconds

             call function ‘SWI_DURATION_DETERMINE’
exporting
start_date = gs_ltak-bdatu
end_date   = gs_ltap-qdatu
start_time = gs_ltak-bzeit
end_time   = gs_ltap-qzeit
importing
duration   = lv_line_time.

User Exits for WM (Warehouse Management)

Following is the notes from SAP Help, on user exits for Warehouse Management

Develop User Exits for Warehouse Management

The following SAP user exits are available for the area Warehouse Management

  • MWMTO001 Update own data after TO creation
  • MWMTO002 Update own data after TO confirmation
  • MWMTO003 Own stock placement strategy
  • MWMTO007 Palletization and storage type search for stock placements
  • MWMTO004 Own stock removal strategy
  • MWMTO008 Storage type search for stock removals
  • MWMTO005 TO-related underdelivery
  • MWMTO006 Bin-related overdelivery and underdelivery
  • MWMTO009 Prevents deletion of TO items
  • MWMTO010 Determines total planned TO processing time
  • MWMTO011 Correction of processing time for TO item
  • MWMTO012 Transfer order split
  • MWMTO013 Enhancements of stock removal strategy “Stringent FIFO”
  • MWMPP001 WM/PP interface: Automatic TR creation
  • MWMRP001 Replenishment control: Selection of delivery items
  • MWMRP002 Replenishment control: TR quantity allocation
  • MWM2S001 Redetermining 2-step picking
  • MWMD0001 TO printing using print program RLVSDR40
  • MWMD0002 TO printing (multiple processing) through print program RLKOMM40
    The SAP user exits MWMTO001 through MWMTO013 are in the same function group and can communicate with one another (with limitations) via global data.

For “Automatic TO creation (background processing)”, the following user exits are available:

  • MWMTOAU1 Selection of transfer requirements for automatic creation of transfer orders
  • MWMTOAU2 Reference number assignment.
  • MWMTOAU3 Selection of posting change notices for automatic creation of transfer orders

Activities

    1. Create the user exit
    For this purpose, either create a new project or use an existing project.
    2. Activate the project
    The user exit only becomes effective if you activate it.

Further notes

User exits, in contrast to modifications, are not affected by SAP releases because they are not written in SAP original code but in a name area that is reserved for customers.

The general procedure for creating user exits is described in the user exit transaction under the menu path “Utilities – Online manual”.

Each user exit is documented.  You will find the documentation by pressing the pushbutton “SAP doc.” in the user exit transaction.