What are the external events in report programming

hi
experts
pz help me for this qn

Chk this.
http://help.sap.com/saphelp_nw70/helpdata/en/9f/db9a0735c111d1829f0000e829fbfe/content.htm

Similar Messages

  • What are the external events of a report?

    Hi,
    Please tell me if you have any idea about what are the external events of a Report?
    Thanks in advance.
    MD.

    Hi,
       When you run an executable program, the program flow is controlled by the external events in the ABAP runtime environment. The following diagram shows the sequence of the events:
    check this link for more....
    http://help.sap.com/saphelp_nw70/helpdata/en/9f/db99fa35c111d1829f0000e829fbfe/content.htm
    Regards,
    Shanthi.P
    Reward points if useful ***

  • Which is the mandatory event in report program?

    which is the mandatory event in report program?
    Plz its urgent

    Hi,
    Its true, there is no mandatory event in a report program as such. You use events to organize your statements and control the flow of your program.
    For eg, following are some of the events used with their purpose :
    First event -
    Initialization : triggered when the report is loaded in memory.
    At selection-screen output : triggered when the selection screen is loaded in memory before being displayed.
    At selection-screen : before leaving the selection screen.
    start-of-selection : the first event for displaying the report.
    end-of-selection : after the start-of-selection is completed.
    classiscal report events.
    top-of-page : every time a new page is started in the list.
    end-of-page : every time the list data reaches the footer region of the page.
    interactive report events.
    top of page during line selection : top of page event for secondary list.
    at line-selection : evey time user dbl-clicks(F2) on the list data.
    at pF<key> : function key from F5 to F12 to perform interactive action on the list.
    at user-command
    And If the program contains no explicitly defined event blocks, all the statements in the program form the entire event block START-OF-SELECTION, which need not be defined explicitly but is taken by default.
    Hope it helps.

  • What are the best practice in report design ?

    Hi,
    According to you, what are the best practices in report desing about layout, fonts and colors ?
    Thks

    Hi,
    It all depends that what type of report you are designing and what tool you are using - WebI or Crystal.
    And in WebI, if it is cross tab or Tabular report etc.
    One most important thing is that what is client requirement. May be client does not like which is best practice.
    On the base of my personal experience I will create few demo reports using different options - layout, colors and fonts and show them to client so that they may decide.
    Regards,
    Bashir Awan

  • What are the common errors in reporting and extraction.

    hi friends,
    what are the common errors in reporting and extraction for implementation and support projects.
    thanking u
    suneel.

    Hi Suneel,
    Errors in reporting are like incorrect query creation, errors in creating RKF, CKF and variables, misunderstanding the data, or errors with other tools like broadcasting. Errors in extraction relate to source system connectivity, field-infoobject mapping, incorrect code etc. Also, please search the forums and you will find many real time examples.
    Hope this helps...

  • What are the 5 Most Useful Shareware programs you've come across?

    I wanted to lighten the mood on the forum with all of the complaints about the MBP with something potentially useful to current users as well as potential users like myself. I was just wondering what were the 5 most useful shareware programs people have come across for their MBP? It can range from security add ons, or networking tricks, really anything that saves you a few minutes of your day that you think sets your MBP apart from other MBPs and other portables in general.
    Oh, and please try not to include the macsaber....yes it was funny...the first 10 threads....

    1. Radio widget from WU: http://radiotuner.wuersch.net/
    you can just add any radion stream (url), they also have a list on their website (needs real player)
    2. Transmit (very user friendly FTP)
    3. Macjanitor (keeps the system tidy)
    4. VLC player (plays most media extensions)
    5. Skype (Phone any lan or mobile in the world from you mac/pc for a fraction of the cost, as well as normal chat)
    Actually i think most of that lot is freeware apart from Transmit; bargain!
    honorable mention for Appzapper, SuperDuper, google earth and firefox.
    hehe, mactheripper made me giggle - great name..

  • HT5219 What are the external monitor requirements that can support having two windows email and safari open side by side?

    I have a 27" iMac at home that supports this but would like to see if I can enable my Macbook air to do the same thing.  I want to find out if this capability can be supported with my Macbook air and if so what are the monitor requirements.

    Usually two causes of that, the first being the windows dpi scaling (most common cause) and the second being your graphics card driver needs to be updated.
    Try playing with the windows dpi settings
    Right click on your Desktop and select Screen Resolution
    Then in the screen that comes up, click on Make Text or Other Items Larger or Smaller
    Then move the slider under Change the Size of All Items to Smaller and restart windows 8
    Also, you can try clicking on Let me choose one scaling level for all my displays, then click on Custom sizing options and drag on the rulers to set 149% and see if that is any better.

  • What are the main events that are used in an alvreport?

    hi
    experts can u help me for this

    Hi
    REUSE_ALV_EVENTS_GET
    Description
    This table tells ALV which events are processed by the caller by CALLBACK.
    The table of possible events per list type can be initialized using the module REUSE_ALV_EVENTS_GET.
    You can display the names of the constants in the type pools SLIS which represent the individual events using the individual test function in the function module
    REUSE_ALV_EVENT_NAMES_GET. Only events with a form routine name are processed.
    The table structure contains the fields:
    •     IT_EVENTS-NAME
    Name of the Callback event.
    Possible Callback events:
    •     Action
    USER_COMMAND USING R_UCOMM LIKE SY-UCOMM RS_SELFIELD TYPE SLIS_SELFIELD
    Process actions on the list
    As this is a frequently-used Callback event, the form routine can also be passed directly in the interface in the IMPORTING parameter I_CALLBACK_USER_COMMAND.
    PF_STATUS_SET USING RT_EXTAB TYPE SLIS_T_EXTAB
    If a user list status is to be set, it must be done in the form routine assigned to this event. The ALV function codes, which must not be active, are in the Parameter RT_EXTAB. This table must be passed with the SET PF-STATUS command (with inactive user function codes as well, if necessary).
    The STANDARD status of the function group SALV should be used as a template for a user-specific status.
    As this is a frequently-used Callback event, its form routine can also be passed directly in the interface in the IMPORTING parameter I_CALLBACK_PF_STATUS_SET.
    ITEM_DATA_EXPAND USING RS_SELFIELD TYPE SLIS_SELFIELD RFLG_ALL TYPE C
    Only relevant for hierarchical-sequential lists using the layout parameter IS_LAYOUT-EXPAND_FIELDNAME of the structure IS_LAYOUT.
    Exit for passing item entries (ITEM table) for a header record which was expanded interactively by the user.
    RS_SELFIELD-TABINDEX contains the header table index for which the item entries are to be put in the global item output table (T_OUTTAB_SLAVE). The Callback is only called if ALV has no items for a header which is to be expanded.
    RFLG_ALL is passed with 'X' if the user shows all items. The application must ensure that entries are not repeated in the item table. RS_SELFIELD is initial in this case.
    CALLER_EXIT USING RS_DATA Is called at the beginning of the function module to make special settings. It is not usually used.
    •     List processing events
    IMPORTANT: The application Callback routine must not manipulate the internal output table and/or its header record. This restriction applies to all Callbacks which are called in the list output and run under the 'List processing events'.
    TOP_OF_LIST no USING parameter. Information output at the start of the list
    END_OF_LIST no USING parameter. Information output at the end of the list
    TOP_OF_PAGE no USING parameter
    Equivalent to the list processing TOP-OF-PAGE event
    END_OF_PAGE no USING parameter. Not available for hierarchical-sequential lists.
    Information output at the end of a page. This is only called for printing.
    TOP_OF_COVERPAGE no USING parameter
    The selection information and list status are output together (if they exist) on a separate page by default. See also the documentation of the parameters:
    IS_PRINT-NO_COVERPAGE
    IS_PRINT-NO_PRINT_SELINFOS
    IS_PRINT-NO_PRINT_LISTINFOS
    IS_LAYOUT-GET_SELINFOS
    The user can format the header area of the 'cover page' himself or herself by specifying a Callback routine for this event.
    END_OF_COVERPAGE no USING parameter
    Analogously to TOP_OF_COVERPAGE the user can add other information to the information output by ALV (selection information, list status) at this event.
    FOREIGN_TOP_OF_PAGE no USING parameter
    The Top-of-page event is always processed in ALV and is only passed to the caller via the Callback mechanism. This is still the case if the caller, e.g. by a user action, processes a branch list which was not formatted by ALV (e.g. a popup with additional information about the list record selected and displayed by ALV).
    In this case, top-of-page cannot be formatted by ALV analogously to the basic list, it must be handled completely by the caller. The event top-of-page still occurs in ALV. When ALV notices a top-of-page which was not caused by an ALV output, the form routine in FOREIGN_TOP_OF_PAGE is called.
    FOREIGN_END_OF_PAGE no USING parameter
    The event end-of-page is always processed in ALV and only passed to the caller via callback. This is still the case, e.g. when the caller processes a details list which was not formatted by ALV (e.g. a popup with further information about selected list records which were displayed by ALV).
    In this case, end-of-page cannot be formatted by ALV analogously to the basic list, it must be handled completely by the caller. The event end-of-page still occurs in ALV. When ALV notices an end-of-page that was not caused by an ALV output, the form routine in FOREIGN_END_OF_PAGE is called.
    BEFORE_LINE_OUTPUT USING RS_LINEINFO TYPE SLIS_LINEINFO
    Output information before each output line. Should only be used in justified cases because it costs a lot of performance.
    AFTER_LINE_OUTPUT USING RS_LINEINFO TYPE SLIS_LINEINFO
    Output information after each output line. Should only be used in justified cases because it costs a lot of performance.
    •     Internal use only
    LIST_MODIFY USING R_TABNAME TYPE SLIS_TABNAME
    R_INDEX LIKE SY-TABIX
    R_INDEX_ITEM LIKE SY-TABIX
    R_INDEX_SUM LIKE SY-TABIX
    •     IT_EVENTS-FORM
    Name of the form routine which should be called in the calling program at the event.
    Field_catalog:
    Field catalog with field descriptions
    2.7.1.     Description
    Field catalog containing descriptions of the list output fields (usually a subset of the internal output table fields). A field catalog is required for every ALV list output.
    The field catalog for the output table is built-up in the caller's coding. The build-up can be completely or partially automated by calling the REUSE_ALV_FIELDCATALOG_MERGE module
    See also the documentation of the function module REUSE_ALV_FIELDCATALOG_MERGE.
    The minimal field catalog is documented under 'default'. The caller can use the other optional parameters to assign output attributes to a field which differ from the default.
    A field catalog need not be built-up and passed explicitly only under the following conditions:
    •     The internal table to be output has the same structure as a Data Dictionary structure which is referred to in the internal table declaration using LIKE or INCLUDE STRUCTURE.
    •     all fields in this structure are to be output
    •     the structure name is passed to ALV in the parameter I_STRUCTURE_NAME.
    See also the documentation of the IMPORTING paramter I_STRUCTURE_NAME.
    Positioning
    •     row_pos (row position)
    value set: 0, 1 - 3
    Only relevant if the list output is to be multi-line (two or three lines) by default.
    A multi-line list can also be defined by the user interactively if the default list is one-line.
    The parameter specifies the relative output line of the column in a multi-line list.
    •     col_pos (column position)
    value set: 0, 1 - 60
    only relevant when the default relative column positions differ from the field catalog field sequence. The parameter specifies the relative column position of the field in the list output. The column order can be changed interactively by the user. If this parameter is initial for all field catalog entries, columns appear in the field catalog field sequence.
    Identification
    •     fieldname (field name)
    value set: internal output table field name (required parameter)
    Name of the internal output table field which is described by this field catalog entry
    •     tabname (internal output table)
    value set: SPACE, internal output table name
    This parameter is used in 'manual' field catalog build-up only for hierarchical-sequential lists.
    Name of the internal output table which contains the field FIELDCAT-FIELDNAME.
    Data Dictionary reference
    •     ref_fieldname (reference field name)
    value set: SPACE, Data Dictionary field name
    Name of the Data Dictionary field referred to.
    This parameter is only used when the internal output table field described by the current field catalog entry has a reference to the Data Dictionary (not a program field), and the field name in the internal output table is different from the name of the field in the Data Dictionary. If the field names are identical, naming the Data Dictionary structure or table in the FIELDCAT-REF_TABNAME parameter is sufficient.
    •     ref_tabname (reference table/structure field name)
    value set: SPACE, name of a Data Dictionary structure or table
    Structure or table name of the referred Data Dictionary field.
    This parameter is only used when the internal output table field described by the current field catalog entry has a Data Dictionary reference (not a program field).
    Reference to fields with currency/measurement unit
    Each internal output table sum or quantity field whose decimal places are to be formatted appropriately for the unit in the list must follow the convention:
    •     the field is of data type QUAN or CURR (internal type P) (the field must really have this physical data type. Overwriting the physical data type with the parameter FIELDCAT-DATATYPE has no effect)
    •     There is a field in the internal output table which contains the associated unit.
    •     There is also an entry in the field catalog for the unit field.
    (If the unit is not to appear as a column in the list, and cannot be interactively displayed as a column, e.g. because it is always unambiguous and is therefore explicitly output by the caller in the list header, the field catalog units field entry can take the parameter FIELDCAT-TECH = 'X'.
    The association of a value field to a unit affects the output as follows:
    •     appropriate decimal places display for the unit
    •     an initialized field with a link to a non-initial unit is output as '0' for the unit (if FIELDCAT-NO_ZERO is initial). When this field is summed, this unit affects whether the units are homogeneous.
    •     an initialized field with a link to an initial unit is output as SPACE. When this field is summed, the unit SPACE does not affect the homogeneity of the units.
    •     When non-initial fields with an initial unit are summed, the unit SPACE is considered to be a unit.
    Link to currency unit
    •     cfieldname (currency unit field name)
    value set: SPACE, output table field name
    Only relevant for amount columns with associated unit.
    Name of the internal output table field containing the currency unit associated with the amount field FIELDCAT-FIELDNAME. The field in FIELDCAT-CFIELDNAME must have its own field catalog entry.
    •     ctabname (internal currency unit field output table)
    value set: SPACE, output table field name
    only relevant for hierarchical-sequential lists
    Name of the internal output table containing the FIELDCAT-CFIELDNAME field.
    Link to measurement unit
    •     qfieldname (measurement unit field name)
    value set: SPACE, output table field name
    only relevant for quantity columns with unit link.
    Name of the internal output table field containing the measurement unit associated with the quantity field FIELDCAT-FIELDNAME.
    The field in FIELDCAT-QFIELDNAME must have its own field catalog entry.
    •     qtabname (internal measurement unit field output table)
    value set: SPACE, output table field name
    only relevant for hierarchical-sequential lists
    Name of the internal output table containing the FIELDCAT-QFIELDNAME field.
    Column output options
    •     outputlen (column width)
    value set: 0 (initial), n
    For fields with a Data Dictionary link this parameter can be left initial.
    For fields without a Data Dictionary link (program field) the parameter must be given the value of the desired field list output length (column width).
    initial = column width is the output length of the referred Data Dictionary field (domain).
    n = column width is n characters
    •     key (key column)
    value set: SPACE, 'X'           'X' = kex field (key field output in color)
    Key fields can not be interactively hidden. Parameter FIELDCAT-NO_OUT must be left initial.
    For exceptions see the documentation of the FIELDCAT-KEY_SEL parameter.
    •     key_sel (hideable key column)
    value set: SPACE, 'X'
    only relevant when FIELDCAT-KEY = 'X'
    Key field which can be hidden interactively.
    The key column sequence cannot be changed interactively by the user.
    The output is controlled by the FIELDCAT-NO_OUT parameter analogously to non-key fields.
    •     no_out (field in field list)
    value set: SPACE, 'X'          'X' = field is not displayed in the current list.
    The user can interactively choose the field for output from the field list.
    The user can display the contents of these fields at line level using the 'Detail' function.
    See also the 'Detail screen' documentation of the parameter IS_LAYOUT.
    •     tech (technical field)
    value set: SPACE, 'X'          'X' = technical field
    Field cannot be output in the list and cannot be displayed interactively.
    Field can only be used in the field catalog (not in IT_SORT, ...).
    •     emphasize (highlight columns in color)
    value set: SPACE, 'X' or 'Cxyz' (x:'1'-'9'; y,z: '0'=off '1'=on)
    'X' = column is colored with the default column highlight color.
    'Cxyz' = column is colored with a coded color:
    •     C: Color (coding must begin with C)
    •     x: color number
    •     y: bold
    •     z: inverse
    •     hotspot (column as hotspot)
    value set: SPACE, 'X'
    'X' = column cells are output as hotspots
    •     fix_column (fix column)
    value set: SPACE, 'X'
    Not relevant for block lists (output of several lists consecutively)
    'X' = column fixed (does not scroll horizontally)
    All columns to be fixed must have this flag, starting from the left. If a column without this flag is output, only the columns to the left of this column are fixed. The user can change the column fixing interactively. See also the documentation of the Layout parameter
    IS_LAYOUT-NO_KEYFIX of the IMPORTING paramter IS_LAYOUT.
    •     do_sum (sum over column)
    value set: SPACE, 'X'           'X' = a sum is to be calculated over this internal output table field.
    This function can also be called by the user interactively.
    •     no_sum (sums forbidden)
    value set: SPACE, 'X'          'X' = no sum can be calculated over this field, although the data type of the field would allow summing.
    •     input (column ready for input)
    Function not available
    Format column contents
    •     icon
    value set: SPACE, 'X'           'X' = column contents to be output as an icon.
    The caller must consider the printability of icons.
    •     symbol
    value set: SPACE, 'X'          'X' = column contents are to be output as a symbol.
    The internal output table column must be a valid symbol character.
    The caller must consider the printability of symbols.
    Symbols can usually be printed, but may not always be output correctly, depending on the printer configuration.
    •     just (justification)
    value set: SPACE, 'R', 'L', 'C'
    Only relevant for fields of data type CHAR or NUMC
    ' ' = default justification for this data type
    'R' = right-justified output
    'L' = left-justified output
    'C' = centered output
    The justification of the column header always follows the justification of the columns. Independent justification of the column neader is not possible.
    •     lzero (leading zeros)
    value set: SPACE, 'X'
    Only relevant for fields of data type NUMC
    ALV outputs NUMC fields right-justified without leading zeros by default.
    'X' = output with leading zeros
    Note: If a NUMC field is output left-justified or centered by FIELDCAT-JUST, leading zeros are output. If the output of leading zeros is suppressed by a Data Dictionary reference ALPHA conversion exit, the output is always left-justified.
    •     no_sign (no +/- sign)           Only relevant for value fields
    value set: SPACE, 'X'     'X' = value output without +/ sign
    •     no_zero (suppress zeros)           Only relevant for value fields
    value set: SPACE, 'X'          'X' = suppress zeros
    •     edit_mask (field formatting)
    value set: SPACE, template
    template = see documentation of WRITE formatting option USING EDIT MASK template
    The output conversion conv can be made by template = '== conv'.
    Texts
    The following text parameters should be specified for program fields without a Data Dictionary reference. The texts are taken from the Data Dictionary for fields with a Data Dictionary reference. If this is not desired, the text parameters can also be specified. The Data Dictionary texts are then ignored. If the user changes the column width interactively, the column header text with the appropriate length is always used. The interactive function 'Optimize column width' takes account of both the field contents and the column headers: if all field contents are shorter than the shortest column header, the column width depends on the column header.
    The 'long field label' is also used in display variant definition, sort, etc. popups.
    •     seltext_l (long field label)
    •     seltext_m (medium field label)
    •     seltext_s (short field label)
    •     reptext_ddic (header)
    analogous to the Data element maintenance 'Header'
    The specified text is not necessarily output in the list, an optimum among all texts is sought.
    •     ddictxt (specify text)
    value set: SPACE, 'L', 'M', 'S'
    You can specify with values 'L', 'M', and 'S', the keyword that should always be used as column header. If the column width changes, no attempt is made in this case to find an appropriate header for the new output width.
    Parameters for program fields without Data Dictionary reference
    see also 'Text' parameters
    •     datatype (data type)
    value set: SPACE, Data Dictionary data type (CHAR, NUMC,...)
    Only relevant for fields without Data Dictionary reference
    Program field data type
    •     ddic_outputlen (external output length)
    value set: 0 (initial), n
    Only relevant for fields without Data Dictionary reference whose output is nevertheless to be modified by a conversion exit.
    Prerequisites:
    •     FIELDCAT-EDIT_MASK = '==conv'
    see also the documentation of the parameter FIELDCAT-EDIT_MASK
    •     FIELDCAT-INTLEN = n
    see also the documentation of the parameter FIELDCAT-INTLEN
    n = external format field output length
    The column width FIELDCAT-OUTPUTLEN need not be the same as the external format output length (FIELDCAT-DDIC_OUTPUTLEN).
    •     intlen (internal output length)
    value set: 0 (initial), n
    Only relevant for fields without Data Dictionary reference whose output is nevertheless to be modified by a conversion exit.
    Prerequisites:
    •     FIELDCAT-EDIT_MASK = '==conv'
    see also the documentation of the parameter FIELDCAT-EDIT_MASK
    •     FIELDCAT-DDIC_OUTPUTLEN = n
    see also the documentation of the parameter FIELDCAT-DDIC_OUTPUTLEN
    n = internal format field output length
    •     rollname (data element)
    value set: SPACE, Data Dictionary data element name
    F1 help can be provided for a program field without a Data Dictionary reference, or F1 help which differs from the Data Dictionary help can be provided for a field with a Data Dictionary reference, using this parameter.
    When F1 help is called for this field, the documentation of the specified data element is displayed.
    If the FIELDCAT-ROLLNAME is initial for fields with a Data Dictionary reference, the documentation of the data element of the referred Data Dictionary field is output.
    Others
    •     sp_group (field group key)
    value set: SPACE, CHAR(1)
    Field group key.
    Keys are assigned to group names in the IT_SPECIAL_GROUPS parameter (see also the documentation of the parameter IT_SPECIAL_GROUPS).
    When such an assignment is made in the field catalog and in IT_SPECIAL_GROUPS, the fields are grouped correspondingly in the display variant popup.
    •     reprep (Report/Report interface selection criterion)
    value set: SPACE, 'X'
    Prerequisites:
    •     The system contains the Report/Report interface (function group RSTI, table TRSTI)
    •     Parameter LAYOUT-REPREP = 'X'
    (see also the documentation of the parameter LAYOUT-REPREP of the IMPORTING parameter IS_LAYOUT )
    'X' = When the Report/Report interface is called, the value of this field is passed in the selected interface start record as a selection criterion.
    2.7.2.     Default
    •     The following entries are usually sufficient for internal table fields with a reference to a field defined in the Data Dictionary :
    •     fieldname
    •     ref_tabname
    Notes:
    ALV gets the remaining information from the Data Dictionary.
    If no relative column position (COL_POS) is specified, the fields are output in the list in the order in which they were added to the field catalog.
    REF_FIELDNAME need only be specifid when the name of the internal table field differs from the name of the referred Data Dictionary field.
    Information which is explicitly entered in the field catalog is not overwritten by information from the Data Dictionary.
    Priority rule:
    Entries in the field catalog have priority over differing entries in the Data Dictionary.
    •     The following entries are usually sufficient for internal table fields without a reference to the Data Dictionary (program fields):
    •     fieldname
    •     outputlen
    •     datatype
    •     seltext_s
    •     seltext_m
    •     seltext_l
    Notes:
    F1 help can be provided for program fields by assigning a data element to the parameter ROLLNAME.
    If the parameters SELTEXT_S, SELTEXT_M, SELTEXT_L, and REPTEXT_DDIC contain appropriate field labels, the program field column headers are also adjusted appropriately when the column width changes.
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • What are the standard bex analyzer reports available?

    hi all
    what are all the std reports available for fico? sd and mm?
    thanxs in advance
    regds
    hari

    Hi,
    This is the best way...and the simplest way....since it is a big question....just go Business content tab in RSA1 and there go to "query elements" option and cick on the option "select objects" this will give you all the standata BW queris based on all the BC cubes and it will not show self developed queries in you system.
    So fo MM reports go to...Infoarea "Supply Chain Management"-> "Inventory Management"....here you will see all the cubes related to MM and the reports nased on that.
    for FICO go to Infoarea FMCO Financial management and controlling.........
    Similarly you can find for SD.
    If you want to find the detailed information about all the queries .....you will have to search the help.sap.com witth the same name of the cubes and you will get various links explaining that.
    Thanks

  • What are the main parts in ABAP Programing to work in Real Time ?

    Hi
    I would like to know hat are the main/important parts in ABAP Programing to work in real time environment.
    Moderator message : Search for available information. Thread locked.
    Edited by: Vinod Kumar on Aug 1, 2011 9:50 AM

    Hi Ashok,
    There are so many programming parts such as Function modules, report programs, workflows, smartforms, webdynpro, adobe forms, scripts etc.
    In which context you want answer can you please tell ?
    Regards,
    Aabha

  • What are the mistake in this JSP program?

    Hi,all. I am a newcomer to learn JSP, and I sincerely hope somebody help me. the following is a JSP program, and I want it extract data from my database and show them on webpage as XML. But there always have some mistakes I cann't found it. Could somebody help me find out them and tell me how to correct. Thanks veeeeeeeeeeeery much!
    <%@ page contentType = "text/xml" %>
    <%@ page language="java" %>
    <%@ page import = "java.sql.* " %>
    <%@ page import = "java.io.* " %>
    <%@ page import = "javax.xml.parsers.DocumentBuilder" %>
    <%@ page import = "javax.xml.parsers.DocumentBuilderFactory" %>
    <%@ page import = "org.w3c.dom.Document" %>
    <%@ page import = "org.w3c.dom.Element" %>
    <%@ page import = "org.w3c.dom.Node" %>
    <%@ page import = "org.w3c.dom.NodeList" %>
    <%@ page extends = "Object"%>
    <html>
    <head><title>Searching Page</title></head>
    <body>
    <p><INPUT size=22 name=T1></p>
    <p><INPUT type=submit value=OK name=B3></p>
    <% Document retailerDoc = null;
    Document dataDoc = null;
    Document newDoc = null;
         try {
         DocumentBuilderFactory dbfactory = DocumentBuilderFactory.newInstance();
         DocumentBuilder docbuilder = dbfactory.newDocumentBuilder();
         retailerDoc = docbuilder.parse("RetailerXmlExtract.xml");
                   //Instantiate a new Document object
                   dataDoc = docbuilder.newDocument();
                   //Instantiate the new Document
                   newDoc = docbuilder.newDocument();
              }catch(Exception e){}
              //Retrieve the root element
              Element retailerRoot = retailerDoc.getDocumentElement();
              //Retrieve the (only) data element and cast it to Element
              Node dataNode = retailerRoot.getElementsByTagName("data").item(0);
              Element dataElement = (Element)dataNode;
              String driverName = "sun.jdbc.odbc.JdbcOdbcDriver";
              String connectURL = "jdbc:odbc:Retailer";
              Connection db = null;
              try{
                   Class.forName(driverName);
                   db = DriverManager.getConnection(connectURL);
                   catch(ClassNotFoundException e){}
                   catch(SQLException e){}
              //Create the PreparedStatement
              PreparedStatement statement = null;
              //Create the Resultset object, which ultimately holds the data retrieved
              ResultSet resultset = null;
              //Create the ResultSetMetaData object, which will holds
              //information about the ResultSet
              ResultSetMetaData resultmetadata = null;
              //Create a new element called "data"
              Element dataRoot = dataDoc.createElement("data");
              try{
                   statement = db.prepareStatement("SELECT * FROM Orders");
                   //Execute the query to populate the ResultSet
                   resultset = statement.executeQuery();
                   //Get the ResultSet information
                   resultmetadata = resultset.getMetaData();
                   //Determine the number of columns in the ResultSet
                   int numCols = resultmetadata.getColumnCount();
                   //Check for data by moving the cursor to the first record(if there is one)
                   while(resultset.next()){
                        //For each row of data, create a new element called "row"
                        Element rowEl = dataDoc.createElement("row");
                        for(int i = 1; i <= numCols; i++){
                             //For each colum index, determine the column name
                             String colName = resultmetadata.getColumnName(i);
                             //Get the column value
                             String colVal = resultset.getString(i);
                             //Determine if the last column accessed was null
                             if(resultset.wasNull()){
                                  colVal = "and up";
                             //Create a new element with the same name as the column
                             Element dataEl = dataDoc.createElement(colName);
                             //Add the data to the new element
                             dataEl.appendChild(dataDoc.createTextNode(colVal));
                             //Add the new element to the row
                             rowEl.appendChild(dataEl);
                        //Add the row to the root element
                        dataRoot.appendChild(rowEl);
              catch(SQLException e){}
              finally{
                        try{
                             db.close();
                             }catch(SQLException e){}
              //Add the root element to the document
              dataDoc.appendChild(dataRoot);
              //Retrieve the root element (also called "root")
              Element newRootInfo = (Element)retailerRoot.getElementsByTagName("root").item(0);
              //Retrieve the root and row information
              String newRootName = newRootInfo.getAttribute("name");
              String newRowName = newRootInfo.getAttribute("rowName");
              //Retrive information on element to be built in the new document
              NodeList newNodesRetailer = retailerRoot.getElementsByTagName("element");
              //Create the final root element with the name from the file
              Element newRootElement = newDoc.createElement(newRootName);
              //Retrieve all rows in the old document
              NodeList oldRows = dataRoot.getElementsByTagName("row");
              for(int i=0;i<oldRows.getLength();i++){
                   //Retrieve each row in turn
                   Element thisRow = (Element)oldRows.item(i);
                   //Create the ner row
                   Element newRow = newDoc.createElement(newRowName);
                        for(int j=0;j<newNodesRetailer.getLength();j++){
                             //For each mode in the new mapping, retrieve teh information
                             //First the new information........
                             Element thisElement = (Element)newNodesRetailer.item(j);
                             String newElementName = thisElement.getAttribute("name");
                             //Then the old information
                             Element oldElement = (Element)thisElement.getElementsByTagName("content").item(0);
                             String oldField = oldElement.getFirstChild().getNodeValue();
                             //Get the original values based on the mapping information
                             Element oldValueElement = (Element)thisRow.getElementsByTagName(oldField).item(0);
                             String oldValue = oldValueElement.getFirstChild().getNodeValue();
                             //Create the new element
                             Element newElement = newDoc.createElement(newElementName);
                             newElement.appendChild(newDoc.createTextNode(oldValue));
                             //Retrieve list of new elements
                             NodeList newAttributes = thisElement.getElementsByTagName("attribute");
                             for(int k = 0;k<newAttributes.getLength();k++){
                                  //For each new attribute, get the order information
                                  Element thisAttribute = (Element)newAttributes.item(k);
                                  String oldAttributeField = thisAttribute.getFirstChild().getNodeValue();
                                  String newAttributeName = thisAttribute.getAttribute("name");
                                  //Get the original vale
                                  oldValueElement = (Element)thisRow.getElementsByTagName(oldAttributeField).item(0);
                                  String oldAttributeValue = oldValueElement.getFirstChild().getNodeValue();
                                  //Create the new attribute
                                  newElement.setAttribute(newAttributeName, oldAttributeValue);
                             //Add the new element to the new row
                             newRow.appendChild(newElement);
                        //Add the new row to the root
                        newRootElement.appendChild(newRow);
                   //Add the new root to the document
                   newDoc.appendChild(newRootElement);
              try{
                   out.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
                   out.ptintln("<!DOCTYPE orders SYSTEM \"RetailerXml.dtd\">");
                   out.println(newRootElement.toString());
              } catch(IOException e) {}
    %>
    </body>
    </html>

    it reminded that there were some mistakes when i run this JSP program,so it must have something wrong, but due to my weak programming skills, I can not found these mistakes out. That must give me very useful help if you tell me how to solve them. thank you vrey much!

  • What are the Dynamic Events avaliable in the LabView 6.1 Event Structure?

    I recieved LabView 6.1 recently and I am working with the Event Structure, and I'm trying to figure out what Dynamic Events are avaliable in the event structure, and how to access them. If you don't understand what I'm talking about, open a new VI in LabView 6.1 and drop an event structure on the diagram. Add an event and look at the dialog box that appears on the screen, specifically the Event Sources section. The third option in this area of the screen is "grayed out" but reads "Dynamic". I'm curious what these events are, and how I access them. I'm running WinNT 4 SP6.
    Thanks,
    Chris Davis

    I believe this is part of a feature which is not yet present in LabVIEW 6.1, but may be present in a future release.

  • Quick report what are the notiifications are send out from SRM via SOST

    Hi all
    Can i have a list of messages sent out of SRM (from SRM via SOST.)
    sc completed by the buyer -
    but i want a set of all reports. so that i can decide i can filter go / no-go from srm system .
    any help is appreciated,
    what are the events are triggered notification.
    for eg. COMPLETED ...when buyer completed , requestor gets notification.
    so what are the other events. i have forgotten
    user creation too right? like that many..
    WHAT ARE THE ACTIONS IF I DO IN THE WEB , SOST entries will get created?. I KNEW BACKEND METHOD to download all sost message. but really we should know without seeing sost.
    Muthu

    You can check the fields of these tables via SE11
    Purchase Document Date  -  EKKO-BEDAT
    Item Description  -  EKPO-TXZ01
    Net price per item - EKPO-NETPR.
    Regards,
    Rich Heilman

  • What are the 'events' that are captured by a Visual Studio Workflow (PWA)

    Hello All,
    I need to understand what are the different events that Visual Studio workflow (PWA 2013) knows when it an event is triggered. As far as I know there are 3 events
    'OnProjectSubmit', 'OnProjectCommit' and “OnProjectCheckIn'.
    Are there any other events that workflow understands, especially on a click of a Save button?

    well done...
    http://www.soran.edu.iq

  • What are the major components in class?

    1)     What is the purpose of ‘load-of-program’? When it will be trigger?
    2)     Write the code for displaying the three parameters in single line with the first parameter as mandatory in the selection screen?
    3)     Which event triggered whenever the user call the function BACK, EXIT, CANCEL?
    4)     What are the major components in class?
    5)     What is the functional module is used to get popup screen for ALV reports?
    6)     Which type of pool is used to get drop-down list?
    7)     What is the tcode for creating the variant truncations?
    8)     Is it possible to call LDB’s number of times in same report?
    9)     What are the conditions to use control break statements in our report program?
    10)     What is the use of range statement?
    11)     What is the difference between normal reports and alv reports? With comparing to normal report are there any disadvantages in alv reports?
    12)     What are the components used to suppress the fields in the selection-screen?
    13)     What is the standard program to transport selection screen variants?
    14)     What is the event keyword for defining event block for reporting events?
    15)     What is the specific statement use when writing a drill down report?
    16)     What are the different tools to report data in sap?
    17)     Write the menu path to create a selection text in reports?
    18)     How do we omit the leading zero s while formatting outputs in reports?
    19)     What are the report truncations?
    20)     How do we align selection input in single row?
    21)     How do we suppress the display of input fields on selection screen?

    this forum is not for answering your interview questions...if you stucked with any realtime problem then post...please try to respect forum terms and conditions.
    Thank you.

Maybe you are looking for

  • CNTL_ERROR  in job scheduling log

    Hi experts,             i have developed a report to upload the time event data from multiple text files into  table CC1TEV. My report is having a few standard function modules. And i have scheduled the  program using SM36. Erlier i was getting run-t

  • Best way in using models & Increasing performance

    Hi all, I had some doubts in creation of model objects. 1.How many RFCs can a model object can contain? 2.I had a business senario where i had to use 4 Fm for performing a task.If i craete a single model object for this 4 Fun modules.Will it increase

  • Error running oc4j 9.0.4.0

    Hi I am getting following error when i am trying to use web application deployed in OC4J container. I tried installing JRE and J2SDK both..but, still same error. I am using J2EE 10g(9.0.4.0.0) and jdk1.3.1_09/jre1.3.1_09....and i am getting following

  • XSLT Not working Properly after Upgrade (PI 7.1)

    Hello, I have a simple XSLT to remove the namespace prefix from the payload.   1. It has been working fine before the upgrade.   2. Even after the upgrade, it works fine from the mapping editor. But it is is giving a runtime error. The message is get

  • MSE License

    Hi I am planning on installing CleanAir Wireless network, using WLC 5508, WCS(with plus license) and MSE. Can somone explaine for me wich MSE license i need to get this to work ? Regards Erik