cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Validation on Document in ECTR

bhavyashree1
Discoverer
0 Kudos
350

Hello Experts,

I need to perform custom validation on Document and raise Error/Info messages.

I have coded the logic in DOCUMENT_AUTH01 badi to perform this validation.

I can successfully raise error messages both on SAP GUI & ECTR. But not able to raise an info message in ECTR. The message is not being displayed on the status bar.

I was trying to give a pop up message, but that also doesnt work in ECTR.

Please let me know where should i add my logic, so pop message or info message will work on ECTR too.

Thanks in Advance.

Accepted Solutions (0)

Answers (1)

Answers (1)

se_kie
Advisor
Advisor
0 Kudos

You are right, that is not easy or unpossible to raise info or warning messages in a process called by ECTR. ECTR is usually using RFC only transactions to call functions in backend. There you can either stop the process with an error in the auth01 - BAdI or don't stop the process.

There exists an ugly way to show a SAP GUI with an info or warning message. You have to force ECTR to use a RFC-GUI transaction for the RFC FM, You can do this with a pref in the default.txt:

sap.bapi.useGuiTransaction = <The RFC FM called by ECTR>

Disclaimer: There exists use cases where this preference can't work (statefull calls).

Next you have to open a SAP GUI in your BAdI method and bring that to front:

See call of 'SAPGUI_SET_PROPERTY' in LCADRF01.

But in mass processing use cases this ugly (as I have written above).

bhavyashree1
Discoverer
0 Kudos

Thank you for the inputs Sebastian. Will try the option.