Choosing the view dynamically from mm02

Hi Experts,
I am making a BDC Program  of transaction MM02, As per the requirement I need to choose a particular  view
and  change the value of a field (which is a custom field added through extention)
now  i have cheked many materials , with change of material no the  position of the views differs in the sequence,
for eg : if the view  is sales org 
for material 001 it is on 5th No and for material 002 it is  on 4th noi
i need to pick the same view for every material irrespective of the position of  the view in the sequence
if record with matarial 001 the cursor would go 5th no ;while uploading materials like 002  the program would pick the view on 5th no which would not be sales org.
Could u please tell me if there is a way through which we can pick a particular view for all materials dynamically.
Edited by: sabsvk on Sep 21, 2009 12:54 PM

Since the views are dependent on material types so you have to go by the material type of the material which you can find out in MARA table.
Apart from the previuos replies you can check the following code for your BDC.
DATA: lv_tkstatus(15),
      lv_dispstatus LIKE t130m-pstat.
DATA: BEGIN OF lt_bildtab OCCURS 30.
        INCLUDE STRUCTURE mbildtab.
DATA: END OF lt_bildtab.
PARAMETERS : p_mtart LIKE t134-mtart.
SELECT SINGLE pstat INTO lv_tkstatus FROM t134 WHERE mtart = p_mtart.
CALL FUNCTION 'SELECTION_VIEWS_FIND'
  EXPORTING
    bildsequenz  = '21'
    pflegestatus = lv_tkstatus"mara-pstat
  TABLES
    bildtab      = lt_bildtab.
LOOP AT lt_bildtab.
  IF lt_bildtab-pstat CA lv_tkstatus.
    IF lt_bildtab-kzanz IS INITIAL.
      lt_bildtab-kzanz = 'X'.
      MODIFY lt_bildtab.
    ENDIF.
  ELSE.
    IF NOT lt_bildtab-kzanz IS INITIAL.
      CLEAR lt_bildtab-kzanz.
      MODIFY lt_bildtab.
    ENDIF.
  ENDIF.
ENDLOOP.
READ TABLE lt_bildtab WITH KEY dytxt = 'MRP 1'.
* Take the SY-TABIX value to locate the position.
May be some help you will get.
Regards
Shiba Prasad Dutta

Similar Messages

  • Calling a method in the view controller from the component controller

    Hi
    Is there anyway to call a method in the view implementation from the component controller??
    Thanks
    jack

    Thanks for all your replies. I want this kind of a functionality because Im trying to invove a DC (Child DC) from a Parent DC such that the Child DC's view is displayed onto the view container of the Parent DC. I have embedded using 'interface view of a component instance' in the Parent Window and am able to create the component and set usage though the onPlugDefault of the Child View.
    But I observe that when i make a call from the parent, the flow is like this:
    1. The wdDoInit of the Child Component Controller gets triggered first.
    2. Then the wdDoInit of the Child's <b>VIEW</b> gets triggered
    3. and <b>THEN</b> the onPlugDefault of the Child Component Interface View
    What I had actually wanted was to Fire onPlugDefault where Im calling a method LoadData(), after which the Child DC's view must be triggered so it can display the fetched data.
    What is actually happening is the view gets displayed, but no data is displayed in the view.
    Right now I have just given a work around where Im triggering <b>LoadData()</b> of the <b>COmponent COntroller</b> from the <b>wdDoInit</b> of the <b>VIEW</b>.
    Is there a better way to do this? I find it strange that I have to load the Data from the view.
    Thanks
    Jack

  • Is it possible for an AIR application to get the content dynamically from server in Android?

    To give you people the context we will be developing Hybrid application using HTML5 and PhoneGap which will be published on Android and iOS platforms.
    I want to know if an AIR application in android can get the content dynamically from the server. If yes, then how part comes into picture?
    PS:- I dont have any knowledge about AIR applications and i am an Android developer and exploring this integration of AIR on android.

    Yes, an AIR app on android (or iOS) can communicate with a server in several ways.
    Search 'adobe air zend amf' on the web to see some examples.

  • IDVD 7.1.2: I am making music instrument instructional DVDs, and I want to include several audio loops in that the viewer access from the main menu to play along with

    iDVD 7.1.2: I am making music instrument instructional DVDs, and I want to include several audio loops that the viewer access from the main menu to play along with

    Export the slideshow out of iMovie via the File  ➙  Share ➙ File menu option as a 480p Quicktime movie.
    Open iDVD, select a theme and drag the exported QT movie file into the open iDVD window being careful to avoid any drop zones.
    Follow this workflow to help assure the best quality video DVD:
    Once you have the project as you want it save it as a disk image via the File ➙ Save as Disk Image  menu option. This will separate the encoding process from the burn process. 
    To check the encoding mount the disk image, launch DVD Player and play it.  If it plays OK with DVD Player the encoding is good.
    Then burn to disk with Disk Utility or Toast at the slowest speed available (2x-4x) to assure the best burn quality.  Always use top quality media:  Verbatim, Maxell or Taiyo Yuden DVD-R are the most recommended in these forums.
    OT

  • HT201320 Once I have downloaded email on my iPad the same is not downloaded on my laptop. Have tried all settings including choosing the setting DELETE FROM SERVER:NEVER and REMOVE FROM SERVER:NEVER

    Once I have downloaded email on my iPad the same is not downloaded on my laptop. Have tried all settings including choosing the setting DELETE FROM SERVER:NEVER and REMOVE FROM SERVER:NEVER

    Hey rbrylawski, just wanted to let you know that my ipad email problems have been solved. Called Apple Sup in OZ, I'm in NZ. Daniel Barber was the support tech from heaven!! I was about to return the ipad but solving this issue reset my faith in phone support.....perhaps until I call a differnet companys phone support eh? Anyhow, for reference the fix is below.  My accounts are all POP not IMAP, and the primary smtp server setting had defaulted to have SSL switched on and the port was set to 5XX (something, cant remember). Anyhow, SSL was switched off and the port was swithced to 25. VOILÀ!!  Settings/Mail, contacts, calendars/My POP mail account/smtp/primary server/ >>> server on, no username and password,  use SSL off,  no authentication,  Server Port 25  Thanks for having a crack at it. This might help when assisting another user. Cheers Tonino

  • How to get the view tree from a jsp page

    Hi,
    I would like to get the view tree of a jsp page. The idea is to dynamically include the content of one or more jsf pages into a UIPanel during a "value changed" event.
    So, i could get from an arbitrary page like ...
    <%@ taglib uri="http://java.sun.com/jsf/core"   prefix="f" %>
    <%@ taglib uri="http://java.sun.com/jsf/html"   prefix="h" %>
    <h:panelGrid columns="3" width="100%" rowClasses="gridTop">
        <h:outputText value="#{someBean.someValue}"/>
    </h:panelGrid>... the corresponding List of components...
    Any idea?

    Thanks for your answer Jayashri,
    The view tree can be retrieved by this way during the page is parsed, for example with scriptlets <%%>, or once the page has been parsed (the view has been builded and attached to the FacesContext).
    My problem is to get the view tree of a page from another Context.
    The idea is to build a dynamic layout of some pages that represents "views". I can imagine this like the concept of perspectives and views of Eclipse IDE.
    Because of the difficulty to build it with pure JSP (cannot use dynamic ID nor JSTL ForEach), I try to build it into my backing bean and to bind it with a <h:panelGrid/>. By this way, I'm not able to use the <jsp:include/> tag as I usually did to include some content into the view tree.
    Sorry for my english ;)
    - Renaud.

  • How do I customize the toolbar if I've removed the "view" tab from the toolbar?

    I was trying to customize my toolbar while working in excel and accidentally removed all of the tabs along the top toolbar (File, Edit, View, etc).  I can't figure out how to put them back as all of the help threads begin with "go to the View tab".

    Hi, ryanfromtorrance.
    I think I'm understanding what you did.
    You will need to start in the Excel menu bar at the very top of your screen.  The one with the  in the far left corner.  Find the View menu there. It should be three over from the  icon.
    Click View > Customize Toolbars and Menus...
    When the Customize Toolbars and Menus window opens, click the Toolbars and Menus tab, then make sure the checkbox next to Standard is checked.
    That should return the display of your toolbar when you close that customize window.
    I hope this is helpful.

  • How can we enter the data dynamically from datagrid to an arraycollection?

    Hi All
                        How can we make datagrid fields editable when it is in empty position i mean the datagrid doesn't have any data to display.. and it must accept the data and update the arraycollection dynamically..
                 Now in my Application the datagrid is empty and it is not accepting any values and it still remain ideal..  i am unable to edit the datagrid fields in the datagrid .....
      Please some one tell me how can i achieve this...

    Here is a very basic example.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="onCreationComplete()">
    <mx:Script>
      <![CDATA[
       import mx.collections.ArrayCollection;
       [Bindable] private var _dataProvider:ArrayCollection;
       private function onCreationComplete():void {
        _dataProvider = new ArrayCollection();
        for(var i:int = 1; i <= 100; ++i)
         _dataProvider.addItem({ROW:i,A:"",B:"",C:"",D:"",E:"",F:"",G:"",H:"",I:"",J:"",K:"",L:"", M:"",N:"",O:"",P:""});
      ]]>
    </mx:Script>
    <mx:Panel title="Editable DataGrid Example" height="472" width="584" horizontalCenter="0" verticalCenter="0">
      <mx:DataGrid id="dg" width="100%" height="100%" rowCount="5" dataProvider="{_dataProvider}" editable="true" horizontalScrollPolicy="on" sortableColumns="false" draggableColumns="false">
       <mx:columns>
        <mx:DataGridColumn dataField="ROW" headerText="" width="30" sortable="false" draggable="false" editable="false" paddingLeft="0" paddingRight="0" textAlign="right"/>
        <mx:DataGridColumn dataField="A" headerText="A" width="100"/>
        <mx:DataGridColumn dataField="B" headerText="B" width="100"/>
        <mx:DataGridColumn dataField="C" headerText="C" width="100"/>
        <mx:DataGridColumn dataField="D" headerText="D" width="100"/>
        <mx:DataGridColumn dataField="E" headerText="E" width="100"/>
        <mx:DataGridColumn dataField="F" headerText="F" width="100"/>
        <mx:DataGridColumn dataField="G" headerText="G" width="100"/>
        <mx:DataGridColumn dataField="H" headerText="H" width="100"/>
        <mx:DataGridColumn dataField="I" headerText="I" width="100"/>
        <mx:DataGridColumn dataField="J" headerText="J" width="100"/>
        <mx:DataGridColumn dataField="K" headerText="K" width="100"/>
        <mx:DataGridColumn dataField="L" headerText="L" width="100"/>
        <mx:DataGridColumn dataField="M" headerText="M" width="100"/>
        <mx:DataGridColumn dataField="N" headerText="N" width="100"/>
        <mx:DataGridColumn dataField="O" headerText="O" width="100"/>
        <mx:DataGridColumn dataField="P" headerText="P" width="100"/>
       </mx:columns>
      </mx:DataGrid>
    </mx:Panel>
    </mx:Application>
    Hope this helps

  • Issue updating the viewer version from V20 to V23

    Hello!
    Our team is having an issue figuring out how to update our viewer version of our multi-issue iPad magazine. All of our issues so far have been on the Viewer Version 20, and are now wanting to use Viewer Version 23... except we can't figure out how to do it! We have the latest version of Folio Builder in InDesign CS5.5... so that can't be it? When going to create a new folio in the panel, our options are only 20, and 21... why isn't it showing 22 or 23? Is this a simple problem to fix? Have been searching the discussion boards to find an answer, but can't seem to find one.
    Thanks for your help!

    Thanks for your replies guys, I had tried both your recommendations earlier but unfortunately it's not letting me select anything later than V21... so does this mean it would be an App Builder problem?

  • How do I choose the lates file from a directory in LabView? I want to use the latest file without having to choose it manually

    When a LabView program starts up, I want it to go to a directory and choose the latest file there. Is there a way to sort the files to get the latest?

    Hello,
    Check annex.
    Hope it helps,
    Paulo
    Attachments:
    LatestFile.vi ‏24 KB

  • Help me choose the best MP3 from Creative!

    Hi all
    My beloved ancient Creative Zen is giving up the ghost after 4 years' loving service and I'd like another one. I just want a music player - no need for photos or movies, and I would like 20gb memory. I'm finding the array of products by Creative bewildering and would appreciate some recommendations as i would really like to stick with Creative.
    Thanks!

    Ellymoo wrote:
    Thanks for your detailed reply! My old player (the very basic Zen) is starting to wear its battery down very quickly and freezes a lot, particularly if I try to change songs soon after I have turned it on. I can reboot it, but it takes a while and I know there isn?t much life left in it. Plus I can't upgrade it to work alongside Vista! I don?t know if I could update the firmware, sounds a bit out of my league! That ebay seller has a good feedback record but alas only sells to USA. I can't find a Creative VM on Amazon at all so I suppose they are too old to be listed? If I have to have one with video capability then I suppose I can just ignore that bit! But I was hoping to get a sole music player for a little less money. I suppose the Creative Xtra from Amazon, while secondhand, might still be worth investing in in the short term as it'ss not expensi've and the seller of the product has good feedback. How difficult is it to update firmware, please?
    Is this what your player looks like? http://cgi.ebay.com/Creative-Nomad-Jukebox-Zen-with-20GB-hard-dri've_W0QQitemZ2003434505QQcmdZViewItemQQptZOther _MP3_Players?hash=item2ea565e90b&_trksid=p3286.c0. m4&_trkparms=66%3A4|65%3A0|39%3A|240%3A38|30%3A0|2 93%3A|294%3A200? If so the battery & the hardri've can be changed for alot less than a new player. It can be used with Vista just can't sync with WMP (drag & drop thru Nomad Explorer) As for the Xtra you must have XP/SP2 WMP0 installed to upgrade firmware. Lots of people have problems doing it.& brick their players. You may still want to contact the Ebay seller & ask if he is willing to ship to you. The worst he could tell you is no.Where are you located? You can probably find one just may take a little more digging

  • Fill data in table( on view ) dynamically from internal table

    Hi,
    How can I populate a table on view with data from an internal table?
    Thanks,
    Ronita

    Hi,
    if you have an internal table named xyz.
    Then create a structure in se11 for this internal table.
    Then create a node with this structure with cardinality 0:n
    Navigate into method WDDOMODIFYVIEW of view MAIN_VIEW. Insert coding for:
    -     Create a new context node for the table
    Hint: Use method Create_nodeinfo_from_struct of class Cl_wd_dynamic_tool.
    -     Remove “old” dynamic table IE element from view , if one exists. If it exists, it is a child of group GROUP_1 and has the name TESTTAB.
    -     Create a new UI element for a table named TESTTAB
    -     Create an internal table, fill it with the data from the database table and bind it to the newly created dynamic context node.
    METHOD wddomodifyview .
      DATA:
      UI Elements
        group_1       TYPE REF TO cl_wd_uielement_container,
        new_tab       TYPE REF TO cl_wd_table,
      Context Nodes
        dyn_node      TYPE REF TO if_wd_context_node,
        tabname_node  TYPE REF TO if_wd_context_node,
      Node Info
        rootnode_info TYPE REF TO if_wd_context_node_info,
      Data Reference (for internal table)
        stru_tab      TYPE REF TO data,
      String (for table name)
        tablename     TYPE string.
      FIELD-SYMBOLS:
        <tab> TYPE table.
    create context node ***************************************************************
    get node info of context root node
      rootnode_info = wd_context->get_node_info( ).
    Get the name of the table to be created
      tabname_node = wd_context->get_child_node( name = 'TABLE_DATA' ).
      tabname_node->get_attribute( EXPORTING name = 'NAME' IMPORTING value = tablename ).
      translate tablename to upper case.
    create sub node named TEST1 of structure (tablename)
      cl_wd_dynamic_tool=>create_nodeinfo_from_struct(
        parent_info = rootnode_info
        node_name = tablename
        structure_name = tablename
        is_multiple = abap_true ).
    get instance of new node
      dyn_node = wd_context->get_child_node( name = tablename ).
    remove "old" table UI element from view , if necessary ****************************
      group_1 ?= view->get_element( 'GROUP_1' ).
      group_1->remove_child( id = 'TESTTAB' ).
    create new UI element table *******************************************************
      new_tab = cl_wd_dynamic_tool=>create_table_from_node(
    ui_parent = group_1
    table_id  = 'TESTTAB'
    node      = dyn_node ).
    fill context node with data *******************************************************
    create internal table of (tabletype)
      CREATE DATA stru_tab TYPE TABLE OF (tablename).
      ASSIGN stru_tab->* TO <tab>.
    Get table content
      SELECT * FROM (tablename) INTO CORRESPONDING FIELDS OF TABLE <tab>.
    Bind internal table to context node.
      dyn_node->bind_table( <tab> ).
    ENDMETHOD.
    Edited by: Sridevi D on Apr 19, 2008 10:30 AM

  • How to fetch the text dynamically from text modules

    Hello All,
    I have a requirement where the I need to print the Form in multiple languages. For this I have created textmodules and maintianed translations as well. But for Spanish and Portugese there are two version languages. For example Spain has Spain english and South American english, similarly Portugal Portugese and Brazilian portugese.
    In se63 transaction, we dont have two versions.Only one of them is available.
    Therefore I've created a custom table where in which I will mainted country.langauge and textmodule name as 3 coloumns. I have cretaed a FM
    where in I pass the country and language as import params to get all the respective text modules.
    Now I tried to move the textmodules to some some structure which I finally moved it to Context part in Adobe form.
    Now I tried to create text module, by giving variable name in the text field. For example i have passed &st_dun_texts-email&.
    It says text module does not exist.
    I have also created using dynamic text.There field name would be passed.But In the output I am getting the Text module name but not the content inside the text module.
    The actual content which is there in the text module should be printed
    Can anyone please help me out on the above problem. ?  It is urgent....!!!!!

    you could use SET LOCALE LANGUAGE myLanguage - so you can switch to the desired language and all texts will selected from that language.

  • Why cant I print a document from my computer using Firefox. The instructions are to choose the print button from your browser

    The printer wont accept the command when I press the print command on the Firefox word

    Hi, marbear1993!
    So that the Community can help you better, we will need to know exactly which operating system is running on your computer and which applications you're trying to print from. That, and any other details you'd like to give will help the Community better understand your issue!
    If this is a time-sensitive matter, our US-based technical support team is ready to help by phone at 1-800-OK-CANON (1-800-652-2666) weekdays between 10 AM and 10 PM ET (7 AM to 7 PM PT).
    Thanks and have a great day!

  • Change the view link from Readonly to updateable.

    Hi Experts,
    Currently i have 2 view objects and with one view link (1 to 1 mapping). When i try the following code i am getting the exception
    Integer departId= Integer.parseInt(id);
    Key key = new Key(new Object[]{departId});
    Row[] rows = departmentVO.findByKey(key, 1);
    if(rows != null && rows.length == 1) {
    employeeRow.setDepartmentVO(rows[0]);
    oracle.jbo.ReadOnlyAttrException: JBO-27008: Attribute DepartmentVO in view object EmployeeVO1 cannot be set.
    It seems the link is readonly. I have gone through the ViewLink xml file and found all the _updateable are true.  Am i missing anything?
    Please advice me.
    -t

    user,
    @ what time it error raise up.? give me some more. details.
    for eg:
    if u had a updatable view.
    in that view . a had id attribute under updatable section.
    there are options. never always, while new.
    if you check. never optios.
    if u are update something means. the error come up likes this.
    i hop u undertusd.

Maybe you are looking for

  • Oracle RAC one node-11.2.0.1 with patch 9004119

    Hi, I'm slightly stuck here. I have successfully converted 11.2.0.1 2 node RAC to RAC one node with patch *9004119*(which has scripts required for racone). My single instances are up and running, relocation of databases go fine As i launch my OEM, it

  • Xml.send() works but not sendAndLoad()

    Hi guys, i'm trying to send data to a servlet ( which is hosted on a different server and managed by a 3rd party so i can't change it) When I use the following code: requestXML.send (" http://www.mydomain.com/xmlpost", "_blank","POST"); it opens a ne

  • Need help Firmware 6.0.2 updated yesterday draining

    Need help updated Firmware to 6.0.2 crazy mad battery draining. This phone even switch to airplane mode the last three hours still drained about 30% battery life what is going on apple please sort this problem out.

  • BI Publisher Webservice calls throws XDOIOException followed by an Error

    Hi, We have developed a custom Java Web Service which acts as an layer between a .Net application and BI Publisher Web services. The .Net application submits an XML to custom Java Web Service. The custom Java Web Service then passes the xml to BI Pub

  • Opening RSS in new window

    I'd appreciate some help and assistance re RSS. I've been working on some web pages and would like to add an RSS feed to them. I've decided to use a service called 'feeddigest.com (www.feedigest.com/). They offer five free feeds and that's more than