Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Badi hitting twice...SCMG_BEFORE_VALID_C for Dispute Management ECC 6.0

Former Member
0 Kudos
1,007

Hi,

I have implemented the BADI

SCMG_BEFORE_VALID_C for the transaction UDM_DISPUTE.

I pop up some messages when a case is changed....But the problem is the pop up message comes twice.

So the BADI is being called twice...

Does any one know how to resolve this issue...

Thanks,

Chaitanya K

8 REPLIES 8

Former Member
0 Kudos
828

Hi.

Try to apply a concept of EXPORT and IMPORT allow follow.

BADI calling.

Data: gv_flag_set type c,

gv_flag_get type c.

gv_flag_set = 'X'.

1.First time.

Method A.

/*begin of method

IMPORT gv_flag_get = flag_set FORM MEMORY IS 'Z_ID1'.

IF gv_flag_get IS NOT INITIAL.

"Perform your statement here for first time

ELSE.

ENDIF.

/*end the end of method

EXPORT flag_set FROM gv_flag_set TO MEMORY ID 'Z_ID1'.

Endmethod.

2.Second time.

Method A.

/*begin of method

IMPORT gv_flag_get = flag_set FORM MEMORY IS 'Z_ID1'.

IF gv_flag_get IS NOT INITIAL.

"Perform your statement here

ELSE.

"This is for the second time

ENDIF.

*end the end of method

EXPORT flag_set FROM gv_flag_set TO MEMORY ID 'Z_ID1'.

Endmethod.

Hope it help.

Sayan

Former Member
0 Kudos
828

Hi.

Try to apply a concept of EXPORT and IMPORT allow follow.

BADI calling.

Data: gv_flag_set type c,

gv_flag_get type c.

gv_flag_set = 'X'.

1.First time.

Method A.

/*begin of method

IMPORT gv_flag_get = flag_set FORM MEMORY IS 'Z_ID1'.

IF gv_flag_get IS NOT INITIAL.

"Perform your statement here for first time

ELSE.

ENDIF.

/*end the end of method

EXPORT flag_set FROM gv_flag_set TO MEMORY ID 'Z_ID1'.

Endmethod.

2.Second time.

Method A.

/*begin of method

IMPORT gv_flag_get = flag_set FORM MEMORY IS 'Z_ID1'.

IF gv_flag_get IS NOT INITIAL.

"Perform your statement here

ELSE.

"This is for the second time

ENDIF.

*end the end of method

EXPORT flag_set FROM gv_flag_set TO MEMORY ID 'Z_ID1'.

Endmethod.

Sayan,

Thanks for your reply.

I couldn't understand what should be the value of flag_set and it should also be declared right...

and u hve mentioned gv_flag_get is not initial. Then u should have a value X then only the first time it executes....

Thanks,

Chaitanya K

Edited by: chaithanya k on Jan 6, 2009 3:12 PM

0 Kudos
828

Hi Chaithanaya

looking at the parameteres: IM_CASE make sure you are using SAVE_PROTOCOL , STORE, BEFORE_STORE... this might be causing the problem. The next time I guess system thinks some thing is not saved and coming in...

it depends even on, where this BADI is being called as well.

Tr. doesnot exist in ECC5.0

update: if you look into the package SCMG_SP_CASE there are other BADI's also avaliable in the enhancement node.. check them.. as per your requirement you will hit a BINGO!!

0 Kudos
828

Thanks Jay for your reply.

I have the following BADI's

SCMG_BEFORE_VALID_C -


> Change Case Before Validation

SCMG_CHNG_BFR_STR_C -


> Changes at Save Only (Type 2)

when the User Hit ENTER or SAVE button. I am calling the BADI SCMG_BEFORE_VALID_C.

make sure you are using SAVE_PROTOCOL , STORE, BEFORE_STORE... this might be causing the problem

Can you explain me how to use the above SAVE_PROTOCOL and So on...

I need a pop up message when the User hits ENTER or SAVE. I am in ECC 6.0

The transaction is UDM_DISPUTE.

Thanks,

Chaithanya.

0 Kudos
828

make sure you are using SAVE_PROTOCOL , STORE, BEFORE_STORE... this might be causing the problem

this was from my first sight of the BADI

update: if you look into the package SCMG_SP_CASE there are other BADI's also a.....

this is my latest answer...

lets see the code you are using to POP up.. try implementing other BADI's

CALL FUNCTION 'POPUP_TO_DECIDE_INFO'
        EXPORTING
          defaultoption = 'Y'
          textline1     = text-001
          textline2     = text-002
          titel         = 'Title'
        IMPORTING
          answer        = lv_answer.

0 Kudos
828

Hi Jay,

Thanks for your reply.

SCMG_CHNG_BFR_STR_C Changes at Save Only (Type 2). It is hit only once when I hit the SAVE button.

But again the Validation SCMG_BEFORE_VALID_C Change Cases before Validation..

is hit again....

Still working on...If you have any idea please let me know....

Thanks,

Chaitanya K

0 Kudos
828

Hi Chaitanya... as I said before the tr. doesnot exist in my system 5.0 ...

tcarruthrockport
Discoverer
0 Kudos
779

I was having the same issue.

  1. BADI Implementation UDM_BEFORE_VALID_S of Definition SCMG_BEFORE_VALID_S is calling the customer implementation of Definition SCMG_BEFORE_VALID_C.  Refer to class method IF_EX_SCMG_BEFORE_VALID_S~CHANGE to see that call.
  2. The customer implementation of SCMG_BEFORE_VALID_C is then called directly on its own as you would expect.

That is how my system works for Package UDM_CASE in Software Component FSCM_CCD Release 618 SP14.