Recently we discovered that records copied with DESTINATION_APP keyword from one application (say SourceApp) to another (say TargetApp) are not subject to the DEFAULT Logic calculation.
There are some OSS notes explaining this behaviour:
DEFAULT.LGF is triggered in following 3 situations:
- Data is sent by input schedule.
- Data is sent by journal. System will search for JOURNAL.LGF first. If JOURNAL.LGF exists, it would be triggered. If there is no JOURNAL.LGF, then DEFAULT.LGF would be triggered.
- Execute data packages which have the option “Select whether to run default logic for stored values after copying”.
But when DESTINATION_APP does copy data from a SourceApp to a TargetApp: in TargetApp none of the mentioned conditions happens!
OSS Note 1636452 was written bor BPC NW 7.x, but is valid release indipendently.
This note does confirm the behaviour we observed is by SAP design.
In our scenario data in TargetApp are inconsistent because those directly posted are processed by the DEFAULT.lgx, while those ones copied from SOURCE_APP aren’t.
Due to the system design we decided to overcome such an issue in the following way:
1. Implement the HTG named How to Custom BADI for replicating Destination_App Script Logic Functionality in SAP BPC NW.
2. The code contained in the Transport files provided in the HTG writted by Sheldon Eldestein had to be adapted: it was written for BPC NW 7.0.
3. When the method EXECUTE comes to the WRITE_BACK method call we just changed the importing parameter I_DEFAULT_LOGIC to ABAP_TRUE
4. In order to have even more flexibility we decided also to add another BAdI parameter (e.g RUN_DEFAULT = ON) in order to use the same Class for different scenarios, depending if the DEFAULT.lgf has to be submitted in TargetApp or not.
If you found this blog was helpful or interesting please vote the idea in SAP IDEA Place: DESTINATION_APP does not run DEFAULT.lgx (Default Logic).