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

caluculated field using aet.

Hi ,

using caluculated field ,can i add all the items (column) and display the result?

Thanks,

Anitha

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 Aug 24, 2011 at 05:04 AM

    Hi,

    Can you refer to link adding the values in a column of a table

    Hopet this helps.

    Regards,

    Anup

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 24, 2011 at 09:48 AM

    Hi Anitha

    Yes using calculated field you can, but the best approach is (Assuming that) result is not going to be stored in database, and it will be calculated during runtime for this create one value node which holds the result value and fill this result value with all the colums sum and display result on screen.

    Thanks & Regards

    Raj

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      In do_prepare_output_method.

      Please write the following code.

      data: 
      lr_entity    type ref to cl_crm_bol_entity,
      coll_wrapper type ref to cl_bsp_wd_collection_wrapper,
      
      total_sales type String,
      sales       type string.
      
      coll_wrapper ?= me->typed_context->yourtablenode->get_collection_wrapper( ).
      lr_entity = coll_wrapper->get_first( ).
      
      while lr_entity is bound.
      
      sales = lr_enity->get_property_as_string( 'SALES' ).
      total_sales = total_sales + sales.
      clear sales.
      
      lr_entity = coll_wrapper->get_next( ).
      
      endwhile.
      
      clear lr_entity.
      * set total_sales to cutom field 
      lr_entity = me->typed_context->Yournodename->collection_wrapper->get_current( ).
      lr_entity->set_peroperty(
         iv_attr_name = 'TOTAL_SALES' 
         iv_value = total_sales ).
      

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.