Adding Data in the grid

One thing I am finding a little awkward; Adding data in the grid. It would be nice to be able to use tab to get to the next cell. At present it just highlights the cell and typing doesn't do anything until the cell is clicked. Equally hitting return I would expect it to give me a new blank row. I would like to be able to add a couple of rows of data without resorting to using the mouse at each turn.
Very good initial impressions though.

Yes we should do this as it's what everyone will expect from Excel.
-kris

Similar Messages

  • How to print the data in the grid?

    Hi all,
    I'm new to java. So, I need some helps.
    I want to print the data in the grid. Data could be more than one page. But I have no idea how to start writing code.
    Please let me know if you know.
    Thank you.
    DT.

    Follow this steps.
    1- the Grid which you wish to print must locate in a class which implements Printable() interface.
    e.g.
    import javax.swing.table.*;
    import java.awt.print.*;
    import javax.infobus.*;
    public class myGridControl extends GridControl implements Printable{
    // add the following statements in the definition section of your class
    int m_maxNumPage =1;
    JTable m_table;
    TableModel m_tableModel;
    ScrollableRowsetAccess myRs;
    // add the folowing statemnts in the
    //constructor or init method or start method
    //(Notice:if you couldn't print, possible
    //you didn't put these stetment on the right
    //location and one or all of them
    //are "null".change the location and make
    //sure they are not null when you issue a
    //print order)
    m_table = new JTable();
    m_table = masterGrid.getTable();
    m_tableModel = m_table.getModel();
    myRs = (ScrollableRowsetAccess)masterGrid.getDataItem();
    3- add following methods to your class(myGridControl). just cut and paste.
    // Print Methods
    public void printData() {
    try {
    PrinterJob prnJob = PrinterJob.getPrinterJob();
    prnJob.setPrintable(this);
    if (!prnJob.printDialog())
    return;
    prnJob.print();
    catch (PrinterException e) {
    e.printStackTrace();
    System.err.println("Printing error: "+e.toString());
    public int print(Graphics pg, PageFormat pageFormat,int pageIndex) throws PrinterException {
    JLabel m_title=new JLabel("Alexus Report : "+titleName);
    if (pageIndex >= m_maxNumPage)
    return NO_SUCH_PAGE;
    pg.translate((int)pageFormat.getImageableX(),
    (int)pageFormat.getImageableY());
    int wPage = 0;
    int hPage = 0;
    if (pageFormat.getOrientation() == pageFormat.PORTRAIT) {
    wPage = (int)pageFormat.getImageableWidth();
    hPage = (int)pageFormat.getImageableHeight();
    else {
    wPage = (int)pageFormat.getImageableWidth();
    wPage += wPage/2;
    hPage = (int)pageFormat.getImageableHeight();
    pg.setClip(0,0,wPage,hPage);
    int y = 0;
    pg.setFont(m_title.getFont());
    pg.setColor(Color.black);
    Font fn = pg.getFont();
    FontMetrics fm = pg.getFontMetrics();
    y += fm.getAscent();
    pg.drawString(m_title.getText(), 0, y);
    y += 20; // space between title and table headers
    Font headerFont = m_table.getFont().deriveFont(Font.BOLD);
    pg.setFont(headerFont);
    fm = pg.getFontMetrics();
    TableColumnModel colModel = m_table.getColumnModel();
    int nColumns = colModel.getColumnCount();
    int x[] = new int[nColumns];
    x[0] = 0;
    int h = fm.getAscent();
    y += h; // add ascent of header font because of baseline
    // positioning (see figure 2.10)
    int nRow, nCol;
    for (nCol=0; nCol<nColumns; nCol++) {
    TableColumn tk = colModel.getColumn(nCol);
    int width = tk.getWidth();
    if (x[nCol] + width > wPage) {
    nColumns = nCol;
    break;
    if (nCol+1<nColumns)
    x[nCol+1] = x[nCol] + width;
    String title = (String)tk.getIdentifier();
    pg.drawString(title, x[nCol], y);
    pg.setFont(m_table.getFont());
    fm = pg.getFontMetrics();
    int header = y;
    h = fm.getHeight();
    int rowH = Math.max((int)(h*1.5), 10);
    int rowPerPage = (hPage-header)/rowH;
    m_maxNumPage = Math.max((int)Math.ceil(m_table.getRowCount()/
    (double)rowPerPage), 1);
    int iniRow = pageIndex*rowPerPage;
    int endRow = Math.min(m_table.getRowCount(),
    iniRow+rowPerPage);
    // take an array to store columns header
    String colNames[] = new String[nColumns];
    for (nCol=0; nCol<nColumns; nCol++) {
    colNames[nCol] = myRs.getColumnName(nCol+1).toString();
    try{
    for (nRow=iniRow; nRow<endRow; nRow++) {
    y += h;
    // set RowSet on the specific row
    myRs.absolute(nRow+1);
    for (nCol=0; nCol<nColumns; nCol++) {
    /* the next 3 lines are old code
    int col = m_table.getColumnModel().getColumn(nCol).getModelIndex();
    Object obj = m_tableModel.getValueAt(nRow, col);
    String str = obj.toString();
    // take the values column by columns
    ImmediateAccess ia = (ImmediateAccess)myRs.getColumnItem(colNames[nCol]);
    String str = ia.getValueAsString();
    if (str.equals("")) str=" ";
    /* this if is usefull if we'd like to have coloring in printing
    if (obj instanceof ColorData)
    pg.setColor(((ColorData)obj).m_color);
    else
    pg.setColor(Color.black);
    pg.drawString(str, x[nCol], y);
    }catch(Exception e){
    e.printStackTrace();
    System.gc();
    return PAGE_EXISTS;
    public void printData() {
    try {
    PrinterJob prnJob = PrinterJob.getPrinterJob();
    prnJob.setPrintable(this);
    if (!prnJob.printDialog())
    return;
    prnJob.print();
    catch (PrinterException e) {
    e.printStackTrace();
    System.err.println("Printing error: "+e.toString());
    public int print(Graphics pg, PageFormat pageFormat,int pageIndex) throws PrinterException {
    JLabel m_title=new JLabel("Alexus Report : "+titleName);
    if (pageIndex >= m_maxNumPage)
    return NO_SUCH_PAGE;
    pg.translate((int)pageFormat.getImageableX(),
    (int)pageFormat.getImageableY());
    int wPage = 0;
    int hPage = 0;
    if (pageFormat.getOrientation() == pageFormat.PORTRAIT) {
    wPage = (int)pageFormat.getImageableWidth();
    hPage = (int)pageFormat.getImageableHeight();
    else {
    wPage = (int)pageFormat.getImageableWidth();
    wPage += wPage/2;
    hPage = (int)pageFormat.getImageableHeight();
    pg.setClip(0,0,wPage,hPage);
    int y = 0;
    pg.setFont(m_title.getFont());
    pg.setColor(Color.black);
    Font fn = pg.getFont();
    FontMetrics fm = pg.getFontMetrics();
    y += fm.getAscent();
    pg.drawString(m_title.getText(), 0, y);
    y += 20; // space between title and table headers
    Font headerFont = m_table.getFont().deriveFont(Font.BOLD);
    pg.setFont(headerFont);
    fm = pg.getFontMetrics();
    TableColumnModel colModel = m_table.getColumnModel();
    int nColumns = colModel.getColumnCount();
    int x[] = new int[nColumns];
    x[0] = 0;
    int h = fm.getAscent();
    y += h; // add ascent of header font because of baseline
    // positioning (see figure 2.10)
    int nRow, nCol;
    for (nCol=0; nCol<nColumns; nCol++) {
    TableColumn tk = colModel.getColumn(nCol);
    int width = tk.getWidth();
    if (x[nCol] + width > wPage) {
    nColumns = nCol;
    break;
    if (nCol+1<nColumns)
    x[nCol+1] = x[nCol] + width;
    String title = (String)tk.getIdentifier();
    pg.drawString(title, x[nCol], y);
    pg.setFont(m_table.getFont());
    fm = pg.getFontMetrics();
    int header = y;
    h = fm.getHeight();
    int rowH = Math.max((int)(h*1.5), 10);
    int rowPerPage = (hPage-header)/rowH;
    m_maxNumPage = Math.max((int)Math.ceil(m_table.getRowCount()/
    (double)rowPerPage), 1);
    int iniRow = pageIndex*rowPerPage;
    int endRow = Math.min(m_table.getRowCount(),
    iniRow+rowPerPage);
    // take an array to store columns header
    String colNames[] = new String[nColumns];
    for (nCol=0; nCol<nColumns; nCol++) {
    colNames[nCol] = myRs.getColumnName(nCol+1).toString();
    try{
    for (nRow=iniRow; nRow<endRow; nRow++) {
    y += h;
    // set RowSet on the specific row
    myRs.absolute(nRow+1);
    for (nCol=0; nCol<nColumns; nCol++) {
    /* the next 3 lines are old code
    int col = m_table.getColumnModel().getColumn(nCol).getModelIndex();
    Object obj = m_tableModel.getValueAt(nRow, col);
    String str = obj.toString();
    // take the values column by columns
    ImmediateAccess ia = (ImmediateAccess)myRs.getColumnItem(colNames[nCol]);
    String str = ia.getValueAsString();
    if (str.equals("")) str=" ";
    /* this if is usefull if we'd like to have coloring in printing
    if (obj instanceof ColorData)
    pg.setColor(((ColorData)obj).m_color);
    else
    pg.setColor(Color.black);
    pg.drawString(str, x[nCol], y);
    }catch(Exception e){
    e.printStackTrace();
    System.gc();
    return PAGE_EXISTS;
    4- execute printData() method to print.
    e.g. myGridControl.printData();
    let me know if you still cannot print.
    Ali

  • LOV does not show newly added data in the same session

    Hi guys,
    I work with JDeveloper 11g Release 2. We use Oracle ADF to develop our web app.
    In a page we have a LOV (say the page name is "a"). The related data for that LOV is inserted to the db in another page ( say the page name is "b").
    When new data is added in the page "b" and goes directly to the page "a" the LOV does not show newly added data. But if the user log out and log in again
    LOV shows newly added data correctly.
    Is there a way to show the newly added data in the same session without logging out? Please help.
    Regards !
    Sameera.

    Add the following method in your ViewRowImpl base class:
    public void refreshLOVAccessorQueries() {
        List lovs = getViewDef().getListBindingDefs();
         if (lovs != null) {
             for (Object obj : lovs) {
                getListBindingRSI((ListBindingDef)obj).getRowSet().executeQuery();
                 ListBindingDef lbd = (ListBindingDef)obj;
    Export that method to the Row Client interface, add him to the pageDef, and invoke in the executables section of the pageDef:
        <executables>
    <invokeAction Binds="refreshLOVAccessorQueries" id="callRefreshLOVs"
    RefreshCondition="#{!requestContext.postback and empty bindings.exceptionList}"/>
       </executables>

  • Adding data to the formula log or package log

    Is it possible to add data to the package or formula log?
    I have create a package to load and process a file into a dimension file, but there is also transformation and record checking in the package, so it is possible records will be rejected (duplicate ID or non existent parent member).
    I store these values in a seperate table in the SQL database, so the records are available.
    Is it possible to add this data in the log file so it can be viewed from the view status in datamanager?
    Regards,
    Tim Vierhout
    Edited by: Tim Vierhout on Dec 8, 2009 10:22 AM

    Hi Tim,
    You can try to use the %LOGTABLE% parameter in the scrip logic call. In SQL, the BPC log is a temporally SQL table with one field called MSG, so if in you package you pass this parameter to the SQL procedure where you store the duplicates, so you can insert this records to LOGTABLE and then you will get this back in BPC as part of the log.
    Hope this helps,
    Let me know if need more help on this,
    Regards,
    Carlos.

  • Adding data into the InfoCube

    i have follow a step by step guide to do this BI solution but i can load the data into the info. is there any way to load data into the info cube?? thanks for your help.

    Hi,
    Please follow the below steps to load your data
    Here are the steps,
    1.Open Administrator Workbench: Modeling, from the menu or using the transaction RSA1
    2.Go to Source Systems (File)and Create a new System.
    3. Double click on the datasources, create data source
    4.Entitle the Datasource, choose Transaction Data as Data Type Datasource
    5. In next screen, Go to Extraction , Activate the data source
    6.Go to Preview. Press Read Preview Data.
    7.Data will be loaded: Save and activate the datasource
    8.Go to InfoProvider, go to Info area and create Infocube
    9.Entitle the infocube, press create
    10.Display all info objects: . Choose your info objects ,Move the characteristics and key figure to the infocube by drag and drop adn activate
    11.Go to InfoCube, create transformation
    12.Click on the ‘Show Navigator’ button. Match the fields in navigator. Save and activate.
    13.go to info provider, your info cube, create data transfer process
    14.Choose: Extraction Mode: full
    Update: Valid records update, Reporting possible (Request green)
    Activate, execute
    14.Double click on the data source, Read Preview Data
    15.Create an InfoPackage by right clicking on the datasource. Execute the load into PSA.
    16.Verify data was loaded into PSA before proceeding with the next step.
    17. Execute the Data Transfer Process
    18.Monitor the results (Menu: GoTo: DTP Monitor)
    19.Try to display the data at the BW Frontend.
    Hope this is helpfull.
    Harish

  • Adding Data to the database for SAP Transactions

    Hi
    I'm new to the whole ABAP. I would like to enquire about adding transaction data in SAP through ABAP but it must be immediate.
    I know that one can use a BAPI to add data and can rollback if any problems occur.
    But if no BAPI exists how does one write code to add a document to the SAP database but with everything SAP transaction requires like the BAPI. What is the process and how???
    So let say I wanted to do FB01 which is SAP FI document and must be immediate. There is a BAPI that exists for it but if there was not one how would I do this???
    I know one can also use BDC but that creates a batch and then needs to be executed in SM35, I want a way to add data for two or three SAP transactions, if any problems occur with any of the steps rollback everything else commit everything to the database.
    Any simple detail examples (code) that satisfy the above will be greatly appreciated and REWARDED.
    Thanks in advance

    Luis,
    i have a code exactly same BDC for FB01.
    refer:
    REPORT z_etching_fb01
           NO STANDARD PAGE HEADING LINE-SIZE 255.
    *etching invoice load
    INCLUDE bdcrecx1.
    TYPE-POOLS: truxs , slis.
    *PARAMETERS: dataset(132) LOWER CASE DEFAULT
    *                              'c:\temp\etchingload.txt'.
    PARAMETER: pfile LIKE rlgrap-filename." OBLIGATORY.
    SELECTION-SCREEN BEGIN OF BLOCK a WITH FRAME TITLE text-001.
    PARAMETER:    p_kunnr LIKE kna1-kunnr OBLIGATORY,           "kna1-kunnr
                  p_bukrs LIKE bseg-bukrs,
                  p_mwskz LIKE t007a-mwskz OBLIGATORY,"t007a-mwskz
                  p_prctr LIKE cepc-prctr OBLIGATORY,"cepc-prctr
    *            p_newko LIKE ska1-saknr OBLIGATORY DEFAULT 41000000,"
                p_budat LIKE bkpf-budat OBLIGATORY ,
                p_hkont LIKE bseg-hkont OBLIGATORY DEFAULT 41000000 ,
                p_waers TYPE waers OBLIGATORY DEFAULT 'GBP'."tcurr-waers
    SELECTION-SCREEN END OF BLOCK a.
    SELECTION-SCREEN BEGIN OF BLOCK b WITH FRAME TITLE text-002.
    PARAMETER : report AS CHECKBOX DEFAULT 'X'.
    SELECTION-SCREEN END OF BLOCK b.
    ***    DO NOT CHANGE - the generated data section - DO NOT CHANGE    ***
    *   If it is nessesary to change the data section use the rules:
    *   1.) Each definition of a field exists of two lines
    *   2.) The first line shows exactly the comment
    *       '* data element: ' followed with the data element
    *       which describes the field.
    *       If you don't have a data element use the
    *       comment without a data element name
    *   3.) The second line shows the fieldname of the
    *       structure, the fieldname must consist of
    *       a fieldname and optional the character '_' and
    *       three numbers and the field length in brackets
    *   4.) Each field must be type C.
    *** Generated data section with specific formatting - DO NOT CHANGE  ***
    *                          ALV                                           *
    DATA: it_fieldcat     TYPE    slis_t_fieldcat_alv,
          wa_fieldcat     LIKE    LINE OF it_fieldcat,
          it_top_of_page  TYPE    slis_t_listheader,
          ls_layout       TYPE    slis_layout_alv,
          gt_events       TYPE    slis_t_event.
    DATA: it_raw TYPE truxs_t_text_data.
    DATA: BEGIN OF record,
    * data element: BLDAT
            bldat_001(010),   "Invoice Date
    * data element: BLART
            blart_002(002),   " Doc Type DR or DG if credit
    * data element: BUKRS
            bukrs_003(004),   " Company Code
    * data element: BUDAT
            budat_004(010),   "Posting Date
    * data element: MONAT
            monat_005(002),   "period"
    * data element: WAERS
            waers_006(005),   "Currency
    * data element: XBLNR1
            xblnr_007(016),   "Invoice Number
    * data element: BKTXT
            bktxt_008(025),   "PO number
    * data element: SAEOBJART
            docid_009(010),
    * data element: NEWBS
            newbs_010(002),   "posting Key
    * data element: NEWKO
            newko_011(017),   "Customer number or GL account
    * data element: WRBTR
            wrbtr_012(016),   "Amount
    * data element: DZTERM
            zterm_013(004),
    * data element: DZBD1T
            zbd1t_014(003),
    * data element: DZFBDT
            zfbdt_015(010),
    * data element: DZUONR
            zuonr_016(018),   "Invoice Number
    * data element: SGTXT
            sgtxt_017(050),   " PO number
    * data element: NEWBS
            newbs_018(002),
    * data element: NEWKO
            newko_019(017),   "GL Account
    * data element: WRBTR
            wrbtr_020(016),   "Amount
    * data element: MWSKZ
            mwskz_021(002),   "Tax
    * data element: DZUONR
            zuonr_022(018),   "Invoice Number
    * data element: SGTXT
            sgtxt_023(050),   "PO Number
    * data element: PRCTR
            prctr_024(010),   "Profit Center
    * data element: WRBTR
            wrbtr_025(016),   " Amount
    * data element: MWSKZ
            mwskz_026(002),   "Tax
    * data element: DZUONR
            zuonr_027(018),   "Invoice Number
    * data element: SGTXT
            sgtxt_028(050),   "PO Number
    * data element: FMORE
            fmore_029(001),
    * data element: PRCTR
            prctr_030(010),   "Pr Center
    * data element: FWSTE
            fwste_01_031(016),
          END OF record.
    DATA: BEGIN OF it_excel OCCURS 0,
    * data element: XBLNR1
          xblnr_007(016),   "Invoice Number
    * data element: BLDAT
          bldat_001(010),   "Invoice Date
    * data element: WRBTR
          wrbtr_012(016),   "Amount
    * data element: WRBTR
          wrbtr_025(016),   " Tax Amount
    * data element: WRBTR
          wrbtr_020(016),   "Gross Amount
    * data element: BLART
          blart_002(002),   " No of units
    * data element: MONAT
          monat_005(002),   "No of units second test"
    * data element: BKTXT
            bktxt_008(025),   "PO number
    * data element: SGTXT
          sgtxt_017(050),   " PO number
    * data element: BUKRS
          bukrs_003(004),   " Company Code
    * data element: BUDAT
          budat_004(010),   "Posting Date
    *        budat_004 TYPE string,   "Posting Date
    * data element: WAERS
          waers_006(005),   "Currency*
    * data element: NEWKO
          newko_011(017),   "Customer number or GL account
    * data element : kunnr
          kunnr_019(010),   " customer
          mwskz(002),
         prctr(010),
          date(002),
          month(002),
    ** data element: BKTXT
    *      bktxt_008(025),   "PO number
    ** data element: SAEOBJART
    *      docid_009(010),
    ** data element: NEWBS
    *      newbs_010(002),   "posting Key
    ** data element: DZTERM
    *      zterm_013(004),
    ** data element: DZBD1T
    *      zbd1t_014(003),
    ** data element: DZFBDT
    *      zfbdt_015(010),
    ** data element: DZUONR
    *      zuonr_016(018),   "Invoice Number
    ** data element: NEWBS
    *      newbs_018(002),
    ** data element: NEWKO
    *      newko_019(017),   "GL Account
    ** data element: MWSKZ
    *      mwskz_021(002),   "Tax
    ** data element: DZUONR
    *      zuonr_022(018),   "Invoice Number
    ** data element: SGTXT
    *      sgtxt_023(050),   "PO Number
    ** data element: PRCTR
    *      prctr_024(010),   "Profit Center
    ** data element: MWSKZ
    *      mwskz_026(002),   "Tax
    ** data element: DZUONR
    *      zuonr_027(018),   "Invoice Number
    ** data element: SGTXT
    *      sgtxt_028(050),   "PO Number
    ** data element: FMORE
    *      fmore_029(001),
    ** data element: PRCTR
    *      prctr_030(010),   "Pr Center
    ** data element: FWSTE
    *      fwste_01_031(016),
        END OF it_excel.
    DATA : BEGIN OF it_bkpf OCCURS 0,
            belnr LIKE bkpf-belnr,
            budat LIKE bkpf-budat,
            bldat LIKE bkpf-bldat,
            xblnr LIKE bkpf-xblnr,
            bktxt LIKE bkpf-bktxt,
            total LIKE bseg-dmbtr,
            numdocs TYPE p DECIMALS 0,
            END OF it_bkpf,
            BEGIN OF it_bseg OCCURS 0,
              belnr LIKE bseg-belnr,
              dmbtr LIKE bseg-dmbtr,
              mwsts LIKE bseg-mwsts,
              pswsl LIKE bseg-pswsl,
              END OF it_bseg,
              BEGIN OF it_final OCCURS 0,
                belnr LIKE bkpf-belnr,
                budat LIKE bkpf-budat,
                bldat LIKE bkpf-bldat,
                xblnr LIKE bkpf-xblnr,
                bktxt LIKE bkpf-bktxt,
                dmbtr LIKE bseg-dmbtr,
                mwsts LIKE bseg-mwsts,
                pswsl LIKE bseg-pswsl,
                END OF it_final.
    ***** End generated data section ***
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR pfile.
      PERFORM sub_browse_file. "Get file name
    START-OF-SELECTION.
      PERFORM sub_data_load.  " Transfer excel into internal table.
      PERFORM sub_calc_excel.
      IF report = 'X'.
    *    PERFORM data_selection.
    *    PERFORM data_move.
    *********************************GET ALV  DATA
        PERFORM alv_get_data.
    *********************************ALV GRID DATA
        PERFORM alv_grid.
      ENDIF.
    *if report = ''.
    *  PERFORM write.
    *  PERFORM open_dataset USING dataset.
      PERFORM open_group.
    *  DO.
    *    READ DATASET dataset INTO record.
      LOOP AT it_excel.
    *   IF sy-subrc <> 0. EXIT. ENDIF.
        PERFORM bdc_dynpro      USING 'SAPMF05A' '0100'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RF05A-NEWKO'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'BKPF-BLDAT'
                                      it_excel-bldat_001.
        PERFORM bdc_field       USING 'BKPF-BLART'
                                      'DR'." record-blart_002.
        PERFORM bdc_field       USING 'BKPF-BUKRS'
                                      it_excel-bukrs_003.
        PERFORM bdc_field       USING 'BKPF-BUDAT'
                                      it_excel-budat_004.
        PERFORM bdc_field       USING 'BKPF-MONAT'
                                    '3'. "record-monat_005.
        PERFORM bdc_field       USING 'BKPF-WAERS'
                                      it_excel-waers_006.
        PERFORM bdc_field       USING 'BKPF-XBLNR'
                                      it_excel-xblnr_007.
        PERFORM bdc_field       USING 'BKPF-BKTXT'
                                      it_excel-bktxt_008.
        PERFORM bdc_field       USING 'FS006-DOCID'
                                     '*' ."record-docid_009.
        PERFORM bdc_field       USING 'RF05A-NEWBS'
                                    '01'." record-newbs_010.
        PERFORM bdc_field       USING 'RF05A-NEWKO'
                                    it_excel-kunnr_019  .
        PERFORM bdc_dynpro      USING 'SAPMF05A' '0301'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'RF05A-NEWKO'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'BSEG-WRBTR'
                                    it_excel-wrbtr_020."  it_excel-wrbtr_012.
        PERFORM bdc_field       USING 'BSEG-ZTERM'
                                      'NT30' ."  record-zterm_013.
        PERFORM bdc_field       USING 'BSEG-ZBD1T'
                                      '30'."record-zbd1t_014.
        PERFORM bdc_field       USING 'BSEG-ZFBDT'
                                      it_excel-bldat_001."record-zfbdt_015.
        PERFORM bdc_field       USING 'BSEG-ZUONR'
                                      it_excel-xblnr_007."record-zuonr_016.
        PERFORM bdc_field       USING 'BSEG-SGTXT'
                                      it_excel-sgtxt_017.
        PERFORM bdc_field       USING 'RF05A-NEWBS'
                                     '50'." record-newbs_018.
        PERFORM bdc_field       USING 'RF05A-NEWKO'
                                   it_excel-newko_011."  record-newko_019."Gl account
        PERFORM bdc_dynpro      USING 'SAPMF05A' '0300'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'BSEG-SGTXT'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '/00'.
        PERFORM bdc_field       USING 'BSEG-WRBTR'
                                      it_excel-wrbtr_012."changes from 12 to 20
        PERFORM bdc_field       USING 'BSEG-MWSKZ'
                                     it_excel-mwskz." record-mwskz_021.
        PERFORM bdc_field       USING 'BSEG-ZUONR'
                                    it_excel-xblnr_007."  record-zuonr_022.
        PERFORM bdc_field       USING 'BSEG-SGTXT'
                                     it_excel-sgtxt_017."  record-sgtxt_023.
        PERFORM bdc_dynpro      USING 'SAPLKACB' '0002'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'COBL-PRCTR'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=ENTE'.
        PERFORM bdc_field       USING 'COBL-PRCTR'
                                    it_excel-prctr ." record-prctr_024.
        PERFORM bdc_dynpro      USING 'SAPMF05A' '0300'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'BSEG-WRBTR'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=STER'.
        PERFORM bdc_field       USING 'BSEG-WRBTR'
                                     it_excel-wrbtr_012." it_excel-wrbtr_025.
        PERFORM bdc_field       USING 'BSEG-MWSKZ'
                                      it_excel-mwskz.
        PERFORM bdc_field       USING 'BSEG-ZUONR'
                                     it_excel-xblnr_007." record-zuonr_027.
        PERFORM bdc_field       USING 'BSEG-SGTXT'
                                     it_excel-sgtxt_017." record-sgtxt_028.
        PERFORM bdc_field       USING 'DKACB-FMORE'
                                     'X' ."record-fmore_029.
        PERFORM bdc_dynpro      USING 'SAPLKACB' '0002'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'COBL-PARGB'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=ENTE'.
        PERFORM bdc_field       USING 'COBL-PRCTR'
                                     it_excel-prctr." record-prctr_030.
        PERFORM bdc_dynpro      USING 'SAPLTAX1' '0300'.
        PERFORM bdc_field       USING 'BDC_CURSOR'
                                      'BSET-FWSTE(01)'.
        PERFORM bdc_field       USING 'BDC_OKCODE'
                                      '=GOBU'.
        PERFORM bdc_field       USING 'BSET-FWSTE(01)'
                                    it_excel-wrbtr_025."  record-fwste_01_031.
        PERFORM bdc_transaction USING 'FB01'.
        REFRESH:bdcdata,messtab.
      ENDLOOP.
      REFRESH:bdcdata.
    **    PERFORM bdc_dynpro      USING 'SAPMF05A' '0100'.
    *    PERFORM bdc_field       USING 'BDC_CURSOR'
    *                                  'RF05A-NEWKO'.
    *    PERFORM bdc_field       USING 'BDC_OKCODE'
    *                                  '/00'.
    *    PERFORM bdc_field       USING 'BKPF-BLDAT'
    *                                  record-bldat_001.
    *    PERFORM bdc_field       USING 'BKPF-BLART'
    *                                  record-blart_002.
    *    PERFORM bdc_field       USING 'BKPF-BUKRS'
    *                                  record-bukrs_003.
    *    PERFORM bdc_field       USING 'BKPF-BUDAT'
    *                                  record-budat_004.
    *    PERFORM bdc_field       USING 'BKPF-MONAT'
    *                                  record-monat_005.
    *    PERFORM bdc_field       USING 'BKPF-WAERS'
    *                                  record-waers_006.
    *    PERFORM bdc_field       USING 'BKPF-XBLNR'
    *                                  record-xblnr_007.
    *    PERFORM bdc_field       USING 'BKPF-BKTXT'
    *                                  record-bktxt_008.
    *    PERFORM bdc_field       USING 'FS006-DOCID'
    *                                  record-docid_009.
    *    PERFORM bdc_field       USING 'RF05A-NEWBS'
    *                                  record-newbs_010.
    *    PERFORM bdc_field       USING 'RF05A-NEWKO'
    *                                  record-newko_011.
    *    PERFORM bdc_dynpro      USING 'SAPMF05A' '0301'.
    *    PERFORM bdc_field       USING 'BDC_CURSOR'
    *                                  'RF05A-NEWKO'.
    *    PERFORM bdc_field       USING 'BDC_OKCODE'
    *                                  '/00'.
    *    PERFORM bdc_field       USING 'BSEG-WRBTR'
    *                                  record-wrbtr_012.
    *    PERFORM bdc_field       USING 'BSEG-ZTERM'
    *                                  record-zterm_013.
    *    PERFORM bdc_field       USING 'BSEG-ZBD1T'
    *                                  record-zbd1t_014.
    *    PERFORM bdc_field       USING 'BSEG-ZFBDT'
    *                                  record-zfbdt_015.
    *    PERFORM bdc_field       USING 'BSEG-ZUONR'
    *                                  record-zuonr_016.
    *    PERFORM bdc_field       USING 'BSEG-SGTXT'
    *                                  record-sgtxt_017.
    *    PERFORM bdc_field       USING 'RF05A-NEWBS'
    *                                  record-newbs_018.
    *    PERFORM bdc_field       USING 'RF05A-NEWKO'
    *                                  record-newko_019.
    *    PERFORM bdc_dynpro      USING 'SAPMF05A' '0300'.
    *    PERFORM bdc_field       USING 'BDC_CURSOR'
    *                                  'BSEG-SGTXT'.
    *    PERFORM bdc_field       USING 'BDC_OKCODE'
    *                                  '/00'.
    *    PERFORM bdc_field       USING 'BSEG-WRBTR'
    *                                  record-wrbtr_020.
    *    PERFORM bdc_field       USING 'BSEG-MWSKZ'
    *                                  record-mwskz_021.
    *    PERFORM bdc_field       USING 'BSEG-ZUONR'
    *                                  record-zuonr_022.
    *    PERFORM bdc_field       USING 'BSEG-SGTXT'
    *                                  record-sgtxt_023.
    *    PERFORM bdc_dynpro      USING 'SAPLKACB' '0002'.
    *    PERFORM bdc_field       USING 'BDC_CURSOR'
    *                                  'COBL-PRCTR'.
    *    PERFORM bdc_field       USING 'BDC_OKCODE'
    *                                  '=ENTE'.
    *    PERFORM bdc_field       USING 'COBL-PRCTR'
    *                                  record-prctr_024.
    *    PERFORM bdc_dynpro      USING 'SAPMF05A' '0300'.
    *    PERFORM bdc_field       USING 'BDC_CURSOR'
    *                                  'BSEG-WRBTR'.
    *    PERFORM bdc_field       USING 'BDC_OKCODE'
    *                                  '=STER'.
    *    PERFORM bdc_field       USING 'BSEG-WRBTR'
    *                                  record-wrbtr_025.
    *    PERFORM bdc_field       USING 'BSEG-MWSKZ'
    *                                  record-mwskz_026.
    *    PERFORM bdc_field       USING 'BSEG-ZUONR'
    *                                  record-zuonr_027.
    *    PERFORM bdc_field       USING 'BSEG-SGTXT'
    *                                  record-sgtxt_028.
    *    PERFORM bdc_field       USING 'DKACB-FMORE'
    *                                  record-fmore_029.
    *    PERFORM bdc_dynpro      USING 'SAPLKACB' '0002'.
    *    PERFORM bdc_field       USING 'BDC_CURSOR'
    *                                  'COBL-PARGB'.
    *    PERFORM bdc_field       USING 'BDC_OKCODE'
    *                                  '=ENTE'.
    *    PERFORM bdc_field       USING 'COBL-PRCTR'
    *                                  record-prctr_030.
    *    PERFORM bdc_dynpro      USING 'SAPLTAX1' '0300'.
    *    PERFORM bdc_field       USING 'BDC_CURSOR'
    *                                  'BSET-FWSTE(01)'.
    *    PERFORM bdc_field       USING 'BDC_OKCODE'
    *                                  '=GOBU'.
    *    PERFORM bdc_field       USING 'BSET-FWSTE(01)'
    *                                  record-fwste_01_031.
    *    PERFORM bdc_transaction USING 'FB01'.
    *  ENDDO.
      PERFORM close_group.
    *  PERFORM close_dataset USING dataset.
    *endif.
    *&      Form  sub_browse_file
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM sub_browse_file .
      CALL FUNCTION 'F4_FILENAME'
       EXPORTING
         program_name        = syst-cprog
         dynpro_number       = syst-dynnr
    *   FIELD_NAME          = ' '
       IMPORTING
         file_name           = pfile.
    ENDFORM.                    " sub_browse_file
    *&      Form  sub_data_load
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM sub_data_load .
      CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
        EXPORTING
    *     I_FIELD_SEPERATOR          =
          i_line_header              = 'X'
          i_tab_raw_data             = it_raw
          i_filename                 = pfile
        TABLES
          i_tab_converted_data       = it_excel[]
    *   EXCEPTIONS
    *     CONVERSION_FAILED          = 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.                    " sub_data_load
    **&      Form  data_selection
    **       text
    **  -->  p1        text
    **  <--  p2        text
    *FORM data_selection .
    *  SELECT * FROM bkpf
    *      INTO CORRESPONDING FIELDS OF TABLE it_bkpf
    *      WHERE budat = p_budat AND
    *      bukrs = p_bukrs.
    *  IF NOT it_bkpf[] IS INITIAL.
    *    SELECT belnr dmbtr mwsts pswsl
    *        FROM bseg INTO TABLE it_bseg
    *        FOR ALL ENTRIES IN it_bkpf
    *        WHERE belnr = it_bkpf-belnr AND
    *        kunnr = p_kunnr AND
    *        hkont = p_hkont AND
    *        pswsl = p_waers.
    *  ENDIF.
    *ENDFORM.                    " data_selection
    **&      Form  data_move
    **       text
    **  -->  p1        text
    **  <--  p2        text
    *FORM data_move.
    *  SORT : it_bseg BY belnr,
    *          it_bkpf BY belnr.
    *  LOOP AT it_bseg.
    *    it_final-dmbtr = it_bseg-dmbtr.
    *    it_final-belnr = it_bseg-belnr.
    *    it_final-mwsts = it_bseg-mwsts.
    *    it_final-pswsl = it_bseg-pswsl.
    *    READ TABLE it_bkpf WITH KEY belnr = it_bseg-belnr BINARY SEARCH.
    *    IF sy-subrc = 0.
    *      it_final-budat = it_bkpf-budat.
    *      it_final-bldat = it_bkpf-bldat.
    *      it_final-xblnr = it_bkpf-xblnr.
    *      it_final-bktxt = it_bkpf-bktxt.
    *    ENDIF.
    *    APPEND it_final.
    *    CLEAR it_final.
    *  ENDLOOP.
    *ENDFORM.                    " data_move
    *&      Form  alv_get_data
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM alv_get_data .
      CLEAR it_fieldcat.
    ***************** Document number
    *  wa_fieldcat-col_pos    = '1'.                    " ALV O/P COL-1
      wa_fieldcat-fieldname  = 'XBLNR_007'.
      wa_fieldcat-seltext_m  = 'Document number'.
      wa_fieldcat-just       = 'L'.
      wa_fieldcat-no_zero(1) = 'X'.
      wa_fieldcat-outputlen  = 15.
      wa_fieldcat-tabname    = 'IT_EXCEL'.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    ***************** Posting Date
    *  wa_fieldcat-col_pos    = '2'.                    " ALV O/P COL-1
      wa_fieldcat-fieldname  = 'BUDAT_004'.
      wa_fieldcat-seltext_m  = 'Posting Date'.
      wa_fieldcat-just       = 'L'.
      wa_fieldcat-no_zero(1) = 'X'.
      wa_fieldcat-outputlen  = 20.
      wa_fieldcat-tabname    = 'IT_EXCEL'.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    ******************** Document Date
    *  wa_fieldcat-col_pos    = '3'.                     " ALV O/P COL-2
      wa_fieldcat-fieldname  = 'BLDAT_001'.
      wa_fieldcat-seltext_m  = 'Document Date'.
      wa_fieldcat-just       = 'L'.
      wa_fieldcat-tabname    = 'IT_EXCEL'.
      wa_fieldcat-outputlen  = 15.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    ********************* REFERENCE DOCUMENT
    **  wa_fieldcat-col_pos    = '4'.                     " ALV O/P COL-2
    *  wa_fieldcat-fieldname  = 'XBLNR'.
    *  wa_fieldcat-seltext_m  = 'REFERENCE DOCUMENT'.
    *  wa_fieldcat-just       = 'L'.
    *  wa_fieldcat-tabname    = 'IT_EXCEL'.
    **  wa_fieldcat-outputlen  = 15.
    *  APPEND wa_fieldcat TO it_fieldcat.
    *  CLEAR wa_fieldcat.
    ***************** DOCUMENT HEADER TEXT
    *  wa_fieldcat-col_pos    = '5'.                     " ALV O/P COL-3
      wa_fieldcat-fieldname  = 'SGTXT_017'.
      wa_fieldcat-seltext_m  = 'DOCUMENT HEADER TEXT'.
      wa_fieldcat-just       = 'L'.
      wa_fieldcat-tabname    = 'IT_EXCEL'.
    *  wa_fieldcat-outputlen  = 15.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    *******************Invoice Net amount
    *  wa_fieldcat-col_pos    = '6'.                     " ALV O/P COL-4
      wa_fieldcat-fieldname  = 'WRBTR_012'.
      wa_fieldcat-seltext_m  = 'Invoice Net amount'.
      wa_fieldcat-just       = 'L'.
      wa_fieldcat-tabname    = 'IT_EXCEL'.
    *  wa_fieldcat-outputlen  = 15.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    *********** Tax Amount
    *  wa_fieldcat-col_pos    = '7'.                     " ALV O/P COL-5
      wa_fieldcat-fieldname  = 'WRBTR_025'.
      wa_fieldcat-seltext_m  = 'Tax Amount'.
      wa_fieldcat-just       = 'L'.
    * wa_fieldcat-no_zero(1) = 'X'.
      wa_fieldcat-tabname    = 'IT_EXCEL'.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    *********** NEt Amount
    *  wa_fieldcat-col_pos    = '7'.                     " ALV O/P COL-5
      wa_fieldcat-fieldname  = 'WRBTR_020'.
      wa_fieldcat-seltext_m  = 'Net Amount'.
      wa_fieldcat-just       = 'L'.
    * wa_fieldcat-no_zero(1) = 'X'.
      wa_fieldcat-tabname    = 'IT_EXCEL'.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    *********** General ledger currency
    *  wa_fieldcat-col_pos    = '7'.                     " ALV O/P COL-5
      wa_fieldcat-fieldname  = 'WAERS_006'.
      wa_fieldcat-seltext_l  = 'General ledger currency'.
      wa_fieldcat-just       = 'L'.
    * wa_fieldcat-no_zero(1) = 'X'.
      wa_fieldcat-outputlen  = 25.
      wa_fieldcat-tabname    = 'IT_EXCEL'.
      APPEND wa_fieldcat TO it_fieldcat.
      CLEAR wa_fieldcat.
    ENDFORM.                    " alv_get_data
    *&      Form  alv_grid
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM alv_grid .
    *  PERFORM fill_list_header USING it_top_of_page[].
    *  PERFORM event-build USING gt_events[].
      PERFORM fill_layout USING ls_layout.
    MESSAGE 'Please press F3 to generate a session or call transaction method after getting report!' TYPE 'I'.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program = sy-repid
          is_layout          = ls_layout
          it_fieldcat        = it_fieldcat
          it_events          = gt_events[]
          i_save             = 'A'
        TABLES
          t_outtab           = it_excel
        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.                    " alv_grid
    *                                     FORM FILL_LAYOUT                      *
    FORM fill_layout  USING    p_ls_layout  TYPE slis_layout_alv.
      p_ls_layout-zebra       = 'X'.
      p_ls_layout-cell_merge  = 'X'.
    ENDFORM.                                                         "fill_layout
    *&      Form  sub_calc_excel
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM sub_calc_excel .
          data: idate TYPE sy-datum,
              tdat8 type string.
      LOOP AT it_excel.
        CONCATENATE  it_excel-blart_002 '/' it_excel-monat_005 '/' it_excel-bktxt_008 INTO
            it_excel-sgtxt_017.
        it_excel-bukrs_003 = p_bukrs.
    *    it_excel-budat_004 = p_budat.
        it_excel-waers_006 = p_waers.
        it_excel-newko_011 = p_hkont.
        it_excel-kunnr_019 = p_kunnr.
        it_excel-mwskz     = p_mwskz.
        it_excel-prctr     = p_prctr.
        idate              = p_budat.
        CALL FUNCTION 'DATUMSAUFBEREITUNG'
         EXPORTING
    *       FLAGM                 = ' '
    *       FLAGW                 = ' '
           IDATE                 = idate
    *       IMONT                 = ' '
    *       IWEEK                 = ' '
         IMPORTING
    *       MDAT4                 =
    *       MDAT6                 =
    *       TDAT4                 =
    *       TDAT6                 =
            TDAT8                 = tdat8
    *       WDAT4                 =
    *       WDAT6                 =
    *     EXCEPTIONS
    *       DATFM_UNGUELTIG       = 1
    *       DATUM_UNGUELTIG       = 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.
          it_excel-budat_004 = tdat8.
    *    CONCATENATE it_excel-budat_004+4(2) '/' it_excel-budat_004+6(2) '/'  it_excel-budat_004+0(4)
    *                INTO it_excel-budat_004.
    *    SPLIT it_excel-bldat_001 AT '/' INTO it_excel-month it_excel-date.
    *    CONCATENATE it_excel-date '.' it_excel-month '.' it_excel-bldat_001+6(4) INTO it_excel-bldat_001.
        MODIFY it_excel.
        CLEAR it_excel.
      ENDLOOP.
    ENDFORM.                    " sub_calc_excel
    *&      Form  write
    *       text
    *  -->  p1        text
    *  <--  p2        text
    *form write .
    *OPEN DATASET dataset FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
    *data: wa_excel like line of it_excel.
    *loop at it_excel into wa_excel.
    *TRANSFER wa_excel to dataset.
    *endloop.
    *CLOSE DATASETdataset.
    *endform.                    " write

  • Can not see the data in the grid

    Hi,
    nice to see the new features, but I can not see the the table inserts
    in the data grid - the <data> rider is not clickable.
    Regards

    Hi annerose,
    This problem has appeared in a few other threads. It's caused by installing Release 2 Raptor over Release 1 Raptor without first deinstalling Release 1 Raptor . So what you need to do is:
    1) Back up any important Raptor files, e.g. connections etc.
    2) Remove the existing Raptor Rel 1 installation folder
    3) Install Raptor Rel 2
    Hope this helps
    ady

  • Problem adding data to the CRM /Saas application by running SQL commands

    Hello,
    I've been following the CRM/ Saas tutorial:
    http://www.oracle.com/technology/pub/articles/bobrowski-saas.html
    and I tried to run the SQL commands in the tutorial to populate the TENANTS, CUSTOMERS, TENANT_COLUMNS, and USERS tables and keep on getting an "ORA-00911: invalid character" error.
    I could use the Object Browser page to do this but would like to know how to do this by running a SQL command.
    Has anyone else encountered this problem when trying to populate the tables in the CRM application?
    Thanks
    Linda

    Hello,
    Are you sure you copied it correctly?
    If you try to run 1 create statement, does that work?
    For ex.
    -- USERS
    INSERT INTO users (username, tenant_id)
    VALUES ('MIKE',1);
    INSERT INTO users (username, tenant_id)
    VALUES ('JOE',2);
    COMMIT;
    Does that work? I don't see that many special characters...
    What you may try to do is to change the ; by a /
    for ex.:
    INSERT INTO users (username, tenant_id)
    VALUES ('MIKE',1)
    INSERT INTO users (username, tenant_id)
    VALUES ('JOE',2)
    Regards,
    Dimitri
    -- http://dgielis.blogspot.com/
    -- http://apex-evangelists.com/
    -- http://apexblogs.info/

  • How to update changed data in alv grid.

    hi experts,
    i have a editable alv report how to update the changed data on the grid to database table when i click save.
    can anybody tell me how to do this if possible with example.
    thanks in advance.
    regards,
    venu

    The code below isn't a working program, but has most of what you should need.  Field-symbol <dyn_table> will always have what is in the grid.
    FIELD-SYMBOLS: <dyn_table> TYPE STANDARD TABLE,
                   <dyn_wa>.
    DATA: pt_fieldcat TYPE lvc_t_fcat,
          ls_fcat TYPE lvc_s_fcat,
          new_table TYPE REF TO data,
          new_line TYPE REF TO data.
    CREATE OBJECT g_custom_container
          EXPORTING container_name = g_container.
    CREATE OBJECT g_grid EXPORTING i_parent = g_custom_container.
    CLEAR ls_fcat.
    ls_fcat-fieldname = 'MATERIAL'.
    ls_fcat-datatype  = 'CHAR'.
    ls_fcat-intlen    = 18.
    ls_fcat-outputlen = 18.
    ls_fcat-coltext   = 'Material'.
    ls_fcat-edit      = 1.
    APPEND ls_fcat TO pt_fieldcat.
    CLEAR ls_fcat.
    ls_fcat-fieldname = 'QUANTITY'.
    ls_fcat-datatype  = 'INT4'.
    ls_fcat-intlen    = 6.
    ls_fcat-outputlen = 6.
    ls_fcat-coltext   = 'Qty'.
    ls_fcat-edit      = 1.
    APPEND ls_fcat TO pt_fieldcat.
    CALL METHOD cl_alv_table_create=>create_dynamic_table
                 EXPORTING
                    it_fieldcatalog = pt_fieldcat
                 IMPORTING
                    ep_table = new_table.
    * assign ref variable  to a field symbol
    ASSIGN new_table->* TO <dyn_table>.
    * Create dynamic work area and assign to FS
    CREATE DATA new_line LIKE LINE OF <dyn_table>.
    ASSIGN new_line->* TO <dyn_wa>.
    * data_itab is filled with data that you want in grid
    LOOP AT data_itab INTO data_wa.
      CLEAR <dyn_wa>.
      ASSIGN COMPONENT 'MATERIAL' OF STRUCTURE <dyn_wa> TO <fs>.
      <fs> = data_wa-material.
      ASSIGN COMPONENT 'QUANTITY' OF STRUCTURE <dyn_wa> TO <fs>.
      <fs> = data_wa-quantity.
      APPEND <dyn_wa> TO <dyn_table>.
    ENDLOOP.
    CALL METHOD g_grid->set_table_for_first_display
        EXPORTING
          i_structure_name              = '<DYN_TABLE>'
          is_variant                    = gs_variant
          i_save                        = 'A'
          i_default                     = 'X'
          is_layout                     = gs_layout
          it_toolbar_excluding          = gt_exclude
        CHANGING
          it_outtab                     = <dyn_table>
          it_fieldcatalog               = pt_fieldcat[]
          it_sort                       = gt_sort[].

  • Edit data using OEM grid

    Hi Friends,
    I want to edit tale data using the grid (view-edit contents) of tables of OEM 10g(cleant console) but the update/edit button is disabled. How do I enable it please.
    You know its very handy for dba/apps dev to use this feature (like toad).
    Unlike sqlplus command which is very hard to use in updating data on tables.
    Thanks a lot

    Toad of course supports 10g.
    But I would contest DBAs should do 'data fixing' on the fly, especially if business rules weren't implemented in the database.
    Such unprofessional way of working can easily ruin the database.
    Would you like to set your job at stake because of 'data fixing'?
    Sybrand Bakker
    Senior Oracle DBA

  • How to refresh the grid so that default  values come on adding new row.

    Hi Experts,
    In alv grid while adding new row, i want some 2-3 column values to come by default from already existing row in grid.
    i am getting new row in internal table with 2-3 default values and rest columns blank on adding new row in alv grid
    but the entire row is coming blank, not able to get the default values in new row
    how can i refresh the grid so that default  values come on adding new row.
    thanks

    Hi Surabhi,
    Use this in Interactive section even if you are doing simple ALV.
    DATA:
    lv_ref_grid TYPE REF TO cl_gui_alv_grid.
    CLEAR : gv_tcode.
    *-- to ensure that only new processed data is displayed
    IF lv_ref_grid IS INITIAL.
    CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
    IMPORTING
    e_grid = lv_ref_grid.
    ENDIF.
    IF NOT lv_ref_grid IS INITIAL.
    CALL METHOD lv_ref_grid->check_changed_data.
    ENDIF.
    THis will solve your problem.
    Regards,
    Vijay

  • Input the data in to the grid without saving it to the  database

    <PRE lang=jsp id=pre2 style="MARGIN-TOP: 0px" nd="109"><%@ taglib uri="/WEB-INF/tags/datagrid.tld" prefix="grd" %>
    <%@ page import="java.sql.Connection" %>
    <%@ page import="java.sql.DriverManager" %>
    <%@ page import="java.sql.SQLException" %>
    <%@ page import="com.freeware.gridtag.*" %>
    <%
    int intCurr = 1;
    int intSortOrd = 0;
    String strTmp = null;
    String strSQL = null;
    String strSortCol = null;
    String strSortOrd = "ASC";
    boolean blnSortAsc = true;
    strSQL = "SELECT CLICORPORATION, CLICLIENT, CLIDESCRIPTION, " +
    "CLIENABLED, CLIUPDSTAMP FROM CLIENTMASTER ";
    Connection objCnn = null;
    Class objDrvCls = null;
    objDrvCls = Class.forName("oracle.jdbc.driver.OracleDriver");
    objCnn = DriverManager.getConnection("<A class=iAs style="FONT-WEIGHT: normal; FONT-SIZE: 100%; PADDING-BOTTOM: 1px; COLOR: darkgreen; BORDER-BOTTOM: darkgreen 0.07em solid; BACKGROUND-COLOR: transparent; TEXT-DECORATION: underline" href="#" target=_blank itxtdid="3346226">jdbc</A>:oracle:thin:@Host:port:sid",
    "cashincpri", "cashincpri");
    if (objDrvCls != null) objDrvCls = null;
    strTmp = request.getParameter("txtCurr");
    try
    if (strTmp != null)
    intCurr = Integer.parseInt(strTmp);
    catch (NumberFormatException NFEx)
    strSortCol = request.getParameter("txtSortCol");
    strSortOrd = request.getParameter("txtSortAsc");
    if (strSortCol == null) strSortCol = "CLICLIENT";
    if (strSortOrd == null) strSortOrd = "ASC";
    blnSortAsc = (strSortOrd.equals("ASC"));
    %>
    <html>
    <head>
    <title>Grid Tag Demonstration</title>
    <link REL="StyleSheet" HREF="css/GridStyle.css">
    <script LANGUAGE="javascript">
    function doNavigate(pstrWhere, pintTot)
    var strTmp;
    var intPg;
    strTmp = document.frmMain.txtCurr.value;
    intPg = parseInt(strTmp);
    if (isNaN(intPg)) intPg = 1;
    if ((pstrWhere == 'F' || pstrWhere == 'P') && intPg == 1)
    alert("You are already viewing first page!");
    return;
    else if ((pstrWhere == 'N' || pstrWhere == 'L') && intPg == pintTot)
    alert("You are already viewing last page!");
    return;
    if (pstrWhere == 'F')
    intPg = 1;
    else if (pstrWhere == 'P')
    intPg = intPg - 1;
    else if (pstrWhere == 'N')
    intPg = intPg + 1;
    else if (pstrWhere == 'L')
    intPg = pintTot;
    if (intPg < 1) intPg = 1;
    if (intPg > pintTot) intPg = pintTot;
    document.frmMain.txtCurr.value = intPg;
    document.frmMain.submit();
    function doSort(pstrFld, pstrOrd)
    document.frmMain.txtSortCol.value = pstrFld;
    document.frmMain.txtSortAsc.value = pstrOrd;
    document.frmMain.submit();
    </script>
    </head>
    <body>
    <h2>Grid Example</h2>
    <form NAME="frmMain" METHOD="post">
    <grd:dbgrid id="tblStat" name="tblStat" width="100" pageSize="10"
    currentPage="<%=intCurr%>" border="0" cellSpacing="1" cellPadding="2"
    dataMember="<%=strSQL%>" dataSource="<%=objCnn%>" cssClass="gridTable">
    <grd:gridpager imgFirst="images/First.gif" imgPrevious="images/Previous.gif"
    imgNext="images/Next.gif" imgLast="images/Last.gif"/>
    <grd:gridsorter sortColumn="<%=strSortCol%>" sortAscending="<%=blnSortAsc%>"/>
    <grd:rownumcolumn headerText="#" width="5" HAlign="right"/>
    <grd:imagecolumn headerText="" width="5" HAlign="center"
    imageSrc="images/Edit.gif"
    linkUrl="javascript:doEdit('{CLICORPORATION}', '{CLICLIENT}')"
    imageBorder="0" imageWidth="16" imageHeight="16"
    alterText="Click to edit"/>
    <grd:textcolumn dataField="CLICLIENT" headerText="Client"
    width="10" sortable="true"/>
    <grd:textcolumn dataField="CLIDESCRIPTION" headerText="Description"
    width="50" sortable="true"/>
    <grd:decodecolumn dataField="CLIENABLED" headerText="Enabled" width="10"
    decodeValues="Y,N" displayValues="Yes,No" valueSeperator=","/>
    <grd:datecolumn dataField="CLIUPDSTAMP" headerText="Last Updated"
    dataFormat="dd/MM/yyyy HH:mm:ss" width="20"/>
    </grd:dbgrid>
    <input TYPE="hidden" NAME="txtCurr" VALUE="<%=intCurr%>">
    <input TYPE="hidden" NAME="txtSortCol" VALUE="<%=strSortCol%>">
    <input TYPE="hidden" NAME="txtSortAsc" VALUE="<%=strSortOrd%>">
    </form>
    </body>
    </html>
    <%
    try
    if (objCnn != null)
    objCnn.close();
    catch (SQLException SQLExIgnore)
    if (objCnn != null) objCnn = null;
    %>
    </PRE>
    by using this code we will get the gide.
    but the problem is when we are inserting the new record after click to save the record first saves the data in the Db and then it appears on the grid.
    Is it possible to do reverse of the above :
    first it comes to the grid and then after click to save it save to the database.
    please help me
    Regards,
    imran

    Hi Yamini,
    What do you mean by without query region here? Do you wish to implement the complete search/result functionality without using the Query page? Or your question already answered. Kindly confirm.
    Regards
    Sumit

  • How to update data in the database through ALV grid

    Hi All,
    I diplayed an ALV grid with five fields in a classical report. I have already set the fieldcat for one field as wa_fcat_edit = 'X'. I am able to edit(modify) the data in that field. But I want to update the data into the database which is modified by me in that field. Can I update the data using BDC or any other procedure?
    This is an urgent require ment for me. Please help me ASAP.
    Thanks & Regards,
    Ramesh.

    Hi
    Please go through the link.
    Link: [http://www.****************/Tutorials/ALV/Edit/demo.htm]
    regards
    ravisankar

  • HT1296 How can I sync my iPhone 4S with my PC where the data on the phone is added to my library on the PC?

    I am trying to sync my 4S with my PC that has not been sync'd for a long time. I need to make sure the data on the phone is added to my library on the PC and not have the PC data overwrite on to my phone.

    Specifically I'm looking to keep all my photo's on the phone.

  • No time field in an event added by pressing down a date in the month view of the calendar!, no time field in an event added by pressing down a date in the month view of the calendar!

    I have been trying to add time to an event i already added but the time field does not exist.
    this happens only when I add the event from the month view while I press a date. in no other senario does this happens.
    may be its a bug in the calendar.
    if I press the + sign then it's normal.
    any suggestions on how to fix this?

    there is edit button; however, my problem comes after that. if the event was added using the above method then there is still no way to change the time of the event in that date. if the event was added in any other way then I can change the time.
    and I just realized my iphone3gs with ios5.0.1 has the same exact bug.

Maybe you are looking for

  • Empty Trash with Time Machine

    Time Machine backed up some files I do not want backed up. I dragged them to the trash and tried secured delete, option delete and tried "chflags -R nouchg " in terminal and the trash will not empty. I cannot drag these files anywhere. This link: htt

  • Restoring with iCloud questions?

    I have a few questions about restoring with iCloud. Here's a little background. I have an iPod touch with about 1000 pictures/videos on it. I just got a new iPhone 5 and it has my contacts on it. I want the photos from my iPod onto my iPhone's camera

  • Pen tool is rasterized in Photoshop CS3

    I am trying to trace a picture and create a vector image, but when I am using the pen tool it seems to already be rasterized. I do not know what I am doing wrong. I tried checking certain setting, but I am still not sure what to look for. Any help wi

  • Which Microsoft2013 product is support for Power Query

    Hi All, I'm using  window 8.1 Pro and want to install Power Query on my PC. Could you please let me know which Microsoft Product dose support Power Query for Window 8.1 Pro? Many thanks

  • Gateway issue

    I am trying to setup my sever as a gateway. I have dhcp working but I cant get other devices on my lan to reach the internet whats might be wrong.