Code: Alles auswählen.
REPORT Z_CALL_MIGO.
PARAMETERS P_EBELN LIKE EKKO-EBELN.
PARAMETERS P_WERKS LIKE EKPO-WERKS.
SET PARAMETER ID 'BES' FIELD P_EBELN.
SET PARAMETER ID 'WRK' FIELD P_WERKS.
P_WERKS = '1000'.
SUBMIT mb_call_migo_dialog
WITH i_action = 'A01'
WITH i_refdoc = 'R01'
WITH i_notree = 'X'
WITH i_skip_f = 'X'
WITH i_deaden = 'X'
WITH i_okcode = 'OK_GO'
WITH i_new_ro = 'X'
WITH i_ebeln = P_EBELN
AND RETURN.
Code: Alles auswählen.
*&---------------------------------------------------------------------*
*& Report Z_CALL_MIGO_GR
*&
*&---------------------------------------------------------------------*
*& Start MIGO WE + Bestellung + Werk
*&
*&---------------------------------------------------------------------*
REPORT z_call_migo_gr.
PARAMETERS p_ebeln LIKE ekko-ebeln.
CALL FUNCTION 'Z_MIGO_GR_START'
EXPORTING
bestnr = p_ebeln.
* WERKS = '1000' Default
FUNCTION z_migo_gr_start.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*" IMPORTING
*" REFERENCE(BESTNR) TYPE EBELN
*" REFERENCE(WERKS) TYPE WERKS_D DEFAULT '1000'
*"----------------------------------------------------------------------
DATA: BEGIN OF itab OCCURS 0.
INCLUDE STRUCTURE bdcmsgcoll.
DATA: END OF itab.
CLEAR bdcdata.
REFRESH bdcdata.
CLEAR itab.
REFRESH itab.
* Setze Options
DATA opt TYPE ctu_params.
*-----------------------
* Migo Starten
*-----------------------
* Aktion
PERFORM new_dynpro USING 'SAPLMIGO' '0001'. " Einstieg
PERFORM setzen USING 'BDC_OKCODE' '=MIGO_OK_ACTION'.
PERFORM setzen USING 'BDC_CURSOR' 'GODYNPRO-ACTION'.
PERFORM setzen USING 'GODYNPRO-ACTION' 'A01'. " Wareneingang
* Referenzdokument
PERFORM new_dynpro USING 'SAPLMIGO' '0001'. " Einstieg
PERFORM setzen USING 'BDC_OKCODE' '=MIGO_OK_REFDOC'.
PERFORM setzen USING 'BDC_CURSOR' 'GODYNPRO-REFDOC'.
PERFORM setzen USING 'GODYNPRO-REFDOC' 'R01'. " Bestellung
* Bestellnummer
PERFORM new_dynpro USING 'SAPLMIGO' '0001'. " Einstieg
PERFORM setzen USING 'BDC_OKCODE' '=OK_GO'.
PERFORM setzen USING 'BDC_CURSOR' 'GODYNPRO-PO_NUMBER'.
PERFORM setzen USING 'GODYNPRO-PO_NUMBER' bestnr.
PERFORM setzen USING 'GODYNPRO-PO_WERKS' werks.
opt-dismode = 'E'.
opt-defsize = ' '.
opt-updmode = 'S'.
opt-racommit = 'X'.
opt-nobinpt = 'X'.
opt-nobiend = 'X'.
CALL TRANSACTION 'MIGO' USING bdcdata " MIGO Muss wegen Fehlteilmonitor (MIGO_GR geht nicht)!
OPTIONS FROM opt
MESSAGES INTO itab.
ENDFUNCTION.