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

Read Context Node In Separate View

Hello,

Within a getter method of my Context Node, I would like to retrieve values within a Context Node of a separate View within the same Component. Does anyone know if this is possible?

Specifically, within the following:

Component: BT111H_OPPT

View: BT111H_OPPT/Details

Context Node: BTOPPORTH

Field:STRUCT.ZZ_AMT_ELIGIBLE (within Getter Method of this field)

I would like to retrieve the following:

Component: BT111H_OPPT

View: BT111H_OPPT/ItemsList

Context Node: BTADMINI

Field:STRUCT.ZZ_MRR_AMT_RENEW

I'll need to retrieve the list of Items, loop through them, and calculate the total ZZMRR_AMT_RENEW, and then display this value in my custom field on the Opportunity header (i.e., ZZ_AMT_ELIGIBLE).

I would think this is possible, however, I'm not sure about the syntax.

Thanks!

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 28, 2009 at 04:47 AM

    Hi,

    You can use standard cuco BT111H_OPPT/CUBTTextCOMP.

    You can write following code in do_prepare_output of details view. Do the calculation and set the field there only.

    lr_cuco_partner ?= get_custom_controller( 'BT111H_OPPT/CUBTTextCOMP').
      if lr_cuco_partner is bound.
      lr_entity_cuco ?=  lr_cuco_partner->TYPED_CONTEXT->BTAdminI->collection_wrapper->get_current( ).
         if lr_entity_cuco is bound.
         
          lv_process_type = lr_entity_cuco->get_property_as_string( 'YOUR_FIELD' ).
         endif.
     endif.
    
    

    Best Regards

    Pankaj Kumar

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 28, 2009 at 04:47 AM

    Hi,

    You can use standard cuco BT111H_OPPT/CUBTTextCOMP.

    You can write following code in do_prepare_output of details view. Do the calculation and set the field there only.

    lr_cuco_partner ?= get_custom_controller( 'BT111H_OPPT/CUBTTextCOMP').
      if lr_cuco_partner is bound.
      lr_entity_cuco ?=  lr_cuco_partner->TYPED_CONTEXT->BTAdminI->collection_wrapper->get_current( ).
         if lr_entity_cuco is bound.
         
          lv_process_type = lr_entity_cuco->get_property_as_string( 'YOUR_FIELD' ).
         endif.
     endif.
    
    

    Best Regards

    Pankaj Kumar

    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.