REUSE_ALV_GRID_DISPLAY == How to add a new line?

Hello SDN community,
I'm using the "REUSE_ALV_GRID_DISPLAY" function with "i_save = 'X'". How can I solve the following problem: I want to insert a new line into the ALV and after a click on the SAVE Button, the internal table should have this new line too?
Best regards,
Marius Klaus
[click for an example picture|http://pic-hoster.net/upload/0a8b8c5c7a38434f4e0010ceb7f6fbe7.jpg]
Edited by: Marius Klaus on Nov 30, 2009 4:00 PM

on the click of add button(for adding an line in grid_display)  write the following code.
t_user_input is the table to be displayed in ALV_GRID.
DATA : ob_ref_grid TYPE REF TO cl_gui_alv_grid.
  READ TABLE t_user_input INTO e_user_input INDEX  1 .
          MODIFY e_user_input(as per user's requirement)           
          APPEND e_user_input TO t_user_input.
      CALL METHOD ob_ref_grid->check_changed_data .
      CALL METHOD ob_ref_grid->refresh_table_display.
Regards,
Shekhar

Similar Messages

  • How to add a new line in SMS(Line Break).

    Hi All,
    I need to send SMS from PL\SQL Procedure
    The problem i have been facing is that the string being passed in as sms content is not parsing a newline character.
    It shows all content in one line.
    I need to break them in several lines.
    Give me a direction how to add a new line in SMS.
    Regards,
    Raj.

    Hi,
    Sure, Here it is
    CREATE OR REPLACE PROCEDURE APPS.AUTO_SMS_RTV_REPORT
    IS
    sender          VARCHAR2(1000);
    recipient     VARCHAR2(1000);
    message          VARCHAR2(4000);
    sub          VARCHAR2(1000)     := 'HELLO';
    dt1          varchar2(1000)     := to_char(sysdate,'DD-MON-YY');
    mailhost     VARCHAR2(30) := '10.7.7.xxx';     
    mail_conn     UTL_SMTP.CONNECTION;
    v_crlf VARCHAR2(2) := CHR(13)||CHR(10);
    CURSOR cur_Rejection_Records IS
                   SELECT DISTINCT
                        rt.VENDOR_SITE_ID               ,
                        pvs.email_address     VENDOR_MAIL_ID     ,
                        pvs.PHONE          vendor_contact_no ,
                        hre.EMAIL_ADDRESS     Employee_mail_id ,
                        hre.FULL_NAME
                   FROM apps.rcv_transactions      rt,
                        apps.po_vendors           pv,
                        apps.po_vendor_sites_all     pvs,
                        apps.mtl_transaction_reasons mtr,
                        apps.fnd_user          fu,
                        apps.hr_employees          hre     
                   WHERE transaction_type = 'RETURN TO VENDOR'
                   --AND        TRUNC(rt.transaction_date) = TRUNC(SYSDATE)
                   AND     rt.vendor_id          = pv.vendor_id
                   AND     rt.vendor_site_id     = pvs.vendor_site_id
                   AND     rt.REASON_ID          = mtr.REASON_ID(+)
                   AND fu.user_id          = rt.last_updated_by
                   AND hre.EMPLOYEE_ID     = fu.EMPLOYEE_ID
                   AND TRANSACTION_ID IN (
                                  11902189,
                                  11902253,
                                  11902148)
    BEGIN
         FOR rec_Rejection_Records IN cur_Rejection_Records
         LOOP
         Begin
              sender     := '<[email protected]>';
              recipient     := rec_Rejection_Records.vendor_contact_no || '@aaaa.com';
              mail_conn := utl_smtp.open_connection(mailhost, 8025);
              utl_smtp.helo(mail_conn, mailhost);
              utl_smtp.mail(mail_conn, sender);
              utl_smtp.rcpt(mail_conn, recipient);
              utl_smtp.DATA(     mail_conn,
                                  'Date: ' || TO_CHAR(SYSDATE, 'Dy, DD Mon YYYY hh24:mi:ss') || utl_tcp.crlf ||
                                  'From: ' || sender     || utl_tcp.crlf ||
                                  'Subject: '|| sub     || utl_tcp.crlf ||
                                  'To: ' || recipient || utl_tcp.crlf ||
                                  utl_tcp.crlf ||
                                  'Dear Supplier,'||CHR(10)|| utl_tcp.crlf ||'\\\0x0A'|| -- HERE I NEED LINE BREAK
                                  'Please.'|| utl_tcp.crlf                          
              DBMS_OUTPUT.PUT_LINE('Yep !!! SMS Sent Sucessfully :) ');
              utl_smtp.quit(mail_conn);
         EXCEPTION
              WHEN UTL_SMTP.PERMANENT_ERROR THEN
                        dbms_output.put_line('Error - ' || SQLCODE || ' - ' || SQLERRM);
              WHEN OTHERS THEN
                        dbms_output.put_line('Error - ' || SQLCODE || ' - ' || SQLERRM);
         END;
         END LOOP;
    END AUTO_SMS_RTV_REPORT;
    /

  • How to add a new line item to a Purchase Requisition number

    Hello All,
    Can anyone please provide me with some FM or BAPI to add a new line item to an existing Purchase Requisition number.
    Can it be done using BAPI_REQUISITION_CHANGE; if yes, then how do I pass the parameters into the BAPI tables..?
    Useful pointers would be appreciated...!!
    Thanks & Regards,
    Tarun Gambhir

    @Gautham,
    Thanks for the quick reply.
    I want to update the table EBAN, so should I use the parameter table XEBAN to put in the new line item and then execute..
    Also to fill up this table I need to pass certain value, so can I use BAPI_REQUISITON_GETDETAIL and pass the same details as found from the same BAPI and create a new line item...
    Regards,
    Tarun Gambhir

  • How do add a new line in the JavaScript Editor?

    I have a script like this:
    var n = this.getField("score").value;
    if (n >= 0 && n < 5) {
        event.value = "The WP 100% Bond\nThe WP 10% Stock / 90% Bond\nThe WP 20% Stock / 80% Bond";
    I want to output that line like...
    The WP 100% Bond
    The WP 10% Stock / 90% Bond
    The WP 20% Stock / 80% Bond
    But it's not honoring the \n for a new line. How in the heck do you add a new line??? I've tried \r, \r\n, \n\n. All it does is add a character space, and looks like this...
    The WP 100% Bond The WP 10% Stock / 90% Bond The WP 20% Stock / 80% Bond

    You can use \n like you did to indicate a new line, or \r (carriage return). If it's not working, be sure to set the field to multiline on the Options tab of the field properties dialog.

  • How to add a new Line in Labeltext of Ribbon button added in runtime ?

    HI , i'm adding a new buuton ribbon to an existing Tab (Edit Tab) , i use the AliasTemplate "o1" , and this is my button :
    The text "Mettre a jour la fiche a partir de la concept Note " is very long i want to add a new line after "a partir" so i will have two lines , this is what i tried but it dosent worked :
    private string btnUpdateForm = @"<Button
    Id=""Ribbon.Tab.GRP.ButtonUpdate""
    Sequence=""17""
    Image32by32=""/_layouts/images/Aidimpact.RibbonWorkflkow/export-icon.png""
    Description=""""
    Command=""Ribbon.Tab.GRP.ButtonUpdate.Click""
    LabelText=""ValValUpdateLabel1
    ValValUpdateLabel2""
    TemplateAlias=""o1""/>";
    private void AddBtnUpdate()
    // Get the current instance of the ribbon on the page.
    Microsoft.Web.CommandUI.Ribbon ribbon = SPRibbon.GetCurrent(this.Page);
    // Prepare an XmlDocument object used to load the ribbon extensions.
    XmlDocument ribbonExtensions = new XmlDocument();
    // Load the contextual tab XML and register the ribbon extension.
    int intLCID = System.Threading.Thread.CurrentThread.CurrentUICulture.LCID;
    if (intLCID == 1036)
    btnUpdateForm = btnUpdateForm.Replace("ValValUpdateLabel1", "Mettre à jour la fiche à partir");
    btnUpdateForm = btnUpdateForm.Replace("ValValUpdateLabel2", "\n \r\n de la Concept Note");
    else
    btnUpdateForm = btnUpdateForm.Replace("ValValUpdateLabel", "Update the form from Concept Note");
    ribbonExtensions.LoadXml(this.btnUpdateForm);
    ribbon.RegisterDataExtension(ribbonExtensions.FirstChild, "Ribbon.ListForm.Edit.Actions.Controls._children");
    Thanks for advance

    Hi,
       i replicated issue , and \n is not affective. So i guess what option you can try is to keep text small and use Alt to show full text. 
    Regards,
    Milan Chauhan
    LinkedIn
    |
    Twitter | Blog
    | Email

  • How to add a new line item when i click on UPDATE in orderpage B2B webshop?

    Hi Gurus,
    I need to add a new line item based on some condition when i click on update in the order page in b2b web shop. Is there any way to pass some parameters to the BADI crm_isa_basket_items and create a new line item when i update? If so can you please tell the parameters that i need to pass to the badi.
    Any help will be highly appreciated!!!!!
    Thanks in advance,
    Lakshman.

    You can put condition when you call java script function while clicking on "update" button.
    On order.jsp  update button call "submit_refresh()" java script function. You can check your condition over here.
    You can find this function in "orderTools.js" file.
    And when you enter item in last line on order page and click on the update button it will automatically add new empty lines on your order page as per your selected new line items from drop down box.
    Or may be you can call your custome action class when you click on update to check particular condition.
    I hope it will help you.
    Thanks and Regards.
    eCommerce Developer

  • How to add a new line in pe51?

    Hi Team,
    I want to add anew field in pe51 form editor.
    for that i want to add anew line in pe51 form
    i went to pe51 tcode and selected background raidobutton.
    but from ther i dont know how to add a line at the required position.
    So please reply me on this as soon as possible.
    Thanks & Regards,
    Kranti.

    Hi Kranti,
    The reason, why you are not able to insert a new line in background could be that the maximum line size defined in attributes is already utilized. Thats why F7 doesn't work.
    1- From main screen of PE51, select your pay slip, click on attributes and than click on change button.
    2- Increase value in lines field and save changes.
    3- Go to background and try to insert new line with F7 keyboard key.
    I hope this is what you are looking for.
    Regards,
    Waqas Rashid

  • How to add the new line in reciever FCC

    Hi All,
    I have my reciever FCC with me, but I just need to add one more additional line or you can say seprate the first line.
    So how to add extra or new line in the current structure?
    Please let me know if there is any parameter for this.
    Thanks in advance.
    Regards,
    Rahul Kulkarni

    Hi Rahul,
    You can achieve this by endseperatot "nl"
    If record set structure is * means fine, you just add second line field names by using end separator "nl".
    If you added first line names in recordsetstructure add second line names as well and remaining same use end separator.
    Example (below file is having two lines):
    <NameA>
    name,address,id
    empid,sal,region
    <NameA/>
    your FCC will be (according to your requirement the below 3 fileds will be use full).
    Recordsetstructure  - *
    NameA.fieldvalues - name,address,id
    NameA.endseperator - nl
    NameA.fieldvalues - empid,sal,region
    Thanks & Regards,
    A.Neelima.

  • How to add a new line at the end of eTEXT file

    Hi,
    I have modified the RTF template for the R12.1.3 Positive Pay File report (IBYPOS_PAY_en.rtf). Everything is good, except that the bank requires a "T" (Capital T) character in a new line at the end of the text file. Has any of you came across this before? How do I modify the template to achieve this?
    Thank you,
    Sinan Topuz

    I believe this is related to BI Publisher. Any comments would be greatly appreciated.
    Thanks,
    Sinan

  • How to add EOL(new line char) to JCheckBox's text??

    I need to add new line char to JCheckBox's text.
    I have a string and I am adding new line char("\n") to that. Then I set that string as the text for JCheckBox. But it is not adding a new line. If you know the solution to this problem, please let me know.
    thanks
    amit

    hi artntek,
    thanks works well. However Since I have 3 or 4 lines (might have even more) of text for JCheckBox, JCheckBox is aligned to middle of text. Is there any way to align it with the top of the text??
    amit

  • Add a new line at the begining of a string in a Xquery ALSB3.0

    Has anyone figured out how to Add a new line at the begining of a string in a Xquery in ALSB3.0?
    Thanks for your Help.

    I believe this is related to BI Publisher. Any comments would be greatly appreciated.
    Thanks,
    Sinan

  • How can I add a new line item for production order?

    HI all,
    How can I add a new line item for production order through BAPI/FM? Thanks in advance.

    Hi Mil,
      Unfortunetly SAP is not in front of me.
    But if possible go to BAPI transaction , check for any production order's bapi for CHANGE purpose. Where you will be able to add your new line.
    Reward if useful!

  • How to add a new schedule line?

    Hi folks,
    Please help to tell me is there any user exit can be used for adding a new schedule line? I want to keep the old first date data, add new shedule line with new updated schedule line date. Pls. help to advise how to do it in VA01/VA02 ?
    If i simply use the following update statement in MV45AFZZ, then the first date will be updated by the new Schedule line date, which is not what i want. (Since new order always the First line "0001" will get updated)
    xvbep-edatu = t_temp-edatu .
           modify xvbep TRANSPORTING edatu "UPDKZ
                         where posnr = t_temp-posnr
                           and ETENR = '0002'.
            if SY-SUBRC <> 0.
               modify xvbep TRANSPORTING edatu "UPDKZ
                            where posnr = t_temp-posnr.
            endif.
    Tks,
    Jenny
    Message was edited by:
            Jenny Zhuang

    Hi Ferry,
    Many thanks for the reply. But i still have the question, seems the user exit 'USEREXIT_CHECK_VBEP' in 'MV45AFZB' is used for addtional checks on the schedule line, my questions is how to add a new schedule line? It maybe very difficult. so is it possible to change the configurable Sales order's Finish Date for it's production order, and force it to generate a new schedule line?
    Tks,
    Jenny

  • How do I add a new line to an already open but exhausted PO?

    Hello,
    I am looking for way(s) I can add a new line to an already open  PO, (whose funds are exhausted) to accomodate unplanned expenses related to the same project/vendor.  Is adding a new line to the original purshase requisition the right way to go?
    Thank you
    Fatima
    Edited by: Fatima Imraan on Jul 4, 2008 8:05 PM

    Hi Fatima,
    For unplanned expenses we actually do not need additional line item.
    In case the invoice from vendor shows other expenses then in MIRO there is a TAB for Unplanned Expenses and we can put such expenses there. These expenses should be with in the tolerances limits set. Now if the expenses cross the limit, depending on the settings you have made, the invoice is posted but blocked for payment. Then some one in the approval list should approve the same and the payment can be made.
    This whole process also gets recorded as PO history and hence is very well documented as well
    Normally once a PO is signed it is binding on both parties. So as a Business Process we should not try to add a line item when the PO is exsausted.
    In such case i think it would be a good idea to either create a new PO.
    Some times companies aslo use OPEN PO if it is a year round activity.
    Hope my explanation is useful. assign points if yes.
    Thanks
    Anand

  • Add a New line to ALV Grid control

    Hi experts,
       My requirement is after filling ALV grid, user will select a + button from the menu, I need to add a new line next to the selected ALV line (Like in a table control).  Does it posible to do this? If can any body tell me how I can do this.
    Regards,
    Venkat.

    Hi Venkat...
    I have tried this and it worked...
    Just copy paste this program...
    Note : U will have to create a new PF status for this... and give the Function code as given in my program... then only it will work...
    *& Report  Z_ALV_TRAINING_LIST_EVENTS
    REPORT  Z_ALV_TRAINING_LIST_EVENTS.
    Tables  *************
    TABLES : T001.
    Type Pools Used  **********
    TYPE-POOLS : SLIS.
    Types Declared  **********
    Internal Tables Declare  ************
    DATA : IT_company    TYPE STANDARD TABLE OF T001 INITIAL SIZE 0 WITH HEADER LINE,
           IT_FIELD_CAT  TYPE SLIS_T_FIELDCAT_ALV,
           it_alv_event  type SLIS_T_EVENT.
    Select Data  ***********
    start-of-selection.
    SELECT * FROM T001 INTO TABLE IT_company.
    Make Field Catalog  ******
    PERFORM MAKE_FIELD_CATALOG.
    get evente  *****
    perform get_alv_events.
    Display ALV  *********
    end-of-selection.
    PERFORM DISPLAY_ALV_LIST.
    *&      Form  make_field_catalog
          text
    -->  p1        text
    <--  p2        text
    FORM MAKE_FIELD_CATALOG .
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
      EXPORTING
      I_PROGRAM_NAME               =
      I_INTERNAL_TABNAME           =
       I_STRUCTURE_NAME             = 'T001'
      I_CLIENT_NEVER_DISPLAY       = 'X'
      I_INCLNAME                   =
      I_BYPASSING_BUFFER           =
      I_BUFFER_ACTIVE              =
      CHANGING
        CT_FIELDCAT                  = it_field_cat
    EXCEPTIONS
      INCONSISTENT_INTERFACE       = 1
      PROGRAM_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.
    ENDFORM.                    " make_field_catalog
    *&      Form  display_alv_list
          text
    -->  p1        text
    <--  p2        text
    FORM DISPLAY_ALV_LIST .
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK              = ' '
      I_BYPASSING_BUFFER             =
      I_BUFFER_ACTIVE                = ' '
       I_CALLBACK_PROGRAM             = sy-repid
        I_CALLBACK_PF_STATUS_SET       = 'SET_MY_PF_STATUS'
      I_CALLBACK_USER_COMMAND        = ' '
      I_STRUCTURE_NAME               =
      IS_LAYOUT                      = fl_layout
       IT_FIELDCAT                    = it_field_cat[]
      IT_EXCLUDING                   =
      IT_SPECIAL_GROUPS              =
      IT_SORT                        =
      IT_FILTER                      =
      IS_SEL_HIDE                    =
      I_DEFAULT                      = 'X'
       I_SAVE                         = 'X'
      IS_VARIANT                     = '/TEST_VV'
        IT_EVENTS                      = it_alv_event
      IT_EVENT_EXIT                  =
      IS_PRINT                       =
      IS_REPREP_ID                   =
      I_SCREEN_START_COLUMN          = 0
      I_SCREEN_START_LINE            = 0
      I_SCREEN_END_COLUMN            = 0
      I_SCREEN_END_LINE              = 0
      IR_SALV_LIST_ADAPTER           =
      IT_EXCEPT_QINFO                =
      I_SUPPRESS_EMPTY_DATA          = ABAP_FALSE
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER        =
      ES_EXIT_CAUSED_BY_USER         =
      TABLES
        T_OUTTAB                       = it_company
    EXCEPTIONS
      PROGRAM_ERROR                  = 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.
    ENDFORM.                    " display_alv_list
    *&      Form  get_alv_events
          text
    -->  p1        text
    <--  p2        text
    FORM get_alv_events .
    data : wa type slis_alv_event.
      wa-name = 'USER_COMMAND'.
      wa-form = 'SUB_MY_PF_EVENT'.
      append wa to it_alv_event.
    ENDFORM.                    " get_alv_events
    *&      Form  sub_my_pf_event
          text
    -->  p1        text
    <--  p2        text
    FORM sub_my_pf_event using p_comm type sy-ucomm p_sEL_FIELD TYPE SLIS_SELFIELD.
      data : wa type t001.
      case p_comm.
        when 'BACK'.
          leave program.
        when 'EXIT'.
          leave program.
        when 'NEW'.
          clear wa.
          insert wa into it_company[] index p_sel_field-tabindex.
          PERFORM DISPLAY_ALV_LIST.
      endcase.
    ENDFORM.                    " sub_my_pf_event
    *&      Form  SET_MY_PF_STATUS
          text
    -->  p1        text
    <--  p2        text
    FORM SET_MY_PF_STATUS USING    p_rt_extab TYPE slis_t_extab.
    SET PF-STATUS 'ZALV_STATUS'.
    ENDFORM.                    " SET_MY_PF_STATUS
    Plz award points if this was helpful....

Maybe you are looking for

  • Not Printing Full Image

    Hello, I'm new to prinitng in Java, and I'm trying to simply send the contents of a JTextArea to the printer, but I have two issues with the results that come out of my printer. 1) After hitting the writeButton a few times to create text in the text

  • After updating my iPod touch 3rd generation to IOS5 some default apps are not working (anymore)

    Hi, I updated my iPod touch 3g from IOS 4.x to IOS 5 last week and since then my iPod makes troublle! First of all, during the update I did not see any Problems. After the update, I mean the step where the data will be restored to the iPod, I synchro

  • Saving as PDF in Safari

    I used to be able to use the "Save As" Command to save PDF files that have loaded into Safari. Now with version 4.03 I seem to have lost this capability. If I try to save, it just saves as a WEB-link, not as a PDF file. Any suggestions would be great

  • Attribue UOM in Org model

    Hi My business requirement is that: ' EA' UOM to be defaulted in to the shopping cart. I have throught of UOM as an attribute, and I see that there is no standard SAP supplied a_ttribute. I think of following options: 1. Create a cutomer attribute fo

  • PIDIRUSER - return code 403 Forbidden -

    Hi Guys! When I test my scenario with the Directory test tool I get an error: HTTP Connection to ABAP Runtime failed. Error 403: Forbidden.USER: PIDIRUSER. What could be wrong? From which component is made this connection from? in ABAP Part the user