List Box showing Value and Display members?

Ok this is a CONCEPT problem (the code is not professional, just read it for the concept, though it does compile and run).
Right, I have asked many people on IRC and no one is giving me a straight answer lol so maybe some professionals can help me.
I am trying to use a Datasource property for my combobox. This is so I can just pass an entire KeyValue pair with indexes and values to be shown in the listbox.
Creating the keyvaluepair as a WHOLE and passing that to datasource property works perfectly.
Creating a keyvaluepair PROCEDURALLY (in a loop or w/e) ends in the datasource property ToString()ing it, list box items show BOTH value AND display members in square brackets as an entire option.
NOTE: Getting the lsitbox.value results in ONLY the valuemember being returned even though the listbox shows both the valuemembers AND the displaymember? it knows they are different?
Now, I dont want any alternatives or comments about the quality of the code, all I want to know is WHY is it doing this, it seems compeltely illogical that the same TYPE and Values and can different Effects within the datasource property? Its like it knows
it was built procedurally?
Anyway here is some code for reference:
// Windows Form
namespace skbtInstaller
public partial class frmMainWindow : Form
public frmMainWindow()
InitializeComponent();
// coxArmaPath = Combo Box (simple drop down)
this.cBoxArmaPath.ValueMember = "Key";
this.cBoxArmaPath.DisplayMember = "Value";
public void addServerPathItem(String Key, String Value)
this.cBoxArmaPath.Items.Add(new KeyValuePair<String, String>(Key,Value));
// This works fine, only the "DisplayMember" is displayed and the "ValueMember" is hidden.
// This acts differently with the same types???
public void setServerPathDatasource(List<KeyValuePair<String, String>> source)
this.cBoxArmaPath.DataSource = new BindingSource(source, null);
public class skbtServerControl
private frmMainWindow frmMainWindowHandle;
public void refreshformWindow()
// Clear Drop Box (empties drop box)
this.frmMainWindowHandle.clearPathBox();
//skbtServerConfig is very simple property object
foreach (KeyValuePair<String, skbtServerConfig> pair in CoreConfig.getServerConfigList())
// Populate Drop Box
this.frmMainWindowHandle.addServerPathItem(pair.Key, pair.Value.getTextualName()); // this works as intended
// cBox gets items like: Some Display Text, Some Display Text, Some Display Text (PERFECT!)
// This works absolutely fine. ValueMembers are hidden.
public void refreshformWindowWithSTATICDatasource()
// Clear Drop Box
this.frmMainWindowHandle.clearPathBox();
var pathDataSource = new List<KeyValuePair<String, String>>()
new KeyValuePair<String, String>("testKey1", "somevalue1"),
new KeyValuePair<String, String>("testKey2", "somevalue2"),
new KeyValuePair<String, String>("testKey3", "somevalue3")
// Populate Drop Box
this.frmMainWindowHandle.setServerPathDatasource(pathDataSource);
// cBox gets items like: Some Display Text, Some Display Text, Some Display Text (PERFECT!)
// ** HERE IS THE PROBLEM?? **
// This creates a type that seems different to the above function which works fine...
public void refreshformWindowWithDatasource()
// Clear Drop Box
this.frmMainWindowHandle.clearPathBox();
var pathDataSource = new List<KeyValuePair<String, String>>();
//skbtServerConfig is very simple property object
foreach (KeyValuePair<String, skbtServerConfig> pair in CoreConfig.getServerConfigList())
pathDataSource.Add(new KeyValuePair<String, String>(pair.Key, pair.Value.getTextualName()));
// Populate Drop Box
this.frmMainWindowHandle.setServerPathDatasource(pathDataSource);
// cBox gets items like [asjAETJQ5785d45,Some Display Text], [asawfgQ5785d45,Some Display Text], [asjAhrrQ5785d45,Some Display Text]
// ????? surely this function should act exactly like the function above??
Thanks!
(I have posted on codeproject too, will condense any replies).
             

Thanks Michael!
I did debug this and it turns out when i set a new BindingSource to the combo box, indeed the DisplayMember gets reset. Oddly though, the ValueMember stays the same.
I have fixed this with setting the Members before every new bindingSource is set to the combobox, strange that only the displaymember is reset?
For reference, the new resolved code: (this compiles albeit with designer components placed)
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace etstapp1
public partial class Form1 : Form
private skbtServerControl sc;
public Form1()
InitializeComponent();
this.sc = new skbtServerControl(this);
// coxArmaPath = Combo Box (simple drop down)
this.cBoxArmaPath.ValueMember = "Key";
this.cBoxArmaPath.DisplayMember = "Value"; // This doesnt seem to stick after the first datasource set??
public void addServerPathItem(String Key, String Value)
this.cBoxArmaPath.Items.Add(new KeyValuePair<String, String>(Key, Value));
// This works fine, only the "DisplayMember" is displayed and the "ValueMember" is hidden.
// This acts differently with the same types???
public void setServerPathDatasource(List<KeyValuePair<String, String>> source)
this.cBoxArmaPath.DisplayMember = "Value"; // fix datasource problem
this.cBoxArmaPath.ValueMember = "Key"; // fix datasource problem
this.cBoxArmaPath.DataSource = new BindingSource(source, null);
public void clearPathBox()
if(this.cBoxArmaPath.DataSource == null){
this.cBoxArmaPath.Items.Clear();
else
this.cBoxArmaPath.DataSource = null;
private void btnStatic_Click(object sender, EventArgs e)
this.sc.refreshformWindowWithSTATICDatasource();
private void btnNormal_Click(object sender, EventArgs e)
this.sc.refreshFormWindow();
private void btnDynamic_Click(object sender, EventArgs e)
this.sc.refreshformWindowWithDatasource();
public class skbtServerControl
private CoreConfig CoreConfig;
private Form1 frmMainWindowHandle;
public skbtServerControl(Form1 f){
this.frmMainWindowHandle = f;
this.CoreConfig = new CoreConfig();
public void refreshFormWindow()
// Clear Drop Box (empties drop box)
this.frmMainWindowHandle.clearPathBox();
//skbtServerConfig is very simple property object
foreach (KeyValuePair<String, skbtServerConfig> pair in CoreConfig.getServerConfigList())
// Populate Drop Box
this.frmMainWindowHandle.addServerPathItem(pair.Key, pair.Value.getTextualName()); // this works as intended
// cBox gets items like: Some Display Text, Some Display Text, Some Display Text (PERFECT!)
// This works absolutely fine. ValueMembers are hidden.
public void refreshformWindowWithSTATICDatasource()
// Clear Drop Box
this.frmMainWindowHandle.clearPathBox();
var pathDataSource = new List<KeyValuePair<String, String>>()
new KeyValuePair<String, String>("testKey1", "somevalue1"),
new KeyValuePair<String, String>("testKey2", "somevalue2"),
new KeyValuePair<String, String>("testKey3", "somevalue3")
// Populate Drop Box
this.frmMainWindowHandle.setServerPathDatasource(pathDataSource);
// cBox gets items like: Some Display Text, Some Display Text, Some Display Text (PERFECT!)
// ** HERE IS THE PROBLEM?? **
// This creates a type that seems different to the above function which works fine...
public void refreshformWindowWithDatasource()
// Clear Drop Box
this.frmMainWindowHandle.clearPathBox();
var pathDataSource = new List<KeyValuePair<String, String>>();
//skbtServerConfig is very simple property object
foreach (KeyValuePair<String, skbtServerConfig> pair in this.CoreConfig.getServerConfigList())
pathDataSource.Add(new KeyValuePair<String, String>(pair.Key, pair.Value.getTextualName()));
// Populate Drop Box
this.frmMainWindowHandle.setServerPathDatasource(pathDataSource);
// cBox gets items like [asjAETJQ5785d45,Some Display Text], [asawfgQ5785d45,Some Display Text], [asjAhrrQ5785d45,Some Display Text]
// ????? surely this function should act exactly like the function above??
public class CoreConfig
public Dictionary<String, skbtServerConfig> getServerConfigList(){
return new Dictionary<string, skbtServerConfig>()
{"somekey1", new skbtServerConfig("somename1")},
{"somekey2", new skbtServerConfig("somename2")}
public class skbtServerConfig
private String name;
public skbtServerConfig(String name)
this.name = name;
public String getTextualName()
return this.name;
Talking with someone it seems logical that every time I set a new BindingSource the component will not know if I want to keep the same member values so it resets them, but why it only resets displaymember? very strange to me.
Thanks again.

Similar Messages

  • Multiple List Box showing Duplicate Options in Existing Form Library forms.

    Good day.  I currently have an InfoPath 2010 form library template that has a view containing 4 multiple selection list boxes.  These list boxes get their values from a hidden view that contains 4 repeating tables in which I've set default values
    for Value and Display name to populate the multiple selection list boxes.
    The issue I am having is this: When adding new options to the repeating tables through the Default Values option window and publish, new forms display the new selection options successfully, while existing forms in the library when opened are displayed duplicates
    of the first default value in the table in the place of the new options. (Example, Create Data[display] - 10[value] is displaying 4 times after adding 3 new options to the characteristics table that contains Create Data as it's first row item.)
    When comparing the .XML of a new form to an existing form, groupX in this case shows all options in the new form .XML, but shows the duplicates in the .XML of an existing .XML file.
    Is there a way to resolve this issue so that existing documents will display the proper selection options instead of the duplicates?  I'd like to note that another list box had a value added and it displayed the value properly when published in both
    new and existing forms.
    Thanks!

    Hi Hemendra:
    There are no rules on Section A.
    Two out of three forms used so far by the users have these problems.
    We did extensive trending study on all the submitted forms on both where the submit was successful and ones with Section A frozen up. Also, requested a user to submit a few forms per our instructions on different browsers.  Even though there are some
    forms in the past which could be claimed as success has some attachment uploaded to the Section A of the form, currently every time an attempt by any usetr to attach a smallest document the section A, it wipes out all the existing completed fields and freezes
    up all the rest of the controls of that section and not any other part of the form.
    Thanks,
    SRA
    SRAEngineer

  • How to add a list box with values for a ztable in SM30

    Hello Gurus,
                    I had created a table maintenance for Ztable and added many extra functionality to that. Now i would like to add a list box or check table for a field. Can i do that with out Regenerating my table maintenance. Please help me its..very urgent.

    Have referred this domain to the data element, this should be the Field type in ur table for the particular field.
    Eg: <b>SE11 > table name > fields-ZTEST > fieldtype-ZZTEST</b>
    ZZTEST in the data element > create a domain for this data element and in that specify teh value range.
    Save and activate it.
    Make sure that u regenerate teh table maintenance generator else u cant see the changes.
    Now if u press F4 u can see only thevalues specified, also u will see only the list box with values in SM30.
    Try this,please let me know if u face any difficulties.

  • Reg:- How-to build dependent lists boxes with ADF and Faces(Frank.Nimphius)

    Hi,
    by using this i try to create a parent child relationfor selectonechice box and table.
    this is woking properly but as i start selecting values in SelectOneChice Box, value in tabel are seems to be Disappears.
    even i create navigation list and map them properly..
    please suggest me about this.
    Regards:-
    Bkumar

    Thanks for reply...
    but this is not one that i wants...<< Need to create Depandent selectOnechoice and table Adf page>>
    i created one parent SelectOneChoice list having some values, and one child tabel for there values. Navigation List.even i checked Auto Submit and Id for parent, and Partial triger for Child.
    When irun this application the values are not coming properly.
    please help me about this.

  • I have been using CS6 for two years without incident.  Suddenly the Media Encoder stops working, showing APPCRASH and displaying error message about WatchFolder.dll - I tried uninstalling and re-installing to no avail - can anyone help

    I have been using CS6 for two years without incident.  Suddenly the Media Encoder stops working, showing APPCRASH and displaying error message about WatchFolder.dll - I tried uninstalling and re-installing to no avail - can anyone help?

    Hi Mylenium,
    Thanks for your response.
    Here is the error information showing up:
    Problem signature:
      Problem Event Name: APPCRASH
      Application Name: Adobe Media Encoder.exe
      Application Version: 6.0.0.382
      Application Timestamp: 4f62fcf1
      Fault Module Name: WatchFolder.dll
      Fault Module Version: 6.0.0.382
      Fault Module Timestamp: 4f62f37f
      Exception Code: c0000005
      Exception Offset: 0000000000007899
      OS Version: 6.1.7601.2.1.0.768.3
      Locale ID: 4105
      Additional Information 1: 9a62
      Additional Information 2: 9a620826d8ae4a2fa8b984b39290a503
      Additional Information 3: 1fb3
      Additional Information 4: 1fb304eee594288faeefbf1271b70d37
    I am using a PC Windows 7

  • Balancing Segment Value set Does't show values and Giving error Page.

    In R12,LOV of Balancing segment, doesn't show values and giving error page while creating Retained Earnings Account in Ledger Options Page.
    If once the ledger options finished, and it gets the status completed, can't we modify the Ledger options in future.
    By mistake we finished. can i delete Primary ledger from Accounting stucture?
    Thanks in advance,
    VRC Murthy

    Turn on the dynamic insert for your chart of account structure.
    Make sure you have at least one value in each of the value value set attached to COA segments. Make sure retained earning account value exists in your Account value set.
    Now you will be able to pick your retained earnings account in Accounting Setups screen.
    After completing your ledger setup you will be able to modify some options like suspense account, reversal set, future enterable periods etc.
    I have explained the GL setup in detail in my online training videos at http://handsonerp.com
    Regards
    Edited by: user2648997 on Nov 13, 2009 11:50 AM

  • Multi-select lists, their return values and showing their display value

    I have a multi select list which is dynamic. The display and return values are pulled from a table where the return value is the Primary Key.
    When people select a few options, the value is stored in session state as 11:12:13 (etc...). From here, I run these numbers through a process which takes a report ID and the multi-select string, and saves individual rows as Report_id, individual multi select value until there are no more multi select values.
    This is great, they're tied in as a foreign key to the LOV lookup table, and they are easily search able.
    I have trouble where I want to list a report's entire multi-select list. I have a function combine the numbers with a : in between them and RTRIM the last one, so I have an identical string to what a multi-select table uses. 11:12:13 (etc..)
    When I assign it to display as an LOV in a report, it just shows the 11:12:13 instead of listing out the values.
    Single number entries, where someone only selected one option in a multi select, display fine.
    Am I doing this wrong?

    Scott - you're right on the money. I did this initially because I thought assigning an LOV display value to a report column would yield the results I wanted.
    I want to do this without referring to the original table... meaning I don't want a function to have to go out and get the names, I'd like my LOV assignment to do it. This saves headache of having to change something in 2 places if it ever changed.
    Am I not going to be able to do this?
    I created a test multi-LOV page, it doesn't work with original(not processed in my function) LOV assignments either, unless you only select one.

  • Retrieve list items from the textbox text value and display the dropdownlist item for that particular list item

    hi,
     I have created a custom list in my sharepoint :
    List1 name:   employeedepartment  -
                   Title       empdepartment
                   A             D1
                   B             D2
                   C             D3 
    List2  name:  employeedetails  
     emptitle            empname       empdepartment(lookup) --> from the list "employeedepartment"
       x                     Ram                 D1
       y                     Robert             D2
       z                     Rahim              D3
    My task is to create a custom webpart that will be for searching this employee details by entering emptitle
    For this, i have created a visual webpart using visual studio 2010, my webpart will be like this:
    emptitle  --->  TextBox1                        Button1--> Text property : Search
    empname---> TextBox2
    empdepartment-->  DropDownList1
    For this, i wrote the code as follows:
    protected void Button1_Click(object sender, EventArgs e)
                using (SPSite mysite = new SPSite(SPContext.Current.Site.Url))
                    using (SPWeb myweb = mysite.OpenWeb())
                        SPList mylist = myweb.Lists["employeedetails"];
                        SPQuery query = new SPQuery();
                        query.Query = "<Where><Eq><FieldRef Name='Title'/><Value Type='Text'>" + TextBox1.Text.ToString() + "</Value></Eq></Where>";
                        SPListItemCollection myitems = mylist.GetItems(query);
                        if (myitems.Count > 0)
                            foreach (SPListItem item in myitems)
                                string a1 = Convert.ToString(item["empname"]);
                                string a2 = Convert.ToString(item["empdepartment"]);
                                TextBox2.Text = a1;           // displaying   properly                    
                                //DropDownList3.SelectedIndex = 1;                           
     It is showing the list item in textbox according to the item entered in the textbox1... But I am stuck to show in the dropdown list. 
    Suppose, if i enter X in textbox and click on search, then dropdownlist need to show D1,
                               for Y --> D2 and for Z-> D3... like that.
    What code do i need to write in the button_click to show this... 
    Please don't give any links...i just want code in continuation to my code.

    Hi,
    Since you have got the data you want with the help of SharePoint Object Model, then you can focus on how to populate values and set an option selected in the Drop Down List.
    With the retrieved data, you can populate them into the Drop Down List firstly, then set a specific option selected.
    Here is a link will show how to populate DropDownList control:
    http://www.dotnetfunda.com/articles/show/30/several-ways-to-populate-dropdownlist-controls
    Another link about select an item in DropDownList:
    http://techbrij.com/select-item-aspdotnet-dropdownlist-programmatically
    Best regards
    Patrick Liang
    TechNet Community Support

  • Select multiple items from a list box as values for a parameter of crystal report and Oracle procedure

    -  I have a  Product list box (asp.net) used as multiple selected values for  a parameter. 
    - The Product ID is defined in the Oracle procedure as NUMBER data type. 
    -  In my crystal report, I have a parameter field allow multiple values as p_product_id type as Number.  This is the code in my Record Selection Formula for the report:
    ({?p_product_id}[1] = -1 OR {Procedure_name.product_id} in {p_product_id})
    -  In C#, this is my code
    List<decimal?> productUnit = new List<decimal?>();
    int counter = 0;
    decimal prod;
    for (int i = 0; i < lstProducts.Items.Count; i++)
                  if (lstProducts.Items[i].Selected)
                                if (decimal.TryParse(lstProduct.Items[i].Value, out prod))
                                    productUnit.Add((decimal?)prod);                              
                                    counter++;
           if (counter == 0)
                       productUnit.Add(-1);                      
    ReportingDAO rDataFactory = new ReportingDAO();
    retVal = rDataFactory.GetProductReport(productUnit);
    public CrystalDecisions.CrystalReports.Engine.ReportDocument GetProductReport(List<decimal?> productUnit)
              CrystalDecisions.CrystalReports.Engine.ReportDocument retVal = new rptProductDownload();
              ReportLogon rptLog = new ReportLogon();
             rptLog.Logon(retVal, "RPT_PRODUCT_DOWNLOAD");
             retVal.SetParameterValue("p_product_id", productUnit); 
    I keep having the "Value does not fall within the expected range" when I debug.  My question is, is the data type I used for procedure/Crystal report/ and C# correct ?  I always have problem with the data type.  Any help would be
    appreciated
    Thank you

    Hi progGirl,
    Thank you for your post, but Microsoft doesn't provide support for CrystalReport now. Please post your question in SAP official site here:
    http://forums.sdn.sap.com/forum.jspa?forumID=313
    Thank you for your understanding.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Multicolumn list box, "operate value tool" and "active cell"

    If I use the "operate value tool" to select a row
    of the multicolumn list box, that row gets a dark blue background. 
    However, I cannot determine which property will tell me what is that row or let me
    change that row number.  It is not the active cel or "edit position".  
    I want to programatically change the selection just as the "operate value tool" does.  I can change the background color of the cell but the dark blue of the cells selected by the "operate value tool" take precedence and hide my colors.  
    Extremely frustrated and wishing for Java or C++...
    Alan

    Hi Alan,
    Have a look at event structures and invoke nodes (Point to Row Column) and use property nodes. Here is an attachment.
    Adnan Zafar
    Certified LabVIEW Architect
    Coleman Technologies
    Attachments:
    mclistbox.PNG ‏12 KB

  • How to prevent multi-column list box showing an extra column

    I am using a multi-column list box to display data and to allow the user to enter new values. More columns are used than are actually displayed within the bounds of the listbox control. Using an event structure the user is able to scroll left and right along the columns of the list box to select the appropriate field. I am using the 'Edit Position' property to highlight the particular field that the user is selecting. This technique works well and the listbox scrolls left and right to display the selected fields correctly.
    If the listbox has, say, 10 columns with only 5 being visible within the displayed width, then I clamp the Edit Position to a maximum column value of 9 to prevent the list box from continuing to scroll right into unused columns. This works fine, except that when the user scrolls to the 10th column, the listbox control always shows a blank 11th column. The 11th column cannot be selected. It would appear that this is default behaviour for the listbox control in that an additional column is always displayed relative to the Edit Position. In my particular application it is untidy to have this blank column appearing. I have tried a workaround by programmatically writing to the 'TopLeft' property of the listbox. This partially works by ensuring that the blank 11th column is never displayed, however, despite the Edit Position being correct to select the 10th column, the field in the 10th column is no longer highlighted and the user cannot enter a new value.
    Does anyone know of a method for preventing the blank additional column from appearing?

    Ok - I have attached an example which demonstrates the issue. This is produced with LV 2012. Open the project and then the 'Multi column listbox.vi'. Run the vi and use the right/left arrows to move between cells in the listbox. Observe that unused (unwanted) columns are always displayed to the right.
    Thanks for any help..
    Attachments:
    Test Multi column listbox.zip ‏62 KB

  • Table control list box. different values in each row of the list box

    Hi all,
    i have a requirement to display text box in table control. Each row of list box should contain different values.
    i tried with the below code  but the values are not getting populated in list  box. please give your ideas.
    I tried with list box which is having same values in all rows, it is working fine.
    loop at itab.
    select vbeln from ZSD_PS_BLAWB into ZSD_PS_BLAWB-vbeln
    where BLAWBNO = itab-BLAWBNO and
    BLAWBDT = itab-BLAWBDT and
    CTRNO = itab-CTRNO.
    if sy-subrc = 0.
    index = 1.
    list3-key = index.
    list3-text = ZSD_PS_BLAWB-vbeln.
    append list3 to list2.
    index = index + 1.
    endif.
    endselect.
    clear index.
    CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
    ID = 'ITAB-VBELN'
    VALUES = list2
    EXCEPTIONS
    ID_ILLEGAL_NAME = 1
    OTHERS = 2
    IF SY-SUBRC 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    modify itab.
    endloop.
    Thanks in advance.

    Hi,
    this is code example for listbox
    TYPE-POOLS vrm .
    DATA: lt_vrm_values TYPE TABLE OF vrm_value.
    DATA: wa_vrm_values TYPE vrm_value.
    PARAMETER p_list AS LISTBOX VISIBLE LENGTH 10.
    INITIALIZATION.
      wa_vrm_values-key = 'Key1'.
      wa_vrm_values-text = 'Value1'.
      APPEND wa_vrm_values TO lt_vrm_values.
      wa_vrm_values-key = 'Key2'.
      wa_vrm_values-text = 'Value2'.
      APPEND wa_vrm_values TO lt_vrm_values.
      wa_vrm_values-key = 'Key3'.
      wa_vrm_values-text = 'Value3'.
      APPEND wa_vrm_values TO lt_vrm_values.
    AT SELECTION-SCREEN OUTPUT.
      CALL FUNCTION 'VRM_SET_VALUES'
           EXPORTING
                id              = 'P_LIST'
                values          = lt_vrm_values
           EXCEPTIONS
                id_illegal_name = 1
                OTHERS          = 2.
      IF sy-subrc  0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    To fill it with data from DB, just do select in INITIALIZATION and put that values with same alghoritmus.
    Manas M.
    P.S.: This is very easy question, you should use search ...

  • How to show value and unit in different columns

    Hi All,
    I need ABAP help for the below requirement in BI7.0
    Data source contains  the field Amount in local currency (Data source is flat file of CSV format)
    Amount in local currency
           1000  INR
           2000  INR
           1000  GBP
           2000  EUR
    I have to get this value in target like below( value and unit should be in different columns)
    Amount in local currency              0currency
           1000                                           INR
           2000                                           INR
           1000                                           GBP
           2000                                           EUR
    Can any one help me how to declare the data type for  Amount in local currency and how to show this value in two columns in the target.
    Thanks,
    kishore.

    TYPES:BEGIN OF ty_stru,
      s1 TYPE string,
    END OF ty_stru,
    BEGIN OF ty_stru1,
      s2 TYPE string,
      s3 TYPE string,
      END OF ty_stru1.
    DATA:itab TYPE TABLE OF ty_stru,
          wa LIKE LINE OF itab.
    DATA:itab1 TYPE TABLE OF ty_stru1,
         wa1 LIKE LINE OF itab1.
    START-OF-SELECTION.
    "--Input--
    In input 1000 and USD having space
      wa-s1 = '1000 USD'.
       APPEND wa TO itab.
      wa-s1 = '1000 INR'.
       APPEND wa TO itab.
      wa-s1 = '1000 EUR'.
      APPEND wa TO itab.
    "--Input--
      LOOP AT itab INTO wa.
    SPLIT wa-s1 AT space INTO  wa1-s2 wa1-s3.*------> split command
    APPEND  wa1 TO itab1.*---------------->splited value store into another internal table
      ENDLOOP.
    "--Display--
      LOOP AT itab1 inTO wa1.
        WRITE: wa1-s2,
               wa1-s3.
      ENDLOOP.
    "--Display--
    Output:
    1000 USD
    1000 INR
    1000 EUR
    This is simple prgram for split a string into two different string based on space
    regards
    Dharma
    Edited by: dharma raj on Aug 19, 2009 2:01 PM

  • C# Checked List Box Checked Values only

    How can I loop through a checked list box and get the values for the checked items only?

    List<CheckedListBox> cbList = new List<CheckedListBox>();foreach (var item in checkedListBox.CheckedItems)
    // Loops checked checkedListBox items cbList.Add(item);
    }

  • Multiple Select List Box default value ysing Fx or Code

    Hello,
    If anybody could help me in figuring out how to set default or customized values (checked) for a multiple select list box in infopath based on a values in a secondary data connection using the fx function or code, instead of manually typing in text in the
    default value function, it would be really helpful. Have been stuck for eternity in this 
    I have a temp table now which has each student name and the subject separtely
    something like this 
    Student Name       Subject  
    AA                              
    English
    AA                              Maths
    So that in my infopath form if I choose a student name in a drop
    down box the multiple selection list box has the values of the subject chosen by the student checked

    Hi,
    Please check the link below and see if it can meet your requirement:
    http://basquang.wordpress.com/2010/03/29/cascading-drop-down-list-in-sharepoint-2010-using-infopath-2010/
    Here is the design for your scenario:
    List1 for subject name
    List2 for student and subject (just as your temp table)
    Then you could create cascading drop-down in InfoPath form.
    Regards,
    Rebecca Tu
    TechNet Community Support

Maybe you are looking for

  • Java printing problem how to print in multiple pages

    hi all i'm trying to print the output of my application no problems with the 1st page but i'd like to tell to my app to print in a brand new page if the content exceed the printable length of the first page. i have 2 classes: printer and Document. th

  • Twitter app signing in error

    In my Nokia 206 dual sim i downloaded a twitter app. It opens normally but when i enter my username password and try to sign in, it says 'Error occured while signing in please try again'. And after this new file is seen on the Folder of a phone memor

  • Please help.. nokia e72

    Hey Guys, I have a problem with my Nokia E72 and i was hoping maybe someone can help me out. I have been a Nokia fan for awhile now but after tonight i probably going to go with something else. I wanted to back up my things and then reset my phone (h

  • Create Attribute Dimension via the JAVA api

    <p>Does anyone know how to create an attribute dimenions via theJava API ?</p><p> </p><p>I can set the dimension type to attribute via<b>setAttributeDimensionDataType</b> but I don't know how toassociate the attr. dimension with a sparse, normal dime

  • I keep getting the same script error

    I'm running Firefox 3.6.13 on Windows 7 and I've just started getting the same script error when I'm on webpages, particularly Livejournal ones. The script error is js/ff_browser:28 I was prompted to change my display settings but this has had no eff