Skip to Content

Screen Personas 3 sp5 connect Combobox list to a table or another Combobox list on the other screen?

HI everyone,

I need to connect (fill) a drop-down to another dropdown list in transaction "XD01", I have done different methods (scripting) but it seems retrieving data from popup screen list is not possible or at least it was like hell of trouble for me.

1. Can I use drop down list just like "F4 Field" connecting to external sources like a table or a combobox in another popup screen?

2. If yes, would you please give me a piece of example code?



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jul 20, 2017 at 11:13 AM

    You could call an rfc to get the values for the combobox... this is much more efficient than using scripting to navigate to a screen and getting values for a combobox

    example below is a snippet of something I used to get a list of projects from an rfc call and populate a custom combobox

    //this sets up the combobox by removing the default entries, because a custom combobox cannot have no entries
    var oCombo = session.findById("wnd[0]/usr/box%B001008_BLOCK_1000/cmbPersonas_149572131264895");
    var oEntries = oCombo.entries;
    //this sets up a variable which is the result of the rfc call
    var projects = JSON.parse(oRFC.getResult("ET_PROJECTS"));
    //this prepares the entries for the combobox
    for(var i=0; i<projects.length; i++){
    	var oEntry = oEntries.createComboBoxEntry(projects[i].POSID, projects[i].POSID);
    //this copies the entries into the combobox
    oCombo.entries = oEntries;

    Hope this helps.

    Add comment
    10|10000 characters needed characters exceeded