Ansicht
Dokumentation

PAY_BR_EFD_BADI16 - BAdI: eSocial - sending of events to SAP TDF

PAY_BR_EFD_BADI16 - BAdI: eSocial - sending of events to SAP TDF

ABAP Short Reference   General Data in Customer Master  
This documentation is copyright by SAP AG.
SAP E-Book

This Business Add-In (BAdI) is used in component Payroll - Brazil (PY-BR). This BAdI allows for the eSocial events generated in the solution SAP ERP HCM to be sent to the application SAP Tax Declaration Framework for Brazil, option eSocial (SAP TDF eSocial) and, furthermore, it validates the connection between the two parts. From the SAP TDF eSocial you use the eSocial cockpit to monitor the events and send them to the eSocial national environment.

The interface IF_HRPAYBR_EFD_TDF_SEND consists of the following methods: ,,

  • Check if the connection with the eSocial cockpit is active (CHECK_CONNECTION): This method tests the option eSocial: Use of external cockpit (EFDEX) to confirm if the connection with SAP TDF eSocial is active (parameter CV_CONNECTION_ACTIVE).
The method also allows you to insert a message specifying to the user that the connection with SAP TDF eSocial is not active (parameter CS_MESSAGE_TO_USER). This message appears when the user runs the transaction eSocial: Batch query (PC00_M37_EFD_ESCHED), so that you know that the connection test failed.
  • Send events by XML to eSocial cockpit(SEND_EVENTS): This method allows for the sending of eSocial events from SAP ERP HCM to SAP TDF eSocial.
Based on the event type and legal code of event type information, you can change the parameter CT_EVENTS_XML referring to the Table type for external scheduler (HRPADBR_EFDF_T_EXT_SCHEDULER). In this table type use the Structure for external sending by scheduler (HRPADBR_EFDF_S_EXT_SCHEDULER) to fill in the following data:
  • EVENT_ID: The event identifier in SAP ERP HCM

  • EVENT_XML: the XML file of the event in SAP ERP HCM

  • SENT: If the event was sent correctly to SAP TDF eSocial. By default, the field is blank and not filled.

You must have activated the connection with the cockpit of SAP TDF eSocial in the customizing activity Specify use of external cockpit, using the value 2 for the option eSocial: Use of external cockpit (EFDEX).

After implementing this BAdI, use the transaction eSocial: Event sending (PC00_M37_EFD_ESCHED) to send SAP ERP HCM events to the SAP TDF eSocial.






PERFORM Short Reference   General Material Data  
This documentation is copyright by SAP AG.

Length: 3010 Date: 20240523 Time: 185806     sap01-206 ( 58 ms )