MFC Custom static control state is always 4

Hi,
I am creating a custom static control, and want to load different bitmap for different state.
I inherited CMyStatic from CStatic and override the below functions. And i created the static control using SS_NOTIFY macro. 
I am getting the state of the static control is 4. Then i called staticCtrl..EnableWindow(TRUE),
also the state is 4.
Can some one please help, how to find the correct state of static control like, STN_ENABLED, STN_DISABLE,
STN_CLICKED etc..
//CMyStatic.cpp
BEGIN_MESSAGE_MAP(CMyStatic, CStatic)
ON_WM_DRAWITEM()
END_MESSAGE_MAP()
void CMyStatic::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
int state = lpDrawItemStruct->itemState;
void CMyStatic::PreSubclassWindow()
CStatic::PreSubclassWindow();
ModifyStyle(0,SS_OWNERDRAW);
//MyDlg.cpp
staticCtrl.Create(L"",BS_FLAT |  WS_VISIBLE | SS_CENTER | SS_NOTIFY,CRect(20,20,100,100),this,1111111); //state:4
staticCtrl..EnableWindow(TRUE); //State:4
Can someone please help on this.
Thanks

Hi LokanathNayak,
From your description, you add SS_NOTIFY style to your static control, so the parent windows will get the notification message, STN_ENABLED, STN_DISABLE, STN_CLICKED etc..
You need to manually add the notify message handler. Something like this:
afx_msg void OnClicked();
afx_msg void OnDoubleClicked();
afx_msg void OnEnabled();
BEGIN_MESSAGE_MAP(CMFCStaticNotifyDlg, CDialogEx)
ON_WM_SYSCOMMAND()
ON_WM_PAINT()
ON_WM_QUERYDRAGICON()
ON_STN_CLICKED(ID_STATIC, &CMFCStaticNotifyDlg::OnClicked)
ON_STN_ENABLE(ID_STATIC, &CMFCStaticNotifyDlg::OnEnabled)
ON_STN_DBLCLK(ID_STATIC, &CMFCStaticNotifyDlg::OnDoubleClicked)
ON_BN_CLICKED(IDC_BUTTON1, &CMFCStaticNotifyDlg::OnBnClickedButton1)
ON_BN_CLICKED(IDC_BUTTON2, &CMFCStaticNotifyDlg::OnBnClickedButton2)
END_MESSAGE_MAP()
void CMFCStaticNotifyDlg::OnClicked()
TRACE(L"clicked");
void CMFCStaticNotifyDlg::OnEnabled()
TRACE(L"enabled");
void CMFCStaticNotifyDlg::OnDoubleClicked()
TRACE(L"double click");
Best regards,
Shu
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.

Similar Messages

  • Integrating custom ActiveX control with SapGUI

    Hi everybody
    I'm in the process of writing a custom MFC based ActiveX control written in C++ that we want to use in a product. I am currently at the point where I can instantiate the control and interact with the various methods that it exposes but I have a problem integrating the control more tightly with the SapGUI e.g. change of colors, fonts etc.
    I want to make the control to reflect the user changes when the user modifies any settings of the SapGUI. I've tried catching various events that are exposed by some of the dictionary classes such as cl_gui_props_consumer=>color_change/global_prop_change and cl_gui_resources=>resources_changed but these events only fire in my control once the PAI of the client program that encapsulates the control fires which is hardly appropriate since it means that the control will have to wait for user input before it will change reflect any changes in user settings.
    I've written a test program for my control and when I change my SapGUI colors the rest of the controls etc on the screen do change color but my control only change color once I've performed some action that fires the PAI. Personally I think the controls written by SAP intergrates with the SapGUI through some interface that is called behind the scenes by the SapGUI since the GUI will have some way of knowing the set of ActiveX controls instantiated inside it  and I cannot find any event in the ABAP controls framework (e.g. CL_GUI_OBJECT, CL_GUI_CONTROL) that will allow this type of integration. I'll be digging for the answer but any suggestions will by greatly appreciated.
    Thank you in advance for any help.
    Kind regards
    Ettienne Hugo

    Hello Ettienne Hugo,
    To get the SAP GUI Theme or font changes events you need to add your MFC application or ActiveX MFC dll into u201CSAP Configuration->Application Tab->Addu201D and u need to call the functions SapHookInit and to stop getting the change events u need to call SapHookExit.(sapfhook.dll provides these functions)
    I tried with exe, never tried with ActiveX MFC dll/ocx. With EXE it works.
    Thanks and Regards,
    Ashwini

  • Windows Phone - Cannot bind custom user controll with listview item source property

    It is Windows Phone 8.1 (runtime)
    I have some problem of binding custom user controll with list of data. I'll make it simple as I can.
    My problem is that somehow if I use DataBind {Binding Something} inside my custom controll it will not work.
    I need to transfer binded data (string) to custom controll.
    It is strange that if I do not use DataBind, it will work normally. Eg MyCustomControllParameter = "some string" (in my example 'BindingTextValue' property)
    Does anyone Know how to bind custom user controll with inside ListView with DataTemplate.
    Assume this:
    XAML Test-Main page
    <Grid  Background="Black">        <ListView x:Name="TestList" Background="#FFEAEAEA">                    <ListView.ItemTemplate>                <DataTemplate>                    <Grid Background="#FF727272">                        <local:TextBoxS BindingTextValue="{Binding Tag, FallbackValue='aSource'}" local:TextBoxS>                    </Grid>                </DataTemplate>            </ListView.ItemTemplate>        </ListView>    </Grid>
    XAML Test-Main page c#
    public sealed partial class MainPage : Page    {        List<TTag> tags = new List<TTag>();        public MainPage()        {            this.InitializeComponent();            this.NavigationCacheMode = NavigationCacheMode.Required;        }        public class TTag        {            public string Tag { get; set; }        }        private void InitializeAppData()        {            TTag tag = new TTag() { Tag = "hello world" };            tags.Add(tag);            tags.Add(tag);            tags.Add(tag);            TestList.ItemsSource = tags;        }             protected override void OnNavigatedTo(NavigationEventArgs e)        {            InitializeAppData();        }           }
    User Control XAML:
      <UserControl    x:Class="CustomControllTest.TextBoxS"    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"    xmlns:local="using:CustomControllTest"    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"    mc:Ignorable="d"    d:DesignHeight="300"    d:DesignWidth="400">      <Grid x:Name="LayoutRoot" Background="#FF4F4F4F"   >        <RichTextBlock x:Name="MyTestBlock">        </RichTextBlock>    </Grid></UserControl>
    User Control c#
    public TextBoxS()       {            this.InitializeComponent();            LayoutRoot.DataContext = this;        }        public static readonly DependencyProperty BindingTextValueProperty = DependencyProperty.Register(                                         "BindingTextValue",                                         typeof(string),                                         typeof(TextBoxS),                                         new PropertyMetadata(default(string)));        public string BindingTextValue        {            get            {                return GetValue(BindingTextValueProperty) as string;            }            set            {                SetValue(BindingTextValueProperty, value);                //This method adds some custom logic into RichTextBlock, pointed correctly                SetupBox(value);            }        }
    Thanks for helping ;)

    If you use a built-in control rather than your custom control, does binding work? You should verify that first.
    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.
    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined
    objects and unknown namespaces.

  • Customer Report or Statement

    Hi All,
    My client have a cstom program for generating Customer payment due list (payments to customer list - displays credit balance). This list uses the tables or hits the following tables: KNA1, KNB1, KNKK, T042Z, BSID.
    Now my question, is there a standard report or statement which generates this information. Basically, it should give customer master data, credit master data and customer open items. (I think these info would hit the above tables).
    Please help me with this. Does SAP offer anything?
    regards,
    Satya

    Thank you everyone for all your responses. probably, I have deviated you all from my actual requirement.
    The client has a typical scenario. They generate payment due list of customers every week - open items due till that date of the week based on customer number, accounting clerk, credit control area and risk category. Once the list is generated, the accounting clerk analyzes the total amount of open items due (may be credit or debit balance) with the total obligation (amount due in next few weeks - may be credit or debit balance) and decides whether to pay or not to the customer. Usually, client ends up paying 3 in 4 times (these are for warranties and incentives).
    Client has custom program for these which i have to replace with standard SAP. I do not have to send this payment due list to customer nor the statements (the customer views the list from a dealer portal online). So, I do not see the need of using SAP scripts or smart forms.
    Can I still use correspondence types to generate payment due list with the use of SAP08 or SAP13 and standard program RFDOR...
    Are there any other options of generating this list? Please advice me and share your thoughts. This is very critical as I have to provide the solution in couple of days.
    I really appreciate evryone for your help.
    Regards,
    Satya

  • A report to show 2008 Customer Sales by State.

    My customer needs a report to show 2008 Customer Sales by State.  I don't see any SAP reports that will do this.  Is the state held in any of the document files that I could use to create a query??  Or does anyone have a query that reports this information?

    Try using following query:
    SELECT T0.CardCode, T0.CardName, T0.DocNum, T0.DocDate, T0.DocTotal, T1.State
    FROM OINV T0
    INNER JOIN CRD1 T1 ON T0.CardCode = T1.CardCode
    AND T0.ShipToCode = T1.Address
    Though A/R Invoice, does not store the state code separately, it does store the addresscode, which was used for shipping, which could be linked to the Addresses table. Though if the user changes the address manually, than there is no other way, but to do some programming and find the address name, though it will be pretty difficult, because users might not always be correct with their spellings.
    Rahul

  • Transactional control statements in trigger

    Hi,
      Transaction Control statement, which cannot be executed within a trigger body??why...explain with reason
    its helpful me..

    Ishan wrote:
    "a way you can actually make it work" .... seriously?
    Yes, I was serious. Why? What's wrong with that? Technically speaking, won't it work?
    This is not a way to make it work, it's a way to break an application/process
    Well !!! All the cases?
    Here's  a scenario
    I want to audit a table where if any change done by the user has to be tracked in an audit table, irrespective whether the change has now been rolled back in the main table. I want to see what change was done? How would I do it? Going by your logic of breaking application/process, I should never use trigger as  AUTONOMOUS_TRANSACTION. Am I right? How would I achieve it now?
    Your auditing/tracing code should be in a separate procedure and that procedure should be autonomous, so that the requirement to write autonomous data for that purpose is kept isolated from the trigger code.  Consider this scenario instead.  You want to write audit/trace information from your triggers, so you make the trigger autonomous and put in your code to write the audit/trace information.  Later on, someone who hasn't a clue comes along and decides they need to do something else in that trigger (well why write a new trigger when one already exists?) and they get it to write some data in relation to the data being created by the trigger.  Now you suddenly have a transactionally unsafe application, where this 'child data' can still be written and committed even if there's a problem in the main transaction.  By isolating auding/tracing away to it's own autonomous procedure, you make it clear that it's only the auditing/tracing that should be autonomous and prevent any problems from occuring inside the trigger itself.
    That's more of a way to write bad code that is transactionally unsafe and demonstrates a lack of understanding of database transactional processing or how the rdbms on the server processes commits and could potentially lead to write contention in the writer processes, of which many would be spawned if the number of inserts (in this example) was high.
    The above comment is based on the assumption(which, I never stated) that in whatever scenario my code would be implemented, it would ALWAYS break the process. There are scenarios where this code could be required.
    Here's a link from Oracle Documentation, that uses an example of creating a trigger with AUTONOMOUS_TRANSACTION. If it is a so bad example which "demonstrates a lack of understanding of database transactional processing", why would Oracle even mention it in their documentation?
    http://docs.oracle.com/cd/B19306_01/appdev.102/b14261/sqloperations.htm#BABDHGAB
    And the answer is because there is a way to do it and it could actually be required, even though it's rare.
    I just showed OP, that it's not allowed directly and if required, it can be done as there is a way to do it. When to do it and what could be the consequences was never the scope of the question.
    Yes, and there's ways to jump off cliffs and kill youself, but I wouldn't recommend demonstrating how to do that to people just because it's possible.
    Just because it's in the oracle documentation doesn't always mean it's best practice.  A lot of the documentation was written a long time ago and best practices have changed as well as further functionality added, and Oracle has been known to make mistakes in their documentation too.  However in this example, it's using it for auditing purposes, so the idea was almost there, but they still haven't met best practices of keeping the auditing isolated, so their example is not the best.

  • Issue in custom delegate control

    hi 
     am  creating a custom delegate control with controlid ="AdditionalPageHead" . i deployed and activated as a  site collection feature.
    but i am not sure how to see the activated control/  how to see this control in action.
    below is my code:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using Microsoft.SharePoint;
    using Microsoft.SharePoint.Administration;
    using Microsoft.SharePoint.Utilities;
    using Microsoft.SharePoint.Diagnostics;
    namespace OPUserDispName
      public  class EcmaScriptDelegateControl :WebControl
          protected override void OnLoad(EventArgs e)
              base.OnLoad(e);
              string helloAlert = "alert('Hello, world!');";
              this.Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "popup", helloAlert, true);
    //          if(!HttpContext.Current.User.Identity.IsAuthenticated)
       //              return;
          //       SPUser user = //SPContext.Current.Web.EnsureUser("i:0#.f|OPMembership|OPAdmin");
       //          user.Name = "OPAdmin";
          //       user.Update();
    in my  elements.xml file  of my module :
    <?xml version="1.0" encoding="utf-8"?>
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
        <Control Id="AdditionalPageHead" ControlAssembly="OPUserDispName, Version=1.0.0.0, Culture=neutral, PublicKeyToken=467af93481413beb" ControlClass="OPUserDispName.EcmaScriptDelegateControl"
    ></Control>
    </Elements>
    here i wanna see alert when the activated/or page load happened.
    may i know, how to see this, in working. as per the current scenario, am unable to see any output even after feature activation. 
    do i need to do any settings in master page? do i need to perform any changes in web.config.
    help is appreciated!

    This has complete solution.
    http://www.codeproject.com/Articles/113704/SharePoint-Master-Page-Customizations-Through
    can you try RegisterStartupScript instead
    of RegisterClientScriptBlock?
    Bala

  • How do I reuse a custom java control in another project?

    Relatively simple question, but I am having a lot of trouble with this. Documentation
    alludes to this being possible and easy, but never says how (and the only tutorials
    I can find describe creating a custom java control in the same project where they
    are used):
    "You can design a custom control for use in one project, or you can design a custom
    control for easy reuse in multiple projects." (from WLS docs on Java Controls)
    "When the control project builds, all of the controls and associated files are
    compiled into a single jar file and pushed onto the classpath of the containing
    application for immediate use and testing by other projects in the application.
    This jar is self-contained and can be moved to any other application by adding
    it to the application’s Library folder. Appropriately marked controls in the Library
    it will automatically appear on the user’s palette, ready for incorporation into
    an application." (from dev2dev article on controls, P. Hussey)
    I have a Workshop application which contains a few projects. One project is a
    component project, another is a web project. I created a custom java control in
    the control project and built it (JAR appeared in the Libraries folder). Now I
    open up the page flow in my web app project, and try to drag the java control
    onto my page flow - but I get an eror that the control must reside in the same
    project! It does not automatically appear on my palate, so if I go over to the
    palate on the right, and try to "add control" I only get a list containing the
    BEA controls - no custom controls are listed.
    What am I doing wrong? How can I incorporate my custom control into a web project?
    I don't want to move the control in the web project, since this contradicts the
    concept of a separate shared library. I should be able to build a library of controls
    and reuse them in our web projects right?
    -Bob

    Please disregard... I got it to work. For some reason I had to close Workshop,
    restart it, then I reloaded the application, rebuilt the control project, and
    now my control appears in the list of controls and can be easliy added to the
    palette.
    "Bob" <[email protected]> wrote:
    >
    Relatively simple question, but I am having a lot of trouble with this.
    Documentation
    alludes to this being possible and easy, but never says how (and the
    only tutorials
    I can find describe creating a custom java control in the same project
    where they
    are used):
    "You can design a custom control for use in one project, or you can design
    a custom
    control for easy reuse in multiple projects." (from WLS docs on Java
    Controls)
    "When the control project builds, all of the controls and associated
    files are
    compiled into a single jar file and pushed onto the classpath of the
    containing
    application for immediate use and testing by other projects in the application.
    This jar is self-contained and can be moved to any other application
    by adding
    it to the application’s Library folder. Appropriately marked controls
    in the Library
    it will automatically appear on the user’s palette, ready for incorporation
    into
    an application." (from dev2dev article on controls, P. Hussey)
    I have a Workshop application which contains a few projects. One project
    is a
    component project, another is a web project. I created a custom java
    control in
    the control project and built it (JAR appeared in the Libraries folder).
    Now I
    open up the page flow in my web app project, and try to drag the java
    control
    onto my page flow - but I get an eror that the control must reside in
    the same
    project! It does not automatically appear on my palate, so if I go over
    to the
    palate on the right, and try to "add control" I only get a list containing
    the
    BEA controls - no custom controls are listed.
    What am I doing wrong? How can I incorporate my custom control into a
    web project?
    I don't want to move the control in the web project, since this contradicts
    the
    concept of a separate shared library. I should be able to build a library
    of controls
    and reuse them in our web projects right?
    -Bob

  • Is it possible to create a custom filter control in SSRS 2005?

    Hello!
    I need to make a custom filter control for my reports which will provide some options for date parameter:
    - year and month selection
    - Some RadioButtons: "Yesterday", "Today", "Tommorow", "Last week", "Next week"
    - Date range
    Please, give any suggestion which can help to solve this task.

    Vsevolod,
    Unfortunately there is no built-in support for this customization in SSRS so far. You have to code to implement this feature in your custom application. For example, use a ReportViewer control in an ASP.NET application or a Win Form application.
    Anyway I think that you promote a good suggestion to improve Microsoft product's feature. Could you please give your feedback to our product team here?
    https://connect.microsoft.com/sql
    Thank you.
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • Custom Table Control in VA21/22/23 Tranaction Issue

    Hi Friends,
    Working on SAP R/3 Release 4.6C.
    There is a custom Table Control in one of the screen of VA21 Transaction.
    My requirement is to insert one more Field/Column to this table Control.
    The following are the sequence of fields in Table Control.
    Column1
    Column2
    Column3
    Column4
    After Inserting the Field in the middle of Column1 and Column2.
    The Sequence of Table Control is getting Changed.
    The Table Control has to show like this.
    Column1
    Column2     "New Field which is added
    Column3
    Column4
    Column5
    But I'm getting as below
    Column5
    Column3
    Column2     "New Field which is added
    Column1
    Column4
    When executing the Table Control Screen in SE51 with Screen Name and Screen Number,I am getting the perfect output.
    When executing thro VA21/22/23, Iam getting sequence mismatch.
    Anyone come across this scenario. Please guide to solve this.
    Thanks.

    Solved.
    Thanks.

  • Disable Toolbar in custom TextEditor Control

    Dear Gurus ,
    I made a custom Texteditor control in my own screen. The problem is that i can't disable the toolbat above the control .
    Please see my code ....
    CREATE OBJECT G_EDITOR_3
        EXPORTING
           PARENT = G_EDITOR_CONTAINER_3
           WORDWRAP_MODE = CL_GUI_TEXTEDIT=>WORDWRAP_AT_FIXED_POSITION
           WORDWRAP_TO_LINEBREAK_MODE = CL_GUI_TEXTEDIT=>TRUE
           WORDWRAP_POSITION          = 70
        EXCEPTIONS
            OTHERS = 1.
        IF SY-SUBRC NE 0.
          CALL FUNCTION 'POPUP_TO_INFORM'
            EXPORTING
              TITEL = G_REPID
              TXT2  = SPACE
              TXT1  = TEXT-001.
        ENDIF.
    Thanks a lot ....

    Hi,
    Try this code to disable your custom designed texteditor.
      CALL METHOD: editor_s->set_toolbar_mode
                       EXPORTING toolbar_mode = '0'.
    pls don't forget to place your container name inplace of mine,i.e  "editor_s".
    do rply if it's workable.
    Edited by: izullah on Feb 16, 2010 7:24 AM

  • Is there a way to make state transitions/animations of a fl.control states - button for example ?

    Is there a way to make state transitions/animations of a fl.control states - button for example ?
    All I can do now is change the skin design and that's it, I can't animate between states like I can with Flash Builder skins. So is there a way to do that, any technique or I have to create a button component from scratch?
    Thanks!

    simplebuttons have upState etc properties you can use to assign movieclips to the 3 states.  you can use the currentFrame property of movieclps to (appear to) smoothly transition from one state to another.

  • How to implement a custom UI control

    I need to display interactive maps on the Windows SAP GUI. The maps
    are dynamically generated and fetched from an external map server using ABAP.
    The interactive map should be scrollable and allow the user to select a single or multiple POIs (Point Of Interest) using the mouse and drag and drop them into
    a table and/or tree. There should be an visual indication on the map
    for selected POIs and a tooltip displaying additional information should
    pop up if the cursor is placed above a POI. I've implemented all this using
    SWT / Java already which was pretty straight forward.
    I looked at the CL_GUI_PICTURE control but it seems that I would need more
    events (such as OnMouseMove, OnLeft/RightButtonDown, OnLeft/RightButtonUp,
    OnDrag) in order to implement this. I think that the CL_GUI_PICTURE has
    just a few events in order to minimize client/server interactions.
    What are my options to implement such an interactive map on SAP GUI?
    I found this blog where a custom control is implemented using ActiveX:
    /people/thomas.jung3/blog/2004/09/01/using-net-windows-controls-in-the-abap-control-framework
    Is this the way to go? Is there an official developers guide for custom
    UI controls from SAP?

    Hi Dominik,
    Sorry but I don't have an answer - I have been trying to solve the same problem for a while now. I even contacted Thomas Jung directly, but was not able to solve the event sink\handler problem. Although I did manage to re-create his example and display a .NET VB Textbox within the SAP GUI...
    If you do manage to get any further - please let me know how you managed to get the event handling to work...
    Tx,
    N

  • Transaction control statements in loop

    for i in p_time_duration_rspm_spm.first..p_time_duration_rspm_spm.last
    loop
    insert into green.solids_aaqm_namp(sample_nr,time_duration_rspm_spm,monometer_reading,
         avg_flow,total_sampling_period,vol_air_sampled,
                             filter_paper_nr,cup_nr)
                   values(p_sample_nr,p_time_duration_rspm_spm(i),
                        p_monometer_reading(i),p_avg_flow(i),
                        p_total_sampling_period(i),p_vol_air_sampled(i),
                        p_filter_paper_nr(i),p_cup_nr(i));
    end loop;
    hallo,
    i am facing a problem in the insert statement.There is a table(3*6).the fields in the table are
    of number datatype.if any character is entered in any of those field a error message as to be
    displayed.
    and if a character is entered into second row, then the readings in the first row is inserted
    in to the table and then a error message is prompted.i want to know whether can we use the transaction control statements
    within the loop to avoid inserting only one row.if so, how?...is there any other way to implement the same at the form level
    before going the database.

    Hello,
    FORALL i in p_time_duration_rspm_spm.first..p_time_duration_rspm_spm.last SAVE EXCEPTIONS
    insert into green.solids_aaqm_namp(sample_nr,time_duration_rspm_spm,monometer_reading,
    avg_flow,total_sampling_period,vol_air_sampled,
    filter_paper_nr,cup_nr)
    values(p_sample_nr,p_time_duration_rspm_spm(i),
    p_monometer_reading(i),p_avg_flow(i),
    p_total_sampling_period(i),p_vol_air_sampled(i),
    p_filter_paper_nr(i),p_cup_nr(i));
    end loop;
    If wants Errors then
    errors := SQL%BULK_EXCEPTIONS.COUNT;
    dbms_output.put_line('Number of DELETE statements that failed: ' || errors);
    FOR i IN 1..errors LOOP
    dbms_output.put_line('Error #' || i || ' occurred during '||
    'iteration #' || SQL%BULK_EXCEPTIONS(i).ERROR_INDEX);
    dbms_output.put_line('Error message is ' ||
    SQLERRM(-SQL%BULK_EXCEPTIONS(i).ERROR_CODE));
    END LOOP;
    OR You can use as follows
    for i in p_time_duration_rspm_spm.first..p_time_duration_rspm_spm.last
    loop
    begin -- Newline Added
    insert into green.solids_aaqm_namp(sample_nr,time_duration_rspm_spm,monometer_reading,
    avg_flow,total_sampling_period,vol_air_sampled,
    filter_paper_nr,cup_nr)
    values(p_sample_nr,p_time_duration_rspm_spm(i),
    p_monometer_reading(i),p_avg_flow(i),
    p_total_sampling_period(i),p_vol_air_sampled(i),
    p_filter_paper_nr(i),p_cup_nr(i));
    EXCEPTION when OTHERS then -- Newline Added
    null; -- Newline Added
    end; -- Newline Added
    end loop;
    Bye
    Chitta

  • Control statement in internal tables

    hi experts,
    can any body will provide me the control statement of internal table.
                                                               thank you

    Hi,
    check this link
    http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/db9f1f35c111d1829f0000e829fbfe/content.htm
    Control Break Statements
    Control break statements are used to create statement blocks which process only specific table lines the LOOP – ENDLOOP block.
    You open such a statement block with the control level statement AT and close it with the control level statement ENDAT. The syntax is as follows:
    Table should be sorted when you use control-break statements
    You can break the sequential access of internal tables by using these statements.
    Syntax:
    At first.
    <Statement block>
    Endat.
    This is the first statement to get executed inside the loop (remember control break statements are applicable only inside the loop)
    So in this block you can write or process those statements which you want to get executed when the loop starts.
    At New carrid.
    Write:/ carrid.
    Endat.
    In this case whenever the new carrid is reached, carrid will be written.
    At End of carrid.
    Uline.
    Endat.
    In this case whenever the end of carrid is reached, a line will be drawn.
    At Last.
    Write:/ ‘Last Record is reached’.
    Endat.
    Processing of statements within this block is done when entire processing of entire internal table is over. Usually used to display grand totals.
    You can use either all or one of the above control break statements with in the loop for processing internal table.
    At end of carrid.
    Sum.
    Endat.
    In above case the statement SUM (applicable only within AT-ENDAT) will sum up all the numeric fields in internal table and result is stored in same internal table variable.
    Regards,
    Sruthi

Maybe you are looking for

  • Query using logical database

    Hi, There is one query which is using logical database PNM. I have got one requirement to add one field in selection screen to filter the output. The field which is required to be displayed in selection screen to filter the data is from table mkal wh

  • IPhone 6 Missing Photos

    Hello everybody, I recently bought the new iPhone 6. (running iOS 8.0.2) I'm pretty sure it's just a bug, but I'm surprised that I couldn't find any discussions related to this one. My problem is when I take a photo using the volume rocker (note: I h

  • Organization structure problem for shared labors

    Hi Gentelmen, I have in a company code named Horticulture three departments Grapes, Olive and palms, and i have 300 labors not fixed for any one of this departments but working according to the season and the harvest, when any department season start

  • What exactly is my"User Name"

    what is "My User Name"

  • VCard via email

    My husband sent me a vcard via his blackberry to my Yahoo email, which I receive on my iPad. I tap on it, it asks if I want to add to contacts (existing in this case), upon which the mail suddenly quits, and no info is added to the contact. Any thoug