How can we lock the table?? how can we lock the record

Hi
how can we lock the complete table?? how can we lock the record ?/
Thanks
Rama

Lock objects are used to lock the database table while making the modifications on the database table.
you can create your own lock objects using SE11.
if you create lock objects on any table system will create two function modules.
1.ENQUEUE....
2.DEQUEUE.....
first one is used to lock the table
second one used to removing lock on the table.
lock Table
CALL FUNCTION 'ENQUEUE_E_TABLE'
EXPORTING
tabname = table_name
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
Unlock Table
CALL FUNCTION 'DEQUEUE_E_TABLE'
EXPORTING
tabname = table_name
check this link :
http://help.sap.com/saphelp_40b/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
_SCOPE = 1: The lock is not sent to the update program. The lock is removed when the transaction is ended.
_SCOPE = 2: The lock is sent to the update program. The update program is responsible for removing the lock. The dialog program which requested the lock no longer has an influence on the lock behavior. This is the standard setting for the ENQUEUE function module.
_SCOPE = 3: The lock
Re: lock objects
Reward if this helps.

Similar Messages

  • How Can I obtain the tables of one schema and the record size???

    How Can I obtain the tables of one schema and the record size???
    Example:
    TableName Record Size
    Tabla1 12500
    Tabla2 7800
    Tabla3 2046

    This is not an OWB question, but you can obtain bda-type information on tables by using the system view dba_tables.
    Regards:
    Igor

  • How to create a Z* table which can maintain through SM30?

    How to create a Z* table which can maintain through SM30? Thanks!

    This question had been asked millions of times...you just need to search the forums...
    Quick hint...goto SE11...the utilities menu and then Table Maintenance Generator.
    Greetings,
    Blag.

  • Name of the table where can get the two fields Valid-From and Valid-to for

    Hi gurus
    I want name of the table where I can get the two fields Valid-From and Valid-To and their relation ship with the header table in BOM
    Regards
    Kaisar

    You can only get the Valid from date from the table STKO.
    To get the valid to date, you have to take one day less than the valid-from date of the next record for the same BOM.
    Alternatively use the Function module:
    CSAP_MAT_BOM_READ
    It will give both valid from and valid to dates in the tables parameter: T_STKO
    Regards,
    Ravi
    Edited by: Ravi Kanth Talagana on Jul 2, 2008 4:37 PM

  • In the Table Overflow can we change show link to + sign?

    In the Table Overflow can we change show link to + sign?

    I asked about this awhile ago on this form,
    Removing the words 'Show'/'Hide' from table detail disclosure
    Changing this is a ADF Faces skinning issue, so the JDeveloper forum would be your best best. I've always wanted to implement this, but I have never got around to it

  • How to create entity for the table which is not having the primary key

    Hi,
    Is it possible to create an entity for the table which is not having the primary key.
    I have to write a method in my session bean and that method must use this entity.
    any websites for this.

    If you are talking about processes launched from a JVM (running outside), Process is available.
    If you are talking about processes already running outside of a JVM, you could roll-your-own class to provide similar functionality as Process. This approach would be platform dependent, backed by the platform's I/O scripting and therefore limited to what the platform supports for process manipulation, e.g. Linux/Unix capabilities far exceed Windows.

  • In creating a fillable PDF in XI Pro, can I insert a table which can be tabbed through?

    In creating a fillable PDF in XI Pro, can I insert a table which can be tabbed through?

    You're in luck. Create the first field and then right-click it (in Form Edit mode) and select Create Multiple Copies. You'll be able to specify how many copies of the fields to generate, and at what intervals. The nice thing is that although the properties of the new fields will be identical to the source one, they'll each have a unique name, so you'll get an instant "table" of fields.

  • In Pages, the column in the table won't flow onto the second page. The text is hidden. Please help!

    In Pages, the column in the table won't flow onto the second page. The text is hidden. Please help!

    Thank you for your reply,
    When I click 'view' , I can "show inspector". From the table tab, I can pull up the "Format". [See below]. I don't see the "Arrange" or "Object Placement Move with Text"
    Right now I have the Wrap Text On. When I take it off, It messes up my rows [see second image].
    All I want is for my column to flow onto the second page.
    Your assistance is genuinely appreciated.
    Thank you again.

  • When converting tables in a MS Word 2010 or 2007 to PDF the table borders do not retain the correct thickness as identified in the word document.  Is there a solution for this issue?

    When converting tables in a MS Word 2010 or 2007 to PDF the table borders do not retain the correct thickness as identified in the word document.  Is there a solution for this issue?

    Please try with latest version of MS Word and Acrobat.
    Regards,
    Anoop

  • What are the tables for Partner Fuction regarding the Vendors Purchasing ?

    Hello Gurus,
    What are the tables for Partner Fuction regarding the Vendors Purchasing Organisation. I need the Partner Function Key, Parner Function Name, Number and the Name of the Number.
    Thanx in advance,
    Ramona

    Hi Jürgen,
    I know that table but it is only showing me the technical name of the Partner Function and I need also the rest: the text(name), number and the number name (text). I presume there are other tables for those infos.
    I am not sure if I understand what are these. I just want the table to upload the data to BW.

  • What are the tables impacted when we done the migo

    hi,
    what are the tables impacted when we done the migo.

    The tables invoved are :-
    MARD -   Storage Location Data for Material
    MARC - Plant Data for Material
    MSEG - Document Segment: Material
    MBEW - Material Valuation
    MKPF - Headr : Material Document
    EKBE - History per Purchasing Document
    EBEW - Sales Order Stock Valuation
    Edited by: Briesh Patel on Apr 22, 2008 4:42 PM

  • How do I build a table that can be filled in by the user?

    I'm trying to build a form where the user can easily add a qty to order a size. I haven't been able to do this other than adding a text field for every option. Can you build a table that would do the same thing (see my sample below)? Even better, is there a way to get it to total? All ideas appreciated!
    Small
    Med
    Large
    XL
    Total
    Style A
    Style B

    Hi,
    You already have a good start at generating the table. All you need to do is change the cells from static text to either a numeric field or text field. You can do this by dragging a numericField from the Object Library and placing it inside the cell.
    Once you have the numeric field in place, you can edit the properties, font, alignment, currency, validation, etc. Then copy and paste the field into similar cells and change the names, for example A_small,  B_small etc.
    The "Total" numeric field could have a Formcalc in the calculate event:
    $ = A_small + A_med + A_large + A_xl
    This is on the basis of a static table where you design all of the rows that will be available to the user.
    You can also set up dynamic tables where the uer can add additional rows. There are plenty of good examples in the LC help and on the forums.
    Good luck,
    Niall

  • How 2 create dynamic internal table and can we pass it to gui_download FM

    HI all,
         How can we create a dynamic internal table?
    I have a requirement where  i have to create an internal table with the no. of fields depending on the selection screen values, i think tat can be possible though dynamic creation only.
             How to solve this issue..?Pointers will be very much useful..
    Thanks
    Sunny.

    hi
    Follow the code it will help you out....
    REPORT  YUSMM_TEXT2                             .
    *TABLES
    TABLES: MARA,    " General Material Data
            MAKT,    " Material Descriptions
            T002.    " Language Keys
    * GLOBAL TYPE-POOL
    TYPE-POOLS : SLIS.
    * GLOBAL TYPES
    TYPES: BEGIN OF TP_LANG ,
             SPRAS LIKE T002-SPRAS,
             LAISO LIKE T002-LAISO,
             SRNO(3) TYPE N,
           END OF TP_LANG.
    TYPES: BEGIN OF TP_MATNR,
             MATNR LIKE MARA-MATNR,
             BEGRU LIKE MARA-BEGRU,
           END OF TP_MATNR.
    * DECLARATION FOR GLOBAL INTERNAL TABLES (WITH INCLUDE STRUCTURE)
    DATA:GT_MAKT    TYPE STANDARD TABLE OF MAKT,  "Materialkurztexte,
         GT_THEAD   TYPE STANDARD TABLE OF THEAD, "SAPscript: Text-Header,
         GT_LINETAB TYPE STANDARD TABLE OF TLINE, "SAPscript: Text-Zeilen,
         GT_T002    TYPE STANDARD TABLE OF T002. "Language key
    DATA: BEGIN OF GV_TEXT_OUTPUT_LINE,
                MATNR LIKE MARA-MATNR,
                BEGRU LIKE MARA-BEGRU,
                MAKTX LIKE MAKT-MAKTX,
                LTXT40(1250) TYPE C,
                SRNO(3) TYPE N,
                SPRAS LIKE T002-SPRAS,
             END OF GV_TEXT_OUTPUT_LINE.
    DATA: GT_MATNR TYPE STANDARD TABLE OF TP_MATNR,
          WA_GT_MATNR TYPE TP_MATNR.
    DATA: GT_LANG TYPE STANDARD TABLE OF TP_LANG,
          WA_GT_LANG TYPE TP_LANG.
    DATA: GT_TEXT_OUTPUT_LINE LIKE STANDARD TABLE OF GV_TEXT_OUTPUT_LINE,
          GT_FIELDCAT         TYPE SLIS_T_FIELDCAT_ALV,
          GV_FIELDCAT         LIKE LINE OF GT_FIELDCAT,
          CT_GT_FIELDCAT_IN LIKE GV_FIELDCAT,
          GS_LAYOUT           TYPE SLIS_LAYOUT_ALV,
          GV_REPID            TYPE SY-REPID.
    DATA: BEGIN OF GV,
            FORMER_ERROR       LIKE  SY-MARKY,     " Fehlermeldung bereits
            FILE_OPEN(1),                          " Flag open file
            REC_LENGTH         TYPE  I,            " record length
            MATNR              TYPE  MARA-MATNR,   " material
            REPID              TYPE  SYST-REPID,
            RETCO              TYPE  SY-SUBRC,
          END OF GV.
    DATA: GV_MAKT             TYPE MAKT,
          GV_T002             TYPE T002,
          GV_LANGU            TYPE THEAD-TDSPRAS.
    * DECLARATION FOR FIELD-SYMBOLS
    FIELD-SYMBOLS: <FS_DATA> TYPE REF TO DATA,
                   <FS_DATA1> TYPE REF TO DATA,
                   <FS_2>    TYPE STANDARD TABLE,
                   <FS_22>   TYPE STANDARD TABLE,
                   <FS_1>,
                   <FS_11>,
                   <F>,
                   <FA>,
                   <LWA_LINE_WA>,
                   <LWA_LINE_WA1>.
    DATA: IT_FLDCAT TYPE LVC_T_FCAT.
    DATA: T_FLDCAT1   TYPE SLIS_T_FIELDCAT_ALV.
    DATA: L_LT TYPE SLIS_LAYOUT_ALV.
    DATA: WA_IT_FLDCAT TYPE LVC_S_FCAT.
    DATA: WA_IT_FLDCAT1 TYPE SLIS_FIELDCAT_ALV.
    DATA: GP_TABLE TYPE REF TO DATA.
    DATA: WA_NEWLINE TYPE REF TO DATA.
    *DECLARATION FOR CONSTANTS
    CONSTANTS:
       BEGIN OF GC,
         TDID_GRUN     TYPE THEAD-TDID     VALUE 'GRUN',
         TDOBJECT_MAT  TYPE THEAD-TDOBJECT VALUE 'MATERIAL',
         ON(01)        TYPE C              VALUE 'X',
         YES(01)       TYPE C              VALUE 'X',
         TXT(25)       TYPE C              VALUE 'MATERIAL DETAILS',
         MAT(25)       TYPE C              VALUE 'MATERIAL NUMBER',
         AUT(25)       TYPE C              VALUE 'AUTHORIZATION GROUP',
         FOUND         TYPE SY-SUBRC       VALUE '00',  " Return-Code
         RC_OK         TYPE SY-SUBRC       VALUE '00',  " Return-Code
         OFF           TYPE SY-SUBRC       VALUE '00',  " return code
         FALSE         TYPE SY-SUBRC       VALUE '00',  " boolean
         TRUE          TYPE SY-SUBRC       VALUE '01',  " boolean
      END OF GC.
    * DECLARATION FOR VARIABLES
    DATA: V(3) TYPE N,
          STR TYPE STRING,
          STR1 TYPE STRING,
          V_VAR(3) TYPE N,
          V_VAR1(3) TYPE N,
          V_FIELDNAME(15) TYPE C,
          V_CHAR(15) TYPE C,
          V_LINES(3) TYPE N,
          MAKTEXT LIKE MAKT-MAKTX,
          LT_DATA        TYPE   REF TO DATA,
          LT_DATA1        TYPE   REF TO DATA,
          LWA_LINE       TYPE   REF TO  DATA,
          LWA_LINE1 TYPE REF TO DATA.
    *SELECTION-SCREEN AND PARAMETERS
    SELECTION-SCREEN: BEGIN OF BLOCK A1 WITH FRAME TITLE TEXT-002.
    SELECT-OPTIONS:
    S_MATNR FOR MARA-MATNR,  "MATERIAL NUMBER
    S_MTART FOR MARA-MTART,  "MATERIAL TEXT
    S_LANG FOR MAKT-SPRAS.   "LANGUAGE
    PARAMETER: GP_SIZE TYPE I DEFAULT 200. "DATA LENGTH
    SELECTION-SCREEN: END OF BLOCK A1.
    * AT SELECTION SCREEN
    AT SELECTION-SCREEN.
      IF GP_SIZE < 0.
        MESSAGE E002(00).
      ENDIF.
      IF GP_SIZE > 50000.
        MESSAGE W130(26) WITH TEXT-004.
        SET CURSOR FIELD 'gp_size'.
      ENDIF.
    * INITIALIZATION
    INITIALIZATION.
      GV-REPID = SY-REPID.
    *START-OF-SELECTION
    START-OF-SELECTION.
      PERFORM GET_MARA_DATA
                TABLES
                  GT_TEXT_OUTPUT_LINE
                USING
                  S_MATNR[]
                  S_MTART[]
                  GP_SIZE
                CHANGING
                  GV-RETCO
      PERFORM GET_MAT_TEXT
                 TABLES
                   GT_MAKT
                   GT_TEXT_OUTPUT_LINE
                   GT_THEAD
                   GT_LINETAB
                 USING
                   GC
                   GV-RETCO
                 CHANGING
                   GV_TEXT_OUTPUT_LINE
                   GV_MAKT
      PERFORM GET_LANG.
      PERFORM DYNAMIC_TABLES.
      PERFORM POPULATE_FINAL_TABLE.
      PERFORM POPULATE_DYNAMIC_TABLE.
    * END-OF-SELECTION
    END-OF-SELECTION.
      PERFORM DATA_OUTPUT.
    *&      Form  get_mara_data
    *       Materialdaten lesen
    *      <->ct_gt_text_output_line  Ausgabetabelle
    *      -->it_s_matnr  Parameter Materialnummer
    *      -->it_s_mtart  Parameter Materialart
    *      -->if_gp_size  Parameter Anzahl Materialnummern
    FORM GET_MARA_DATA  TABLES   CT_GT_TEXT_OUTPUT_LINE STRUCTURE
                                       GV_TEXT_OUTPUT_LINE
                        USING    IT_S_MATNR LIKE S_MATNR[]
                                 IT_S_MTART LIKE S_MTART[]
                                 IF_GP_SIZE
                        CHANGING IF_GV-RETCO.                   "#EC *
    * MARA in die Übergabestruktur einlesen
      SELECT MATNR BEGRU
            FROM MARA UP TO IF_GP_SIZE ROWS
            APPENDING CORRESPONDING FIELDS OF TABLE GT_MATNR
                     WHERE MATNR IN IT_S_MATNR
                       AND MTART IN IT_S_MTART.
      IF_GV-RETCO = SY-SUBRC.
    ENDFORM.                    " get_mara_data
    *&      Form  get_mat_text
    *       Kurz- und Langtexte zum Material lesen
    *      <->ct_gt_makt              Materialkurztexte
    *      <->ct_gt_text_output_line  Ausgabetabelle
    *      <->ct_gt_thead             Kopftabelle für ALV
    *      <->ct_gt_linetab           Zeilentabelle für ALV
    *      -->if_gc                   Globale Konstanten
    *      <--cf_gv_text_output_line  Struktur Ausgabetabelle
    *      <--cf_gv_makt              Struktru Materialkurztexte
    FORM GET_MAT_TEXT  TABLES   CT_GT_MAKT             STRUCTURE MAKT
                                CT_GT_TEXT_OUTPUT_LINE STRUCTURE
                                                    GV_TEXT_OUTPUT_LINE
                                CT_GT_THEAD            STRUCTURE THEAD
                                CT_GT_LINETAB          STRUCTURE TLINE
                       USING
                                IF_GC                  LIKE GC
                                IF_GV-RETCO
                       CHANGING CF_GV_TEXT_OUTPUT_LINE LIKE
                                                       GV_TEXT_OUTPUT_LINE
                                CF_GV_MAKT             LIKE GV_MAKT
      DATA: STRG TYPE STRING,
            STRG1(1255) TYPE C.
      IF IF_GV-RETCO = IF_GC-FOUND.
    * Materialkurztexte in alles Sprachen einlesen
        SELECT * FROM MAKT APPENDING TABLE CT_GT_MAKT
                 FOR ALL ENTRIES IN GT_MATNR "ct_gt_text_output_line
                 WHERE MATNR = GT_MATNR-MATNR " ct_gt_text_output_line-matnr
    * Kurztexte in die sprachabhängigen Felder bringen
        LOOP AT GT_MATNR INTO WA_GT_MATNR.
          LOOP AT CT_GT_MAKT INTO CF_GV_MAKT
                 WHERE MATNR = WA_GT_MATNR-MATNR.
            CF_GV_TEXT_OUTPUT_LINE-MATNR = WA_GT_MATNR-MATNR.
            CF_GV_TEXT_OUTPUT_LINE-BEGRU = WA_GT_MATNR-BEGRU.
            CF_GV_TEXT_OUTPUT_LINE-MAKTX = CF_GV_MAKT-MAKTX.
            CF_GV_TEXT_OUTPUT_LINE-SPRAS = CF_GV_MAKT-SPRAS.
    * LANGTEXT
            CLEAR CT_GT_THEAD[].
            CT_GT_THEAD-TDOBJECT = IF_GC-TDOBJECT_MAT.
            CT_GT_THEAD-TDNAME   = WA_GT_MATNR-MATNR.
            CT_GT_THEAD-TDID     = IF_GC-TDID_GRUN.
            CT_GT_THEAD-TDSPRAS  = CF_GV_MAKT-SPRAS.
            CALL FUNCTION 'TEXT_READ'
              EXPORTING
                I_HEADER   = CT_GT_THEAD
                I_READONLY = IF_GC-ON
              IMPORTING
                E_HEADER   = CT_GT_THEAD
              TABLES
                T_LINES    = CT_GT_LINETAB[]
              EXCEPTIONS
                NOTFOUND   = 1.
            IF SY-SUBRC = IF_GC-FOUND.
              LOOP AT  CT_GT_LINETAB.
                STRG = CT_GT_LINETAB-TDLINE.
                IF STRG1 <> ' '.
                  CONCATENATE STRG1 ';' STRG INTO STRG1.
                ELSE.
                  STRG1 = STRG.
                ENDIF.
              ENDLOOP.
              CF_GV_TEXT_OUTPUT_LINE-LTXT40 = STRG1.
              APPEND CF_GV_TEXT_OUTPUT_LINE TO CT_GT_TEXT_OUTPUT_LINE.
              CLEAR CF_GV_TEXT_OUTPUT_LINE.
              STRG1 = ' '.
            ELSE.
              APPEND CF_GV_TEXT_OUTPUT_LINE TO CT_GT_TEXT_OUTPUT_LINE.
            ENDIF.
          ENDLOOP.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    " get_mat_text
    *&      Form  data_output
    *       Daten mit ALV ausgeben
    *      <->ct_GT_FIELDCAT          Feldkatalog für ALV
    *      <->ct_gt_text_output_line  Ausgabetabelle
    *      -->P_GS_LAYOUT             Layout für ALV
    *      -->if_gc                   Globale Konstanten
    *      <--cf_GV_REPID             Zur Zeit aufgerufener Reportname
    *      <--cf_gv_fieldcat          Struktur Feldkatalog
    *      <--cf_gv                   Globale Variablen
    FORM DATA_OUTPUT.
      PERFORM FIELDCATBUILD.
      PERFORM LAYOUT.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM       = GV-REPID
          I_CALLBACK_PF_STATUS_SET = 'EVENT_SET_STATUS_01'
          I_CALLBACK_USER_COMMAND  = 'EVENT_USER_COMMAND'
          IS_LAYOUT                = L_LT
          IT_FIELDCAT              = T_FLDCAT1[]
        TABLES
          T_OUTTAB                 = <FS_2>
        EXCEPTIONS
          PROGRAM_ERROR            = 1
          OTHERS                   = 2.
      IF SY-SUBRC <> GC-FOUND.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " data_output
    *&      Form  fieldcatbuild
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM FIELDCATBUILD. " TABLES   ct_gt_fieldcat_in STRUCTURE gv_fieldcat.
      LOOP AT IT_FLDCAT INTO WA_IT_FLDCAT.
        WA_IT_FLDCAT1-FIELDNAME = WA_IT_FLDCAT-FIELDNAME.
        WA_IT_FLDCAT1-TABNAME =  WA_IT_FLDCAT-TABNAME.
        WA_IT_FLDCAT1-SELTEXT_L = WA_IT_FLDCAT-FIELDNAME.
        APPEND WA_IT_FLDCAT1 TO T_FLDCAT1.
        CLEAR : WA_IT_FLDCAT,WA_IT_FLDCAT1.
      ENDLOOP.
    ENDFORM.                    " fieldcatbuild
    * Form event_set_status_01*
    FORM EVENT_SET_STATUS_01 USING LT_EXCL TYPE SLIS_T_EXTAB.
      SET PF-STATUS 'ABCD' .
    ENDFORM. "EVENT_SET_STATUS_01
    *& Form Name: event_user_command *
    *& Form Desc: For Handling USER_COMMAND *
    FORM EVENT_USER_COMMAND USING
    IF_UCOMM TYPE SY-UCOMM
    IS_SELFIELD TYPE SLIS_SELFIELD.
      CASE IF_UCOMM.
        WHEN 'DOWNLOAD'.
          PERFORM POPULATE_DOWNLOAD_TABLE.
          DATA: L_LENGHT TYPE I.
          CALL FUNCTION 'GUI_DOWNLOAD'
            EXPORTING
              FILENAME              = 'C:data.xls'
              FILETYPE              = 'ASC'
              WRITE_FIELD_SEPARATOR = 'X'
              TRUNC_TRAILING_BLANKS = 'X'
              DAT_MODE              = 'X'
            IMPORTING
              FILELENGTH            = L_LENGHT
            TABLES
              DATA_TAB              = <FS_22>.
          IF SY-SUBRC <> GC-FOUND.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
          ENDIF.
          IF L_LENGHT NE GC-FOUND.
            MESSAGE S398(00) WITH 'DATA downloaded to c:data.xls'.
          ENDIF.
      ENDCASE.
    ENDFORM.                    "event_user_command
    *&      Form  get_lang
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM GET_LANG.
      SELECT SPRAS
               LAISO FROM T002 INTO CORRESPONDING FIELDS OF TABLE GT_LANG
                      WHERE SPRAS IN S_LANG.
      DESCRIBE TABLE GT_LANG LINES V_LINES.
      LOOP AT GT_LANG INTO WA_GT_LANG.
        V = V + 1.
        WA_GT_LANG-SRNO = V.
        MODIFY GT_LANG FROM WA_GT_LANG TRANSPORTING SRNO.
      ENDLOOP.
      LOOP AT GT_LANG INTO WA_GT_LANG.
        CONCATENATE 'MATEDESC-' WA_GT_LANG-LAISO INTO V_FIELDNAME.
        CLEAR WA_IT_FLDCAT.
        WA_IT_FLDCAT-FIELDNAME = V_FIELDNAME.
        WA_IT_FLDCAT-SELTEXT = V_FIELDNAME.
        WA_IT_FLDCAT-DATATYPE = 'CHAR'.
        WA_IT_FLDCAT-INTLEN = 40.
        WA_IT_FLDCAT-TABNAME = '<FS_2>'.
        APPEND WA_IT_FLDCAT TO IT_FLDCAT .
        CLEAR WA_GT_LANG.
      ENDLOOP.
      LOOP AT GT_LANG INTO WA_GT_LANG.
        CONCATENATE 'BASDAT-' WA_GT_LANG-LAISO INTO V_FIELDNAME.
        CLEAR WA_IT_FLDCAT.
        WA_IT_FLDCAT-FIELDNAME = V_FIELDNAME.
        WA_IT_FLDCAT-DATATYPE = 'CHAR'.
        WA_IT_FLDCAT-INTLEN = 255.
        WA_IT_FLDCAT-SELTEXT = V_FIELDNAME.
        WA_IT_FLDCAT-TABNAME = '<FS_2>'.
        APPEND WA_IT_FLDCAT TO IT_FLDCAT .
        CLEAR WA_GT_LANG.
      ENDLOOP.
      V_FIELDNAME = 'MATNR'.
      CLEAR WA_IT_FLDCAT.
      WA_IT_FLDCAT-FIELDNAME = V_FIELDNAME.
      WA_IT_FLDCAT-DATATYPE = 'CHAR'.
      WA_IT_FLDCAT-SELTEXT =  'Matnr'.
      WA_IT_FLDCAT-INTLEN = 18.
      WA_IT_FLDCAT-TABNAME = '<FS_2>'.
      INSERT WA_IT_FLDCAT INTO IT_FLDCAT INDEX 1.
      V_FIELDNAME = 'BEGRU'.
      CLEAR WA_IT_FLDCAT.
      WA_IT_FLDCAT-FIELDNAME = V_FIELDNAME.
      WA_IT_FLDCAT-DATATYPE = 'CHAR'.
      WA_IT_FLDCAT-SELTEXT =  'BEGRU'.
      WA_IT_FLDCAT-INTLEN = 4.
      WA_IT_FLDCAT-TABNAME = '<FS_2>'.
      INSERT WA_IT_FLDCAT INTO IT_FLDCAT INDEX 2.
    ENDFORM.                    " get_lang
    *&      Form  dynamic_tables
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM DYNAMIC_TABLES.
      ASSIGN LT_DATA TO <FS_DATA>.
    * Creating the Dynamic Internal Table
      CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
        EXPORTING
          IT_FIELDCATALOG           = IT_FLDCAT      " Fieldcatalogue
        IMPORTING
          EP_TABLE                  = <FS_DATA>     " Dynamic Internal Table
        EXCEPTIONS
          GENERATE_SUBPOOL_DIR_FULL = 1
          OTHERS                    = 2.
    * Assign Dyn Table To Field Sumbol
      ASSIGN <FS_DATA>->* TO <FS_1>.
    * Assigning the Internal Table TYPE ANY to Standard internal Table
      ASSIGN <FS_1> TO <FS_2>.
    * Creating a Workarea
      CREATE DATA LWA_LINE LIKE LINE OF <FS_2> .
    * Assigning the Content to the workares as a Pointer
      ASSIGN LWA_LINE->* TO <LWA_LINE_WA>.
    ENDFORM.                    " dynamic_tables
    *&      Form  populate_final_table
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM POPULATE_FINAL_TABLE.
      LOOP AT GT_TEXT_OUTPUT_LINE INTO GV_TEXT_OUTPUT_LINE.
        READ TABLE GT_LANG INTO WA_GT_LANG
                  WITH KEY SPRAS = GV_TEXT_OUTPUT_LINE-SPRAS.
        IF SY-SUBRC EQ GC-FOUND.
          GV_TEXT_OUTPUT_LINE-SRNO = WA_GT_LANG-SRNO.
        ENDIF.
        MODIFY GT_TEXT_OUTPUT_LINE FROM GV_TEXT_OUTPUT_LINE.
      ENDLOOP.
    ENDFORM.                    " populate_final_table
    *&      Form  populate_dynamic_table
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM POPULATE_DYNAMIC_TABLE.
      DATA: INDX TYPE SY-TABIX.
      LOOP AT GT_TEXT_OUTPUT_LINE INTO GV_TEXT_OUTPUT_LINE.
        AT NEW MATNR.
          INDX = SY-TABIX.
          ASSIGN COMPONENT 1 OF STRUCTURE <LWA_LINE_WA> TO <F>.
          <F> = GV_TEXT_OUTPUT_LINE-MATNR.
          ASSIGN COMPONENT 2 OF STRUCTURE <LWA_LINE_WA> TO <F>.
          <F> = GV_TEXT_OUTPUT_LINE-BEGRU.
        ENDAT.
        LOOP AT GT_LANG INTO WA_GT_LANG.
          IF GV_TEXT_OUTPUT_LINE-SRNO = WA_GT_LANG-SRNO.
            V_VAR = GV_TEXT_OUTPUT_LINE-SRNO + 2.
            ASSIGN COMPONENT V_VAR OF STRUCTURE <LWA_LINE_WA> TO <F>.
            <F> = GV_TEXT_OUTPUT_LINE-MAKTX.
            V_VAR = GV_TEXT_OUTPUT_LINE-SRNO + V_LINES + 2.
            ASSIGN COMPONENT V_VAR OF STRUCTURE <LWA_LINE_WA> TO <F>.
            <F> = GV_TEXT_OUTPUT_LINE-LTXT40.
          ENDIF.
        ENDLOOP.
        AT END OF MATNR.
          APPEND <LWA_LINE_WA> TO <FS_2>.
          CLEAR <LWA_LINE_WA>.
        ENDAT.
      ENDLOOP.
    ENDFORM.                    " populate_dynamic_table
    *&      Form  LAYOUT
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM LAYOUT.
      CLEAR L_LT.
      L_LT-ZEBRA = GC-YES.
      L_LT-COLWIDTH_OPTIMIZE = 'X'.
      L_LT-WINDOW_TITLEBAR = GC-TXT.
    ENDFORM.                    " LAYOUT
    *&      Form  populate_download_table
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM POPULATE_DOWNLOAD_TABLE.
      ASSIGN LT_DATA1 TO <FS_DATA1>.
      CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
        EXPORTING
          IT_FIELDCATALOG           = IT_FLDCAT         " Fieldcatalogue
        IMPORTING
          EP_TABLE                  = <FS_DATA1>  " Dynamic Internal table
        EXCEPTIONS
          GENERATE_SUBPOOL_DIR_FULL = 1
          OTHERS                    = 2.
    * Assign Dyn Table To Field Sumbol
      ASSIGN <FS_DATA1>->* TO <FS_11>.
    * Assigning the Internal Table TYPE ANY to Standard internal Table
      ASSIGN <FS_11> TO <FS_22>.
    * Creating a Workarea
      CREATE DATA LWA_LINE1 LIKE LINE OF <FS_22> .
    * Assigning the Content to the workares as a Pointer
      ASSIGN LWA_LINE1->* TO <LWA_LINE_WA1>.
      DATA: STRN1 TYPE STRING,
            STRN2 TYPE STRING,
            INDX TYPE SY-TABIX.
      ASSIGN COMPONENT 1 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
      <FA> = GC-MAT.
      ASSIGN COMPONENT 2 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
      <FA> = GC-AUT.
      LOOP AT GT_LANG INTO WA_GT_LANG.
        V_VAR1 = WA_GT_LANG-SRNO + 2.
        CONCATENATE 'MATERIALDESCRIPTION-'  WA_GT_LANG-LAISO INTO STRN1.
        ASSIGN COMPONENT V_VAR1 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
        <FA> = STRN1.
        V_VAR1 = WA_GT_LANG-SRNO + V_LINES + 2.
        CONCATENATE 'BASICDATA-' WA_GT_LANG-LAISO INTO STRN2.
        ASSIGN COMPONENT V_VAR1 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
        <FA> = STRN2.
      ENDLOOP.
      APPEND <LWA_LINE_WA1> TO <FS_22>.
      CLEAR <LWA_LINE_WA1>.
      APPEND <LWA_LINE_WA1> TO <FS_22>.
      V_VAR1 = 0.
      LOOP AT GT_TEXT_OUTPUT_LINE INTO GV_TEXT_OUTPUT_LINE.
        AT NEW MATNR.
          INDX = SY-TABIX.
          ASSIGN COMPONENT 1 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
          <FA> = GV_TEXT_OUTPUT_LINE-MATNR.
          ASSIGN COMPONENT 2 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
          <FA> = GV_TEXT_OUTPUT_LINE-BEGRU.
        ENDAT.
        LOOP AT GT_LANG INTO WA_GT_LANG.
          IF GV_TEXT_OUTPUT_LINE-SRNO EQ WA_GT_LANG-SRNO.
            V_VAR1 = GV_TEXT_OUTPUT_LINE-SRNO + 2.
            ASSIGN COMPONENT V_VAR1 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
            <FA> = GV_TEXT_OUTPUT_LINE-MAKTX.
            V_VAR1 = GV_TEXT_OUTPUT_LINE-SRNO + V_LINES + 2.
            ASSIGN COMPONENT V_VAR1 OF STRUCTURE <LWA_LINE_WA1> TO <FA>.
    *        STR = GV_TEXT_OUTPUT_LINE-LTXT40.
    *        SEARCH STR FOR ';'.
    *        DO.
    *          IF SY-SUBRC = 0.
    *            SPLIT STR AT ';' INTO STR1 STR.
    *            <FA> = STR1.
    *            APPEND <LWA_LINE_WA1> TO <FS_22>.
    *            SEARCH STR FOR ';'.
    *            CLEAR <LWA_LINE_WA1>.
    *          ELSE.
    *            EXIT.
    *          ENDIF.
    *        ENDDO.
    *        <FA> = STR.
    *        APPEND <LWA_LINE_WA1> TO <FS_22>.
            <FA> = GV_TEXT_OUTPUT_LINE-LTXT40.
          ENDIF.
        ENDLOOP.
        AT END OF MATNR.
          APPEND <LWA_LINE_WA1> TO <FS_22>.
          CLEAR <LWA_LINE_WA1>.
        ENDAT.
      ENDLOOP.
    ENDFORM.                    " populate_download_table
    thanks
    Nitya

  • Help on locking MySQL tables (many can read, but only one can write) Java

    Hi there,
    I have a question regarding locking of tables so that only one person can write to the file, but many are able to read the files (or tables entities).
    I am not sure if I need to lock the tables in my Java code or do I lock the tables within the MySQL syntax. I'm just a little confused on the matter.
    This java code is a working prototype of inserting a customer data into the database and that works fine. I just don't know how to implement it so that only one person can update the table at a time.
    Here is the Customer.java code that I have written.
    Help would be greatly appreciated, thanks so much.
    package business;
    //~--- non-JDK imports --------------------------------------------------------
    import shared.info.CustomerInfo;
    //~--- JDK imports ------------------------------------------------------------
    import java.sql.*;
    * @author
    public class Customer {
        static Connection    con  = DBConnection.getConnection();
        private CustomerInfo info = new CustomerInfo();
        private String               customerID;
        private String               firstName;
        private String               lastName;
        private String               email;
        private String               addressID;
        private String               homePhone;
        private String               workPhone;
        private String               unitNum;
        private String               streetNum;
        private String               streetName;
        private String               city;
        private String               provinceState;
        private String               country;
        private String               zipPostalCode;
        public Customer(String id) {
            try {
                PreparedStatement pstmt = con.prepareStatement("SELECT * FROM " +
                        "Customer NATURAL JOIN Address WHERE CustomerID = ?");
                pstmt.setString(1, id);
                ResultSet rs = pstmt.executeQuery();
                while (rs.next()) {
                    customerID    = rs.getString("CustomerID");
                    firstName     = rs.getString("FirstName");
                    lastName      = rs.getString("LastName");
                    homePhone     = rs.getString("HomePhone");
                    workPhone     = rs.getString("WorkPhone");
                    email         = rs.getString("Email");
                    city          = rs.getString("City");
                    provinceState = rs.getString("ProvinceState");
                    country       = rs.getString("Country");
                    zipPostalCode = rs.getString("ZipPostalCode");
                    unitNum       = rs.getString("UnitNum");
                    streetNum     = rs.getString("StreetNum");
                    streetName    = rs.getString("StreetName");
                    addressID     = rs.getString("AddressId");
            } catch (SQLException e) {
                e.printStackTrace();
            info.setCustomerID(customerID);
            info.setFirstName(firstName);
            info.setLastName(lastName);
            info.setHomePhone(homePhone);
            info.setWorkPhone(workPhone);
            info.setEmail(email);
            info.setCity(city);
            info.setProvinceState(provinceState);
            info.setCountry(country);
            info.setZipPostalCode(zipPostalCode);
            info.setUnitNum(unitNum);
            info.setStreetNum(streetNum);
            info.setStreetName(streetName);
            info.setAddressID(addressID);
        public static void addCustomer(CustomerInfo cust) {
            try {
                int id = -1;
                PreparedStatement pstmt = con.prepareStatement("INSERT INTO Address" +
                        "(UnitNum, StreetNum, StreetName, City, ProvinceState, Country," +
                        " ZipPostalCode) VALUES(?, ?, ?, ?, ?, ?, ?)");
                pstmt.setString(1, cust.getUnitNum());
                pstmt.setString(2, cust.getStreetNum());
                pstmt.setString(3, cust.getStreetName());
                pstmt.setString(4, cust.getCity());
                pstmt.setString(5, cust.getProvinceState());
                pstmt.setString(6, cust.getCountry());
                pstmt.setString(7, cust.getZipPostalCode());
                pstmt.executeUpdate();
                ResultSet rs = pstmt.getGeneratedKeys();
                rs.next();
                id = rs.getInt(1);
                pstmt = con.prepareStatement("INSERT INTO Customer" +
                        "(FirstName, LastName, HomePhone, WorkPhone, Email, AddressID)"
                        + "VALUES(?, ?, ?, ?, ?, ?)");
                pstmt.setString(1, cust.getFirstName());
                pstmt.setString(2, cust.getLastName());
                pstmt.setString(3, cust.getHomePhone());
                pstmt.setString(4, cust.getWorkPhone());
                pstmt.setString(5, cust.getEmail());
                pstmt.setInt(6, id);
                pstmt.executeUpdate();
            } catch (SQLException e) {
                e.printStackTrace();
        public void setFirstName(String newName) {
            try {
                PreparedStatement pstmt = con.prepareStatement("UPDATE Customer"
                                              + " SET FirstName = ? WHERE CustomerID = ?");
                pstmt.setString(1, newName);
                pstmt.setString(2, customerID);
                pstmt.executeUpdate();
            } catch (SQLException e) {
                e.printStackTrace();
            firstName = newName;
        public void setLastName(String newName) {
            try {
                PreparedStatement pstmt = con.prepareStatement("UPDATE Customer"
                                              + " SET LastName = ? WHERE CustomerID = ?");
                pstmt.setString(1, newName);
                pstmt.setString(2, customerID);
                pstmt.executeUpdate();
            } catch (SQLException e) {
                e.printStackTrace();
            lastName = newName;
        public String getFirstName() {
            return firstName;
        public String getLastName() {
            return lastName;
        public void setHomePhone(String number) {
            try {
                PreparedStatement pstmt = con.prepareStatement("UPDATE Customer"
                                              + " SET HomePhone = ? WHERE CustomerID = ?");
                pstmt.setString(1, number);
                pstmt.setString(2, customerID);
                pstmt.executeUpdate();
            } catch (SQLException e) {
                e.printStackTrace();
            homePhone = number;
        public String getHomePhone() {
            return homePhone;
        public void setWorkPhone(String number) {
            try {
                PreparedStatement pstmt = con.prepareStatement("UPDATE Customer"
                                              + " SET WorkPhone = ? WHERE CustomerID = ?");
                pstmt.setString(1, number);
                pstmt.setString(2, customerID);
                pstmt.executeUpdate();
            } catch (SQLException e) {
                e.printStackTrace();
            workPhone = number;
        public String getWorkPhone() {
            return workPhone;
        public void setEmail(String email) {
            try {
                PreparedStatement pstmt = con.prepareStatement("UPDATE Customer" + " SET Email = ? WHERE CustomerID = ?");
                pstmt.setString(1, email);
                pstmt.setString(2, customerID);
                pstmt.executeUpdate();
            } catch (SQLException e) {
                e.printStackTrace();
            this.email = email;
        public String getEmail() {
            return email;
        public void setUnitNum(String num) {
            try {
                PreparedStatement pstmt = con.prepareStatement("UPDATE Address" + " SET UnitNum = ? WHERE AddressId = ?");
                pstmt.setString(1, num);
                pstmt.setString(2, addressID);
                pstmt.executeUpdate();
            } catch (SQLException e) {
                e.printStackTrace();
            unitNum = num;
        public String getUnitNum() {
            return unitNum;
        public void setCity(String city) {
            try {
                PreparedStatement pstmt = con.prepareStatement("UPDATE Address" + " SET City = ? WHERE AddressId = ?");
                pstmt.setString(1, city);
                pstmt.setString(2, addressID);
                pstmt.executeUpdate();
            } catch (SQLException e) {
                e.printStackTrace();
            this.city = city;
        public String getCity() {
            return city;
        public void setStreetNum(String num) {
            try {
                PreparedStatement pstmt = con.prepareStatement("UPDATE Address" + " SET StreetNum = ? WHERE AddressId = ?");
                pstmt.setString(1, num);
                pstmt.setString(2, addressID);
                pstmt.executeUpdate();
            } catch (SQLException e) {
                e.printStackTrace();
            streetNum = num;
        public String getStreetNum() {
            return streetNum;
        public void setStreetName(String name) {
            try {
                PreparedStatement pstmt = con.prepareStatement("UPDATE Address"
                                              + " SET StreetName = ? WHERE AddressId = ?");
                pstmt.setString(1, name);
                pstmt.setString(2, addressID);
                pstmt.executeUpdate();
            } catch (SQLException e) {
                e.printStackTrace();
            streetName = name;
        public String getStreetName() {
            return streetName;
        public void setZipPostalCode(String code) {
            try {
                PreparedStatement pstmt = con.prepareStatement("UPDATE Address"
                                              + " SET ZipPostalCode = ? WHERE AddressId = ?");
                pstmt.setString(1, code);
                pstmt.setString(2, addressID);
                pstmt.executeUpdate();
            } catch (SQLException e) {
                e.printStackTrace();
            zipPostalCode = code;
        public String getZipPostalCode() {
            return zipPostalCode;
        public CustomerInfo getInfo(){
            return info;
        static void deleteCustomer(String customerId) {
            try{
                PreparedStatement pstmt = con.prepareStatement("DELETE FROM Customer" +
                        " WHERE CustomerId = ?");
                pstmt.setString(1, customerId);
                pstmt.executeUpdate();
            }catch(SQLException e){
                e.printStackTrace();
        static void updateCustomer(CustomerInfo custInf) {
            try{
                PreparedStatement pstmt = con.prepareStatement("UPDATE customer" +
                        " SET firstName = ?, SET lastName = ?," +
                        " SET homePhone = ?, SET workPhone = ?, SET email = ?" +
                        " WHERE CustomerId = ?");
                pstmt.setString(1, custInf.getFirstName());
                pstmt.setString(2, custInf.getLastName());
                pstmt.setString(3, custInf.getHomePhone());
                pstmt.setString(4, custInf.getWorkPhone());
                pstmt.setString(5, custInf.getEmail());
                pstmt.setString(6, custInf.getCustomerID());
                pstmt.executeUpdate();
                pstmt = con.prepareStatement("UPDATE address" +
                        " SET unitNum = ?, SET StreetNum = ?, SET StreetName = ?," +
                        " SET city = ?,SET Province = ?,SET country = ?,SET ZipPostalCode = ?" +
                        " WHERE AddressId = ?");
                pstmt.setString(1, custInf.getUnitNum());
                pstmt.setString(2, custInf.getStreetNum());
                pstmt.setString(3, custInf.getStreetName());
                pstmt.setString(4, custInf.getCity());
                pstmt.setString(5, custInf.getProvinceState());
                pstmt.setString(6, custInf.getCountry());
                pstmt.setString(7, custInf.getZipPostalCode());
                pstmt.setString(8, custInf.getAddressID());
                pstmt.executeUpdate();
            }catch(SQLException e){
                e.printStackTrace();
    }In addition, here is my customer sql table.
    -- Table structure for table `customer`
    DROP TABLE IF EXISTS `customer`;
    CREATE TABLE `customer` (
    `CustomerID` mediumint(9) NOT NULL auto_increment,
    `FirstName` varchar(20) NOT NULL,
    `LastName` varchar(20) NOT NULL,
    `HomePhone` varchar(11) NOT NULL,
    `WorkPhone` varchar(11) default NULL,
    `Email` varchar(20) NOT NULL,
    `AddressID` mediumint(9) default NULL,
    PRIMARY KEY (`CustomerID`),
    KEY `AddressID` (`AddressID`),
    CONSTRAINT `customer_ibfk_1` FOREIGN KEY (`AddressID`) REFERENCES `address` (`AddressID`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
    -- Dumping data for table `customer`
    LOCK TABLES `customer` WRITE;
    /*!40000 ALTER TABLE `customer` DISABLE KEYS */;
    /*!40000 ALTER TABLE `customer` ENABLE KEYS */;
    UNLOCK TABLES;

    to the best of my knowledge, this is something related to the database and not the programming. If you'd want to be the only user to read and edit the table, speicify only one user with that privilege and make it password protected. User must enter the password to write to the tables.

  • How to use the table maintenance events for validating the input entries..?

    Hi,
    I have created a Z table with 6 fields in which all are KEY fields. All are of CHAR type. I have created the Table Maintenance Generator for the same. While maintaining the entries in the table, even though I maintain a blank entry for a field it is saving the entry. But, I don't want that way. All the fields are mandatory in my table. One should enter all the fields. Otherwise it should not allow to save the entry. So, I think it can be done using the Table Maintenance Events. can someone tell me how to use the Table Maintenance Events. and which event to use for my reuqirement and what is the logic to be written.
    Or Is there any other way to solve my problem.
    Please share your inputs. Thanks in advance.
    Best regards,
    paddu.

    In the table maintenance generator, Environment --> Modifications --> Events then a screen will be appear here,we need to create the Events.In the EVENTS screen, press new Entries, there give 01(Before Saving the Data in the Database) and give a name(This will become a PERFORM), then click the Editor pushbutton, this will be there at the right side of the entry, then a popup will be appear, you can create an include program, there inside of the include program write ur code.
    Here is documentation for Event 01(Before Saving the Data in the Database )
    Event 01: Before Saving the Data in the Database
    Use
    This event occurs before new, changed or deleted entries are written to the database. Other activities can be performed, for example:
    hidden entry processing
    fill hidden fields
    flag data to be written to hidden tables after the database change.
    To have the changes saved by the central maintenance dialog routines, SY-SUBRC must be set to 0 at the end of the routine.
    Realization
    This event has no standard routine. The following global data is available for the realization of the user routine:
    internal table TOTAL
    field symbols
    field symbols <ACTION> and <ACTION_TEXT>
    <STATUS>-UPD_FLAG
    If internal table data are to be changed before saving, t he changes should be made in both the internal table TOTAL and in the internal table EXTRACT.
    FORM abc.
    DATA: F_INDEX LIKE SY-TABIX. "Index to note the lines found
    LOOP AT TOTAL.
    IF <ACTION> = desired constant.
    READ TABLE EXTRACT WITH KEY <vim_xtotal_key>.
    IF SY-SUBRC EQ 0.
    F_INDEX = SY-TABIX.
    ELSE.
    CLEAR F_INDX.
    ENDIF.
    (make desired changes to the line TOTAL)
    MODIFY TOTAL.
    CHECK F_INDX GT 0.
    EXTRACT = TOTAL.
    MODIFY EXTRACT INDEX F_INDX.
    ENDIF.
    ENDLOOP.
    SY-SUBRC = 0.
    ENDFORM.
    Regards,
    Joy.

  • How do I get my table of Images to take the desired layout?

    I am currently creating a web page as part of my learning of html and css, it is a bookmark page with the sites I visit most frequently. The main section of the page is a table of images which are linked to their respective sites, the table is 4 columns by 3 rows. My problem is when in the design window it appears as it should but when I press the live button and when I preview it in a browser all of the images go into one column down the left side of the page. How can I remedy this?
    Any help is greatly appreciated.
    Thanks.

    Thanks for the reply, I will try to copy and paste my code into the space below.
    My HTML:
    <!doctype html>
    <html class="">
    <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Bookmark</title>
    <link href="boilerplate.css" rel="stylesheet" type="text/css">
    <link href="stylesheet.css" rel="stylesheet" type="text/css">
    <!--[if lt IE 9]>
    <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <script src="respond.min.js"></script>
    </head>
    <body>
    <div class="gridContainer clearfix">
    <header id="top" class="fluid"> <img src="images/logo.png" alt="Bookmark"/>
       <nav id="mainNav" class="fluid">
          <ul id="menuSystem" class="fluid fluidList">
            <li class="fluid menuItem zeroMargin_desktop">Home</li>
            <li class="fluid menuItem">About</li>
            <li class="fluid menuItem">Add</li>
            <li class="fluid menuItem hide_mobile">Contact</li>
          </ul>
    </nav>
    </header>
    <div id="page" class="fluid">
      <table width="100%" height="392" border="0" cellpadding="1" cellspacing="1">
       <tr>
         <td><a href="http://www.google.com"><img src="images/icons/google.png" width="212" height="218"/></a></td>
         <td><a href="http://www.bbc.co.uk"><img src="images/icons/bbc.png"/></a></td>
         <td><a href="http://www.codeacademy.com"><img src="images/icons/codeacademy.jpg"/></a></td>
         <td><a href="http://www.nba.com"><img src="images/icons/nba.jpg"/></a></td>
        </tr>
       <tr>
         <td><a href="http://www.facebook.com"><img src="images/icons/facebook.png"/></a></td>
         <td><a href="http://www.espn.com"><img src="images/icons/espn.png"/></a></td>
         <td><a href="http://www.twitter.com"><img src="images/icons/twitter.png"/></a></td>
         <td><a href="http://www.celticfc.net/mainindex"><img src="images/icons/celtic.png"/></a></td>
        </tr>
       <tr>
         <td><a href="http://www.youtube.com"><img src="images/icons/youtube.png"/></a></td>
         <td><a href="http://www.collegehumour.com"><img src="images/icons/collegehumour.png"/></a></td>
         <td><a href="http://www.skysports.com"><img src="images/icons/skysports.png"/></a></td>
         <td><a href="http://www.nbcnews.com/id/3032619/"><img src="images/icons/nbcnightlynews.png"/></a></td>
        </tr>
      </table>
    </div>
    <footer id="bottom" class="fluid"></footer>
    </div>
    </body>
    </html>
    My CSS (for the larger screens i.e. min-width:769px) is:
    @charset "utf-8";
    img, object, embed, video {
    width: auto;
    height: auto;
    display: block;
    padding-left: 2px;
    padding-right: 2px;
    padding-top: 2px;
    padding-bottom: 2px;
    margin-top: 2px;
    margin-right: 2px;
    margin-bottom: 2px;
    margin-left: 2px;
    .ie6 img {
    width:100%;
    .fluid {
    clear: both;
    margin-left: 0;
    width: 100%;
    float: left;
    display: block;
    .fluidList {
        list-style:none;
        list-style-image:none;
        margin:0;
        padding:0;       
    .gridContainer {
    width: 98.3333%;
    max-width: 1232px;
    padding-left: 0.8333%;
    padding-right: 0.8333%;
    margin: auto;
    clear: none;
    float: none;
    margin-left: auto;
    #top {
    #mainNav {
    #menuSystem {
    .menuItem {
    width: 23.7288%;
    margin-left: 1.6949%;
    clear: none;
    background-color: #393737;
    color: #FFFFFF;
    font-family: Consolas, "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", Monaco, "Courier New", monospace;
    font-style: normal;
    font-weight: 700;
    display: block;
    #page {
    margin-left: 0;
    clear: both;
    width: 100%;
    #iconMenu {
    .bookmarkItem {
    list-style-type: none;
    width: 32.2033%;
    margin-left: 0;
    clear: both;
    #div1 {
    margin-left: 0;
    clear: both;
    #bottom {
    background-image: url(images/headerback.png);
    .zeroMargin_desktop {
    margin-left: 0;
    .hide_desktop {
    display: none;

Maybe you are looking for

  • HT4009 I didn't receive my in app purchase of extra stars, but I have been charged for it!

    Using the Egg vs Chicken app yesterday I tried to purchased a bucket of stars in the app for $15.99, however, the stars didn't appear but I have been charged for them, twice! How do I go about getting a refund or getting the stars?

  • Query strings?

    Hey, I'm fairly new to html and web design, but I'm wondering: why does Muse add query strings on every static resource url? There must be a reason I don't understand, but removing them all manually works, thus my question. Thx in advance for the ans

  • Execution of query in background

    Hi, We are using excel report output. We are facing issue of longer report runtime, when we run the report for the first time after data load. There on, the further runs are not taking that a long, to get the report output. We have been observing thi

  • Trinidad / Weblogic

    I'm trying partial page rendering using Trinidad, Sun's JSF 1.2 , with Weblogic 10. In using a simple command button and output text, the managed bean's method as part of the command button's actionListener is not working (and not being called) It wo

  • Pass json result of rest webservice into page items

    Hello, I have created a webservice reference, and a from with report on that webservice. I fill in a zipcode and click submit and the results will put in a collection. The response is a json object and is stored in the CLOB001 column of the collectio