SAP Reports / Programs | Financials | Financial Supply Chain Management | Transaction Manager(FIN-FSCM-TRM-TM) SAP FIN

RTPMARCHIVE_WRITE SAP ABAP Report - Archiving Treasury Positions: Write Program







RTPMARCHIVE_WRITE 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 RTPMARCHIVE_WRITE 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 RTPMARCHIVE_WRITE. "Basic submit
SUBMIT RTPMARCHIVE_WRITE AND RETURN. "Return to original report after report execution complete
SUBMIT RTPMARCHIVE_WRITE VIA SELECTION-SCREEN. "Display selection screen of submitted report to user
    See more syntax options for the ABAP SUBMIT statement


Text pool values


Selection Text: SO_AT_S1 = D .
Selection Text: SO_AT_M3 = D .
Selection Text: SO_AT_M2 = D .
Selection Text: SO_AT_M1 = D .
Selection Text: SO_AT_L3 = D .
Selection Text: SO_AT_L2 = D .
Selection Text: SO_AT_L1 = D .
Selection Text: SO_ASS = D .
Selection Text: SO_AKTIV = D .
Selection Text: SO_ACGRP = D .
Selection Text: P_WRITST = D .
Selection Text: P_WRIPRD = D .
Selection Text: P_SNAP = D .
Selection Text: P_SEC_DU = D .
Selection Text: P_SEC = D .
Selection Text: P_PROT_O = D .
Selection Text: P_PROT = D .
Selection Text: P_POS = D .
Selection Text: P_LOA = D .
Selection Text: P_KEYDAT = End Date of Retention Period
Selection Text: P_INCL = D .
Selection Text: P_DEST = D .
Selection Text: P_DELTST = D .
Selection Text: P_DEA = D .
Selection Text: P_COMENT = D .
Selection Text: P_AR_ILM = D .
Selection Text: P_ANALYZ = D .
Selection Text: SO_VORG = D .
Selection Text: SO_VCLS = D .
Selection Text: SO_VAREA = D .
Selection Text: SO_TTYPE = D .
Selection Text: SO_TID = D .
Selection Text: SO_SECAC = D .
Selection Text: SO_RANLP = D .
Selection Text: SO_RANL = D .
Selection Text: SO_PT = D .
Selection Text: SO_POSAC = D .
Selection Text: SO_PORTF = D .





Selection Text: SO_PFOTC = D .
Selection Text: SO_OTCNR = D .
Selection Text: SO_MAAGR = D .
Selection Text: SO_LOANR = D .
Selection Text: SO_KONTR = D .
Selection Text: SO_INREF = D .
Selection Text: SO_GRANT = D .
Selection Text: SO_FUND = D .
Selection Text: SO_FLGSH = D .
Selection Text: SO_FINPR = D .
Selection Text: SO_FCBKS = D .
Selection Text: SO_FAC = D .
Selection Text: SO_CHAR = D .
Selection Text: SO_BUKRS = D .
Selection Text: SO_AT_S3 = D .
Selection Text: SO_AT_S2 = D .
Title: Archiving Treasury Positions: Write Program
Text Symbol: SEC = Securities
Text Symbol: SAB = Special Selections
Text Symbol: RPA = Additional Attributes
Text Symbol: PRD = Product Groups
Text Symbol: 205 = TranType:
Text Symbol: 204 = ProdTyp:
Text Symbol: 203 = ConType:
Text Symbol: 202 = Trans.:
Text Symbol: 201 = CoCd:
Text Symbol: 120 = Log Output
Text Symbol: 110 = Control
Text Symbol: 100 = Fin. Transact.
Text Symbol: 026 = Expiration date of security not reached
Text Symbol: 025 = Position is part of a hedging relationship (Hedge Accounting for Exposures)
Text Symbol: 024 = Position is involved in an intragroup trade
Text Symbol: 023 = Expiration date of future or listed option not reached
Text Symbol: 022 = Position has business transactions after first date of retention period
Text Symbol: 021 = Position has maturity after first date of retention period
Text Symbol: 020 = Position is connected to positions not specified by selection
Text Symbol: 018 = Position cannot be archived
Text Symbol: 013 = Position contains a business transaction that does not have business transaction status "Updated"
Text Symbol: 012 = Position contains business transaction that has not been fixed or reversed





Text Symbol: 011 = Position is part of a hedging relationship (Hedge Accounting for Positions)
Text Symbol: 010 = Position has not been specified by selection but is connected to positions specified by selection
Text Symbol: 009 = Position cannot be archived because there is another position in position group that cannot be archived
Text Symbol: 008 = Position can be archived
Text Symbol: 007 = Position group cannot be archived
Text Symbol: 006 = &2% of Objects Found
Text Symbol: 005 = &1% of Objects Processed (&2 out of &3)
Text Symbol: 004 = Position group can be archived
Text Symbol: 003 = Position values are not zero after start date of minimum retention period
Text Symbol: 002 = There is at least one business transaction after start date of minimum retention period
Text Symbol: 001 = Customizing settings are missing for minimum retention period for positions
Text Symbol: POS = Listed Derivatives
Text Symbol: OUT = Output Control
Text Symbol: LOA = Loans
Text Symbol: GDD = MM, Forex, OTC Derivatives
Text Symbol: DEA = OTC Transactions
Text Symbol: CTL = Posting Control
Text Symbol: CMN = General Selections
Text Symbol: B01 = Application
Text Symbol: 309 = Transactions with this product category cannot be archived
Text Symbol: 308 = Transaction is assigned to an active facility
Text Symbol: 307 = Transaction has insufficient settlement status
Text Symbol: 306 = Transaction has insufficient confirmation status
Text Symbol: 305 = Transaction contains flows not posted
Text Symbol: 304 = Transaction contains inconsistent data
Text Symbol: 303 = Minimum retention period of transactions not achieved
Text Symbol: 302 = Transaction was successfully archived
Text Symbol: 301 = Customizing missing for minimum retention period of transactions
Text Symbol: 236 = Archiving in test run
Text Symbol: 235 = Archiving session statistics
Text Symbol: 234 = Statistics for transactions selected
Text Symbol: 233 = Not archived:
Text Symbol: 232 = Successfully archived:
Text Symbol: 231 = Selected financial transact.:
Text Symbol: 222 = Status Text
Text Symbol: 221 = St.
Text Symbol: 209 = Ent. On:
Text Symbol: 208 = Enter.By:
Text Symbol: 207 = Class:



Text Symbol: 206 = ActType:


INCLUDES used within this REPORT RTPMARCHIVE_WRITE

INCLUDE ITPM_POSITION_SELECTION.


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:

ARCHIVE_PROTOCOL_LINE_DETAIL CALL FUNCTION 'ARCHIVE_PROTOCOL_LINE_DETAIL'.

ARCHIVE_PROTOCOL_INIT CALL FUNCTION 'ARCHIVE_PROTOCOL_INIT' EXPORTING i_detailprotocol = p_prot i_protocol_output = p_prot_o.

ARCHIVE_OPEN_FOR_WRITE CALL FUNCTION 'ARCHIVE_OPEN_FOR_WRITE' EXPORTING * TODO: Check this flag call_delete_job_in_test_mode = p_deltst create_archive_file = l_var_create_file object = con_arch_object comments = p_coment do_not_delete_data = ' ' output_sel_screen_when_dialog = space IMPORTING archive_handle = l_handle_archive EXCEPTIONS internal_error = 1 object_not_found = 2 open_error = 3 not_authorized = 4 error_message = 5 OTHERS = 5.

GET_POSITIONS_BY_DIFF_REP CALL FUNCTION 'GET_POSITIONS_BY_DIFF_REP' EXPORTING im_rng_bukrs = so_bukrs[] im_rng_varea = so_varea[] im_rng_vcls = so_vcls[] im_rng_pt = so_pt[] im_rng_ranl = so_ranl[] im_rng_ranlp = so_ranlp[] im_rng_loanr = so_loanr[] im_rng_posac = so_posac[] im_rng_secac = so_secac[] im_rng_acgrp = so_acgrp[] im_rng_portf = so_portf[] im_rng_long_short = so_flgsh[] * im_rng_ltf = so_ltf[] * im_rng_lot = so_lot[] * im_rng_fund = so_fund[] * im_rng_grant = so_grant[] * im_tab_otc_deal = l_tab_otc_deal im_flg_use_table4otc = tpmco_xfalse im_flg_sec = p_sec im_flg_loa = p_loa im_flg_pos = p_pos im_flg_dea = p_dea im_rng_dealnr = so_otcnr[] IMPORTING ex_tab_position = lt_trl_position.

ARCHIVE_NEW_OBJECT CALL FUNCTION 'ARCHIVE_NEW_OBJECT' EXPORTING archive_handle = l_handle_archive object_id = l_oid EXCEPTIONS internal_error = 1 wrong_access_to_archive = 2 OTHERS = 3.

ARCHIVE_SAVE_OBJECT CALL FUNCTION 'ARCHIVE_SAVE_OBJECT' EXPORTING archive_handle = l_handle_archive.

ARCHIVE_WRITE_STATISTICS CALL FUNCTION 'ARCHIVE_WRITE_STATISTICS' EXPORTING archive_handle = l_handle_archive.

ARCHIVE_PROTOCOL_WRITE CALL FUNCTION 'ARCHIVE_PROTOCOL_WRITE'.

ARCHIVE_CLOSE_FILE CALL FUNCTION 'ARCHIVE_CLOSE_FILE' EXPORTING archive_handle = l_handle_archive EXCEPTIONS internal_error = 1 wrong_access_to_archive = 2 error_message = 4 OTHERS = 3.

CALCULATE_HASH_FOR_RAW CALL FUNCTION 'CALCULATE_HASH_FOR_RAW' EXPORTING * ALG = 'SHA1' data = l_buffer * LENGTH = 0 IMPORTING * hashstring = l_key hashb64string = l_key EXCEPTIONS OTHERS = 4.

ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object = ls_object i_text = lv_text i_msgtype = lv_msgtype i_msgid = sy-msgid i_msgno = sy-msgno i_msgv1 = sy-msgv1 i_msgv2 = sy-msgv2 i_msgv3 = sy-msgv3 i_msgv4 = sy-msgv4 EXCEPTIONS protocol_not_yet_initialized = 1 OTHERS = 2.

ARCHIVE_PROTOCOL_COLLECT CALL FUNCTION 'ARCHIVE_PROTOCOL_COLLECT' EXPORTING i_object = ls_temp_protocol-object i_text = ls_temp_protocol-text i_msgtype = ls_temp_protocol-msgtype i_callback_parameter = ls_temp_protocol-callback_parameter EXCEPTIONS protocol_not_yet_initialized = 1 OTHERS = 2.



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