Skip to Content
author's profile photo
Former Member

hello everyone a question with bol collection

i want to add some data to a empty collection with a table view before the view display, ,how can i do?

i redifine the method 'DO_PREPARE_OUTPUT'. and i don't want to use the query object.so what can i do?

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • author's profile photo
    Former Member
    Posted on Apr 22, 2011 at 04:56 PM

    Hi,

    Assuming that you are reading data from one of the couple of methods available like:

    1. reading from table

    2. reading from custom/component controller

    3. data coming in context node through binding

    you can set value in the context node attribute by attribute using

    lr_entity =? me->typed_context-><cnname>->collection_wrapper->get_current().

    then do set_property of lr_entity to set value.

    OR

    set complete collection using typed_context-><cnname>->set_collection(lr_collection) method.

    I hope that helps.

    Thanks,

    Rohit

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Apr 25, 2011 at 11:45 AM

    Hi..

    It depends on whether the context node is a model node or a value node. If it is a model node, then it will not be easy to add data to its collection without getting it from the GenIL layer. But if it is a value node, then you can easily add it. You can refer to the INIT( ) method of a value node to figure out how to do this.

    Regards,

    Shiromani

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on Apr 27, 2011 at 01:39 AM

    Hi

    i already used many ways to add data to the collection , and the context node is a model node .but all fail.

    can you give me some source codes for this scene. thank you.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on May 03, 2011 at 12:44 PM

    hi,

    you can make the model node to a mixed node. So you have to use cl_bsp_wd_2collection_wrapper instead of sap standard cl_bsp_wd_collection_wrapper. Please take a look at CL_IUICCON_CONTRACTLISTEN_CN00 and method IF_BSP_MODEL~INIT.

    Best regard

    Y

    Add comment
    10|10000 characters needed characters exceeded