SAP Reports / Programs

MIGRATE_SAS SAP ABAP Report - Migration of Scheduling Agreements







MIGRATE_SAS is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). It is used for Purchasing Scheduling Agreement Migration Tool ..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 MIGRATE_SAS 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 MIGRATE_SAS. "Basic submit
SUBMIT MIGRATE_SAS AND RETURN. "Return to original report after report execution complete
SUBMIT MIGRATE_SAS 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: LOGSYS = D Logical System
Selection Text: PTEST = Test Run
Selection Text: SEBELN = D Purchasing Document
Selection Text: SEBELP = D Item
Selection Text: SLIFNR = D Vendor
Selection Text: SMATNR = D Material
Selection Text: SWERKS = D Plant
Selection Text: SMRPTYPE = D .
Title: Migration of Scheduling Agreements
Text Symbol: 001 = Migration Log


INCLUDES used within this REPORT MIGRATE_SAS

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:

MESSAGES_INITIALIZE CALL FUNCTION 'MESSAGES_INITIALIZE'.

MARC_SINGLE_READ CALL FUNCTION 'MARC_SINGLE_READ' EXPORTING * KZRFB = ' ' * MAXTZ = 0 matnr = int_cifsrcoa-matnr werks = int_cifsrcoa-werks * SPERRMODUS = ' ' * STD_SPERRMODUS = ' ' IMPORTING wmarc = w_marc * O_MARC = EXCEPTIONS lock_on_marc = 1 lock_system_error = 2 wrong_call = 3 not_found = 4 OTHERS = 5.

ENQUEUE_EMEKPOE CALL FUNCTION 'ENQUEUE_EMEKPOE' EXPORTING ebeln = int_cifsrcoa-ebeln ebelp = int_cifsrcoa-ebelp EXCEPTIONS foreign_lock = 2 system_failure = 3.

RV_MESSAGES_UPDATE CALL FUNCTION 'RV_MESSAGES_UPDATE' EXPORTING msg_kappl = 'EL' msg_no_update_task = 'X' msg_objky = xobjky.

SWE_REQUESTER_TO_UPDATE CALL FUNCTION 'SWE_REQUESTER_TO_UPDATE'.

CHANGEDOCUMENT_OPEN CALL FUNCTION 'CHANGEDOCUMENT_OPEN' EXPORTING objectclass = 'EINKBELEG ' objectid = id planned_change_number = ' ' planned_or_real_changes = ' ' EXCEPTIONS sequence_invalid = 1 OTHERS = 2.

CHANGEDOCUMENT_MULTIPLE_CASE CALL FUNCTION 'CHANGEDOCUMENT_MULTIPLE_CASE' EXPORTING tablename = 'EKPO ' reftablename = 'WEKPO ' change_indicator = 'U' docu_delete = ' ' TABLES table_old = old_ekpo table_new = new_ekpo EXCEPTIONS nametab_error = 1 open_missing = 2 position_insert_failed = 3 OTHERS = 4.

CHANGEDOCUMENT_CLOSE CALL FUNCTION 'CHANGEDOCUMENT_CLOSE' EXPORTING objectclass = 'EINKBELEG ' objectid = id date_of_change = sy-datum time_of_change = sy-uzeit tcode = sy-tcode username = sy-uname object_change_indicator = 'U' EXCEPTIONS header_insert_failed = 1 object_invalid = 2 open_missing = 3 no_position_inserted = 4 OTHERS = 5.

DEQUEUE_EMEKPOE CALL FUNCTION 'DEQUEUE_EMEKPOE' EXPORTING ebeln = int_cifsrcoa-ebeln ebelp = int_cifsrcoa-ebelp.

MESSAGE_STORE CALL FUNCTION 'MESSAGE_STORE' EXPORTING arbgb = 'XC' msgty = 'W' msgv1 = int_cifsrcoa-ebeln msgv2 = int_cifsrcoa-ebelp txtnr = '802'.

MESSAGE_STORE CALL FUNCTION 'MESSAGE_STORE' EXPORTING arbgb = 'XC' msgty = 'E' msgv1 = 'B' msgv2 = 'LMIG' txtnr = '803'.

MESSAGE_STORE CALL FUNCTION 'MESSAGE_STORE' EXPORTING arbgb = 'XC' msgty = 'I' txtnr = '804'.

MESSAGE_STORE CALL FUNCTION 'MESSAGE_STORE' EXPORTING arbgb = 'XC' msgty = 'I' msgv1 = ok txtnr = '805'.

MESSAGE_STORE CALL FUNCTION 'MESSAGE_STORE' EXPORTING arbgb = 'XC' msgty = msgty msgv1 = nok txtnr = '806'.

MESSAGES_SHOW CALL FUNCTION 'MESSAGES_SHOW' EXPORTING object = text-001 show_linno = space batch_list_type = 'B' EXCEPTIONS OTHERS = 1.

RV_MESSAGES_INSERT CALL FUNCTION 'RV_MESSAGES_INSERT' TABLES tab_xnast = xnast.

MESSAGE_STORE CALL FUNCTION 'MESSAGE_STORE' EXPORTING arbgb = 'XC' msgty = 'I' msgv1 = int_cifsrcoa-ebeln msgv2 = int_cifsrcoa-ebelp txtnr = '801'.



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