on ‎2020 Dec 10 1:41 PM
we have a requirement in our GTS system - while saving the customs duty calculation document, a warning message has to be displayed based on some values. As I haven't found any customer/user exits, I searched for BADI's and found a badi used for output determination, which has all the parameters I require. So, I have implemented my code there.
But the problem here is, that badi is being called random number of times - more than 1 time in 90% of cases, and that warning message is also being displayed random number of times.
I tried using ABAP memory for this - by setting a flag using EXPORT/IMPORT, but this approach is not working.
Any ideas how to implement this?? Any help would be appreciated.
Request clarification before answering.
Hi Ramya,
Indeed, BADI /SAPSLL/PRN_DET could be called by the standard multiple times...
Have you explored the possibility of instead using the BADI /SAPSLL/IF_EX_CUS_ECC with method MODIFY_CONSISTENCY_CHECK?
This BADI is usually the BADI used to check the content of the declaration before to set the declaration as complete.
When implementing this BADI, you would do the following:
- Add your own logic to identify the issue for which an error or warning message should be issued
- Set parameter CV_CONSISTENT to blank (so the declaration is inconsistent)
- (Important) Add a message in the consistency/incompleteness log - This can be easily done by issuing a message from within the BADI.
The user will then see this error/warning message in the incompletion log. If it is a warning message, he can then proceed with the declaration (e.g. send it to customs authorities). If it is an error message, he/she won't be able to process the message to customs.
Hope this helps.
Mouaz
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Define some field or internal table in your BAdI implementation's instance attributes, set its value when warning is raised (or add a record when raised for an item) and don't raise the warning again if already done.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ramya,
In order to help, could you please share the name of the BADI definition you are using?
Thanks.
Mouaz
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 | |
| 7 | |
| 6 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.