I am sharing few not often used tips of IDOCs in this article. Generally i have seen people trying to achieve many things programmatically by coding in the user exits etc. While we have some SAP standard ways of achieving them like idoc Views,encryption,acknowledgements etc which can easily be achieved by configuration.
Suppressing unwanted segments- The standard Idoc types are assigned to various message types and applications. An idoc may contain various segments which are not required in some scenarios. Also, sometimes some unwanted data is sent to other applications. We may manually suppress the unwanted segments inside some user exit of the processing function module through ABAP code. But there can be some consequences of using this technique and this may not be a reliable method. Instead of this approach, Standard SAP provides reduced message type and Idoc View techniques to achieve the same solution.
Specify the view name in the partner profile while doing the configuration.
Basic Level data encryption in IDOCs- An idoc can contain some sensitive information like credit card details of customer, phone numbers, pricing information etc. If we want this data to be encrypted for display purpose only. We can encrypt some data in the Idocs for display purpose only, like the customer care representative can see the last 5 characters of the credit card number or phone number (Phone XXXXX-53108).The transaction display authorization to some particular users can be managed by standard idoc authorization objects but if we don't want some particular fields in segments to be displayed to the users. We can use transaction WECRYPTDISPLAY.
This transaction is just a maintenance view of table EDCRYPTDISPLAY. We can maintain particular segments of an idoc in this transaction. Once data is maintained, In all the display transactions like WE02, WE05,WE07, WE09,WE10 etc. This sensitive data will be displayed as '*'.
We can also change the masked character by creating a custom function module. This method has limitations that the data is actually not encrypted in the database. Anyone can check the correct values in the database table if they have the access.
Change IDOC Data/Control parameters programmatically- The failed Idoc can be reprocessed from the transaction BD87. Like, if an idoc fails due to master data issue, we can correct the master data and then reprocess the idoc. But there is a limitation - we cannot change the idoc data for reprocessing. If our idoc has wrong data, we cannot reprocess it as it will fail once again.
*** try at your own risk***
So for few idoc status, we can programmatically change the contents of an IDOC, to change the data of an IDOC follow the below steps.
If we want to add the idoc to the inbound queue directly after editing. While calling the FM EDI_DOCUMENT_CLOSE_EDIT we can set 'status_75' flag as X. The Idoc status will change to 75 and the IDoc will be added to the queue.
We can also use EDI_CHANGE_CONTROL_SEGMENT to change the control data.
Idoc Acknowledgement for ALE and EDI scenarios
Idoc acknowledgement is an idoc by receiver just to inform the sender about the state of the outbound Idoc. The acknowledgment Idoc changes the status of the outbound idoc of the sender to a particular status depending upon negative or a positive acknowledgement. There are several Idoc status which can tell the state of the outbound idoc in the receiver system.
SAP has provided different idocs for ALE and EDI Scenarios.
The acknowledgement idoc changes the status of the outbound idoc. The below Idoc status can be changed by the outbound IDoc.
IDoc Status | Description |
---|---|
14 | Interchange Acknowledgement positive |
15 | Interchange acknowledgement negative |
16 | Functional acknowledgement |
17 | Functional acknowledgement negative |
40 | Application document not created in target system |
41 | Application document created in receiving system |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
2 | |
2 | |
2 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 |