cancel
Showing results for 
Search instead for 
Did you mean: 

BADI implementation /SAPSRM/BD_F4_EXIT is not called

benjamin_herzig
Participant
0 Kudos

Hi,

i´m on SRM 7.0. I implemented the BADI for spot /SAPSRM/BD_F4_EXIT. My problem is that the BADI method /SAPSRM/IF_EX_BD_F4_PRESEL~MODIFY_STEP_PRESEL is not called when i open any search help in shopping cart.

Do i have to set a filter for the BADI implementation in SE19?

I can´t find any infos or documentaion about this BADI !?

Best regards

Ben

Accepted Solutions (1)

Accepted Solutions (1)

laurent_burtaire
Active Contributor
0 Kudos

Hello Benjamin,

this BAdI is used for backend search-help.

Have a look at CREATE_SO_SCREEN method from /SAPSRM/WDC_UI_BACKEND_SH WDC component controller.

For example, you can use it to prefill Cost Center search-help.

Regards.

Laurent.

benjamin_herzig
Participant
0 Kudos

Hi,

thanks - no i know that the BADI is only called when i open a backend search help like cost center.

But what BADI can i use for local search help. eg. product categorie or product-id ?

Hope there is a similar BADI for local search help.

Best regards,

Ben

laurent_burtaire
Active Contributor
0 Kudos

Hello,

put a break-point inside method GET_INSTANCE from CL_EXITHANDLER class.

Then, check if exit_name (BAdI) BBP_F4_READ_ON_ENTRY or BBP_F4_READ_ON_EXIT is called or not.

If yes, check if one method covers your request.

Regards.

Laurent.

benjamin_herzig
Participant
0 Kudos

Hi Laurent,

thank you very much for your help.

Both Badis are called in GET_INSTANCE. But the Badi documentation said: "

Display of Input Helps, Search Helps, and Favorites (Obsolete - ITS Tech.)". When i understand the documentation right, then these two Badis are obsolete in SRM 7.0.

For example: I try to set the "logical system" in search help "product categorie". We have to ECC systems connected with SRM, and depending on the "plant" i want to set the "logical system".

Best regards,

Ben

Former Member
0 Kudos

Hi Ben,

I tried using this BADI for my cost center and WBS element search help ( modifications) but it didnt work . So what I did was I went to the Webdynpro component of the search help and placed an overwrite enhancement and wrote my logic for the same and it worked. So you can try it out and let me know if you face any further issues.

Regards,

Naveen

laurent_burtaire
Active Contributor
0 Kudos

Hello,

check BBP_GET_CATEGORIES_F4 function module.

Regards.

Laurent.

benjamin_herzig
Participant
0 Kudos

Hi Naveen,

i was able to set a default value for logical system in Webdynpro "/SAPSRM/WDC_SH_PRODCAT" in  method "WDDOINIT" Post-Exit.

The last step is to get the shopping cart instance to determine the plant. How do i get the instance?

I tried "lo_fpm = cl_fpm_factory=>get_instance( )" but the instance is initial when i open the search help. Are there any other ways to get the instance or to get the shopping cart GUID?

Best regards,

Ben

Former Member
0 Kudos

Hi Ben,

Use the below code and see if it helps

   lo_task_factory = /sapsrm/cl_ch_wd_taskcont_fact=>get_instance( ).

   wd_this->mo_task_container = lo_task_factory->get_task_container( ).

*get the current mapper instance

   CALL METHOD wd_this->mo_task_container->get_current_bo_mapper

     IMPORTING

       eo_bo_mapper = lo_bom.

lo bom will have a method called get_bo_guid.

Try this out and let me know.

Regards,

Naveen

benjamin_herzig
Participant
0 Kudos

Hi Naveen,

i tried the following code:

  lo_task_factory = /sapsrm/cl_ch_wd_taskcont_fact=>get_instance( ).

lo_task = lo_task_factory->get_task_container( ).

call method lo_task->get_current_bo_mapper

  importing
    eo_bo_mapper = lo_bom.

Unfortunately, the GUID is empty when i take a look iinto lo_task:

Any other ideas to get the GUID?

Best regards,

Ben

Former Member
0 Kudos

Hi Ben,

See under lo_bom if the mv_bo_guid is getting filled.

Regards,

Naveen

benjamin_herzig
Participant
0 Kudos

Hi Naveen,

no mv_bo_guid in lo_bom is not getting filled. I solved it by using export/import to memory id. I know that is not the best solution, but it works!

Thank you

Regards,

Ben

Answers (0)