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

component

hi,,,

i have two components: compA and compB.

compA-standard component.

CompB-custom component.

how can i transfer data from compA to CompB.

thanks&regards,

suresh babu

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 11, 2012 at 10:39 AM

    Hi Suresh,

    • Make context node in CompB as interface node in runtime repository
    • Create same kind of context node in CompA component controller
    • Bind both context node in WD_USAGE_INITIALIZE of CompA component controller.


    CASE iv_usage->usage_name.
    WHEN 'usage_name'.

    iv_usage->bind_context_node( iv_controller_type = cl_bsp_wd_controller=>co_type_component

    iv_name = iv_usage->usage_name

    iv_target_node_name = 'BTADMINH'
    iv_node_2_bind = 'BTADMINH' ).

    ENDCASE.

    Regards

    Rajarama U

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 11, 2012 at 08:10 PM

    Hi Suresh Babu,

    In Order to transfer data from CompA to CompB or accessing data in CompB of CompA, you use the concept of Component Usage,

    In Order to achieve this follow these steps,

    Go to CompB --> in CompB go to runtime repository,--> in Rub time Repository below we have Component Usage Bar --> Right click to add new component --> Enter any ID (ex: ZBP) --> Enter Used Component (EX: CompA) -->Enter Interface View (Ex: Main Window).-->SAVE Runtime Repository.

    Now in the component Structure Browser --> go to component controller --> go to context node and create a Model Node ( which context node you have your data attributes).--> once context node is created----> in component Controller implementation class (_IMPL) --> go to method WD_USAGE_INITIALIZE ( ) and redefine it and write the code given by Rajarama U.

    Regards


    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on May 29, 2013 at 07:15 AM

    I am not sure that this is the complete picture. Certainly the advise above is good but in component A you need a component usage of component B and in component B you need to add the context node under the component interface -> context in the runtime repository.

    Otherwise when you do a binding you will get error:

    The view controller or custom controller "" was implemented incorrectly

    with error class CX_BSP_WD_INCORRECT_IMPLEMENT

    Hope this helps the person reading this right now 😉


    btorder.png (2.5 kB)
    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.