on 12-03-2013 2:21 PM
Hi,
I have requirement that whenever user creates Builrelationship , they must also fill in child ( ZZ23REEWRel). I tried to achieve this through front end , I was able to show error prevent user going back. But I notice even though I displayed error parent entity ( Builrelationship ) ia already created with out child(ZZ23REEWRel) and allowing to save. Please show some light how to achieve this.
Thanks,
Senthil
Hi Senthil,
You could write your custom logic within badi CRM_BP_UIU_SAVE to prevent the account from behind saved in case you detect missing piece of information:
One advantage that I see is that you can bundle many checks at one place instead of coding some checks here and there on every single component.
Regards,
Nicolas.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can any one help me to force child entry. I need zz23REEWRel enity to be mandatory upon changing BuilRealtionship. Modifying the genil class CL_BUPA_IL_RELATION. MY requirements are whenever user creates new relationship then they must create an entry in zz23REEWRel. Sometimes they create Builreationship and click back button without filling the child. I need to raise an error either in genil level or in WebUI. Tried Webui,, saves without child data. Any solution to this other than BADI save.
By the way, did you try to use the "composition" relationship type instead of "aggregation"? I never tested it personally, but as far that I understand this type could probably fit your business case better... And who knows, handle the error message you're asking for automatically. Your feedback will be great if you can test it.
Regards,
Nicolas.
Nothing worked . So changing at Genil level after enhancing the class ZCL_BUPA_IL_RELATION
( EXECUTE_CHECK_BEFORE_SAVE). How do we check which entity is being changed. The code executes even there is change in address at this level. User want to throw error only when they change the Builrelationship. Any help please.
Hi Senthil,
Sorry but 2 things are not clear for me:
1) Why would you prefer to implement a modification to SAP standard code (changing genil underlying class is considered a modification) instead of implementing a BADI?
2) Why would you care which type of entity is being changed? If you want to prevent the user from saving the account if some values are missing, then when the user is changing the address your custom check will be OK and no error will be thrown anyway... Correct?
Today I had the same requermient or at least very similar, "don't allow to create/save a relationship if some data of the source of the relationship is not complete" when I'm back to work( Monday ) I will see what we can do, with this I mean if there's any point which is independent of the input method (Web UI, BAPI, etc.) I hope I can give you some details.
But definetly modifying GENIL is not a very good idea, plus think about if the realtionship is created via FM, the effort of modfying the standard at genil level won't worth it
Good news, I found a way to do it without modification use the BDT of the relationships, I briefly used BDT and is very obscure plus some events works and some other not because are replaced by BADIs, In our scenario we don't have any BADI so there's no other option than use BDT or modify standard, of course if you want to prevent the saving the BADI provided by Nick will work but at the header view not at the relationship view( so you won't be able to prevent the back behaviour).
Use the transaction BUBI and select event which suits you best (depending how the system manages the FG memory) DSAVB, DCHCK, DSAVEC or DSAVE (I'm using DSAVC) here you can add your own BDT function module I recommend you copy the first entry (100000 - BUB_BUPR_EVENT_DSAVC) and replace the FM for your custom one.
In order to understand how to retrive the info and rise the messages I recommend take a look how the FM BUB_BUPR_EVENT_DSAVC is coded, you can alos check the other ones. This should resolve you issue, it solved mine
I am passing data from from BP_EEW component through Global variable based on certain condition. In BP_HEAD under EH_ONSAVE checking data passed from BP_EEW and raising error,returning control without saving.
Very straight forward, we planned to revisit this requirement after the Upgrade Ehp3. Since it is time critical for us ( Prevent data multiplying) , for now I am using this approach.
Thanks to every one especially to Nicholas and Luis.
User | Count |
---|---|
8 | |
1 | |
1 | |
1 | |
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.