cancel
Showing results for 
Search instead for 
Did you mean: 

How to Debug BADI_UJ_VALIDATION_RULE_LOGIC

Former Member
0 Kudos
484

Hello Frieds,

We Implemented the BADI ->BADI_UJ_VALIDATION_RULE_LOGIC for Validation purpose while submitting the data From BPC Front end.

I did not have front end access and I want to debug the BADI once user submit the data from front end, in order to check how the logic is working.

Can any body help me with step by step to to set debugger.

Thanks in Advance.

Sree.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Friends,

In Our scenerio , user just submitting the data for Dimension with Cat_LOCK.

He is not running any script logic,itz just submit.

My requirement is to Validate CA_LOCK exits in BADi and throw error message and restrict user to submit the data.

Fo this UJKT Tcode can be used to debug the BADI--> BADI_UJ_VALIDATION_RULE_LOGIC?

Thanks

Gautam

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

No it can't. The script logic testing tool, UJKT, can not be used to test the logic in the validation BAdI directly. You can not call the BAdI implementation for validations directly from the script logic as mentioned earlier above. However, if you use UJKT and write some small script logic which creates some new data, then the validations BAdI should get triggered during write back process, so the BAdI implementation should be able to be debugged.

Again, you can use UJKT to trigger the BAdI in validations, but not directly.

Cheers,

Rich Heilman

Former Member
0 Kudos

Hello Rich,

Thanks for reply.

When I asked my BPC Consultant , are they using any script logic while submit the data from BPC Front End he said ,no script logic is used.

My doubut is when BADI Implementd : badi_uj_validation_rule_logic, how it called and Validated.? if script logic is not used.

Appreciate if you provide how to get into BADI for debug at the time when user submit the data from BPC front end.

The purpose of this, User set the LOCK status for one Category SP_01 in CATEGORY Dimension .When he submit the data, this BADI should trigger and Validate the LOCK and Throw the error message in order to restrict the Data .

This BADI will trigger for each record of user input, I want to debug to know how the logic is written and is it working fine.

Thanks in Advance.

Gautam

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

The validations logic is called during the "Write Back" process. All updates to the DB in BPC go through the single "Write Back" module. There are a number of ways to initiate this process. 1) you can send data from BPC frontend. 2) you can lauch a DM package to import data 3) you can execute script logic. I mentioned the script logic tester tool earlier because this could potential work depending on how you write your script logic. YOu can also debug your validations code by setting the breakpoint and executing the "Send" from the frontend, but you will need to set up your debug users.

Cheers,

Rich Heilman

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

See this blog to see how to set up the debug users. This blog also shows how to debug from DM package which is a little more complicated than debugging from the frontend. If you want to debug from the frontend, you just need to update the debug user, set the external breakpoint, and then execute the "Send" from the frontend. The debugger should open automatically.

http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/18300

Regards,

Rich Heilman

Former Member
0 Kudos

Hello Rich,

Thanks for Very useful Information.

The blog shows when data load used with DM, here I have one doubt, How to update the user ID for Debug when using from Front end.

Thanks in Advance

Gautam

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

Debug users are maintained centrally, so it doesn't matter if you are executing from DM or input schedule. It is the same configuration regardless.

Cheers,

Rich Heilman

former_member223749
Active Participant
0 Kudos

Hi

Use below script for running the BADI using T-Code UJKT.

*START_BADI ABC

WRITE = ON

QUERY = ON

APPL = GP

*END_BADI

ABC is filter name for the BADI

Just set the break-point in the ABAP code and run the above script using UJKT T-code.

Hope this will help you.

Regards,

Devi

raghu_ram
Active Contributor
0 Kudos

Hi Gautam,

Please check with the t.code UJKT in BW system. It is used for testing the logic.

Regards,

Raghu

Former Member
0 Kudos

Hi,

And you can also use it (UJKT) for debugging. Just set the break-point and from the UJKT transaction, launch the debugger /h.

What I have used is....setting up my user ID as the debugging ID in the BPC server manager. As you Basis to set up your user ID as the debugging user and there is also a blog explaining the process if they need more details.

Thanks,

Sreeni

Former Member
0 Kudos

Hi Friends,

Thanks to all for useful information.

1.In PARAM : filed What should i have to give..?

2. I do not know how to write the script logic.

I have information of APPset ,Appl_ID and User ID.

Wth those 3 I can debug the BAD : BADI_UJ_VALIDATION_RULE_LOGIC

Appreciate your help

Thanks in Advance,

Gautam

raghu_ram
Active Contributor
0 Kudos

Hi Gautam,

Please go through the below guide pg no 5 for sample BADI logic.

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/70187b3e-d5ce-2d10-d780-bb8b1a5b0...

Regards,

Raghu