SAP Function Modules

ERPSLS_EXPDOC SAP Function module







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

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


Pattern for FM ERPSLS_EXPDOC - ERPSLS EXPDOC





CALL FUNCTION 'ERPSLS_EXPDOC' "
* EXPORTING
*   it_rg_vbeln =               " trg_char10
*   it_rg_trvog =               " trg_char1     Range Table: CHAR1
*   it_rg_auart =               " trg_char4     Range Table: CHAR4
*   it_rg_kunnr =               " trg_char10    Range Table: CHAR10
*   it_rg_erdat =               " trg_date      Range Table: Date
*   iv_zpavw =                  " parvw         Partner Role
*   it_rg_zpers =               " trg_numc8     Person Responsible
*   it_rg_ernam =               " trg_char12    Name of Person Who Created Object
*   it_rg_vkorg =               " trg_char4     Range Table: CHAR4
*   it_rg_vtweg =               " trg_char2     Range Table: CHAR2
*   it_rg_spart =               " trg_char2     Range Table: CHAR2
*   it_rg_vkbur =               " trg_char4     Range Table: CHAR4
*   it_rg_vkgrp =               " trg_char3     Range Table: CHAR3
*   iv_datbi =                  " datbi_vi      Quotation or Contract Valid to
*   if_expired = SPACE          " char1         Single-character Indicator
*   iv_maxsel =                 " int4          Natural Number
*   it_rg_vbtyp =               " trg_char1     Sales Document Category
*   it_rg_datab =               " trg_date      Range Table: Date
*   it_rg_datbi =               " trg_date      Range Table: Date
*   iv_caller_id =              " string
  IMPORTING
    et_doc_in =                 " terpsls_valdoc  Information on SD Documents with Validity Interval
    et_doc_qu =                 " terpsls_valdoc  Information on SD Documents with Validity Interval
    et_doc_co =                 " terpsls_valdoc  Information on SD Documents with Validity Interval
    et_doc =                    " terpsls_valdoc  Information on SD Documents with Validity Interval
    et_expdoc =                 " tdt_expdoc    Information on SD Documents with Validity Interval
    et_auth_auart =             " tdt_auth_auart  Authorization for SD Order Types
    et_auth_orgdata =           " tdt_auth_orgdata  Authorization for Sales Areas
    ef_more_entries =           " flag          General Indicator
    .  "  ERPSLS_EXPDOC

ABAP code example for Function Module ERPSLS_EXPDOC





The ABAP code below is a full code listing to execute function module ERPSLS_EXPDOC 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_et_doc_in  TYPE TERPSLS_VALDOC ,
ld_et_doc_qu  TYPE TERPSLS_VALDOC ,
ld_et_doc_co  TYPE TERPSLS_VALDOC ,
ld_et_doc  TYPE TERPSLS_VALDOC ,
ld_et_expdoc  TYPE TDT_EXPDOC ,
ld_et_auth_auart  TYPE TDT_AUTH_AUART ,
ld_et_auth_orgdata  TYPE TDT_AUTH_ORGDATA ,
ld_ef_more_entries  TYPE FLAG .

DATA(ld_it_rg_vbeln) = 'Check type of data required'.
DATA(ld_it_rg_trvog) = 'Check type of data required'.
DATA(ld_it_rg_auart) = 'Check type of data required'.
DATA(ld_it_rg_kunnr) = 'Check type of data required'.
DATA(ld_it_rg_erdat) = 'Check type of data required'.
DATA(ld_iv_zpavw) = 'Check type of data required'.
DATA(ld_it_rg_zpers) = 'Check type of data required'.
DATA(ld_it_rg_ernam) = 'Check type of data required'.
DATA(ld_it_rg_vkorg) = 'Check type of data required'.
DATA(ld_it_rg_vtweg) = 'Check type of data required'.
DATA(ld_it_rg_spart) = 'Check type of data required'.
DATA(ld_it_rg_vkbur) = 'Check type of data required'.
DATA(ld_it_rg_vkgrp) = 'Check type of data required'.
DATA(ld_iv_datbi) = 'Check type of data required'.
DATA(ld_if_expired) = 'Check type of data required'.
DATA(ld_iv_maxsel) = 'Check type of data required'.
DATA(ld_it_rg_vbtyp) = 'Check type of data required'.
DATA(ld_it_rg_datab) = 'Check type of data required'.
DATA(ld_it_rg_datbi) = 'Check type of data required'.
DATA(ld_iv_caller_id) = 'Check type of data required'. . CALL FUNCTION 'ERPSLS_EXPDOC' * EXPORTING * it_rg_vbeln = ld_it_rg_vbeln * it_rg_trvog = ld_it_rg_trvog * it_rg_auart = ld_it_rg_auart * it_rg_kunnr = ld_it_rg_kunnr * it_rg_erdat = ld_it_rg_erdat * iv_zpavw = ld_iv_zpavw * it_rg_zpers = ld_it_rg_zpers * it_rg_ernam = ld_it_rg_ernam * it_rg_vkorg = ld_it_rg_vkorg * it_rg_vtweg = ld_it_rg_vtweg * it_rg_spart = ld_it_rg_spart * it_rg_vkbur = ld_it_rg_vkbur * it_rg_vkgrp = ld_it_rg_vkgrp * iv_datbi = ld_iv_datbi * if_expired = ld_if_expired * iv_maxsel = ld_iv_maxsel * it_rg_vbtyp = ld_it_rg_vbtyp * it_rg_datab = ld_it_rg_datab * it_rg_datbi = ld_it_rg_datbi * iv_caller_id = ld_iv_caller_id IMPORTING et_doc_in = ld_et_doc_in et_doc_qu = ld_et_doc_qu et_doc_co = ld_et_doc_co et_doc = ld_et_doc et_expdoc = ld_et_expdoc et_auth_auart = ld_et_auth_auart et_auth_orgdata = ld_et_auth_orgdata ef_more_entries = ld_ef_more_entries . " ERPSLS_EXPDOC
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_et_doc_in  TYPE TERPSLS_VALDOC ,
ld_it_rg_vbeln  TYPE TRG_CHAR10 ,
ld_et_doc_qu  TYPE TERPSLS_VALDOC ,
ld_it_rg_trvog  TYPE TRG_CHAR1 ,
ld_et_doc_co  TYPE TERPSLS_VALDOC ,
ld_it_rg_auart  TYPE TRG_CHAR4 ,
ld_et_doc  TYPE TERPSLS_VALDOC ,
ld_it_rg_kunnr  TYPE TRG_CHAR10 ,
ld_et_expdoc  TYPE TDT_EXPDOC ,
ld_it_rg_erdat  TYPE TRG_DATE ,
ld_iv_zpavw  TYPE PARVW ,
ld_et_auth_auart  TYPE TDT_AUTH_AUART ,
ld_et_auth_orgdata  TYPE TDT_AUTH_ORGDATA ,
ld_it_rg_zpers  TYPE TRG_NUMC8 ,
ld_ef_more_entries  TYPE FLAG ,
ld_it_rg_ernam  TYPE TRG_CHAR12 ,
ld_it_rg_vkorg  TYPE TRG_CHAR4 ,
ld_it_rg_vtweg  TYPE TRG_CHAR2 ,
ld_it_rg_spart  TYPE TRG_CHAR2 ,
ld_it_rg_vkbur  TYPE TRG_CHAR4 ,
ld_it_rg_vkgrp  TYPE TRG_CHAR3 ,
ld_iv_datbi  TYPE DATBI_VI ,
ld_if_expired  TYPE CHAR1 ,
ld_iv_maxsel  TYPE INT4 ,
ld_it_rg_vbtyp  TYPE TRG_CHAR1 ,
ld_it_rg_datab  TYPE TRG_DATE ,
ld_it_rg_datbi  TYPE TRG_DATE ,
ld_iv_caller_id  TYPE STRING .

ld_it_rg_vbeln = 'Check type of data required'.
ld_it_rg_trvog = 'Check type of data required'.
ld_it_rg_auart = 'Check type of data required'.
ld_it_rg_kunnr = 'Check type of data required'.
ld_it_rg_erdat = 'Check type of data required'.
ld_iv_zpavw = 'Check type of data required'.
ld_it_rg_zpers = 'Check type of data required'.
ld_it_rg_ernam = 'Check type of data required'.
ld_it_rg_vkorg = 'Check type of data required'.
ld_it_rg_vtweg = 'Check type of data required'.
ld_it_rg_spart = 'Check type of data required'.
ld_it_rg_vkbur = 'Check type of data required'.
ld_it_rg_vkgrp = 'Check type of data required'.
ld_iv_datbi = 'Check type of data required'.
ld_if_expired = 'Check type of data required'.
ld_iv_maxsel = 'Check type of data required'.
ld_it_rg_vbtyp = 'Check type of data required'.
ld_it_rg_datab = 'Check type of data required'.
ld_it_rg_datbi = 'Check type of data required'.
ld_iv_caller_id = 'Check type of data required'.

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