SAP Function Modules

WB2_KONHM_SELECT_MULTIPLE_TID SAP Function module - Portfolio: Read for Fixed Range







WB2_KONHM_SELECT_MULTIPLE_TID 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 WB2_KONHM_SELECT_MULTIPLE_TID into the relevant SAP transaction such as SE37 or SE80.

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


Pattern for FM WB2_KONHM_SELECT_MULTIPLE_TID - WB2 KONHM SELECT MULTIPLE TID





CALL FUNCTION 'WB2_KONHM_SELECT_MULTIPLE_TID' "Portfolio: Read for Fixed Range
  EXPORTING
    i_max_lines =               " rwlf2-max_lines  Maximum Number of Hits
  TABLES
*   t_knumh =                   " knumh_ran     Range Table for Condition Number
*   t_expofo =                  " expofo_ran    Range Table
*   t_ernam =                   " ernam_ran     Range structure Document entered by
*   t_erdat =                   " erdat_ran     Range structure for Created on
*   t_pzust =                   " pzust_ran     Range Table
*   t_posrt =                   " posrt_ran     Range Table
    t_konhm =                   " konhmvb       Portfolio: Update Structure
*   t_kschl =                   " kschl_ran     Range Table for Message Type
  EXCEPTIONS
    NO_RECORD_FOUND = 1         "
    .  "  WB2_KONHM_SELECT_MULTIPLE_TID

ABAP code example for Function Module WB2_KONHM_SELECT_MULTIPLE_TID





The ABAP code below is a full code listing to execute function module WB2_KONHM_SELECT_MULTIPLE_TID 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_knumh  TYPE STANDARD TABLE OF KNUMH_RAN,"TABLES PARAM
wa_t_knumh  LIKE LINE OF it_t_knumh ,
it_t_expofo  TYPE STANDARD TABLE OF EXPOFO_RAN,"TABLES PARAM
wa_t_expofo  LIKE LINE OF it_t_expofo ,
it_t_ernam  TYPE STANDARD TABLE OF ERNAM_RAN,"TABLES PARAM
wa_t_ernam  LIKE LINE OF it_t_ernam ,
it_t_erdat  TYPE STANDARD TABLE OF ERDAT_RAN,"TABLES PARAM
wa_t_erdat  LIKE LINE OF it_t_erdat ,
it_t_pzust  TYPE STANDARD TABLE OF PZUST_RAN,"TABLES PARAM
wa_t_pzust  LIKE LINE OF it_t_pzust ,
it_t_posrt  TYPE STANDARD TABLE OF POSRT_RAN,"TABLES PARAM
wa_t_posrt  LIKE LINE OF it_t_posrt ,
it_t_konhm  TYPE STANDARD TABLE OF KONHMVB,"TABLES PARAM
wa_t_konhm  LIKE LINE OF it_t_konhm ,
it_t_kschl  TYPE STANDARD TABLE OF KSCHL_RAN,"TABLES PARAM
wa_t_kschl  LIKE LINE OF it_t_kschl .


DATA(ld_i_max_lines) = Check type of data required

"populate fields of struture and append to itab
append wa_t_knumh to it_t_knumh.

"populate fields of struture and append to itab
append wa_t_expofo to it_t_expofo.

"populate fields of struture and append to itab
append wa_t_ernam to it_t_ernam.

"populate fields of struture and append to itab
append wa_t_erdat to it_t_erdat.

"populate fields of struture and append to itab
append wa_t_pzust to it_t_pzust.

"populate fields of struture and append to itab
append wa_t_posrt to it_t_posrt.

"populate fields of struture and append to itab
append wa_t_konhm to it_t_konhm.

"populate fields of struture and append to itab
append wa_t_kschl to it_t_kschl. . CALL FUNCTION 'WB2_KONHM_SELECT_MULTIPLE_TID' EXPORTING i_max_lines = ld_i_max_lines TABLES * t_knumh = it_t_knumh * t_expofo = it_t_expofo * t_ernam = it_t_ernam * t_erdat = it_t_erdat * t_pzust = it_t_pzust * t_posrt = it_t_posrt t_konhm = it_t_konhm * t_kschl = it_t_kschl EXCEPTIONS NO_RECORD_FOUND = 1 . " WB2_KONHM_SELECT_MULTIPLE_TID
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here 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_i_max_lines  TYPE RWLF2-MAX_LINES ,
it_t_knumh  TYPE STANDARD TABLE OF KNUMH_RAN ,
wa_t_knumh  LIKE LINE OF it_t_knumh,
it_t_expofo  TYPE STANDARD TABLE OF EXPOFO_RAN ,
wa_t_expofo  LIKE LINE OF it_t_expofo,
it_t_ernam  TYPE STANDARD TABLE OF ERNAM_RAN ,
wa_t_ernam  LIKE LINE OF it_t_ernam,
it_t_erdat  TYPE STANDARD TABLE OF ERDAT_RAN ,
wa_t_erdat  LIKE LINE OF it_t_erdat,
it_t_pzust  TYPE STANDARD TABLE OF PZUST_RAN ,
wa_t_pzust  LIKE LINE OF it_t_pzust,
it_t_posrt  TYPE STANDARD TABLE OF POSRT_RAN ,
wa_t_posrt  LIKE LINE OF it_t_posrt,
it_t_konhm  TYPE STANDARD TABLE OF KONHMVB ,
wa_t_konhm  LIKE LINE OF it_t_konhm,
it_t_kschl  TYPE STANDARD TABLE OF KSCHL_RAN ,
wa_t_kschl  LIKE LINE OF it_t_kschl.


ld_i_max_lines = Check type of data required

"populate fields of struture and append to itab
append wa_t_knumh to it_t_knumh.

"populate fields of struture and append to itab
append wa_t_expofo to it_t_expofo.

"populate fields of struture and append to itab
append wa_t_ernam to it_t_ernam.

"populate fields of struture and append to itab
append wa_t_erdat to it_t_erdat.

"populate fields of struture and append to itab
append wa_t_pzust to it_t_pzust.

"populate fields of struture and append to itab
append wa_t_posrt to it_t_posrt.

"populate fields of struture and append to itab
append wa_t_konhm to it_t_konhm.

"populate fields of struture and append to itab
append wa_t_kschl to it_t_kschl.

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 WB2_KONHM_SELECT_MULTIPLE_TID or its description.