SAP Function Modules

CAVE_SL_DOC_SELECT SAP Function module







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

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


Pattern for FM CAVE_SL_DOC_SELECT - CAVE SL DOC SELECT





CALL FUNCTION 'CAVE_SL_DOC_SELECT' "
  EXPORTING
    iv_maxcount =               " sy-tfill
*   iv_ignore_atpfields = SPACE  " c
*   iv_aporl =                  " cifctrlpar-aporl  R/3 System, System Release
*   iv_incl_returns =           " cifaplset-sdreturns  Consider SD Returns in the Transfer
*   iv_called_from_ccr = SPACE  " c
  IMPORTING
    ev_finished =               "
  TABLES
    it_fltsls =                 " cif_imslsk
*   et_sl_doc =                 " cif_sl_doc
    et_sl_doc_x =               " cif_sldocx
*   et_sl_req =                 " cif_sl_req
    et_sl_req_x =               " cif_slreqx
*   et_sl_gid =                 " cif_sl_gid
*   et_atpfield =               " atpfield
*   et_sddoc =                  " cifslitmso    APO Inbound Item Data
*   et_quot_vb =                " quot_vbapo
    .  "  CAVE_SL_DOC_SELECT

ABAP code example for Function Module CAVE_SL_DOC_SELECT





The ABAP code below is a full code listing to execute function module CAVE_SL_DOC_SELECT 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:
ld_ev_finished  TYPE STRING ,
it_it_fltsls  TYPE STANDARD TABLE OF CIF_IMSLSK,"TABLES PARAM
wa_it_fltsls  LIKE LINE OF it_it_fltsls ,
it_et_sl_doc  TYPE STANDARD TABLE OF CIF_SL_DOC,"TABLES PARAM
wa_et_sl_doc  LIKE LINE OF it_et_sl_doc ,
it_et_sl_doc_x  TYPE STANDARD TABLE OF CIF_SLDOCX,"TABLES PARAM
wa_et_sl_doc_x  LIKE LINE OF it_et_sl_doc_x ,
it_et_sl_req  TYPE STANDARD TABLE OF CIF_SL_REQ,"TABLES PARAM
wa_et_sl_req  LIKE LINE OF it_et_sl_req ,
it_et_sl_req_x  TYPE STANDARD TABLE OF CIF_SLREQX,"TABLES PARAM
wa_et_sl_req_x  LIKE LINE OF it_et_sl_req_x ,
it_et_sl_gid  TYPE STANDARD TABLE OF CIF_SL_GID,"TABLES PARAM
wa_et_sl_gid  LIKE LINE OF it_et_sl_gid ,
it_et_atpfield  TYPE STANDARD TABLE OF ATPFIELD,"TABLES PARAM
wa_et_atpfield  LIKE LINE OF it_et_atpfield ,
it_et_sddoc  TYPE STANDARD TABLE OF CIFSLITMSO,"TABLES PARAM
wa_et_sddoc  LIKE LINE OF it_et_sddoc ,
it_et_quot_vb  TYPE STANDARD TABLE OF QUOT_VBAPO,"TABLES PARAM
wa_et_quot_vb  LIKE LINE OF it_et_quot_vb .

DATA(ld_iv_maxcount) = '123 '.
DATA(ld_iv_ignore_atpfields) = '123 '.

DATA(ld_iv_aporl) = some text here

SELECT single SDRETURNS
FROM CIFAPLSET
INTO @DATA(ld_iv_incl_returns).

DATA(ld_iv_called_from_ccr) = '123 '.

"populate fields of struture and append to itab
append wa_it_fltsls to it_it_fltsls.

"populate fields of struture and append to itab
append wa_et_sl_doc to it_et_sl_doc.

"populate fields of struture and append to itab
append wa_et_sl_doc_x to it_et_sl_doc_x.

"populate fields of struture and append to itab
append wa_et_sl_req to it_et_sl_req.

"populate fields of struture and append to itab
append wa_et_sl_req_x to it_et_sl_req_x.

"populate fields of struture and append to itab
append wa_et_sl_gid to it_et_sl_gid.

"populate fields of struture and append to itab
append wa_et_atpfield to it_et_atpfield.

"populate fields of struture and append to itab
append wa_et_sddoc to it_et_sddoc.

"populate fields of struture and append to itab
append wa_et_quot_vb to it_et_quot_vb. . CALL FUNCTION 'CAVE_SL_DOC_SELECT' EXPORTING iv_maxcount = ld_iv_maxcount * iv_ignore_atpfields = ld_iv_ignore_atpfields * iv_aporl = ld_iv_aporl * iv_incl_returns = ld_iv_incl_returns * iv_called_from_ccr = ld_iv_called_from_ccr IMPORTING ev_finished = ld_ev_finished TABLES it_fltsls = it_it_fltsls * et_sl_doc = it_et_sl_doc et_sl_doc_x = it_et_sl_doc_x * et_sl_req = it_et_sl_req et_sl_req_x = it_et_sl_req_x * et_sl_gid = it_et_sl_gid * et_atpfield = it_et_atpfield * et_sddoc = it_et_sddoc * et_quot_vb = it_et_quot_vb . " CAVE_SL_DOC_SELECT
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_ev_finished  TYPE STRING ,
ld_iv_maxcount  TYPE SY-TFILL ,
it_it_fltsls  TYPE STANDARD TABLE OF CIF_IMSLSK ,
wa_it_fltsls  LIKE LINE OF it_it_fltsls,
ld_iv_ignore_atpfields  TYPE C ,
it_et_sl_doc  TYPE STANDARD TABLE OF CIF_SL_DOC ,
wa_et_sl_doc  LIKE LINE OF it_et_sl_doc,
ld_iv_aporl  TYPE CIFCTRLPAR-APORL ,
it_et_sl_doc_x  TYPE STANDARD TABLE OF CIF_SLDOCX ,
wa_et_sl_doc_x  LIKE LINE OF it_et_sl_doc_x,
ld_iv_incl_returns  TYPE CIFAPLSET-SDRETURNS ,
it_et_sl_req  TYPE STANDARD TABLE OF CIF_SL_REQ ,
wa_et_sl_req  LIKE LINE OF it_et_sl_req,
ld_iv_called_from_ccr  TYPE C ,
it_et_sl_req_x  TYPE STANDARD TABLE OF CIF_SLREQX ,
wa_et_sl_req_x  LIKE LINE OF it_et_sl_req_x,
it_et_sl_gid  TYPE STANDARD TABLE OF CIF_SL_GID ,
wa_et_sl_gid  LIKE LINE OF it_et_sl_gid,
it_et_atpfield  TYPE STANDARD TABLE OF ATPFIELD ,
wa_et_atpfield  LIKE LINE OF it_et_atpfield,
it_et_sddoc  TYPE STANDARD TABLE OF CIFSLITMSO ,
wa_et_sddoc  LIKE LINE OF it_et_sddoc,
it_et_quot_vb  TYPE STANDARD TABLE OF QUOT_VBAPO ,
wa_et_quot_vb  LIKE LINE OF it_et_quot_vb.

ld_iv_maxcount = '123 '.

"populate fields of struture and append to itab
append wa_it_fltsls to it_it_fltsls.
ld_iv_ignore_atpfields = '123 '.

"populate fields of struture and append to itab
append wa_et_sl_doc to it_et_sl_doc.

ld_iv_aporl = some text here

"populate fields of struture and append to itab
append wa_et_sl_doc_x to it_et_sl_doc_x.

SELECT single SDRETURNS
FROM CIFAPLSET
INTO ld_iv_incl_returns.


"populate fields of struture and append to itab
append wa_et_sl_req to it_et_sl_req.
ld_iv_called_from_ccr = '123 '.

"populate fields of struture and append to itab
append wa_et_sl_req_x to it_et_sl_req_x.

"populate fields of struture and append to itab
append wa_et_sl_gid to it_et_sl_gid.

"populate fields of struture and append to itab
append wa_et_atpfield to it_et_atpfield.

"populate fields of struture and append to itab
append wa_et_sddoc to it_et_sddoc.

"populate fields of struture and append to itab
append wa_et_quot_vb to it_et_quot_vb.

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