cancel
Showing results for 
Search instead for 
Did you mean: 

search help problem/how to create static table

Former Member
0 Kudos

Hi all,

1.I have a dropdown in table field while the values in my dropdown on the screen and I can select an entry but if i will go back in previous entry it overwrites search help .i have written clear statement...but still getting the same prob.May be i am not writing it in correct method.

2. While scrolling the table if some entries are long it increases the length,when small length decreases.how to make table static so that it behave properly.

Thanks

Kiran

Edited by: kiran162 on Apr 13, 2011 6:01 AM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI ,

1. First requirement is not clear , kindly expalin more.

2. You can fix the table layout by checking a checkbox . when you click on header of table there is option of fix table layout

check the checkbox

OR

Increase the table width .

regards

Kuldeep

Former Member
0 Kudos

Thanks Kuldeep

i am elaborating my que:

i have 2 dropdown values and corresponding to selection i have a search help in another colomn.

if i select AB as dd selection corresponding search help appears then in second row i select ZB as dd selection corresponding

search help comes but i will go to previous one then for AB it shows the same ZB search help....means it overwriting...i hope u understood my prob.

Former Member
0 Kudos

hi,

Do u mean that you are dynamically assigning search help based on the value selected in the dropdown?

Like for AB you use the custom search help

and for ZB you use the standard one?

Thanks,

Aditya.

Former Member
0 Kudos

yes i am calling this search help dynamically.

Former Member
0 Kudos

Hi ,

Please post the code of dynamic assignment and also which method are you doing this?

In the 'On select' event handler of dropdown?

Thanks,

Aditya.

Former Member
0 Kudos

this i am using in CREATE method.transaction code ie02(warrenty and partner tab)

Onselect:

loop at lt_bapi_partners into ls_bapi_partners.

read table lt_bapi_partners into ls_bapi_partners index lv_index.

if ls_bapi_partners-PARVW = 'AG' .

CALL METHOD node_info->set_attribute_value_help

EXPORTING

name = 'PARNR'

value_help_mode = '121'

value_help = 'DEBI'.

elseif ls_bapi_partners-PARVW = 'AB' .

CALL METHOD node_info->set_attribute_value_help

EXPORTING

name = 'PARNR'

value_help_mode = '121'

value_help = 'ZAB'.

elseif ls_bapi_partners-PARVW = 'WE' .

CALL METHOD node_info->set_attribute_value_help

EXPORTING

name = 'PARNR'

value_help_mode = '121'

value_help = 'DEBI'.

elseif ls_bapi_partners-PARVW = 'LF' .

CALL METHOD node_info->set_attribute_value_help

EXPORTING

name = 'PARNR'

value_help_mode = '121'

value_help = 'KRED'.

elseif ls_bapi_partners-PARVW = 'ZB' .

CALL METHOD node_info->set_attribute_value_help

EXPORTING

name = 'PARNR'

value_help_mode = '121'

value_help = 'ZZB'.

endif.

endloop.

Former Member
0 Kudos

HI.

I guess I got the problem.You are looping though all the elements and assigning the search help based value selected.

Instead use the paramaters provided by the event handler for this.

On select event provides you 3 paramaters,.ID , Context_element and Key.

here Context_element holds the reference to the element which triggered the event.

Try somthing like this.

DATA : lv_value TYPE string.
CONTEXT_ELEMENT->get_attribute(EXPORTING  
                                                         NAME = 'PARVW'
                                                         IMPORTING
                                                         Value = lv_value).

Then based on value in lv_value dynamically assign the search help.

The paramater Context_element is not available by default.

Add it as an Importing paramater in the event handler of type IF_WD_CONTEXT_ELEMENT.

The following is the help link for dropdown events.

[help.|http://help.sap.com/saphelp_nw70ehp2/helpdata/en/68/5eb441b0133531e10000000a155106/frameset.htm]

Thanks,

Aditya.

Former Member
0 Kudos

Thanks aditya....but with this code also same prob is coming...any idea.its not updating.

Former Member
0 Kudos

Hi ,

I dont see any problem with this method.

Please post the updated code..With the changes i told you..

Thanks,

Aditya.

Former Member
0 Kudos

Below is the updated code:

DATA : lv_value TYPE string.

CONTEXT_ELEMENT->get_attribute( EXPORTING

NAME = 'PARVW'

IMPORTING

Value = lv_value ).

data: lv_index type sy-tabix.

read table lt_bapi_partners into ls_bapi_partners index lv_index.

if lv_value = 'AG' .

CALL METHOD node_info->set_attribute_value_help

EXPORTING

name = 'PARNR'

value_help_mode = '121'

value_help = 'DEBI'.

elseif lv_value = 'AB' .

CALL METHOD node_info->set_attribute_value_help

EXPORTING

name = 'PARNR'

value_help_mode = '121'

value_help = 'ZAB'.

elseif lv_value = 'WE' .

CALL METHOD node_info->set_attribute_value_help

EXPORTING

name = 'PARNR'

value_help_mode = '121'

value_help = 'DEBI'. " DEBI(c) KRED(v)

elseif lv_value = 'LF' .

CALL METHOD node_info->set_attribute_value_help

EXPORTING

name = 'PARNR'

value_help_mode = '121'

value_help = 'KRED'. " DEBI(c) KRED(v)

elseif lv_value = 'ZB' .

CALL METHOD node_info->set_attribute_value_help

EXPORTING

name = 'PARNR'

value_help_mode = '121'

value_help = 'ZZB'.

endif.

Former Member
0 Kudos

Hi Kiran,

I guess what you are trying to achieve is not feasible.

What happens is ..When you select 'AB' in row1 of dropdown, the value help will be say 'XXX'.

Now when you will go to row 2 and select the 'ZA' in dropdown..value help will be 'YYY'.

Now if you come back to row1 and press F4 on input field , value help 'YYY' will be displayed coz the attribute in question is same.

If you want the search help to be changed , you will have to re-select the value in dropdown ..so that your 'Onselect' event is triggerd and proper search help is assigned.

I hope i am clear here..

Thanks,

Aditya.

Former Member
0 Kudos

Thanks Aditya...exactly...so you mean to say that there is no other way to resolve it.

Former Member
0 Kudos

Hi ,

As per my learnings, This is not possible..

Lets wait for some more experts to look in..

May be there is some workaround..But I am not aware..

Thanks,

Aditya

former_member1151507
Participant
0 Kudos

Hi Kiran,

I agree with Aditya. In a table, it is not possible to assign 2 search helps at a time to a single attribute because search help assignment is at node level, not at element level. So, at a time it is possible to assign one Search help only.

One work around is, you can write the Search help assignment code in MODIFY method, based on the lead selection. This avoides selecting the drop-down many times. So, whenever user want to view the search help, he need to select that particular row also.

But, one disadvantage of using MODIFY method is it gets called many times.

Regards,

Manogna

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks all....Okay...i am trying with this also...hope will work.

Former Member
0 Kudos

Hi Kiran ,

You can also put your code for search help in on_lead_select event, so when the lead select changes the search code will again execute and you will get the desired search help.

regards

Kuldeep

Former Member
0 Kudos

Hi ,

1.) Please explain clearly.Not able to understand the problem.

2.) Increase the width of the table column so that expanding is removed.

Thanks,

Aditya.

Former Member
0 Kudos

Thanks Aditya....second one solved...let me elaborate second one:

Say i have 2 dropdown values and corresponding to selection i have a search help in another colomn.

if i select AB as dd selection corresponding search help appears then in second row i select ZB as dd selection corresponding

search help comes but i will go to previous one then for AB it shows the same ZB search help....means it overwriting...i hope u understood my prob.

Former Member
0 Kudos

Hi Kiran,

What Kind of search help are you using?

Thanks,

Aditya.

Former Member
0 Kudos

For all selection i am using different-2 search help like for AB(department responsible) i have created one elementry search help

and for some selection i used standard search help.