Data Binding for Custom Controls?

Hello,
I'm a little bit confused of how to use databinding for custom controls.
I know i can bind a property, as seen here http://help.sap.com/saphelp_uiaddon10/helpdata/en/91/f0f3cd6f4d1014b6dd926db0e91070/content.htm, but how can I map whole arrays?
My problem is the following:
I want to create a custom table control in SAPUI5 (as the default one doesn't provide the neccessary options and properties I need), but I can't seem to find an example how to bind "rows".
There has to be a way to do this properly. All I can think of now, and implemented, is, passing the name of the variable in the model...
var x = new my.controls.complex.table({data: "/status"});
var row1 = new my.controls.complex.columnHeaderRow();
row1.addColumn(new my.controls.complex.column({text: "", rowspan: "2", colspan: "1", content: "FIRST_COL"}));
x.addColumnsRow(row1);
x.placeAt("content");
...my JSON/model looks like:
{ "status": [ {"FIRST_COL": "a" , ...}, {"FIRST_COL": "b", ... }, ... ], ... }
(which should translate into /status/0/FIRST_COL, /status/1/FIRST_COL, ... AFAIK)
... and then I use this variable name by getting the application-wide model and use the variable passed as key for the model... (please note, this code is just a snippet)
       var sapCore = sap.ui.getCore();
            if (sapCore !== undefined) {
             var model = sapCore.getModel().getObject();
             if (model === undefined || model == [] || model == null){ } else {
              $.each(model, function(idx, item){
               $.each(oControl.getColumnsRows(), function(idx, item2) {
                $.each(item2.getColumns(), function(idx, item3){
                 var content = item3.getContent();
                 if (content !== undefined && content != ""){
                  outpLine = outpLine + "<td>" + model[idx][content] + "</td>";
...which still leaves me with the problem of to get an event to react to re-render on changes within the data model, as well as when there would be just an control-specific model, or just a sub-node within a model etc.
So my question is:
Is there a way/best practice to define data binding in a custom control and have a way to react on it, and how to react on data changes within a custom control?
Thanks & KR
Chris

I create a entirely new control, from sap.ui.core.Control.
sap.ui.core.Control.extend("my.controls.complex.table",{... });
I did define a aggregation...
        aggregations : { columnsRows: {type : "my.controls.complex.columnRow", multiple : true, visibility: "public"}     },
...yet I'm still unclear how I work with this aggregation and databinding. I know we can use the bindAggreation functionallity, but since the aggregation is a object (my.control.complex.columnRow) I don't know how my JSON model should be able to bind to that aggregation (as well as how would one be able to cascade a aggregation like this down futher? For example if there is an aggregation in the object of my aggregation?), plus it still doesn't solve my problem of how I can react (for example redraw) on model changes.
Thanks in advance,
Chris

Similar Messages

  • Marriage anniversary date field for customer contact

    Hi
    We like to have Marriage anniversary date field for customer contact.
    We found Birthday field & even Marital Status in Customer Contact. However, Marriage Anniversary Date is missing.
    Please suggest whether it is already avalible somewhere? If yes, how to get it (in XD01/XD02), or what is the alternative then.
    Thanks.
    - Sunil

    Hi,
       I don't think SAP has provided marriage anniversary field , you can very well user REMARKS field to enter the details.
    Regards,
    Siraj

  • Property binding between custom control and its aggregations

    Hi,
    I have a custom control with some properties, e.g., visible, and I would like to bind these properties to its aggregated controls without losing the two-way binding functionality. For example, imagine the following control:
    sap.ui.core.Control.extend('dev.view.control.MyControl', {
      metadata: {
        properties: {
          'visible': {type: 'boolean', defaultValue: false},
        aggregations : {
          _innerTable : {type : 'sap.m.Table', multiple : false, visibility: 'hidden'}
    So in this example, I would like to bind the "visible" property of the _innerTable to the "visible" property of MyControl without losing two-way binding. That means that I do not want to read the "visible" property once in a constructor or so and set it on the inner table. Instead I want _innerTable to react on changes of the "visible" property of MyControl so that I can bind it, for example, with "visible={/model/visible}" on an instance of MyControl and _innerTable changes when the model changes.
    Does anyone know if such a "piping" or "chaining" of properties is possible and how it would be done?

    It's close to my case, but you pass the label to your custom control from outside, where you also perform the data binding. In this case, you know which path should be bound to the label property.
    In my case, the control is hidden inside my control, so I do not know which path from the model should be bound to the inner control. I want to somehow connect the property of my control with the property of the inner control.
    So taking part of your example, the control would look like:
    sap.ui.core.Control.extend('xcontrol', {
      metadata: { 
        properties: {
          'visible': {type: 'boolean', defaultValue: true}
        aggregations : { 
          _header : {type : 'sap.m.Label', multiple : false, visibility: 'hidden'}
      init: function() {
        this.setAggregation('_header', new sap.m.Label({
          visible: <????>
      renderer: function(oRm, oControl) {
        oRm.write("<div");
        oRm.writeControlData(oControl);
        var header = oControl.getAggregation('_header');
        if (header) {
          oRm.renderControl(header);
        oRm.write('</div>');
    At point <????> I want to somehow bind the visible attribute of the label to the visible property of xcontrol without losing the two-way binding, i.e., the label should react on changes of the visible property just like xcontrol would.

  • Implementing Data Search for Custom Objects

    Can any one have some information on implementing search criteria for custom objects.
    I am looking to modify the drop down values and search criteria based on custom data model.

    Hello Rajesh,
    The following configuration activity might resolve your query.
    Transaction: mdgimg.
    General Settings> UI Modelling> Define Field Properties for UI. Select your custom data model and go to "Hide Field Names."
    For the fields of the entity type, you don't want to come up in the search UI, check on "No selection".
    "No Selection" : These wouldn't come up as search Criteria. "No Results List": These won't come up in final result list.
    Best regards,
    Shephalika.

  • Data Binding for Idiots (me)

    Hey everyone,
    I've been asked to build a form that is way more complex than anything I've done in the past. I just wanted to ask the experts here a few questions before I get started, to make sure that I don't make any huge mistakes.
    The complexity of the form lies in the huge number of nested repeatable subforms, the fact that it's three forms in one (which form being shown depends on a selection from a drop down list), and the fact that the form needs to be designed to export its data cleanly to xml.
    As far as building the form goes, I'm comfortable with everything except for the exporting to XML. I've done this a few times, but I'm not sure that the assumptions I've made are correct. I've tried reading the help files, but I'm not sure I'm getting it.
    Pretty much, I make use of a ton of subforms in order to make sure that the layout of the form works dynamically. I don't want all of these subforms to show up in the xml import. The way I've been doing it is to set the data binding on these subforms to 'No data binding.' Does this have any impact on how data is saved to the form? If I don't want the value of a field to be exported, can I set it's binding to 'no data binding', or will that cause prevent the values from being saved?
    My final question is about the 'Use name' binding. Up until now, in past forms I've made sure that all fields have different names. This form is so large, and has so many similar elements that it would be useful to be able to resue field names in different areas of the form. For example, two of the versions of the forms has a section for associated addresses. The fields in these sections are the same. Can I name them the same thing, so long as they are within different subforms? Or will this cause a conflict when exporting/saving.
    Sorry for the long post. In short:
    1) What afftect does the data binding 'no data binding' have on subforms and fields, with regards to saved data and exported data? Are there any 'gotchas!' that I should be aware of?
    2) What are the guidelines I should follow to ensure that I don't come across any naming conflicts? Do I just need to ensure sibling feilds aren't named the same, or should all names be distinct?
    I would appreciate any help that you guys might be able to offer.
    - Scott

    Scott,
    1) No date binding means a form object is not included in exported XML. Data binding has no effect upon saving data when saving a form, the form will contain the data.
    2) For me, rule #1 is use a schema and schema binding. It is worth the upfront investment in time. What you see in the schema is what you see in the output data, given a form object is bound to the schema. You can bind a single schema element to multiple form objects if you need to re-use data across sub-forms, also. Rule #2, again for me, is to explicitly define sub-form names to simplify schema binding and avoid name collisions.
    I've attached a very simple form (with the schema embedded), the schema and exported xml to demonstrate.
    Steve

  • Pageflow - data binding for collection size

    Assume {pageFlow.students} is a collection. What data binding to use to write the
    collection size to the jsp page? The following does not work
    <netui:label value="{pageFlow.headers.size}" />
    Thanks, Jack

    This is a very FAQ on the "taglibs-user" mailing list. The same issue comes up
    with using the JSTL, because the JSTL follows the same rules about what it can
    access.
    A reasonable general solution would be to write a simple class called "CollectionBean"
    (and similarly "MapBean"). Put it in a "utils" package. It's constructor takes
    a Collection (and a Map, respectively). It has two properties, named "collection"
    and "size" (the other would be "map" and "size"). Instead of storing Collections
    or Maps, you store CollectionBeans and MapBeans. About the only challenge would
    be properly naming the instance variables of type CollectionBean, so it isn't
    confusing. I'll leave that problem for you.
    "Jack Liu" <[email protected]> wrote:
    >
    Assume {pageFlow.students} is a collection. What data binding to use
    to write the
    collection size to the jsp page? The following does not work
    <netui:label value="{pageFlow.headers.size}" />
    Thanks, Jack

  • Drill down report for due date analysis for customer open items

    Hi, in transaction FDI0 i am using report 0SAPDUEAN-01 Due Date Analysis for Open Items .The reason i am using this is that s_alr_87012178 caters for only 6 intervals. With this report , i get 8 intervals:
    daily intervals Due Not Due Total OI
    0 - 30 0,00 0,00 0,00
    31 - 60 67.000,00- 0,00 67.000,00-
    61 - 90 0,00 0,00 0,00
    91 - 120 20.020,86 0,00 20.020,86
    121 - 150 3.270,00 0,00 3.270,00
    151 - 180 0,00 0,00 0,00
    181 - 210 0,00 0,00 0,00
    211 - 99999 0,00 0,00 0,00
    Total open items 43.709,14- 0,00 43.709,14-
    Is it possible to change the intervals through custo? i need intervals:
    0 - 30
    31 - 60
    91-120
    121-150
    151-365
    >365

    Hi AA
    refer this link where in I have given the screen shots
    http://img233.imageshack.us/g/86081486.jpg/
    The 1st screen shot is COPY of the Std Form
    The 2nd scren shot shows how to add new interval
    Br, Ajay M

  • Adobe Form - Data Binding for static text

    Hi Experts,
    I'm trying to create a new label with Adobe Forms (not interactive).
    So I've created an interface with a table LABEL_DATA (import) and many variables (import) and a new Form with Layout.
    I tried to bind some text fields with the imported variables und fields from the table, they're all available in the context, but all fields are still empty (preview and print).
    Field are Text Fields
    Type is : Read Only
    Data Binding is : $record.LABEL_DATA.KDMAT
    Can someone please help me?
    Thank you.
    Regards,
    David

    Hello David,
    In your interface, have you declared LABEL_DATA as GLOBAL Data ?
    You can fill the table and variables in the INITIALISATION in the interface.
    Then you can use the Global table and variables in the form.
    In case you are missing some values; you can debug the code in INITIALISATION section. Get the import tables in INITIALISATION and filter the required values into Global Table and variables.
    Regards
    Sandy

  • Issue in rendering CustomToolpart to select data source for custom webpart..

    I have a custom webpart in which i have added a tool part.This toolpart should allow me to select any list in the sitecollection which would be displayed on the webpage on doing apply in the webpart properties.The dropdown list with all lists is coming fine.The
    grid is diplaying as well.But in the toolpart,not in the webpart. I cant seem to segregate the two.There is also a textbox in the  toolpart in which the entered text comes in the webpart.But the same approach is failing for the gridview.Please suggest
    what to do.
    Also,i am failing at making a separate category for the toolpart by specifying [category("List settings")]..Any suggestion as to what i'm doing wrong in that are welcome too.
    Here is my webpart class and toolpart class.
    using System;
    using System.ComponentModel;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using Microsoft.SharePoint;
    using Microsoft.SharePoint.WebControls;
    using Microsoft.SharePoint.WebPartPages;
    using System.Data;
    using Microsoft.SharePoint.Utilities;
    namespace BB.WorkSpaces.Common.WebParts.CustomList
    [ToolboxItemAttribute(false)]
    public class CustomList : Microsoft.SharePoint.WebPartPages.WebPart
    [Browsable(false),
    Category("List Settings"),
    Description("Text Property")]
    // Visual Studio might automatically update this path when you change the Visual Web Part project item.
    private const string _ascxPath = @"~/_CONTROLTEMPLATES/BB.WorkSpaces.Common.WebParts/CustomList/CustomListUserControl.ascx";
    public string ListName
    get
    return _listName;
    set
    _listName = value;
    string _listName;
    public string ListValue
    get
    return _listValue;
    set
    _listValue = value;
    string _listValue;
    public GridView Gv
    get { return gv; }
    set { gv = value; }
    GridView gv;
    protected override void Render(HtmlTextWriter writer)
    base.Render(writer);
    writer.Write(ListName);
    writer.Write("<br />");
    writer.Write(ListValue);
    writer.Write("<br />");
    writer.Write(Gv);
    public override ToolPart[] GetToolParts()
    ToolPart[] allToolParts = new ToolPart[3];
    WebPartToolPart standardToolParts = new WebPartToolPart();
    CustomPropertyToolPart customToolParts = new CustomPropertyToolPart();
    allToolParts[0] = standardToolParts;
    allToolParts[1] = customToolParts;
    allToolParts[2] = new CustomToolPart();
    return allToolParts;
    public class CustomToolPart : Microsoft.SharePoint.WebPartPages.ToolPart
    DropDownList ddl;
    TextBox tb;
    protected override void CreateChildControls()
    ddl = new DropDownList();
    ddl.ID = "ddl";
    // Simply getting the lists of the current web, and displaying them in the dropdown-list.
    SPListCollection lists = SPContext.Current.Web.Lists;
    foreach (SPList list in lists)
    ddl.Items.Add(list.Title);
    tb = new TextBox();
    tb.ID = "tb";
    Controls.Add(ddl);
    Controls.Add(tb);
    base.CreateChildControls();
    public override void ApplyChanges()
    CustomList wp = (CustomList)this.ParentToolPane.SelectedWebPart;
    wp.ListName = ddl.SelectedValue;
    wp.ListValue = tb.Text;
    SPSite site = SPContext.Current.Site;
    SPWeb web = site.RootWeb;
    SPList list = web.Lists[ddl.SelectedItem.Text];
    //SPListItemCollection slist = list.GetItems();
    GridView GV1 = new GridView();
    DataTable dt = list.Items.GetDataTable();
    GV1.DataSource = dt;
    GV1.DataBind();
    this.Controls.Add(GV1);

    Hi,
    According to your post, my understanding is that you have an issue about the custom web part.
    Per my knowledge, we should customize the EditorPart instead of the
    ToolPart to bind the lists to the dropdown list.
    There is a good article about customizing web part, you can refer to it.
    http://www.concurrency.com/blog/create-a-custom-web-part-for-sharepoint-2010/
    More reference:
    http://www.enjoysharepoint.com/Articles/Details/show-all-list-in-dropdown-list-using-visual-web-part-20676.aspx
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • JSF Design support for custom controls

    I am creating some custom JSF components, for use in my projects. They work fine, but I was not able to make them display correctly in design time (I am using Websphere).They appear like small rectangles, even when they are grids. What is the standard way to provide design time support to my controls? Or al least a way to show them properly in Websphere designer? There must be some way to make it work, because standard components and IBM components are displayed correctly.
    Some hint?

    At the moment, the best you can do is fill out all the metadata in faces-config.xml for your component and renderer. Beyond that, each tool developer is currently defining proprietary XML metadata and/or programmatic extensions to provide better tool support. This is, of course, an awful state of affairs, and there are the beginning of efforts today to work towards common metadata and extensions for component developers.
    -- Adam Winer (EG member)

  • Setting a default date value for input controls

    Hi All,
    I have created a webi report that shows  - among other things - the activity between 2 dates. I have created 2 input controls where the user can select the start and end dates from a calendar for this.
    The displayed data is restricted by a date variable which 'unfiltered' contains 1 month of data.
    'out of the box' I can set these input controls and all works fine, but each time I open the report the same values that I set last time are set in the input controls. I want to have these default to being between today and 7 days ago with the user then able to move away from  this action, rather than the 'window of interest' slowly slipping into the past.
    I have looked at the forum posting Re: Default Input Control Values in WebI doc on Open which describes setting a default on the objects in the report filter pane, but this does not appear to be possible as these are 'grayed out' and i need both the input controls to run from a single object.
    Does anyone have any ideas how this might be achieved?
    Thanks in advance
    John

    Hi,
    Sorry, I've obviously not explained myself very well. Please let me try to elaborate...
    The report I am writting is to function as a dashboard (yes, i know - Xcelcius/Dashboard Designer - don't ask!) but asking the user to enter a prompt for the date range is not an option here. My only options for this are effectively the input controls or the report filters. I want to be able to achieve the effect of entering =CurrentDate() in the 'default value box in the same way that I would if writting a Reporting Services report. However the WebI controls do not accept expressions for this.
    So...
    I have one date object with a months worth of dates in it.
    I have two input controls associated with this date object to allow the user to select a narrowed date range from this month of data.
    I need one of these to default to 'today' and the other to default to '7 days ago' (I can do the calculations to get both dates, the bit I cannot get past is applying these dates as defaults)
    can anyone help me with step 3 (in bold) above?
    John

  • BADI to validate data input for custom data model.

    Hi,
    I have a custom data model which has Material as the key field. When the user enters the Material number and clicks on CONTINUE, he is taken to the second screen where he has to enter data and description of the change request (the standard familiar screen). Now when the user fills the data and submits the record I need to do data validation and throw an error accordingly, Can anyone please help me out with the BADI or a solution to achieve this result.
    Any kind of help would be sincerely appreciated.
    Regards,
    Tushar.

    Hello Tushar
    Path is - General Settings - Business Add-Ins- BADI - Define Validation / Enrichment - You can check all the relevant BADI's here. Click on display and then you have filter option. Add your data model in filter. This is useful for Finance. You have check for MM.
    Kiran

  • How to upload data in to custom control

    hello freinds can any one tell me how to upload data into cutom control area using bdc, for example when i record the transaction 'ac02', i am able to enter the long text column but when i generate i am unable to see which field the data is saved , so that i am unable to go further
    can any one tell what is the process
    bye
    afzal

    Hi ..
    Long text are a little pain in BDC...they are maintained separately in the system...
    Where you are filling the long text ..there would be an icon for full screen ...click on tht ...Click Goto-> Header ...
    There would be four details on top clubbed together ...note down these...
    You have to pass <b>Text ID Text Name Text Object</b> for every text you create tht u create through FM save_text
    Below is code written by me for uploading long texts for material but the logic remains the same:
    tables : t100.
    data: begin of record OCCURS 0,
    data element: MTART
            MTART_001(004),
    data element: XFELD
            KZSEL_01_002(001),
    data element: XFELD
            KZSEL_10_003(001),
    data element: WERKS_D
            WERKS_004(004),
    data element: LGORT_D
            LGORT_005(004),
    data element: MAKTX
            MAKTX_006(040),
    data element: MEINS
            MEINS_007(003),
    data element: MATKL
            MATKL_008(009),
    data element: BISMT
            BISMT_009(018),
    data element: LABOR
            LABOR_010(003),
    data element: MAKTX
            MAKTX_011(040),
    data element: MEINS
            MEINS_012(003),
    data element: LGPBE
            LGPBE_013(010),
    data element: DATTP
            IPRKZ_014(001),
            <b>length(1000),</b>
          end of record.
    *types : begin of str_orig,
          line(256) type c,
          end of str_orig.
    *data : it_orig  type standard table of str_orig with default key,
          wa_orig type str_orig,
    data : text_length     TYPE i,
           loop_times      TYPE i,
           char_pos_last   TYPE i,
           char_pos_curr   TYPE i,
           no_lines        TYPE i.
    DATA : VALUE TYPE RMMG1-MATNR.
    DATA : NUMBER TYPE RMMG1-MATNR.
    data : theader type thead ,
           ITAB type standard table of TLINE with default key,
           wa type tline.
    data itabrec like table of record with header line.
    data : bdcdata type standard table of bdcdata with header line.
    data : messtab type standard table of bdcmsgcoll with header line.
    data mstring(300).
    start-of-selection.
    <b>theader-tdobject = 'MATERIAL'.
    *header-tdname =
    theader-tdid = 'GRUN'.
    theader-tdform = 'SYSTEM'.
    theader-tdspras = 'E'.</b>
    CALL FUNCTION 'UPLOAD'
    EXPORTING
      FILENAME                      = ''
      FILETYPE                      = 'DAT'
      TABLES
        DATA_TAB                    = itabrec.
    *perform open_dataset using dataset.
    *perform open_group.
    loop at itabrec.
    refresh bdcdata.
    refresh messtab.
    perform map_data.
    call transaction 'MM01' using bdcdata mode 'N' update 'S' messages into messtab.
    <b>text_length = strlen( itabrec-length ).
          char_pos_curr = 0.
          char_pos_last = 0.
          loop_times = text_length DIV 72.
          loop_times = loop_times + 1.
          DO loop_times TIMES.
            char_pos_curr = char_pos_curr + 72.</b>        wa-tdline =
              itabrec-length+char_pos_last(72).
            wa-tdformat = '* '.
            APPEND wa to itab.
            clear wa.
            char_pos_last = char_pos_curr - 1.
           enddo.
    wa-tdformat = ''.
    *wa-tdline = ITABREC-LENGTH.
    *append wa to itab.
    <b>
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        INPUT         = SY-MSGV1
    IMPORTING
       OUTPUT        = NUMBER          .
    THEADER-TDNAME = NUMBER.</b>
    <b>CALL FUNCTION 'SAVE_TEXT'</b>  EXPORTING
       CLIENT                = SY-MANDT
       HEADER                = THEADER
       INSERT                = 'X'
       SAVEMODE_DIRECT       = 'X'
      OWNER_SPECIFIED       = ' '
      LOCAL_CAT             = ' '
    IMPORTING
      FUNCTION              =
      NEWHEADER             =
      TABLES
        LINES                 = itab
    EXCEPTIONS
      ID                    = 1
      LANGUAGE              = 2
      NAME                  = 3
      OBJECT                = 4
      OTHERS                = 5
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    clear itab.
    perform get_messages.
    endloop.
    End generated data section ***
    *start-of-selection.
    *perform open_dataset using dataset.
    *do.
    *read dataset dataset into record.
    *if sy-subrc <> 0. exit. endif.
    form map_data.
    perform bdc_dynpro      using 'SAPLMGMM' '0060'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RMMG1-MTART'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_field       using 'RMMG1-MTART'
                                  itabrec-MTART_001.
    perform bdc_dynpro      using 'SAPLMGMM' '0070'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MSICHTAUSW-DYTXT(10)'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_field       using 'MSICHTAUSW-KZSEL(01)'
                                  itabrec-KZSEL_01_002.
    perform bdc_field       using 'MSICHTAUSW-KZSEL(10)'
                                  itabrec-KZSEL_10_003.
    perform bdc_dynpro      using 'SAPLMGMM' '0080'.
    perform bdc_field       using 'BDC_CURSOR'
                                  'RMMG1-LGORT'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=ENTR'.
    perform bdc_field       using 'RMMG1-WERKS'
                                  itabrec-WERKS_004.
    perform bdc_field       using 'RMMG1-LGORT'
                                  itabrec-LGORT_005.
    perform bdc_dynpro      using 'SAPLMGMM' '4004'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '/00'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  itabrec-MAKTX_006.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MARA-LABOR'.
    perform bdc_field       using 'MARA-MEINS'
                                  itabrec-MEINS_007.
    perform bdc_field       using 'MARA-MATKL'
                                  itabrec-MATKL_008.
    perform bdc_field       using 'MARA-BISMT'
                                  itabrec-BISMT_009.
    perform bdc_field       using 'MARA-LABOR'
                                  itabrec-LABOR_010.
    perform bdc_dynpro      using 'SAPLMGMM' '4000'.
    perform bdc_field       using 'BDC_OKCODE'
                                  '=BU'.
    perform bdc_field       using 'MAKT-MAKTX'
                                  itabrec-MAKTX_011.
    perform bdc_field       using 'BDC_CURSOR'
                                  'MARD-LGPBE'.
    perform bdc_field       using 'MARA-MEINS'
                                  itabrec-MEINS_012.
    perform bdc_field       using 'MARD-LGPBE'
                                  itabrec-LGPBE_013.
    perform bdc_field       using 'MARA-IPRKZ'
                                  itabrec-IPRKZ_014.
    endform.
    form get_messages.
    loop at messtab.
    select single * from t100 where sprsl = messtab-msgspra and
                                    arbgb = messtab-msgid and
                                    msgnr = messtab-msgnr.
    if sy-subrc = 0.
    mstring = t100-text.
    if mstring CS '&'.
    replace '&' with messtab-msgv1 into mstring.
    replace '&' with messtab-msgv2 into mstring.
    replace '&' with messtab-msgv3 into mstring.
    replace '&' with messtab-msgv4 into mstring.
    endif.
    condense mstring.
    write :/ mstring(300) color 2 intensified off.
    else.
    write : messtab.
    endif.
    endloop.
    endform.
    form bdc_dynpro using program dynpro.
    clear bdcdata.
    bdcdata-program = program.
    bdcdata-dynpro = dynpro.
    bdcdata-dynbegin = 'X'.
    append bdcdata.
    endform.
    form bdc_field using fnam fval.
    clear bdcdata.
    bdcdata-fnam = fnam.
    bdcdata-fval = fval.
    append bdcdata.
    endform.
    ANy other help u need, lemme know!!
    Message was edited by:
            shweta  soni

  • Getting at the data binding for table rows in ADF/UIX

    At the highest level, I'm trying to figure out the best way to get spreadsheet-like behavior in a table where some of the cells are editable. The table cells were created using the "model=${uix.current.<columnName>}" mechanism.
    I've been able to specify event handlers triggered by the <primaryclientaction> for a table cell component which call into static java methods. But I haven't been able to figure out what binding to use to get at the Java instance for that cell's row in order to use <invoke> to get at non-static methods in the row's view object. The ${uix.current} binding is stale at that point.
    Are the table row data bindings just gone after the table is rendered or is there some alternate notation that lets me get at them.
    Thanks in advance.

    the primaryclient action should pass the rowkey of the current row (${uix.current.rowKeyStr}) as a parameter. This way the server can find the corresponding row on the server in an event handler.
    see
    http://www.oracle.com/technology/products/jdev/tips/jacobi/edittable/tip_adfuixtable_edit.html

  • Data Archival for Custom Tables

    Hi Experts,
    We have a requirement of archiving the related custom tables while we archive the standard SAP tables data. We are going a head with creating the custom archiving objects to handle this. However, i would like to know about the feature of "Exit routine assignement in generation" in the standard Archiving objects (AOBJ).  Can this be used to handle custom tables data? If yes, can you please provide me an example how this can be acheived? If not, what is the purpose of this?
    Please help!!
    Thanks and Best Regards,
    Surya

    Hello Lavaughn,
    I can not speak for SAP, but from my personal experience TimeStamps are the state of the art to store time date info in db tables. Even with date/Time fields a conversion to the local timezone is necessary. Of course you can reuse your db definition on dynpros. But since UI and business logic will be divided anyway this is also not really a valid point.
    Best Regards
    Klaus

Maybe you are looking for