Add initial line to dropdown listbox

Hi colleagues,
I want to add a initial line to a drop down list box, which I am filling by my own.
Its an bsp_wd_dropdown_table.
I already tried 3 ways to get this done:
INSERT INITIAL LINE INTO lt_ddlb INDEX 1
APPEND INITIAL LINE TO lt_ddlb.
ls_ddlb-key = ''.
ls_ddlb-value = ''.
APPEND ls_ddlb TO lt_ddlb.
But all 3 variants are not working - the framework is deleting the initial line.
But If I assign a key, and a empty value, it may works, but I need to change my whole coding, where I am checking if this value is initial...
Any ideas?
Best Regards,
Marcus
Edited by: Marcus Rieck on May 31, 2010 1:07 PM

Hi Marcus,
I've done a similar thing before and your 3rd part works well for me.
data: lt_ddlb type bsp_wd_dropdown_table,
        ls_ddlb type bsp_wd_dropdown_line.
  if gr_ddlb_fieldtype is not bound.
    CREATE OBJECT gr_ddlb_fieldtype
      EXPORTING
        iv_source_type = 'T'.
    ls_ddlb-key = '1'.
    ls_ddlb-value = 'GP-ID'.
    append ls_ddlb to lt_ddlb.
    ls_ddlb-key = '2'.
    ls_ddlb-VALUE = 'Information'.
    append ls_ddlb to lt_ddlb.
    ls_ddlb-key = ''.
    ls_ddlb-value = ''.
    append ls_ddlb to lt_ddlb.
    gr_ddlb_fieldtype->set_selection_table( lt_ddlb ).
  endif.
  rv_valuehelp_descriptor = gr_ddlb_fieldtype.
Actually I'm not sure if it's important where to enter the empty line.
In my case i added it at the end.
Maybe you can post your get_v-method just for checking?
Regards
Dennis

Similar Messages

  • Oe_order_pub.process_Order - how to add a line to order

    Hi,
    I have an existing order that I need to add a line to. How do I do this? Does anyone have some example code?
    Is it an update or a create?
    Currently, I'm receiving the return code of: U and the message: FND
    Any ideas are greatly appreciated.
    Thanks
    andy

    Process Order API needs the environment variables initialized. Use FND_GLOBAL.apps_initialize before calling the api.
    Also u need to initialize the parameters variables using G_MISS.... atleast those that u r using.
    Provide the header id in the header_rec parameter
    and provide the line details in the line_tbl parameter with action as create.
    Hopefully it should succeed. Also there are several other queries where sample code for process order is given in this forum. Try searching for them and compare your code.
    Regards,
    Nitin S. Darji

  • How to read selected item of the dropdown listbox in dialog prgmming

    hello to all,
    i need one help.In dialog programming how to read the selected value of the dropdown listbox created in se51. the values are appering in listbox by using FM 'VRM_SET_VALUES' .and function code is also assigned to lisbox .but how to read that one particular value selected by user form the dropdown list.
    thanks.

    hello mate
    Try this following  logic and code  u will getting the answer
    Here this example  :  
                      Let Name of the LIST BOX BE  :  LT
    Code :
    Data Declaration :
      I_NATIO TYPE VRM_VALUES,
      W_NATIO LIKE LINE OF I_NATIO
    data: begin of itab occurs 0,
    LT(10)  type c,    
    end of itab.
    **This query to data retrival
    select  x1 x2 into table itab form tbl .
    loop at itab.
    w_natio-key = itab-LT.
    w_natio-text = itab-LT.
    append w_natio into i_natio.
    clear w_natio.
    endloop.
    **This code  for setting values in the list box
    CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          ID     = 'LT'
          VALUES = I_NATIO.
    **This code getting the valu form the list box
      CALL FUNCTION 'VRM_GET_VALUES'
        EXPORTING
          ID     = 'LT'
        IMPORTING
          VALUES = I_NATIO.
    **simply to print the values selected
    write : i_natio-lt.
    I hope this will help u out.
    Anand

  • How do i add multiple lines in a cell (like a list) in Excel for MAC?

    I'm trying to add multiple lines (in the form of a list) in a individual cell in Excel for MAC.  I used ALT Enter on my PC but that doesn't work on the iMac.  Does anyone know how to do this?
    Thanks!

    It's been a while but I think you hold SHIFT while typing a page break (RETURN) to make a new line without shifting to another cell.
    However, as Excel isn't an Apple product, I am sure you will get a faster and more current answer by using Microsoft's Office:Mac forums here:
    Office for Mac forums
    They are very good.

  • Dropdown listbox getting values from domain

    Hi,
    I want to create a Dropdown listbox that gets its values from a dictionary domain. I usually get the values from a table but there's a case where I need to get them from a domain. Is it possible?
    Thanks.

    Hi Carles,
    If you are talking about the Domain which is used inside a Data Element, while defining data types, and as far as my knowledge goes...
    We cannot store values in Domain...they are just for declaring Data types...And it is the Table Field which stores the values...
    Hope this helps...
    <b><i>Do reward each useful answer..!</i></b>
    Thanks,
    Tatvagna.

  • How to get the values in the dropdown listbox  for screen field

    hi friends !
            I have selected dropdown listbox for a field in the screeen. Now, how to pass the possible values into the list. Please give the kind help.
    Regards,
    -Prasad.

    Hi Prasad,
    As Raja had mentioned, this topic has been discussed many times in this forum in the past. Please make sure that you first search the forum for related topics before you post new ones. that would avoid a lot of redundancy. Anyays, here are some of the topics you can refer to:
    Drop down list
    DROP DOWN BOX
    http://help.sap.com/saphelp_46c/helpdata/en/9f/dbabe435c111d1829f0000e829fbfe/content.htm
    Regards,
    Anand Mandalika.
    P.S: Please don't forget to reward points and close the thread once your problem is resolved.

  • Need to add extra lines in email generating from oracle

    Hi!
    I am using Oracle 9i Enterprise Edition 9.2.0.6
    I am facing a problem while generating the email from Oracle
    Problem is that I want to display the data in following format
    Terminal Statistics From: 30-MAR-2008 15:39:00 To: 06-JUN-2008 16:59:00
    Containers Examined
    Export: 2
    Import: 30
    but email shows data in following format
    Terminal Statistics From: 30-MAR-2008 15:39:00 To: 06-JUN-2008 16:59:00 Containers Examined Export: 2 Import: 30
    System combines the all the data in one line, while I have used following function to add new line when and where needed, but unable to get my desired result.
    1. utl_tcp.CRLF
    2. chr(130) || chr(10)
    3. chr(10)
    I have used following procedure to generate the email.
    PROCEDURE send_html_email(
    p_module_name in varchar2,
    p_subject in varchar2,
    p_text in varchar2 default null,
    p_html in varchar2 default null
    IS
    l_boundary varchar2(32767) default 'a1b2c3d4e3f2g1';
    l_connection utl_smtp.connection;
    l_body_html clob := empty_clob; --This LOB will be the email message
    l_offset number;
    l_ammount number;
    l_temp varchar2(32767) default null;
    l_to varchar2(100);
    l_cc varchar2(100);
    l_bcc varchar2(100);
    t_v_stpt Number:=0;
    t_v_endpt Number:=0;
    c_v_stpt Number:=0;
    c_v_endpt Number:=0;
    b_v_stpt Number:=0;
    b_v_endpt Number:=0;
    l_subject varchar2(255);
    BEGIN
    /*Function to retrieve the E-mail recipients list according to the Module/application*/
    mail_recipient(p_module_name,l_to,l_cc,l_bcc);
    l_connection := utl_smtp.open_connection( pk_parameter.setting('MAILSVR'), 25 );
    utl_smtp.helo( l_connection, pk_parameter.setting('MAILSVR') );
    utl_smtp.mail( l_connection, pk_parameter.setting('MAILFROM') );
    l_temp := l_temp || 'MIME-Version: 1.0' || chr(13) || chr(10);
    LOOP
    t_v_stpt := t_v_stpt + 1;
    t_v_endpt := INSTR (l_to, ',', t_v_stpt, 1);
    IF l_to is null then
    EXIT;
    ELSIF t_v_endpt = 0 THEN
    UTL_SMTP.rcpt (l_connection, SUBSTR (l_to, t_v_stpt));
    EXIT;
    ELSE
    UTL_SMTP.rcpt (l_connection, SUBSTR (l_to, t_v_stpt, t_v_endpt -t_v_stpt));
    END IF;
    t_v_stpt := t_v_endpt;
    END LOOP;
    LOOP
    c_v_stpt := c_v_stpt + 1;
    c_v_endpt := INSTR (l_cc, ',', c_v_stpt, 1);
    IF l_cc is null then
    EXIT;
    ELSIF c_v_endpt = 0 THEN
    UTL_SMTP.rcpt (l_connection, SUBSTR (l_cc, c_v_stpt));
    EXIT;
    ELSE
    UTL_SMTP.rcpt (l_connection, SUBSTR (l_cc, c_v_stpt, c_v_endpt -c_v_stpt));
    END IF;
    c_v_stpt := c_v_endpt;
    END LOOP;
    LOOP
    b_v_stpt := b_v_stpt + 1;
    b_v_endpt := INSTR (l_bcc, ',', b_v_stpt, 1);
    IF l_bcc is null then
    EXIT;
    ELSIF b_v_endpt = 0 THEN
    UTL_SMTP.rcpt (l_connection, SUBSTR (l_bcc, b_v_stpt));
    EXIT;
    ELSE
    UTL_SMTP.rcpt (l_connection, SUBSTR (l_bcc, b_v_stpt, b_v_endpt -b_v_stpt));
    END IF;
    b_v_stpt := b_v_endpt;
    END LOOP;
    /*Header creation for email.*/
    IF l_to is not null or l_cc is not null or l_bcc is not null THEN
    l_temp := l_temp || 'To: ' || l_to || chr(13) || chr(10);
    l_temp := l_temp || 'CC: ' || l_cc || chr(13) || chr(10);
    l_temp := l_temp || 'BCC: ' || l_bcc || chr(13) || chr(10);
    l_temp := l_temp || 'From: ' || pk_parameter.setting('MAILFROM') || chr(13) || chr(10);
    l_temp := l_temp || 'Subject: ' || p_subject || chr(13) || chr(10);
    l_temp := l_temp || 'Reply-To: ' || pk_parameter.setting('MAILFROM') || chr(13) || chr(10);
    l_temp := l_temp || 'Content-Type: multipart/alternative; boundary=' ||
    chr(34) || l_boundary || chr(34) || chr(13) ||
    chr(10);
    -- Write the headers
    dbms_lob.createtemporary( l_body_html, false, 10 );
    dbms_lob.write(l_body_html,length(l_temp),1,l_temp);
    -- Write the text boundary
    l_offset := dbms_lob.getlength(l_body_html) + 1;
    l_temp := '--' || l_boundary || chr(13)||chr(10);
    l_temp := l_temp || 'content-type: text/plain; charset=us-ascii' ||
    chr(13) || chr(10) || chr(13) || chr(10);
    dbms_lob.write(l_body_html,length(l_temp),l_offset,l_temp);
    -- Write the plain text portion of the email
    l_offset := dbms_lob.getlength(l_body_html) + 1;
    dbms_lob.write(l_body_html,length(p_text),l_offset,p_text);
    -- Write the HTML boundary
    l_temp := chr(13)||chr(10)||chr(13)||chr(10)||'--' || l_boundary ||
    chr(13) || chr(10);
    l_temp := l_temp || 'content-type: text/html;' ||
    chr(13) || chr(10) || chr(13) || chr(10);
    l_offset := dbms_lob.getlength(l_body_html) + 1;
    dbms_lob.write(l_body_html,length(l_temp),l_offset,l_temp);
    -- Write the HTML portion of the message
    l_offset := dbms_lob.getlength(l_body_html) + 1;
    dbms_lob.write(l_body_html,length(p_html),l_offset,p_html);
    -- Write the final html boundary
    l_temp := chr(13) || chr(10) || '--' || l_boundary || '--' || chr(13);
    l_offset := dbms_lob.getlength(l_body_html) + 1;
    dbms_lob.write(l_body_html,length(l_temp),l_offset,l_temp);
    -- Send the email in 1900 byte chunks to UTL_SMTP
    l_offset := 1;
    l_ammount := 32767;
    utl_smtp.open_data(l_connection);
    while l_offset < dbms_lob.getlength(l_body_html) loop
    utl_smtp.write_data(l_connection, dbms_lob.substr(l_body_html,l_ammount,l_offset));
    l_offset := l_offset + l_ammount ;
    l_ammount := least(32767,dbms_lob.getlength(l_body_html) - l_ammount);
    end loop;
    utl_smtp.close_data(l_connection);
    utl_smtp.quit( l_connection );
    dbms_lob.freetemporary(l_body_html);
    END IF;
    END;
    Following procedure calls the above function and generate the email
    PROCEDURE generate_statistics
    IS
    l_minutes NUMBER:=0;
    l_sub_type cg_ref_codes.rv_meaning%type;
    l_gate_text VARCHAR2(5000);
    l_ves_text VARCHAR2(5000);
    l_exm_text VARCHAR2(5000);
    l_email_text VARCHAR2(5000);
    l_gate_tot NUMBER:=0;
    l_load_tot NUMBER:=0;
    l_discharge NUMBER:=0;
    l_exm_tot NUMBER:=0;
    /*Declare Cursor to get Examined Containers Summary*/
    CURSOR cur_examined_ctrs IS
    SELECT decode(eu.category,'I','Import','E','Export') Category, count(*) Total
    FROM service_events se, equipment_uses eu
    WHERE se.performed BETWEEN round(sysdate-l_minutes/1440,'mi')
    AND round(sysdate,'mi')
    AND se.tserv_id IN ('EXM')
    AND eu.gkey = se.equse_gkey
    AND eu.category IN ('I','E')
    GROUP BY eu.category;
    BEGIN
    /*Retrieve parameterized minutes*/
    l_minutes := nvl(pk_parameter.setting('STATSGMI'),0);
    /*Assign Values to generate email*/
    l_email_text := 'Terminal Statistics From: '||
    to_char(round(sysdate-l_minutes/1440,'mi'),'DD-MON-RRRR HH24:MI:SS')||
    ' To: '||to_char(round(sysdate,'mi'),'DD-MON-RRRR HH24:MI:SS')||
    chr(13) || chr(10)||chr(13) || chr(10);
    l_exm_text := 'Containers Examined'||utl_tcp.CRLF;
    FOR rec_examined_ctrs IN cur_examined_ctrs LOOP
    /*Generate Text for email - Vessel Activity Crane Wise Starts*/
    l_exm_text := l_exm_text ||rec_examined_ctrs.category ||': '||
    rec_examined_ctrs.total||utl_tcp.CRLF;
    l_exm_tot := l_exm_tot + rec_examined_ctrs.total;
    END LOOP;
    l_email_text := l_email_text||l_exm_text;
    pk_kictl_email.send_html_email('TERM STATISTICS',
    'Terminal Statistics Report',
    l_email_text,
    l_email_text
    END;
    I have been searching the reason and solution on net since last 2 days but hasn't find it yet.
    would anybody plz help me regarding this.
    Thanks
    Hassan

    I checked your suggestions after week end today and found that
    the suggestion of Nalla did not provide the result in my required format
    rewrite it as l_email_text := l_email_text||CHR(10)||l_exm_text;
    Peter & Krithika:
    I used html tag <BR> when and where needed and its gave me result in my required format
    e.g.: l_exm_text := l_exm_text ||'<br>'||rec_examined_ctrs.category ||': '||
    rec_examined_ctrs.total;
    Now I want to know if there any html tag thru which I can define the column number so that my text will start from there.
    means any html tag replacement of lpad (oracle funtion):
    Thanks
    Hassan

  • How to add header line in a file from XI system using file adapters

    Hi All,
    I need to add header line (Column names) in a file coming from XI system.
    I am using file adapters.
    Thanks & Regards,
    Gaurav Mittal

    The Receiver File Adapter is configured, using the following settings:
    1) Choose File Content Conversion as the Message Protocol.
    2) You give the ‘addHeaderLine’ parameter as 1
    3) For the ‘fieldSeparator’ parameter you need to give field separator for both list and substructure (referring to the data type above). For eg: it may be a ‘,’ (comma) for substructure in a comma separated file.
    4) The ‘endSeparator’ parameter needs to given for substructure only. For eg: it may be a ‘nl’ (new line)
    5) Give the file name, the directory and the Construction mode. Activate all the settings. Receiver File Adapter with F.C.C. is configured.
    please visit the blog.
    /people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
    /people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
    /people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2

  • How do I add multiple lines to a cell

    I am trying to create an assignment sheet in Numbers. I am using the "Schedule" template. Under each day of the week, I want to add daily assignments. But each assignment may need multiple lines. In the screenshot below, I want to add another line under "Genesis 5" but still have it within the same cell. How can I do that?

    I do extensive research  build on the work of others

  • How to add new line in transact move order line

    Hi,
    i am able to update locaotr in Transact move order.
    But i want to add two locators for the same line.
    I tried to insert one more record in data base, but getting error unique index error.
    so how can we add new line in transact move order line .
    please help to slove this isse.
    Thanks In Advance
    Venu.

    Hi,
    the fact that your question is posted in Order Management section, does the move order automatically generated by OM?
    nevertheless, i don't think you should (or allowed, in this case) to add a new line in transact move order. Transact move order only queries (not create records) the move order lines eligible to allocate and transact.
    So, I don't see why you need to add a new line in transact move order.
    You can, however, add a new line in the allocation of the lines, where for instance, you need to have half of the line allocated to one locator, and the other half to another locator
    Thanks

  • How to add new line in message on my S890

    My stock keyboard in Lenovo S890 doesn't have enter key, is this normal ? How to add new line ?
    However this happened only in messages, while using whatsapp the enter key present.

    Hi,
    the fact that your question is posted in Order Management section, does the move order automatically generated by OM?
    nevertheless, i don't think you should (or allowed, in this case) to add a new line in transact move order. Transact move order only queries (not create records) the move order lines eligible to allocate and transact.
    So, I don't see why you need to add a new line in transact move order.
    You can, however, add a new line in the allocation of the lines, where for instance, you need to have half of the line allocated to one locator, and the other half to another locator
    Thanks

  • Add a line question

    Alright, I know this is a question about how to go around the system, but I gotta ask.  I recently got a Palm Pre Plus due to issues I had with my Droid Eris.  Needless to say, I am just not very pleased with the Pre Plus either.  No useful apps, the keyboard tends to leave letters out while typing, it is choppy. Anyway, my question is, since I am not eligible to upgrade, and can't afford to buy a new phone right now, is there a way I could add a line to get a discounted price, then cancel the phone I have now.  I know there would be some sort of termination fee, but it would be cheaper than getting a new phone.  I don't want a used one, and I have bought phones from ebay before, I just would like to have a new one.  Along with that, when I add the line, I would need to have my phone number attached to the new phone so  I could get rid of the phone I currently have. So, my question is, is it possible to add a new line and have my number go to that phone, then terminate the phone I have and go back to just having two lines on the account?

    i think you have 30 days to return the phone, if your in that window, try that
    if not the only way to get the new phone on your number with the add a line would be
    1. add the new line with new number and new phone
    2. change your phone to the new line
    3. change the new phone to your old line
    4. terminate the line with the full etf
    this is expensive, 350 for a smart phone, 175 for a reg phone -  iirc
    keeping the second line would only be 9.99 a month, maybe give it to a family member?

  • BAPI_SALESORDER_CHANGE add new line and conditions with a condition value

    Hi,
    I am using BAPI_SALESORDER_CHANGE to add new lines to a credit memo. All works fine except that I can not seem to put a condition value on the new lines. The condition is created but with a value of 0. I can popluate the condition amount field, KBETR but not KWERT. BAPICONDX seems to only have the COND_VALUE field in it and not CONDVALUE as in BAPICOND. Does anyone have any idea how to do this? In the code below I just want to change the material on the first line of the credit memo and not add the condition. Then add new lines with the the condition.
    lw_order_header_inx-updateflag  = 'U'.
      LOOP AT i_accru INTO wa_accru.
        lv_count = lv_count + 1.
        lv_posnr = lv_count * 10.
    * Order Items
        lw_order_item_inx-itm_number = lv_posnr.
        lw_order_item_inx-material   = 'X'.
        IF lv_count = 1.
          lw_order_item_inx-updateflag    = 'U'.
        ELSE.
          lw_order_item_inx-updateflag    = 'I'.
        ENDIF.
        APPEND lw_order_item_inx TO lt_order_item_inx.
        lw_order_item_in-itm_number = lv_posnr.
        lw_order_item_in-material   = wa_accru-vakey.
        APPEND lw_order_item_in TO lt_order_item_in.
    * Conditions
        IF lv_count <> 1.
          lw_conditions_inx-itm_number = lv_posnr.
          lw_conditions_inx-cond_st_no = '905'.
          lw_conditions_inx-cond_count = '01'.
          lw_conditions_inx-cond_type  = 'ZHIE'.
          lw_conditions_inx-currency   = 'X'.
          lw_conditions_inx-updateflag = 'I'.
          APPEND lw_conditions_inx TO lt_conditions_inx.
          lw_conditions_in-itm_number = lv_posnr.
          lw_conditions_in-cond_st_no = '905' .
          lw_conditions_in-cond_count = '01'.
          lw_conditions_in-cond_type  = 'ZHIE'.
          lw_conditions_in-condvalue  = wa_accru-accru.
          lw_conditions_in-currency   = 'GBP'.
          APPEND lw_conditions_in TO lt_conditions_in.
        ENDIF.
      ENDLOOP.
    * Change the credit memo
      CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
        EXPORTING
          salesdocument               = lv_vbeln
          order_header_in             = lw_order_header_in
          order_header_inx            = lw_order_header_inx
    *   SIMULATION                  =
    *   BEHAVE_WHEN_ERROR           = ' '
    *   INT_NUMBER_ASSIGNMENT       = ' '
    *   LOGIC_SWITCH                =
    *   NO_STATUS_BUF_INIT          = ' '
        TABLES
          return                      = lt_return
          order_item_in               = lt_order_item_in
          order_item_inx              = lt_order_item_inx
    *   PARTNERS                    =
    *   PARTNERCHANGES              =
    *   PARTNERADDRESSES            =
    *   ORDER_CFGS_REF              =
    *   ORDER_CFGS_INST             =
    *   ORDER_CFGS_PART_OF          =
    *   ORDER_CFGS_VALUE            =
    *   ORDER_CFGS_BLOB             =
    *   ORDER_CFGS_VK               =
    *   ORDER_CFGS_REFINST          =
    *   SCHEDULE_LINES              =
    *   SCHEDULE_LINESX             =
    *   ORDER_TEXT                  =
    *   ORDER_KEYS                  =
         conditions_in               = lt_conditions_in
         conditions_inx              = lt_conditions_inx
    *   EXTENSIONIN                 =
      IF sy-subrc = 0.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    * EXPORTING
    *   WAIT          =
    * IMPORTING
    *   RETURN        =
      ENDIF.

    Hi Rob,
    Have you managed to solve this issue. If so, could you please share the solution.
    I am also facing similar problem.
    Thanks for your help.
    Anoop

  • How to add 100 line item in sales order at one time

    Hello Guru's
    My requirement is to add 100 line items in sales order at once.
    what can be good approach to overcome this situation.Is there some kind of tool which can be useful?
    Let me know your suggestions
    Thanks a lot in Advance

    Hi,
    do configuration for Proposal Items tab - like -
    then create sales order using with Propose items button - VA01 - then system will accept more than 50 line of materials at a time
    Please Use BAPI -- creation of Sales order
    Thanking you
    Regards
    Mahesh

  • What user exit can add / delete lines on a sales order?

    Hi experts -
    We are going to be using a 3rd party to give us pricing, so we need to make a call for each line item to get prices.  This may give us free goods, so we will need to add / remove lines from a sales order.
    Any ideas what exit will allow us to do this?
    Thanks,
    Mark

    Hi,
    Try BAPI:
    BAPI_SALESORDER_CHANGE
    Regards,
    Gilberto Li

Maybe you are looking for