11.2.2.1 Descripción general de implementación (IS-U)
Todas las ampliaciones de mapeo siguen un protocolo común a la hora de su implementación.
En primer lugar se comprueba en el excel de mapeos (suministrado en la documentación técnica de la herramienta) cuál es la asignación que se hace por defecto para cada campo. Si esta coincide con la propuesta del cliente de la implantación, entonces no hay que efectuar ninguna modificación adicional. Si por el contrario la propuesta difiere, hay que determinar si existe una ampliación de tipo BAdI que nos permita cambiar el mapeo para que tome el valor solicitado.
Todas las BAdIs que se pueden utilizar para cambiar los mapeos por defecto están agrupadas en el punto de ampliación All mapping enhancements follow a common protocol at the time of implementation.
Firstly it is checked in the mapping excel (provided in the technical documentation of the tool) which is the default assignment for each field. If this coincides with the client's proposal of the implementation, then no further modification is necessary. If on the contrary the proposal differs, it is necessary to determine if there is an extension of type BAdI that allows us to change the mapping so that it takes the requested value.
All the BAdIs that can be used to change the default mappings are grouped in the extension point /EDGE/SII_MAPEOS_ISU.
Partiendo de este repositorio de ampliaciones y comprobando el código del método GET_ESTRUCTURA_XML de la clase que aplique al mapeo del campo en cuestión podemos determinar la existencia (o no) de una alternativa de ampliación a través de BAdI.
Cada flujo va a tener suministradas una o dos BAdIs. Las finalizadas en el sufijo "_CL" solamente proporcionan una serie de métodos sin código por defecto y que nosotros deberemos completar con el mapeo correspondiente. Las que no tienen sufijo "_CL" suministran un código base por defecto que se puede alterar para ajustarlo a las necesidades de cada cliente.
...
Starting from this repository of enhancements and checking the code of the method GET_ESTRUCTURA_XML of the class that applies to the mapping of the field in question we can determine the existence (or not) of an alternative of expansion through BAdI.
Each stream will have one or two BAdIs supplied. The finalized in the suffix "_CL" only provide a series of methods without default code and that we must complete with the corresponding mapping. Those that do not have a "_CL" suffix provide a default base code that can be altered to fit the needs of each client.
- BAdIs with default implementation:
- /EDGE/BADI_SII_MAPEOS_FE_IS: Esta BAdI es utilizada para campos a mapear en el libro de facturas emitidas This BAdI is used for fields to map in the IS-U , los métodos que contiene son los siguientesissued invoice book, the methods it contains are as follows::
- GET_TIPO_FACTURA: Recupera el tipo de facturaReturns the invoice type.
- GET_FACTURAS_RECTIFICATIVAS: Recupera las facturas rectificativasReturns the invoices of rectification.
- GET_IMPORTE_RECTIFICATIVAS: Recupera el importe de las facturas rectificativasReturns the rectification invoices amount.
- GET_REGIMEN_ESPECIAL: Recupera el valor del régimen especialReturns the special scheme value.
- GET_SOCIEDAD: Recupera el valor de la sociedadReturns the company code.
- SET_SOCIEDAD: Asigna el valor de la sociedadAssigns the company code.
- GET_PERIODO_IMPOSITIVO: Recupera el período impositivoReturns the tax period.
- GET_NUMERO_FACTURA: Recupera el valor de número de facturaReturns the invoice number.
- GET_BASE_IMPONIBLE: Recupera el valor de la base imponibleReturns the taxable base.
- GET_DATOS_CONTRAPARTE: Recupera los diferentes datos de identificación de la contraparte (Nombre razón, código de paísReturns the different identification data of the counterparty (Ledger, country code, NIF, etc ...).
- GET_DESC_OPERACION: Recupera la descripción de la operaciónReturns the operation description.
- /EDGE/BADI_SII_MAPEOS_FE_IS: Esta BAdI es utilizada para campos a mapear en el libro de facturas emitidas This BAdI is used for fields to map in the IS-U , los métodos que contiene son los siguientesissued invoice book, the methods it contains are as follows::
- /EDGE/BADI_SII_MAPEOS_FE_SD: Esta BAdI es utilizada para campos a mapear en el libro de facturas emitidas SD, los métodos que contiene son los siguientes This BAdI is used for fields to be mapped in the invoice book issued SD, the methods it contains are as follows:
- GET_SOCIEDAD: Recupera el valor de la sociedadReturns the company code.
- SET_SOCIEDAD: Asigna el valor de la sociedadAssigns the company code.
- GET_PERIODO_IMPOSITIVO: Recupera el período impositivo Returns the tax period.
- GET_NUMERO_FACTURA: Recupera el valor de número de facturaReturns the invoice number.
- GET_DATOS_CONTRAPARTE: Recupera los diferentes datos de identificación de la contraparte (Nombre razón, código de país Returns the different identification data of the counterparty (Ledger, country code, NIF, etc ...).
- GET_DESC_OPERACION: Recupera la descripción de la operaciónReturns the operation description.
- BAdIs sin implementación por defectowithout default implementation:
- /EDGE/IF_SII_MAPEOS_FE_IS_CLI: Esta BAdI es utilizada para campos a mapear en el libro de facturas emitidas para IS-U, los métodos que contiene son los siguientesThis BAdI is used for fields to be mapped in the invoice book issued for IS-U, the methods it contains are as follows:
- GET_EMISOR_RESUMEN: Recupera resumen de emisorReturns sender summary.
- ES_ALTA_NEGATIVA: Determinación de si es un alta negativa Determination of if is a high negative.
- GET_NIF_REPRESENTANTE: Recupera el NIF del representanteReturns the NIF of the representative.
- ES_NO_SUJETA: Determinación de si una factura es no sujetaDetermination of whether an invoice is not subject.
- GET_IMPORTE_NO_SUJETA: Recupera el importe de facturas no sujetasReturns the non-subject invoices amount.
- GET_FACTURAS_AGRUPADAS: Recupera datos de facturas agrupadasReturns data from grouped invoices.
- GET_TIPO_RECTIFICATIVA: Recupera el tipo de factura rectificativaReturns the amendment bill type.
- GET_CAUSA_EXENCION: Recupera campo de la causa de exenciónReturns cause of exemption.
- GET_ENTREGA_O_SERVICIO: Recupera las entregas y servicios para el desglose por tipo de operación en el caso que aplique Returns the deliveries and services for the breakdown by type of operation in the case that applies.
- /EDGE/IF_SII_MAPEOS_FE_IS_CLI: Esta BAdI es utilizada para campos a mapear en el libro de facturas emitidas para IS-U, los métodos que contiene son los siguientesThis BAdI is used for fields to be mapped in the invoice book issued for IS-U, the methods it contains are as follows:
- /EDGE/BADI_SII_MAPEOS_FE_SD_CL: Esta BAdI es utilizada para campos a mapear en el libro de facturas emitidas para SD, los métodos que contiene son los siguientes: This BAdI is used for fields to map in the invoice book issued for SD, the methods it contains are as follows
- GET_EMISOR_RESUMEN: Recupera resumen de emisorReturns sender summary.
- ES_ALTA_NEGATIVA: Determinación de si es un alta negativa Determination of if is a high negative.
- GET_NIF_REPRESENTANTE: Recupera el NIF del representante Returns the NIF of the representative.
- ES_NO_SUJETA: Determinación de si una factura es no sujetaDetermination of whether an invoice is not subject.
- GET_IMPORTE_NO_SUJETA: Recupera el importe de facturas no sujetas Returns the non-subject invoices amount.
- GET_FACTURAS_AGRUPADAS: Recupera datos de facturas agrupadasReturns data from grouped invoices.
- GET_TIPO_RECTIFICATIVA: Recupera el tipo de factura rectificativaReturns the amendment bill type.
- GET_CAUSA_EXENCION: Recupera campo de la causa de exención Returns cause of exemption.
- GET_ENTREGA_O_SERVICIO: Recupera las entregas y servicios para el desglose por tipo de operación en el caso que apliqueReturns the deliveries and services for the breakdown by type of operation in the case that applies.
- GET_NUM_REGISTRO_ACUERDO: Recupera el valor del campo número de registro acuerdo facturaciónReturns value of the billing agreement record number .
- GET_TIPO_FACTURA: Recupera el tipo de facturaReturns the invoice type.
- GET_REGIMEN_ESPECIAL: Recupera el valor del régimen especial.
- GET_FACTURAS_RECTIFICADAS: Recupera las facturas rectificativas Returns the rectification invoices.
- GET_IMPORTE_RECTIFICATIVAS: Recupera el importe de las facturas rectificativasReturns the rectification invoices amounts.
- GET_BASE_IMPONIBLE: Recupera el valor de la base imponibleReturns the taxable base.
- GET_TIPO_NO_EXENTA: Recupera el valor del campo tipo no exenta.
...
- Reurns the non-exempt type.
If there is no alternative to the BAdI extension for the field, the option to implement a class Z as the daughter of the /EDGE/CL_EDOC_SII_MAP_IS_L . Una vez hecho esto, redefiniríamos el método class must be considered. Once this is done, we would redefine the GET_ESTRUCTURA_XML utilizando el método super para reutilizar la lógica existente con las modificaciones que consideremos necesarias o directamente volver a escribirlo por completo. Otra posibilidad es crear una ampliación POST u OVERWRITE sobre el método method using the super method to reuse the existing logic with the modifications we deem necessary or to rewrite it completely. Another possibility is to create a POST or OVERWRITE implementation over the GET_ESTRUCTURA_XML method.