Plz help in the code

I want to increase the number reduce the number specified in the textbox2 
Dim ip1 As Integer = TextBox1.Text
Dim ip2 As Integer = TextBox2.Text
'Dim ip3 As Integer = TextBox1.Text
'Dim ip4 As Integer = TextBox2.Text
For i = ip1 To ip2
ListBox1.Items.Add(i)
next

I don't know what "scan ip range" means. Also I haven't worked with IP addresses in a long time.
So if you mean you want to get all IP addresses between 1.5.7.6 and 1.0.0.1 then do the match for that. Get the integer from 1.0.0.1 then get the integer for 1.5.7.6. Reduce the integer for 1.5.7.6 by one and get the IP address for that integer and so on
until that integer equals the integer for 1.0.0.1. Unless that is not what you mean. And whatever "ip range" you come up with may contain invalid IP addresses since broadcast and network addresses may be included in the mix for all I know.
La vida loca
I want an example bro
You want because that is simpler than learning through research.
Also I am not your Bro. And I live in the desert now so I no longer hang out at the beach or windsurf so the word bro is unecessary as most people do not use it unless you are around a certain crowd which talks like they're hip or something. So don't call
me bro.
Here is an example.
A ListBox can not apparently display all of the results without becoming unstable which I will not attempt to explain what occurs. You can try a ListBox if you want.
Although with the previous code I provided you should have had the willpower and thoughtfulness to research on your own on how to use it rather than saying you want anybody else (specifically bro) to write the code for you. Which by doing so shows no effort
on your part to learn. As if rather than writing code you are only capable of copying and pasting code and can not learn how code works in order to use it to perform what you want to do. So either you are attempting to program outside of your skillset range
meaning you need to increase your scope of knowledge in various areas or perhaps you don't have the capability to program if you are unwilling to increase your scope of knowledge to raise your skillset to where it needs to be for what you want to program for.
Also because of the time it takes this code to run for the two IP addresses you provided it would be a good idea to use threading to offload various code into a separate thread as this freezes the UI until the code ends after displaying the result.
I will not do this for you.
Option Strict On
Imports System.Net
Imports System.IO
Imports System.Text
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Me.Location = New Point(CInt((Screen.PrimaryScreen.WorkingArea.Width / 2) - (Me.Width / 2)), CInt((Screen.PrimaryScreen.WorkingArea.Height / 2) - (Me.Height / 2)))
Label1.Text = "Waiting"
Label2.Text = "Waiting"
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
If ParseIP(TextBox1.Text) = True Then
If ParseIP(TextBox1.Text) = True Then
Label1.Text = "Waiting"
Label2.Text = "Waiting"
Dim SB As New StringBuilder
Dim TBox1IPLong As Long = ConvertIPToLong(TextBox1.Text)
Dim TBox2IPLong As Long = ConvertIPToLong(TextBox2.Text)
If TBox1IPLong > TBox2IPLong Then
Label1.Text = "Nr IP Addresses is " & (TBox1IPLong - TBox2IPLong).ToString & "."
Label2.Text = "IP scan results for ip address" & _
vbCrLf & TextBox1.Text & " to " & TextBox2.Text & "."
TBox1IPLong -= 1
Do Until TBox1IPLong = TBox2IPLong
SB.Append(ConvertLongToIP(TBox1IPLong) & vbCrLf)
TBox1IPLong -= 1
Loop
Else
Label1.Text = "Nr IP Addresses is " & (TBox2IPLong - TBox1IPLong).ToString & "."
Label2.Text = "IP scan results for ip address" & _
vbCrLf & TextBox2.Text & " to " & TextBox1.Text & "."
TBox2IPLong -= 1
Do Until TBox2IPLong = TBox1IPLong
SB.Append(ConvertLongToIP(TBox2IPLong) & vbCrLf)
TBox2IPLong -= 1
Loop
End If
RichTextBox1.Text = SB.ToString
Else
MessageBox.Show("TextBox2 contains invalid IP address. Try again.")
Exit Sub
End If
Else
MessageBox.Show("TextBox1 contains invalid IP address. Try again.")
Exit Sub
End If
End Sub
Private Function ParseIP(Item As String) As Boolean
Dim TestIP As IPAddress
Dim Result As Boolean = IPAddress.TryParse(Item, TestIP)
Return Result
End Function
Private Function ConvertIPToLong(Item As String) As Long
Dim BinaryOctet As String = ""
Dim CompleteBinary As String = ""
Dim ItemSplit() As String = Item.Split("."c)
For i = 0 To ItemSplit.Count - 1
BinaryOctet = Convert.ToString(CLng(ItemSplit(i)), 2)
If BinaryOctet.Count < 8 Then
Do Until BinaryOctet.Count = 8
BinaryOctet = BinaryOctet.Insert(0, "0")
Loop
End If
CompleteBinary &= BinaryOctet
Next
Dim Result As Long = Convert.ToInt64(CompleteBinary, 2)
Return Result
End Function
Private Function ConvertLongToIP(Info As Long) As String
Dim Temp As String = Convert.ToString(Info, 2)
If Temp.Count <> 32 Then
Do Until Temp.Count = 32
Temp = Temp.Insert(0, "0")
Loop
End If
Dim Result As String = CStr(CInt(Convert.ToInt32(Temp.Substring(0, 8), 2))) & "." & _
CStr(CInt(Convert.ToInt32(Temp.Substring(8, 8), 2))) & "." & _
CStr(CInt(Convert.ToInt32(Temp.Substring(16, 8), 2))) & "." & _
CStr(CInt(Convert.ToInt32(Temp.Substring(24, 8), 2)))
Return Result
End Function
End Class
La vida loca

Similar Messages

  • Plz send me the code of interctive ALV report

    Hi
    plz send me the code of interctive ALV report
    thanks in advance
    rachu

    Hi
    <u><b>For More alv report examples check  these Tcodes <i>LIBS, BIBS</i>Here u can find more number of examples on alv reports of different kinds</b></u>
    Check this sample code
    TYPE-POOLS: SLIS.
    *type declaration for values from ekko
    TYPES: BEGIN OF I_EKKO,
           EBELN LIKE EKKO-EBELN,
           AEDAT LIKE EKKO-AEDAT,
           BUKRS LIKE EKKO-BUKRS,
           BSART LIKE EKKO-BSART,
           LIFNR LIKE EKKO-LIFNR,
           END OF I_EKKO.
    DATA: IT_EKKO TYPE STANDARD TABLE OF I_EKKO INITIAL SIZE 0,
          WA_EKKO TYPE I_EKKO.
    *type declaration for values from ekpo
    TYPES: BEGIN OF I_EKPO,
           EBELN LIKE EKPO-EBELN,
           EBELP LIKE EKPO-EBELP,
           MATNR LIKE EKPO-MATNR,
           MENGE LIKE EKPO-MENGE,
           MEINS LIKE EKPO-MEINS,
           NETPR LIKE EKPO-NETPR,
           END OF I_EKPO.
    DATA: IT_EKPO TYPE STANDARD TABLE OF I_EKPO INITIAL SIZE 0,
          WA_EKPO TYPE I_EKPO .
    *variable for Report ID
    DATA: V_REPID LIKE SY-REPID .
    *declaration for fieldcatalog
    DATA: I_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
          WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    DATA: IT_LISTHEADER TYPE SLIS_T_LISTHEADER.
    * declaration for events table where user comand or set PF status will
    * be defined
    DATA: V_EVENTS TYPE SLIS_T_EVENT,
          WA_EVENT TYPE SLIS_ALV_EVENT.
    * declartion for layout
    DATA: ALV_LAYOUT TYPE SLIS_LAYOUT_ALV.
    * declaration for variant(type of display we want)
    DATA: I_VARIANT TYPE DISVARIANT,
          I_VARIANT1 TYPE DISVARIANT,
          I_SAVE(1) TYPE C.
    *PARAMETERS : p_var TYPE disvariant-variant.
    *Title displayed when the alv list is displayed
    DATA:  I_TITLE_EKKO TYPE LVC_TITLE VALUE 'FIRST LIST DISPLAYED'.
    DATA:  I_TITLE_EKPO TYPE LVC_TITLE VALUE 'SECONDRY LIST DISPLAYED'.
    INITIALIZATION.
      V_REPID = SY-REPID.
      PERFORM BUILD_FIELDCATLOG.
      PERFORM EVENT_CALL.
      PERFORM POPULATE_EVENT.
    START-OF-SELECTION.
      PERFORM DATA_RETRIEVAL.
      PERFORM BUILD_LISTHEADER USING IT_LISTHEADER.
      PERFORM DISPLAY_ALV_REPORT.
    *&      Form  BUILD_FIELDCATLOG
    *       Fieldcatalog has all the field details from ekko
    FORM BUILD_FIELDCATLOG.
      WA_FIELDCAT-TABNAME = 'IT_EKKO'.
      WA_FIELDCAT-FIELDNAME = 'EBELN'.
      WA_FIELDCAT-SELTEXT_M = 'PO NO.'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'IT_EKKO'.
      WA_FIELDCAT-FIELDNAME = 'AEDAT'.
      WA_FIELDCAT-SELTEXT_M = 'DATE.'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'IT_EKKO'.
      WA_FIELDCAT-FIELDNAME = 'BUKRS'.
      WA_FIELDCAT-SELTEXT_M = 'COMPANY CODE'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
    WA_FIELDCAT-TABNAME = 'IT_EKKO'.
      WA_FIELDCAT-FIELDNAME = 'BUKRS'.
      WA_FIELDCAT-SELTEXT_M = 'DOCMENT TYPE'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
    WA_FIELDCAT-TABNAME = 'IT_EKKO'.
      WA_FIELDCAT-FIELDNAME = 'LIFNR'.
      WA_FIELDCAT-NO_OUT    = 'X'.
      WA_FIELDCAT-SELTEXT_M = 'VENDOR CODE'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
    ENDFORM.                    "BUILD_FIELDCATLOG
    *&      Form  EVENT_CALL
    *   we get all events - TOP OF PAGE or USER COMMAND in table v_events
    FORM EVENT_CALL.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
       EXPORTING
         I_LIST_TYPE           = 0
       IMPORTING
         ET_EVENTS             = V_EVENTS
    *  EXCEPTIONS
    *    LIST_TYPE_WRONG       = 1
    *    OTHERS                = 2
      IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    "EVENT_CALL
    *&      Form  POPULATE_EVENT
    *      Events populated for TOP OF PAGE & USER COMAND
    FORM POPULATE_EVENT.
      READ TABLE V_EVENTS INTO WA_EVENT WITH KEY NAME = 'TOP_OF_PAGE'.
      IF SY-SUBRC EQ 0.
        WA_EVENT-FORM = 'TOP_OF_PAGE'.
        MODIFY V_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =
    WA_EVENT-FORM.
      ENDIF.
      READ TABLE V_EVENTS INTO WA_EVENT WITH KEY NAME = 'USER_COMMAND'.
      IF SY-SUBRC EQ 0.
        WA_EVENT-FORM = 'USER_COMMAND'.
        MODIFY V_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =
    WA_EVENT-NAME.
      ENDIF.
    ENDFORM.                    "POPULATE_EVENT
    *&      Form  data_retrieval
    *   retreiving values from the database table ekko
    FORM DATA_RETRIEVAL.
      SELECT EBELN AEDAT BUKRS BSART LIFNR FROM EKKO INTO TABLE IT_EKKO.
    ENDFORM.                    "data_retrieval
    *&      Form  bUild_listheader
    *       text
    *      -->I_LISTHEADEtext
    FORM BUILD_LISTHEADER USING I_LISTHEADER TYPE SLIS_T_LISTHEADER.
      DATA HLINE TYPE SLIS_LISTHEADER.
      HLINE-INFO = 'this is my first alv pgm'.
      HLINE-TYP = 'H'.
    ENDFORM.                    "build_listheader
    *&      Form  display_alv_report
    *       text
    FORM DISPLAY_ALV_REPORT.
      V_REPID = SY-REPID.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         I_CALLBACK_PROGRAM                = V_REPID
    *   I_CALLBACK_PF_STATUS_SET          = ' '
         I_CALLBACK_USER_COMMAND           = 'USER_COMMAND'
         I_CALLBACK_TOP_OF_PAGE            = 'TOP_OF_PAGE'
         I_GRID_TITLE                      = I_TITLE_EKKO
    *   I_GRID_SETTINGS                   =
    *   IS_LAYOUT                         = ALV_LAYOUT
         IT_FIELDCAT                       = I_FIELDCAT[]
    *   IT_EXCLUDING                      =
    *   IT_SPECIAL_GROUPS                 =
    *   IT_SORT                           =
    *   IT_FILTER                         =
    *   IS_SEL_HIDE                       =
    *     i_default                         = 'ZLAY1'
         I_SAVE                            = 'A'
    *     is_variant                        = i_variant
         IT_EVENTS                         = V_EVENTS
        TABLES
          T_OUTTAB                          = IT_EKKO
    * EXCEPTIONS
    *   PROGRAM_ERROR                     = 1
    *   OTHERS                            = 2
      IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    "display_alv_report
    *&      Form  TOP_OF_PAGE
    *       text
    FORM TOP_OF_PAGE.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          IT_LIST_COMMENTARY       = IT_LISTHEADER
    *    i_logo                   =
    *    I_END_OF_LIST_GRID       =
    ENDFORM.                    "TOP_OF_PAGE
    *&      Form  USER_COMMAND
    *       text
    *      -->R_UCOMM    text
    *      -->,          text
    *      -->RS_SLEFIELDtext
    FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
    RS_SELFIELD TYPE SLIS_SELFIELD.
      CASE R_UCOMM.
        WHEN '&IC1'.
          READ TABLE IT_EKKO INTO WA_EKKO INDEX RS_SELFIELD-TABINDEX.
          PERFORM BUILD_FIELDCATLOG_EKPO.
          PERFORM EVENT_CALL_EKPO.
          PERFORM POPULATE_EVENT_EKPO.
          PERFORM DATA_RETRIEVAL_EKPO.
          PERFORM BUILD_LISTHEADER_EKPO USING IT_LISTHEADER.
          PERFORM DISPLAY_ALV_EKPO.
      ENDCASE.
    ENDFORM.                    "user_command
    *&      Form  BUILD_FIELDCATLOG_EKPO
    *       text
    FORM BUILD_FIELDCATLOG_EKPO.
      WA_FIELDCAT-TABNAME = 'IT_EKPO'.
      WA_FIELDCAT-FIELDNAME = 'EBELN'.
      WA_FIELDCAT-SELTEXT_M = 'PO NO.'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'IT_EKPO'.
      WA_FIELDCAT-FIELDNAME = 'EBELP'.
      WA_FIELDCAT-SELTEXT_M = 'LINE NO'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
      WA_FIELDCAT-TABNAME = 'I_EKPO'.
      WA_FIELDCAT-FIELDNAME = 'MATNR'.
      WA_FIELDCAT-SELTEXT_M = 'MATERIAL NO.'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
    WA_FIELDCAT-TABNAME = 'I_EKPO'.
      WA_FIELDCAT-FIELDNAME = 'MENGE'.
      WA_FIELDCAT-SELTEXT_M = 'QUANTITY'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
    WA_FIELDCAT-TABNAME = 'I_EKPO'.
      WA_FIELDCAT-FIELDNAME = 'MEINS'.
      WA_FIELDCAT-SELTEXT_M = 'UOM'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
    WA_FIELDCAT-TABNAME = 'I_EKPO'.
      WA_FIELDCAT-FIELDNAME = 'NETPR'.
      WA_FIELDCAT-SELTEXT_M = 'PRICE'.
      APPEND WA_FIELDCAT TO I_FIELDCAT.
      CLEAR WA_FIELDCAT.
    ENDFORM.                    "BUILD_FIELDCATLOG_EKPO
    *&      Form  event_call_ekpo
    *   we get all events - TOP OF PAGE or USER COMMAND in table v_events
    FORM EVENT_CALL_EKPO.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
       EXPORTING
         I_LIST_TYPE           = 0
       IMPORTING
         ET_EVENTS             = V_EVENTS
    * EXCEPTIONS
    *   LIST_TYPE_WRONG       = 1
    *   OTHERS                = 2
      IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    "event_call_ekpo
    *&      Form  POPULATE_EVENT
    *        Events populated for TOP OF PAGE & USER COMAND
    FORM POPULATE_EVENT_EKPO.
      READ TABLE V_EVENTS INTO WA_EVENT WITH KEY NAME = 'TOP_OF_PAGE'.
      IF SY-SUBRC EQ 0.
        WA_EVENT-FORM = 'TOP_OF_PAGE'.
        MODIFY V_EVENTS FROM WA_EVENT TRANSPORTING FORM WHERE NAME =
    WA_EVENT-FORM.
      ENDIF.
      ENDFORM.                    "POPULATE_EVENT
    *&      Form  TOP_OF_PAGE
    *       text
    FORM F_TOP_OF_PAGE.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          IT_LIST_COMMENTARY       = IT_LISTHEADER
    *    i_logo                   =
    *    I_END_OF_LIST_GRID       =
    ENDFORM.                    "TOP_OF_PAGE
    *&      Form  USER_COMMAND
    *       text
    *      -->R_UCOMM    text
    *      -->,          text
    *      -->RS_SLEFIELDtext
    *retreiving values from the database table ekko
    FORM DATA_RETRIEVAL_EKPO.
    SELECT EBELN EBELP MATNR MENGE MEINS NETPR FROM EKPO INTO TABLE IT_EKPO.
    ENDFORM.
    FORM BUILD_LISTHEADER_EKPO USING I_LISTHEADER TYPE SLIS_T_LISTHEADER.
    DATA: HLINE1 TYPE SLIS_LISTHEADER.
    HLINE1-TYP = 'H'.
    HLINE1-INFO = 'CHECKING PGM'.
    ENDFORM.
    FORM DISPLAY_ALV_EKPO.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    *   I_INTERFACE_CHECK                 = ' '
    *   I_BYPASSING_BUFFER                = ' '
    *   I_BUFFER_ACTIVE                   = ' '
       I_CALLBACK_PROGRAM                = V_REPID
    *   I_CALLBACK_PF_STATUS_SET          = ' '
    *   I_CALLBACK_USER_COMMAND           = 'F_USER_COMMAND'
       I_CALLBACK_TOP_OF_PAGE            = 'TOP_OF_PAGE'
    *   I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
    *   I_CALLBACK_HTML_END_OF_LIST       = ' '
    *   I_STRUCTURE_NAME                  =
    *   I_BACKGROUND_ID                   = ' '
       I_GRID_TITLE                      = I_TITLE_EKPO
    *   I_GRID_SETTINGS                   =
    *   IS_LAYOUT                         =
       IT_FIELDCAT                       = I_FIELDCAT[]
    *   IT_EXCLUDING                      =
    *   IT_SPECIAL_GROUPS                 =
    *   IT_SORT                           =
    *   IT_FILTER                         =
    *   IS_SEL_HIDE                       =
    *   I_DEFAULT                         =
       I_SAVE                            = 'A'
    *   IS_VARIANT                        =
       IT_EVENTS                         = V_EVENTS
      TABLES
        T_OUTTAB                          = IT_EKPO
    EXCEPTIONS
       PROGRAM_ERROR                     = 1
       OTHERS                            = 2
    IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDFORM.
    Try this links...
    http://www.****************/Tutorials/ALV/ALVMainPage.htm
    Simple ALV report
    http://www.sapgenie.com/abap/controls/alvgrid.htm
    http://wiki.ittoolbox.com/index.php/Code:Ultimate_ALV_table_toolbox
    ALV
    1. Please give me general info on ALV.
    http://www.sapfans.com/forums/viewtopic.php?t=58286
    http://www.sapfans.com/forums/viewtopic.php?t=76490
    http://www.sapfans.com/forums/viewtopic.php?t=20591
    http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
    2. How do I program double click in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=11601
    http://www.sapfans.com/forums/viewtopic.php?t=23010
    3. How do I add subtotals (I have problem to add them)...
    http://www.sapfans.com/forums/viewtopic.php?t=20386
    http://www.sapfans.com/forums/viewtopic.php?t=85191
    http://www.sapfans.com/forums/viewtopic.php?t=88401
    http://www.sapfans.com/forums/viewtopic.php?t=17335
    4. How to add list heading like top-of-page in ABAP lists?
    http://www.sapfans.com/forums/viewtopic.php?t=58775
    http://www.sapfans.com/forums/viewtopic.php?t=60550
    http://www.sapfans.com/forums/viewtopic.php?t=16629
    5. How to print page number / total number of pages X/XX in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
    6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
    http://www.sapfans.com/forums/viewtopic.php?t=64320
    http://www.sapfans.com/forums/viewtopic.php?t=44477
    7. How can I set the cell color in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=52107
    8. How do I print a logo/graphics in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=81149
    http://www.sapfans.com/forums/viewtopic.php?t=35498
    http://www.sapfans.com/forums/viewtopic.php?t=5013
    9. How do I create and use input-enabled fields in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=84933
    http://www.sapfans.com/forums/viewtopic.php?t=69878
    10. How can I use ALV for reports that are going to be run in background?
    http://www.sapfans.com/forums/viewtopic.php?t=83243
    http://www.sapfans.com/forums/viewtopic.php?t=19224
    11. How can I display an icon in ALV? (Common requirement is traffic light icon).
    http://www.sapfans.com/forums/viewtopic.php?t=79424
    http://www.sapfans.com/forums/viewtopic.php?t=24512
    12. How can I display a checkbox in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=88376
    http://www.sapfans.com/forums/viewtopic.php?t=40968
    http://www.sapfans.com/forums/viewtopic.php?t=6919
    Reward all helpful answers
    Regards
    Pavan
    Message was edited by:
            Pavan praveen

  • Can you help with the code to publish Flash to my own domain.

    Thank you for your help, I publish the my site to my own domain, I do not use .Mac, I tested your code and ity works well on .Mac, can you help with the code to publish to my own domain.
    Thank you again

    You appear to have just collected a variety of code snippets and thrown them together, including a section of AS2 code ( gage.onRelease = function() {... )
    The suggestion I offered yesterday still stands.  You should find a tutorial regarding AS3 and the atan2 function.  Beyond that, what you show suggests this is a school assignment.  You should seek help from your fellow students and instructor if that is the case.

  • Adding values to insert query [was: Plz help with this code]

    I have created a comments section in which there is only one field comment here is the code of the form:
    <form id="frmComment" name="frmComment" method="POST" action="<?php echo $editFormAction; ?>">
        <h3>
          <label for="namegd"></label>Comment:</h3>
        <p>
          <label for="comment2"></label>
          <textarea name="comment" id="comment2" cols="60" rows="10" ></textarea>
        </p>
        <p>
          <label for="submit">
          </label>
          <input type="submit" name="submit" id="submit" value="Submit" />
          <label for="reset"></label>
          <input type="reset" name="reset" id="reset" value="Clear" />
        </p>
    <input type="hidden" name="MM_insert" value="frmComment" />
    </form>
    and the insert into code applied to the form is this
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "frmComment")) {
      $insertSQL = sprintf("INSERT INTO comments (`comment`, ) VALUES (%s)",
                           GetSQLValueString($_POST['comment'], "text"));
      mysql_select_db($database_my_connection, $my_connection);
      $Result1 = mysql_query($insertSQL, $my_connection) or die(mysql_error());
    But I want the form to insert two more values to the database one will be the commented_by and the other will be post_id where commented_by = ($_SESSION['Username']) and post_id = $row_Recordset1['id'] can some one plz let me know what will be the modified code and ya commented_by is a text field and post_id is an int field.
    Plz guys help me Thanks in advance

    Adding the extra values to the insert query is easy:
    $insertSQL = sprintf("INSERT INTO comments (`comment`, commented_by, post_id) VALUES (%s, %s, %s)",
             GetSQLValueString($_POST['comment'], "text"),
             GetSQLValueString($_SESSION['Username'], "text"),
             GetSQLValueString($row_recordset1['id'], "int"));
    You need to make sure that the code for recordset1 comes before the insert query. By default, Dreamweaver places recordset code immediately above the DOCTYPE declaration, and below other server behaviors. So, you need to move the code. Otherwise, this insert query won't work.

  • Plz provide me the code for TreeExpensionListener mehod's

    Hello all,
    I am trying to write the code for TreeExpensionListener methods treeExpanded(TreeExpansionEvent evt) and treeCollapsed(TreeExpansionEvent event) i want whole code for when i open the window i ll get a perticular node would be expanded.
    Waiting for replys,
    brijesh

    m_pmTableModel = new JTreeTableModel("root");
    m_pmListTable = new JTreeTable(m_pmTableModel);
              m_pmListTable.getTree().addTreeSelectionListener(this);
              m_pmListTable.getTree().addTreeExpansionListener(this);
              JScrollPane scrollPane = new JScrollPane();
              scrollPane.getViewport().add(m_pmListTable);
    This is the piece of code i am using there is a treetable, i just want like, whenver sommething got change on server site that table would be update, actallu its updating but...if node is open and any child of that node is get updat then that node is getting close, means again to see the changes i have to open that node, thats i dont want. With updating it should expend the node......
    thanks for reply.....plz share the idea
    brijesh

  • Multiple Users Login ( Help With The Code ) Please.

    Hi all. Please help me...
    I'm using www.wix.com to create my websites.
    but since Wix.com don't able us to have member system conecet to database, i use Flash SWF As3 files...
    Please can anyone help me with the Code?
    Username=1    /Password= 1    /Url= www.1.com
    Username=2    /Password= 2    /Url= www.2.com
    Username=2    /Password= 2    /Url= www.2.com
    *If user name 1 or 2 or 3 correct. Show massage ex: Welcome back, if not correct " Bad login"
    *When login, it will open the url but in new page after the old one closed.
    + There is anyway to add " Password recovaring box too"?
    but not connected to datdabase as i said?
    Please help me, please! i areadly have code but it don't work for more than one user.
    Thank u soooo much!!
    Loai

    Here's the code i have already,,
    but i don't know how to add more than one user + when login it open new window ( popup ) i want it to open in the same window...
    Please help.
    stop();
    //hide the password
    //pass_txt.displayAsPassword = true;
    //adding event listener to the login button
    login_mc.addEventListener(MouseEvent.CLICK, loginUser);
    function loginUser(e:MouseEvent):void{
    //if both username and password are correct let the user logged in
    if(name_txt.text == "1" && pass_txt.text == "1"){
    navigateToURL( new URLRequest( "http://www.wix.com/designersgroup/tutorials/9-1" ), "_blank" );
    display_txt.text = "Going to secure area";
    else if(name_txt.text != "1" && pass_txt.text != "1"){
    display_txt.text = "Login failed!";
    if(name_txt.text == "2" && pass_txt.text == "2"){
    navigateToURL( new URLRequest( "http://www.wix.com/designersgroup/tutorials/9-2" ), "_blank" );
    display_txt.text = "Going to secure area";
    else if(name_txt.text != "2" && pass_txt.text != "2"){
    display_txt.text = "Login failed!";

  • James help with the code

    ok, i tried putting the code right after the first <body and it still came down there in the same spot... the only thing that seemed to change was adding <center>to the beginning even then it was down..... if you can view source on my page www.gameinfocenter.com the h ome page ma b you mite know exactly where to put it....

    The only thing you can do by simple pasting is to have the banner centered at the bottom of the screen.
    For any other location, you will have to do a little bit more work to specify exactly where on the page you want the banner to show up. Here's a write up that I did a while back. It's pretty straightforward...
    Adding HTML to iWeb pages

  • Need help improve the code

    I have this file but I need to improve the code on some method. The methods are addNode, deleteNode, saveNode, findLader and are they anyway for me to iliminate the findsmallest method?
    here is the code
    import java.io.*;
    import java.util.LinkedList;
    import java.util.Stack;
    import javax.swing.*;
    public class Graph {
    private LinkedList graph;
    private BufferedReader inputFile;
    public Graph() {
    graph = new LinkedList();
    // read the words from the given file
    // create a GraphNode
    // Add the node to the graph
    public void createGraph(String fileName) throws IOException {
    inputFile = new BufferedReader(
    new InputStreamReader(new FileInputStream("word.txt")));
    // Convert the linkedlist to an array 'a'
    // sort the array 'a'
    // create a string from all elements in 'a'
    // return the string
    public String printGraph() {
    String output = new String();
    // will contain String objects
    // ... do some work with the list, adding, removing String objects
    String[] a = new String[graph.size()];
    graph.toArray(a);
    // now stringArray contains all the element from linkedList
    quickSort(a, 0, a.size() - 1);
    for(int i=0;i<a.length;++i)
    output = output + new String(a.toString())+"\n";
    return output;
    private static void quickSort(Comparable[] theArray,
    int first, int last) {
    // Sorts the items in an array into ascending order.
    // Precondition: theArray[first..last] is an array.
    // Postcondition: theArray[first..last] is sorted.
    // Calls: partition.
    int pivotIndex;
    if (first < last) {
    // create the partition: S1, Pivot, S2
    pivotIndex = partition(theArray, first, last);
    // sort regions S1 and S2
    quickSort(theArray, first, pivotIndex-1);
    quickSort(theArray, pivotIndex+1, last);
    } // end if
    } // end quickSort
    private static int partition(Comparable[] theArray,
    int first, int last) {
    // Partitions an array for quicksort.
    // Precondition: theArray[first..last] is an array;
    // first <= last.
    // Postcondition: Returns the index of the pivot element of
    // theArray[first..last]. Upon completion of the method,
    // this will be the index value lastS1 such that
    // S1 = theArray[first..lastS1-1] < pivot
    // theArray[lastS1] == pivot
    // S2 = theArray[lastS1+1..last] >= pivot
    // Calls: choosePivot.
    // tempItem is used to swap elements in the array
    Comparable tempItem;
    // place pivot in theArray[first]
    //choosePivot(theArray, first, last);
    Comparable pivot = theArray[first]; // reference pivot
    // initially, everything but pivot is in unknown
    int lastS1 = first; // index of last item in S1
    // move one item at a time until unknown region is empty
    for (int firstUnknown = first + 1; firstUnknown <= last;
    ++firstUnknown) {
    // Invariant: theArray[first+1..lastS1] < pivot
    // theArray[lastS1+1..firstUnknown-1] >= pivot
    // move item from unknown to proper region
    if (theArray[firstUnknown].compareTo(pivot) < 0) {
    // item from unknown belongs in S1
    ++lastS1;
    tempItem = theArray[firstUnknown];
    theArray[firstUnknown] = theArray[lastS1];
    theArray[lastS1] = tempItem;
    } // end if
    // else item from unknown belongs in S2
    } // end for
    // place pivot in proper position and mark its location
    tempItem = theArray[first];
    theArray[first] = theArray[lastS1];
    theArray[lastS1] = tempItem;
    return lastS1;
    } // end partition
    // Given a new word, add it to the graph
    public void addNode(String word) {
    GraphNode node = new GraphNode(word);
    if(graph.contains(node)){
    JOptionPane.showMessageDialog(null,"Duplicate Word, operation terminated");
    for(int i=0; i<graph.size(); ++i) {
    if(isAnEdge((String)(((GraphNode)graph.get(i)).getVertex()),(String)(node.getVertex()))) {
    EdgeNode e1 = new EdgeNode((String)node.getVertex(),1);
    EdgeNode e2 = new EdgeNode((String)((GraphNode)graph.get(i)).getVertex(),1);
    node.addEdge(e2);
    ((GraphNode)graph.get(i)).addEdge(e1);
    graph.add(node);
    public boolean deleteNode(String word) {
    GraphNode node = new GraphNode(word);
    EdgeNode n = new EdgeNode(word,1);
    if(!graph.contains(node)) {
    return false;
    else {
    for(int i=0; i<graph.size();++i) {
    ((GraphNode)graph.get(i)).getEdgeList().remove(n);
    graph.remove(node);
    return true;
    public void save(String fileName) {
    try {
    PrintWriter output = new PrintWriter(new FileWriter("word.txt"));
    for(int i=0; i< graph.size();++i) {
    output.println(((GraphNode)graph.get(i)).getVertex());
    output.close();
    catch (IOException e) {
    // given two word, find the ladder (using dijkstra's algorithm
    // create a string for the ladder and return it
    public String findLadder(String start,String end) {
    String ladder = new String();
    GraphNode sv = new GraphNode(start);
    GraphNode ev = new GraphNode(end);
    if(!graph.contains(sv)) {
    JOptionPane.showMessageDialog(null,start + " not in graph");
    return null;
    if(!graph.contains(ev)) {
    JOptionPane.showMessageDialog(null,end + " not in graph");
    return null;
    LinkedList distance = new LinkedList(((GraphNode)graph.get(graph.indexOf(sv))).getEdgeList());
    LinkedList visited = new LinkedList();
    visited.add(start);
    LinkedList path = new LinkedList();
    path.add(new PathNode(start,"****"));
    for(int i=0; i<distance.size();++i) {
    PathNode p = new PathNode((String)((EdgeNode)distance.get(i)).getKey(),start);
    path.add(p);
    while(!visited.contains(end)) {
    EdgeNode min = findSmallest(distance,visited);
    String v = (String)min.getVertex();
    if(v.equals("****"))
    return null;
    visited.add(v);
    // for(int i=0;i<graph.size();++i) {
    // String u = (String)(((GraphNode)(graph.get(i))).getVertex());
    GraphNode temp1 = new GraphNode(v);
    int index = graph.indexOf(temp1);
    LinkedList l = new LinkedList(((GraphNode)graph.get(index)).getEdgeList());
    for(int i=0;i<l.size();++i)
    String u = (String)(((EdgeNode)(l.get(i))).getVertex());
    if(!visited.contains(u)) {
    int du=999, dv=999, avu=999;
    dv = min.getCost();
    EdgeNode edge = new EdgeNode(u,1);
    if(distance.contains(edge)) {
    du = ((EdgeNode)(distance.get(distance.indexOf(edge)))).getCost();
    GraphNode temp = new GraphNode(v);
    GraphNode node = ((GraphNode)(graph.get(graph.indexOf(temp))));
    LinkedList edges = node.getEdgeList();
    if(edges.contains(edge)) {
    avu = ((EdgeNode)(edges.get(edges.indexOf(new EdgeNode(u,1))))).getCost();
    if( du > dv+avu) {
    if(du == 999) {
    distance.add(new EdgeNode(u,dv+avu));
    path.add(new PathNode(u,v));
    else {
    ((EdgeNode)(distance.get(distance.indexOf(u)))).setCost(dv+avu);
    ((PathNode)(path.get(path.indexOf(u)))).setEnd(v);
    if(!path.contains(new PathNode(end,"")))
    return null;
    LinkedList pathList = new LinkedList();
    for(int i=0;i<path.size();++i) {
    PathNode n = (PathNode)path.get(path.indexOf(new PathNode(end,"****")));
    if(n.getEnd().compareTo("****") != 0) {
    pathList.addFirst(end);
    n = (PathNode)path.get(path.indexOf(new PathNode(n.getEnd(),"****")));
    end = n.getStart();
    pathList.addFirst(start);
    for(int i=0;i<pathList.size()-1;++i) {
    ladder = ladder + ((String)(pathList.get(i))) + " --> ";
    ladder = ladder + ((String)(pathList.get(pathList.size()-1)));
    return ladder;
    private EdgeNode findSmallest(LinkedList distance, LinkedList visited) {
    EdgeNode min = new EdgeNode("****",999);
    for(int i=0;i<distance.size();++i) {
    String node = (String)(((EdgeNode)distance.get(i)).getVertex());
    if(!visited.contains(node)) {
    if(((EdgeNode)distance.get(i)).getCost()<min.getCost()) {
    min = (EdgeNode)distance.get(i);
    return min;
    // class that represents nodes inserted into path set
    private class PathNode {
    protected String sv;
    protected String ev;
    public PathNode(String s,String e) {
    sv = s;
    ev = e;
    public String getEnd() {
    return ev;
    public String getStart() {
    return sv;
    public void setEnd(String n) {
    ev = n;
    public boolean equals(Object o) {
    return this.sv.equals(((PathNode)o).sv);
    public String toString() {
    return "("+sv+":"+ev+")";
    thank you

    let me fix my misstake which was point out by some one in here and thank you ofr do so because I'm new at this.
    I have this file but I need to improve the code on some method. The methods are addNode, deleteNode, saveNode, findLader and are they anyway for me to iliminate the findsmallest method?
    here is the code
    import java.io.*;
    import java.util.LinkedList;
    import java.util.Stack;
    import javax.swing.*;
    public class Graph {
    private LinkedList graph;
    private BufferedReader inputFile;
    public Graph() {
    graph = new LinkedList();
    // read the words from the given file
    // create a GraphNode
    // Add the node to the graph
    public void createGraph(String fileName) throws IOException {
    inputFile = new BufferedReader(
    new InputStreamReader(new FileInputStream("word.txt")));
    // Convert the linkedlist to an array 'a'
    // sort the array 'a'
    // create a string from all elements in 'a'
    // return the string
    public String printGraph() {
    String output = new String();
    // will contain String objects
    // ... do some work with the list, adding, removing String objects
    String[] a = new String[graph.size()];
    graph.toArray(a);
    // now stringArray contains all the element from linkedList
    quickSort(a, 0, a.size() - 1);
    for(int i=0;i<a.length;++i)
    output = output + new String(a.toString())+"\n";
    return output;
    private static void quickSort(Comparable[] theArray,
    int first, int last) {
    // Sorts the items in an array into ascending order.
    // Precondition: theArray[first..last] is an array.
    // Postcondition: theArray[first..last] is sorted.
    // Calls: partition.
    int pivotIndex;
    if (first < last) {
    // create the partition: S1, Pivot, S2
    pivotIndex = partition(theArray, first, last);
    // sort regions S1 and S2
    quickSort(theArray, first, pivotIndex-1);
    quickSort(theArray, pivotIndex+1, last);
    } // end if
    } // end quickSort
    private static int partition(Comparable[] theArray,
    int first, int last) {
    // Partitions an array for quicksort.
    // Precondition: theArray[first..last] is an array;
    // first <= last.
    // Postcondition: Returns the index of the pivot element of
    // theArray[first..last]. Upon completion of the method,
    // this will be the index value lastS1 such that
    // S1 = theArray[first..lastS1-1] < pivot
    // theArray[lastS1] == pivot
    // S2 = theArray[lastS1+1..last] >= pivot
    // Calls: choosePivot.
    // tempItem is used to swap elements in the array
    Comparable tempItem;
    // place pivot in theArray[first]
    //choosePivot(theArray, first, last);
    Comparable pivot = theArray[first]; // reference pivot
    // initially, everything but pivot is in unknown
    int lastS1 = first; // index of last item in S1
    // move one item at a time until unknown region is empty
    for (int firstUnknown = first + 1; firstUnknown <= last;
    ++firstUnknown) {
    // Invariant: theArray[first+1..lastS1] < pivot
    // theArray[lastS1+1..firstUnknown-1] >= pivot
    // move item from unknown to proper region
    if (theArray[firstUnknown].compareTo(pivot) < 0) {
    // item from unknown belongs in S1
    ++lastS1;
    tempItem = theArray[firstUnknown];
    theArray[firstUnknown] = theArray[lastS1];
    theArray[lastS1] = tempItem;
    } // end if
    // else item from unknown belongs in S2
    } // end for
    // place pivot in proper position and mark its location
    tempItem = theArray[first];
    theArray[first] = theArray[lastS1];
    theArray[lastS1] = tempItem;
    return lastS1;
    } // end partition
    // Given a new word, add it to the graph
    public void addNode(String word) {
    GraphNode node = new GraphNode(word);
    if(graph.contains(node)){
    JOptionPane.showMessageDialog(null,"Duplicate Word, operation terminated");
    for(int i=0; i<graph.size(); ++i) {
    if(isAnEdge((String)(((GraphNode)graph.get(i)).getVertex()),(String)(node.getVertex()))) {
    EdgeNode e1 = new EdgeNode((String)node.getVertex(),1);
    EdgeNode e2 = new EdgeNode((String)((GraphNode)graph.get(i)).getVertex(),1);
    node.addEdge(e2);
    ((GraphNode)graph.get(i)).addEdge(e1);
    graph.add(node);
    public boolean deleteNode(String word) {
    GraphNode node = new GraphNode(word);
    EdgeNode n = new EdgeNode(word,1);
    if(!graph.contains(node)) {
    return false;
    else {
    for(int i=0; i<graph.size();++i) {
    ((GraphNode)graph.get(i)).getEdgeList().remove(n);
    graph.remove(node);
    return true;
    public void save(String fileName) {
    try {
    PrintWriter output = new PrintWriter(new FileWriter("word.txt"));
    for(int i=0; i< graph.size();++i) {
    output.println(((GraphNode)graph.get(i)).getVertex());
    output.close();
    catch (IOException e) {
    // given two word, find the ladder (using dijkstra's algorithm
    // create a string for the ladder and return it
    public String findLadder(String start,String end) {
    String ladder = new String();
    GraphNode sv = new GraphNode(start);
    GraphNode ev = new GraphNode(end);
    if(!graph.contains(sv)) {
    JOptionPane.showMessageDialog(null,start + " not in graph");
    return null;
    if(!graph.contains(ev)) {
    JOptionPane.showMessageDialog(null,end + " not in graph");
    return null;
    LinkedList distance = new LinkedList(((GraphNode)graph.get(graph.indexOf(sv))).getEdgeList());
    LinkedList visited = new LinkedList();
    visited.add(start);
    LinkedList path = new LinkedList();
    path.add(new PathNode(start,"****"));
    for(int i=0; i<distance.size();++i) {
    PathNode p = new PathNode((String)((EdgeNode)distance.get(i)).getKey(),start);
    path.add(p);
    while(!visited.contains(end)) {
    EdgeNode min = findSmallest(distance,visited);
    String v = (String)min.getVertex();
    if(v.equals("****"))
    return null;
    visited.add(v);
    // for(int i=0;i<graph.size();++i) {
    // String u = (String)(((GraphNode)(graph.get(i))).getVertex());
    GraphNode temp1 = new GraphNode(v);
    int index = graph.indexOf(temp1);
    LinkedList l = new LinkedList(((GraphNode)graph.get(index)).getEdgeList());
    for(int i=0;i<l.size();++i)
    String u = (String)(((EdgeNode)(l.get(i))).getVertex());
    if(!visited.contains(u)) {
    int du=999, dv=999, avu=999;
    dv = min.getCost();
    EdgeNode edge = new EdgeNode(u,1);
    if(distance.contains(edge)) {
    du = ((EdgeNode)(distance.get(distance.indexOf(edge)))).getCost();
    GraphNode temp = new GraphNode(v);
    GraphNode node = ((GraphNode)(graph.get(graph.indexOf(temp))));
    LinkedList edges = node.getEdgeList();
    if(edges.contains(edge)) {
    avu = ((EdgeNode)(edges.get(edges.indexOf(new EdgeNode(u,1))))).getCost();
    if( du > dv+avu) {
    if(du == 999) {
    distance.add(new EdgeNode(u,dv+avu));
    path.add(new PathNode(u,v));
    else {
    ((EdgeNode)(distance.get(distance.indexOf(u)))).setCost(dv+avu);
    ((PathNode)(path.get(path.indexOf(u)))).setEnd(v);
    if(!path.contains(new PathNode(end,"")))
    return null;
    LinkedList pathList = new LinkedList();
    for(int i=0;i<path.size();++i) {
    PathNode n = (PathNode)path.get(path.indexOf(new PathNode(end,"****")));
    if(n.getEnd().compareTo("****") != 0) {
    pathList.addFirst(end);
    n = (PathNode)path.get(path.indexOf(new PathNode(n.getEnd(),"****")));
    end = n.getStart();
    pathList.addFirst(start);
    for(int i=0;i<pathList.size()-1;++i) {
    ladder = ladder + ((String)(pathList.get(i))) + " --> ";
    ladder = ladder + ((String)(pathList.get(pathList.size()-1)));
    return ladder;
    private EdgeNode findSmallest(LinkedList distance, LinkedList visited) {
    EdgeNode min = new EdgeNode("****",999);
    for(int i=0;i<distance.size();++i) {
    String node = (String)(((EdgeNode)distance.get(i)).getVertex());
    if(!visited.contains(node)) {
    if(((EdgeNode)distance.get(i)).getCost()<min.getCost()) {
    min = (EdgeNode)distance.get(i);
    return min;
    // class that represents nodes inserted into path set
    private class PathNode {
    protected String sv;
    protected String ev;
    public PathNode(String s,String e) {
    sv = s;
    ev = e;
    public String getEnd() {
    return ev;
    public String getStart() {
    return sv;
    public void setEnd(String n) {
    ev = n;
    public boolean equals(Object o) {
    return this.sv.equals(((PathNode)o).sv);
    public String toString() {
    return "("+sv+":"+ev+")";
    }thank you

  • Ajax - Multiple Values - Help with the code

    Hi all,
    My code is probably wrong, though, I don't know where the problem is. I'm not that good with programming and copied the example from oracle.com and modified it... I hope you guys can help me. Here is what I have:
    A select list: P4_DOBJ1_NR (The user selects something from DOBJ_NR from the table dataobject)
    A display as text item: P4_NAMSP1
    Another display as text item: P4_DOBJ_NAME1
    Here my code:
    HTML Header Setting for my select list-attribut:
    onchange="javascript:getDOBJ1Info(this);"
    The HTML header from my page:
    <script type="text/javascript">
    function getDOBJ1Info(filter)
    var xml = null;
    var get = new htmldb_Get(null,$v('pFlowId'), 'APPLICATION_PROCESS=GETDOBJ1Info',0);
    get.add('GOBJ1NO', filter.value);
    ret = get.get('XML');
    if(ret)
    var oneItems = ret.getElementsByTagName("NAMSP");
    if (oneItems)
    var onedisplay = document.getElementById("P4_NAMSP1");
    onedisplay.innerHTML = oneItems[0].getAttribute("VALUE");
    var twoItems = ret.getElementsByTagName("DOBJ_NAME");
    if (twoItems)
    var twodisplay = document.getElementById("P4_DOBJ_NAME1");
    twodisplay.innerHTML = twoItems[0].getAttribute("VALUE");
    get = null;
    </script>
    An application item, called: GOBJ1NO
    And the Application Process:
    DECLARE
    vONE VARCHAR2(100);
    vTWO VARCHAR2(100);
    BEGIN
    owa_util.mime_header('text/xml', FALSE );
    htp.p('Cache-Control: no-cache');
    htp.p('Pragma: no-cache');
    owa_util.http_header_close;
    htp.prn('<DATA>');
    SELECT NAMSP, DOBJ_NAME INTO vONE, vTWO FROM DATAOBJECT WHERE DOBJ_NR = :GOBJ1NO;
    htp.prn('<ONE VALUE="' || vONE || '"></ONE>');
    htp.prn('<TWO VALUE="' || vTWO || '"></TWO>');
    htp.prn('</DATA>');
    EXCEPTION WHEN OTHERS THEN
    htp.prn('<ONE VALUE="Error"></ONE>');
    htp.prn('<TWO VALUE="Error"></TWO>');
    END;

    Your process returns a XML document with structure
    <DATA>
       <ONE> value one </ONE>
       <TWO> value two </TWO>
    </DATA>but you are trying to retrieve element named "NAMSP"
    so try to chang it to :
    var oneItems = ret.getElementsByTagName("ONE");You will find fantastic examples on Denes Kubicek web site:
    Try this url:
    http://apex.oracle.com/pls/otn/f?p=31517:106:1074750275898234::NO
    HTH
    Thomas

  • Need help with the code...

    The program should accept two inputs from user in form of military time for example (1245). Then it should calculate and display the difference.
    For some reason it displays 0's...
    Please help.
    Thanks.
    public class TimeInterval
    private int firstHour;
    private int firstMin;
    private int secondHour;
    private int secondMin;
    //Constructor
    public TimeInterval(String first, String second)
    String h1 = first.substring(0,1);
    int h2 = Integer.parseInt(h1);
    firstHour = h2;
    //firstHour = Integer.parseInt(first.substring(0,1));
    String m1 = second.substring(2,3);
    int m2 = Integer.parseInt(m1);
    firstMin = m2;
    //firstMin = Integer.parseInt(second.substring(2,3));
    String hh1 = first.substring(0,1);
    int hh2 = Integer.parseInt(hh1);
    secondHour = hh2;
    //secondHour = Integer.parseInt(first.substring(0,1));
    String mm1 = second.substring(2,3);
    int mm2 = Integer.parseInt(mm1);
    secondMin = mm2;
    //secondMin = Integer.parseInt(second.substring(2,3));
    //Methods
    public int getHours()
    int HourDifference = secondHour - firstHour;
    return HourDifference;
    public int getMinutes()
    int MinutesDifference = secondMin - firstMin;
    return MinutesDifference;
    import java.util.Scanner;
    public class TimeIntervalTest
    public static void main(String[] args)
    Scanner scanner = new Scanner(System.in);
    System.out.print("Enter the First time now:");
    String hr = scanner.next();
    System.out.print("Enter the Second time now:");
    String mn = scanner.next();
    System.out.println(hr);
    System.out.println(mn);
    TimeInterval timeDifference = new TimeInterval(hr, mn);
    System.out.println(timeDifference.getHours());
    System.out.println(timeDifference.getMinutes());
    }

    I can't say I understand your code, but for a starter, I think you are misunderstanding method substring:
    public class StringExample {
        public static void main(String[] args) {
            String first = "2345";
            String h1 = first.substring(0,1);
            System.out.println(h1);
    }

  • Plz help with the router setting ...

    my wifi issues are making me go crazy ... i added a screenshot of my router security settings ..(i updated the firmware)
    can plz someone tell me which setting i need to use.
    the router type is in the upper left corner
    thanks!!!

    iOS 6 Wifi Problems/Fixes
    Fix For iOS 6 WiFi Problems?
    http://tabletcrunch.com/2012/09/27/fix-ios-6-wifi-problems/
    Did iOS 6 Screw Your Wi-Fi? Here’s How to Fix It
    http://gizmodo.com/5944761/does-ios-6-have-a-wi+fi-bug
    How To Fix Wi-Fi Connectivity Issue After Upgrading To iOS 6
    http://www.iphonehacks.com/2012/09/fix-wi-fi-connectivity-issue-after-upgrading- to-ios-6.html
    iOS 6 iPad 3 wi-fi "connection fix" for netgear router
    http://www.youtube.com/watch?v=XsWS4ha-dn0
    Apple's iOS 6 Wi-Fi problems
    http://www.zdnet.com/apples-ios-6-wi-fi-problems-linger-on-7000004799/
    ~~~~~~~~~~~~~~~~~~~~~~~
    Look at iOS Troubleshooting Wi-Fi networks and connections  http://support.apple.com/kb/TS1398
    iPad: Issues connecting to Wi-Fi networks  http://support.apple.com/kb/ts3304
    WiFi Connecting/Troubleshooting
    http://www.apple.com/support/ipad/wifi/
    How to Fix: My iPad Won't Connect to WiFi
    http://ipad.about.com/od/iPad_Troubleshooting/ss/How-To-Fix-My-Ipad-Wont-Connect -To-Wi-Fi.htm
    iOS: Connecting to the Internet
    http://support.apple.com/kb/HT1695
    iOS: Recommended settings for Wi-Fi routers and access points  http://support.apple.com/kb/HT4199
    Additional things to try.
    Try this first. Turn Off your iPad. Then turn Off (disconnect power cord for 30 seconds or longer) the wireless router & then back On. Now boot your iPad. Hopefully it will see the WiFi.
    Go to Settings>Wi-Fi and turn Off. Then while at Settings>Wi-Fi, turn back On and chose a Network.
    Change the channel on your wireless router (Auto or Channel 6 is best). Instructions at http://macintoshhowto.com/advanced/how-to-get-a-good-range-on-your-wireless-netw ork.html
    Another thing to try - Go into your router security settings and change from WEP to WPA with AES.
    How to Quickly Fix iPad 3 Wi-Fi Reception Problems
    http://osxdaily.com/2012/03/21/fix-new-ipad-3-wi-fi-reception-problems/
    If none of the above suggestions work, look at this link.
    iPad Wi-Fi Problems: Comprehensive List of Fixes
    http://appletoolbox.com/2010/04/ipad-wi-fi-problems-comprehensive-list-of-fixes/
    Fix iPad Wifi Connection and Signal Issues  http://www.youtube.com/watch?v=uwWtIG5jUxE
    Fix Slow WiFi Issue https://discussions.apple.com/thread/2398063?start=60&tstart=0
    Unable to Connect After iOS Update - saw this solution on another post.
    https://discussions.apple.com/thread/4010130
    Note - When troubleshooting wifi connection problems, don't hold your iPad by hand. There have been a few reports that holding the iPad by hand, seems to attenuate the wifi signal.
    ~~~~~~~~~~~~~~~
    If any of the above solutions work, please post back what solved your problem. It will help others with the same problem.
     Cheers, Tom

  • Urgent-Need help with the code.

    Hi gurus,
    I am trying to write a code where i am populating the ZZorg1,ZZorg2 and ZZorg3 in VBRP tableto 2LIS_13_VDITM.
    WHEN '2LIS_13_VDITM'.
    DATA: X_T_DATA Like MC13VD0ITM.
       Loop at C_T_DATA into X_T_DATA.
          Select Single ZZSORG1 into X_T_DATA-ZZSORG1
                        ZZSORG2 into X_T_DATA-ZZSORG2
                        ZZSORG3 into X_T_DATA-ZZSORG3
          FROM VBRP
          WHERE VBELN = X_T_DATA-VBELN
          AND   POSNR = X_T_DATA-POSNR.
        MODIFY C_T_DATA from X_T_DATA.
        ENDLOOP.
    I am getting the following error when running a error check.
    "ZZSORG2 INTO X_T_DATA-ZZSORG2" is not expected.Can anybody let me know what i am doing wrong as i new to ABAP.          
    Thanks in advance
    Resolved it,thanks
    Message was edited by:
            sap novice

    Resolved it

  • Help with the code

    Hi all,
    i have records like in internal table itab
    id      amount
    101  1  1.00
    101  2  2.00
    102  1  1.00
    102  2  2.50
    102  3  3.00
    103  2  1.50
    i want the output like like this internal table itab1
    101  3.00
    102  6.50
    103  1.50
      clear : wa_zoritem ,price.
    total= 0.00
    loop at itab into wa_itab.
    on change of wa_itab1-id.
    clear total.
    total= total + wa_itab1-amount.
    wa_itab1-id   = wa_itab_copy-id.
    wa_itab1-total= wa_itab_copy-total.
    append wa_itab1 to itab1.
    endon.
    *MODIFY TABLE i_FINAL FROM wa_FINAL
                     TRANSPORTING COST.
    *MODIFY  wa_final to i_final.
    wa_itab_copy = wa_itab.
    clear : wa_itab.
    endloop.
    This works fine when i have multiple records
    but this doesn't work when i have the follwwing record in itab
    id      amount
    101  1  1.00
    Thanks

    hi,
    *suppose the data is avialble in the internal table ITAB.
    [code]
    sort ITAB by ID amount.
    delete adjacent duplicates from ITAB comparing ID.
    *Now thw ITAB conatins only the records.
    *101 3.00
    *102 6.50
    *103 1.50[/code]
    Regards
    Reshma

  • Need help in the code for updating a record ( conditional update)

    all set
    Edited by: 871431 on Jul 9, 2011 6:30 PM

    871431 wrote:
    Hi
    I am looking to update a table which contains approved & unapproved records, for that date & fund combination it should allow only one unapproved record.
    what I did is check if the record is U if the incoming value is Unapproved for that fund & date combination raise error, but if I need to update that Unapproved record it raises error....so I need to update that record, and raise error if trying to insert another unapproved record.
    Hope I am clear....Not clear for me
    Help needed plsPlease realize & understand that everyone here speaks SQL
    please post DDL for table
    please provide sample/test data & then explain using actual test data what the results should be & why

  • Help in the code

    hello experts,
    I am uploading the data. For one field I am getting the value like 1341. So i have to equate this values to the first 4 charecters of LFA1-BAHNS
    I have to get the LFA1-LIFNR where the value 1341 matches to the first 4 chars of  LFA1-BAHNS and update the corrsponding field.
    Its urgent plz
    Thanks & Regards,
    Naveen

    Hello Nitesha,
    offset will not work in select query ..
    Try to use below logic :
    tables : lfa1.
    data v_data(5) type c.
    data i_lfa1 like lfa1 occurs 0 with header line.
    start-of-selection.
    refresh i_lfa1.
    clear v_data.
    concatenate itab-fld3 '%' into v_data.
    select  * from lfa1 into table i_lfa1
                   where  BAHNS like  v_data.
    loop at i_lfa1.
    if i_lfa1-bahns+(4) = itab-fld3.
    update table .
    exit.
    endif.
    endloop.              
    Thanks
    Seshu

Maybe you are looking for

  • WebDAV not working over SSL on CSS11503

    SOME HISTORY As you may recall we had an issue with interoperability between our WebCT Vista application and the Cisco CSS11503 Load Balancer. In a nutshell the Load Balancer would inject custom HTTP headers into HTTP packets, but only into the first

  • Workitem is not avilable in approver inbox

    HI, shopping cart is triggered with approver . but the workitem is not avilable in approvers inbox . pls let me know the possible reasons. regards venga

  • How to get the query execution time

    Hi, I am new to oracle and I am trying to get the execution time of a query.I tried the command set timing on and executed the query.But,the time it gives me is including the display of results.In my case,I ran a query against 50 million records and

  • Database binary for 11.2.0.2

    Hi , I need to install oracle binary11.2.0.2 in a linux 64 bit machine. I have a few confusion. I checked in metalink. We have a patch for 11.2.0.2. -- Patch 11098816 Also in OTN i found the software dump. http://www.oracle.com/technetwork/database/e

  • Swapping Hard drive to get at data on Tecra M4

    I have a tecra M4 with bad onboard video.  I'd like to drop the hard drive in another machine to recover the data, and be back in business until I buy a replacement.  Can I buy any other tecra or tecra M4 on ebay, drop in my hard drive, and have it b