cancel
Showing results for 
Search instead for 
Did you mean: 

DropdownbyKey - strange requirement

Former Member
0 Kudos

I have this requirement - I have two DropdownbyKey elements. Based on the value selected in the first dropdownbykey field, the second dropdownbykey field should showup with the dropdown icon if it contains possible values, or it should showup as plain text field(without the dropdown icon) in case there are no values Is this possible?

<<text removed>>

Regards

JB

Edited by: Matt on Apr 22, 2010 6:52 AM - please do not use phrases like "quick response required"

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Thanks Chris. Can you please explain a little bit. I am not sure how to do context binding in this case? Should I bind the same node attribute to both dorpdown box and input field?

Appreciate your help.

Regards

JB

ChrisPaine
Active Contributor
0 Kudos

Hi James,

simply - yes!

Then just control the visibility of the fields - using whichever method makes sense - i.e. depends on whether in table or not.

Chris

Former Member
0 Kudos

Hi Chris,

I think I am getting closer, but need more help:-) Now the problem is that when I disable the dropdown field, the input field becomes enabled, but it is not left-aligned. I want to overlay this input field on top of dropdown field.

Appreciate your quick reply.

Regards

JB

phanir_mullapudi
Active Participant
0 Kudos

Hi,

I think you can solve the alignment issue by having each of those in seperate Transparent containers & setting visibility accordingly as mentioned by Chris.

Thanks,

Phani

ChrisPaine
Active Contributor
0 Kudos

Hello James.

I recently posted a thread here about visibility. Might be worth having a look!

One of the key points is that there are 3 type - blank, none and visible .

It sounds like you are setting the visibility to blank for your dropdown when you are making it invisible - in this case it doesn't rearrange the layout but still holds its position.

Check that you are making it visibility of none.

Cheers,

Chris

Former Member
0 Kudos

Thanks. I was able to resolve this issue.

0 Kudos

Follow the given steps

1) create a internal table with all possible values including 2 colomns 1) for inputbox/dropdown

2) internal table which hold dropdown values

for above requiement you have to craete a dynamic node .

2) After that in initilization ALV use the concept of cell varient which will bind the data accoeding to the internal table

whether it it input box or dropdwon .

Answers (4)

Answers (4)

Former Member
0 Kudos

Is it possible to dynamically replace this second dropdown-by-key field with an input field, based on the value selected in the first dropdown-by-key field.?

ChrisPaine
Active Contributor
0 Kudos

Hi James,

yes - if you are in a table - look at the functionality provided by cell variants, otherwise in the onSelect method of the first box you could control the visibility of two fields - one a dropdown list, the other an input field - if you wanted an input field just set that as visible and hide the dropdown - and vica-versa.

Hope it helps,

Cheers,

Chris

ChrisPaine
Active Contributor
0 Kudos

Hello James,

If you make your second dropdown a dropdown by index and only populate the node that it is bound to on the selection event of your first dropdown, this will give you some of the behaviour that you want.

Hope this helps,

Chris

Former Member
0 Kudos

Thanks for your answer Ram.

But, I am using ABAP webdynpro.

matt
Active Contributor
0 Kudos

Moved to correct forum.

former_member1245113
Active Contributor
0 Kudos

Hi Bond,

Check the below thread

PARAMETERS list TYPE spfli-carrid AS LISTBOX VISIBLE LENGTH 18.
DATA : first.

AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
      IF screen-name = 'LIST'." If you dont find relevant value from First List box then Implement this
        screen-values_in_combo = 0.  " This makes List Box as Input Field and 1 means List Box
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.

Cheerz

Ram