BAdIs to change the exported data
Document type | BAdI |
---|---|
Delivery | /AEB/AES_CONS_SDV_01 |
Shipment | /AEB/AES_CONS_SHP_01 |
Invoice | /AEB/AES_CONS_INV_01 |
Purchase document | /AEB/AES_CONS_PD_01 |
Incoming Invoice | /AEB/AES_CONS_II_01 |
Freight order | /AE1/AES_CONS_FRO_01 |
Material document | /AEB/AES_CONS_MD_01 |
The data sent to Customs Management can be changed using the according BAdI as listed in the table above. Each BAdI offers an interface method AFTER_STD_FILLING with the parameter IM_VALUE. This parameter contains the data determined by the standard logic of the plug-in. The data contained by this structure will be sent to Customs Management eventually, so you need to change it according to your requirements.
This simple example shows how you can change a single field value in the IM_VALUE structure:
DATA:
remark TYPE /aeb/if_aes_pb_consignment_do=>t_remark.
CONCATENATE 'Invoice number: ' im_vbrk-vbeln ', invoice date: ' im_vbrk-fkdat
INTO remark
SEPARATED BY space.
im_value->set_remark( remark ).
The IM_VALUE parameter is a structure of type /AEB/IF_AES_PB_CONSIGNMENT_DO, which represents a consignment of Customs Management. It contains different sub objects:
- Deliveries
- Items
- Packages
- Parties
So regardless of what kind of SAP business object triggered the data transfer, Customs Management is always receiving a consignment with the related sub-structures.
SAP business object transfered to AEB | SAP level | Interface object |
---|---|---|
Invoice | Invoice | Consignment |
-"- | Invoice | Delivery |
-"- | Invoice items | Item |
Shipment | Shipment | Consignment |
-"- | Outbound deliveries of the shipment | Delivery |
-"- | Outbound delivery items | Item |
Outbound delivery | Outbound delivery | Consignment |
-"- | Outbound delivery | Delivery |
-"- | Outbound delivery items | Item |
Updated 5 days ago
The following sections provide some code snippets to demonstrate changing of the data.