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

Dropdown table reference lost in the bsp page & exists in iterator -Urgent

Hi,

In my bsp application, I have one tableview having an iterator controlling its rendering part.

Now for one editable column, I have dropdown list,and that list is being "displayed" on the bsp page, but when DRPDWN_EVENT is fired, (In the debugging mode) I receive table reference to this column-dropdown as initial.

I don't understand where this reference loses its value?

Can anyone help? It's Urgent.

Thanks & Regards,

Krupa

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 20, 2005 at 10:38 AM

    Hi Krupa,

    I think I understand what your problem is.

    When you call the iterator & a cell is rendered you have the vaues of the entire row in the parameter P_ROW_DATA_REF.So all you have to do is declare an attribute say, row_ref type ref to data and in IF_HTMLB_TABLEVIEW_ITERATOR~RENDER_CELL_START method you have to do the following assignment:

    ROW_REF = P_ROW_DATA_REF.

    CASE P_COLUMN_KEY.

    WHEN 'ZR8CIOBJN'.

    CREATE OBJECT DROPDOWNBOX.

    DROPDOWNBOX->ID = P_CELL_ID.

    GET REFERENCE OF ME->OBJECTLIST INTO DROPDOWNBOX->TABLE.

    DROPDOWNBOX->NAMEOFKEYCOLUMN = 'ZR8CIOBJN'.

    DROPDOWNBOX->NAMEOFVALUECOLUMN = 'ZR8CIOBJN' .

    DROPDOWNBOX->SELECTION = GET_COLUMN( 'ZR8CIOBJN' ).

    DROPDOWNBOX->WIDTH = '100%'.

    ENDCASE.

    You need a method GET_COLUMN() for assigning the value to the DROPDOWNBOX->SELECTION.

    Parameters of this method are:

    Importing COLUMN_NAME TYPE STRING

    Returning VALUE( COLUMN_VALUE ) TYPE STRING

    The method itself has the following coding:

    method GET_COLUMN.

    data tempchar(240) type C.

    FIELD-SYMBOLS: <row> TYPE ANY,

    <col> TYPE ANY,

    <cur> TYPE ANY.

    ASSIGN row_ref->* TO <row>.

    ASSIGN COMPONENT column_name OF STRUCTURE <row> TO <col>.

    if sy-subrc <> 0.

    column_value = ''.

    return.

    endif.

    write <col> to tempchar.

    move tempchar to column_value.

    condense column_value.

    endmethod.

    Hope this will help.

    Regards

    Tejaswini

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 18, 2005 at 06:42 AM

    Are you using MVC or normal BSP?

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 20, 2005 at 11:24 AM

    Sorry the message was posted twice

    Message was edited by: Tejaswini Das

    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.