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

save functinality for a zcomponent (table view)

Hi ,

I have created a zcomponent with a table view in it.

i have include the zcomponent(table view) in BP page.

Now when i press on save button of BP page ,i need to save the data entered in the custom table view.

so i need to redefine the save evenet (which is there in bp_head).

How could i access the conents of table view in bp_head?

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 Sep 08, 2011 at 11:32 AM

    Hi,

    You can do this way.

    1. As you have used the component usage, enhance the component controller of the BP.

    2. Add the same context node in the component controller.

    3. Redefine the method WD_USAGE_INITIALIZE of the comp controller of the bp and bind both the context nodes.

    (i.e custom component context node and component controller context node). Do not forget the uncomment the super class method call as it contains all the existing bindings.

    4. So in the save event of the overview page, you just access the component controller which is available.

    (me->COMP_CONTROLLER).

    5. Go to its attribute TYPED_CONTEXT and you will get your custom table view entity.

    6. Save your entity with your custom codes. Do not interrupt the savings of the standard code. (You can save your custom bol after you super class call finished)

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      HI,

      In my earlier post, i have mentioned how to retrieve the emp resp from builheader entity.. what is the lr_entc entity ??if it is builheader you can use the below mentioned code.

      DATA: lv_str type CRMT_BUPA_IL_RELATION.

      IF lcl_ent1 IS BOUND. " this must be buildheader entity

      lcl_ent2 = lcl_ent1->get_related_entity( 'BuilEmplResponsRel' ).

      if lcl_ent2 is bound. " this is the emp resp entity...

      lr_ent2->get_properties( IMPORTING es_attributes = lv_str )." you can retrieve the partner2 directly..

      • in lv_str, partner2 will be the employee responsible...

      endif.

      ENDIF.

  • author's profile photo Former Member
    Former Member
    Posted on Sep 09, 2011 at 03:27 PM

    Hi,

    The best possible solution would be is to add the table with EEWB(you can also use AET if you are on EHP1). Once you add a table and bring it on to the UI by doing post processing for EEWB, the whole save, create, modify and reading of the values will be taken care by SAP itself. Hassle free.

    Thanks!!

    Bhargava.

    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.