SAP Function Modules

LOG_CONTENT_STOCK_MAP SAP Function module







LOG_CONTENT_STOCK_MAP is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name LOG_CONTENT_STOCK_MAP into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: MCRS
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM LOG_CONTENT_STOCK_MAP - LOG CONTENT STOCK MAP





CALL FUNCTION 'LOG_CONTENT_STOCK_MAP' "
* EXPORTING
*   i_kz_bew_kauft_best = ' '   " boole
*   i_kz_bew_pauft_best = ' '   " boole
*   i_null_stocks = ' '         " boole
  TABLES
    t_stock =                   " mcbiwstock
    t_marc =                    " mbbiwxmarc
    t_mard =                    " mbbiwxmard    Storage Location Stock
    t_mcha =                    " mbbiwxmcha    Transfer Structure Charge
    t_mchb =                    " mbbiwxmchb    Batch Stock
    t_mkol =                    " mbbiwxmkol
    t_msku =                    " mbbiwxmsku    Special Stocks with Customer
    t_mslb =                    " mbbiwxmslb    Special Stocks with Vendor
    t_mska =                    " mbbiwxmska    Sales Order Stock
    t_mspr =                    " mbbiwxmspr    Project Stock
    t_mbew =                    " mbbiwxmbew    Valuated Stock
    t_ebew =                    " mbbiwxebew
    t_qbew =                    " mbbiwxqbew
*   t_mssa =                    " mbbiwxmssa    Total sales order stock
*   t_mssq =                    " mbbiwxmssq    Project Stock Total
*   t_mstb =                    " mbbiwxmstb
*   t_mste =                    " mbbiwxmste
*   t_mstq =                    " mbbiwxmstq
* CHANGING
*   swext =                     " ext_sw_log_content_stock
    .  "  LOG_CONTENT_STOCK_MAP

ABAP code example for Function Module LOG_CONTENT_STOCK_MAP





The ABAP code below is a full code listing to execute function module LOG_CONTENT_STOCK_MAP including all data declarations. The code uses the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the original method of declaring data variables up front. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8).

DATA:
it_t_stock  TYPE STANDARD TABLE OF MCBIWSTOCK,"TABLES PARAM
wa_t_stock  LIKE LINE OF it_t_stock ,
it_t_marc  TYPE STANDARD TABLE OF MBBIWXMARC,"TABLES PARAM
wa_t_marc  LIKE LINE OF it_t_marc ,
it_t_mard  TYPE STANDARD TABLE OF MBBIWXMARD,"TABLES PARAM
wa_t_mard  LIKE LINE OF it_t_mard ,
it_t_mcha  TYPE STANDARD TABLE OF MBBIWXMCHA,"TABLES PARAM
wa_t_mcha  LIKE LINE OF it_t_mcha ,
it_t_mchb  TYPE STANDARD TABLE OF MBBIWXMCHB,"TABLES PARAM
wa_t_mchb  LIKE LINE OF it_t_mchb ,
it_t_mkol  TYPE STANDARD TABLE OF MBBIWXMKOL,"TABLES PARAM
wa_t_mkol  LIKE LINE OF it_t_mkol ,
it_t_msku  TYPE STANDARD TABLE OF MBBIWXMSKU,"TABLES PARAM
wa_t_msku  LIKE LINE OF it_t_msku ,
it_t_mslb  TYPE STANDARD TABLE OF MBBIWXMSLB,"TABLES PARAM
wa_t_mslb  LIKE LINE OF it_t_mslb ,
it_t_mska  TYPE STANDARD TABLE OF MBBIWXMSKA,"TABLES PARAM
wa_t_mska  LIKE LINE OF it_t_mska ,
it_t_mspr  TYPE STANDARD TABLE OF MBBIWXMSPR,"TABLES PARAM
wa_t_mspr  LIKE LINE OF it_t_mspr ,
it_t_mbew  TYPE STANDARD TABLE OF MBBIWXMBEW,"TABLES PARAM
wa_t_mbew  LIKE LINE OF it_t_mbew ,
it_t_ebew  TYPE STANDARD TABLE OF MBBIWXEBEW,"TABLES PARAM
wa_t_ebew  LIKE LINE OF it_t_ebew ,
it_t_qbew  TYPE STANDARD TABLE OF MBBIWXQBEW,"TABLES PARAM
wa_t_qbew  LIKE LINE OF it_t_qbew ,
it_t_mssa  TYPE STANDARD TABLE OF MBBIWXMSSA,"TABLES PARAM
wa_t_mssa  LIKE LINE OF it_t_mssa ,
it_t_mssq  TYPE STANDARD TABLE OF MBBIWXMSSQ,"TABLES PARAM
wa_t_mssq  LIKE LINE OF it_t_mssq ,
it_t_mstb  TYPE STANDARD TABLE OF MBBIWXMSTB,"TABLES PARAM
wa_t_mstb  LIKE LINE OF it_t_mstb ,
it_t_mste  TYPE STANDARD TABLE OF MBBIWXMSTE,"TABLES PARAM
wa_t_mste  LIKE LINE OF it_t_mste ,
it_t_mstq  TYPE STANDARD TABLE OF MBBIWXMSTQ,"TABLES PARAM
wa_t_mstq  LIKE LINE OF it_t_mstq .

DATA(ld_swext) = 'Check type of data required'.
DATA(ld_i_kz_bew_kauft_best) = 'Check type of data required'.
DATA(ld_i_kz_bew_pauft_best) = 'Check type of data required'.
DATA(ld_i_null_stocks) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_stock to it_t_stock.

"populate fields of struture and append to itab
append wa_t_marc to it_t_marc.

"populate fields of struture and append to itab
append wa_t_mard to it_t_mard.

"populate fields of struture and append to itab
append wa_t_mcha to it_t_mcha.

"populate fields of struture and append to itab
append wa_t_mchb to it_t_mchb.

"populate fields of struture and append to itab
append wa_t_mkol to it_t_mkol.

"populate fields of struture and append to itab
append wa_t_msku to it_t_msku.

"populate fields of struture and append to itab
append wa_t_mslb to it_t_mslb.

"populate fields of struture and append to itab
append wa_t_mska to it_t_mska.

"populate fields of struture and append to itab
append wa_t_mspr to it_t_mspr.

"populate fields of struture and append to itab
append wa_t_mbew to it_t_mbew.

"populate fields of struture and append to itab
append wa_t_ebew to it_t_ebew.

"populate fields of struture and append to itab
append wa_t_qbew to it_t_qbew.

"populate fields of struture and append to itab
append wa_t_mssa to it_t_mssa.

"populate fields of struture and append to itab
append wa_t_mssq to it_t_mssq.

"populate fields of struture and append to itab
append wa_t_mstb to it_t_mstb.

"populate fields of struture and append to itab
append wa_t_mste to it_t_mste.

"populate fields of struture and append to itab
append wa_t_mstq to it_t_mstq. . CALL FUNCTION 'LOG_CONTENT_STOCK_MAP' * EXPORTING * i_kz_bew_kauft_best = ld_i_kz_bew_kauft_best * i_kz_bew_pauft_best = ld_i_kz_bew_pauft_best * i_null_stocks = ld_i_null_stocks TABLES t_stock = it_t_stock t_marc = it_t_marc t_mard = it_t_mard t_mcha = it_t_mcha t_mchb = it_t_mchb t_mkol = it_t_mkol t_msku = it_t_msku t_mslb = it_t_mslb t_mska = it_t_mska t_mspr = it_t_mspr t_mbew = it_t_mbew t_ebew = it_t_ebew t_qbew = it_t_qbew * t_mssa = it_t_mssa * t_mssq = it_t_mssq * t_mstb = it_t_mstb * t_mste = it_t_mste * t_mstq = it_t_mstq * CHANGING * swext = ld_swext . " LOG_CONTENT_STOCK_MAP
IF SY-SUBRC EQ 0. "All OK ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_swext  TYPE EXT_SW_LOG_CONTENT_STOCK ,
ld_i_kz_bew_kauft_best  TYPE BOOLE ,
it_t_stock  TYPE STANDARD TABLE OF MCBIWSTOCK ,
wa_t_stock  LIKE LINE OF it_t_stock,
ld_i_kz_bew_pauft_best  TYPE BOOLE ,
it_t_marc  TYPE STANDARD TABLE OF MBBIWXMARC ,
wa_t_marc  LIKE LINE OF it_t_marc,
ld_i_null_stocks  TYPE BOOLE ,
it_t_mard  TYPE STANDARD TABLE OF MBBIWXMARD ,
wa_t_mard  LIKE LINE OF it_t_mard,
it_t_mcha  TYPE STANDARD TABLE OF MBBIWXMCHA ,
wa_t_mcha  LIKE LINE OF it_t_mcha,
it_t_mchb  TYPE STANDARD TABLE OF MBBIWXMCHB ,
wa_t_mchb  LIKE LINE OF it_t_mchb,
it_t_mkol  TYPE STANDARD TABLE OF MBBIWXMKOL ,
wa_t_mkol  LIKE LINE OF it_t_mkol,
it_t_msku  TYPE STANDARD TABLE OF MBBIWXMSKU ,
wa_t_msku  LIKE LINE OF it_t_msku,
it_t_mslb  TYPE STANDARD TABLE OF MBBIWXMSLB ,
wa_t_mslb  LIKE LINE OF it_t_mslb,
it_t_mska  TYPE STANDARD TABLE OF MBBIWXMSKA ,
wa_t_mska  LIKE LINE OF it_t_mska,
it_t_mspr  TYPE STANDARD TABLE OF MBBIWXMSPR ,
wa_t_mspr  LIKE LINE OF it_t_mspr,
it_t_mbew  TYPE STANDARD TABLE OF MBBIWXMBEW ,
wa_t_mbew  LIKE LINE OF it_t_mbew,
it_t_ebew  TYPE STANDARD TABLE OF MBBIWXEBEW ,
wa_t_ebew  LIKE LINE OF it_t_ebew,
it_t_qbew  TYPE STANDARD TABLE OF MBBIWXQBEW ,
wa_t_qbew  LIKE LINE OF it_t_qbew,
it_t_mssa  TYPE STANDARD TABLE OF MBBIWXMSSA ,
wa_t_mssa  LIKE LINE OF it_t_mssa,
it_t_mssq  TYPE STANDARD TABLE OF MBBIWXMSSQ ,
wa_t_mssq  LIKE LINE OF it_t_mssq,
it_t_mstb  TYPE STANDARD TABLE OF MBBIWXMSTB ,
wa_t_mstb  LIKE LINE OF it_t_mstb,
it_t_mste  TYPE STANDARD TABLE OF MBBIWXMSTE ,
wa_t_mste  LIKE LINE OF it_t_mste,
it_t_mstq  TYPE STANDARD TABLE OF MBBIWXMSTQ ,
wa_t_mstq  LIKE LINE OF it_t_mstq.

ld_swext = 'Check type of data required'.
ld_i_kz_bew_kauft_best = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_stock to it_t_stock.
ld_i_kz_bew_pauft_best = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_marc to it_t_marc.
ld_i_null_stocks = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_t_mard to it_t_mard.

"populate fields of struture and append to itab
append wa_t_mcha to it_t_mcha.

"populate fields of struture and append to itab
append wa_t_mchb to it_t_mchb.

"populate fields of struture and append to itab
append wa_t_mkol to it_t_mkol.

"populate fields of struture and append to itab
append wa_t_msku to it_t_msku.

"populate fields of struture and append to itab
append wa_t_mslb to it_t_mslb.

"populate fields of struture and append to itab
append wa_t_mska to it_t_mska.

"populate fields of struture and append to itab
append wa_t_mspr to it_t_mspr.

"populate fields of struture and append to itab
append wa_t_mbew to it_t_mbew.

"populate fields of struture and append to itab
append wa_t_ebew to it_t_ebew.

"populate fields of struture and append to itab
append wa_t_qbew to it_t_qbew.

"populate fields of struture and append to itab
append wa_t_mssa to it_t_mssa.

"populate fields of struture and append to itab
append wa_t_mssq to it_t_mssq.

"populate fields of struture and append to itab
append wa_t_mstb to it_t_mstb.

"populate fields of struture and append to itab
append wa_t_mste to it_t_mste.

"populate fields of struture and append to itab
append wa_t_mstq to it_t_mstq.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name LOG_CONTENT_STOCK_MAP or its description.