CKMH_SELECTION 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 CKMH_SELECTION into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
CKMH
Released Date:
Not Released
Processing type: Normal fucntion module
CALL FUNCTION 'CKMH_SELECTION' "
EXPORTING
p_vorg = " ckm0_vorgang
p_bwkey = " t001k-bwkey Valuation Area
p_bdatj = " ckmlpp-bdatj Posting date YYYY
p_poper = " ckmlpp-poper Posting Period
* untper = '000' " ckmlcr-untper Value Structure Type
p_mlast = " ckmlhd-mlast Material Price Determination: Control
TABLES
* r_matnr = "
* r_bwtar = "
* r_mtart = "
* r_matkl = "
* r_spart = "
* r_vbeln = "
* r_posnr = "
* r_pspnr = "
* r_lifnr = "
* r_status = "
t_kalnr_all = " ckmv0_matobj_tbl
* e_kalnr_not_relevant = " ckmv0_matobj_tbl
EXCEPTIONS
NO_DATA_FOUND = 1 " No materials selected
. " CKMH_SELECTION
The ABAP code below is a full code listing to execute function module CKMH_SELECTION 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).
| it_r_matnr | TYPE STANDARD TABLE OF STRING,"TABLES PARAM |
| wa_r_matnr | LIKE LINE OF it_r_matnr , |
| it_r_bwtar | TYPE STANDARD TABLE OF STRING,"TABLES PARAM |
| wa_r_bwtar | LIKE LINE OF it_r_bwtar , |
| it_r_mtart | TYPE STANDARD TABLE OF STRING,"TABLES PARAM |
| wa_r_mtart | LIKE LINE OF it_r_mtart , |
| it_r_matkl | TYPE STANDARD TABLE OF STRING,"TABLES PARAM |
| wa_r_matkl | LIKE LINE OF it_r_matkl , |
| it_r_spart | TYPE STANDARD TABLE OF STRING,"TABLES PARAM |
| wa_r_spart | LIKE LINE OF it_r_spart , |
| it_r_vbeln | TYPE STANDARD TABLE OF STRING,"TABLES PARAM |
| wa_r_vbeln | LIKE LINE OF it_r_vbeln , |
| it_r_posnr | TYPE STANDARD TABLE OF STRING,"TABLES PARAM |
| wa_r_posnr | LIKE LINE OF it_r_posnr , |
| it_r_pspnr | TYPE STANDARD TABLE OF STRING,"TABLES PARAM |
| wa_r_pspnr | LIKE LINE OF it_r_pspnr , |
| it_r_lifnr | TYPE STANDARD TABLE OF STRING,"TABLES PARAM |
| wa_r_lifnr | LIKE LINE OF it_r_lifnr , |
| it_r_status | TYPE STANDARD TABLE OF STRING,"TABLES PARAM |
| wa_r_status | LIKE LINE OF it_r_status , |
| it_t_kalnr_all | TYPE STANDARD TABLE OF CKMV0_MATOBJ_TBL,"TABLES PARAM |
| wa_t_kalnr_all | LIKE LINE OF it_t_kalnr_all , |
| it_e_kalnr_not_relevant | TYPE STANDARD TABLE OF CKMV0_MATOBJ_TBL,"TABLES PARAM |
| wa_e_kalnr_not_relevant | LIKE LINE OF it_e_kalnr_not_relevant . |
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_p_vorg | TYPE CKM0_VORGANG , |
| it_r_matnr | TYPE STANDARD TABLE OF STRING , |
| wa_r_matnr | LIKE LINE OF it_r_matnr, |
| ld_p_bwkey | TYPE T001K-BWKEY , |
| it_r_bwtar | TYPE STANDARD TABLE OF STRING , |
| wa_r_bwtar | LIKE LINE OF it_r_bwtar, |
| ld_p_bdatj | TYPE CKMLPP-BDATJ , |
| it_r_mtart | TYPE STANDARD TABLE OF STRING , |
| wa_r_mtart | LIKE LINE OF it_r_mtart, |
| ld_p_poper | TYPE CKMLPP-POPER , |
| it_r_matkl | TYPE STANDARD TABLE OF STRING , |
| wa_r_matkl | LIKE LINE OF it_r_matkl, |
| ld_untper | TYPE CKMLCR-UNTPER , |
| it_r_spart | TYPE STANDARD TABLE OF STRING , |
| wa_r_spart | LIKE LINE OF it_r_spart, |
| ld_p_mlast | TYPE CKMLHD-MLAST , |
| it_r_vbeln | TYPE STANDARD TABLE OF STRING , |
| wa_r_vbeln | LIKE LINE OF it_r_vbeln, |
| it_r_posnr | TYPE STANDARD TABLE OF STRING , |
| wa_r_posnr | LIKE LINE OF it_r_posnr, |
| it_r_pspnr | TYPE STANDARD TABLE OF STRING , |
| wa_r_pspnr | LIKE LINE OF it_r_pspnr, |
| it_r_lifnr | TYPE STANDARD TABLE OF STRING , |
| wa_r_lifnr | LIKE LINE OF it_r_lifnr, |
| it_r_status | TYPE STANDARD TABLE OF STRING , |
| wa_r_status | LIKE LINE OF it_r_status, |
| it_t_kalnr_all | TYPE STANDARD TABLE OF CKMV0_MATOBJ_TBL , |
| wa_t_kalnr_all | LIKE LINE OF it_t_kalnr_all, |
| it_e_kalnr_not_relevant | TYPE STANDARD TABLE OF CKMV0_MATOBJ_TBL , |
| wa_e_kalnr_not_relevant | LIKE LINE OF it_e_kalnr_not_relevant. |
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 CKMH_SELECTION or its description.