How can I write the analogous code to the logic:iterate tag functionality

Hai This is Rayalu .And I am very new to the Java World. I have a doubt?.How can I write the analogous code to the<logic:iterate> tag functionality using the JSP Tag Libraries . Pleae Send me some examples .

Hi,
SELECT objnr objid aufnr
        from afih
        into table t_afih.
SELECT objnr
        from JEST
        into table t_JEST
        where stat = 'A0045'
           OR stat = 'A0046'
           AND inact 'X'.
SELECT objnr
        from COBRB
        into table t_cobrb.
SELECT arbpl werks objid objty
      from crhd
      INTO table it_crhd
      FOR ALL ENTRIES IN it_afih
      WHERE objty eq 'D'
      AND gewrk = it_afih-objid.
SELECT aufnr objnr auart txjcd pspel gstrp werks aufnr
        FROM caufv
        INTO table t_caufv
        FOR ALL ENTRIES IN it_afih
        WHERE aufnr = it_afih-aufnr
          And pspel = ' '
          AND txjcd = ' '
         ANd objnr ne it_crhd-objnr
          AND auart in s_wtype
          AND werks in s_plant.
         AND objnr ne it_jest-objnr.
dont use NE in the select statements, it may effect performance also. Instead use if statements inside
loops.
loop at t_caufv.
read table it_chrd............
  if t_caufv-objnr ne it_chrd-objnr.
  read table it_jest..........
   if   if t_caufv-objnr ne it_jest-objnr.
    (proceed further).
   endif.
  endif.
endloop.
hope this helps.
Reward if useful.
Regards,
Anu

Similar Messages

  • How can i write this C-Code in G-Code

    hallo
    how can I write this C-Code in LabVIew ,
    for a=0; a=<10; a++
       for b=0; b=5 ; b+2
            X= 3+b;
      Y=1+a;
    please see the attachment and tell me where is the problem
    Attachments:
    Unbenannt 11.vi ‏43 KB

    Well, at least you tried and got some of it right.
    I think this should do what you want, but my C is rusty. Is the increment performed before or after the loop executes? If it's after, then I believe the loop should iterate 11 times, not 10.
    In any case, you should note that for a literal translation, you would need to add a sequence structure to guarantee that Y was written to only after the inner loop finished because of the way data-flow works.. Also, note that controls and indicators in LabVIEW are not equivalent to variables. They can be used as such, but they usually should not be.
    Another point about this is that you probably want to use the correct data type - the orange terminals are floating point indicators (of double precision, in this case) and you want integers.
    To learn more about LabVIEW, I suggest you try looking at some of these tutorials.
    Try to take over the world!
    Attachments:
    C.png ‏4 KB

  • How can I write left and right in the same line of a richtextbox?

    I want to write, in the same line, text with a right aligment and other with left aligment. How can I do it?
    thanks

    I want to write, in the same line, text with a right aligment and other with left aligment. How can I do it?
    thanks
    As
    Viorel_ says "Perhaps there are other much easier solutions. For example, create two
    RichTextBoxes with no borders (if you only need two columns of text)" but the real issue would be saving the info in the RichTextBox's (RTB's) RTF or Text to two different RTF or TextFiles. Although I suppose if it was just going to
    a TextFile then you could somehow use a delimited text file so each same line number of each RTB is appended to the same line and delimited. That way you could probably load a split array with each line from the text file splitting on the delimeter per line
    and providing RTB1 with index 0 of the split array and RTB2 with index 1 of the split array. I'm not going to try that.
    This is some leftover code from a long time ago. It has three RTB's. RTB1 is there I suppose because the thread asking for this code wanted it. RTB2 is borderless as well as RTB3. The Aqua control in the top image below is the Panel used to cover RTB2's
    scrollbar. So RTB3's scrollbar is used to scroll both controls.
    I forgot to test if I typed past the scroll position in RTB2 if both would scroll as maybe RTB3 would not since it would not have anything to scroll to I suppose.
    Maybe this code can help or maybe not. The bottom two images are the app running and displaying nothing scrolled in RTB2 and RTB3 then the scroll used in the bottom image.
    Disregard the commented out code in the code below. It was there so I left it there. I suppose you should delete it. Also I didn't set the RTB's so one was left aligned and the other right aligned. I believe the Panel becomes a control in RTB2's controls
    when it is moved to cover RTB2's vertical scrollbar but don't remember although that seems the case since both RTB2 and RTB3 are brought to front so if the Panel was not one of RTB2's controls I would think it would be behind RTB2 and RTB2's vertical scrollbar
    would display but don't remember now. In fact I don't really remember how that part works. :)
    Option Strict On
    Public Class Form1
    Declare Function SendMessage Lib "user32.dll" Alias "SendMessageW" (ByVal hWnd As IntPtr, ByVal msg As Integer, ByVal wParam As Integer, ByRef lParam As Point) As Integer
    Const WM_USER As Integer = &H400
    Const EM_GETSCROLLPOS As Integer = WM_USER + 221
    Const EM_SETSCROLLPOS As Integer = WM_USER + 222
    Dim FixTheProblem As New List(Of String)
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    Me.CenterToScreen()
    Panel1.BackColor = Color.White
    Panel1.BorderStyle = BorderStyle.Fixed3D
    RichTextBox2.BorderStyle = BorderStyle.None
    RichTextBox2.ScrollBars = RichTextBoxScrollBars.Vertical
    RichTextBox3.BorderStyle = BorderStyle.None
    RichTextBox3.ScrollBars = RichTextBoxScrollBars.Vertical
    RichTextBox3.Size = RichTextBox2.Size
    RichTextBox3.Top = RichTextBox2.Top
    RichTextBox3.Left = RichTextBox2.Right - 20
    Panel1.Size = New Size(RichTextBox2.Width * 2 - 16, RichTextBox2.Height + 4)
    Panel1.Left = RichTextBox2.Left - 2
    Panel1.Top = RichTextBox2.Top - 2
    RichTextBox2.BringToFront()
    RichTextBox3.BringToFront()
    FixTheProblem.Add("Curry: £6.50")
    FixTheProblem.Add("Mineral Water: £4.50")
    FixTheProblem.Add("Crisp Packet: £3.60")
    FixTheProblem.Add("Sweat Tea: £2.23")
    FixTheProblem.Add("Motor Oil: £12.50")
    FixTheProblem.Add("Coca Cola: £.75")
    FixTheProblem.Add("Petrol Liter: £3.75")
    FixTheProblem.Add("Shaved Ice: £.50")
    FixTheProblem.Add("Marlboro: £2.20")
    FixTheProblem.Add("Newspaper: £.25")
    FixTheProblem.Add("Spice Pack: £.75")
    FixTheProblem.Add("Salt: £.50")
    FixTheProblem.Add("Pepper: £.30")
    For Each Item In FixTheProblem
    RichTextBox1.AppendText(Item & vbCrLf)
    Next
    RichTextBox1.SelectionStart = 0
    RichTextBox1.ScrollToCaret()
    Dim Fix As String = ""
    For Each Item In FixTheProblem
    Fix += Item.Replace(":", "^:") & vbCrLf
    Next
    Fix = Fix.Replace(vbCrLf, "^>")
    Dim FixSplit() As String = Fix.Split("^"c)
    For i = 0 To FixSplit.Count - 1
    If CBool(i Mod 2 = 0) = True Then
    RichTextBox2.AppendText(FixSplit(i).Replace(">"c, "") & vbCrLf)
    ElseIf CBool(i Mod 2 = 0) = False Then
    RichTextBox3.AppendText(FixSplit(i) & vbCrLf)
    End If
    Next
    End Sub
    Dim RTB2ScrollPoint As Point
    Private Sub RichTextBox2_Vscroll(sender As Object, e As EventArgs) Handles RichTextBox2.VScroll
    Dim RTB2ScrollPoint As Point
    SendMessage(RichTextBox2.Handle, EM_GETSCROLLPOS, 0, RTB2ScrollPoint)
    SendMessage(RichTextBox3.Handle, EM_SETSCROLLPOS, 0, New Point(RTB2ScrollPoint.X, RTB2ScrollPoint.Y))
    'Me.Text = RTB2ScrollPoint.X.ToString & " .. " & RTB2ScrollPoint.Y.ToString
    End Sub
    Private Sub RichTextBox3_Vscroll(sender As Object, e As EventArgs) Handles RichTextBox3.VScroll
    Dim RTB3ScrollPoint As Point
    SendMessage(RichTextBox3.Handle, EM_GETSCROLLPOS, 0, RTB3ScrollPoint)
    SendMessage(RichTextBox2.Handle, EM_SETSCROLLPOS, 0, New Point(RTB3ScrollPoint.X, RTB3ScrollPoint.Y))
    'SendMessage(RichTextBox2.Handle, EM_SETSCROLLPOS, 0, New Point(0, 10))
    End Sub
    End Class
    La vida loca

  • How can i write also to xml file the settings of the Tag property to identify if it's "file" or "directory" ?

    The first thing i'm doing is to get from my ftp server all the ftp content information and i tag it so i can identify later if it's a file or a directory:
    private int total_dirs;
    private int searched_until_now_dirs;
    private int max_percentage;
    private TreeNode directories_real_time;
    private string SummaryText;
    private TreeNode CreateDirectoryNode(string path, string name , int recursive_levl )
    var directoryNode = new TreeNode(name);
    var directoryListing = GetDirectoryListing(path);
    var directories = directoryListing.Where(d => d.IsDirectory);
    var files = directoryListing.Where(d => !d.IsDirectory);
    total_dirs += directories.Count<FTPListDetail>();
    searched_until_now_dirs++;
    int percentage = 0;
    foreach (var dir in directories)
    directoryNode.Nodes.Add(CreateDirectoryNode(dir.FullPath, dir.Name, recursive_levl+1));
    if (recursive_levl == 1)
    TreeNode temp_tn = (TreeNode)directoryNode.Clone();
    this.BeginInvoke(new MethodInvoker( delegate
    UpdateList(temp_tn);
    percentage = (searched_until_now_dirs * 100) / total_dirs;
    if (percentage > max_percentage)
    SummaryText = String.Format("Searched dirs {0} / Total dirs {1}", searched_until_now_dirs, total_dirs);
    max_percentage = percentage;
    backgroundWorker1.ReportProgress(percentage, SummaryText);
    percentage = (searched_until_now_dirs * 100) / total_dirs;
    if (percentage > max_percentage)
    SummaryText = String.Format("Searched dirs {0} / Total dirs {1}", searched_until_now_dirs, total_dirs);
    max_percentage = percentage;
    backgroundWorker1.ReportProgress(percentage, SummaryText);
    foreach (var file in files)
    TreeNode file_tree_node = new TreeNode(file.Name);
    file_tree_node.Tag = "file";
    directoryNode.Nodes.Add(file_tree_node);
    numberOfFiles.Add(file.FullPath);
    return directoryNode;
    The line i'm using to Tag is:
    file_tree_node.Tag = "file";
    So i know what is "file" then i make a simple check if the Tag is not null then i know it's a "file" if it's null then it's directory.
    For example this is how i'm checking if it's file or directory after getting all the content from my ftp server:
    if (treeViewMS1.SelectedNode.Tag != null)
    string s = (string)treeViewMS1.SelectedNode.Tag;
    if (s == "file")
    file = false;
    DeleteFile(treeViewMS1.SelectedNode.FullPath, file);
    else
    RemoveDirectoriesRecursive(treeViewMS1.SelectedNode, treeViewMS1.SelectedNode.FullPath);
    I also update in real time when getting the content of the ftp server xml file on my hard disk with the treeView structure information so when i'm running the program each time it will load the treeView structure with all directories and files.
    This is the class of the xml file:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Xml;
    using System.Windows.Forms;
    namespace FTP_ProgressBar
    class TreeViewXmlPopulation
    // Xml tag for node, e.g. 'node' in case of <node></node>
    private const string XmlNodeTag = "node";
    // Xml attributes for node e.g. <node text="Asia" tag=""
    // imageindex="1"></node>
    private const string XmlNodeTextAtt = "text";
    private const string XmlNodeTagAtt = "tag";
    private const string XmlNodeImageIndexAtt = "imageindex";
    public static void DeserializeTreeView(TreeView treeView, string fileName)
    XmlTextReader reader = null;
    try
    // disabling re-drawing of treeview till all nodes are added
    treeView.BeginUpdate();
    reader = new XmlTextReader(fileName);
    TreeNode parentNode = null;
    while (reader.Read())
    if (reader.NodeType == XmlNodeType.Element)
    if (reader.Name == XmlNodeTag)
    TreeNode newNode = new TreeNode();
    bool isEmptyElement = reader.IsEmptyElement;
    // loading node attributes
    int attributeCount = reader.AttributeCount;
    if (attributeCount > 0)
    for (int i = 0; i < attributeCount; i++)
    reader.MoveToAttribute(i);
    SetAttributeValue(newNode,
    reader.Name, reader.Value);
    // add new node to Parent Node or TreeView
    if (parentNode != null)
    parentNode.Nodes.Add(newNode);
    else
    treeView.Nodes.Add(newNode);
    // making current node 'ParentNode' if its not empty
    if (!isEmptyElement)
    parentNode = newNode;
    // moving up to in TreeView if end tag is encountered
    else if (reader.NodeType == XmlNodeType.EndElement)
    if (reader.Name == XmlNodeTag)
    parentNode = parentNode.Parent;
    else if (reader.NodeType == XmlNodeType.XmlDeclaration)
    //Ignore Xml Declaration
    else if (reader.NodeType == XmlNodeType.None)
    return;
    else if (reader.NodeType == XmlNodeType.Text)
    parentNode.Nodes.Add(reader.Value);
    finally
    // enabling redrawing of treeview after all nodes are added
    treeView.EndUpdate();
    reader.Close();
    /// <span class="code-SummaryComment"><summary>
    /// Used by Deserialize method for setting properties of
    /// TreeNode from xml node attributes
    /// <span class="code-SummaryComment"></summary>
    private static void SetAttributeValue(TreeNode node,
    string propertyName, string value)
    if (propertyName == XmlNodeTextAtt)
    node.Text = value;
    else if (propertyName == XmlNodeImageIndexAtt)
    node.ImageIndex = int.Parse(value);
    else if (propertyName == XmlNodeTagAtt)
    node.Tag = value;
    public static void SerializeTreeView(TreeView treeView, string fileName)
    XmlTextWriter textWriter = new XmlTextWriter(fileName,
    System.Text.Encoding.ASCII);
    // writing the xml declaration tag
    textWriter.WriteStartDocument();
    //textWriter.WriteRaw("\r\n");
    // writing the main tag that encloses all node tags
    textWriter.WriteStartElement("TreeView");
    // save the nodes, recursive method
    SaveNodes(treeView.Nodes, textWriter);
    textWriter.WriteEndElement();
    textWriter.Close();
    private static void SaveNodes(TreeNodeCollection nodesCollection,
    XmlTextWriter textWriter)
    for (int i = 0; i < nodesCollection.Count; i++)
    TreeNode node = nodesCollection[i];
    textWriter.WriteStartElement(XmlNodeTag);
    textWriter.WriteAttributeString(XmlNodeTextAtt,
    node.Text);
    textWriter.WriteAttributeString(
    XmlNodeImageIndexAtt, node.ImageIndex.ToString());
    if (node.Tag != null)
    textWriter.WriteAttributeString(XmlNodeTagAtt,
    node.Tag.ToString());
    // add other node properties to serialize here
    if (node.Nodes.Count > 0)
    SaveNodes(node.Nodes, textWriter);
    textWriter.WriteEndElement();
    And this is how i'm using the class this method i'm calling it inside the CreateDirectoryNode and i'm updating the treeView in real time when getting the ftp content from the server i build the treeView structure in real time.
    DateTime last_update;
    private void UpdateList(TreeNode tn_rt)
    TimeSpan ts = DateTime.Now - last_update;
    if (ts.TotalMilliseconds > 200)
    last_update = DateTime.Now;
    treeViewMS1.BeginUpdate();
    treeViewMS1.Nodes.Clear();
    treeViewMS1.Nodes.Add(tn_rt);
    TreeViewXmlPopulation.SerializeTreeView(treeViewMS1, @"c:\XmlFile\Original.xml");
    ExpandToLevel(treeViewMS1.Nodes, 1);
    treeViewMS1.EndUpdate();
    And when i'm running the program again in the constructor i'm doing:
    if (File.Exists(@"c:\XmlFile\Original.xml"))
    TreeViewXmlPopulation.DeserializeTreeView(treeViewMS1, @"c:\XmlFile\Original.xml");
    My question is how can i update the xml file in real time like i'm doing now but also with the Tag property so next time i will run the program and will not get the content from the ftp i will know in the treeView what is file and what is directory.
    The problem is that now if i will run the program the Tag property is null. I must get the ftp content from the server each time.
    But i want that withoutout getting the ftp content from server to Tag each file as file in the treeView structure.
    So what i need is somehow where i;m Tagging "file" or maybe when updating the treeView also to add something to the xml file so when i will run the progrma again and read back the xml file it will also Tag the files in the treeView.

    Hi
    Chocolade1972,
    Your case related to Winform Data Controls, So i will move your thread to Windows Forms> Windows
    Forms Data Controls and Databinding  forum for better support.
    Best regards,
    Kristin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How can i write to or read from the digital I/O of the SPIDER8 with DIADEM?

    We have the problem that we haven't found out yet how to activate the digital I/O of the HBM SPIDER8 hardware with DIADEM 6.0.

    The digital input is supported since DIAdem 3.02 the output since DIAdem 7.0.
    Maybe that the problem is the following:
    - Analog input will be measured on channel 0 up to 7
    - Digital input will be measured on channel 8 as word
    So if you would like to measure bit 3 you must add a
    F(x)-block with this function getb(d,3).
    I hope this will help you.
    Greetings
    Walter

  • How can I get the connection code for the magic track pad?

    I want to use my magic trackpad and I scrapped the box with the connection code. How can I get it again? I don't need it for Mac, but yes for windows...

    user570667 wrote:
    Hi 2 all,
    How can i get the source code from java concurrent program in R12? like , "AP Turnover Report" is java concurrent program, i need to get its source code to know its logic. how can i get its source code not the XML template?
    Regards,
    ZulqarnainDid you see old threads for similar topic/discussion? -- https://forums.oracle.com/forums/search.jspa?threadID=&q=Java+AND+Concurrent+AND+Source+AND+Code&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    Thanks,
    Hussein

  • How can i write the below code using "For all entries"

    Hi
    How can we write the below code using "for all entries" and need to avoid joins...
    Please help
    SELECT aaufnr aobjnr aauart atxjcd a~pspel
    agstrp awerks carbpl cwerks
    INTO TABLE t_caufv
    FROM caufv AS a
    INNER JOIN afih AS b
    ON aaufnr = baufnr
    INNER JOIN crhd AS c
    ON bgewrk = cobjid
    AND c~objty = 'D'
    WHERE ( a~pspel = space
    OR a~txjcd = space
    OR NOT a~objnr IN
    ( select OBJNR from COBRB AS e
    WHERE objnr = a~objnr ) )
    AND a~werks IN s_plant
    AND a~auart IN s_wtype
    AND NOT a~objnr IN
    ( select OBJNR from JEST AS d
    WHERE objnr = a~objnr
    AND ( dstat = 'A0081'OR dstat = 'A0018' )
    AND d~inact 'X' ).
    Reward points for all helpfull answers
    Thanks
    Ammi.

    Hi,
    SELECT objnr objid aufnr
            from afih
            into table t_afih.
    SELECT objnr
            from JEST
            into table t_JEST
            where stat = 'A0045'
               OR stat = 'A0046'
               AND inact 'X'.
    SELECT objnr
            from COBRB
            into table t_cobrb.
    SELECT arbpl werks objid objty
          from crhd
          INTO table it_crhd
          FOR ALL ENTRIES IN it_afih
          WHERE objty eq 'D'
          AND gewrk = it_afih-objid.
    SELECT aufnr objnr auart txjcd pspel gstrp werks aufnr
            FROM caufv
            INTO table t_caufv
            FOR ALL ENTRIES IN it_afih
            WHERE aufnr = it_afih-aufnr
              And pspel = ' '
              AND txjcd = ' '
             ANd objnr ne it_crhd-objnr
              AND auart in s_wtype
              AND werks in s_plant.
             AND objnr ne it_jest-objnr.
    dont use NE in the select statements, it may effect performance also. Instead use if statements inside
    loops.
    loop at t_caufv.
    read table it_chrd............
      if t_caufv-objnr ne it_chrd-objnr.
      read table it_jest..........
       if   if t_caufv-objnr ne it_jest-objnr.
        (proceed further).
       endif.
      endif.
    endloop.
    hope this helps.
    Reward if useful.
    Regards,
    Anu

  • How can we write the code for opening the command prompt and closing the

    how can we write the code in java for opening the command prompt and closing the cmd prompt from eclipse (cmd prompt should close when click on the turminate button in eclipse)

    rakeshsikha wrote:
    how can we write the code for opening the command prompt and closing theBy typing in Eclipse (which you seemingly have)?

  • How can I write a code that triggers when clicking on Save button

    I want to hide certain fields inside my tracking list, if the login user is not part of the “Managers” group.
    To do so I want to add the following Page-load code inside a web part :-
    using (SPSite site = new SPSite(SPContext.Current.Site.Url))
    using (SPWeb web = site.OpenWeb())
    {SPGroup group = site.Groups["Managers"];
    bool isUser = site.IsCurrentUserMemberOfGroup(group.ID);
    if (isUser)
    {textbox.Visible=false;}}
    And the following custom code that triggers when saving the form :-
    using (SPSite site = new SPSite(SPContext.Current.Site.Url))
    using (SPWeb web = site.OpenWeb())
    SPList list = web.Lists["ListName"];web.AllowUnsafeUpdates = true;
    SPListItem item = list.Items[SPContext.Current.ListItem.UniqueId];
    txtTitle.Text = item["Title"] as string;item.Update();web.AllowUnsafeUpdates = false;
    But I am not sure where exactly I should add the custom code for the save button ? I tried writing it inside the Oninit method , but I got many errors as shown below:-
    So can anyone advice how i should write the web part to include the Page load & the custom save button code?
    second question in general is my above approach considered valid , i mean to hide/show list columns using web parts ?

    Hi,
    According to your post, my understanding is that you want to hide/show list columns based on specify the permission for Users, SharePoint Groups or Active Directory Groups.
    Here is a solution from CodePlex for your reference:
    SharePoint 2013 Column & View Permission
    https://sp2013columnpermission.codeplex.com/
    Best Regards
    Dennis Guo
    TechNet Community Support

  • How can i write a code to get sume of value from days.

    Hi,
    how can i write a code to get the sum of value of days(example 1 to 30).
    This is in BPS ...
    i created multi planning area and creted planning function with {keyfigure name,planning area,days}.
    now i want to read all the actual values  from basic planing area(basic cube) and calculate the sum of the value.if you have idea can you share the code.
    ENTRIES = VARC ( 'zvardays' ).     ex(zvardays like 28 days or 29 days or 30 days or 31 days)
    COUNT = ENTRIES.
    *Get the all the days value from actual
    FOREACH PAREA = 'basic planning area'.
      COUNT = 1.
    DO
         SUM = SUM + {amount, count}      (amount is a keyfirgure value)
    ENDDO.
    COUNT = COUNT+1.
       SUMACT =  SUM.
    ENDFOR.
    can you correct the above code ....to read the values and sum of the those value.
    Thanks...

    Hi ..
    That is ok..
    Can you provide sample code for my requirement..
    and also how can i pass the error message (can you help me syntax )
    and if my acutal-total  is not equal to plan-total  then
    i have to pass the error message and then  i have to restrict save the data  how i can i restrict(user can not save the data until the values should be equal) .
    Can you help me it is very urgent..
    thanks.//
    Edited by: Eyda rose on Jun 4, 2008 9:29 PM

  • How can I write HTML code in this forums

    Sorry but I didn't know where to post this thread.....
    How can I write HTML code in this forums?

    Hello,
    Every piece of code in your post should be wrapped with the forum tags [ code] and [ /code], without the blanks.
    In case of the &lt;a> tag, that is not enough. In this case, you have several options. The most elegant one is to use the entity name for the less-then sign - & lt; - without any spaces. Other options is to add a space between the less-then and the ‘a’ character (and make a note of it) or change the less-then character with a left bracket one.
    When posting code, you should always use the forum preview option, just to make sure the forum software “understood” your code correctly.
    Hope this helps,
    Arie.

  • How can i write code in Inbound ABAP proxy method

    Hi,
    All
    Iam doing server proxy ascenario
    /people/siva.maranani/blog/2005/04/03/abap-server-proxies
    i have done
    steps:
    1:I have done inbound  proxy interface in xi
    2:i have created a inbound abap proxy in my SAP WEB AS6.4 using SPROXY.
    3:I need to write code in Z11_EMPDETAILS_IN~EXEXUTE_ASYNCHRONOUS method
    if i double click on that method it is not opening how can I write code.

    Hi,
    You have to goto the class
    <b>ZCL</b>_EMPDETAILS_IN~EXEXUTE_ASYNCHRONOUS not
    <b>Z11</b>_EMPDETAILS_IN~EXEXUTE_ASYNCHRONOUS
    Check on the third step.
    Regards
    Vijaya

  • How can i write code inside methods.

    Hi,
       I am new to wbdynpro. How can i write code in Webdynpro?
    I have created one layout in that two textboxes are there. After entering the details when i click on the button the datas should be saved into the database table. How can i write code in this.
    please help me.
    Shyja

    Hi,
    First in context create node for 2 input field. Then disign layout for input filds and do data binding. Then create button and assign ON action event to it. In action method use wizard to read the values from the node.
    DATA: Node type REF TO IF_WD_CONTEXT_NODE,
    elem_node1 TYPE REF TO if_wd_context_element,
    stru_node1 type ZEMP.
    Node = wd_Context->get_Child_Node( Name = `S_NODE2` ).
    get element via lead selection
    elem_node1 = node->get_element( ).
    get all declared attributes
    elem_node1->get_static_attributes(
    IMPORTING
    static_attributes = stru_node1 ).
    INSERT ZEMP FROM stru_node1.
    If helpful reward points.
    Regards,
    Karthick S

  • How can i write the EPCF

    I want to wrtie some ECPM code
    but I don't know how can i write code in IViewo
    How to install or enable EPCF development enviroment
    Where should i write the EPCF code?

    Hi,
    Try this link for EPCF:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/enterprise portal client.pdf
    <b>Regards,
    Sai Krishna.
    PS: Plz do assign points if it helps. ;-)</b>

  • How can I write new objects to the existing file with already written objec

    Hi,
    I've got a problem in my app.
    Namely, my app stores data as objects written to the files. Everything is OK, when I write some data (objects of a class defined by me) to the file (by using writeObject method from ObjectOutputStream) and then I'm reading it sequencially by the corresponding readObject method (from ObjectInputStream).
    Problems start when I add new objects to the already existing file (to the end of this file). Then, when I'm trying to read newly written data, I get an exception:
    java.io.StreamCorruptedException
    at java.io.ObjectInputStream.readObject0(Unknown Source)
    at java.io.ObjectInputStream.readObject(Unknown Source)
    Is there any method to avoid corrupting the stream? Maybe it is a silly problem, but I really can't cope with it! How can I write new objects to the existing file with already written objects?
    If anyone of you know something about this issue, please help!
    Jai

    Here is a piece of sample codes. You can save the bytes read from the object by invoking save(byte[] b), and load the last inserted object by invoking load.
    * Created on 2004-12-23
    package com.cpic.msgbus.monitor.util.cachequeue;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.RandomAccessFile;
    * @author elgs This is a very high performance implemention of Cache.
    public class StackCache implements Cache
        protected long             seed    = 0;
        protected RandomAccessFile raf;
        protected int              count;
        protected String           cacheDeviceName;
        protected Adapter          adapter;
        protected long             pointer = 0;
        protected File             f;
        public StackCache(String name) throws IOException
            cacheDeviceName = name;
            f = new File(Const.cacheHome + name);
            raf = new RandomAccessFile(f, "rw");
            if (raf.length() == 0)
                raf.writeLong(0L);
         * Whne the cache file is getting large in size and may there be fragments,
         * we should do a shrink.
        public synchronized void shrink() throws IOException
            int BUF = 8192;
            long pointer = getPointer();
            long size = pointer + 4;
            File temp = new File(Const.cacheHome + getCacheDeviceName() + ".shrink");
            FileInputStream in = new FileInputStream(f);
            FileOutputStream out = new FileOutputStream(temp);
            byte[] buf = new byte[BUF];
            long runs = size / BUF;
            int mode = (int) size % BUF;
            for (long l = 0; l < runs; ++l)
                in.read(buf);
                out.write(buf);
            in.read(buf, 0, mode);
            out.write(buf, 0, mode);
            out.flush();
            out.close();
            in.close();
            raf.close();
            f.delete();
            temp.renameTo(f);
            raf = new RandomAccessFile(f, "rw");
        private synchronized long getPointer() throws IOException
            long l = raf.getFilePointer();
            raf.seek(0);
            long pointer = raf.readLong();
            raf.seek(l);
            return pointer < 8 ? 4 : pointer;
         * (non-Javadoc)
         * @see com.cpic.msgbus.monitor.util.cachequeue.Cache#load()
        public synchronized byte[] load() throws IOException
            pointer = getPointer();
            if (pointer < 8)
                return null;
            raf.seek(pointer);
            int length = raf.readInt();
            pointer = pointer - length - 4;
            raf.seek(0);
            raf.writeLong(pointer);
            byte[] b = new byte[length];
            raf.seek(pointer + 4);
            raf.read(b);
            --count;
            return b;
         * (non-Javadoc)
         * @see com.cpic.msgbus.monitor.util.cachequeue.Cache#save(byte[])
        public synchronized void save(byte[] b) throws IOException
            pointer = getPointer();
            int length = b.length;
            pointer += 4;
            raf.seek(pointer);
            raf.write(b);
            raf.writeInt(length);
            pointer = raf.getFilePointer() - 4;
            raf.seek(0);
            raf.writeLong(pointer);
            ++count;
         * (non-Javadoc)
         * @see com.cpic.msgbus.monitor.util.cachequeue.Cache#getCachedObjectsCount()
        public synchronized int getCachedObjectsCount()
            return count;
         * (non-Javadoc)
         * @see com.cpic.msgbus.monitor.util.cachequeue.Cache#getCacheDeviceName()
        public String getCacheDeviceName()
            return cacheDeviceName;
    }

Maybe you are looking for