SAP Function Modules

ISP_JHTVB_READ_WITH_POS SAP Function module







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

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


Pattern for FM ISP_JHTVB_READ_WITH_POS - ISP JHTVB READ WITH POS





CALL FUNCTION 'ISP_JHTVB_READ_WITH_POS' "
  EXPORTING
    bednr_in =                  " jhtvb-bednr
    spart_in =                  " jhtvb-spart
    vkorg_in =                  " jhtvb-vkorg
    vtweg_in =                  " jhtvb-vtweg
*   xbin_search = SPACE         " sy-batch
  TABLES
    cond_parts =                " jhtvbpo
    conditions =                " jhtvb
  EXCEPTIONS
    DELETED = 1                 "
    NOT_EXISTS = 2              "
    NO_BEST = 3                 "
    WRONG_ORGANISATION = 4      "
    .  "  ISP_JHTVB_READ_WITH_POS

ABAP code example for Function Module ISP_JHTVB_READ_WITH_POS





The ABAP code below is a full code listing to execute function module ISP_JHTVB_READ_WITH_POS 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_cond_parts  TYPE STANDARD TABLE OF JHTVBPO,"TABLES PARAM
wa_cond_parts  LIKE LINE OF it_cond_parts ,
it_conditions  TYPE STANDARD TABLE OF JHTVB,"TABLES PARAM
wa_conditions  LIKE LINE OF it_conditions .


SELECT single BEDNR
FROM JHTVB
INTO @DATA(ld_bednr_in).


SELECT single SPART
FROM JHTVB
INTO @DATA(ld_spart_in).


SELECT single VKORG
FROM JHTVB
INTO @DATA(ld_vkorg_in).


SELECT single VTWEG
FROM JHTVB
INTO @DATA(ld_vtweg_in).

DATA(ld_xbin_search) = 'some text here'.

"populate fields of struture and append to itab
append wa_cond_parts to it_cond_parts.

"populate fields of struture and append to itab
append wa_conditions to it_conditions. . CALL FUNCTION 'ISP_JHTVB_READ_WITH_POS' EXPORTING bednr_in = ld_bednr_in spart_in = ld_spart_in vkorg_in = ld_vkorg_in vtweg_in = ld_vtweg_in * xbin_search = ld_xbin_search TABLES cond_parts = it_cond_parts conditions = it_conditions EXCEPTIONS DELETED = 1 NOT_EXISTS = 2 NO_BEST = 3 WRONG_ORGANISATION = 4 . " ISP_JHTVB_READ_WITH_POS
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "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_bednr_in  TYPE JHTVB-BEDNR ,
it_cond_parts  TYPE STANDARD TABLE OF JHTVBPO ,
wa_cond_parts  LIKE LINE OF it_cond_parts,
ld_spart_in  TYPE JHTVB-SPART ,
it_conditions  TYPE STANDARD TABLE OF JHTVB ,
wa_conditions  LIKE LINE OF it_conditions,
ld_vkorg_in  TYPE JHTVB-VKORG ,
ld_vtweg_in  TYPE JHTVB-VTWEG ,
ld_xbin_search  TYPE SY-BATCH .


SELECT single BEDNR
FROM JHTVB
INTO ld_bednr_in.


"populate fields of struture and append to itab
append wa_cond_parts to it_cond_parts.

SELECT single SPART
FROM JHTVB
INTO ld_spart_in.


"populate fields of struture and append to itab
append wa_conditions to it_conditions.

SELECT single VKORG
FROM JHTVB
INTO ld_vkorg_in.


SELECT single VTWEG
FROM JHTVB
INTO ld_vtweg_in.

ld_xbin_search = 'some text here'.

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