on ‎2016 Jan 19 5:12 PM
Hi,
I am facing an issue where I need to call UJ_VALIDATION BAdi from an script logic which on the other hand is getting called from a Data Manager Package.
Is there any way to call the validation BADI from script logic?
Regards,
Gaurav
Request clarification before answering.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Vadim for the reply.
I understand that validation BAdi executes automatically each time whenever data is sent.
Actually below code I am writing in script logic where at *REC I want validation BAdi to be triggered which checks if ACCOUNT is XYZ or not.
*XDIM_MEMBERSET ACCOUNT = ALL // All members of Account dimension
*WHEN TIME
*IS %TIME%
*DESTINATION_APP = Planning
*REC(FACTOR = 1, ACCOUNT=XYZ)
*ENDWHEN
Basically I want to remove *REC(FACTOR = 1, ACCOUNT=XYZ) and write *REC(FACTOR = 1) and do that ACCOUNT=XYZ assignment in the BAdi itself after doing some validation.
Regards,
Gaurav
Hi Vadim,
We have 2 different model, Planning and let's say ABC_Planning where in both the models we have a dimension called PL_ITEM. All the PL_Item are valid for Planning model whereas for ABC_Planning only those are valid whose property Open_flag is Y (Open_flag property is maintained in dimension PL_ITEM).
In ABC_Planning dimension, we are submitting the data for ACCOUNT=A,B,C and D only for PL_ITEM Open_flag property is Y. While moving data from ABC_Planning to Planning we are converting to ACCOUNT=F from A,B,C,D.
We have to make a validation that nobody can input anything directly in Planning model where ACCOUNT=F and Open_flag =Y for PL_Item.However, it always should be flown through ABC_Planning model only. We are using flat file upload and by using a data manager package we are submitting the numbers.
I have put the condition in the validation BAdi that ACCOUNT=F and Open_flag =Y for PL_Item records should be rejected if model is Planning and which is working perfectly. But it stops me when we move the data from ABC_Planning model. All those records also got rejected because we are saying the script logic that Account = A,B,C,D should get converted to Account=F.
Hope I am clear.
Regards,
Gaurav
Hi Vadim,
Yes, we are moving the data through DM packages and using Destination_App in script logic.
Data Manager option is ON for validation for the source and target model both.
But the problem is, record is not valid if directly inputted in Planning but it is valid if its moved from ABC_Planning. So I need to put some condition where when I run DM package from ABC_Planning to Planning the condition in BAdi should not execute and when someone directly input in Planning model then that condition should execute and records will get rejected.
Can we achieve this by passing a constant variable from script logic to BAdi without changing anything in script logic?
If yes, how can we write it so that we can put condition in BAdi based on that variable in order to know that this is not direct input instead its a DM Package that is running.
Regards,
Gaurav
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 4 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.