SAP Function Modules

IPM_CR_REPOST_DOCUMENTS_CREATE SAP Function module







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

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


Pattern for FM IPM_CR_REPOST_DOCUMENTS_CREATE - IPM CR REPOST DOCUMENTS CREATE





CALL FUNCTION 'IPM_CR_REPOST_DOCUMENTS_CREATE' "
  EXPORTING
    iv_bukrs =                  " bukrs
    iv_ledger =                 " rldnr
    iv_bea =                    " crm_ipm_bea_appl
    iv_date_from =              " cpudt
    iv_time_from =              " cputm
    iv_date_to =                " cpudt
    iv_time_to =                " cputm
    iv_blart =                  " blart
    iv_budat =                  " budat
*   iv_doc_flow_field =         " fieldname
    iv_blarto =                 " blart
*   iv_defer_cancellation = 'X'  " boolean
  IMPORTING
    et_acc_doc =                " ipmcr_acc_doc_tab
  TABLES
    ir_belnr =                  " rng_belnr
  EXCEPTIONS
    NO_ITEMS_FOR_REPOSTING = 1  "
    .  "  IPM_CR_REPOST_DOCUMENTS_CREATE

ABAP code example for Function Module IPM_CR_REPOST_DOCUMENTS_CREATE





The ABAP code below is a full code listing to execute function module IPM_CR_REPOST_DOCUMENTS_CREATE 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_acc_doc  TYPE IPMCR_ACC_DOC_TAB ,
it_ir_belnr  TYPE STANDARD TABLE OF RNG_BELNR,"TABLES PARAM
wa_ir_belnr  LIKE LINE OF it_ir_belnr .

DATA(ld_iv_bukrs) = 'Check type of data required'.
DATA(ld_iv_ledger) = 'Check type of data required'.
DATA(ld_iv_bea) = 'Check type of data required'.
DATA(ld_iv_date_from) = 'Check type of data required'.
DATA(ld_iv_time_from) = 'Check type of data required'.
DATA(ld_iv_date_to) = 'Check type of data required'.
DATA(ld_iv_time_to) = 'Check type of data required'.
DATA(ld_iv_blart) = 'Check type of data required'.
DATA(ld_iv_budat) = 'Check type of data required'.
DATA(ld_iv_doc_flow_field) = 'Check type of data required'.
DATA(ld_iv_blarto) = 'Check type of data required'.
DATA(ld_iv_defer_cancellation) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_ir_belnr to it_ir_belnr. . CALL FUNCTION 'IPM_CR_REPOST_DOCUMENTS_CREATE' EXPORTING iv_bukrs = ld_iv_bukrs iv_ledger = ld_iv_ledger iv_bea = ld_iv_bea iv_date_from = ld_iv_date_from iv_time_from = ld_iv_time_from iv_date_to = ld_iv_date_to iv_time_to = ld_iv_time_to iv_blart = ld_iv_blart iv_budat = ld_iv_budat * iv_doc_flow_field = ld_iv_doc_flow_field iv_blarto = ld_iv_blarto * iv_defer_cancellation = ld_iv_defer_cancellation IMPORTING et_acc_doc = ld_et_acc_doc TABLES ir_belnr = it_ir_belnr EXCEPTIONS NO_ITEMS_FOR_REPOSTING = 1 . " IPM_CR_REPOST_DOCUMENTS_CREATE
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_et_acc_doc  TYPE IPMCR_ACC_DOC_TAB ,
ld_iv_bukrs  TYPE BUKRS ,
it_ir_belnr  TYPE STANDARD TABLE OF RNG_BELNR ,
wa_ir_belnr  LIKE LINE OF it_ir_belnr,
ld_iv_ledger  TYPE RLDNR ,
ld_iv_bea  TYPE CRM_IPM_BEA_APPL ,
ld_iv_date_from  TYPE CPUDT ,
ld_iv_time_from  TYPE CPUTM ,
ld_iv_date_to  TYPE CPUDT ,
ld_iv_time_to  TYPE CPUTM ,
ld_iv_blart  TYPE BLART ,
ld_iv_budat  TYPE BUDAT ,
ld_iv_doc_flow_field  TYPE FIELDNAME ,
ld_iv_blarto  TYPE BLART ,
ld_iv_defer_cancellation  TYPE BOOLEAN .

ld_iv_bukrs = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_ir_belnr to it_ir_belnr.
ld_iv_ledger = 'Check type of data required'.
ld_iv_bea = 'Check type of data required'.
ld_iv_date_from = 'Check type of data required'.
ld_iv_time_from = 'Check type of data required'.
ld_iv_date_to = 'Check type of data required'.
ld_iv_time_to = 'Check type of data required'.
ld_iv_blart = 'Check type of data required'.
ld_iv_budat = 'Check type of data required'.
ld_iv_doc_flow_field = 'Check type of data required'.
ld_iv_blarto = 'Check type of data required'.
ld_iv_defer_cancellation = '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 IPM_CR_REPOST_DOCUMENTS_CREATE or its description.