Skip to Content
author's profile photo Former Member
Former Member

How do I create an dropdown object within a javascript function?

Is there any way to create an SAP dropdown box object within a Javascript function?

We have a standard web template that is used by all queries. We would like to have a dropdown box for the key figures but the structural ID of the key fields is different in each query so we must therefore retrieve the key field structure from the data_provider and then allocate it against against the param IOBJNM within a Javascript function. This is where we are struggling. Has anyone done something similar?

Any examples would be greatly appreciated.

Cheers

Shep.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 23, 2004 at 08:38 AM

    Hi,

    I wouldn't try it that way. Instead in your case I would utilize the Table Interface to get the structure elements written in a javascript function.

    therefore redefine the finished method

    http://help.sap.com/saphelp_nw04/helpdata/en/e5/73a63a9f5f4548e10000000a11402f/frameset.htm

    and use in there set_javascript_function

    http://help.sap.com/saphelp_nw04/helpdata/en/5f/e7393c0fc8486ce10000000a11402f/frameset.htm

    You can find the Structure elements in

    n_r_data_set->N_R_REQUEST->N_SX_REQUEST-mem

    Just loop through the table and create a small javascript function (which will return the structure elements of a given structure). Then you can use it in your coding.

    Heike

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 23, 2004 at 02:50 PM

    Heike,

    It worked like a dream. Thank you !!!!!

    Cheers

    Shep.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.