Help Me "Data Source - Not User Data Source"

Hi All!
I have written an addon in Service Call Form To add new Matrix in this form with code as follows:
Dim oLink As SAPbouiCOM.LinkedButton
oFormServiceCall = SBO_Application.Forms.GetFormByTypeAndCount(60110, 1)
        oItem = oFormServiceCall.Items.Item("159")
        oNewItem = oFormServiceCall.Items.Add("Matrix1", SAPbouiCOM.BoFormItemTypes.it_MATRIX)
        oNewItem.Left = oItem.Left
        oNewItem.Width = oItem.Width
        oNewItem.Top = oItem.Top
        oNewItem.Height = oItem.Height
        oNewItem.FromPane = 8
        oNewItem.ToPane = 8
        oMatrix = oNewItem.Specific
        oColumns = oMatrix.Columns
        oColumn = oColumns.Add("#", SAPbouiCOM.BoFormItemTypes.it_EDIT)
        oColumn.TitleObject.Caption = "#"
        oColumn.Width = 20
        oColumn.Editable = False
        '// Add a column for BP Card Code
        oColumn = oColumns.Add("callID", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON)
        oColumn.TitleObject.Caption = "Call ID"
        oColumn.Width = 20
        oColumn.Editable = True
        oColumn = oColumns.Add("subject", SAPbouiCOM.BoFormItemTypes.it_EDIT)
        oColumn.TitleObject.Caption = "Subject"
        oColumn.Width = 120
        oColumn.Editable = True
        oColumn = oColumns.Add("customer", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON)
        oColumn.TitleObject.Caption = "Cust.Code"
        oColumn.Width = 30
        oColumn.Editable = True
        '// Link the column to the BP master data system form
        oLink = oColumn.ExtendedObject
        oLink.LinkedObject = SAPbouiCOM.BoLinkedObject.lf_BusinessPartner
        oColumn = oColumns.Add("custmrName", SAPbouiCOM.BoFormItemTypes.it_EDIT)
        oColumn.TitleObject.Caption = "Cust.Name"
        oColumn.Width = 120
        oColumn.Editable = True
        oColumn = oColumns.Add("itemCode", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON)
        oColumn.TitleObject.Caption = "Item Code"
        oColumn.Width = 30
        oColumn.Editable = True
        oLink = oColumn.ExtendedObject
        oLink.LinkedObject = SAPbouiCOM.BoLinkedObject.lf_Items
        oColumn = oColumns.Add("itemName", SAPbouiCOM.BoFormItemTypes.it_EDIT)
        oColumn.TitleObject.Caption = "Item Name"
        oColumn.Width = 100
        oColumn.Editable = True
And code to bind data to matrix
oDBDataSource = oFormServiceCall.DataSources.DBDataSources.Add("OSCL")
        'oUserDataSource = oFormServiceCall.DataSources.UserDataSources.Add("OSCL", SAPbouiCOM.BoDataType.dt_LONG_TEXT)
        oColumn = oColumns.Item("callID")
        oColumn.DataBind.SetBound(True, "OSCL", "callID")
        oColumn = oColumns.Item("subject")
        oColumn.DataBind.SetBound(True, "OSCL", "subject")
        oColumn = oColumns.Item("customer")
        oColumn.DataBind.SetBound(True, "OSCL", "customer")
        oColumn = oColumns.Item("custmrName")
        oColumn.DataBind.SetBound(True, "OSCL", "custmrName")
        oColumn = oColumns.Item("itemCode")
        oColumn.DataBind.SetBound(True, "OSCL", "itemCode")
        oColumn = oColumns.Item("itemName")
        oColumn.DataBind.SetBound(True, "OSCL", "itemName")
But It's error when Run at the row is bold. This error:
oColumn.DataBind.SetBound(True, "OSCL", "callID")     Run-time exception thrown : System.Runtime.InteropServices.COMException - Data Source - Not User Data Source
Please help me fix problem.
Thanks
Edited by: Tao lao on Mar 5, 2008 3:10 AM

I think, u can't bind the system table system columns to the column of the matrix in the form which is bound to the same table.(though, m not sure on this.) service call is by default bound to OSCL. If u try creating a user defined column in OSCL and then bind it, it works. but, if CallId is already bound on form, and u r bnding it one more time, it will give you error.

Similar Messages

  • Help for date field not working after upgrade

    hi experts,
    In our BSP application for a page we had an inputfield (date).
    Onvaluehelp for input field we were calling the saphelpdate function.
    however after upgrade this functionality is not working properly as no pop up comes after clicking on the icon.
    we have upgraded to SPS 16 recently.
    please help me.
    regards,
    Arvind.

    Hi, I try upper case but nothing happen. This is all my code by far, I hope you can help me:
    DATA: BEGIN OF T_PCONT OCCURS 0,
          PCONT LIKE ZPSPERMISOS-PSOBKEY,
    END OF T_PCONT.
    DATA: BEGIN OF T_FIELDS OCCURS 0.
            INCLUDE STRUCTURE help_value.
    DATA END OF T_FIELDS.
    DATA: BEGIN OF T_VALUES OCCURS 0,
          VALUE(60) TYPE c.
    DATA: END OF T_VALUES.
    DATA: N TYPE i.
    SELECTION-SCREEN BEGIN OF BLOCK  b20 WITH FRAME TITLE text-b02.
      SELECT-OPTIONS:
        P_CONT FOR  ZPSPERMISOSH-PSOBKEY OBLIGATORY NO-EXTENSION NO INTERVALS,
        P_INT  FOR  ZPSPERMISOSH-PARTNER OBLIGATORY NO-EXTENSION NO INTERVALS,
        P_FEC  FOR  ZPSPERMISOSH-ZFINICN NO-EXTENSION NO INTERVALS,    
        P_RAZ  FOR  ZPSPERMISOSH-ZRAZONFINIC NO-EXTENSION NO INTERVALS.
    SELECTION-SCREEN END OF BLOCK b20.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_CONT-LOW.
      PERFORM P_HELP_P_CONT USING P_CONT-LOW.
    *&      Form  P_HELP_P_CONT
    FORM P_HELP_P_CONT  USING P_P_CONT.
      DESCRIBE TABLE T_PCONT LINES N.
      IF N EQ 0.
        T_FIELDS-FIELDNAME  = 'PSOBKEY'.
        T_FIELDS-TABNAME    = 'ZPSPERMISOS'.
        T_FIELDS-SELECTFLAG = 'X'.
        APPEND T_FIELDS.
        CLEAR T_FIELDS.
        SELECT PSOBKEY FROM ZPSPERMISOS
        INTO  TABLE T_PCONT.
        SORT T_PCONT BY PCONT.
      CALL FUNCTION 'HELP_VALUES_GET_WITH_TABLE'
        EXPORTING
          CUCOL        = 10
          CUROW        = 1
          TABNAME      = 'T_PCONT'
          FIELDNAME    = 'PCONT'
        IMPORTING
          SELECT_VALUE = P_P_CONT
        TABLES
          FIELDS       = T_FIELDS
          VALUETAB     = T_VALUES.
    ENDFORM.                    " P_HELP_P_CONT
    Edited by: J. Garibaldi on Nov 25, 2009 11:14 AM
    Edited by: J. Garibaldi on Nov 25, 2009 11:16 AM

  • Search help for date field in Editable ALV

    Hello Friends,
    I am using editable alv using 'reuse_* '.
    I have used date as input field. While creating fieldcatlog also i have  declared dat as a mkpf-budat.
    But i am not getting serach help for date in output.
    Is it possible with reuse or i have to go by object oriented ?

    Hi,
    Just pass the Edit option of the fieldcatalog for those specific fields...
    fcat-edit = 'X'.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = sy-cprog
          i_callback_pf_status_set = 'PF_STATUS_SET'
          i_callback_user_command  = 'USER_COMMAND'    "<----  pass this
          i_callback_top_of_page   = 'TOP'
          is_layout                = it_layout
          it_fieldcat              = it_fcat
          i_default                = 'X'
          i_save                   = 'A'
          it_events                = it_event
        TABLES
          t_outtab                 = it_final
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
    *&      Form  USER_COMMAND
    *       text
    *      -->R_UCOMM      text
    *      -->RS_SELFIELD  text
    FORM user_command USING r_ucomm LIKE sy-ucomm
                            rs_selfield TYPE slis_selfield.
      CASE r_ucomm.
        WHEN '&DATA_SAVE'.                "<-------check this
          PERFORM save_data.
      ENDCASE.
    ENDFORM.                    "USER_COMMAND

  • Does no one know how to help me with this? (was not user friendly)

    Not user friendly
    Options
    Mark as New
    Bookmark
    Subscribe
    Subscribe to RSS Feed
    Highlight
    Print
    Email to a Friend
    Report Inappropriate Content
    I have had my Blackberry Curve since last spring and still do not find it user friendly.  The online guide states how to make categories for the memo pad but stops there and does not explain how to save new memos within those categories.  I go back and forth and cannot figure out how to do it.   After pressing many buttons I finally manage to get it where it belongs but have no idea how and when I try adding another go through the same thing.   I had a Palm previously; it was so easy, just make the cateogry, click on it  and then click add new.    Now I click on the category, then new memo and after that the entry goes into outer space somewhere because I cannot find it.   Just clicking save does not work.    Sometimes I can find the entire list of items in every category but cannot figure out how I did it because there is no actual option to do that.  I often wish I had gone with a different smartphone but am locked in now for another 2+ years with basically a phone but nothing else.    I am still using the smartphone part of my Palm for data, memos, etc., because it is so much easier to use; unfortunately I cannot get another battery for it so its use wll be gone when the battery does.    .I wanted a smartphone so I just had to carry one device; now I am back to carrying two, a Palm PDA and a Blackberry phone.   .      

    Actually I did get these replies in my e-mail, thanks.   However, I did finally toss the Blackberry and got an iPhone.  It is so much easier to use, right out of the box I was able to  make calls whereas it took me some considerable time to figure out how to even do that with the BB.     And the Memo section on it great, very easy to use, not to mention the other basic apps like calendar and contacts.   Very user friendly.    .  

  • Mapping Help for replacing source value

    Mapping Help for replacing source value
    Posted: Mar 14, 2006 1:06 AM    Reply 
    Hi all,
    I am unable to do transform the source value to required target value,
    From Source ADDRESS_TYPE = 'HOME' should be replaced with 03 to target field ANSSA, and 'MAIL' to be replaced with 05, I am trying to do it but i am unable to handle it, please give u r valuable suggestions,
    The source structure is like this,
    - <Event ID="239" TRANS_TYPE="ADR">
    <PersAddr GEO_LOC_CD="US" EMPLID="29" ADDRESS_TYPE="HOME" EFFDT="02/15/2006" ADDRESS1="92nd Floor" ADDRESS2="812backstreet" ADDRESS3="" ADDRESS4="" CITY="London" COUNTY="" STATE="AN" POSTAL="EC2N 4AG1" COUNTRY="GBR" KEY1="29" KEY2="HOME" KEY3="02/10/2006" />
    <PersAddr GEO_LOC_CD="US" EMPLID="29" ADDRESS_TYPE="MAIL" EFFDT="02/15/2006" ADDRESS1="92nd Floor" ADDRESS2="812backstreet" ADDRESS3="" ADDRESS4="" CITY="London" COUNTY="" STATE="AN" POSTAL="EC2N 4AG1" COUNTRY="GBR" KEY1="29" KEY2="MAIL" KEY3="02/10/2006" />
    </Event>
    REGARDS,
    sridhar

    Hi,
    This can be done using user-defined function as well.
    Code the function as...
    if(Addr_Type.equals("HOME"))
       return "03";
    else if(Addr_Type.equals("MAIL"))
       return "05";
    else
       return "Invalid Address Type";
    Here, Addr_Type is Input String Argument for this function.
    Map this function between ADDRESS_TYPE and ANSSA.
    Regards,
    Uma

  • Need Help with Dates

    I am printing a calendar and certain events will be helds on certain dates.
    One can edit the event if it has not passed the date. Events in the past can be viewed but not edited.
    When I query the database the date must be formatted dd-MMM-yy
    I am able to get today's date by doing this:
    java.util.Date today = new java.util.Date();
    String formatString = "dd-MMM-yy";
    SimpleDateFormat sdf = new SimpleDateFormat(formatString);
    String today_str = sdf.format(today);
    My code for printing the calendar: I left out some of the table formatting in the JSP page.
    GregorianCalendar d = new GregorianCalendar();
    int today = d.get(Calendar.DAY_OF_MONTH);
    int month = d.get(Calendar.MONTH);
    d.set(Calendar.DAY_OF_MONTH,1);
    int weekday = d.get(Calendar.DAY_OF_WEEK);
    for(int i = Calendar.SUNDAY; i < weekday; i++)
    out.print("<td> </td>");
    do {
    int day = d.get(Calendar.DAY_OF_MONTH);
    out.print("<td>" + day + "</td>");
    String formatString = "dd-MMM-yy";
    SimpleDateFormat sdf = new SimpleDateFormat(formatString);
    //if(event exists on this day
    // Get results
    // print link for viewing
    // if (after today) print link for edit
    if(weekday == Calendar.SATURDAY)
    out.println("</tr><tr valign=top>");
    d.add(Calendar.DAY_OF_MONTH,1);
    weekday = d.get(Calendar.DAY_OF_WEEK);
    } while(d.get(Calendar.MONTH) == month);
    if(weekday != Calendar.SUNDAY)
    System.out.println();
    The part I need help on is this:
    //if(event exists on this day
    // Get results
    // print link for viewing
    // if (after today) print link for edit
    I'm looping through each day of the month to print the days. I have the month, day, year as integers. How can I create a date object out of that and compare it to today's date to test if it's before or after today???
    All the function in the Date class that I think would do this have been deprecated.

    Need Help with Dates
    Here is some information about dates:
    There are many edible palm fruits, and one of the most widespread and favored of these is the data (Phoenix dactylifera). Dates were cultivated in ancient land from Mesopotamia to prehistoric Egypt, possibly as early as 6000 B.C. Then--as now--dates were a staple for the natives of those dry regions. Much later, Arabs spread dates around northern Africa, and dates were introduced into California by the Spaniards in 1765, around Mission San Ignacio.
    The date prefers dry, hot climates, because date fruits are injured at temperatures of 20 degrees F, and the damp climate of the California coast was not favorable for fruit production. In the mid-1800s, the date industry developed in California's hot interior valleys and in Arizona. Now the date industry in the United States is localized mostly in the Coachella Valley, where the sandy soils permit the plants to be deeply irrigated. Today the new varieties, mostly introduced in this century, produce about 40 million pounds of dates per annum, or over 60% of the dates consumed in this country. The rest are imported mainly from Persia. According to one survey, about one million people are engaged entirely in date palm cultivation worldwide.
    Hope that helps.

  • BT Desk Top Help Up-Date Message - What's this all...

    I have been getting a dialog box appear at the bottom of my display for the past few weeks stating that there is a Desk Top Help up-date available for my Home Hub - click to download up-date. etc.
    It's genuine enough as I can access it from my BT Broadband Desktop Help section of the main BT web page.
    My point is, as I have just tried again to download it, after 8% of the download it comes up with a dialog that tells me there are 'issues with BT downloading right now' and to try again, later.
    Well, I have 'tried again later' for the past three weeks, in the morning and in the evening and everytime it has stopped at the 8% stage.
    Anyone know what this is all about? 
    Anyone know what the up-date brings to the party?
    Anyone find Desk Top Help (DTH) is actually helpfull?  I ask this because every time it pops up telling me there is a problem with either my email accounts or my hub connection, and do I want DTH to assist me in fixing it, it runs through it's procedures but ends by telling me everything is ok and there is nothing wrong! I could have told it that before it started!!
    After a few weeks of having this come up when you are right in the middle of something, then being forced to wait whilst it 'does it's thing' only to find nothing was in-fact wrong, becomes extremely annoying.
    Do we actually need it?
    Any useful tips/points/advice/experiences would be appreciated.
    Thanks,

    Hi seawings
    I had posted a fix on a problem like this on a different thread and it should work for you too
    Have a look at my post here and see it it does the trick.
    With regards to how useful Desktop Help is, we have reports from literally thousands of customers each month that this fixs problems for them.  Maybe not everyones cup of tea but from what I see it works really well.
    Thx
    Craig
    BTCare Community Mod
    If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
    We are sorry but we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-)”
    td-p/30">Ratings star on the left-hand side of the post.
    If someone answers your question correctly please let other members know by clicking on ’Mark as Accepted Solution’.

  • Need help in date Validation Urgent

    Hi ,
    We need help in Date Validation.
    we have 2 Date fields on the form Start Date, End Date
    The requirement is: End Date (May not be greater than 30 years from the start date).
    I have written following script on End Date Exit event. But the problem is its calculating 30 years from the Current Date not from the Start Date
    var tDate = util.scand("mm/dd/yyyy", new Date());
    var M = tDate.getMonth();
    var D = tDate.getDate();
    var Y = tDate.getFullYear();
    var SRes = util.printd("yyyy-mm-dd", new Date((Y+30), M,D) );
    //app.alert(SRes)if (SRes <= this.rawValue){
    app.alert("May not be greater than 30 years from the start date")
    xfa.host.setFocus(
    this);}
    can someone please help me
    Regards,
    Jay

    Hi,
    You'll need to get javascript date from LCD field, and calculate & compare with the future date in javascript date.
    try following script;
    var sDate = StartDate.rawValue;
    var wkStartDate = util.scand("yyyy-mm-dd", sDate);
    var nYear = wkStartDate.getFullYear();
    var nMonth = wkStartDate.getMonth();
    var nDay = wkStartDate.getDate();
    var wkFutureDate = new Date(nYear  + 30 , nMonth, nDay);
    sDate = EndDate.rawValue;
    var wkEndDate = util.scand("yyyy-mm-dd", sDate);
    if (wkEndDate.getTime() > wkFutureDate.getTime()){
      xfa.host.messageBox("May not be greater than 30 years from the start date");
      xfa.host.setFocus(this);

  • Help with date validation on input boxes.

    I need some help with date validation on input boxes.
    What I�m trying to create is a form where a user inputs dates and then the rest of the form calculates the other dates for them.
    i.e. � A user inputs 2 dates (A & B) and then a 3rd date which is 11 weeks before date B is calculated automatically.
    Is this possible and if so how do I do it ???
    Thanks

    Hi,
    to get third date try this:
    java.util.Date bDate = ...;
    Calendar yourCalendar = new GregorianCalendar();
    yourCalendar.setTime(bDate);
    yourCalendar.roll(Calendar.WEEK_OF_YEAR, -11);
    java.util.Date cDate = yourCalendar.getTime();Regards
    Ldinka

  • Help regarding data element

    I need some help regarding data element ZEXPDT.  I used it in an infoquery that was transported to QAS and it does not exist in QAS.  I thought it might be locked in a transport, but the below screen clip says it is not locked.  It was created in 3/2014.  Thanks.

    Either trick the system, SE11, add a space at end of text desciption and save,
    Or call transport workbench (SE01, SE10) create a transport request or use an existing one, then double-click on a task, switch to modify mode, add a line with R3TR DTEL name of the data element, save, then object list, lock in request/task menu.
    Or SE80, contextual menu of data element. (other functions, write transport entry)
    Regards,
    Raymond

  • Is there a Java utility class to help with data management in a desktop UI?

    Is there a Java utility class to help with data management in a desktop UI?
    I am writing a UI to configure a network device that will be connected to the serial port of the computer while it is being configured. There is no web server or database for my application. The UI has a large number of fields (50+) spread across 16 tabs. I will write the UI in Java FX. It should run inside the browser when launched, and issue commands to the network device through the serial port. A UI has several input fields spread across tabs and one single Submit button. If a field is edited, and the submit button clicked, it issues a command and sends the new datum to the device, retrieves current value and any errors. so if input field has bad data, it is indicated for example, the field has a red border.
    Is there a standard design pattern or Java utility class to accomplish the frequently encountered, 'generic' parts of this scenario? lazy loading, submitting only what fields changed, displaying what fields have errors etc. (I dont want to reinvent the wheel if it is already there). Otherwise I can write such a class and share it back here if it is useful.
    someone recommended JGoodies Bindings for Swing - will this work well and in FX?

    Many thanks for the reply.
    In the servlet create an Arraylist and in th efor
    loop put the insances of the csqabean in this
    ArrayList. Exit the for loop and then add the
    ArrayList as an attribute to the session.I am making the use of Vector and did the same thing as u mentioned.I am using scriplets...
    >
    In the jsp retrieve the array list from the session
    and in a for loop step through the ArrayList
    retrieving each CourseSectionQABean and displaying.
    You can do this in a scriptlet but should also check
    out the jstl tags.I am able to remove this problem.Thanks again for the suggestion.
    AS

  • F4 help for date in select options..

    Hi Gurus,
    I want a search help for date field which belongs to select options.
    I know if it is a parameter we directly map the attribute value to that data element.
    Can some help me with this..
    Best Regards,
    Navin Fernandes.

    Hi Gurus,
    The select options works for date.. I got the solution.
    It directly relates to the default data dcitionary help.
    Got it from this example: WDR_TEST_SELECT_OPTIONS
    Best Regards,
    Navin Fernandes.

  • Search help for date in VC

    Hi, 
    I have created an iview in Visual Composer for a query. it contains date field on selection variable fomr. i tried entering date in various format, but it gives an error : variable expects interval value ; enter an interval".
    can we provide search help for date field in VC?
    Regards,
    Sonali.

    Hi,
    You have to create search help it avoid inconsistency.
    Thanks & Regards,
    Venkat.

  • Need Help with data type conversion

    Hello People,
    I am new to java, i need some help with data type conversion:
    I have variable(string) storing IP Address
    IPAddr="10.10.103.10"
    I have to call a library function which passes IP Address and does something and returns me a value.
    The problem I have is that external function call in this library excepts IP Address in form of a byte array.
    Here is the syntax for the function I am calling through my program
    int createDevice (byte[] ipAddress).
    now my problem is I don't know how to convert the string  IPAddr variable into a byte[] ipAddress to pass it through method.

    Class InetAddress has a method
    byte[]      getAddress() You can create an instance using the static method getByName() providing the IP address string as argument.

  • Search help for DATE field

    HI all,
    I want to attach search help for a DATE field created in screen painter.
    For PERNR, PREM is attached. Similarly what is the statndard search help name for DATE field?
    Thanks,
    Shanthi.

    Hi ,
    Declare the date field as sy-datum ,
    parameters : date type sy-datum .
    This shud bring the standard search help for date .
    Thanks ..Get back for any issues.
    Anil

Maybe you are looking for

  • Problem in starting application with Weblogic server on

    Hi friends, I am using weblogic server 4.5.1.7. After I logged in my program, I got an error message as follows. I checked my classpath, I did have "RemoteClientImp_Stub.class" in my server side jar file. I appreciate your help: Could not authenticat

  • Liquid spill; macbook pro failure 6 mos. later?

    I need some help on this one, sorry it's kind of long: We bought a macbook pro from a large appliance store here in the chicago area at Christmas 08. We were told that while it was returned unit, it was in fine working condition. We had purchased ext

  • Stationery Not Long Enough

    Ok, I am in the middle of an email to my family, using the tack board stationery in Mail. I am about half way through what I want to say, and when my cursor gets to the bottom of the stationery, my computer beeps like there is an error. I expected th

  • How do i hide the tool bar when watching videos?

    when expanding a video to full screen, the tool bar does not "hide" and infact, blocks the progression of the video. in order to fast forward, i have to minimize the video to do so. help?

  • How to just get an email address...

    when I click a link to email certain websites the apple email pops up(the one you have to pay for deal)..I dont want that email..just the address of who im sending, but it wont show..please help..thanks