on 2024 Sep 04 1:10 PM
Hi Experts,
I have a scenario where in one of the customising, i.e., maintained via SM30, the screen is not getting refreshed after the data is saved to the table in the DB.
Scenario:
The table stores information about the active/inactive details of an attribute for a specified validity. For example, material active/inactive in a given period. The requirement here is that when a user enters information about a material which is already present in the DB with a specific validity, say date 1 to date 2. Then a custom event is written which checks the validity of the newly entered entry, in this case same material but with overlapping validity, say date 4 and date 5. In this case the delimitation should happen automatically and if needed new record should be created. This can arise in a situation where the dates are in the following order date 1 < date 4 < date 5 < date 2. In such situation there would be 3 records formed by updating new record, creating the entered record and the additional new record. For example. Record 1 with validity date 1 to ( date 4 - 1), Record 2 with validity date 4 to date 5, and Record 3 with validity from ( date 5 + 1 ) to date 2. So the new record is generated but is not displayed on the maintenance screen unless the maintenance view is re-opened.
Expectation:
Once the date is saved to the DB the maintenance screen should also show the additional record created.
Example:
| Material | Active | Valid From | Valid To |
| M12345 | X | 01.01.2020 | 31.12.9999 |
| Material | Active | Valid From | Valid To |
| M12345 | - | 01.01.2024 | 31.12.2024 |
| Material | Active | Valid From | Valid To | |
| M12345 | X | 01.01.2020 | 31.12.2023 | (existing) |
| M12345 | 01.01.2024 | 31.12.2024 | (user input) | |
| M12345 | X | 01.01.2025 | 31.12.9999 | (generated) |
| Material | Active | Valid From | Valid To | |
| M12345 | X | 01.01.2020 | 31.12.2023 | (existing & updated) |
| M12345 | 01.01.2024 | 31.12.2024 | (user input) |
As mentioned, the user can only see the generated data once the maintenance screen is re-loaded.
Technical Information:
It would be great if someone can provide some working clue on how to achieve the refresh of the TMG screen when a new record is created programatically.
ABAP Extensibility SAP NetWeaver Application Server for ABAP
Request clarification before answering.
Hello,
Did you try with option using LOOP AT TOTAL. ? when you use Event 01 or 18 any new entry are added to a Table called "Total" you can loop over this table but have to handle split of variables into the work area of the table and write your custom logic in the event and append/Modify the row into the "Total". Interesting part is even though User enters only one record and presses save the backend logic will get executed and update the values and the table with new records when user presses back button. I replicated the scenario and worked perfectly fine. Comment here if it has worked for you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 17 | |
| 8 | |
| 8 | |
| 6 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.