SAP Function Modules

FC_DOCUMENT_POST2 SAP Function module







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

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


Pattern for FM FC_DOCUMENT_POST2 - FC DOCUMENT POST2





CALL FUNCTION 'FC_DOCUMENT_POST2' "
  EXPORTING
    e_rldnr =                   " fc_rldnr
    e_itclg =                   " fc_itclg
    e_dimen =                   " fc_dimen
    e_rvers =                   " fc_rvers
    e_ryear =                   " fc_ryear
    e_perid =                   " fc_perid
*   es_control =                " fc05_s_da_control
    et_doc =                    " fc05_t_pdoc
  IMPORTING
    it_message =                " fc05_t_message
  CHANGING
    ct_head =                   " fc05_t_pdoc_head
    .  "  FC_DOCUMENT_POST2

ABAP code example for Function Module FC_DOCUMENT_POST2





The ABAP code below is a full code listing to execute function module FC_DOCUMENT_POST2 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_it_message  TYPE FC05_T_MESSAGE .

DATA(ld_ct_head) = 'Check type of data required'.
DATA(ld_e_rldnr) = 'Check type of data required'.
DATA(ld_e_itclg) = 'Check type of data required'.
DATA(ld_e_dimen) = 'Check type of data required'.
DATA(ld_e_rvers) = 'Check type of data required'.
DATA(ld_e_ryear) = 'Check type of data required'.
DATA(ld_e_perid) = 'Check type of data required'.
DATA(ld_es_control) = 'Check type of data required'.
DATA(ld_et_doc) = 'Check type of data required'. . CALL FUNCTION 'FC_DOCUMENT_POST2' EXPORTING e_rldnr = ld_e_rldnr e_itclg = ld_e_itclg e_dimen = ld_e_dimen e_rvers = ld_e_rvers e_ryear = ld_e_ryear e_perid = ld_e_perid * es_control = ld_es_control et_doc = ld_et_doc IMPORTING it_message = ld_it_message CHANGING ct_head = ld_ct_head . " FC_DOCUMENT_POST2
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_ct_head  TYPE FC05_T_PDOC_HEAD ,
ld_it_message  TYPE FC05_T_MESSAGE ,
ld_e_rldnr  TYPE FC_RLDNR ,
ld_e_itclg  TYPE FC_ITCLG ,
ld_e_dimen  TYPE FC_DIMEN ,
ld_e_rvers  TYPE FC_RVERS ,
ld_e_ryear  TYPE FC_RYEAR ,
ld_e_perid  TYPE FC_PERID ,
ld_es_control  TYPE FC05_S_DA_CONTROL ,
ld_et_doc  TYPE FC05_T_PDOC .

ld_ct_head = 'Check type of data required'.
ld_e_rldnr = 'Check type of data required'.
ld_e_itclg = 'Check type of data required'.
ld_e_dimen = 'Check type of data required'.
ld_e_rvers = 'Check type of data required'.
ld_e_ryear = 'Check type of data required'.
ld_e_perid = 'Check type of data required'.
ld_es_control = 'Check type of data required'.
ld_et_doc = '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 FC_DOCUMENT_POST2 or its description.