How to populate multiple list items dynamically?

Dear members,
I have a form there are 3 list items i want to populate these from a record group by dynamically.
but i can be able to populate only one list item. the others give errors.
frm-41337 cannot populate the list from record group.
following is the program unit:
PROCEDURE POPULATE_LIST_WITH_QUERY
     (p_list_item in varchar2,
     p_query in varchar2)
IS
     cst_rg_name constant varchar2(30) :=
          GET_ITEM_PROPERTY(p_list_item,item_name);
     v_rg_id RECORDGROUP;
BEGIN
     v_rg_id := FIND_GROUP(cst_rg_name);
     if id_null(v_rg_id) then
          v_rg_id := create_group_from_query(cst_rg_name, p_query);
     end if;
     if populate_group(v_rg_id) =0 then
          populate_list(p_list_item, v_rg_id);
          copy(get_list_element_value(p_list_item,1),p_list_item);
     end if;
END;
i call this in the when-create-record
populate_list_with_query('gl_users.location_id',
'select location_name, to_char(location_id) from gl_locations');
populate_list_with_query('gl_users.company_id',
'select company_name, to_char(company_id) from gl_company');
populate_list_with_query('gl_users.group_id',
'select group_name, to_char(group_id) from gl_user_groups');
only one is populated others give errors.
what is wrong?
thanks
Muhammad Nadeem
Oracle Programmer
CHIMERA
Lahore
0092-0301-8334434

Hi again,
Did the popup work ?
For the list item , use the built-in add_list_element in a loop. Example : in the pre-form or when-new-form-instance trigger ,
clear_list('block_name.list_item_name');
for rec in (select column1,column2 from t_table order by 1 desc) loop
ADD_LIST_ELEMENT('block_name.list_item_name', 1, rec.column1, rec.column2);
end loop;
See you

Similar Messages

  • Workflow - how to update multiple list items

    Is it possible to update up to 3 list items with the same information using a workflow?  My scenario is where a company vehicle (registration number) has up to three drivers assigned to it - Driver Name 1, Driver Name 2 and Driver Name 3.   I
    have two separate lists - one for vehicles (fleet list) and one for drivers (driver database).  In my workflow when an item is created or changed in the fleet list, I would like the current vehicle registration to be updated in all three driver records
    in the driver database.  I am not sure if I can do this as I am unsure of what my unique look up would be as I need to be able to tie a vehicle registration to a driver name. Any advice would be much appreciated.
    Thanks

    Hi,
    Refer to the following threads about how to update multiple list items simultaneously.
    http://social.technet.microsoft.com/Forums/en-US/936d05ba-6e86-4f44-bbdb-b3c5c12b2c68/how-do-i-update-multiple-list-items-at-once-in-a-sharepoint-list
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/2d342b01-1978-40c9-a203-303d145b331e/how-to-update-mulitple-list-items-at-same-time
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/8d5b7424-58dc-470b-8142-90755dbdeaae/sharepoint-workflow-change-multiple-items-in-other-list
    Thanks.
    Tracy Cai
    TechNet Community Support

  • How to Populate a List item with LOV'S

    How to Populate a list of items with Lov's
    and then how to dynamically change the Values of one LIST Item
    Based on the Value of anothe List item

    976798 wrote:
    --Hello..I want to ask that How to bind a list item with  table values? this below code does not populate items from database to list item.Pls any body give me solution.
    declare
         group_id RecordGroup;
         list_id Item:=Find_Item('LST_CLASS');
         status number;
    begin
         group_id:=Create_Group_From_Query('Answer_List','select CLASS_ID,CLASS_NM from CLASS_MSTR');
         status:=Populate_Group('Answer_List');
         message(to_char(status));
         Populate_List(list_id,group_id);
         end;Welcome to the Oracle Forums. Please take a few minutes to review the following:
    <ul>
    <li>Oracle Forums FAQ
    <li>Before posting on this forum please read
    <li>10 Commandments for the OTN Forums Member
    <li>How to ask questions the smart way
    </ul>
    Following these simple guidelines will ensure you have a positive experience in any forum; not just this one!
    Check this link: How to Dynamically Populate a Pop List ?
    Hope this helps
    Hamid
    If someone's response is helpful or correct, please mark it accordingly.

  • How to populate a list item...

    Hi Guys,
    i have created one of the field on my form as List Item. Now i want to populate this Item with some values in a table.
    I have a base table with
    Country_ID and Country_Name fields.
    I want to populate my List Item on the form in such a style that it just display Country_name in the list, while Country_ID is saved in the database.
    The datatype of the field on my form is NUMBER.
    How can i populate my list item with a values selected from a database table, description is displyed while code is to be save?
    Pliz help,
    Imran Baig

    >
    Hi Guys,
    i have created one of the field on my form as List
    Item. Now i want to populate this Item with some
    values in a table.
    I have a base table with
    Country_ID and Country_Name fields.
    I want to populate my List Item on the form in such a
    style that it just display Country_name in the list,
    while Country_ID is saved in the database.
    The datatype of the field on my form is NUMBER.
    How can i populate my list item with a values
    selected from a database table, description is
    displyed while code is to be save?
    Pliz help,
    Imran Baighi
    my question is how is the county id value assigned hidden field to be saved to the database.
    secondly the reply states populate list(lstitem,grp_county) my question is which field are you populating here - the display value the country name or the county id to be saved in the database.
    most of the notes says you have to create a value twice. one for label and one for value, how is this applicable to be above case.
    i have a record group -
    SELECT site_abbrev,TO_CHAR(site_code)
    FROM sgr_site_list with 2 fields x_site not displayed but receives the site code and save to the database, the other x_site_abbrev displayed and receives site_abbrev but not saved to the database. this is the trigger i have written
    declare
    site_grp recordgroup := find_group('site_grp');
    i_list_item item := find_item('control.x_site_abbrev');
    status varchar2(80);
    begin
    status := populate_group(site_grp);
    CLEAR_LIST(i_list_item);
    POPULATE_LIST(i_list_item,site_grp);
    but i get the form error 40176 cannot create list ...
    can someone help please, the whole concepr is a bit confusing
    thanks

  • How to insert multiple list item as separate records

    I have a form with a list field in which user can select
    multiple item <select multiple="multiple"><option
    value></option></select>. My problem is that I don't
    know how to do an insert sql operation that puts every selected
    item on the list field into a separate record in a database table.
    I think that first I should get it to know how many item was
    selected from the list, than write the insert into statement
    between loop tags which loops the operation until every item has
    inserted. I'm not sure about it and even if I'm right, I don't know
    how to code it. Could someone show me a sample code for such a
    "problem"?

    quote:
    Originally posted by:
    Newsgroup User
    The ScareCrow wrote:
    uh, depending on the db (say it's sql server) you might want
    to swap the loop &
    cfquery to make that one big insert rather than a bunch of
    cfqueries.
    The following approach will work with just about any db and
    only uses once connection
    <cfquery>
    insert into sometable
    (field1, field2, etc)
    <cfloop list = "#somelist#" item = "thisitem">
    select distinct #thisitem#, 'something else', etc
    from some_small_table
    <cfif listfind(somelist, thisitem) lt
    listlen(somelist)>
    union
    </cfif>
    </cfloop>
    </cfquery>

  • ECMA/CSOM script to update multiple list items

     i am trying update multiple list items using CSOM/ECMA script but it updates only first record. can help out .how to update multiple list item records 
    Note(sharepoint hosted APP) only client side coding solution 
    function updateListItems() {
    var itemArray = [];
    var clientContext = SP.ClientContext.get_current();
    var oList = clientContext.get_web().get_lists().getByTitle('TestList');
    for(var i = 1; i<= 5; i++){
    var oListItem = oList.getItemById(i);
    oListItem.set_item('Title', 'My Updated Item!' + i);
    oListItem.update();
    itemArray[i] = oListItem;
    clientContext.load(itemArray[i]);
    clientContext.executeQueryAsync(onQuerySucceeded, onQueryFailed);
    function onQuerySucceeded() {
    alert('Items Updated');
    function onQueryFailed(sender, args) {
    alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
    updateListItems();

    Have a look at the following link for your reference
    https://social.msdn.microsoft.com/Forums/office/en-US/fc91b7b5-6300-4302-af93-4fc697131ec5/client-object-model-update-multiple-list-items?forum=sharepointdevelopment
    You can modify CAML query to fetch rows that you want to fetch.
    Geetanjali Arora | My blogs |

  • How do I change multiple list items at once in a SharePoint list with ribbon button

    Hi
    I have a sharepoint list and a ribbon button that open a dialog box with buttons to set color on a row
    The problem is that i can only selecet one item at once to set the color. 
    How can i do so it could set all or a couple items att once to the color i want 
    I want to do this with javascript
    here is the code i use to get the item id and the color code is in a seperate js file
    'use strict';
    var clientContext, hostweburl, parentContext, parentWeb, selectedItem, itemId, listId;
    clientContext = new SP.ClientContext.get_current();
    hostweburl = decodeURIComponent(getQueryStringParameter("SPHostUrl"));
    listId = decodeURIComponent(getQueryStringParameter("SPListId"));
    itemId = decodeURIComponent(getQueryStringParameter("SPListItemId"));
    parentContext = new SP.AppContextSite(clientContext, hostweburl);
    parentWeb = parentContext.get_web();
    selectedItem = parentWeb.get_lists().getById(listId).getItemById(itemId);
    $(document).ready(function () {
    clientContext.load(selectedItem);
    clientContext.executeQueryAsync(OnSuccess, OnFail);
    function OnSuccess() {
    $("#Blue").click(function () {
    selectedItem.set_item('Color', 'Blue');
    selectedItem.update();
    clientContext.load(selectedItem);
    clientContext.executeQueryAsync(function () { window.parent.postMessage('CloseCustomActionDialogRefresh', '*'); }, function (sender, args) { alert('Error:' + args.get_message()); });
    $("#Green").click(function () {
    selectedItem.set_item('Color', 'Green');
    selectedItem.update();
    clientContext.load(selectedItem);
    clientContext.executeQueryAsync(function () { window.parent.postMessage('CloseCustomActionDialogRefresh', '*'); }, function (sender, args) { alert('Error:' + args.get_message()); });
    $("#Red").click(function () {
    selectedItem.set_item('Color', 'Red');
    selectedItem.update();
    clientContext.load(selectedItem);
    clientContext.executeQueryAsync(function () { window.parent.postMessage('CloseCustomActionDialogRefresh', '*'); }, function (sender, args) { alert('Error:' + args.get_message()); });
    $("#Transparent").click(function () {
    selectedItem.set_item('Color', 'No Color');
    selectedItem.update();
    clientContext.load(selectedItem);
    clientContext.executeQueryAsync(function () { window.parent.postMessage('CloseCustomActionDialogRefresh', '*'); }, function (sender, args) { alert('Error:' + args.get_message()); });

    Check if below can help you
    http://sp2010batchedit.codeplex.com/
    http://sharepoint.stackexchange.com/questions/35935/use-view-ribbon-custom-action-on-multiple-list-items
    http://webcache.googleusercontent.com/search?q=cache:XqMO-PRLHQIJ:dannyjessee.com/blog/index.php/2014/06/enabling-custom-ribbon-buttons-dynamically-based-on-multiple-selected-item-values-using-refreshcommandui-and-jsom/+&cd=1&hl=en&ct=clnk&gl=in
    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <CustomAction Id="DannyJessee.TestCustomAction"
    Location="CommandUI.Ribbon"
    RegistrationId="100"
    RegistrationType="List">
    <CommandUIExtension>
    <CommandUIDefinitions>
    <CommandUIDefinition
    Location="Ribbon.ListItem.Actions.Controls._children">
    <Button Id="DannyJessee.MarkItemsFinishedButton"
    Command="cmdMarkItemsFinished"
    Image16by16="/_layouts/images/kpinormallarge-0.gif"
    Image32by32="/_layouts/images/kpinormallarge-0.gif"
    LabelText="Mark as Finished"
    TemplateAlias="o2" />
    </CommandUIDefinition>
    </CommandUIDefinitions>
    <CommandUIHandlers>
    <CommandUIHandler Command="cmdMarkItemsFinished"
    CommandAction="javascript:MarkItemsFinished();"
    EnabledScript="javascript:EnableFinishedButton();">
    </CommandUIHandler>
    </CommandUIHandlers>
    </CommandUIExtension>
    </CustomAction>
    <CustomAction Id="DannyJessee.TestScript"
    Location="ScriptLink"
    ScriptSrc="/_layouts/15/CustomRibbonButton/CustomAction.js" />
    </Elements>
    If this helped you resolve your issue, please mark it Answered

  • Populate list item dynamically

    Hi all.
    I have a problem. I must populate a list item with a select, using the add_list_element statement inside a loop, using a cursor. My problem is that I must parametrize the select of the cursor: I pass a parameter in the procedure which is a field of the select of the cursor, but I have no result. The statement is the follow
    cursor c1 is
    select distinct("name of the parameter")
    from table
    order by 1;
    When I execute this statement I have no result. Is there anyone to help me???
    Thank you all for your collaboration.

    Hi dear,
    as for as i understood your problem, you want to populate the element list with a select query and your are using cursor and add_elements for this purpose which is complex and lenghtly,
    why dont you use populate_group and populate_group_with_query built-ins instead of add_elements built in, by above mentioned two builts ins, you can populate the element list with a query and even you can refresh your element list at any time during runtime by populate_group_by_query. here is an example, you can also take benefit from forms builder help;
    in new_form_instance trigger write following code to populate a list with select query;
    DECLARE
    rg_id RecordGroup;
    errcode NUMBER;
    BEGIN
    rg_id := Create_Group_From_Query( 'LIST1_GRP','select code_name, code_no from any_table where code_name = ''0107''',FORM_SCOPE,200);
    errcode := Populate_Group( rg_id );
    Clear_List('CNOTE_TYPE');
    Populate_List('CNOTE_TYPE','ACCNO_GRP');
    end;
    user populat_group_by_query to refresh list elements after the forms is already load and elements list is already populated.
    any further question, feel free.

  • Customising a SharePoint list content type form - "Manage multiple list items with this form"

    I have designed a form for a content type on an existing SharePoint list.  When I ran the initial wizard, I selected
    Manage multiple list items with this form which is great, exactly what I want.
    But, there are some columns in this content type that I do not want repeating and have them moved them outside of the Repeating Section but I am getting the below error.  I can't seem to find a way to create a new non-repeating group though.  Any
    advice on how to do this?

    *Bump*

  • Dashcode iPhone Webapp - Adding url links to multiple list item

    I was wondering if anyone knew how to add a url link to multiple list items without the use of a button part.
    Say For Instance i Have
    Item 1 > I want to go to www.mysite.com/index.html
    Item 2 > I want to go to www.mysite.com/help/index.html
    Any help would be greatly appreciated

    After hours of reading and experimentation, I have solved my immediate problem thus:
    function jsonLoaded(jsonRequest) {
    if (jsonRequest.status == 200) {
    events = eval( "("jsonRequest.responseText")" );
    document.getElementById('list').object.reloadData();
    } else {
    alert("Error fetching JSON data: HTTP status " + jsonRequest.status);
    var feedURL = "http://www.foo.com/bar.php";
    var onloadHandler = function() { jsonLoaded(jsonRequest); };
    var events = [];
    var jsonRequest = new XMLHttpRequest();
    jsonRequest.onload = onloadHandler;
    jsonRequest.open("GET", feedURL, true);
    jsonRequest.setRequestHeader("Cache-Control", "no-cache");
    jsonRequest.send(null);
    var listController = {
    numberOfRows: function() {
    I had to do two things:
    1. Declare the array 'events' outside the function.
    2. Reload the list data (thanks to http://osdir.com/ml/safari-iphone-web-dev/2009-05/msg00013.html )
    Now I've got to figure out how to pull in different data for different list levels!

  • How to populate multiple entries to Bapi Table

    Hi all,
      How to populate multiple entries to Bapi Table.....
    Here is the code(in component controller)
      Z_Recr_Apply_Point_Input request = new Z_Recr_Apply_Point_Input(WDModelScopeType.TASK_SCOPE);
           int  size = wdContext.nodeApplicants().size();
                for(int i = 0 ; i < size ; i++)
                    String isselected = wdThis.wdGetContext().nodeApplicants().getElementAt(i).getAttributeAsText("Appl_Number");
                     if(isselected == "true")
                               com.models.veteranpoint.Zrecr_Aplno appid = new
                                    com.models.veteranpoint.Zrecr_Aplno();                                        
                                    appid.setAppl_Number(wdContext.nodeApplicants().
                                        getApplicantsElementAt(i).getAppl_Number());
                               request.addApplicants(appid);
    I want to pass the selected input field to bapi..
    Please tel me where i pass the input field...
    Please correct my code...
    Thanks & regards
    Mathi s

    Hi,
    Steps to insert multiple entries to BAPI table.
    1.Create an instance for BAPI input
    2.Bind the instance to the Node of the BAPI input
    3.Create instance of the Structure(BAPI table) to which input has to be added.
    4.Set the input values to the Structure instance.
    5.Add the instance to the BAPI input.
    6.Execute
    From the given example,I assume Z_Recr_Apply_Point_Input  is the BAPI Input and com.epiuse.us.recruitment.models.veteranpoint.Zrecr_Aplno as Structure
    Step 1:
    Z_Recr_Apply_Point_Input request = new Z_Recr_Apply_Point_Input(WDModelScopeType.TASK_SCOPE);
    Step 2:
    <b>wdContext.nodeZ_Recr_Apply_Point_Input.bind(request);</b>
    Steps 3 & 4:
    int size = wdContext.nodeApplicants().size();
    for(int i = 0 ; i < size ; i++)
    String isselected = wdThis.wdGetContext().nodeApplicants().getElementAt(i).getAttributeAsText("Appl_Number");
    if(isselected == "true")
    com.epiuse.us.recruitment.models.veteranpoint.Zrecr_Aplno appid = new
    com.epiuse.us.recruitment.models.veteranpoint.Zrecr_Aplno();
    appid.setAppl_Number(wdContext.nodeApplicants().
    getApplicantsElementAt(i).getAppl_Number());
    <b>wdContext.currentZ_Recr_Apply_Point_InputElement().modelObject().addRecr_Aplno(appid);</b>
    Step 5:
    <b>wdContext.currentZ_Recr_Apply_Point_InputElement().modelObject().execute();</b>
    Regards,
    Viji Priya

  • How to insert multiple line items in fv60 using bdc.

    Hi all,
          How to insert multiple line items in fv60 using bdcs

    hi
    chk this
    DATA : IT_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
    DATA : IT_MESSAGES LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
    DATA : V_EBELP(30) , V_MENGE(30) , V_WERKS(30), V_EMATN(30) ,
    V_PEINH(30).
    DATA : FILE TYPE STRING, V_MSG(100) , V_IND(2) TYPE N , FLAG VALUE 'X'.
    PARAMETERS: P_FILE(50) TYPE C DEFAULT 'C:\ME21_TEST'.
    DATA : BEGIN OF ITAB OCCURS 0,
            IND(02),
            LIFNR_001(010),
    data element: BSART
            BSART_002(004),
    data element: BEDAT
    data element: EKORG
            EKORG_004(004),
            EKGRP_006(003),
    data element: LPEIN
            LPEIN_005(001),
    data element: EMATNR
            EMATN_01_007(018),
    data element: EWERK
            WERKS_01_008(004),
    data element: EPEIN
            PEINH_01_009(006),
    data element: EWERK
           MENGE_01_013(017),
    data element: AUFEP
            EBELP_014(005),
    data element: AUFEP
         END OF ITAB.
    START-OF-SELECTION.
    FILE = P_FILE.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        FILENAME                      = FILE
        FILETYPE                      = 'ASC'
        HAS_FIELD_SEPARATOR           = 'X'
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
      CHECK_BOM                     = ' '
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
      TABLES
        DATA_TAB                      = ITAB
    EXCEPTIONS
       FILE_OPEN_ERROR               = 1
       FILE_READ_ERROR               = 2
       NO_BATCH                      = 3
       GUI_REFUSE_FILETRANSFER       = 4
       INVALID_TYPE                  = 5
       NO_AUTHORITY                  = 6
       UNKNOWN_ERROR                 = 7
       BAD_DATA_FORMAT               = 8
       HEADER_NOT_ALLOWED            = 9
       SEPARATOR_NOT_ALLOWED         = 10
       HEADER_TOO_LONG               = 11
       UNKNOWN_DP_ERROR              = 12
       ACCESS_DENIED                 = 13
       DP_OUT_OF_MEMORY              = 14
       DISK_FULL                     = 15
       DP_TIMEOUT                    = 16
       OTHERS                        = 17
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    SORT ITAB BY IND.
    START-OF-SELECTION.
    LOOP AT ITAB.
    REFRESH IT_MESSAGES.
    <b>V_IND = V_IND + 1.</b>
    <b>AT NEW IND.</b>
    <b>READ TABLE ITAB INDEX SY-TABIX.</b>
    PERFORM BDC_DYNPRO      USING 'SAPMM06E' '0100'.
    PERFORM BDC_FIELD       USING 'EKKO-LIFNR'
                                  ITAB-LIFNR_001.
    PERFORM BDC_FIELD       USING 'RM06E-BSART'
                                  ITAB-BSART_002.
    *perform bdc_field       using 'RM06E-BEDAT'
                                 ITAB-BEDAT_003.
    PERFORM BDC_FIELD       USING 'EKKO-EKORG'
                                  ITAB-EKORG_004.
    PERFORM BDC_FIELD       USING 'RM06E-LPEIN'
                                  ITAB-LPEIN_005.
    PERFORM BDC_FIELD       USING 'EKKO-EKGRP'
                                  ITAB-EKGRP_006.
    PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                  '/00'.
    ENDAT.
    <b>PERFORM BDC_DYNPRO      USING 'SAPMM06E' '0120'.
    CONCATENATE 'EKPO-EMATN(' V_IND ')' INTO V_EMATN.
    PERFORM BDC_FIELD       USING  V_EMATN
                                   ITAB-EMATN_01_007.
    CONCATENATE 'EKPO-WERKS(' V_IND ')' INTO V_WERKS.
    PERFORM BDC_FIELD       USING  V_WERKS
                                   ITAB-WERKS_01_008.
    CONCATENATE 'EKPO-PEINH(' V_IND ')' INTO V_PEINH.
    PERFORM BDC_DYNPRO      USING 'SAPMM06E' '0120'.
    PERFORM BDC_FIELD       USING  V_PEINH
                                   ITAB-PEINH_01_009.
    *CONCATENATE 'EKPO-MENGE(' V_IND ')' INTO V_MENGE.
    *perform bdc_dynpro      using 'SAPMM06E' '0120'.
    *perform bdc_field       using  V_MENGE
                                  ITAB-MENGE_01_013.
    *CONCATENATE 'EKPO-EBELP(' V_IND ')' INTO V_EBELP.
    PERFORM BDC_DYNPRO      USING 'SAPMM06E' '0120'.
    PERFORM BDC_FIELD       USING  'RM06E-EBELP'
                                   ITAB-EBELP_014.</b>PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                  '/00'.
    AT END OF IND.
    PERFORM BDC_FIELD       USING 'BDC_OKCODE'
                                  '=BU'.
    ENDAT.
    CALL TRANSACTION 'ME21' USING IT_BDCDATA MODE 'A'
                                             UPDATE 'S'
                                        MESSAGES INTO IT_MESSAGES.
       LOOP AT IT_MESSAGES WHERE MSGTYP = 'E' OR MSGTYP = 'A'.
         IF FLAG = 'X'.
         CALL FUNCTION 'BDC_OPEN_GROUP'
         EXPORTING
            CLIENT                    = SY-MANDT
           DEST                      = FILLER8
            GROUP                     = 'GAMY_FAILURE'
           HOLDDATE                  = FILLER8
            KEEP                      = 'X'
            USER                      = SY-UNAME
           RECORD                    = FILLER1
           PROG                      = SY-CPROG
         IMPORTING
           QID                       =
          EXCEPTIONS
            CLIENT_INVALID            = 1
            DESTINATION_INVALID       = 2
            GROUP_INVALID             = 3
            GROUP_IS_LOCKED           = 4
            HOLDDATE_INVALID          = 5
            INTERNAL_ERROR            = 6
            QUEUE_ERROR               = 7
            RUNNING                   = 8
            SYSTEM_LOCK_ERROR         = 9
            USER_INVALID              = 10
            OTHERS                    = 11
         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 FLAG.
         ENDIF.
         CALL FUNCTION 'BDC_INSERT'
          EXPORTING
            TCODE                  = 'ME21'
           POST_LOCAL             = NOVBLOCAL
           PRINTING               = NOPRINT
           SIMUBATCH              = ' '
           CTUPARAMS              = ' '
           TABLES
             DYNPROTAB              = IT_BDCDATA
          EXCEPTIONS
            INTERNAL_ERROR         = 1
            NOT_OPEN               = 2
            QUEUE_ERROR            = 3
            TCODE_INVALID          = 4
            PRINTING_INVALID       = 5
            POSTING_INVALID        = 6
            OTHERS                 = 7
         IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
         ENDIF.
        ENDIF.
    CALL FUNCTION 'FORMAT_MESSAGE'
      EXPORTING
        ID              = IT_MESSAGES-MSGID
        LANG            = 'EN'
        NO              = IT_MESSAGES-MSGNR
        V1              = IT_MESSAGES-MSGV1
        V2              = IT_MESSAGES-MSGV2
        V3              = IT_MESSAGES-MSGV3
        V4              = IT_MESSAGES-MSGV4
      IMPORTING
        MSG             = V_MSG
      EXCEPTIONS
        NOT_FOUND       = 1
        OTHERS          = 2
       WRITE : / V_MSG.
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDLOOP.
       ENDLOOP.
    IF FLAG NE 'X'.
      CALL FUNCTION 'BDC_CLOSE_GROUP'
       EXCEPTIONS
         NOT_OPEN          = 1
         QUEUE_ERROR       = 2
         OTHERS            = 3
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      ENDIF.
           Start new screen                                              *
    FORM BDC_DYNPRO USING PROGRAM DYNPRO.
      CLEAR IT_BDCDATA.
      IT_BDCDATA-PROGRAM  = PROGRAM.
      IT_BDCDATA-DYNPRO   = DYNPRO.
      IT_BDCDATA-DYNBEGIN = 'X'.
      APPEND IT_BDCDATA.
    ENDFORM.
           Insert field                                                  *
    FORM BDC_FIELD USING FNAM FVAL.
        CLEAR IT_BDCDATA.
        IT_BDCDATA-FNAM = FNAM.
        IT_BDCDATA-FVAL = FVAL.
        APPEND IT_BDCDATA.

  • How to populate a list box linked to selection in combo box?

    Hi All,
    I am a beginner in Xcelsius. I am having problem on how to populate a list box based on the selection on my combo box.
    I have a combo box and a list box.  The combo box value consist of Countries. Values are:
    Singapore
    Indonesia
    Thailand
    When I select, for i.e. Indonesia, I want to populate the list box with all the Postal Code of Indonesia. When I select Thailand, i want to do the same.
    Can anyone shed some lights on how to achieve this?
    My spreadsheet data is as follow
    Country         Postal Code
    Singapore     680123
    Singapore     680124
    Singapore     680125
    Indonesia     155123
    Indonesia     155124
    Indonesia     155125
    Indonesia     155126
    Thailand       333123
    Many Thanks,
    Harianto

    Hi,
    I am detailing the complete steps below:
    In the combobox select the entire range of Country while seeing the records from the Combobox, Xcelsius will automatically show the unique values in the selection.
    After that in the "Data Insertion" section for Combobox select the "Insertion Type" as "Filtered Rows" (please click on the question mark beside this option and it will show how the selection works).
    In the source select the postal code, in the destination select the range which will be used as a data source for the list box.
    This will resolve the concern. Please remember to select the question mark beside the "Insertion Type" option, it explains the working in specific details.
    Best of luck.
    Regards,
    Gourav

  • How to delete a list-item with Contribute 4

    I use Contribute for a lot of my client for years and a few
    weeks ago i installed Contribute 4 for the first time for a new
    client .We dicovered that it's difficult or impossible to delete a
    list-item in a unordered list. Maybe also in other list-types but
    we haven't tried this yet. Does anybody know how to delete a
    list-item? In Contribute 3 you just had to use the backspace button
    but that isn't working anymore.
    Thanks for your help.
    Maarten Strik
    www.strikdesign.nl

    http://linesofcode.net/snippets/166

  • How to make a list item field with DATE data type?

    I have a column with DATE data type. Using forms 6i I want to generate a poplist list item field with this column while the value of the elements in the list to will be day names like SATURDAY,SUNDAY,MONDAY. if we change the data type from date to char, it will work properly but now with DATE data type behind it, it gives the following error message
    "FRM-32082: Invalid value for given item type.
    List WEEKREST
    Item: WEEKREST
    Block: EMPRESTS
    Form: MODULE3
    FRM-30085: Unable to adjust form for output."
    Using forms 6i how to make a list item field with DATE data type which can hold day names?

    Set your date column as a hidden (non-displayed) field. Create your list item with the varchar2 day names. Create the list item as a non-base-table field that accepts the text values of day names. On that field, create a when-validate-item trigger that translates the text into a real date, which it then uses to set the value of the actual base-table item.

Maybe you are looking for