cancel
Showing results for 
Search instead for 
Did you mean: 

GL Account Search Help Issue

Former Member
0 Kudos

We want to change the standard search help of GL Account in the Shopping Cart line item.

Currently it fetches the value from ECC backend but we need to utilise a custom search help from SRM system.

Pease let me know how do we do this.

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi ,

I changed the code .now it will work i forgot to code reading the context of accounting view and accounting detail view.

I am sending full code. This time it will work. change only your search help thats it.I tested this with sample Search help it is

working.

DATA lo_nd_comp_context TYPE REF TO if_wd_context_node.

DATA lo_nd_acc_context TYPE REF TO if_wd_context_node.

DATA lo_nd_info_acc TYPE REF TO if_wd_context_node_info.

DATA lv_value_help_mode TYPE i.

DATA lv_value_help TYPE string.

" Read Context

lo_nd_comp_context = wd_context->get_child_node( name = 'COMP_CONTEXT' ).

if view->name = 'V_DO_ACCOUNTING'

" If the accounting view then read the accounting context

lo_nd_acc_context = lo_nd_comp_context->get_child_node( name = 'ACCOUNTING' ).

elseif view->name = 'V_DO_ACCOUNT_DETAIL'

" If accounting detail view then read the accounting detail context

lo_nd_acc_context = lo_nd_comp_context->get_child_node( name = 'ACCOUNT_DETAIL' ).

endif.

" get node info object of accounting node

IF lo_nd_acc_context IS BOUND.

lo_nd_info_acc = lo_nd_acc_context->get_node_info( ).

ENDIF.

" continue only if node info is supplied

IF lo_nd_info_acc IS BOUND.

" get current search help info

lo_nd_info_acc->get_attribute_value_help(

EXPORTING

name = 'G_L_ACCT'

IMPORTING

value_help_mode = lv_value_help_mode

value_help = lv_value_help

).

" Below this will add the custom search help from SRM .

lo_nd_info_acc->set_attribute_value_help(

EXPORTING

name = 'G_L_ACCT'

value_help_mode = 'BUS2121'

value_help = 'Z_F4-Your search help' " you own search help.

).

endif.

regards,

Devi prasad

Answers (7)

Answers (7)

Former Member
0 Kudos

Hi.. looks like the code u gave is having some issues. Its not getting the correct nodes and giving dump errors in get_attribute_value_help.

Former Member
0 Kudos

Hi Varun,

I want to add one more point to my previous message.

The code what i send to you will remove the standard search help of G_L_ACCT field and attaches the custom search help.

This enhancement spot WD_badi can be used for any webdynpro component and view.

Let me know if u face any probs...

Regards,

Devi

Former Member
0 Kudos

Hi Varun,

You should not do pre exit and post exit of domodify view.

There is an enhancement point in webdynpro. WD_BADI. create Implementation for this enhancement point and give the filnter values as webdynpro component name and view name( I mentioned in my previous reply. ) .

Note When u implement this enhancement spot you must give view name and component name)

In this badi there will be a method WDDOMODIFYVIEW in this method u need to do .

I am sure you can do here.

Regards,

Devi

Former Member
0 Kudos

Tried both the solutions.

Neelema's solution is not working as it is going to backend ECC and we need to use BBP_DET_ACCOUNT table search help which is in SRM.

Devi Prasad solution - i tired that in pre exit and post exit vdomodifyview. Its trigerring when i open the shopping cart but at the time of f4 help its again going to backend ECC for values.

Please suggest some other ways if you have.

Thanks for your efforts.

Former Member
0 Kudos

Hi,

You can do this with WD dynamic programming.

You can do with domodifyview badi for accounting component /SAPSRM/WDC_UI_DO_ACC.

You need to handle both views 'V_DO_ACCOUNTING' and 'V_DO_ACCOUNT_DETAIL' in the domodifyview badi implementation.

I am sending the sample code. How to attach the custom search help dynamically.

DATA lo_nd_comp_context TYPE REF TO if_wd_context_node.

DATA lo_nd_acc_context TYPE REF TO if_wd_context_node.

DATA lo_nd_info_acc TYPE REF TO if_wd_context_node_info.

DATA lv_value_help_mode TYPE i.

DATA lv_value_help TYPE string.

" Read Context

lo_nd_comp_context = wd_context->get_child_node( name = 'COMP_CONTEXT' ).

" get node info object of accounting node

IF lo_nd_acc_context IS BOUND.

lo_nd_info_acc = lo_nd_acc_context->get_node_info( ).

ENDIF.

" continue only if node info is supplied

IF lo_nd_info_acc IS BOUND.

" get current search help info

lo_nd_info_acc->get_attribute_value_help(

EXPORTING

name = 'G_L_ACCT'

IMPORTING

value_help_mode = lv_value_help_mode

value_help = lv_value_help

).

" Below this will add the custom search help from SRM .

lo_nd_info_acc->set_attribute_value_help(

EXPORTING

name = 'G_L_ACCT'

value_help_mode = 'BUS2121'

value_help = 'Z_F4-Your search help' " you own search help.

).

endif.

Regards,

Devi prasad

Former Member
0 Kudos

HI,

I am in SRM 7.0 so the badi is not working for the requirement. Please suggest some other solutions.

Former Member
0 Kudos

hello,

Kindly check the webdnpro component /SAPSRM/WDC_UI_BACKEND_SH.

This componet is called for F4 help of all accounting field.

Enchance the COMPONENTCONTROLLER of this component . In post exit of SET_BAPI_PARAMETER

CASE iv_field.

WHEN 'G_L_ACCT'.

ls_bapi_parameter-objtype = 'BUS3006'. "#EC NOTEXT

ls_bapi_parameter-objname = 'BUS3006'. "#EC NOTEXT

ls_bapi_parameter-param = 'GLACCT'. "#EC NOTEXT

ls_bapi_parameter-method = 'GETLIST'. "#EC NOTEXT

ls_bapi_parameter-field = 'GLACCT'. "#EC NOTEXT

ls_bapi_parameter-shlpname = 'SAKO'. "#EC NOTEXT "change the SAKO to Z_F4_Searchhelp_Glacct

ls_bapi_parameter-shlpparam = 'SAKNR'. "#EC NOTEXT

ls_bapi_parameter-field_desc = 'TXT50'.

Regards,

Neelima

Former Member
0 Kudos

Hello varun,

Which version you are in.

To disable the search help you can enchance the BADI BBP_DRIVER_DETERMINE

In method You can code below

If functionname = B40B_SHLP_CALL .

functionname = Zglaccount_help.

Endif.

Copy the standard FM B40B_SHLP_CALL to Zglaccount_help.

Replace the code below.

When gc_g_l_acct.

lv_shlname = Z_F4_Searchhelp_Glacct. "change this

lv_shlpparam = 'SAKNR'.

You develop your logic in exit of search help of Z_F4_Searchhelp_Glacct.

Regards,

Neelima