You are on page 1of 44

FI-GL Technical Specifications - Interface XCNEC01E y

XCFEC04E
Technical Specification (Architectural design of the
solution)

Technical Specifications

490031247.docx

Edited by Fco. Javier Gómez Jiménez 08/09/2020

Verified by dd/mm/aaaa
Enter the name and role of the verifier of the document.
Enter the name and role of the approval of the document. , Ester
Approved by dd/mm/aaaa
Serena Local Process Owner

REPRODUCTION FORBIDDEN Internal Use


Template Document Code Version and Date File ID Total Pages
SGI-MTC-03C-EN_01 0000-XX00 Version, 1.0./Borrador 490031247.docx 1
dd/mm/aaaa
Information and Communication Technology
Unit / Unit

Distribution List

Name Reference
S. Poli Global Process Owner
Mireia Viñas Local Process Owner
Oriol Marcos ICT LocalTeam Leader
E. Caciori Global ICT Team Leader
Jordi Buesa Local ICT Project Manager
José Manuel Bustos Local Business Project Manager
D. Montolio Integration Management Office
Juan Luis Peña Integration Management Office
Alicia Gerbi PMO
F. Molina PMO
C. Castañosa Local Project Manager
Álvaro García Mauleon Global PMO Manager
Álvaro Romero Danés Local PMO
G. Armentani Global RTI Functional Referent
M. Albalate Local RTI Functional Referent
Pedro Lopez Barba Integration Management Office
Juan de Miguel Integration Management Office
Antonio Luis Ramon Integration Management Office
Manuela Marà Global Integration Management Office
The document is sent by mail and is still available on the project repository web site/ FTP.

Changes to the document


The changes in the following table refer to the previous version of the document.

Change Description Reference


First version 22/04/2016
LPO review 25/04/2016
CR-24 - Devolución de Fianzas (apartado 2.2.4) 06/05/2017
Gradual Endesa Distribución (apartado 2.2.5) 16/06/2017

References
[1] E4E_A_EN_GL_BBP analysis and functional specification_V0.11.docx

Inde

REPRODUCTION FORBIDDEN Internal Use


Template Document Code Version and Date File ID Total Pages
SGI-MTC-03C-EN_01 0000-XX00 Version, 1.0./Borrador 490031247.docx 44
dd/mm/aaaa
Information and Communication Technology
Unit / Unit

1. Introduction...........................................................................................................4
1.1. Reference Context.........................................................................................................4
1.2. Summary of the intervection...........................................................................................4

2. General system arquitecture...............................................................................5


2.1.1. Solution architecture diagram......................................................................................5
2.1.2. Arquitecture AS-IS.......................................................................................................5
2.1.3. Arquitecture <TO-BE>.................................................................................................5

3. Application Arquitecture......................................................................................6
3.1.1. Objetos........................................................................................................................ 6
3.1.1.1. Tablas........................................................................................................................ 6
3.1.1.2. Estructuras................................................................................................................ 6
3.1.1.3. Proceso Job..............................................................................................................6
3.1.1.4. Interfaces...................................................................................................................6
3.1.1.5. Reports...................................................................................................................... 6

4. Integration flows.................................................................................................41

5. Persistence of information.................................................................................42

6. Controls................................................................................................................43
6.1. Security Control........................................................................................................... 43
6.2. Control Mechanisms....................................................................................................43
6.3. Error Management.......................................................................................................43
6.4. Mechanism for information management.....................................................................43

Appendix.........................................................................................................................44
A. Definitions, acronyms, abbreviations............................................................................44

Index of figures and tables...........................................................................................44


B. Figures......................................................................................................................... 44
C. Tables.......................................................................................................................... 44

REPRODUCTION FORBIDDEN Internal Use


Template Document Code Version and Date File ID Total Pages
SGI-MTC-03C-EN_01 0000-XX00 Version, 1.0./Borrador 490031247.docx 44
dd/mm/aaaa
Information and Communication Technology
Unit / Unit

1. Introduction
The aim of this document is to describe the technical specification to implement the developments
required in the E4E GEN Project for all the processes involved in it.

1.1. Reference Context

Interface XCNEC01E - Facturación No Energía a terceros no grupo

1.2. Summary of the intervection

El presente documento detalla:

Diseño técnico para el desarrollo del procedimiento definido para la correcta contabilización de los
conceptos contables al poder venir a partir de ahora simultáneamente el campo orden (zc015-
aufnr) y el campo proyecto (zc015-projk) con el valor &ORDEN* ó &CECOE*.

Esto ha afectado tanto a los programas de control (ZWCIF110 y ZWCIF530), que genera el fichero
a contabilizar, por programa ZWCIF990,

REPRODUCTION FORBIDDEN Internal Use


Template Document Code Version and Date File ID Total Pages
SGI-MTC-03C-EN_01 0000-XX00 Version, 1.0./Borrador 490031247.docx 44
dd/mm/aaaa
Information and Communication Technology
Unit / Unit

2. General system arquitecture


2.1.1. Solution architecture diagram
N.A.

2.1.2. Arquitecture AS-IS


N.A.

2.1.3. Arquitecture <TO-BE>


N.A

REPRODUCTION FORBIDDEN Internal Use


Template Document Code Version and Date File ID Total Pages
SGI-MTC-03C-EN_01 0000-XX00 Version, 1.0./Borrador 490031247.docx 44
dd/mm/aaaa
Information and Communication Technology
Unit / Unit

3. Application Arquitecture

3.1.1. Objetos.
N.A.

3.1.1.1. Tablas.
N.A.

3.1.1.2. Estructuras.

N.A.

3.1.1.3. Proceso Job

 Job: EX0000CIK.

o Lanzará los Programas: ZWCIF110 y ZWCIF990

 Job: EX0000CI3.

o Lanzará los Programas: ZWCIF530 y ZWCIF990

3.1.1.4. Interfaces.
Sistema
ID Descripción Sistema Destino
Origen
XCNEC01E Contabilización de facturación de No Energía SCE SAP R/3 SIE2000 (GEP)

Sistema
ID Descripción Sistema Destino
Origen
XCFEC04E Contabilización de facturación Holding SCE SAP R/3 SIE2000 (GEP)

3.1.1.5. Reports.

 Report: XCNEC01E - Entrada de datos SIE. Interfase comercial de facturación de


no energía.

o Modificación: 26.07.2017 - Tratamiento Conceptos simultáneos &CECOE y


&ORDEN sin informar

REPRODUCTION FORBIDDEN Internal Use


Template Document Code Version and Date File ID Total Pages
SGI-MTC-03C-EN_01 0000-XX00 Version, 1.0./Borrador 490031247.docx 44
dd/mm/aaaa
Information and Communication Technology
Unit / Unit

Programa Principal
. . . . . . .
. . . . . . .
* 20170626 - JGJ - INI - &ORDEN* o &CECOE* "/" si viene vacío.
LOOP AT t_esquema2.
PERFORM f_change_concep USING 'REG-ORDEN'.
PERFORM f_change_concep USING 'REG-CECOE'.
ENDLOOP.
* 20170626 - JGJ - FIN - &ORDEN* o &CECOE* "/" si viene vacío.
. . . . . . .
. . . . . . .

CLEAR fichero_fi.
MOVE-CORRESPONDING t_esquema2 TO fichero_fi.
* 20180703 - JGJ - INI - &ORDEN* o &CECOE* "/" si viene vacío, eliminar
constante.
IF t_esquema2-camvlr = 'NO_COD_EXT'.
CLEAR fichero_fi-camvlr.
ENDIF.
* 20180703 - JGJ - FIN - &ORDEN* o &CECOE* "/" si viene vacío.
MOVE reg-group TO fichero_fi-fgroup.
MOVE reg-codint TO fichero_fi-codint.
MOVE reg-ident TO fichero_fi-ident.
TRANSFER fichero_fi TO f_salida.

Subrutinas.
*&---------------------------------------------------------------------*
*& Form F_CHANGE_CONCEP
*----------------------------------------------------------------------*
* -->P_3878 text
*----------------------------------------------------------------------*
FORM f_change_concep USING VALUE(p_3878).

* 20180703 - JGJ - INI - &ORDEN* o &CECOE* "/" si viene vacío.


* READ TABLE t_esquema2 WITH KEY camnom = p_3878.
* IF sy-subrc EQ 0.
IF t_esquema2-camnom(9) EQ p_3878.
IF t_esquema2-camvlr IS INITIAL OR t_esquema2-camvlr = 'NO_COD_EXT'.
* 20180703 - JGJ - FIN - &ORDEN* o &CECOE* "/" si viene vacío.
IF t_esquema2-concep NE '/'.
MOVE '/' TO t_esquema2-concep.
MODIFY t_esquema2 INDEX sy-tabix TRANSPORTING concep .
ENDIF.
ELSE.
IF t_esquema2-concep EQ '/'.
*No movemos el blanco, falla
ENDIF.
ENDIF.
ENDIF.

ENDFORM.

REPRODUCTION FORBIDDEN Internal Use


Template Document Code Version and Date File ID Total Pages
SGI-MTC-03C-EN_01 0000-XX00 Version, 1.0./Borrador 490031247.docx 44
dd/mm/aaaa
Information and Communication Technology
Unit / Unit

 Report: XCFEC04E - Validación Interfases de Facturación a clientes


correspondientes al Holding Endesa.
o Modificación: 26.07.2017 - Tratamiento Conceptos simultáneos &CECOE y
&ORDEN sin informar

Declaración de variables.
. . . . . . . . . .
. . . . . . . . . .
** 20170706 - JGJ - INI - CECOE y ORDEN SIMULTANEOS
* ceco(10),
** 20170706 - JGJ - INI - CECOE y ORDEN SIMULTANEOS
. . . . . . . . . . .
. . . . . . . . . . .
* 20170705 - JGJ - INI - &ORDEN* o &CECOE* AMPLIAR LOGICA SI AMBOS
cecoe TYPE zkostlposid, " - Centro de coste
cecoe1 TYPE zkostlposid, "csks-kostl,
cecoe2 TYPE zkostlposid, "csks-kostl,
cecoe3 TYPE zkostlposid, "csks-kostl,
cecoe4 TYPE zkostlposid, "csks-kostl,
cecoe5 TYPE zkostlposid, "csks-kostl,
cecoe6 TYPE zkostlposid, "csks-kostl,
cecoe7 TYPE zkostlposid, "csks-kostl,
cecoe8 TYPE zkostlposid, "csks-kostl,
cecoe9 TYPE zkostlposid, "csks-kostl,
cecoe10 TYPE zkostlposid, "csks-kostl,
cecoe11 TYPE zkostlposid, "csks-kostl,
cecoe12 TYPE zkostlposid, "csks-kostl,
cecoe13 TYPE zkostlposid, "csks-kostl,
cecoe14 TYPE zkostlposid, "csks-kostl,
cecoe15 TYPE zkostlposid, "csks-kostl,
cecoe16 TYPE zkostlposid, "csks-kostl,
cecoe17 TYPE zkostlposid, "csks-kostl,
* cecoe(24), "(10), " - Centro de coste
* cecoe1(24), "(10),
* cecoe2(24), "(10),
* cecoe3(24), "(10), " - Centro de coste de Orden
3
* cecoe4(24), "(10),
* cecoe5(24), "(10),
* cecoe6(24), "(10),
* cecoe7(24), "(10),
* cecoe8(24), "(10),
* 20170705 - JGJ - FIN - &ORDEN* o &CECOE* AMPLIAR LOGICA SI AMBOS

. . . . . . . . .
. . . . . . . . .

* 20170705 - JGJ - INI - &ORDEN* o &CECOE* AMPLIAR LOGICA SI AMBOS


REPRODUCTION FORBIDDEN Internal Use
Template Document Code Version and Date File ID Total Pages
SGI-MTC-03C-EN_01 0000-XX00 Version, 1.0./Borrador 490031247.docx 44
dd/mm/aaaa
Information and Communication Technology
Unit / Unit

DATA: orden13(12), " - Decimotercera orden de imputación


orden14(12), " - Decimocuarta orden de imputación
orden15(12). " - Decimoquinta orden de imputación
* 20170705 - JGJ - FIN - &ORDEN* o &CECOE* AMPLIAR LOGICA SI AMBOS
. . . . . . . . .
. . . . . . . . .
* 20170705 - JGJ - INI - &ORDEN* o &CECOE* AMPLIAR LOGICA SI AMBOS
DATA: divord13 LIKE aufk-aufnr. " - División de la orden 13
DATA: divord14 LIKE aufk-aufnr. " - División de la orden 14
DATA: divord15 LIKE aufk-aufnr. " - División de la orden 15
* 20170705 - JGJ - FIN - &ORDEN* o &CECOE* AMPLIAR LOGICA SI AMBOS

. . . . . . . . .
. . . . . . . . .

* 20170705 - JGJ - INI - &ORDEN* o &CECOE* AMPLIAR LOGICA SI AMBOS


DATA: divcec9 LIKE aufk-aufnr. " - División del centro de coste
DATA: divcec10 LIKE aufk-aufnr. " - División del centro de coste
DATA: divcec11 LIKE aufk-aufnr. " - División del centro de coste
DATA: divcec12 LIKE aufk-aufnr. " - División del centro de coste
DATA: divcec13 LIKE aufk-aufnr. " - División del centro de coste
DATA: divcec14 LIKE aufk-aufnr. " - División del centro de coste
DATA: divcec15 LIKE aufk-aufnr. " - División del centro de coste
DATA: divcec16 LIKE aufk-aufnr. " - División del centro de coste
DATA: divcec17 LIKE aufk-aufnr. " - División del centro de coste
* 20170705 - JGJ - FIN - &ORDEN* o &CECOE* AMPLIAR LOGICA SI AMBOS

. . . . . . . . .
. . . . . . . . .

Programa Principal.
. . . . . . . . .
. . . . . . . . .
* 20170705 - JGJ - INI - &ORDEN* o &CECOE* AMPLIAR LOGICA SI AMBOS
PERFORM validar_externo2 USING cabec-codint.
* PERFORM validar_externo USING cabec-codint.
* 20170705 - JGJ - FIN - &ORDEN* o &CECOE* AMPLIAR LOGICA SI AMBOS
. . . . . . . . .
. . . . . . . . .
* 20170704 - JGJ - INI - &ORDEN* o &CECOE* "/" si viene vacío.
LOOP AT t_esquema2.
PERFORM f_change_concep USING 'REG-ORDEN'.
PERFORM f_change_concep USING 'REG-CECOE'.
ENDLOOP.
* 20170704 - JGJ - FIN - &ORDEN* o &CECOE* "/" si viene vacío.
. . . . . . . . .
. . . . . . . . .

* 20180704 - JGJ - INI - &ORDEN* o &CECOE* "/" si viene vacío, eliminar


constante.
IF t_esquema2-camvlr = 'NO_COD_EXT'.
CLEAR fichero_fi-camvlr.
ENDIF.
* 20180704 - JGJ - FIN - &ORDEN* o &CECOE* "/" si viene vacío.
. . . . . . . . .
. . . . . . . . .

REPRODUCTION FORBIDDEN Internal Use


Template Document Code Version and Date File ID Total Pages
SGI-MTC-03C-EN_01 0000-XX00 Version, 1.0./Borrador 490031247.docx 44
dd/mm/aaaa
Information and Communication Technology
Unit / Unit

Subrutinas.
*&---------------------------------------------------------------------*
*& Form VALIDAR_EXTERNO2
*&---------------------------------------------------------------------*
*----------------------------------------------------------------------*

FORM validar_externo2 USING f_codigo.


*-----------------------------------*
* 20170705 - JGJ - INI - &ORDEN* o &CECOE* AMPLIAR LOGICA SI AMBOS
DATA: soc LIKE zxcod-bukrs,
codigo LIKE zxcod-zzxfunc,
codigo2 LIKE zxcod-zzxfunc,
codigo3 LIKE zxcod-zzxfunc,
l_codigo LIKE zxcod-zzxfunc,
codigo4 LIKE zxcod-zzxfunc,
codigo5 LIKE zxcod-zzxfunc,
externo LIKE zxcod-zzxexter,
centro LIKE zxcod-zzxsie1,
orden LIKE zxcod-zzxsie2,
f_orden LIKE aufk-aufnr,
orden2 LIKE zxcod-zzxsie2,
orden3 LIKE aufk-aufnr,
orden4 LIKE aufk-aufnr,
orden5 LIKE aufk-aufnr,
orden9 LIKE aufk-aufnr,
orden10 LIKE aufk-aufnr,
orden11 LIKE aufk-aufnr,
orden12 LIKE aufk-aufnr,
orden13 LIKE aufk-aufnr,
orden14 LIKE aufk-aufnr,
orden15 LIKE aufk-aufnr,

f_vsie1 LIKE zxcod-zzxsie1,


f_vsie2 LIKE zxcod-zzxsie2,
f_vsie3 LIKE zxcod-zzxsie3,

cecoe TYPE zkostlposid, "csks-kostl,


cecoe2 TYPE zkostlposid, "csks-kostl,
cecoe3 TYPE zkostlposid, "csks-kostl,
cecoe4 TYPE zkostlposid, "csks-kostl,
cecoe5 TYPE zkostlposid, "csks-kostl,
cecoe1 TYPE zkostlposid, "csks-kostl,
cecoe11 TYPE zkostlposid, "csks-kostl,
cecoe12 TYPE zkostlposid, "csks-kostl,
cecoe13 TYPE zkostlposid, "csks-kostl,
cecoe14 TYPE zkostlposid, "csks-kostl,
cecoe15 TYPE zkostlposid, "csks-kostl,
cecoe16 TYPE zkostlposid, "csks-kostl,
cecoe17 TYPE zkostlposid, "csks-kostl,

l_cecoe9 LIKE zxcod-zzxsie1,


l_cecoe10 LIKE zxcod-zzxsie2,
f_subrc LIKE sy-subrc.

CONSTANTS: lc_504(3) VALUE '504',


lc_no_cod_ext(10) VALUE 'NO_COD_EXT',
lc_xcfec04e(8) VALUE 'XCFEC04E'.

REPRODUCTION FORBIDDEN Internal Use


Template Document Code Version and Date File ID Total Pages
SGI-MTC-03C-EN_01 0000-XX00 Version, 1.0./Borrador 490031247.docx 44
dd/mm/aaaa
Information and Communication Technology
Unit / Unit

*
IF f_c-externo <> space.
CLEAR externo.
soc = f_c-empre.
codigo = f_codigo.
externo = f_c-externo.

* Tratamiento XCFEC04E (CECOE - CECOE1 - CECOE2)


* EL REGISTRO SIEMPRE DEBE EXISTIR y POR TANTO CECOE (SEGUN CODIFICACION)
CALL FUNCTION 'Z_XX_CODIGOS2'
EXPORTING
empr = soc
func = codigo
vextern = externo
* VSIE1 =
* VSIE2 =
* VSIE3 =
fecha_imp = f_c-feccon
IMPORTING
c_cecoe2 = cecoe2
c_cecoe3 = cecoe3
c_cecoe4 = cecoe4
c_cecoe5 = cecoe5
* C_ORDEN2 = ORDEN2
c_orden3 = orden3
c_orden4 = orden4
c_orden5 = orden5
c_orden = f_orden
c_cecoe1 = cecoe1
c_cecoe = cecoe
sy_subrc = f_subrc
EXCEPTIONS
cec5_ord5_iguales = 1
ord5_no_exist = 2
ord5_cerra = 3
cec4_ord4_iguales = 4
ord4_no_exist = 5
ord4_cerra = 6
cec3_ord3_iguales = 7
ord3_no_exist = 8
ord3_cerra = 9
cec2_ord2_iguales = 10
ord2_no_exist = 11
ord2_cerra = 12
cec1_ord_iguales = 13
ord_no_exist = 14
ord_cerra = 15
cec_ord_iguales = 16
no_codigo = 17
OTHERS = 18.
IF f_subrc <> 0.
PERFORM tratamiento_de_error USING '504' ' ' text-026 space.
sy-subrc = 0.
ENDIF.

IF f_c-cecoe = space.
* CECOE/ORDEN (GRAL.)
reg-cecoe = cecoe.
REPRODUCTION FORBIDDEN Internal Use
Template Document Code Version and Date File ID Total Pages
SGI-MTC-03C-EN_01 0000-XX00 Version, 1.0./Borrador 490031247.docx 44
dd/mm/aaaa
Information and Communication Technology
Unit / Unit

CLEAR orden.
PERFORM imputaciones_y_division USING f_c-empre
cecoe
orden
f_c-feccon
CHANGING reg-divcec subrc.

IF subrc NE 0 AND subrc NE 5.


PERFORM tratamiento_de_error USING '504' ' ' text-024 space.
ENDIF.

ENDIF.

IF f_c-orden = space AND f_orden <> space.


reg-orden = f_orden.
CLEAR orden.
orden = f_orden.
PERFORM imputaciones_y_division USING f_c-empre
' '
orden
' '
CHANGING reg-divord subrc.

IF subrc NE 0.
PERFORM tratamiento_de_error USING '504' ' ' text-025 space.
ENDIF.
ENDIF.

* CECOE1
IF cecoe1 <> space.
reg-cecoe1 = cecoe1.
CLEAR orden_basura.
PERFORM imputaciones_y_division USING f_c-empre
cecoe1
orden_basura
f_c-feccon
CHANGING reg-divcec1 subrc.

IF subrc NE 0 AND subrc NE 5.


PERFORM tratamiento_de_error USING '504' ' ' text-024 space.
ENDIF.
ELSE.
reg-cecoe1 = 'NO_COD_EXT'.
reg-divcec1 = 'NO_COD_EXT'.
ENDIF.

* CECOE2
IF cecoe2 <> space.
reg-cecoe2 = cecoe2.
CLEAR orden_basura.
PERFORM imputaciones_y_division USING f_c-empre
cecoe2
orden_basura
f_c-feccon
CHANGING reg-divcec2 subrc.

IF subrc NE 0 AND subrc NE 5.


PERFORM tratamiento_de_error USING '504' ' ' text-024 space.
ENDIF.
REPRODUCTION FORBIDDEN Internal Use
Template Document Code Version and Date File ID Total Pages
SGI-MTC-03C-EN_01 0000-XX00 Version, 1.0./Borrador 490031247.docx 44
dd/mm/aaaa
Information and Communication Technology
Unit / Unit

ELSE.
reg-cecoe2 = 'NO_COD_EXT'.
reg-divcec2 = 'NO_COD_EXT'.
ENDIF.

* Tratamiento para XCFEC04E01: (CECOE9/ORDEN - CECOE10/ORDEN1 -


CECOE11/ORDEN2)
IF codigo = 'XCFEC04E'.
CLEAR codigo2.
CONCATENATE cabec-codint '01' INTO codigo2.
CLEAR: cecoe, cecoe1, cecoe2, cecoe3, cecoe4, cecoe5, f_orden,
orden2, orden3, orden4, orden5, f_subrc.
CALL FUNCTION 'Z_XX_CODIGOS2'
EXPORTING
empr = soc
func = codigo2
vextern = externo
* VSIE1 =
* VSIE2 =
* VSIE3 =
fecha_imp = f_c-feccon
IMPORTING
c_cecoe3 = cecoe3
c_cecoe4 = cecoe4
c_cecoe5 = cecoe5
c_orden3 = orden3
c_orden4 = orden4
c_orden5 = orden5
sy_subrc = f_subrc
EXCEPTIONS
cec5_ord5_iguales = 1
ord5_no_exist = 2
ord5_cerra = 3
cec4_ord4_iguales = 4
ord4_no_exist = 5
ord4_cerra = 6
cec3_ord3_iguales = 7
ord3_no_exist = 8
ord3_cerra = 9
cec2_ord2_iguales = 10
ord2_no_exist = 11
ord2_cerra = 12
cec1_ord_iguales = 13
ord_no_exist = 14
ord_cerra = 15
cec_ord_iguales = 16
no_codigo = 17
OTHERS = 18.
IF f_subrc <> 0.
PERFORM tratamiento_de_error USING '504' ' ' text-026 space.
sy-subrc = 0.
ENDIF.

* CECOE9/ORDEN
IF cecoe3 <> space.
reg-cecoe9 = cecoe3.
CLEAR orden_basura.
PERFORM imputaciones_y_division USING f_c-empre
cecoe3
REPRODUCTION FORBIDDEN Internal Use
Template Document Code Version and Date File ID Total Pages
SGI-MTC-03C-EN_01 0000-XX00 Version, 1.0./Borrador 490031247.docx 44
dd/mm/aaaa
Information and Communication Technology
Unit / Unit

orden_basura
f_c-feccon
CHANGING reg-divcec3 subrc.

IF subrc NE 0 AND subrc NE 5.


PERFORM tratamiento_de_error USING '504' ' ' text-027 space.
ENDIF.
ELSE.
reg-cecoe9 = 'NO_COD_EXT'.
reg-divcec9 = 'NO_COD_EXT'.
ENDIF.

IF orden3 <> space.


reg-orden = orden3.
PERFORM imputaciones_y_division USING f_c-empre
' '
orden3
' '
CHANGING reg-divord3 subrc.

IF subrc NE 0.
PERFORM tratamiento_de_error USING '504' ' ' text-029 space.
ENDIF.
ELSE.
reg-orden = 'NO_COD_EXT'.
reg-divord = 'NO_COD_EXT'.
ENDIF.

* CECOE10/ORDEN1
IF cecoe4 <> space.
reg-cecoe10 = cecoe4.
CLEAR orden_basura.
PERFORM imputaciones_y_division USING f_c-empre
cecoe4
orden_basura
f_c-feccon
CHANGING reg-divcec4 subrc.

IF subrc NE 0 AND subrc NE 5.


PERFORM tratamiento_de_error USING '504' ' ' text-024 space.
ENDIF.
ELSE.
reg-cecoe10 = 'NO_COD_EXT'.
reg-divcec10 = 'NO_COD_EXT'.
ENDIF.

IF orden4 <> space.


reg-orden1 = orden4.
PERFORM imputaciones_y_division USING f_c-empre
' '
orden4
' '
CHANGING reg-divord4 subrc.
IF subrc NE 0.
PERFORM tratamiento_de_error USING '504' ' ' text-030 space.
ENDIF.
ELSE.
reg-orden1 = 'NO_COD_EXT'.
reg-divord1 = 'NO_COD_EXT'.
REPRODUCTION FORBIDDEN Internal Use
Template Document Code Version and Date File ID Total Pages
SGI-MTC-03C-EN_01 0000-XX00 Version, 1.0./Borrador 490031247.docx 44
dd/mm/aaaa
Information and Communication Technology
Unit / Unit

ENDIF.

* CECOE11/ORDEN2
IF cecoe5 <> space.
reg-cecoe11 = cecoe5.
CLEAR orden_basura.
PERFORM imputaciones_y_division USING f_c-empre
cecoe5
orden_basura
f_c-feccon
CHANGING reg-divcec5 subrc.

IF subrc NE 0 AND subrc NE 5.


PERFORM tratamiento_de_error USING '504' ' ' text-024 space.
ENDIF.
ELSE.
reg-cecoe11 = 'NO_COD_EXT'.
reg-divcec11 = 'NO_COD_EXT'.
ENDIF.

IF orden5 <> space.


reg-orden2 = orden5.
PERFORM imputaciones_y_division USING f_c-empre
' '
orden5
' '
CHANGING reg-divord5 subrc.
IF subrc NE 0.
PERFORM tratamiento_de_error USING '504' ' ' text-030 space.
ENDIF.
ELSE.
reg-orden2 = 'NO_COD_EXT'.
reg-divord2 = 'NO_COD_EXT'.
ENDIF.
ENDIF.

* Tratamiento para XCFEC04E02: CECOE12/ORDEN3 - CECOE13/ORDEN4 -


CECOE14/ORDEN5
IF codigo = 'XCFEC04E'.
CLEAR codigo2.
CONCATENATE cabec-codint '02' INTO codigo2.
CLEAR: cecoe, cecoe1, cecoe2, cecoe3, cecoe4, cecoe5, f_orden,
orden2, orden3, orden4, orden5, f_subrc.
CALL FUNCTION 'Z_XX_CODIGOS2'
EXPORTING
empr = soc
func = codigo2
vextern = externo
fecha_imp = f_c-feccon
IMPORTING
c_cecoe3 = cecoe3
c_cecoe4 = cecoe4
c_cecoe5 = cecoe5
c_orden3 = orden3
c_orden4 = orden4
c_orden5 = orden5
sy_subrc = f_subrc
EXCEPTIONS
cec5_ord5_iguales = 1
REPRODUCTION FORBIDDEN Internal Use
Template Document Code Version and Date File ID Total Pages
SGI-MTC-03C-EN_01 0000-XX00 Version, 1.0./Borrador 490031247.docx 44
dd/mm/aaaa
Information and Communication Technology
Unit / Unit

ord5_no_exist = 2
ord5_cerra = 3
cec4_ord4_iguales = 4
ord4_no_exist = 5
ord4_cerra = 6
cec3_ord3_iguales = 7
ord3_no_exist = 8
ord3_cerra = 9
cec2_ord2_iguales = 10
ord2_no_exist = 11
ord2_cerra = 12
cec1_ord_iguales = 13
ord_no_exist = 14
ord_cerra = 15
cec_ord_iguales = 16
no_codigo = 17
OTHERS = 18.
IF f_subrc <> 0.
PERFORM tratamiento_de_error USING '504' ' ' text-026 space.
sy-subrc = 0.
ENDIF.

*CECOE12/ORDEN3
IF cecoe3 <> space.
reg-cecoe12 = cecoe3.
CLEAR orden_basura.
PERFORM imputaciones_y_division USING f_c-empre
cecoe3
orden_basura
f_c-feccon
CHANGING reg-divcec6 subrc.

IF subrc NE 0 AND subrc NE 5.


PERFORM tratamiento_de_error USING '504' ' ' text-024 space.
ENDIF.
ELSE.
reg-cecoe12 = 'NO_COD_EXT'.
reg-divcec12 = 'NO_COD_EXT'.
ENDIF.

IF orden3 <> space.


reg-orden3 = orden3.
PERFORM imputaciones_y_division USING f_c-empre
' '
orden3
' '
CHANGING reg-divord6 subrc.
IF subrc NE 0.
PERFORM tratamiento_de_error USING '504' ' ' text-029 space.
ENDIF.
ELSE.
reg-orden3 = 'NO_COD_EXT'.
reg-divord3 = 'NO_COD_EXT'.
ENDIF.

* CECOE13/ORDEN4
IF cecoe4 <> space.
reg-cecoe13 = cecoe4.
CLEAR orden_basura.
REPRODUCTION FORBIDDEN Internal Use
Template Document Code Version and Date File ID Total Pages
SGI-MTC-03C-EN_01 0000-XX00 Version, 1.0./Borrador 490031247.docx 44
dd/mm/aaaa
Information and Communication Technology
Unit / Unit

PERFORM imputaciones_y_division USING f_c-empre


cecoe4
orden_basura
f_c-feccon
CHANGING reg-divcec7 subrc.

IF subrc NE 0 AND subrc NE 5.


PERFORM tratamiento_de_error USING '504' ' ' text-024 space.
ENDIF.
ELSE.
reg-cecoe13 = 'NO_COD_EXT'.
reg-divcec13 = 'NO_COD_EXT'.
ENDIF.

IF orden4 <> space.


reg-orden4 = orden4.
PERFORM imputaciones_y_division USING f_c-empre
' '
orden4
' '
CHANGING reg-divord7 subrc.
IF subrc NE 0.
PERFORM tratamiento_de_error USING '504' ' ' text-030 space.
ENDIF.
ELSE.
reg-orden4 = 'NO_COD_EXT'.
reg-divord4 = 'NO_COD_EXT'.
ENDIF.

* CECOE14/ORDEN5
IF cecoe5 <> space.
reg-cecoe14 = cecoe5.
CLEAR orden_basura.
PERFORM imputaciones_y_division USING f_c-empre
cecoe5
orden_basura
f_c-feccon
CHANGING reg-divcec8 subrc.

IF subrc NE 0 AND subrc NE 5.


PERFORM tratamiento_de_error USING '504' ' ' text-024 space.
ENDIF.
ELSE.
reg-cecoe14 = 'NO_COD_EXT'.
reg-divcec14 = 'NO_COD_EXT'.
ENDIF.

IF orden5 <> space.


reg-orden5 = orden5.
PERFORM imputaciones_y_division USING f_c-empre
' '
orden5
' '
CHANGING reg-divord8 subrc.

IF subrc NE 0.
PERFORM tratamiento_de_error USING '504' ' ' text-030 space.
ENDIF.
ELSE.
REPRODUCTION FORBIDDEN Internal Use
Template Document Code Version and Date File ID Total Pages
SGI-MTC-03C-EN_01 0000-XX00 Version, 1.0./Borrador 490031247.docx 44
dd/mm/aaaa
Information and Communication Technology
Unit / Unit

reg-orden5 = 'NO_COD_EXT'.
reg-divord5 = 'NO_COD_EXT'.
ENDIF.
ENDIF.

* Tratamiento para XCFEC04E03: ORDEN6 - ORDEN7 - ORDEN8


IF codigo = 'XCFEC04E'.
CLEAR codigo2.
CONCATENATE cabec-codint '03' INTO codigo2.
CLEAR: cecoe, cecoe1, cecoe2, cecoe3, cecoe4, cecoe5, f_orden,
orden2, orden3, orden4, orden5, f_subrc.
CALL FUNCTION 'Z_XX_CODIGOS2'
EXPORTING
empr = soc
func = codigo2
vextern = externo
fecha_imp = f_c-feccon
IMPORTING
c_orden3 = orden3
c_orden4 = orden4
c_orden5 = orden5
sy_subrc = f_subrc
EXCEPTIONS
cec5_ord5_iguales = 1
ord5_no_exist = 2
ord5_cerra = 3
cec4_ord4_iguales = 4
ord4_no_exist = 5
ord4_cerra = 6
cec3_ord3_iguales = 7
ord3_no_exist = 8
ord3_cerra = 9
cec2_ord2_iguales = 10
ord2_no_exist = 11
ord2_cerra = 12
cec1_ord_iguales = 13
ord_no_exist = 14
ord_cerra = 15
cec_ord_iguales = 16
no_codigo = 17
OTHERS = 18.
IF f_subrc <> 0.
PERFORM tratamiento_de_error USING '504' ' ' text-026 space.
sy-subrc = 0.
ENDIF.

* ORDEN6
IF orden3 <> space.
reg-orden6 = orden3.
PERFORM imputaciones_y_division USING f_c-empre
' '
orden3
' '
CHANGING reg-divord6 subrc.
IF subrc NE 0.
PERFORM tratamiento_de_error USING '504' ' ' text-029 space.
ENDIF.
ELSE.
reg-orden6 = 'NO_COD_EXT'.
REPRODUCTION FORBIDDEN Internal Use
Template Document Code Version and Date File ID Total Pages
SGI-MTC-03C-EN_01 0000-XX00 Version, 1.0./Borrador 490031247.docx 44
dd/mm/aaaa
Information and Communication Technology
Unit / Unit

reg-divord6 = 'NO_COD_EXT'.
ENDIF.

* ORDEN7
IF orden4 <> space.
reg-orden7 = orden4.
PERFORM imputaciones_y_division USING f_c-empre
' '
orden4
' '
CHANGING reg-divord7 subrc.
IF subrc NE 0.
PERFORM tratamiento_de_error USING '504' ' ' text-030 space.
ENDIF.
ELSE.
reg-orden7 = 'NO_COD_EXT'.
reg-divord7 = 'NO_COD_EXT'.
ENDIF.

* ORDEN8
IF orden5 <> space.
reg-orden8 = orden5.
PERFORM imputaciones_y_division USING f_c-empre
' '
orden5
' '
CHANGING reg-divord8 subrc.

IF subrc NE 0.
PERFORM tratamiento_de_error USING '504' ' ' text-030 space.
ENDIF.
ELSE.
reg-orden8 = 'NO_COD_EXT'.
reg-divord8 = 'NO_COD_EXT'.
ENDIF.
ENDIF.

* Tratamiento para XCFEC04E04: CECOE3 - CECOE4 - CECOE5/ORDEN9


IF codigo = 'XCFEC04E'.
CLEAR codigo2.
CONCATENATE cabec-codint '04' INTO codigo2.
CLEAR: cecoe2, cecoe3, cecoe4, cecoe5, orden3, orden4, orden5,
f_orden, cecoe1, cecoe, f_subrc.
CALL FUNCTION 'Z_XX_CODIGOS2'
EXPORTING
empr = soc
func = codigo2
vextern = externo
fecha_imp = f_c-feccon
IMPORTING
c_cecoe3 = cecoe3
c_cecoe4 = cecoe4
c_cecoe5 = cecoe5
c_orden3 = orden3
sy_subrc = f_subrc
EXCEPTIONS
cec5_ord5_iguales = 1
ord5_no_exist = 2
ord5_cerra = 3
REPRODUCTION FORBIDDEN Internal Use
Template Document Code Version and Date File ID Total Pages
SGI-MTC-03C-EN_01 0000-XX00 Version, 1.0./Borrador 490031247.docx 44
dd/mm/aaaa
Information and Communication Technology
Unit / Unit

cec4_ord4_iguales = 4
ord4_no_exist = 5
ord4_cerra = 6
cec3_ord3_iguales = 7
ord3_no_exist = 8
ord3_cerra = 9
cec2_ord2_iguales = 10
ord2_no_exist = 11
ord2_cerra = 12
cec1_ord_iguales = 13
ord_no_exist = 14
ord_cerra = 15
cec_ord_iguales = 16
no_codigo = 17
OTHERS = 18.
IF f_subrc <> 0.
PERFORM tratamiento_de_error USING '504' ' ' text-026 space.
sy-subrc = 0.
ENDIF.

*CECOE3
IF cecoe3 <> space.
reg-cecoe3 = cecoe3.
CLEAR orden_basura.
PERFORM imputaciones_y_division USING f_c-empre
cecoe3
orden_basura
f_c-feccon
CHANGING reg-divcec6 subrc.

IF subrc NE 0 AND subrc NE 5.


PERFORM tratamiento_de_error USING '504' ' ' text-024 space.
ENDIF.
ELSE.
reg-cecoe3 = 'NO_COD_EXT'.
reg-divcec3 = 'NO_COD_EXT'.
ENDIF.

* CECOE4
IF cecoe4 <> space.
reg-cecoe4 = cecoe4.
CLEAR orden_basura.
PERFORM imputaciones_y_division USING f_c-empre
cecoe4
orden_basura
f_c-feccon
CHANGING reg-divcec7 subrc.

IF subrc NE 0 AND subrc NE 5.


PERFORM tratamiento_de_error USING '504' ' ' text-024 space.
ENDIF.
ELSE.
reg-cecoe4 = 'NO_COD_EXT'.
reg-divcec4 = 'NO_COD_EXT'.
ENDIF.

* CECOE5/ORDEN9
IF cecoe5 <> space.
reg-cecoe5 = cecoe5.
REPRODUCTION FORBIDDEN Internal Use
Template Document Code Version and Date File ID Total Pages
SGI-MTC-03C-EN_01 0000-XX00 Version, 1.0./Borrador 490031247.docx 44
dd/mm/aaaa
Information and Communication Technology
Unit / Unit

CLEAR orden_basura.
PERFORM imputaciones_y_division USING f_c-empre
cecoe5
orden_basura
f_c-feccon
CHANGING reg-divcec8 subrc.

IF subrc NE 0 AND subrc NE 5.


PERFORM tratamiento_de_error USING '504' ' ' text-024 space.
ENDIF.
ELSE.
reg-cecoe5 = 'NO_COD_EXT'.
reg-divcec5 = 'NO_COD_EXT'.
ENDIF.

IF orden5 <> space.


reg-orden9 = orden5.
PERFORM imputaciones_y_division USING f_c-empre
' '
orden5
' '
CHANGING reg-divord8 subrc.

IF subrc NE 0.
PERFORM tratamiento_de_error USING '504' ' ' text-030 space.
ENDIF.
ELSE.
reg-orden9 = 'NO_COD_EXT'.
reg-divord9 = 'NO_COD_EXT'.
ENDIF.
ENDIF.

* Tratamiento para XCFEC04E05: CECOE6/ORDEN10 - CECOE7/ORDEN11 -


CECOE8/ORDEN12
IF codigo = 'XCFEC04E'.
CLEAR codigo2.
CONCATENATE cabec-codint '05' INTO codigo2.
CLEAR: cecoe, cecoe1, cecoe2, cecoe3, cecoe4, cecoe5, f_orden,
orden2, orden3, orden4, orden5, f_subrc.
CALL FUNCTION 'Z_XX_CODIGOS2'
EXPORTING
empr = soc
func = codigo2
vextern = externo
fecha_imp = f_c-feccon
IMPORTING
c_cecoe3 = cecoe3
c_cecoe4 = cecoe4
c_cecoe5 = cecoe5
c_orden3 = orden3
c_orden4 = orden4
c_orden5 = orden5
sy_subrc = f_subrc
EXCEPTIONS
cec5_ord5_iguales = 1
ord5_no_exist = 2
ord5_cerra = 3
cec4_ord4_iguales = 4
ord4_no_exist = 5
REPRODUCTION FORBIDDEN Internal Use
Template Document Code Version and Date File ID Total Pages
SGI-MTC-03C-EN_01 0000-XX00 Version, 1.0./Borrador 490031247.docx 44
dd/mm/aaaa
Information and Communication Technology
Unit / Unit

ord4_cerra = 6
cec3_ord3_iguales = 7
ord3_no_exist = 8
ord3_cerra = 9
cec2_ord2_iguales = 10
ord2_no_exist = 11
ord2_cerra = 12
cec1_ord_iguales = 13
ord_no_exist = 14
ord_cerra = 15
cec_ord_iguales = 16
no_codigo = 17
OTHERS = 18.
IF f_subrc <> 0.
PERFORM tratamiento_de_error USING '504' ' ' text-026 space.
sy-subrc = 0.
ENDIF.

*CECOE6/ORDEN10
IF cecoe3 <> space.
reg-cecoe6 = cecoe3.
CLEAR orden_basura.
PERFORM imputaciones_y_division USING f_c-empre
cecoe3
orden_basura
f_c-feccon
CHANGING reg-divcec6 subrc.

IF subrc NE 0 AND subrc NE 5.


PERFORM tratamiento_de_error USING '504' ' ' text-024 space.
ENDIF.
ELSE.
reg-cecoe6 = 'NO_COD_EXT'.
reg-divcec6 = 'NO_COD_EXT'.
ENDIF.

IF orden3 <> space.


reg-orden10 = orden3.
PERFORM imputaciones_y_division USING f_c-empre
' '
orden3
' '
CHANGING reg-divord6 subrc.
IF subrc NE 0.
PERFORM tratamiento_de_error USING '504' ' ' text-029 space.
ENDIF.
ELSE.
reg-orden10 = 'NO_COD_EXT'.
reg-divord10 = 'NO_COD_EXT'.
ENDIF.

* CECOE7/ORDEN11
IF cecoe4 <> space.
reg-cecoe7 = cecoe4.
CLEAR orden_basura.
PERFORM imputaciones_y_division USING f_c-empre
cecoe4
orden_basura
f_c-feccon
REPRODUCTION FORBIDDEN Internal Use
Template Document Code Version and Date File ID Total Pages
SGI-MTC-03C-EN_01 0000-XX00 Version, 1.0./Borrador 490031247.docx 44
dd/mm/aaaa
Information and Communication Technology
Unit / Unit

CHANGING reg-divcec7 subrc.

IF subrc NE 0 AND subrc NE 5.


PERFORM tratamiento_de_error USING '504' ' ' text-024 space.
ENDIF.
ELSE.
reg-cecoe7 = 'NO_COD_EXT'.
reg-divcec7 = 'NO_COD_EXT'.
ENDIF.

IF orden4 <> space.


reg-orden11 = orden4.
PERFORM imputaciones_y_division USING f_c-empre
' '
orden4
' '
CHANGING reg-divord7 subrc.
IF subrc NE 0.
PERFORM tratamiento_de_error USING '504' ' ' text-030 space.
ENDIF.
ELSE.
reg-orden11 = 'NO_COD_EXT'.
reg-divord11 = 'NO_COD_EXT'.
ENDIF.

* CECOE8/ORDEN12
IF cecoe5 <> space.
reg-cecoe8 = cecoe5.
CLEAR orden_basura.
PERFORM imputaciones_y_division USING f_c-empre
cecoe5
orden_basura
f_c-feccon
CHANGING reg-divcec8 subrc.

IF subrc NE 0 AND subrc NE 5.


PERFORM tratamiento_de_error USING '504' ' ' text-024 space.
ENDIF.
ELSE.
reg-cecoe8 = 'NO_COD_EXT'.
reg-divcec8 = 'NO_COD_EXT'.
ENDIF.

IF orden5 <> space.


reg-orden12 = orden5.
PERFORM imputaciones_y_division USING f_c-empre
' '
orden5
' '
CHANGING reg-divord8 subrc.

IF subrc NE 0.
PERFORM tratamiento_de_error USING '504' ' ' text-030 space.
ENDIF.
ELSE.
reg-orden12 = 'NO_COD_EXT'.
reg-divord12 = 'NO_COD_EXT'.
ENDIF.
ENDIF.
REPRODUCTION FORBIDDEN Internal Use
Template Document Code Version and Date File ID Total Pages
SGI-MTC-03C-EN_01 0000-XX00 Version, 1.0./Borrador 490031247.docx 44
dd/mm/aaaa
Information and Communication Technology
Unit / Unit

ENDIF.
* 20170705 - JGJ - FIN - &ORDEN* o &CECOE* AMPLIAR LOGICA SI AMBOS (Nuevo)
* 20170705 - JGJ - INI - &ORDEN* o &CECOE* AMPLIAR LOGICA SI AMBOS
(Asteisqueado)
* DATA: soc LIKE zxcod-bukrs,
* codigo LIKE zxcod-zzxfunc,
* codigo2 LIKE zxcod-zzxfunc,
* codigo3 LIKE zxcod-zzxfunc,
**LNC - Inicio - 09.11.2010 - Pet. 7700004203
* codigo4 LIKE zxcod-zzxfunc,
* codigo5 LIKE zxcod-zzxfunc,
**LNC - Fin - 09.11.2010 - Pet. 7700004203
*
* externo LIKE zxcod-zzxexter,
* f_subrc LIKE sy-subrc,
*
** INICIO INDRA ETORRES
* l_cecoe(24),"(20),
* l_cecoe1(24),"(20),
* l_cecoe2(24),"(20),
*
**LNC - Inicio - 09.11.2010 - Pet. 7700004203
* l_cecoe3(24), "LIKE csks-kostl,
* l_cecoe4(24), "LIKE csks-kostl,
* l_cecoe5(24), "LIKE csks-kostl,
* l_cecoe6(24), "LIKE csks-kostl,
* l_cecoe7(24), "LIKE csks-kostl,
* l_cecoe8(24), "LIKE csks-kostl,
*
*
**LNC - Fin - 09.11.2010 - Pet. 7700004203
* l_orden(24),
* l_orden1(24),
* l_orden2(24),
* l_orden3(24),
* l_orden4(24),
* l_orden5(24),
** FIN INDRA ETORRES
**LNC - Inicio - 09.11.2010 - Pet. 7700004203
* l_orden6 LIKE aufk-aufnr,
* l_orden7 LIKE aufk-aufnr,
* l_orden8 LIKE aufk-aufnr,
* l_orden9 LIKE aufk-aufnr,
* l_orden10 LIKE aufk-aufnr,
* l_orden11 LIKE aufk-aufnr.
*
* CONSTANTS: lc_09(09) VALUE '09',
* lc_10(10) VALUE '10',
* lc_xcfec04e(8) VALUE 'XCFEC04E',
* lc_general LIKE zxcod-zzxexter VALUE 'GENERAL',
* lc_504(3) VALUE '504',
** lc_wa_reg_cecoe3(13) VALUE 'WA_REG_CECOE3',
** lc_wa_reg_cecoe4(13) VALUE 'WA_REG_CECOE4',
** lc_wa_reg_cecoe5(13) VALUE 'WA_REG_CECOE5',
** lc_wa_reg_cecoe6(13) VALUE 'WA_REG_CECOE6',
** lc_wa_reg_cecoe7(13) VALUE 'WA_REG_CECOE7',
** lc_wa_reg_cecoe8(13) VALUE 'WA_REG_CECOE8',
** lc_wa_reg_orden6(13) VALUE 'WA_REG_ORDEN6',
** lc_wa_reg_orden7(13) VALUE 'WA_REG_ORDEN7',
REPRODUCTION FORBIDDEN Internal Use
Template Document Code Version and Date File ID Total Pages
SGI-MTC-03C-EN_01 0000-XX00 Version, 1.0./Borrador 490031247.docx 44
dd/mm/aaaa
Information and Communication Technology
Unit / Unit

** lc_wa_reg_orden8(13) VALUE 'WA_REG_ORDEN8',


** lc_wa_reg_orden9(13) VALUE 'WA_REG_ORDEN9',
** lc_wa_reg_orden10(14) VALUE 'WA_REG_ORDEN10',
** lc_wa_reg_orden11(14) VALUE 'WA_REG_ORDEN11',
*
* lc_wa_reg_cecoe3(13) VALUE 'WA_REG-CECOE3',
* lc_wa_reg_cecoe4(13) VALUE 'WA_REG-CECOE4',
* lc_wa_reg_cecoe5(13) VALUE 'WA_REG-CECOE5',
* lc_wa_reg_cecoe6(13) VALUE 'WA_REG-CECOE6',
* lc_wa_reg_cecoe7(13) VALUE 'WA_REG-CECOE7',
* lc_wa_reg_cecoe8(13) VALUE 'WA_REG-CECOE8',
* lc_wa_reg_orden6(13) VALUE 'WA_REG-ORDEN6',
* lc_wa_reg_orden7(13) VALUE 'WA_REG-ORDEN7',
* lc_wa_reg_orden8(13) VALUE 'WA_REG-ORDEN8',
* lc_wa_reg_orden9(13) VALUE 'WA_REG-ORDEN9',
* lc_wa_reg_orden10(14) VALUE 'WA_REG-ORDEN10',
* lc_wa_reg_orden11(14) VALUE 'WA_REG-ORDEN11'.
**LNC - Fin - 09.11.2010 - Pet. 7700004203
*** Se buscan el centro de coste y las dos órdenes a partir del código de
*** externo
* CLEAR externo.
* soc = wa_reg-empre.
* codigo = f_codigo.
* CONCATENATE cabec-codint '06' INTO codigo2.
* IF f_c-cups IS INITIAL.
* CONCATENATE f_c-empre f_c-refere+14(1) INTO externo.
* ELSE.
* externo = f_c-cups.
* ENDIF.
*
* CALL FUNCTION 'Z_XX_CODIGOS'
* EXPORTING
* empr = soc
* func = codigo2
* vextern = externo
**{ REPLACE GEPK900353 1
**\ fecha_imp = f_c-feccon
**\ UPGRADE - EC_Contabilidad -> ID 258
**} REPLACE
* IMPORTING
* e_vsie1 = l_cecoe
* e_vsie2 = l_cecoe1
* e_vsie3 = l_cecoe2
* EXCEPTIONS
* falta_informar_codigo = 1
* codigo_inexistente = 2
* OTHERS = 3.
* IF sy-subrc <> 0 OR ( l_cecoe IS INITIAL AND
* l_cecoe1 IS INITIAL AND l_cecoe2 IS INITIAL ).
* CALL FUNCTION 'Z_XX_CODIGOS'
* EXPORTING
* empr = soc
* func = codigo2
* vextern = 'GENERAL'
**{ REPLACE GEPK900353 2
**\ fecha_imp = f_c-feccon
**\ UPGRADE - EC_Contabilidad -> ID 258
**} REPLACE
* IMPORTING
REPRODUCTION FORBIDDEN Internal Use
Template Document Code Version and Date File ID Total Pages
SGI-MTC-03C-EN_01 0000-XX00 Version, 1.0./Borrador 490031247.docx 44
dd/mm/aaaa
Information and Communication Technology
Unit / Unit

* e_vsie1 = l_cecoe
* e_vsie2 = l_cecoe1
* e_vsie3 = l_cecoe2
* EXCEPTIONS
* falta_informar_codigo = 1
* codigo_inexistente = 2
* OTHERS = 3.
* ENDIF.
* IF sy-subrc <> 0.
*** NEA - Inicio - 06.05.2010 - Pet.7700003801
**
****Inc. Modif JML 21078
* IF sy-subrc NE 2.
** IF sy-subrc = 1.
* PERFORM tratamiento_de_error USING '504' ' ' text-026 space.
* ENDIF.
**** PERFORM tratamiento_de_error USING '504' ' ' text-026 space.
** IF sy-subrc = 2.
** PERFORM tratamiento_de_error_mu USING '811' externo space space.
** gv_es_erroneo = 'X'.
** ENDIF.
**** Fin Modif. JML 10.11.2005
**
*** NEA - Inicio - 06.05.2010 - Pet.7700003801
* ENDIF.
* wa_reg-cecoe = l_cecoe.
* wa_reg-cecoe1 = l_cecoe1.
* wa_reg-cecoe2 = l_cecoe2.
* CLEAR l_orden.
* IF NOT wa_reg-cecoe IS INITIAL.
**Inicio Modificación GM1 - 28/03/2006 - 21497.
** PERFORM imputaciones_y_division USING wa_reg-empre
** wa_reg-cecoe
** l_orden
** wa_reg-feccon
** CHANGING wa_reg-divcec
** subrc.
** IF sy-subrc <> 0.
** PERFORM tratamiento_de_error USING '504' ' ' text-024 space.
** ENDIF.
* PERFORM cargar_imputaciones USING soc
* reg-feccon
* 'WA_REG-CECOE'
*
* wa_reg-cecoe.
*
*** NEA - Inicio - 06.05.2010 - Pet.7700003801
***JMM 21497 inicio
* PERFORM validacion_imputacion_real USING t_val.
***JMM 21497 fin
**PERFORM validacion_imputacion_real USING t_val codigo2 externo f_subrc.
*** NEA - Fin - 06.05.2010 - Pet.7700003801
*
**Fin Modificación GM1 - 28/03/2006 - 21497.
* ENDIF.
* IF NOT wa_reg-cecoe1 IS INITIAL.
**Inicio Modificación GM1 - 28/03/2006 - 21497.
** PERFORM imputaciones_y_division USING wa_reg-empre
** wa_reg-cecoe1
REPRODUCTION FORBIDDEN Internal Use
Template Document Code Version and Date File ID Total Pages
SGI-MTC-03C-EN_01 0000-XX00 Version, 1.0./Borrador 490031247.docx 44
dd/mm/aaaa
Information and Communication Technology
Unit / Unit

** l_orden
** wa_reg-feccon
** CHANGING wa_reg-divcec1
** subrc.
** IF sy-subrc <> 0.
** PERFORM tratamiento_de_error USING '504' ' ' text-087 space.
** ENDIF.
* PERFORM cargar_imputaciones USING soc
* reg-feccon
* 'WA_REG-CECOE1'
* wa_reg-cecoe1.
*
*** NEA - Inicio - 06.05.2010 - Pet.7700003801
***JMM 21497 inicio
* PERFORM validacion_imputacion_real USING t_val.
***JMM 21497 fin
**PERFORM validacion_imputacion_real USING t_val codigo2 externo f_subrc.
*** NEA - Fin - 06.05.2010 - Pet.7700003801
*
**Fin Modificación GM1 - 28/03/2006 - 21497.
* ENDIF.
* IF NOT wa_reg-cecoe2 IS INITIAL.
**Inicio Modificación GM1 - 28/03/2006 - 21497.
** PERFORM imputaciones_y_division USING wa_reg-empre
** wa_reg-cecoe2
** l_orden
** wa_reg-feccon
** CHANGING wa_reg-divcec2
** subrc.
** IF sy-subrc <> 0.
** PERFORM tratamiento_de_error USING '504' ' ' text-088 space.
** ENDIF.
* PERFORM cargar_imputaciones USING soc
* reg-feccon
* 'WA_REG-CECOE2'
* wa_reg-cecoe2.
*** NEA - Inicio - 06.05.2010 - Pet.7700003801
***JMM 21497 inicio
* PERFORM validacion_imputacion_real USING t_val.
***JMM 21497 fin
**PERFORM validacion_imputacion_real USING t_val codigo2 externo f_subrc.
*** NEA - Fin - 06.05.2010 - Pet.7700003801
*
**Fin Modificación GM1 - 28/03/2006 - 21497.
* ENDIF.
* IF codigo = 'XCFEC01E' OR codigo = 'XCNEC01E'
* OR codigo = 'XCFEC04E'.
* CONCATENATE cabec-codint '07' INTO codigo2.
* CALL FUNCTION 'Z_XX_CODIGOS'
* EXPORTING
* empr = soc
* func = codigo2
* vextern = externo
**{ REPLACE GEPK900353 3
**\ fecha_imp = f_c-feccon
**\ UPGRADE - EC_Contabilidad -> ID 258
**} REPLACE
* IMPORTING
* e_vsie1 = l_orden
REPRODUCTION FORBIDDEN Internal Use
Template Document Code Version and Date File ID Total Pages
SGI-MTC-03C-EN_01 0000-XX00 Version, 1.0./Borrador 490031247.docx 44
dd/mm/aaaa
Information and Communication Technology
Unit / Unit

* e_vsie2 = l_orden1
* e_vsie3 = l_orden2
* EXCEPTIONS
* falta_informar_codigo = 1
* codigo_inexistente = 2
* OTHERS = 3.
* IF sy-subrc <> 0 OR ( l_orden IS INITIAL AND
* l_orden1 IS INITIAL AND l_orden2 IS INITIAL ).
* CALL FUNCTION 'Z_XX_CODIGOS'
* EXPORTING
* empr = soc
* func = codigo2
* vextern = 'GENERAL'
**{ REPLACE GEPK900353 4
**\ fecha_imp = f_c-feccon
**\ UPGRADE - EC_Contabilidad -> ID 258
**} REPLACE
* IMPORTING
* e_vsie1 = l_orden
* e_vsie2 = l_orden1
* e_vsie3 = l_orden2
* EXCEPTIONS
* falta_informar_codigo = 1
* codigo_inexistente = 2
* OTHERS = 3.
* ENDIF.
* IF sy-subrc <> 0.
*** NEA - Inicio - 06.05.2010 - Pet.7700003801
**
****Inc. Modif JML 21078
* IF sy-subrc NE 2.
** IF sy-subrc = 1.
* PERFORM tratamiento_de_error USING '504' ' ' text-026 space.
* ENDIF.
**** PERFORM tratamiento_de_error USING '504' ' ' text-026 space.
** IF sy-subrc = 2.
** PERFORM tratamiento_de_error_mu USING '811' externo space space.
** gv_es_erroneo = 'X'.
** ENDIF.
**** Fin Modif. JML 10.11.2005
**
*** NEA - Inicio - 06.05.2010 - Pet.7700003801
*
* ENDIF.
* wa_reg-orden = l_orden.
* wa_reg-orden1 = l_orden1.
* wa_reg-orden2 = l_orden2.
* CLEAR l_cecoe.
* IF NOT wa_reg-orden IS INITIAL.
**Inicio Modificación GM1 - 28/03/2006 - 21497.
** PERFORM imputaciones_y_division USING wa_reg-empre
** l_cecoe
** wa_reg-orden
** ' '
** CHANGING reg-divord
** subrc.
** IF sy-subrc <> 0.
** PERFORM tratamiento_de_error USING '504' ' ' text-025 space.
** ENDIF.
REPRODUCTION FORBIDDEN Internal Use
Template Document Code Version and Date File ID Total Pages
SGI-MTC-03C-EN_01 0000-XX00 Version, 1.0./Borrador 490031247.docx 44
dd/mm/aaaa
Information and Communication Technology
Unit / Unit

* PERFORM cargar_imputaciones USING soc


* ' '
* 'WA_REG-ORDEN'
* wa_reg-orden.
*** NEA - Inicio - 06.05.2010 - Pet.7700003801
***JMM 21497 inicio
* PERFORM validacion_imputacion_real USING t_val.
***JMM 21497 fin
**PERFORM validacion_imputacion_real USING t_val codigo2 externo f_subrc.
*** NEA - Fin - 06.05.2010 - Pet.7700003801
*
**Fin Modificación GM1 - 28/03/2006 - 21497.
* ENDIF.
* IF NOT wa_reg-orden1 IS INITIAL.
**Inicio Modificación GM1 - 28/03/2006 - 21497.
** PERFORM imputaciones_y_division USING wa_reg-empre
** l_cecoe
** wa_reg-orden1
** ' '
** CHANGING wa_reg-divord1
** subrc.
** IF sy-subrc <> 0.
** PERFORM tratamiento_de_error USING '504' ' ' text-089 space.
** ENDIF.
* PERFORM cargar_imputaciones USING soc
* ' '
* 'WA_REG-ORDEN1'
* wa_reg-orden1.
*** NEA - Inicio - 06.05.2010 - Pet.7700003801
***JMM 21497 inicio
* PERFORM validacion_imputacion_real USING t_val.
***JMM 21497 fin
**PERFORM validacion_imputacion_real USING t_val codigo2 externo f_subrc.
*** NEA - Fin - 06.05.2010 - Pet.7700003801
*
**Fin Modificación GM1 - 28/03/2006 - 21497.
* ENDIF.
* IF NOT wa_reg-orden2 IS INITIAL.
**Inicio Modificación GM1 - 28/03/2006 - 21497.
** PERFORM imputaciones_y_division USING wa_reg-empre
** l_cecoe
** wa_reg-orden2
** ' '
** CHANGING wa_reg-divord2
** subrc.
** IF sy-subrc <> 0.
** PERFORM tratamiento_de_error USING '504' ' ' text-027 space.
** ENDIF.
* PERFORM cargar_imputaciones USING soc
* ' '
* 'WA_REG-ORDEN2'
* wa_reg-orden2.
*** NEA - Inicio - 06.05.2010 - Pet.7700003801
***JMM 21497 inicio
* PERFORM validacion_imputacion_real USING t_val.
***JMM 21497 fin
**PERFORM validacion_imputacion_real USING t_val codigo2 externo f_subrc.
*** NEA - Fin - 06.05.2010 - Pet.7700003801
*
REPRODUCTION FORBIDDEN Internal Use
Template Document Code Version and Date File ID Total Pages
SGI-MTC-03C-EN_01 0000-XX00 Version, 1.0./Borrador 490031247.docx 44
dd/mm/aaaa
Information and Communication Technology
Unit / Unit

**Fin Modificación GM1 - 28/03/2006 - 21497.


* ENDIF.
* ENDIF.
*
*
* IF codigo = 'XCFEC01E' OR codigo = 'XCNEC01E'
* OR codigo = 'XCFEC04E'.
* CONCATENATE cabec-codint '08' INTO codigo3.
* CALL FUNCTION 'Z_XX_CODIGOS'
* EXPORTING
* empr = soc
* func = codigo3
* vextern = externo
* IMPORTING
* e_vsie1 = l_orden3
* e_vsie2 = l_orden4
* e_vsie3 = l_orden5
* EXCEPTIONS
* falta_informar_codigo = 1
* codigo_inexistente = 2
* OTHERS = 3.
* IF sy-subrc NE 0 OR ( l_orden3 IS INITIAL AND
* l_orden4 IS INITIAL AND l_orden5 IS INITIAL ).
* CALL FUNCTION 'Z_XX_CODIGOS'
* EXPORTING
* empr = soc
* func = codigo3
* vextern = 'GENERAL'
* IMPORTING
* e_vsie1 = l_orden3
* e_vsie2 = l_orden4
* e_vsie3 = l_orden5
* EXCEPTIONS
* falta_informar_codigo = 1
* codigo_inexistente = 2
* OTHERS = 3.
* ENDIF.
* IF sy-subrc <> 0.
*** NEA - Inicio - 06.05.2010 - Pet.7700003801
**
****Inc. Modif JML 21078
* IF sy-subrc NE 2.
** IF sy-subrc = 1.
* PERFORM tratamiento_de_error USING '504' ' ' text-026 space.
* ENDIF.
**** PERFORM tratamiento_de_error USING '504' ' ' text-026 space.
** IF sy-subrc = 2.
** PERFORM tratamiento_de_error_mu USING '811' externo space space.
** gv_es_erroneo = 'X'.
** ENDIF.
**** Fin Modif. JML 10.11.2005
**
*** NEA - Inicio - 06.05.2010 - Pet.7700003801
* ENDIF.
* wa_reg-orden3 = l_orden3.
* wa_reg-orden4 = l_orden4.
* wa_reg-orden5 = l_orden5.
* CLEAR l_cecoe.
* IF NOT wa_reg-orden3 IS INITIAL.
REPRODUCTION FORBIDDEN Internal Use
Template Document Code Version and Date File ID Total Pages
SGI-MTC-03C-EN_01 0000-XX00 Version, 1.0./Borrador 490031247.docx 44
dd/mm/aaaa
Information and Communication Technology
Unit / Unit

**Inicio Modificación GM1 - 28/03/2006 - 21497.


** PERFORM imputaciones_y_division USING wa_reg-empre
** l_cecoe
** wa_reg-orden3
** ' '
** CHANGING wa_reg-divord3
** subrc.
** IF sy-subrc <> 0.
** PERFORM tratamiento_de_error USING '504' ' ' text-029 space.
** ENDIF.
* PERFORM cargar_imputaciones USING soc
* ' '
* 'WA_REG-ORDEN3'
* wa_reg-orden3.
*** NEA - Inicio - 06.05.2010 - Pet.7700003801
***JMM 21497 inicio
* PERFORM validacion_imputacion_real USING t_val.
***JMM 21497 fin
**PERFORM validacion_imputacion_real USING t_val codigo3 externo f_subrc.
*** NEA - Fin - 06.05.2010 - Pet.7700003801
*
**Fin Modificación GM1 - 28/03/2006 - 21497.
* ENDIF.
* IF NOT wa_reg-orden4 IS INITIAL.
**Inicio Modificación GM1 - 28/03/2006 - 21497.
** PERFORM imputaciones_y_division USING wa_reg-empre
** l_cecoe
** wa_reg-orden4
** ' '
** CHANGING wa_reg-divord4
** subrc.
** IF sy-subrc <> 0.
** PERFORM tratamiento_de_error USING '504' ' ' text-030 space.
** ENDIF.
* PERFORM cargar_imputaciones USING soc
* ' '
* 'WA_REG-ORDEN4'
* wa_reg-orden4.
*** NEA - Inicio - 06.05.2010 - Pet.7700003801
***JMM 21497 inicio
* PERFORM validacion_imputacion_real USING t_val.
***JMM 21497 fin
**PERFORM validacion_imputacion_real USING t_val codigo3 externo f_subrc.
*** NEA - Fin - 06.05.2010 - Pet.7700003801
*
**Fin Modificación GM1 - 28/03/2006 - 21497.
* ENDIF.
* IF NOT wa_reg-orden5 IS INITIAL.
**Inicio Modificación GM1 - 28/03/2006 - 21497.
** PERFORM imputaciones_y_division USING wa_reg-empre
** l_cecoe
** wa_reg-orden5
** ' '
** CHANGING wa_reg-divord5
** subrc.
** IF sy-subrc <> 0.
** PERFORM tratamiento_de_error USING '504' ' ' text-090 space.
** ENDIF.
* PERFORM cargar_imputaciones USING soc
REPRODUCTION FORBIDDEN Internal Use
Template Document Code Version and Date File ID Total Pages
SGI-MTC-03C-EN_01 0000-XX00 Version, 1.0./Borrador 490031247.docx 44
dd/mm/aaaa
Information and Communication Technology
Unit / Unit

* ' '
* 'WA_REG-ORDEN5'
* wa_reg-orden5.
*** NEA - Inicio - 06.05.2010 - Pet.7700003801
***JMM 21497 inicio
* PERFORM validacion_imputacion_real USING t_val.
***JMM 21497 fin
**PERFORM validacion_imputacion_real USING t_val codigo3 externo f_subrc.
*** NEA - Fin - 06.05.2010 - Pet.7700003801
*
**Fin Modificación GM1 - 28/03/2006 - 21497.
* ENDIF.
* ENDIF.
*
**LNC - Inicio - 09.11.2010 - Pet. 7700004203
*
* IF codigo = lc_xcfec04e.
* CONCATENATE cabec-codint lc_09 INTO codigo4.
*
* CALL FUNCTION 'Z_XX_CODIGOS2'
* EXPORTING
* empr = soc
* func = codigo4
* vextern = externo
** VSIE1 =
** VSIE2 =
** VSIE3 =
* fecha_imp = f_c-feccon
* IMPORTING
** C_CECOE2 =
** C_CECOE1 =
* c_cecoe3 = l_cecoe3
* c_cecoe4 = l_cecoe4
* c_cecoe5 = l_cecoe5
** C_CECOE =
** C_ORDEN =
** C_ORDEN2 =
* c_orden3 = l_orden6
* c_orden4 = l_orden7
* c_orden5 = l_orden8
** SY_SUBRC =
* EXCEPTIONS
* cec5_ord5_iguales = 1
* ord5_no_exist = 2
* ord5_cerra = 3
* cec4_ord4_iguales = 4
* ord4_no_exist = 5
* ord4_cerra = 6
* cec3_ord3_iguales = 7
* ord3_no_exist = 8
* ord3_cerra = 9
* cec2_ord2_iguales = 10
* ord2_no_exist = 11
* ord2_cerra = 12
* cec1_ord_iguales = 13
* ord_no_exist = 14
* ord_cerra = 15
* cec_ord_iguales = 16
* no_codigo = 17
REPRODUCTION FORBIDDEN Internal Use
Template Document Code Version and Date File ID Total Pages
SGI-MTC-03C-EN_01 0000-XX00 Version, 1.0./Borrador 490031247.docx 44
dd/mm/aaaa
Information and Communication Technology
Unit / Unit

* OTHERS = 18.
*
* IF sy-subrc <> 0 OR ( l_cecoe3 IS INITIAL AND
* l_cecoe4 IS INITIAL AND l_cecoe5 IS INITIAL
* AND l_orden6 IS INITIAL AND l_orden7 IS INITIAL
* AND l_orden8 IS INITIAL ).
*
* CALL FUNCTION 'Z_XX_CODIGOS2'
* EXPORTING
* empr = soc
* func = codigo4
* vextern = lc_general
** VSIE1 =
** VSIE2 =
** VSIE3 =
* fecha_imp = f_c-feccon
* IMPORTING
** C_CECOE2 =
** C_CECOE1 =
* c_cecoe3 = l_cecoe3
* c_cecoe4 = l_cecoe4
* c_cecoe5 = l_cecoe5
** C_CECOE =
** C_ORDEN =
** C_ORDEN2 =
* c_orden3 = l_orden6
* c_orden4 = l_orden7
* c_orden5 = l_orden8
** SY_SUBRC =
* EXCEPTIONS
* cec5_ord5_iguales = 1
* ord5_no_exist = 2
* ord5_cerra = 3
* cec4_ord4_iguales = 4
* ord4_no_exist = 5
* ord4_cerra = 6
* cec3_ord3_iguales = 7
* ord3_no_exist = 8
* ord3_cerra = 9
* cec2_ord2_iguales = 10
* ord2_no_exist = 11
* ord2_cerra = 12
* cec1_ord_iguales = 13
* ord_no_exist = 14
* ord_cerra = 15
* cec_ord_iguales = 16
* no_codigo = 17
* OTHERS = 18.
*
* ENDIF.
*
** IF sy-subrc <> 0.
** IF sy-subrc EQ 17.
** PERFORM tratamiento_de_error USING lc_504 space text-026 space.
** ENDIF.
** ENDIF.
*
* wa_reg-cecoe3 = l_cecoe3.
* wa_reg-cecoe4 = l_cecoe4.
REPRODUCTION FORBIDDEN Internal Use
Template Document Code Version and Date File ID Total Pages
SGI-MTC-03C-EN_01 0000-XX00 Version, 1.0./Borrador 490031247.docx 44
dd/mm/aaaa
Information and Communication Technology
Unit / Unit

* wa_reg-cecoe5 = l_cecoe5.
* CLEAR l_orden.
*
* IF NOT wa_reg-cecoe3 IS INITIAL.
*
* PERFORM cargar_imputaciones USING soc
* reg-feccon
* lc_wa_reg_cecoe3
* wa_reg-cecoe3.
*
* PERFORM validacion_imputacion_real USING t_val.
*
* ENDIF.
*
* IF NOT wa_reg-cecoe4 IS INITIAL.
*
* PERFORM cargar_imputaciones USING soc
* reg-feccon
* lc_wa_reg_cecoe4
* wa_reg-cecoe4.
*
* PERFORM validacion_imputacion_real USING t_val.
*
* ENDIF.
*
* IF NOT wa_reg-cecoe5 IS INITIAL.
*
* PERFORM cargar_imputaciones USING soc
* reg-feccon
* lc_wa_reg_cecoe5
* wa_reg-cecoe5.
*
* PERFORM validacion_imputacion_real USING t_val.
*
* ENDIF.
*
* wa_reg-orden6 = l_orden6.
* wa_reg-orden7 = l_orden7.
* wa_reg-orden8 = l_orden8.
*
* IF NOT wa_reg-orden6 IS INITIAL.
*
* PERFORM cargar_imputaciones USING soc
* space
* lc_wa_reg_orden6
* wa_reg-orden6.
*
* PERFORM validacion_imputacion_real USING t_val.
*
* ENDIF.
*
* IF NOT wa_reg-orden7 IS INITIAL.
*
* PERFORM cargar_imputaciones USING soc
* space
* lc_wa_reg_orden7
* wa_reg-orden7.
*
* PERFORM validacion_imputacion_real USING t_val.
REPRODUCTION FORBIDDEN Internal Use
Template Document Code Version and Date File ID Total Pages
SGI-MTC-03C-EN_01 0000-XX00 Version, 1.0./Borrador 490031247.docx 44
dd/mm/aaaa
Information and Communication Technology
Unit / Unit

*
* ENDIF.
*
* IF NOT wa_reg-orden8 IS INITIAL.
*
* PERFORM cargar_imputaciones USING soc
* space
* lc_wa_reg_orden8
* wa_reg-orden8.
*
* PERFORM validacion_imputacion_real USING t_val.
*
* ENDIF.
*
* ENDIF.
*
*
* IF codigo = lc_xcfec04e.
* CONCATENATE cabec-codint lc_10 INTO codigo5.
*
* CALL FUNCTION 'Z_XX_CODIGOS2'
* EXPORTING
* empr = soc
* func = codigo5
* vextern = externo
** VSIE1 =
** VSIE2 =
** VSIE3 =
* fecha_imp = f_c-feccon
* IMPORTING
** C_CECOE2 =
** C_CECOE1 =
* c_cecoe3 = l_cecoe6
* c_cecoe4 = l_cecoe7
* c_cecoe5 = l_cecoe8
** C_CECOE =
** C_ORDEN =
** C_ORDEN2 =
* c_orden3 = l_orden9
* c_orden4 = l_orden10
* c_orden5 = l_orden11
** SY_SUBRC =
* EXCEPTIONS
* cec5_ord5_iguales = 1
* ord5_no_exist = 2
* ord5_cerra = 3
* cec4_ord4_iguales = 4
* ord4_no_exist = 5
* ord4_cerra = 6
* cec3_ord3_iguales = 7
* ord3_no_exist = 8
* ord3_cerra = 9
* cec2_ord2_iguales = 10
* ord2_no_exist = 11
* ord2_cerra = 12
* cec1_ord_iguales = 13
* ord_no_exist = 14
* ord_cerra = 15
* cec_ord_iguales = 16
REPRODUCTION FORBIDDEN Internal Use
Template Document Code Version and Date File ID Total Pages
SGI-MTC-03C-EN_01 0000-XX00 Version, 1.0./Borrador 490031247.docx 44
dd/mm/aaaa
Information and Communication Technology
Unit / Unit

* no_codigo = 17
* OTHERS = 18.
*
* IF sy-subrc <> 0 OR ( l_cecoe6 IS INITIAL AND l_cecoe7 IS INITIAL
* AND l_cecoe8 IS INITIAL AND l_orden9 IS INITIAL
* AND l_orden10 IS INITIAL AND l_orden11 IS INITIAL ).
*
* CALL FUNCTION 'Z_XX_CODIGOS2'
* EXPORTING
* empr = soc
* func = codigo5
* vextern = lc_general
** VSIE1 =
** VSIE2 =
** VSIE3 =
* fecha_imp = f_c-feccon
* IMPORTING
** C_CECOE2 =
** C_CECOE1 =
* c_cecoe3 = l_cecoe6
* c_cecoe4 = l_cecoe7
* c_cecoe5 = l_cecoe8
** C_CECOE =
** C_ORDEN =
** C_ORDEN2 =
* c_orden3 = l_orden9
* c_orden4 = l_orden10
* c_orden5 = l_orden11
** SY_SUBRC =
* EXCEPTIONS
* cec5_ord5_iguales = 1
* ord5_no_exist = 2
* ord5_cerra = 3
* cec4_ord4_iguales = 4
* ord4_no_exist = 5
* ord4_cerra = 6
* cec3_ord3_iguales = 7
* ord3_no_exist = 8
* ord3_cerra = 9
* cec2_ord2_iguales = 10
* ord2_no_exist = 11
* ord2_cerra = 12
* cec1_ord_iguales = 13
* ord_no_exist = 14
* ord_cerra = 15
* cec_ord_iguales = 16
* no_codigo = 17
* OTHERS = 18.
*
* ENDIF.
*
** IF sy-subrc <> 0.
** IF sy-subrc EQ 17.
** PERFORM tratamiento_de_error USING lc_504 space text-026 space.
** ENDIF.
** ENDIF.
*
* wa_reg-cecoe6 = l_cecoe6.
* wa_reg-cecoe7 = l_cecoe7.
REPRODUCTION FORBIDDEN Internal Use
Template Document Code Version and Date File ID Total Pages
SGI-MTC-03C-EN_01 0000-XX00 Version, 1.0./Borrador 490031247.docx 44
dd/mm/aaaa
Information and Communication Technology
Unit / Unit

* wa_reg-cecoe8 = l_cecoe8.
* CLEAR l_orden.
*
* IF NOT wa_reg-cecoe6 IS INITIAL.
*
* PERFORM cargar_imputaciones USING soc
* reg-feccon
* lc_wa_reg_cecoe6
* wa_reg-cecoe6.
*
* PERFORM validacion_imputacion_real USING t_val.
*
* ENDIF.
*
* IF NOT wa_reg-cecoe7 IS INITIAL.
*
* PERFORM cargar_imputaciones USING soc
* reg-feccon
* lc_wa_reg_cecoe7
* wa_reg-cecoe7.
*
* PERFORM validacion_imputacion_real USING t_val.
*
* ENDIF.
*
* IF NOT wa_reg-cecoe8 IS INITIAL.
*
* PERFORM cargar_imputaciones USING soc
* reg-feccon
* lc_wa_reg_cecoe8
* wa_reg-cecoe8.
*
* PERFORM validacion_imputacion_real USING t_val.
*
* ENDIF.
*
* wa_reg-orden9 = l_orden9.
* wa_reg-orden10 = l_orden10.
* wa_reg-orden11 = l_orden11.
*
* IF NOT wa_reg-orden9 IS INITIAL.
*
* PERFORM cargar_imputaciones USING soc
* space
* lc_wa_reg_orden9
* wa_reg-orden9.
*
* PERFORM validacion_imputacion_real USING t_val.
*
* ENDIF.
*
* IF NOT wa_reg-orden10 IS INITIAL.
*
* PERFORM cargar_imputaciones USING soc
* space
* lc_wa_reg_orden10
* wa_reg-orden10.
*
* PERFORM validacion_imputacion_real USING t_val.
REPRODUCTION FORBIDDEN Internal Use
Template Document Code Version and Date File ID Total Pages
SGI-MTC-03C-EN_01 0000-XX00 Version, 1.0./Borrador 490031247.docx 44
dd/mm/aaaa
Information and Communication Technology
Unit / Unit

*
* ENDIF.
*
* IF NOT wa_reg-orden11 IS INITIAL.
*
* PERFORM cargar_imputaciones USING soc
* space
* lc_wa_reg_orden11
* wa_reg-orden11.
*
* PERFORM validacion_imputacion_real USING t_val.
*
* ENDIF.
*
* ENDIF.
* 20170705 - JGJ - FIN - &ORDEN* o &CECOE* AMPLIAR LOGICA SI AMBOS
(Asterisqueado)
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
ENDFORM. "VALIDAR_EXTERNO2

*&---------------------------------------------------------------------*
*& Form F_CHANGE_CONCEP
*----------------------------------------------------------------------*
* -->P_3878 text
*----------------------------------------------------------------------*
FORM f_change_concep USING VALUE(p_3878).

* 2018074 - JGJ - INI - &ORDEN* o &CECOE* "/" si viene vacío.


* READ TABLE t_esquema2 WITH KEY camnom = p_3878.
* IF sy-subrc EQ 0.
IF t_esquema2-camnom(9) EQ p_3878.
IF t_esquema2-camvlr IS INITIAL OR t_esquema2-camvlr = 'NO_COD_EXT'.
* 20180704 - JGJ - FIN - &ORDEN* o &CECOE* "/" si viene vacío.
IF t_esquema2-concep NE '/'.
MOVE '/' TO t_esquema2-concep.
MODIFY t_esquema2 INDEX sy-tabix TRANSPORTING concep .
ENDIF.
ELSE.
IF t_esquema2-concep EQ '/'.
*No movemos el blanco, falla
ENDIF.
ENDIF.
ENDIF.

ENDFORM.

 Report: ZWCIF990 - Elaboración del fichero de contabilización.


o Modificación: 26.07.2017 - Tratamiento Conceptos simultáneos &CECOE y
&ORDEN sin informar

REPRODUCTION FORBIDDEN Internal Use


Template Document Code Version and Date File ID Total Pages
SGI-MTC-03C-EN_01 0000-XX00 Version, 1.0./Borrador 490031247.docx 44
dd/mm/aaaa
Information and Communication Technology
Unit / Unit

Subrutinas.
************************************************************************
* Tratamiento de las lineas con apunte numérico.
************************************************************************
FORM proceso_apunte_num.
DATA: pos_apunte LIKE bseg-buzei,
campo1 LIKE zcequtfunc-camnom,
campo2 LIKE zcequtfunc-camnom,
indice LIKE sy-index.

* 20170717 - JGJ - INI - Definir variable para controlar CONCEP a "/" y CAMVLR vacío
DATA: sw_conc_orden_vacio TYPE C.
* 20170717 - JGJ - FIN - Definir variable para controlar CONCEP a "/" y CAMVLR vacío

* Si la última posición era alfabética, se graba.


IF f_hay_alfabeticas = 'Y' AND f_alfabeticas_traspasadas = space.
MOVE-CORRESPONDING zc015 TO i_bbseg_alf.

* Si el importe es negativo, se pone positivo y se imputa en la cuenta


* inversa
IF i_bbseg_alf-wrbtr CA '-'.
REPLACE '-' WITH space INTO i_bbseg_alf-wrbtr.
REPLACE '-' WITH space INTO i_bbseg_alf-dmbtr.
i_bbseg_alf-newbs = zc015-newbsi.
ENDIF.
APPEND i_bbseg_alf.
f_alfabeticas_traspasadas = 'X'.
ENDIF.

pos_apunte = l_fichero-posnum.

*--- posicionamiento sobre la posición de esquemas requerida.


CLEAR i_lineas_esquema.
READ TABLE i_lineas_esquema WITH KEY numeq = zc010-numeq
vidat = zc010-vidat
buzei = pos_apunte
BINARY SEARCH.

indice = sy-tabix.

IF sy-subrc NE 0.
*--- error: no existe una posición de esquemas que se corresponda
*--- con el documento. En principio no puede ser.
MESSAGE e001 WITH text-007.
ENDIF.

*--- comprobación de los conceptos


* 20170717 - JGJ - INI - Inicializar variable para controlar CONCEP a "/" y CAMVLR vacío
CLEAR sw_conc_orden_vacio.
* 20170717 - JGJ - INI - Inicializar variable para controlar CONCEP a "/" y CAMVLR vacío

IF i_lineas_esquema-contab NE l_fichero-concep.
* 20170712 - JGJ - INI - En función de las modificaciones en ZWCIF110 y 530, con la grabación
de CECOE/ORDER
* simultáneos no tratar el que venga con:

REPRODUCTION FORBIDDEN Internal Use


Template Document Code Version and Date File ID Total Pages
SGI-MTC-03C-EN_01 0000-XX00 Version, 1.0./Borrador 490031247.docx 44
dd/mm/aaaa
Information and Communication Technology
Unit / Unit

* CONCEP: "/" y
* CAMVLR a ESPACIOS, se "ignorará el registro".
*
IF l_fichero-concep = '/' AND l_fichero-CAMVLR IS INITIAL.
sw_conc_orden_vacio = 'X'.
ELSE.
MESSAGE e001 WITH text-008.
* 20170712 - JGJ - FIN
ENDIF.
ENDIF.

MOVE i_lineas_esquema TO zc015.

* FEX00045: Cambio para el GID, cuando monope = moneda doc.


IF f_ignorar_divisa = 'X'.
zc015-dmbtr = '/'.
ENDIF.

*--- tratamiento de los campos variables.

DO.
ASSIGN COMPONENT sy-index OF STRUCTURE zc015 TO <fs2>.

IF sy-subrc NE 0.
EXIT.
ENDIF.

campo1 = <fs2>.
IF campo1(1) EQ '&'.
CONCATENATE 'REG-' campo1+1 INTO campo1.
ENDIF.

IF campo1 EQ l_fichero-camnom.
* 20170712 - JGJ - INI - Si switch activado cargar "/".
IF sw_conc_orden_vacio = 'X'.
<fs2> = '/'.
ELSE.
<fs2> = l_fichero-camvlr.
ENDIF.
* 20170712 - JGJ - FIN - Si switch activado cargar "/".
EXIT.
ENDIF.
ENDDO.

* MOD PRUEBAS 23.09.2005


IF ( l_fichero-camnom = 'REG-TEXTO' )
AND ( zc015-numeq IN s_esquemas ).
zc015-sgtxt = l_fichero-camvlr.
ENDIF.
* FIN MOD PRUEBAS 23.09.2005

MOVE zc015 TO i_lineas_esquema.


MODIFY i_lineas_esquema INDEX indice.
ENDFORM. "PROCESO_APUNTE_NUM

REPRODUCTION FORBIDDEN Internal Use


Template Document Code Version and Date File ID Total Pages
SGI-MTC-03C-EN_01 0000-XX00 Version, 1.0./Borrador 490031247.docx 44
dd/mm/aaaa
Information and Communication Technology
Unit / Unit

4. Integration flows
N.A.

REPRODUCTION FORBIDDEN Internal Use


Template Document Code Version and Date File ID Total Pages
SGI-MTC-03C-EN_01 0000-XX00 Version, 1.0./Borrador 490031247.docx 44
dd/mm/aaaa
Information and Communication Technology
Unit / Unit

5. Persistence of information
N.A.

REPRODUCTION FORBIDDEN Internal Use


Template Document Code Version and Date File ID Total Pages
SGI-MTC-03C-EN_01 0000-XX00 Version, 1.0./Borrador 490031247.docx 44
dd/mm/aaaa
Information and Communication Technology
Unit / Unit

6. Controls
6.1. Security Control
N.A

6.2. Control Mechanisms


N.A

6.3. Error Management


N.A

6.4. Mechanism for information management


N.A

REPRODUCTION FORBIDDEN Internal Use


Template Document Code Version and Date File ID Total Pages
SGI-MTC-03C-EN_01 0000-XX00 Version, 1.0./Borrador 490031247.docx 44
dd/mm/aaaa
Information and Communication Technology
Unit / Unit

Appendix
A. Definitions, acronyms, abbreviations
List of definitions of specific terms used in the terms of the document or of ICT that are also used in other
documents.

List of acronyms. Full description of each abbreviation adopted.


Acrónimo Descripción
VPN Virtual Private Network
ICT Information and Communication Technology
IDS Intrusion Detection System
WLS WebLogic Server
Windows XP Windows XP Service Pack2/Service Pack 3
SP2/SP3
IE8 Internet Explorer 8
SOA Service-Oriented Architecture
SAP RFC SAP Remote Function Call
SAP IDOC SAP Intermediate Document
SAP JCO SAP Java Connector
SOAP Simple Object Access Protocol
XML eXtensible Markup Language
ETL Extraction, Transformation and Loading
WS Web Service

Tabla 1 – Definitions, acronyms, abbreviations

Index of figures and tables


B.Figures

Tabla 1 – Definiciones, acrónimo, abreviatura...........................................................................11

C.Tables

Table 1 – Definitions, acronyms, abbreviations..........................................................................10

REPRODUCTION FORBIDDEN Internal Use


Template Document Code Version and Date File ID Total Pages
SGI-MTC-03C-EN_01 0000-XX00 Version, 1.0./Borrador 490031247.docx 44
dd/mm/aaaa

You might also like