cancel
Showing results for 
Search instead for 
Did you mean: 

Add error message to application log from BADI

former_member187457
Active Contributor
0 Kudos

Hi All,

I am working on a BADI......

As the txn is already adding its messges in log thru BAL_LOG_CREATE, BAL_LOG_MSG_ADD...etc......

after that my badi comes into picture.....and it displays the message in POPUP

Now i want to add my error message form BADI to this already created log .....

Kindly suggest...

Note..I tried to use BAL_LOG_MSG_ADD it got add but the display is in full screen...not in POPUP....

 CALL FUNCTION 'BAL_DSP_LOG_DISPLAY'
  EXCEPTIONS
    PROFILE_INCONSISTENT = 1
    INTERNAL_ERROR       = 2
    NO_DATA_AVAILABLE    = 3
    NO_AUTHORITY         = 4
    OTHERS               = 5.

Thanks

RK

Edited by: Rahul Keshav on Sep 8, 2010 12:50 AM

Edited by: Rahul Keshav on Sep 8, 2010 12:51 AM

Accepted Solutions (1)

Accepted Solutions (1)

uwe_schieferstein
Active Contributor
0 Kudos

Hello Rahul

Have a look at the many instructive sample reports in package SZAL, e.g. SBAL_DEMO_04_POPUP.

You need to fetch the log profile using fm BAL_DSP_PROFILE_POPUP_GET.

Regards

Uwe

former_member187457
Active Contributor
0 Kudos

Thanks Uwe.......

I tried to use BAL_DSP_PROFILE_POPUP_GET....

my error message are now displaying in the log....in popup......

now the issue is.....it is coming in two differnt popups.......

e.g. there is message to be display ERROR1 thru std program.....

and my error thru Badi is ERROR2.......

In first popup i.e. original /std program popup is showing ERROR1......

and the popup thru my Badi is showing ERROR1 & ERROR2......

so now the errors are shown in two popups......and repeating the ERROR1.....

is there any way to supress the std popup call....and display only new popup......

Plz suggest....

Thnx

RK

former_member187457
Active Contributor
0 Kudos

any other suggestions....

uwe_schieferstein
Active Contributor
0 Kudos

Hello Rahul

I can only guess what might be useful because the entire scenario is not clear to me.

You may check fm BAL_DSP_PROFILE_SINGLE_LOG_GET:


FUNCTION bal_dsp_profile_single_log_get.
*"----------------------------------------------------------------------
*"*"Lokale Schnittstelle:
*"       EXPORTING
*"             VALUE(E_S_DISPLAY_PROFILE) TYPE  BAL_S_PROF
*"----------------------------------------------------------------------


********************************************************************
* get standard profile for transaction SLG1
********************************************************************
  CALL FUNCTION 'BAL_DSP_PROFILE_STANDARD_GET'
       IMPORTING
            e_s_display_profile = e_s_display_profile.


********************************************************************
* This profile is intended to display one log
********************************************************************
* we therefore show all messages immediately
  e_s_display_profile-show_all   = true.
* and the tree on the ledt is fully expanded
  e_s_display_profile-exp_level  = 1.


ENDFUNCTION.

Regards

Uwe

former_member187457
Active Contributor
0 Kudos

The scenario is.....

we are in an appraisal form thru txn phap_admin...

now for goal weightage.....there is a std check ...for entered value.....check value for multiple of 5.....

if we enter weightage as 4 ...system will make it 5 and a std POPUP will display stating that the value 4 has been changed....

this is a std log....

now i have to implement a badi HRHAP00_VAL_DET......for calculating the total weightage.....

I have to throw an error if the total weightage is less then 100%....

i cant use message type 'E'...in Badi...

so i want to add my error message in the std log...so that both message comes in one log/popup only.....

If you goto se80...and for function group HRHAP_UI_DOCUMENT....

you can seen the subroutine...

form f3100_popup_value_log_create

here the std messages are adding to the log.....

simillary i want to add my message too ..inside the badi....in the same log....

thnx

RK

Edited by: Rahul Keshav on Sep 8, 2010 10:20 PM

former_member187457
Active Contributor
0 Kudos

Is there any user exits...to do so......

Answers (1)

Answers (1)

former_member187457
Active Contributor
0 Kudos

Added error message to the return structure...