SAP Reports / Programs

RSETSTATSM02 SAP ABAP Report - Set Closed Status/Flagged for Deletion for Service Orders







RSETSTATSM02 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 RSETSTATSM02 into the relevant SAP transactions such as SE38 or SE80


Transaction Code(s):

Below is a list of transaction codes which are relevant to this SAP report

ADCO99 - Closure of SM Orders


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 RSETSTATSM02. "Basic submit
SUBMIT RSETSTATSM02 AND RETURN. "Return to original report after report execution complete
SUBMIT RSETSTATSM02 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: P_GJAHR = Excl Orders with costs from
Selection Text: SC_AUART = Order Type
Selection Text: SC_AUFNR = D Order
Selection Text: SC_CLOSE = Set Status as 'Closed'
Selection Text: SC_DELET = Set Flag for 'Deletion'
Selection Text: SC_GRPNM = Order Group
Selection Text: SC_IWERK = Planning Plant
Selection Text: SC_KDAUF = D Sales order
Selection Text: SC_KDPOS = D Sales order item
Selection Text: SC_RESTM = Residence time in days
Selection Text: SC_SELID = D Selection profile
Selection Text: SC_TEST = Test run
Title: Set Closed Status/Flagged for Deletion for Service Orders
Text Symbol: 001 = General data selection
Text Symbol: 002 = Actions
Text Symbol: 003 = Parameters
Text Symbol: 004 = Processing
Text Symbol: E01 = No order found for selection criteria
Text Symbol: TF1 = Orders
Text Symbol: TFS = Free Selections - &


INCLUDES used within this REPORT RSETSTATSM02

No INCLUDES are used within this REPORT code!


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:

K_KOKRS_SET CALL FUNCTION 'K_KOKRS_SET' IMPORTING e_kokrs = g_kokrs.

K_KOKRS_SET CALL FUNCTION 'K_KOKRS_SET' EXPORTING popup = '1' IMPORTING e_kokrs = g_kokrs.

K_GROUP_REMOTE_READ CALL FUNCTION 'K_GROUP_REMOTE_READ' EXPORTING setclass = c_global_class co_area = g_kokrs groupname = sc_grpnm language = sy-langu TABLES et_sethier = t_sethier_co et_setval = t_setval_co.

K_GROUP_SELECT CALL FUNCTION 'K_GROUP_SELECT' EXPORTING class = c_global_class field_name = 'AUFNR' set = st_grpnm table = 'CCSS' kokrs = g_kokrs IMPORTING set_name = st_grpnm.

STATUS_CHECK_MULTI CALL FUNCTION 'STATUS_CHECK_MULTI' EXPORTING status = 'I0046' TABLES objects = t_jsto_pre.

STATUS_CHECK_BY_SELSCHEM_MULTI CALL FUNCTION 'STATUS_CHECK_BY_SELSCHEM_MULTI' EXPORTING selschem = sc_selid TABLES objnr_tab = t_jsto_pre EXCEPTIONS no_stat_scheme = 1.

CM_F_INITIALIZE CALL FUNCTION 'CM_F_INITIALIZE' EXPORTING aplid = 'PPCX' smsg_initialize = 'X'.

KO99_PM_ORD_STATUS_ABGS_SET CALL FUNCTION 'KO99_PM_ORD_STATUS_ABGS_SET' EXPORTING kokrs_imp = g_kokrs restime_imp = sc_restm log_changed_orders = 'X' log_failed_orders = 'X' testmode = sc_test servergroup = l_rfcgrp TABLES objects_imp = ld_objtab.

ORDER_CHANGE_FOR_ACTIVITY CALL FUNCTION 'ORDER_CHANGE_FOR_ACTIVITY' EXPORTING flg_lvm = 'X' selid = sc_selid testrun = sc_test maxnumber = 10000 init_tables = 'X' TABLES caufv_tab = t_caufv EXCEPTIONS nothing_to_do = 01 wrong_selid = 02.

CM_F_ANALYSIS CALL FUNCTION 'CM_F_ANALYSIS'.

CM_F_PROTOCOL_PRINT CALL FUNCTION 'CM_F_PROTOCOL_PRINT' EXCEPTIONS * NOT_ACTIVE = 1.

FREE_SELECTIONS_INIT CALL FUNCTION 'FREE_SELECTIONS_INIT' EXPORTING kind = 'T' expressions = ct_expressions field_groups_key = ls_field_groups_key IMPORTING selection_id = ld_selection_id expressions = ct_expressions field_ranges = lt_field_ranges TABLES tables_tab = lt_tables fields_tab = ct_fields EXCEPTIONS OTHERS = 1.

FREE_SELECTIONS_DIALOG CALL FUNCTION 'FREE_SELECTIONS_DIALOG' EXPORTING selection_id = ld_selection_id title = l_title IMPORTING where_clauses = ct_free_selection field_ranges = ct_free_sel_ranges expressions = ct_expressions number_of_active_fields = c_fields_count TABLES fields_tab = ct_fields EXCEPTIONS no_action = 1 OTHERS = 2.

FREE_SELECTIONS_RANGE_2_EX CALL FUNCTION 'FREE_SELECTIONS_RANGE_2_EX' EXPORTING field_ranges = lt_free_sel_ranges IMPORTING expressions = lt_expressions.

FREE_SELECTIONS_RANGE_2_WHERE CALL FUNCTION 'FREE_SELECTIONS_RANGE_2_WHERE' EXPORTING field_ranges = lt_free_sel_ranges IMPORTING where_clauses = lt_free_selection.



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