OVV1 Document flow, deliveries
You cannot always branch to the program for the copying requirement from the detail view of OVV1.
When a customer-defined copying requirement is involved, the wrong program is accessed.
Also see note nos. 22651 and 22661.
Customer-defined and SAP standard copying requirements defined using transaction VOFM are divided into different name ranges.
SolutionProgram MSTTVCPL :
*----------------------------------------------------------------------*
DATA: BEGIN OF HT_WA.
INCLUDE STRUCTURE LV07B.
DATA: END OF HT_WA.
*---------------------------------------------------------------------*
DATA: ST_GRNR(3) TYPE N VALUE 599. <<<<<<<< Change
*eject
.........
*---------------------------------------------------------------------*
* FORM INCLUDES_BEARBEITEN *
*---------------------------------------------------------------------*
FORM INCLUDES_BEARBEITEN.
CASE CURSOR-FELD.
* Aufruf der ABAP-Routine von einem Nummernfeld aus
WHEN 'TVCPL-AUBED'.
CHECK NOT TVCPL-AUBED IS INITIAL.
IF TVCPL-AUBED > ST_GRNR. <<<<<<< Change
INCLUDE_NAME-POOL = 'RV50B'. <<<<<<< Change
ELSE. <<<<<<< Change
INCLUDE_NAME-POOL = 'FV50B'. <<<<<<< Change
ENDIF. <<<<<<< Change
INCLUDE_NAME-NUMMER = TVCPL-AUBED.
INCLUDE_FORM-NAME = 'FORM BEDINGUNG_PRUEFEN_'.
INCLUDE_FORM-NUMMER = TVCPL-AUBED.
WHEN 'TVCPL-AUZUS'.
CHECK NOT TVCPL-AUZUS IS INITIAL.
IF TVCPL-AUZUS > ST_GRNR. <<<<<<< Change
INCLUDE_NAME-POOL = 'RV50B'. <<<<<<< Change
ELSE. <<<<<<< Change
INCLUDE_NAME-POOL = 'FV50B'. <<<<<<< Change
ENDIF. <<<<<<< Change
INCLUDE_NAME-NUMMER = TVCPL-AUZUS.
INCLUDE_FORM-NAME = 'FORM BEDINGUNG_PRUEFEN_'.
INCLUDE_FORM-NUMMER = TVCPL-AUZUS.
WHEN 'TVCPL-ETBED'.
CHECK NOT TVCPL-ETBED IS INITIAL.
IF TVCPL-ETBED > ST_GRNR. <<<<<<< Change
INCLUDE_NAME-POOL = 'RV50B'. <<<<<<< Change
ELSE. <<<<<<< Change
INCLUDE_NAME-POOL = 'FV50B'. <<<<<<< Change
ENDIF. <<<<<<< Change
INCLUDE_NAME-NUMMER = TVCPL-ETBED.
INCLUDE_FORM-NAME = 'FORM BEDINGUNG_PRUEFEN_'.
INCLUDE_FORM-NUMMER = TVCPL-ETBED.
WHEN 'TVCPL-GRUAK'.
CHECK NOT TVCPL-GRUAK IS INITIAL.
IF TVCPL-GRUAK > ST_GRNR. <<<<<<< Change
INCLUDE_NAME-POOL = 'RV50C'. <<<<<<< Change
ELSE. <<<<<<< Change
INCLUDE_NAME-POOL = 'FV50C'. <<<<<<< Change
ENDIF. <<<<<<< Change
INCLUDE_NAME-NUMMER = TVCPL-GRUAK.
INCLUDE_FORM-NAME = 'FORM DATEN_KOPIEREN_'.
INCLUDE_FORM-NUMMER = TVCPL-GRUAK.
WHEN 'TVCPL-GRUAP'.
CHECK NOT TVCPL-GRUAP IS INITIAL.
IF TVCPL-GRUAP > ST_GRNR. <<<<<<< Change
INCLUDE_NAME-POOL = 'RV50C'. <<<<<<< Change
ELSE. <<<<<<< Change
INCLUDE_NAME-POOL = 'FV50C'. <<<<<<< Change
ENDIF. <<<<<<< Change
INCLUDE_NAME-NUMMER = TVCPL-GRUAP.
INCLUDE_FORM-NAME = 'FORM DATEN_KOPIEREN_'.
INCLUDE_FORM-NUMMER = TVCPL-GRUAP.
WHEN 'TVCPL-GRUKD'.
CHECK NOT TVCPL-GRUKD IS INITIAL.
IF TVCPL-GRUKD > ST_GRNR. <<<<<<< Change
INCLUDE_NAME-POOL = 'RV50C'. <<<<<<< Change
ELSE. <<<<<<< Change
INCLUDE_NAME-POOL = 'FV50C'. <<<<<<< Change
ENDIF. <<<<<<< Change
INCLUDE_NAME-NUMMER = TVCPL-GRUKD.
INCLUDE_FORM-NAME = 'FORM DATEN_KOPIEREN_'.
INCLUDE_FORM-NUMMER = TVCPL-GRUKD.
WHEN 'TVCPL-GRUPA'.
CHECK NOT TVCPL-GRUPA IS INITIAL.
IF TVCPL-GRUPA > ST_GRNR. <<<<<<< Change
INCLUDE_NAME-POOL = 'RV50C'. <<<<<<< Change
ELSE. <<<<<<< Change
INCLUDE_NAME-POOL = 'FV50C'. <<<<<<< Change
ENDIF. <<<<<<< Change
INCLUDE_NAME-NUMMER = TVCPL-GRUPA.
INCLUDE_FORM-NAME = 'FORM DATEN_KOPIEREN_'.
INCLUDE_FORM-NUMMER = TVCPL-GRUPA.
* Aufruf der ABAP-Routine von einem Textfeld aus
WHEN 'WTEXT-BEDI1'.
CHECK NOT TVCPL-AUBED IS INITIAL.
IF TVCPL-AUBED > ST_GRNR. <<<<<<< Change
INCLUDE_NAME-POOL = 'RV50B'. <<<<<<< Change
ELSE. <<<<<<< Change
INCLUDE_NAME-POOL = 'FV50B'. <<<<<<< Change
ENDIF. <<<<<<< Change
INCLUDE_NAME-NUMMER = TVCPL-AUBED.
INCLUDE_FORM-NAME = 'FORM BEDINGUNG_PRUEFEN_'.
INCLUDE_FORM-NUMMER = TVCPL-AUBED.
WHEN 'WTEXT-BEDI2'.
CHECK NOT TVCPL-AUZUS IS INITIAL.
IF TVCPL-AUZUS > ST_GRNR. <<<<<<< Change
INCLUDE_NAME-POOL = 'RV50B'. <<<<<<< Change
ELSE. <<<<<<< Change
INCLUDE_NAME-POOL = 'FV50B'. <<<<<<< Change
ENDIF. <<<<<<< Change
INCLUDE_NAME-NUMMER = TVCPL-AUZUS.
INCLUDE_FORM-NAME = 'FORM BEDINGUNG_PRUEFEN_'.
INCLUDE_FORM-NUMMER = TVCPL-AUZUS.
WHEN 'WTEXT-BEDI3'.
CHECK NOT TVCPL-ETBED IS INITIAL.
IF TVCPL-ETBED > ST_GRNR. <<<<<<< Change
INCLUDE_NAME-POOL = 'RV50B'. <<<<<<< Change
ELSE. <<<<<<< Change
INCLUDE_NAME-POOL = 'FV50B'. <<<<<<< Change
ENDIF. <<<<<<< Change
INCLUDE_NAME-NUMMER = TVCPL-ETBED.
INCLUDE_FORM-NAME = 'FORM BEDINGUNG_PRUEFEN_'.
INCLUDE_FORM-NUMMER = TVCPL-ETBED.
WHEN 'WTEXT-VBAK'.
CHECK NOT TVCPL-GRUAK IS INITIAL.
IF TVCPL-GRUAK > ST_GRNR. <<<<<<< Change
INCLUDE_NAME-POOL = 'RV50C'. <<<<<<< Change
ELSE. <<<<<<< Change
INCLUDE_NAME-POOL = 'FV50C'. <<<<<<< Change
ENDIF. <<<<<<< Change
INCLUDE_NAME-NUMMER = TVCPL-GRUAK.
INCLUDE_FORM-NAME = 'FORM DATEN_KOPIEREN_'.
INCLUDE_FORM-NUMMER = TVCPL-GRUAK.
WHEN 'WTEXT-VBAP'.
CHECK NOT TVCPL-GRUAP IS INITIAL.
IF TVCPL-GRUAP > ST_GRNR. <<<<<<< Change
INCLUDE_NAME-POOL = 'RV50C'. <<<<<<< Change
ELSE. <<<<<<< Change
INCLUDE_NAME-POOL = 'FV50C'. <<<<<<< Change
ENDIF. <<<<<<< Change
INCLUDE_NAME-NUMMER = TVCPL-GRUAP.
INCLUDE_FORM-NAME = 'FORM DATEN_KOPIEREN_'.
INCLUDE_FORM-NUMMER = TVCPL-GRUAP.
WHEN 'WTEXT-VBKD'.
CHECK NOT TVCPL-GRUKD IS INITIAL.
IF TVCPL-GRUKD > ST_GRNR. <<<<<<< Change
INCLUDE_NAME-POOL = 'RV50C'. <<<<<<< Change
ELSE. <<<<<<< Change
INCLUDE_NAME-POOL = 'FV50C'. <<<<<<< Change
ENDIF. <<<<<<< Change
* INCLUDE_NAME-POOL = 'FV50C'.
INCLUDE_NAME-NUMMER = TVCPL-GRUKD.
INCLUDE_FORM-NAME = 'FORM DATEN_KOPIEREN_'.
INCLUDE_FORM-NUMMER = TVCPL-GRUKD.
WHEN 'WTEXT-VBPA'.
CHECK NOT TVCPL-GRUPA IS INITIAL.
IF TVCPL-GRUPA > ST_GRNR. <<<<<<< Change
INCLUDE_NAME-POOL = 'RV50C'. <<<<<<< Change
ELSE. <<<<<<< Change
INCLUDE_NAME-POOL = 'FV50C'. <<<<<<< Change
ENDIF. <<<<<<< Change
* INCLUDE_NAME-POOL = 'FV50C'.
INCLUDE_NAME-NUMMER = TVCPL-GRUPA.
INCLUDE_FORM-NAME = 'FORM DATEN_KOPIEREN_'.
INCLUDE_FORM-NUMMER = TVCPL-GRUPA.
WHEN OTHERS.
EXIT.
No comments:
Post a Comment