SAP Reports / Programs

R_SACOPY SAP ABAP Report - Copying SD Scheduling Agreements







R_SACOPY 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 R_SACOPY 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

SACO - Analyze and Copy Scheduling Agreemen


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 R_SACOPY. "Basic submit
SUBMIT R_SACOPY AND RETURN. "Return to original report after report execution complete
SUBMIT R_SACOPY 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: GP_ABGRN = D .
Selection Text: GP_ABGRU = D .
Selection Text: GP_CNDOC = D .
Selection Text: GP_DIST = D .
Selection Text: GP_MIN = D .
Selection Text: GP_MIN_A = D .
Selection Text: GP_NOCCI = D .
Selection Text: GP_TRUN = D .
Selection Text: GP_VARH = Layout Variant Header
Selection Text: GP_VARI = Layout Variant Item
Selection Text: GR_KDMAT = D .
Selection Text: GR_MATNR = D .
Selection Text: GX_AUART = D .
Selection Text: GX_BSTNK = D .
Selection Text: GX_ERDAT = D .
Selection Text: GX_ERNAM = D .
Selection Text: GX_KUNNR = D .
Selection Text: GX_SPART = D .
Selection Text: GX_VBELN = D .
Selection Text: GX_VKBUR = D .
Selection Text: GX_VKGRP = D .
Selection Text: GX_VKORG = D .
Selection Text: GX_VTWEG = D .
Title: Copying SD Scheduling Agreements
Text Symbol: 002 = Document Flow Size
Text Symbol: 003 = Processing Mode and Parameters
Text Symbol: 007 = Organizational Data
Text Symbol: 008 = Document Data
Text Symbol: 009 = Business Data
Text Symbol: 011 = List Variants
Text Symbol: 012 = Copy process started. When finished check the application log:
Text Symbol: 013 = List writing to the application log has finished:
Text Symbol: 030 = No. of follow-on delivery documents of a single item (at least)
Text Symbol: 031 = No. of follow-on delivery documents of all items (at least)
Text Symbol: 032 = Run in Background
Text Symbol: 033 = Test Run Mode
Text Symbol: 034 = Maximum number of documents to be processed
Text Symbol: 040 = Application Log





Text Symbol: 041 = Call application log
Text Symbol: BCK = Do you want to continue the dialog processing?
Text Symbol: BNO = No, go back to the initial screen
Text Symbol: CRD = Maximum no. of documents is exceeded
Text Symbol: HTI = Scheduling Agreement Header
Text Symbol: ITI = Scheduling Agreement Item
Text Symbol: NOA = You are not authorized to display the document type you selected
Text Symbol: NRC = Does not exceed document flow limit
Text Symbol: RFC = Exceeds document flow limit


INCLUDES used within this REPORT R_SACOPY

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:

MGV_SELOP_AFTER_INITIALIZATION call function 'MGV_SELOP_AFTER_INITIALIZATION' EXPORTING PROGRAM = mgv_matnr_prog TABLES SELOP = mgv_matnr_selopt_tab EXCEPTIONS NO_PROGRAMNAME = 1 OTHERS = 2 .

MGV_SELOP_AFTER_START_OF_SEL CALL FUNCTION 'MGV_SELOP_AFTER_START_OF_SEL' EXPORTING SELOPT_NAME = mgv_matnr_selopt_tab-name TABLES RANGE = .

SACO_RESULT_T_2LOG CALL FUNCTION 'SACO_RESULT_T_2LOG' EXPORTING it_result = gt_result iv_log_extnumber = gv_log_extnumber iv_nothing2proc = 'X'.

SACO_RESULT_T_2LOG CALL FUNCTION 'SACO_RESULT_T_2LOG' EXPORTING * IT_RESULT = iv_log_extnumber = gv_log_extnumber iv_nothing2proc = 'X'.

SACO_FRMWRK_COPY CALL FUNCTION 'SACO_FRMWRK_COPY' IN BACKGROUND TASK EXPORTING it_vbeln = gt_vbeln_out iv_abgru_old = gp_abgru iv_abgru_new = gp_abgrn iv_log_extnumber = gv_log_extnumber iv_check_timestamp = gv_check_timestamp iv_modus = gp_mod it_vbtyp = gr_ec_vbtyp it_vbklt = gr_ec_vbklt it_abdis = gr_ec_abdis iv_nocci = gp_nocci iv_split = gp_dist it_result = gt_result.

SACO_FRMWRK_COPY CALL FUNCTION 'SACO_FRMWRK_COPY' EXPORTING it_vbeln = gt_vbeln_out iv_abgru_old = gp_abgru iv_abgru_new = gp_abgrn iv_log_extnumber = gv_log_extnumber iv_check_timestamp = gv_check_timestamp iv_modus = gp_mod it_vbtyp = gr_ec_vbtyp it_vbklt = gr_ec_vbklt it_abdis = gr_ec_abdis iv_nocci = gp_nocci iv_split = gp_dist it_result = gt_result.

SACO_ERROR_T_2LOG CALL FUNCTION 'SACO_ERROR_T_2LOG' EXPORTING it_error = gt_error iv_log_extnumber = gv_log_extnumber.

SACO_CHECK_DOC_TYPE CALL FUNCTION 'SACO_CHECK_DOC_TYPE' EXPORTING it_vbeln = gr_vbeln it_erdat = gr_erdat it_bstnk = lt_bstnk it_auart = gt_auart it_ernam = gr_ernam it_vkorg = gr_vkorg it_vtweg = gr_vtweg it_spart = gr_spart it_vkgrp = gr_vkgrp it_vkbur = gr_vkbur it_kunnr = gr_kunnr it_vbtyp = gr_ec_vbtyp it_vbklt = gr_ec_vbklt it_abdis = gr_ec_abdis CHANGING ct_sa_error = gt_error.

POPUP_TO_CONFIRM CALL FUNCTION 'POPUP_TO_CONFIRM' EXPORTING titlebar = text-crd diagnose_object = gc_critdoc_popup text_question = text-bck text_button_1 = 'Yes' * ICON_BUTTON_1 = ' ' text_button_2 = 'No' * ICON_BUTTON_2 = ' ' * DEFAULT_BUTTON = '1' display_cancel_button = ' ' * userdefined_f1_help = ' ' * START_COLUMN = 25 * START_ROW = 6 * POPUP_TYPE = iv_quickinfo_button_1 = ' ' iv_quickinfo_button_2 = text-bno IMPORTING answer = lv_answer TABLES parameter = lt_param EXCEPTIONS text_not_found = 1 OTHERS = 2.

SACO_APP_LOG_CREATE CALL FUNCTION 'SACO_APP_LOG_CREATE' EXPORTING i_s_log = ls_log IMPORTING e_log_handle = l_log_handle EXCEPTIONS log_header_inconsistent = 1 OTHERS = 2.

SACO_APP_LOG_WRITE CALL FUNCTION 'SACO_APP_LOG_WRITE' EXPORTING i_log_handle = l_log_handle * i_s_msg = ls_msg * IMPORTING * E_S_MSG_HANDLE = * E_MSG_WAS_LOGGED = * E_MSG_WAS_DISPLAYED = CHANGING c_s_msg = ls_msg EXCEPTIONS log_not_found = 1 msg_inconsistent = 2 log_is_full = 3 OTHERS = 4.

BAL_DB_SAVE CALL FUNCTION 'BAL_DB_SAVE' EXPORTING * I_CLIENT = SY-MANDT * I_IN_UPDATE_TASK = ' ' * i_save_all = 'X' i_t_log_handle = lt_log_handle * IMPORTING * E_NEW_LOGNUMBERS = EXCEPTIONS log_not_found = 1 save_not_allowed = 2 numbering_error = 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 R_SACOPY or its description.