SAP Reports / Programs

COPA_CRMDOCUMENTUPDATE SAP ABAP Report - Subroutines for CRM Documents Update in CO-PA







COPA_CRMDOCUMENTUPDATE is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). Below is the basic information available for this SAP report including which OBJECTS it interacts with such as TABLES, FUNCTION MODULES, INCLUDES ETC. Also check out the submitted Comments related to this SAP report or see any standard documentation available.

If you would like to execute this report or see the full code listing simply enter COPA_CRMDOCUMENTUPDATE into the relevant SAP transactions such as SE38 or SE80


ABAP code to call this SAP report using the submit statement

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.






SUBMIT COPA_CRMDOCUMENTUPDATE. "Basic submit
SUBMIT COPA_CRMDOCUMENTUPDATE AND RETURN. "Return to original report after report execution complete
SUBMIT COPA_CRMDOCUMENTUPDATE VIA SELECTION-SCREEN. "Display selection screen of submitted report to user
    See more syntax options for the ABAP SUBMIT statement


Text pool values


Title: Subroutines for CRM Documents Update in CO-PA


INCLUDES used within this REPORT COPA_CRMDOCUMENTUPDATE

INCLUDE COPA_CRMDOCUMENTUPDATE_TOP.


TABLES used within REPORT and the associated SELECT statement:





No SAP DATABASE tables are accessed within this REPORT code!


Function Modules used within report and the associated call statement:

COPA_GET_ADMINISTRATION_DATA call function 'COPA_GET_ADMINISTRATION_DATA' exporting I_BUKRS = G_BUKRS I_DATE = G_ERDAT importing E_ERKRS = G_ERKRS * e_kokrs = g_kokrs * e_gjahr = l_gjahr * es_tkeb = gs_tkeb * es_tka00 = gs_tka00 * es_tka01 = gs_tka01 * es_v_tkeb = gs_v_tkeb et_v_tkebl = gt_v_tkebl exceptions error_erkrs_find = 1 error_erkrs_read = 2 error_kokrs_read = 3 no_erkrs_for_kokrs = 4 others = 5.

COPA_FIELD_RETURN call function 'COPA_FIELD_RETURN' exporting i_mode = 'R' I_RBELN = I_RPOSN = importing et_fix_field = lt_fix_field exceptions others = 1.

KEDR_COPA_DERIVE CALL FUNCTION 'KEDR_COPA_DERIVE' exporting i_erkrs = g_erkrs I_ITEM = I_CE0STRUCTURE i_tab_exceptions = lt_fix_field I_DERIVATION_DATE = I_DERIVE_ANYWAY = '' importing E_ITEM = I_CE0STRUCTURE exceptions derivation_failed = 1 others = 2.

RKE_TRANSFORM_STRUCTURE CALL FUNCTION 'RKE_TRANSFORM_STRUCTURE' EXPORTING erkrs = g_erkrs from_area = i_structure_from from_tabname = i_dictionary_type_from * POS = '1' to_area_import = i_structure_to to_tabname = i_dictionary_type_to IMPORTING * POS = to_area_export = i_structure_to.

DDIF_TABL_GET * CALL FUNCTION 'DDIF_TABL_GET' * EXPORTING * NAME = I_DICTIONARY_TYPE_FROM * STATE = 'A' * TABLES * DD03P_TAB = LT_DD03P_FROM * EXCEPTIONS * ILLEGAL_INPUT = 1 * OTHERS = 2.

DDIF_TABL_GET * CALL FUNCTION 'DDIF_TABL_GET' * EXPORTING * NAME = I_DICTIONARY_TYPE_TO * STATE = 'A' * TABLES * DD03P_TAB = LT_DD03P_TO * EXCEPTIONS * ILLEGAL_INPUT = 1 * OTHERS = 2.

KECX_RELEXIT CALL FUNCTION 'KECX_RELEXIT' EXPORTING I_PROG_ID = 'CRMINTEG' I_FORM_ID = 'VALUATE_LINE_ITEM' I_COUNT_PARAMS = 4 IMPORTING E_IS_ACTIVE = IS_ACTIVE CHANGING X_PARAM_1 = G_ERKRS X_PARAM_2 = I_CE1STRUCTURE X_PARAM_3 = IT_DBTABLE[] X_PARAM_4 = LT_VALUEF[] EXCEPTIONS OTHERS = 1.

RKE_CURRENCIES_GET CALL FUNCTION 'RKE_CURRENCIES_GET' EXPORTING I_ERKRS = G_ERKRS I_PALEDGER = '01' I_BUKRS = G_BUKRS IMPORTING ET_V_CURR = LT_CURRENCIES EXCEPTIONS ERKRS_NOT_DEFINED = 1 PALEDGER_NOT_DEFINED = 2 BUKRS_NOT_DEFINED = 3 OTHERS = 4.

RKE_CURRENCIES_GET CALL FUNCTION 'RKE_CURRENCIES_GET' EXPORTING I_ERKRS = G_ERKRS I_PALEDGER = '02' I_BUKRS = G_BUKRS IMPORTING ET_V_CURR = LT_CURRENCIES EXCEPTIONS ERKRS_NOT_DEFINED = 1 PALEDGER_NOT_DEFINED = 2 BUKRS_NOT_DEFINED = 3 OTHERS = 4.

COPA_CONVERT_TO_LF_CURRENCY CALL FUNCTION 'COPA_CONVERT_TO_LF_CURRENCY' EXPORTING I_ERKRS = G_ERKRS I_DATE = G_ERDAT I_CURRENCY_FROM = I_AMOUNT_FROM = I_CURRENCY_TO = L_ERKRS_CURR I_RATE = '' I_TYPE_OF_RATE = 'M' IMPORTING e_exchange_rate = l_rate E_AMOUNT_TO = EXCEPTIONS CONVERSION_ERROR = 1 OTHERS = 2.

COPA_CONVERT_TO_LF_CURRENCY CALL FUNCTION 'COPA_CONVERT_TO_LF_CURRENCY' EXPORTING I_ERKRS = G_ERKRS I_DATE = G_ERDAT I_CURRENCY_FROM = L_ERKRS_CURR I_AMOUNT_FROM = I_CURRENCY_TO = L_BUKRS_CURR I_RATE = '' I_TYPE_OF_RATE = 'M' IMPORTING e_exchange_rate = l_rate E_AMOUNT_TO = EXCEPTIONS CONVERSION_ERROR = 1 OTHERS = 2.

KECX_RELEXIT CALL FUNCTION 'KECX_RELEXIT' EXPORTING I_PROG_ID = 'CRMINTEG' I_FORM_ID = 'POST_ACT_LINE_ITEM' I_COUNT_PARAMS = 3 IMPORTING E_IS_ACTIVE = IS_ACTIVE CHANGING X_PARAM_1 = G_ERKRS X_PARAM_2 = LT_PALEDGER[] X_PARAM_3 = IT_CE1_NEW[] EXCEPTIONS OTHERS = 1.

RKE_CONVERT_DATE_TO_LOGNR CALL FUNCTION 'RKE_CONVERT_DATE_TO_LOGNR' EXPORTING DATE = ERKRS = G_ERKRS IMPORTING PERIO = L_PERIO PERIO2 = L_ALTPERIO.

RKE_REVERSE_ACT_LINE_ITEM CALL FUNCTION 'RKE_REVERSE_ACT_LINE_ITEM' EXPORTING ERKRS = g_ERKRS I_FROM = 1 PA_TYPE = 1 TABLES LINE_ITEM_TAB = it_ce1.

RKE_FILL_FIELD_TABLE call function 'RKE_FILL_FIELD_TABLE' exporting ERKRS = I_ERKRS tabname = l_dbtabname tables fieldtab = gt_fieldtab.

RKE_GET_ACT_DOC_NUMBER CALL FUNCTION 'RKE_GET_ACT_DOC_NUMBER' EXPORTING ERKRS = G_ERKRS GJAHR = VRGAR = 'A' IMPORTING BELNR = L_BELNR.

RKE_GET_CRITERIA_FOR_CE4KEY CALL FUNCTION 'RKE_GET_CRITERIA_FOR_CE4KEY' EXPORTING i_erkrs = g_erkrs i_use_tkeoe = 'X' i_pa_type = '1' TABLES object_table = it_ce4 EXCEPTIONS OTHERS = 1.



Contribute (Add Comments)

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