RFMCAINVH is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). It is used for The open items determined using the function
If you would like to execute this report or see the full code listing simply enter RFMCAINVH into the relevant SAP transactions such as SE38 or SE80
Below is a list of transaction codes which are relevant to this SAP report
FMCAINVH - Invoice History
This report can be called from another progam/report simply by using the ABAP SUBMIT statement, see below for example ABAP code snipts of how to do this.
Selection Text: VTREF = D Contract
Selection Text: VKONT = D Contract account
Selection Text: OPBUK = D Responsible Company Code
Selection Text: MAX_SEL = D Maximum Number of Hits
Selection Text: LAUFI = D Identification
Selection Text: LAUFD = D Date ID
Selection Text: INVTP = D Invoice type
Selection Text: INVNR = D Invoice Number
Selection Text: GPART = D Business partner
Title: Display invoice history
Text Symbol: 020 = Warning: Large Database Selection
Text Symbol: 012 = As Many as &1 Invoices Should Be Selected!
Text Symbol: 011 = Do you want to continue?
Text Symbol: 010 = &1 Invoices Were Selected!
Text Symbol: 005 = Data is being read
Text Symbol: 001 = Display invoice history
INCLUDE RFMCAINVHTOP.
No SAP DATABASE tables are accessed within this REPORT code!
REUSE_ALV_VARIANT_DEFAULT_GET * call function 'REUSE_ALV_VARIANT_DEFAULT_GET' * exporting * i_save = g_save * changing * cs_variant = gx_variant * exceptions * not_found = 2.
REUSE_ALV_VARIANT_DEFAULT_GET * call function 'REUSE_ALV_VARIANT_DEFAULT_GET' * exporting * i_save = g_save1 * changing * cs_variant = gx_variant1 * exceptions * not_found = 2.
REUSE_ALV_GRID_DISPLAY call function 'REUSE_ALV_GRID_DISPLAY' exporting i_callback_program = g_repid i_callback_user_command = g_user_command i_callback_pf_status_set = g_status_set i_save = g_save is_variant = g_variant it_fieldcat = gt_fieldcat[] it_sort = g_sort[] tables t_outtab = gt_outtab.
POPUP_TO_CONFIRM_STEP call function 'POPUP_TO_CONFIRM_STEP' exporting defaultoption = 'N' textline1 = text70 textline2 = text-011 titel = text-020 cancel_display = ' ' importing answer = l_answer.
SAPGUI_PROGRESS_INDICATOR call function 'SAPGUI_PROGRESS_INDICATOR' exporting text = text-005.
POPUP_TO_CONFIRM_STEP call function 'POPUP_TO_CONFIRM_STEP' exporting defaultoption = 'N' textline1 = text70 textline2 = text-011 titel = text-020 cancel_display = ' ' importing answer = l_answer.
SAPGUI_PROGRESS_INDICATOR call function 'SAPGUI_PROGRESS_INDICATOR' exporting text = text-005.
FKK_ACCOUNT_READ call function 'FKK_ACCOUNT_READ' exporting i_vkont = gt_outtab-vkont i_gpart = gt_outtab-gpart importing e_fkkvkp = l_fkkvkp exceptions others = 0.
FKK_DOC_AUTHORITY_CHECK call function 'FKK_DOC_AUTHORITY_CHECK' exporting i_bukrs = gt_outtab-opbuk i_begru = l_fkkvkp-begru i_subap = gt_outtab-subap i_vtref = gt_outtab-vtref i_actvt = '03' " 03 is DISPLAY exceptions error_message = 1.
REUSE_ALV_FIELDCATALOG_MERGE call function 'REUSE_ALV_FIELDCATALOG_MERGE' exporting i_program_name = g_repid i_internal_tabname = g_tabname i_structure_name = 'DFMCAINV' i_client_never_display = 'X' changing ct_fieldcat = rt_fieldcat exceptions others = 0.
REUSE_ALV_FIELDCATALOG_MERGE call function 'REUSE_ALV_FIELDCATALOG_MERGE' exporting i_program_name = g_repid i_internal_tabname = g_tabname1 i_structure_name = 'SFMCAINVPOS' i_client_never_display = 'X' changing ct_fieldcat = rt_fieldcat1 exceptions others = 0.
FKK_BUPA_DISPLAY call function 'FKK_BUPA_DISPLAY' exporting i_partner = gt_outtab-gpart exceptions others = 1.
FKK_ACCOUNT_CHANGE call function 'FKK_ACCOUNT_CHANGE' exporting i_vkont = gt_outtab-vkont i_gpart = gt_outtab-gpart i_ch_mode = '1' i_no_other = 'X' i_no_change = 'X' exceptions error_message = 1.
FMCA_PSOB_TREE_MAINTAIN call function 'FMCA_PSOB_TREE_MAINTAIN' exporting i_psobkey = gt_outtab-vtref i_valdt = sy-datlo i_aktyp = '03' i_display_only = 'X' i_partner = gt_outtab-gpart i_partneracc = gt_outtab-vkont.
SAPGUI_PROGRESS_INDICATOR call function 'SAPGUI_PROGRESS_INDICATOR' exporting * percentage = 30 text = text-005.
FKK_BP_LINE_ITEM_SELECT_SINGLE * CALL FUNCTION 'FKK_BP_LINE_ITEM_SELECT_SINGLE' * EXPORTING * i_opbel = gt_outtab1-opbel * i_opupw = gt_outtab1-opupw * i_opupk = gt_outtab1-opupk * i_opupz = gt_outtab1-opupz * IMPORTING * e_fkkop = l_fkkop.
FKK_REP_LINE_ITEM_SEL_BY_OPBEL * CALL FUNCTION 'FKK_REP_LINE_ITEM_SEL_BY_OPBEL' * EXPORTING * i_opbel = gt_outtab1-opbel * IMPORTING * e_count = tables * pt_fkkopw = lt_fkkopw.
REUSE_ALV_GRID_DISPLAY call function 'REUSE_ALV_GRID_DISPLAY' exporting i_callback_program = g_repid i_callback_user_command = g_user_command1 i_callback_pf_status_set = g_status_set1 i_save = g_save1 is_variant = g_variant1 it_fieldcat = gt_fieldcat1[] * it_sort = g_sort[] tables t_outtab = gt_outtab1.
call function 'FKK_FPE0_INIT'.
FKK_FPE0_START_TRANSACTION call function 'FKK_FPE0_START_TRANSACTION' exporting tcode = 'FPE3' opbel = gt_outtab1-opbel i_opupk = gt_outtab1-opupk i_opupw = gt_outtab1-opupw i_opupz = gt_outtab1-opupz exceptions others = 1.
FKK_FPE0_INIT * call function 'FKK_FPE0_INIT'.
FKK_FPE0_START_TRANSACTION * call function 'FKK_FPE0_START_TRANSACTION' * exporting * tcode = 'FPE3' * opbel = rs_selfield-value(12) * exceptions * others = 1.
FMCA_SELECT_DFKKCOH_FOR_FMCAIN call function 'FMCA_SELECT_DFKKCOH_FOR_FMCAIN' exporting i_invnr = p_invnr tables et_dfkkcoh = lt_dfkkcoh exceptions not_found = 1 others = 2.
FKK_CORR_ARCHIVE_DISPLAY call function 'FKK_CORR_ARCHIVE_DISPLAY' exporting i_dfkkcohi = l_dfkkcohi.
Although this basic information may have limited use it does provide an easy to find location to store any knowledge about this program/report.
The contribute/comments section below therefore offer's an opportunity for anyone to add additional information. This can be anything from useful hints, tips and screen shots to relevant SAP notes or anything else you feel is relevant to this report.
This will then be available for everyone to easily find by simply searching on the report name RFMCAINVH or its description.