Event 'AT New' how to use it....

Hi Good Afternoon!
This the code:
LOOP AT IT_VBAP INTO WA_VBAP.
AT NEW VBELN.
WRITE : / WA_VBAP-VBELN .
ENDAT.
WRITE : / WA_VBAP-POSNR , WA_VBAP-MATKL.
ENDLOOP.
output is not in oder
can any 1 help me....
thanks,

Hi Lawrence,
REPORT  y_control_events.
*"Table declarations...................................................
TABLES:
  spfli,
  sflight.
SELECT-OPTIONS:
  s_carrid FOR spfli-carrid.
DATA:
  BEGIN OF t_spfli OCCURS 0,
    carrid   LIKE spfli-carrid,
    connid   LIKE spfli-connid,
    cityfrom LIKE spfli-cityfrom,
    cityto   LIKE spfli-cityto,
    distance LIKE spfli-distance,
    distid   LIKE spfli-distid,
  END OF t_spfli.
DATA:
  w_num1 TYPE i,
  w_sum TYPE p.
START-OF-SELECTION.
  SELECT carrid
         connid
         cityfrom
         cityto
         distance
         distid
    FROM spfli
    INTO TABLE t_spfli
   WHERE carrid IN s_carrid.
END-OF-SELECTION.
*----------------Control Events--------------------*
  LOOP AT t_spfli.
    AT FIRST.
      WRITE:/   'Carrid'(001),
            10  'Connid'(002),
            20  'City From'(003),
            40  'City To'(004),
            60  'Distance'(005),
            75  'Kms'.
      WRITE:/ sy-uline.
      SKIP.
    ENDAT.
    AT NEW carrid.
      SKIP.
      WRITE:/'At new carrid'(006), t_spfli-carrid.
      SKIP.
    ENDAT.
    WRITE:/ t_spfli-carrid   UNDER text-001,
            t_spfli-connid   UNDER text-002,
            t_spfli-cityfrom UNDER text-003,
            t_spfli-cityto   UNDER text-004,
            t_spfli-distance UNDER text-005,
            t_spfli-distid UNDER 'Kms'.
    AT END OF carrid.
      SKIP.
      WRITE:/'At End Of'(007).
      SUM.
      WRITE:/'Total Dist.is'(008), t_spfli-distance.
      WRITE:/ sy-uline.
    ENDAT.
    AT LAST.
      WRITE:/ ' At last, we are At Last'(009).
    ENDAT.
  ENDLOOP.
Regards,
Sravanthi

Similar Messages

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

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

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

  • How to use customer-specific fields with FI-CA event 940?

    The following text can be found under FI-CA event 940:
    You can also set customer-specific fields if you have defined the predefined include for customer enhancements CI_FKK_ACCIT_CUS in the structure FKK_ACCIT_CUS. The fields included here must have the same field name as the fields included in the structure ACCIT. These can also originate from an enhancement of the coding block in General Ledger Accounting. The fields Reservation Class and Reservation Key of the reconciliation key and the totals record are available as import parameters.
    My requirement is to populate the field HZUON in this event, which will be called when running t-code FPG1 (Transfer of FI-CA total records to general ledger)
    The problem is the fact that the output of the event (i.e. output of function module FKK_SAMPLE_0940 at first) only have the following fields:
    E_ZUONR     LIKE     ACCIT-ZUONR     Zuordnung (BSEG-ZUONR)
    E_XREF2     LIKE     ACCIT-XREF2     Referenz  (BSEG-XREF2)
    E_SGTXT     LIKE     ACCIT-SGTXT     Positionstext
    E_BUPLA     LIKE     ACCIT-BUPLA     Businnes Place (Korea only)
    I tried adding a new field to structure CI_FKK_ACCIT_CUS and adding this field to the output of the event 940, but how do I ensure that the content of the field will be used to populate the HZUON field of the FI document during "transfer of FI-CA total records to general ledger"?
    Cheers,
    Teo

    Hi Teo,
    I happened to see this post from you when I searched for a similar scenario related to event 940. I also need to add two fields in CI_FKK_ACCIT_CUS and make these fields as outputof the event. Did you come across any solution for the same? If so, can you please share.
    Regards,
    Harikumar. S
    Edited by: Harikumar Sasidharan on Dec 30, 2009 12:14 PM

  • How to use ThreadPoolExecutor / ArrayBlockingQueue with event objects

    I am having some trouble figuring out how to use the new java.util.concurrent library for a simple thread pool that has custom threads pulling off event objects from a queue.
    I started with this kind of code below, which I know is not right but am having trouble seeing the correct approach. Any help is appreciated. Thank You!
    -Paul
    public class testThreadPool {
    public static void main( String [] args ) {
    //work queue actaully only takes runnables,
    //but I need to add my event objects to this queue ??
    ArrayBlockingQueue<Runnable> workQueue = new ArrayBlockingQueue<Runnable>(20);
    ThreadPoolExecutor pool = new ThreadPoolExecutor(10,//pool size
    20,//max pool size
    1,
    TimeUnit.SECONDS,
    workQueue);//the work queue
    //this will ensure that the pool executor creates worker
    //threads of type MyThreadWorker
    pool.setThreadFactory(new MyThreadFactory());
    pool.prestartAllCoreThreads();
    //throw some events on the queue and let the pool workers
    //start to execute with the given event object
    workQueue.add(MyEvent);
    workQueue.add(AnotherEvent);
    class MyThreadFactory implements ThreadFactory {
    public Thread newThread(Runnable runnable) {
    return new (Thread)MyThreadWorker();
    class MyThreadWorker implements Runnable {
    private boolean m_run = true;
    public void run(){
    Object obj;
    while (m_run) {
    obj = null;
    //get the event object from the blocking queue
    try {
    obj = workQueue.take();
    } catch (InterruptedException e) {
    if ( obj == null ) continue;
    if ( obj == null ) continue;
    if (obj instanceof MyEvent) {
    //do this
    } else if (obj instanceof AnotherEvent) {
    //do this
    public void stopRunning(){
    m_run = false;
    this.interrupt();
    }

    What database and connection type are you using? Are you connecting the report directly to the database, or trying to assign the datasource to object data?
    It sounds like you might be trying to use a linked list, collection or other C# construct to pass your data in. This currently isn't supported by the Crystal Reports SDK. You can use a DataSet or a DataTable, and possibly also an IDataReader depending on which version of Crystal Reports you're referencing in your project. Of course you can also connect directly to the database, even if the database isn't on the same machine as the application.
    The way to show master records with detail information is through the use of subreports and linked subreport parameters. Linked subreports take their parameter value from a record in the main report, so that only the data appropriate to that master record is displayed. The guys over in the [report design|SAP Crystal Reports; forum can help you out with this if you have questions on the specifics.

  • DAQmx 7.5 - how to use Events in VB 6.0

    I'm using the type library (nidaqmx.tlb) supplied by DAQmx 7.5 to control a NI PCI-6251 board from VB 6.0
    (unfortunately Measurement Studio does not support this board for VB 6.0 anymore).
    Is there any tutorial or example describing how to use events (e.g. DAQmxRegisterEveryNSamplesEvent)
    in VB 6.0?

    hi, you must create connection like this:
    Set Connection = New ADODB.Connection
    Connection.Open "Provider=OraOLEDB.Oracle; " & _
    "Data Source=" & strServer & "; " & _
    "User ID=" & strUserName & "; " & _
    "Password=" & strPassword & "; "
    where strUserName - your user,
    strPassword - password to your user,
    strServer - alias to your server.
    My Oracle 10g is installed on c:\oraclexe\...in access you have database file, in oracle - data source
    your alias is maybe XE, if not you seek it in file tnsnames.ora which is in path like this c:\oraclexe\app\oracle\product\10.2.0\server\NETWORK\ADMIN
    Andy

  • How to use JDI handle event, need you help!~

    Hi,
    In our recent project, I need listen some event such as ClassPrepareEvent, MethodEntryEvent using JDI and handle it. I am trying to mend the TTY and let it
    do something simple when MethodEntryEvent occur.
    I just add a print line in the method methodEntryEvent in TTY.java. But I noticed that this method is not invocated after I input "run" commond. I don't konw why? And how can I listen this event? And when the methodEntryEvent method in TTY will be invocated?
    Anyone can help me ???
    Thank you!!!
    PS: methodEntryEvent method is post as follow:
    public void methodEntryEvent(MethodEntryEvent me) {
    Thread.yield(); // fetch output
    //notice:
    //i want print this sentens when every method entry.
    System.out.println("Method Entry:");
    StringBuffer buffer = new StringBuffer("\nMethod Entered: ");
    buffer.append(me.method().declaringType().name());
    buffer.append(".");
    buffer.append(me.method().name());
    buffer.append(" ");
    out.print(buffer.toString());
    otherEvent(me);
    Duan
    SJTU

    You must enable a MethodEntryRequest before any MethodEntryEvent will
    be reported.
    In the jdb/TTY reference debugger, use the 'trace methods [thread]'
    and 'untrace methods [thread]' commands to turn tracing on or off
    for method entry and exit.
    Once you request MethodEntry/Exit notification, then the methodEntryEvent
    handler in TTY.java will be called and you will see the println() you
    added to the code.

  • May I know how to use the user event

    I saw a sample as the attached screen. The user event is used. I am totally new of user event.
    may you give a brief explanation of it and how it used.
    Thanks.
    Attachments:
    Event.JPG ‏195 KB

    Hi turbot,
    attached you will find an example. There is no need to use local variables.
    Mike
    Attachments:
    test41_LV80.vi ‏17 KB

  • How to use the PROGRESS Event?

    Can someone explain to me how to use the PROGRESS event, i looked at the docs but it never helped me?
    I want to use it to display the prgress of downloading data from a API, its a URL event. But i was told i can do this via a PROGREE Event

    copy and paste the trace output from:
    import flash.events.ProgressEvent;
    //var facebookAPI:String = "https://graph.facebook.com/ginorea1/feed?access_token=277830088900615|2.AQDUBMBocIw_QcqE.3600.1313856000.0-100001000396080|5bXT8Cj0OUxNpr7y NeqTsJfwADg";//
    var facebookAPI:String = "https://graph.facebook.com/100001000396080/statuses?access_token=14563 4995501895|2.AQAKdU4pcsdMmmBO.3600.1313859600.0-100001000396080|7uzAMoRdsg5kXLjc exS5bVaPhag";
    var loader:URLLoader = new URLLoader(new URLRequest(facebookAPI));
    loader.addEventListener(Event.COMPLETE, loadComplete);
    loader.addEventListener(ProgresEvent.PROGRESS,loadProgress);
    function loadProgress(e:ProgressEvent):void
    trace(e.bytesLoaded,e.bytesTotal);
    progress_txt.text = String(Math.floor((e.bytesLoaded/e.bytesTotal)*100));
    function loadComplete(e:Event):void{
    processData(e.target.data);
    function processData(data:String):void
    var facebookFeed:Array = JSON.decode(data).data as Array;
    for (var i:uint, feedCount:uint = 10; i < feedCount; i++)
    var tf2:TextField=new TextField();
    feed1.text = facebookFeed[i].message;
    feed2.text = facebookFeed[2].message;
    feed3.text = facebookFeed[3].message;
    feed4.text = facebookFeed[4].message;
    feed5.text = facebookFeed[5].message;
    feed6.text = facebookFeed[6].message;
    feed7.text = facebookFeed[7].message;
    feed8.text = facebookFeed[8].message;
    feed9.text = facebookFeed[9].message;
    feed10.text = facebookFeed[10].message;
    stop();

  • I have a new iPad that uses the Cloud.  But my iMac, my MacBook Air, and my iPhone are all older.  How can I link my mail accounts that aren't on the cloud withntiPhone

    Does anyone know how to sync my email account which is on my iMac, my MacBook Air, and my iPhone with my new iPad that uses the Cloud.  none of my other Apple devices can use the cloud.   Please Help me use the same email account on my iPad!

    I have a MacBook Air, bought in 2010 or 2011.  It is running OS 10.6.8.
    I have an iMac that is the same age as my MacBook Air.  My iPhone is 2nd or 3rd generation.
    None can support "the Cloud".  I use gmail and my iPhone and both computers are all synced.
    I can't get email on my new iPad that does use "The Cloud".
    Please help.

  • How to trigger New page while using ALV with classes/oops?

    Hi All
    I am trying to print a report which has to show the data in two pages.
    I am using ALV with classes/oops.
    Though I am able to print the report but a new page is not coming. Whole of the data is coming in one single page.
    Please tell me as to how to trigger a NEW PAGE while using ALV with classes/oops.
    Please send some code samples also if available.
    Thanks in advance.
    Jerry

    using sort option you can do it. in case of grid/oo alv class ALV you can view that only in print mode/preview mode.
    in case of list you can view that directly.
    sort-fieldname = 'FIELDNAME'.
    sort-group = '*'  "triggers new page
    sort-up = 'X'.
    append sort to it_sort.

  • How to use Mouse Wheel Events

    Hello Everyone
    I am using Datagrid in my Canvas.
    I use mouse wheel to scroll the datagrid. But in one scroll
    through that wheel make the more than 4 rows to be scroll.
    So Now my requirement is to control the delta value of mouse
    wheel event and how to use that with my datagrid so that i will
    able to scroll one row through mouse wheel scroller.
    Thanks

    please give me some suggestion around it.
    I want to scroll one row of datagrid with per mousewheel
    scroll. I am not getting how to use the scrollMouseWheelMultiplier
    property of the IConfiguration class because i am not able to
    create the object of this class.
    I am using the Flex 3.0 and flash 9 version.
    please help me out around this.

  • HT1695 I know nothing about how to use my new ipod and when reading the little bit of information in the folder that came with it, all I can do is turn it on, but it just powers down after a few seconds.  How do I work this thing?

    I know nothing about how to use my new ipod and when reading the little information that came with it, all I can do is turn it on.  Then in a few seconds it goes black, never having brought up a screen to do anything!  Help!  What do I do to get this thing going?

    You might consider connecting it to the charger and charging up the battery overnight.
    Please Get the iPod Touch User Manual for iOS 5

  • I was trying to make a new screen recording using quicktimeplay, but when I watched the video after recording it all I could hear was me talking while the video was showing on the screen. How do I turn off that recording and turn the right one on? thanks

    I was trying to make a new screen recording using quicktimeplay, but when I watched the video after recording it all I could hear was me talking while the video was showing on the screen. How do I turn off that recording and turn the right one on? thanks

    Hi j2399123,
    It sounds like your screen recording is doing what it was designed to do, capture what is happening on your screen, with optional voice over with the microphone.
    Screen recording is for recording what you see on the screen, it is not a "video capture" option, like for capturing a movie with sound that is playing on your screen.
    For the QuickTime recording options, check out "Recording with QuickTime Player" in
    Mac Basics: QuickTime Player creates, plays, edits, and shares video and audio files
    http://support.apple.com/kb/ht4024
    And for screen recording specifically, there's
    QuickTime Player 10.x: Record your computer’s screen
    http://support.apple.com/kb/PH5882
    Thank you for thinking of Apple Support Communities for your support needs.
    Nubz

  • How to use my time capsule on my new macbook pro retina (time machine error)

    Hello all,
    I've been using my old mac for a while with my time capsule, but recently I bought the new macbook pro retina and I wanted to use the time capsule as the backup disk on the new one. However, whenever I try to run the backup, a message appears "The backup disk image “/Volumes/Data/XXX’s MacBook.sparsebundle” is already in use."
    I wanted to override the settings so that the new macbook will use the time capsule for its backup disk instead of the old one, as I will no longer be using it.
    I was wondering if anyone had this problem before and if anyone know how I can solve it?
    Thank you

    You could delete the old backup from your old laptop? If you need to keep it then you need to rename that folder so that your new macbook can creatie its own file in the same name.
    Regards,
    Ryan

  • How to use my new 02 sim

    How to use my new 02  sim on iPhone 4

    Put it in the phone. Turn the phone on. Make calls... I don't understand what you mean by "how to use" it...

Maybe you are looking for