SAP Reports / Programs | Manufacturing Execution System | Industry Solution High Tech | Manufacturing Execution System(IS-HT-MES) SAP IS

/SAPHT/MESREWLOOP SAP ABAP INCLUDE - Rework Loop Include







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


Text pool values


Title: Rework Loop Include


INCLUDES used within this REPORT /SAPHT/MESREWLOOP

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:

CO_DT_LST_GET_ALL_MARKED CALL FUNCTION 'CO_DT_LST_GET_ALL_MARKED' IMPORTING ENTRIES = CO_DT_INDEX TABLES LST_EXP = IRCLST EXCEPTIONS NONE_MARKED = 1 OTHERS = 2.

CO_DT_SELECTION_DETAIL_FILL CALL FUNCTION 'CO_DT_SELECTION_DETAIL_FILL' EXPORTING RC27I_IMP = RC27I OBJECT_IMP = OBJ-POS FLG_OPR_SOP_IMP = TCO01-FLG_OPRSOP IMPORTING RC27I_EXP = RC27I INDEX_DT_EXP = CO_DT_INDEX EXCEPTIONS NOT_FOUND = 01 NO_LIST = 02.

C0_DM_LST_MARK_GET_FIRST * CALL FUNCTION 'C0_DM_LST_MARK_GET_FIRST' IF SY-SUBRC EQ 0.

CO_BT_AFVG_READ_WITH_KEY CALL FUNCTION 'CO_BT_AFVG_READ_WITH_KEY' EXPORTING APLZL = INDX_END AUFNR_ACT = CAUFVD-AUFNR IMPORTING AFVGD_EXP = TEMP_AFVGD INDEX = RCN10-INDX_END EXCEPTIONS NOT_FOUND = 1 OTHERS = 2.

STATUS_CHECK CALL FUNCTION 'STATUS_CHECK' EXPORTING OBJNR = TEMP_AFVGD-OBJNR STATUS = DEL_STAT " deleted EXCEPTIONS OBJECT_NOT_FOUND = 1 STATUS_NOT_ACTIVE = 2 OTHERS = 3.

CO_SD_INSERT_LIBRARY_NETW CALL FUNCTION 'CO_SD_INSERT_LIBRARY_NETW' EXPORTING STDNR_IMP = RCN10-STDNR STDAL_IMP = RCN10-STDAL INDX_START_IMP = RCN10-INDX_START "starting point INDX_END_IMP = RCN10-INDX_END CAUFVD_IMP = CAUFVD INDEX_SEQ_IMP = RC27I-INDEX_PLFL FLG_SCHED_IMP = YX.

CO_DT_LST_MARK_ALL_DEL CALL FUNCTION 'CO_DT_LST_MARK_ALL_DEL' EXPORTING LSTNR_IMP = RC27X-LSTNR EXCEPTIONS OTHERS = 1.

CO_DT_DTAB_REC_READ_BY_INDEX CALL FUNCTION 'CO_DT_DTAB_REC_READ_BY_INDEX' EXPORTING INDEX_DT_IMP = CO_DT_INDEX IMPORTING RCLST_EXP = IRCLST EXCEPTIONS NOT_FOUND = 1 OTHERS = 2.

STATUS_CHECK CALL FUNCTION 'STATUS_CHECK' EXPORTING OBJNR = TEMP_AFVGD-OBJNR STATUS = DEL_STAT " deleted EXCEPTIONS OBJECT_NOT_FOUND = 1 STATUS_NOT_ACTIVE = 2 OTHERS = 3.

CO_DT_LST_MARK_SET_BY_INDEX CALL FUNCTION 'CO_DT_LST_MARK_SET_BY_INDEX' EXPORTING FLG_MARK_IMP = 'X' INDEX_DT_IMP = CO_DT_INDEX * IMPORTING * RCLST_EXP = EXCEPTIONS NOT_FOUND = 1 OTHERS = 2.

CO_DT_LST_DEL CALL FUNCTION 'CO_DT_LST_DEL' EXPORTING LSTNR_IMP = RC27X-LSTNR EXCEPTIONS NOT_FOUND = 01.

CO_BO_OPR_OF_ORDER_GET CALL FUNCTION 'CO_BO_OPR_OF_ORDER_GET' EXPORTING AUFNR_IMP = CAUFVD-AUFNR TABLES AFVGD_GET = REWORK_OP EXCEPTIONS OTHERS = 1.

CO_BT_AFVG_READ_WITH_INDEX CALL FUNCTION 'CO_BT_AFVG_READ_WITH_INDEX' EXPORTING INDEX = IDX_READ IMPORTING AFVGD_EXP = REW_AFVGD EXCEPTIONS ERROR_READ_AFVG = 1 OTHERS = 2.

STATUS_CHECK CALL FUNCTION 'STATUS_CHECK' EXPORTING OBJNR = REW_AFVGD-OBJNR STATUS = DEL_STAT " confirmed? EXCEPTIONS OBJECT_NOT_FOUND = 1 STATUS_NOT_ACTIVE = 2 OTHERS = 3.

STATUS_CHECK CALL FUNCTION 'STATUS_CHECK' EXPORTING OBJNR = REW_AFVGD-OBJNR STATUS = CNF_STAT " confirmed? EXCEPTIONS OBJECT_NOT_FOUND = 1 STATUS_NOT_ACTIVE = 2 OTHERS = 3.

/SAPHT/MESCQDB_PLMK_READNOTDL2 CALL FUNCTION '/SAPHT/MESCQDB_PLMK_READNOTDL2' EXPORTING * DATUB = 0 * DATUV = 0 * PLNAL = ' ' PLNNR = RCN10-STDNR "from screen or order PLNTY = CAUFVD-PLNTY "type from order * SERNB = 0 * SERNRKZ = ' ' * SERNV = 0 * IMPORTING * FLG_NOT_FOUND = * ZAEHL_MAX_PLMK = TABLES PLANMK = MYPLMKTAB * EXCEPTIONS * NO_RECORDS = 1 * OTHERS = 2 .

CO_BO_OPR_OF_ORDER_GET CALL FUNCTION 'CO_BO_OPR_OF_ORDER_GET' EXPORTING AUFNR_IMP = CAUFVD-AUFNR TABLES AFVGD_GET = REWORK_OP EXCEPTIONS OTHERS = 1.

QEEM_UNPLANNED_CHARACTERISTICS CALL FUNCTION 'QEEM_UNPLANNED_CHARACTERISTICS' EXPORTING I_PRUEFLOS = CAUFVD-PRUEFLOS I_AFVGD = TEMP_AFVGD I_VORNR = ' ' I_ONLY_DEFINE_NEW_CHAR = 'X' I_BLOCK_LOT_BY_QM = ' ' EXCEPTIONS LOT_DOES_NOT_EXIST = 1 LOT_WITH_WRONG_STATUS = 2 INTERNAL_ERROR_CHARACTERISTICS = 3 PROC_OF_OPERATION_NOT_ALLOWED = 4 OTHERS = 5.

STATUS_CHECK





CALL FUNCTION 'STATUS_CHECK' EXPORTING OBJNR = AFVGD-OBJNR STATUS = I0013 "deleted EXCEPTIONS OBJECT_NOT_FOUND = 1 STATUS_NOT_ACTIVE = 2 OTHERS = 3.

STATUS_CHECK CALL FUNCTION 'STATUS_CHECK' EXPORTING OBJNR = AFVGD-OBJNR STATUS = I0013 "deleted EXCEPTIONS OBJECT_NOT_FOUND = 1 STATUS_NOT_ACTIVE = 2 OTHERS = 3.

STATUS_CHECK CALL FUNCTION 'STATUS_CHECK' EXPORTING OBJNR = CAUFVD-OBJNR STATUS = ITEMP-STATUS EXCEPTIONS OBJECT_NOT_FOUND = 1 STATUS_NOT_ACTIVE = 2 OTHERS = 3.

STATUS_CHANGE_EXTERN * CALL FUNCTION 'STATUS_CHANGE_EXTERN' * EXPORTING ** CHECK_ONLY = ' ' ** CLIENT = SY-MANDT * OBJNR = CAUFVD-OBJNR * USER_STATUS = ETEMP"rework ** SET_INACT = ' ' * EXCEPTIONS * OBJECT_NOT_FOUND = 1 * STATUS_INCONSISTENT = 2 * STATUS_NOT_ALLOWED = 3 * OTHERS = 4.

CO_BT_AFVG_READ_WITH_LOGKEY CALL FUNCTION 'CO_BT_AFVG_READ_WITH_LOGKEY' EXPORTING APLFL = '000000' AUFNR_ACT = CAUFVD-AUFNR * FLG_STAT = ' ' * FLG_WORK = ' ' * STTAG = '000000' * ALSO_SOP = ' ' VORNR = PLPO_T-VORNR IMPORTING AFVGD_EXP = REW_AFVGD * INDEX = * RCR01_EXP = * VBKZ_EXP = EXCEPTIONS NOT_FOUND = 1 OTHERS = 2.

CO_BT_AFVG_READ_WITH_INDEX * CALL FUNCTION 'CO_BT_AFVG_READ_WITH_INDEX' * EXPORTING * INDEX = I * IMPORTING * AFVGD_EXP = REW_AFVGD * EXCEPTIONS * ERROR_READ_AFVG = 1 * OTHERS = 2.

STATUS_CHANGE_EXTERN * CALL FUNCTION 'STATUS_CHANGE_EXTERN' * EXPORTING ** CHECK_ONLY = ' ' ** CLIENT = SY-MANDT * OBJNR = REW_AFVGD-OBJNR * USER_STATUS = ETEMP "rework ** SET_INACT = ' ' * EXCEPTIONS * OBJECT_NOT_FOUND = 1 * STATUS_INCONSISTENT = 2 * STATUS_NOT_ALLOWED = 3 * OTHERS = 4.

STATUS_READ CALL FUNCTION 'STATUS_READ' EXPORTING * CLIENT = SY-MANDT OBJNR = P_OBJNR * ONLY_ACTIVE = ' ' * IMPORTING * OBTYP = * STSMA = * STONR = TABLES STATUS = STATUS_TAB EXCEPTIONS OBJECT_NOT_FOUND = 1 OTHERS = 2 .

STATUS_CHANGE_INTERN CALL FUNCTION 'STATUS_CHANGE_INTERN' EXPORTING OBJNR = P_OBJNR TABLES STATUS = STATUS_TAB EXCEPTIONS OBJECT_NOT_FOUND = 1 STATUS_INCONSISTENT = 2 STATUS_NOT_ALLOWED = 3 OTHERS = 4.



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 /SAPHT/MESREWLOOP or its description.