SAP Reports / Programs

IREAD_SM_PM_ORDERS SAP ABAP Report - Send Order







IREAD_SM_PM_ORDERS is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). It is used for In see full standard documentation available for this report. Also check out the submitted Comments related to this SAP report and the details below to see which OBJECTS it interacts with such as TABLES, FUNCTION MODULES, INCLUDES ETC.

If you would like to execute this report or see the full code listing simply enter IREAD_SM_PM_ORDERS 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

IORD - Create SM/PM Order IDoc


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 IREAD_SM_PM_ORDERS. "Basic submit
SUBMIT IREAD_SM_PM_ORDERS AND RETURN. "Return to original report after report execution complete
SUBMIT IREAD_SM_PM_ORDERS 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_USPRF = D .
Selection Text: P_USTAT = User status to be set
Selection Text: SO_ARBPL = Work center
Selection Text: SO_BUKRS = Company code
Selection Text: SO_GSBER = Business area
Selection Text: SO_GSTRP = Order start date
Selection Text: SO_ILART = Maintenance activity type
Selection Text: SO_INGRP = Maintenance planner group
Selection Text: SO_KOKRS = Controlling area
Selection Text: SO_LARNT = Activity type
Selection Text: SO_OSEXC = System status exclusive
Selection Text: SO_OSINC = System status inclusive
Selection Text: SO_OUEXC = User status exclusive
Selection Text: SO_OUINC = User status inclusive
Selection Text: SO_PRIOK = Order priority
Selection Text: SO_STEUS = Control key
Selection Text: SO_SYEXC = System status exclusive
Selection Text: SO_SYINC = System status inclusive
Selection Text: SO_USEXC = User status exclusive
Selection Text: SO_USINC = User status inclusive
Selection Text: SO_WERKS = Plant
Selection Text: TARGET = Target system
Selection Text: P_SUBOP =
Selection Text: P_PRTSTA =
Selection Text: P_OPLTXT =
Title: Send Order
Text Symbol: 001 = Status to be set in processed orders
Text Symbol: 002 = Additional Header Selections
Text Symbol: 003 = Operation Level Selections
Text Symbol: 004 = Target System
Text Symbol: 005 = Select long text for all operations
Text Symbol: 006 = Include sub-operations
Text Symbol: 007 = Set Printed status
Text Symbol: 010 = Selected from Order selection:
Text Symbol: 011 = IDoc(s) created:
Text Symbol: 012 = Rejected (further selections):
Text Symbol: 013 = Rejected (status selection):
Text Symbol: 014 = Rejected (no operation selected):





Text Symbol: 015 = Rejected (error):
Text Symbol: 020 = Unexpected error calling
Text Symbol: 021 = Order could not be locked
Text Symbol: 023 = IDoc could not be created
Text Symbol: 024 = System status could not be set to "Printed"
Text Symbol: 030 = Errors:
Text Symbol: 031 = error text


INCLUDES used within this REPORT IREAD_SM_PM_ORDERS

INCLUDE IREAD_SM_PM_TOP.
INCLUDE IREAD_SM_PM_CONST.
INCLUDE IREAD_SM_PM_SUBS.


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:

I_SMPM_START_IDOC_CHECK CALL FUNCTION 'I_SMPM_START_IDOC_CHECK' EXPORTING transac_code = sy-tcode IMPORTING msgno = msgno EXCEPTIONS OTHERS = 1.

I_SMPM_START_IDOC_PROCESS CALL FUNCTION 'I_SMPM_START_IDOC_PROCESS' EXPORTING recv_sys = target message_type = message_type IMPORTING msgno = msgno msgv1 = msgv1 EXCEPTIONS OTHERS = 1.

I_STATUS_SELECT CALL FUNCTION 'I_STATUS_SELECT' EXPORTING objnr = diaufk-objnr sent_user_status = p_ustat IMPORTING selected = g_answer current_user_status = current_status next_user_status = next_status user_status_profile = ustat_profile TABLES syst_status_incl = so_syinc syst_status_excl = so_syexc user_status_incl = so_usinc user_status_excl = so_usexc.

CO_ZF_ORDER_LOCK_MULTI CALL FUNCTION 'CO_ZF_ORDER_LOCK_MULTI' EXPORTING lock_mode = 'S' TABLES enqueue_tab = int_lock not_locked = int_notlocked EXCEPTIONS OTHERS = 1.

STATUS_CHANGE_FOR_ACTIVITY CALL FUNCTION 'STATUS_CHANGE_FOR_ACTIVITY' EXPORTING objnr = diaufk-objnr vrgng = 'RMDR' EXCEPTIONS activity_not_allowed = 1 object_not_found = 2 status_inconsistent = 3 status_not_allowed = 4 wrong_input = 5 warning_occured = 6 OTHERS = 7.

I_CHANGE_STATUS CALL FUNCTION 'I_CHANGE_STATUS' IN UPDATE TASK EXPORTING objnr = diaufk-objnr estat_inactive = current_status estat_active = next_status stsma = ustat_profile.

I_STATUS_SELECT CALL FUNCTION 'I_STATUS_SELECT' EXPORTING objnr = x_objnr sent_user_status = p_ustat IMPORTING selected = g_answer current_user_status = current_status next_user_status = next_status user_status_profile = ustat_profile TABLES syst_status_incl = so_osinc syst_status_excl = so_osexc user_status_incl = so_ouinc user_status_excl = so_ouexc.

I_CHANGE_STATUS CALL FUNCTION 'I_CHANGE_STATUS' IN UPDATE TASK EXPORTING objnr = x_objnr estat_inactive = current_status estat_active = next_status stsma = ustat_profile.

CR_WORKSTATION_READ CALL FUNCTION 'CR_WORKSTATION_READ' EXPORTING id = x_arbid msgty = 'S' IMPORTING arbpl = int_diafcvs-arbpl * ECRHD = * KTEXT = * WERKS = EXCEPTIONS not_found = 1 OTHERS = 2.

STATUS_TEXT_EDIT CALL FUNCTION 'STATUS_TEXT_EDIT' EXPORTING * CLIENT = SY-MANDT flg_user_stat = 'X' objnr = x_objnr only_active = 'X' spras = sy-langu IMPORTING * ANW_STAT_EXISTING = * E_STSMA = line = int_diafcvs-sttxt user_line = int_diafcvs-ustxt.

I_SMPM_ADDRESS_GET CALL FUNCTION 'I_SMPM_ADDRESS_GET' EXPORTING adrnr = diaufk-adrnra IMPORTING address = struc_hdr_addr EXCEPTIONS OTHERS = 1.

IDOC_OUTPUT_IORDER CALL FUNCTION 'IDOC_OUTPUT_IORDER' EXPORTING target_sys = target struc_header = struc_header struc_header_adr = struc_hdr_addr struc_techobj = f_techobj TABLES t_diafcvs = int_diafcvs t_hdrpartner = int_hdrpartner t_ordpermit = int_ordpermit EXCEPTIONS idoc_not_created = 1 OTHERS = 2.

CO_ZF_ORDER_LOCK_MULTI CALL FUNCTION 'CO_ZF_ORDER_LOCK_MULTI' EXPORTING lock_mode = 'E' "Unlock * EXPLODE_PRODNET = ' ' * FLG_VERS_ENQ = TABLES enqueue_tab = int_lock not_locked = int_notlocked.

REUSE_ALV_GRID_DISPLAY





CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY' EXPORTING i_callback_program = gv_repid is_layout = ls_layo it_fieldcat = lt_fcat it_sort = lt_sort it_events = lt_evts TABLES t_outtab = it_errors EXCEPTIONS program_error = 1 OTHERS = 2.

REUSE_ALV_EVENTS_GET CALL FUNCTION 'REUSE_ALV_EVENTS_GET' EXPORTING i_list_type = 4 IMPORTING et_events = ct_events EXCEPTIONS list_type_wrong = 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 IREAD_SM_PM_ORDERS or its description.