cancel
Showing results for 
Search instead for 
Did you mean: 

Help required for use of BADI's

Former Member
0 Kudos

Hello group,

For shopping in SRM we want a favourites list for f.i. costcenter and WBS-element on screen 1000 of program SAPLBBP_PDH_ACC in transaction BBPSC01. Can this be done with BADI's? I think we still have to change the Internet service and use a code similar to:

`F4_MULTI_CHANGE1_OC(T_SCREEN_ACCLIST-GENERIC_ACC[j],

T_SCREEN_ACCLIST-GENERIC_ACC[j].name,

t_screen_acclist-descr_generic_acc[j],

t_screen_acclist-descr_generic_acc[j].name,

"GENERIC_ACC",

"descr_generic_acc",

"X",

#SELECT_TEXT_SHELP_GENERIC_ACC,

#SELECT_SHELP_cost_ctr, (???)

jsFunction)`

This gives us a select-box with ".." to get values.

If somehow the values that we choose could be saved as favourites, this would solve out problem. But I'm not sure how to use BADI's to get this behaviour.

Any help is rewarded.

Regards, Léon Hoeneveld

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Depend of your release, you can use defintition names :

- BBP_F4_READ_ON_ENTRY

- BBP_F4_READ_ON_EXIT

- BBP_F4_MEM_UPDATE

- BBP_F4_SAVE_DB

For cost center, get_, set_, upd_COSTCENT

For WBS, get_, set_, upd_WBSELEM

Regards,

Bertrand

Former Member
0 Kudos

I've implemented the BADI's and used the function modules

for get-set and upd. But what should the badi's do?

Should they change the display of the field?

Regards, Léon Hoeneveld

Former Member
0 Kudos

Hi,

the badi get, set and update favourite value in database.

Favourite values are saved with a timestamp <- that why the lastest values are always displayed).

Favourite display is restricted to 5 "items" all the time i think due to potential performance issue.

regards,

Bertrand

Former Member
0 Kudos

I've got a problem with activating the badi's. The transaction dumps because of memory problems. I can therfore not evaluate the changes to the field on the screen. I think there will be no change whatsoever.

I still need a clue as to how to call a field in my html service so that the badi's are used.

Regards, Léon

Former Member
0 Kudos

Perhpas Oss note 725247 will help you ?

Regards, Bertrand

Former Member
0 Kudos

I'm not sure if I understand the badi's.

In IF_EX_BBP_F4_READ_ON_ENTRY~GET_COSTCENT I have added the code for the function module:

CALL FUNCTION 'BBP_GET_COSTCENTS_F4'

EXPORTING

IV_LANGUAGE = IV_language

IV_USER = IV_USER

IMPORTING

EV_DEFAULT = EV_DEFAULT

TABLES

ET_COSTCENTS = ET_COSTCENT_LIST

ET_FAVOURITES = ET_COSTCENT_FAVOURITES

EXCEPTIONS

ATTRIBUTE_READ_ERROR = 1

OTHERS = 2

.

This does not seem to work. I get dumps because of memory problems, and my shopping screen does not show.

Am I doing something wrong?

Regards, Léon

Former Member
0 Kudos

Hi leon,

Sorry for the delay,

If you do that, with the MF you're calling the same badi... so it's like a do while but without end... that why you get a dump with memory troubles.

check in the MF you call your badi

If you want other data, perhaps use MF bbp_read_attributes or one like that.

regards,

Bertrand

Former Member
0 Kudos

Hello Bertrand,

I understand that the BADI's should have the functionallity without additional code. But when I activate there is no change to my cost-assignment screen whatsoever. Note 725247 cannot be implemented.

Do you have any other suggestions?

Regards, Léon Hoeneveld

Answers (0)