Read value from a view in the same component

Hi Experts,
  I have an issue. As I m new to CRM, I am unable to solve this. I am working on component SRQM_INCIDENT_H.
There are two views in this  - IncidentHeader and IncidentOV. IncidentHeader has a context CUSTOMERH in which we have a field (attribute ) zzcomptyp. I need to check this field value to enable / disable a button . The button (followup) is in the view
IncidentOV. So I need to read the field value in the method if_bsp_wd_toolbar_callback~get_buttons. but I dont know how I can read from a different view. Please let me know the syntax.
Thank you,
GSK

Hi ,
Try with the below code in if_bsp_wd_toolbar_callback~get_buttons
data:                lr_btcust             TYPE REF TO    cl_crm_bol_entity.
lr_cn = me->get_context_node( gc_cn_btadminh ).
IF lr_cn IS BOUND.
    lr_entity ?  =  lr_cn->collection_wrapper->get_current( ).   
    lr_btcust ?  =  lr_entity->get_related_entity( iv_relation_name = 'BTHeaderCustExt' ).
    CALL METHOD  lr_btcust->if_bol_bo_property_access~get_property_as_string
        EXPORTING
          iv_attr_name = 'zzcomptyp'
        RECEIVING
          rv_result    = l_value.
endif.
endif.
Regards,
Gangadhar.S

Similar Messages

  • Read Attributes between different views in the same Component

    Hello,
    I have a attribute-D1 declared in VIEW1 and i need to read it into attribute D2 declared in VIEW2.
    I am planning to read it in DO_PREPARE_OUTPUT method of VIEW2.
    Can you please tell me how can i achieve this without having to create another context node (similar type to VIEW1) in VIEW2 and Binding it.
    Can't I just access the View Controller Class of VIEW1 to read it in VIEW2?
    Quick replies would be great.
    Regards
    Dedeepya C

    Hello again,
    I think i was not very clear in my earlier post. So il explain a bit more clearly this time-
    My requirement is to display a SEARCH+RESULT popup (view) onclick of a link; and the popup display has the result list already fetched for the SEARCH Criteria(defaulted).
    Now what i had to do was have the RESULT LIST TITLE display the number of records fetched.
    So my approach was to -
    1) READ the RESULT Size in EH_ONSEARCH of SEARCH VIEW.
    2) Form the Result Title using method  cl_crm_uiu_gen_tools=>get_result_title into a Public Ins Attribute GV_TITLE.
    3) READ the GV_TITLE from SEARCHVIEW into a local attribute in SEARCHVIEWSET (SEARCH VIEW + RESULT VIEW) LV_TITLE.
    data : lv_result_title type string,
      lv_view_controller type ref to ZL_SEARCHVIEW_IMPL.
      lv_view_controller ?= controller->get_subcontroller_by_viewname( 'Ztest/SearchView' ). "#EC NOTEXT
      if lv_view_controller is bound.
      lv_result_title = lv_view_controller->gv_result_title.
      endif.
      <thtmlb:searchFrame showSearchFields = "TRUE"
                          resultListTitle  = "<%= lv_result_title %>" >
      </thtmlb:searchFrame>
    Now, i noticed during debug, when the SEARCH Popup is triggered the 1st time, the control goes to SEARCHCVIEWSET.HTM 1st (GV_TITLE is initial at this point) and then goes to DO_PREPARE_OUTPUT where the Event Handler for SEARCH is called and where the GV_TITLE is set. Due to this the Result Tab gets the default title RESULT LIST
    Whereas the next time, when i click on SEARCH event on popup, the control 1st goes to EVENT HANDLER (where GV_TITLE is set) and then to SEARCHVIEWSET.HTM, this then sets the correct title for RESULT list.
    I need some pointers on why the control goes to SEARCHVIEWSET 1st before even DO_PREPARE_OUTPUT is called.
    How do i set the RESULT Title in the 1st instance to display the correct no. of records fetched.
    Any help would be appreciable.
    Regards
    Dedeepya

  • Need to access a context_node in an another view of the same component

    Hi experts,
    I need to access a context_node which is not in my view but it exist in an another view of the same component.
    The component is ICCMP_BP_DETAIL.
    i need the context_node "CUSTOMER" from the view Bupadetail to view Bupacreate. so that i can make those context_node Attributes available in the configuration screen.
    regards,
    chella.

    Hi Chella,
    You can access the context node from other view using the custom controler or getting a context node from view that you are and use the method get_parent(to get predecessor objet) or get_related_entity(to get sucessor object).
    I think the second way is easier.
    Use transaction GENIL_MODEL_BROWSER and GENIL_BOL_BROWSER to know in wich object you are and where you have to go!
    Best regards,
    Caíque Escaler

  • Popup for view of the same component

    Hi,
    I want to display a view in a popup window, I know how to do it using interface view of an external component.
    But Is it possible to open a view of the same component in a popup window?
    Regards,
    Mauricio

    Hi,
    Create a window in you component, say MyPopUpWindow.
    In Runtime Repository, Attache the view of your component to this window.
    Now create a Component Usage , Say CUXyzPopUp , for your component as used component and use MyPopUpWindow in there. Always use F4 for attaching views, windows and attaching window to Component Usage.
    You are done !!
    Now use the usual code for creation of popup using this Component Usage.
    reuse_popup = comp_controller->window_manager->create_popup(
    iv_interface_view_name = 'ZCOMP/MyPopupWindow'  "#EC NOTEXT
    iv_usage_name = 'CUMyPopup'                      "#EC NOTEXT
    iv_title = lv_title  ).
    Hope this helps.
    Thanks & Regards
    Suchita

  • Opening a view from another view of the same window in diff Browser.

    Hi Experts,
    My requirement is to open a view (say view 2) from another view (say view 1) with click of a button in a different browser, both the views are embedded into the same window, and also i have to pass some data from view1 to view2, based no the input data, i am displaying some information. Also both views belog to the same component.
    Some pointers on this would be of great help.
    Regards,
    Ashish.

    You would need to open another window.
    See if_wd_window and if_wd_window_manager.
    Call the GET_API to get a handle to window manager.
    The new window can show V2.
    The original Window with 2 views,
    must fire plug to navigate v2 to empty view to hide it from Window1.
    The to Views talk to one another via WDC Controller.
    View 2 calls WDC controller methods.  The WDC controller the fires Event.
    View 1 can listen to this event with a method of type event handler.
    View 1 can for example react to button on View 2 and close WINDOW 2.
    Good luck
    Phil.

  • Inserting sequence value from JDBC and getting the same value back

    Hi: Gurus I have a table whose primary key is a sequence. I wonder how to make sure I get the same sequence value back for current transaction so I update the other table whose foreign key is the sequence value from first table.
    E.g lets say I do this
    String query_insert = INSERT INTO table1 (column1, ....) VALUES (HIGHLIGHT_ID_SEQ.nextval, ...);
    pstmt = con.prepareStatement(query_insert);
    pstmt.executeUpdate();
    How I make sure no other transaction update the sequence value so I can read the last inserted sequence value and update the second table with this value
    String query_select = "SELECT HIGHLIGHT_ID_SEQ.currval FROM DUAL";
    pstmt = con.prepareStatement(query_select);
    Regards,
    Rashid.

    <rant>No version again. I wonder why people requiring help want to stay anonymous and never want to type their version, only 4 digits. In this case, jdbc, not only the version of the driver is important, but also it's type. Waving a magic wand again? </rant>
    Look up the returning into clause of the insert statement in the sql reference manual for your version.
    Sybrand Bakker
    Senior Oracle DBA

  • Copying view to the same component is not working

    Hi Experts,
    I have a requirement to split the Installed Base Hierarchy view (IBHIER/TreeEnhanced) into two parts.
    Each of these parts will show a specific number of levels in the Installed base hierarchy.
    So I was trying to copy the standard IBHIER/TreeEnhanced view using the copy option by right clicking on the view name.
    I have already enhanced the component IBHIER.
    While copying the view, I am proving the following values.
    I get a message that the view is successfully copied into the z bsp application.
    I can see the view added to the z bsp application in SE80.
    But I do not see the view added in the view list in the component workbench(bsp_wd_cmpwb).
    Can you please let me know the correct process?
    Thanks,
    Samrat.

    Hi Samrat,
    i have tested in my system..
    you have copied that view right then go to run time repository go to treeoverview into that view area add ur view by bspcomponent is zibhier and view is ur copied view.
    go back and load the component again the you will see the view.
    have you seen this link this is similar to your requirement..
    How to copy standard view in same component.
    just go through this you may get some idea..
    Regards,
    Srinivas.

  • UIX- How to populate values from one view to the other- JDev10.1.2

    Hi,
    I have an enquiries table shown in a uix page.
    Once a user selects a particular enquiry, some of the details should be passed on to the Student Master table which is on a seperate UIX page.
    Could some one tell me how to achieve this.

    This is way my pages are displaying when i select first row "mady" another page display detail but not showing anything but when i click back navigation it shows that selected row on list page...
    see my code i have posted... i think i missed something....please help me!!

  • Is it possible use component controller  for to expose data of one view in another view within the same component?

    please give with an example if possible to use?
    Moderation: Thread Locked. Kindly do not post interview questions here

    I'm so sorry I don't have a solution for your problem but would you be able to show how you managed to call an external task-flow inside another application? I'm having some difficulties doing so.
    Thanks so much

  • How to set value from one view to other view's context node attr b4 save

    HI all,
    My requirement is as below:
    There are two views in component BP_CONT.
    BP_CONT/ContactDetails    IMPL class
    BP_CONT/SalesEmployee   SALESEMPLOYEE    STRUCT.SALESEMPLOYEE
    I want to set value from first view to second view's context node's attribute.
    i get Sales Employee BP number in ContactDetails view, from here i want to set that value in to STRUCT.SALESEMPLOYEE
    of second view in the same component.
    please send me code snippet for doing the same.
    Thanks in advance.
    seema

    Hi Seema
    You can access the fields from different views by either using custom controllers or by using component controllers, in your case you can access the Sales employee BP number from the Component controller.
    first access the component controller  as below in BP_CONT/SalesEmployee  (in do_prepare_output method) or in (specific setter method)
    lv_compcontroller type ref to CL_BP_CONT_BSPWDCOMPONENT_IMPL,
    lv_partner type ref to cl_crm_bol_entity,
    lv_role type string,
    lv_partner_no type string.
    lv_employee TYPE REF TO if_bol_bo_property_access,
    lv_compcontroller  = me->COMP_CONTROLLER.
    lv_partner ?= lv_compcontroller  ->typed_context->-partner->collection_wrapper->get_current( ).
    lv_role = lv_partner->get_property( iv_attr_name = 'BP_ROLE' )
    IF LV_ROLE = 'SALESEMPLOYEE'
      lv_partner_no ?= lv_current->get_property( iv_attr_name = 'BP_NUMBER' ).
    endif.
    now set the value
    lv_employee ?= me->typed_context->salesemployee->collection_wrapper->get_current( )
    CHECK lv_employee IS BOUND.
        lv_employee->set_property( iv_attr_name = 'SALESEMPLOYEE' iv_value =  lv_partner_no  )
    Thanks & Regards
    Raj

  • View data in client B from client A in the same SID without a valid logon?

    Hi Folks
    We are planning on upgrading our 4.6C system to ERP 6.0, and are initialy considering having two clients in the same sandbox SID.  One would be for the developers to perform code remediation checks (client A), and one would contain a copy of production data for performing testing of functionality over live data (client B).
    Would it be possible to view data in client B from client A in the same system without a valid logon to client B or RFC connection to client B from client A?   For example via the use on an ABAP program to SQL the database?
    I know one can use transactions like SM30/SM31 to view, compare, and adjust data between clients, but this requires an RFC connection and valid logon to the target client.
    Regards
    Kevin.

    Hi Kevin.
    >
    Kevin McLatchie wrote:
    > Would it be possible to view data in client B from client A in the same system without a valid logon to client B or RFC connection to client B from client A?   For example via the use on an ABAP program to
    Short answer: yes.
    If someone has the right to write and execute ABAP reports on the system he is able to access the data of all clients. So I don't think that this setup is advisable. Don't mix development and production data in one system.
    Best regards,
    Jan

  • How to read values from the following XML?

    I have been using "extractValue" to get the values from a xmltype field and no problems until now.
    The xmltype now is like:
    <a>1</a>
    <b>2</b>
    <c>1221</c>
    <c>1412</c>
    <d>11111</d>
    <e>3333</e>
    I'm able to read values from 'a,b,d,e' but not from 'c'.
    Questions:
    1)- Is posible to read the values of field c?. How?
    2)- If is not posible to read the field values, Is posible to transfor the xmlfield to:
    Where I will be able to use xmltable columns and loop getting the values.
    <a>1</a>
    <b>2</b>
    <k>
    <c>1221</c>
    <c>1412</c>
    </k>
    <d>11111</d>
    <e>3333</e>
    Like always
    Thank you in advance for your help.
    Jose Galan

    SQL> with XML as
      2  (
      3   select xmltype(
      4  '<root>
      5    <a>1</a>
      6    <b>2</b>
      7    <c>1221</c>
      8    <c>1412</c>
      9    <d>11111</d>
    10    <e>3333</e>
    11  </root>'
    12  ) XMLDOC
    13    from dual
    14  )
    15  select a, b,c, d, e
    16    from XML,
    17         XMLTABLE
    18         (
    19            '/root'
    20            passing XMLDOC
    21            columns
    22            A number(5) path 'a',
    23            B number(5) path 'b',
    24            D number(5) path 'd',
    25            E number(5) path 'e',
    26            C_XML_FRAG xmltype path 'c'
    27         ),
    28         XMLTABLE
    29         (
    30           '/c'
    31           passing C_XML_FRAG
    32           columns
    33           C number(5) path '.'
    34         )
    35  /
             A          B          C          D          E
             1          2       1221      11111       3333
             1          2       1412      11111       3333
    SQL>

  • How do I view multiple images from different projects at the same time?

    Hello
    I've been trying to find the answer in the user manual, but no luck so far.
    I did find how to open 2 projects at once, but I can only see one image at a time in the viewer and I have to keep going back and forth between projects to compare images. (These are scans of old photos and I want to eliminate the ones that are poorer quality, so need to compare numerous images from 2 sets of scans)
    How can I view an image from one project at the same time as an image from another? I know that it can be done in the same project by apple-clicking the second, third etc image, but this doesn't work if the images are from different projects.
    Thank you
    Elizabeth

    Thank you again Tony
    I've now created an album, independent of the projects, and dragged test images into it and it does just the job I needed. Now i just need to keep my brain sorted with which ones are which while i'm working
    Elizabeth

  • Different view of the same query between users

    Hi at all,
    I strongly hope you can help me.
    The problem that i have is that:
    I have a different view of a query inserted in a workbook respect the view of the same query that have other users.
    In particular I watch in my query 4 fixed characteristic of the query ( Cost center, order type , controlling area, fiscal variant ), below the free characteristic block  and before data table.
    Instead other user watch only 3 fixed characteristics ( Cost center, order type , controlling area ).
    This is a problem because in the workbook there is a macro that reads the data from a fixed raw. So that this macro doesn't' t work in my workbook.
    I would specify that the workbooks is called from rules and not from fevorites.
    Thank you very much for your attention!
    Bye
    Fabio

    Hi Erwan,
    i have the SAPGUI version 3500.8.044 and the item you describes :
    Bex menu ( Business explorer -> Change Query -> Change variable values )
    let me to change the values of input variables.
    The new layout query, after the input of the new values, has the same rows of the fixed query value ( fyscal variant too).
    Thank you for your answer..
    bye
    Fabio

  • How to maintain several views of the same data and update a tree

    I have an object UiUser, which is displayed in my application in several different views. There are three different views which all have the User object i.e. search results, user tree and user table. Each of the views has the same menu items, so the user can be deleted from any of the views.
    What I am trying to work out is how should I ensure the item is updated in all of the views?
    I can fire a property change event with the UiUser and update two of the views i.e. search results and user table, but how do I update the tree?
    I thought of overiding the equals/hashcode methods of the UserTreeNode to compare uiUser.getId () and I could then search the tree and find the tree node of the required UiUser. But I have reservations about this whole approach as it just seems wrong.
    Any ideas of how to keep N views in sync, I really don't want all of the views to have tree nodes as this equally seems wrong. This should be a simple problem to solve and I'm sure lots of people have done it, I'm just not sure which is the best approach to take.
    Thanks

    Hi Jan,
    This is so because each installer has a GUID that is used to check whether the application needs to be upgraded or not. (It's a Microsoft function).
    What you can do is create a new installer with a different GUID (copy the installer in the projects), and check witha  text editor whether this GUID has changed.
    But any specific reason you need two seperate installs? You can run the application twice with a specific INI token:
    allowmultipleinstances=True
    Ton
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

Maybe you are looking for

  • Add a new POP email acct to iPad

    I am trying to add a new POP account to y husband's iPad 3rd generation, IOS 6. It creates as an IMAP account, which AT&T / sbcglobal.net does not support. I thought there used to be a toggle or selection for POP or IMAP when I have done this in the

  • Problems trusting certificates from other users

    I'm unable to trust certificates from users when the email address on their certificate does not precisely match the From address of the message. The mismatch is typically something like a From address of [email protected] and a certificate address o

  • Output format at new

    hi , my requirement is at every new lifnr that lifnr no. should be displayed on the top of the output. TABLES: BSEG,         BKPF,         BSAK,         LFA1. TYPES : BEGIN OF TY_BSEG,       BELNR LIKE BSEG-BELNR,       BUZEI LIKE BSEG-BUZEI,       B

  • Need advice or help on creating a opt-in flash banner!

    Hey everyone, Im a beginner in flash and need help creating a opt-in banner in flash. the banner has two fields, name and e-mail, so when information is entered it goes to an .xls or .csv file on a server. i dont know how to start the process. I need

  • Printer not working with Airport for Win XP

    I installed an Airport Extreme and am able to successfully print with my Macbook pro, but can't get my Windows PC to find the printer at all. The Windows XP PC is connected to the Airport with an ethernet cable. Any suggestions?