cancel
Showing results for 
Search instead for 
Did you mean: 

Setting table values as drop down

Former Member
0 Kudos

Hi all,

In my application i hv made a web service , created a model of it, for inserting and displaying data in tables.

I am able to do that bt im facing problem:

How to set the values of table as the values for the dropdown box in my view.

the drop down has novalues to select from.

Plz let me know.

Thanks and Regards,

Ankita

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

have u checked if u are getting values for drop down..try to print the size of the node that u r binding with the drop down.

AM

Former Member
0 Kudos

Hi,

where u facing problem.

are you able to pop up valus for drop down box?

are you facing problem in adding values to the table?

AM

Former Member
0 Kudos

Hi,

Could you please let us know more clearly what you want to show in the dropdown.

From where the data needs to be displayed in the dropdown?

thanks & regards,

Manoj

Former Member
0 Kudos

Hi Manoj,

Actually i want to select a value from the dropdown and it shud get inserted to the table.

Ankita

Former Member
0 Kudos

Hi Manoj,

Actually i want to select a value from the dropdown and it shud get inserted to the table.

The dropdown values shud nt be present in table...

When i select it from the list it shud get inserted into the table

Ankita

Former Member
0 Kudos

Hi,

So you have a dropdown and when you select value from the dropdown then onSelect event of this dropdown take the value from the drop down attribute and set it to the attribute of the table column. Its simple as it is.

Make sure to set the particular element of the table i.e leadSelect of the table row.

Hope this is the thing you required.

thanks & regards,

Manoj

Edited by: Manoj on Aug 18, 2008 11:30 AM

Former Member
0 Kudos

I hv created a web service to insert and display records of table.....

So i need to bind all the input field and dropdown by index to the attributes mapped from the table..

im nt facing prob with input fields..

But how do i set drop down values..

there must be a set of values in my drop down list, i will select a value from it and it shud get inserted into the table..

Im nt able to set value to dropdown,

it is displayed as blank..

Ankita

Edited by: Ankita Padhi on Aug 18, 2008 8:05 AM

Former Member
0 Kudos

Hi,

So the problem is with the dropdown. If the values are supposed to come from the web-service then check your web-service. It should be having some values for a node having multiple elements.

If it is static then create a simpleType and map it to the dropdown(bykey) in your view.

Refer the following link:

http://help.sap.com/saphelp_nw04s/helpdata/en/95/93fe1e71a2e44691b1f041e67f71aa/frameset.htm

thanks & regards,

Manoj

Former Member
0 Kudos

I tried doing that bt still its nt working..

the web sevice i hv creted has jst two functionalities:

insert records()

and view records()

im creating a model and binding it to context.

the first view is a form.

i hv created a drop down by key for the label TYPE.

if i map it to the Attribue TYPE from the model , im nt able to gt any selection values..

hw do i set some selection values for the drop down..

i cannot create a new attribute coz its nt mapped to model, so it will nt get inserted into the table.

Ankita

Former Member
0 Kudos

Hi,

Then check with the web-service provider which attribute to map to the dropdown.

Could you please post the context structure of the view model node.

thanks & regards,

Manoj

Former Member
0 Kudos

this is the model node structure:

###########

CONTEXT:

REQUEST_TEST_WS_GETALL

ReSPONSE

RESULT

1.status

2.title

.........

10.type

REQUEST_TEST_WS_INSERT

RESPONSE

RESULT

{list of attributes}

{LIST OF ATTRIBUTES}

############

when i createa form to insert values to table, i map all the input fields to the respective attributes in REQ....INSERT.

bt which attribute do i bind the dropdown by key.

i need to select one value from those available in the dropdown list and it shud get inserted into the table..

i hope u cud understand where i face prob..

Former Member
0 Kudos

Hi,

Lets solve it. Where is your dropdown? Is it inside a column of the table?

What is the size of RESULT node?

You need to bind the DD with the attribute from REQUEST_TEST_WS_GETALL. Its different question if you are not getting list of values.

Now if the size of the result node is more than 1 then loop through it and get all the values of attribute TYPE into an array and then create simpleType as shown below in the link:

http://help.sap.com/saphelp_nw04s/helpdata/en/86/16e13d82fcfb34e10000000a114084/frameset.htm

Create another attribute with this simpleType and bind it to your dropdown.

Hope this will work. But depends on your answers to my question. Lets see.

thanks & regards,

Manoj