Loop the table entry and for every entry perform some action.

Hello Experts,
I have a requirement where there are let say n no. of entries in my ITAB and now for every entry i have to check certain field value and based on that i have to send respective mail.
Now this has to run in background mode and the job will run on daily basis so the entries of table that are already processed should not be reprocessed.The scenario is every day the new entries will be added to ITAB and the newly added entries should be processed only.
Please provide some sample code if possible.
Thanks,
Naveen

Hi,
I can not add a new field to the existing ztable. Crating a copy of ztable with addtional field status and setting it as processed against the record whenever i populate ITAB from ztable could be a solution but seems very lenthy method.
There is one filed zdate  so write the code as below:-
loop at itab where zdate = sy-datum
email code------
endloop.
OR can i make use of
loop at itab into wa
  ON change  of <filed1>
email code-----
   ENDON
endloop.
Thanks,
Naveen

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 do you make the date change for every entry when inserting.

    Hello, I am making a daily vehicle inspection report for my truck and I would like to make a 7 day calendar but I would like to insert the date ie Monday Feb 22, 2010, Tuesday Feb 23, 2010 etc...and have it change for each day of the week. is there a way to do this? Also can you put an outline or a box around the 6 lines of text that you input.
    Thank you
    Ottoman

    Jerrold Green1 wrote:
    Ottoman,
    As Peter says, you can use a Table for this. You do not, however, need to enter two dates to fill with a series of dates. Dates are an exception to the general Fill rule. Just enter one, and fill down to get successive dates.
    Other exception available:
    a single cell is sufficient for every entries ending with a number :
    president1
    thief2
    king3
    behave this way.
    Durations behave like numbers : two cells are required.
    Yvan KOENIG (VALLAURIS, France) samedi 27 février 2010 18:20:29

  • Live meeting - After click Join the Meeting, it prompted for MeetingID, Entry and Location are blank, need to key in information manually

    Live meeting issue:
    After click Join the Meeting, it prompted for MeetingID, Entry and Location are blank, need to key in information manually
    1. It seems OK on Live meeting client settings.
    2. Then uninstall and reinstall live meeting client and addons. live meeting version now is 8.0.6362.41
    3.can schedule live meeting success.
    but issue persists.

    Live meeting issue:
    After click Join the Meeting, it prompted for MeetingID, Entry and Location are blank, need to key in information manually
    1. It seems OK on Live meeting client settings.
    2. Then uninstall and reinstall live meeting client and addons. live meeting version now is 8.0.6362.41
    3.can schedule live meeting success.
    but issue persists.

  • 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

  • What are the tables that Contains DTP Filter Entries

    Hello,
    for the filter entries on a DTP Process I found the table RSBKSELECT "Selections for DTP Request (Summary)". But that holds only value which are done generic by Formula etc. but not the information which are entered manual.
    Does anybody knows the table for the rest of entries ??
    I need this Information to Report these Filter as Selectioncriteria.
    Thank for any help
    Henning

    Hi,
    Please note that I was able to link the tables by this kind of code:
    "Get the request from the cube, to identify them.
        CALL FUNCTION 'RSSM_ICUBE_REQUESTS_GET'
          EXPORTING
            i_infocube     = LV_IC
          IMPORTING
            e_t_request    = LT_REQUEST
          EXCEPTIONS
            wrong_infocube = 1
            internal_error = 2
            others         = 3.
    "Check each request
        LOOP AT LT_REQUEST INTO LS_REQUEST.
          "Populate LV_REQUID_CHAR to be able to read the table RSBKSELECT
          "The key is : Request id, without leading 0, right justified, and shifted one time to the left.
          LV_REQUID_CHAR = LS_REQUEST-PARTNR.
          SHIFT LV_REQUID_CHAR LEFT DELETING LEADING '0'.
          SHIFT LV_REQUID_CHAR RIGHT DELETING TRAILING SPACE.
          SHIFT LV_REQUID_CHAR LEFT.
          "Get the filters
          SELECT  *
            INTO TABLE LT_RSBKSELECT
            FROM RSBKSELECT
            WHERE REQUID = LV_REQUID_CHAR.
    ENDLOOP.
    The internal table LT_RSBKSELECT will now contains all the filters used by the DTP.
    It is way better than using the field that contains the concatenation of all filters since it is limited to 255 characters.
    Hope it helps.

  • How to make the fields of the table mandatory while creating new entries..?

    Hi,
    I have created a new Z table which has 6 fields. All the 6 fields are KEY fields and all are of CHAR type. I have generated the table maintenance generator for the same. My requirement is all the fields should be MANDATORY while creating the entries. No field should be BLANK.
    When creating the new entries in the table, even if I don't give any values to some of the fields, it is saving the entry. But, it shouldn't happen like that. If any of the field is kept blank, it should not allow the user to save the entry. Can someone tell me how to approach this. Will there be any settings while creating the table which takes care of this.
    I read somewhere that this can be done using the Table EVENTS. Can someone tell me what is the code that we should write there in the Events which prevents the user from saving the blank fields. While writing the logic in the events, how to check whether the particular field is BLANK or not. Will the values be stored in any internal table kind of thing..?
    My table name is ZCRF_TAB and the fields are FLD!, FLD2, FLD3, FLD4, FLD5 & FLD6. Can someone provide me sample code for my requirement. Thanks in advance.
    Best regards,
    Paddu.

    Hi,I think u have generated Table Maintainance Generator, goto Environment->Modifications->Events
    Select appropriate option by using F4,I think value 05 is appropriate for u r requirement.Enter From routine name.Dbl click on the routine.
    Write the appropriate code like:
    If ZTABLE-FIELD1 is initial.
    Message (E000) with "Fill all the manadatory fields".
    Thats it.Just look at the following docu with screenshots,by this understand how u can use Table Events:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/abap/how%20to%20implement%20events%20in%20table%20maintenance.doc
    Regards,
    Rock.

  • Driver table in select for all entries

    anyone please let me what is driver table in select for all entries and when do we go for select for all entries

    Here is something from help
    FOR ALL ENTRIES WHERE
    Syntax
    ... FOR ALL ENTRIES IN itab WHERE ... col operator itab-comp ...
    Effect
    If the addition FOR ALL ENTRIES is specified before the language element WHERE, then the components comp of the internal table itab can be used as operands when comparing with relational operators.
    The internal table itab must have a structured line type and the component comp must be compatible with the column col.
    The logical expression sql_cond of the WHERE condition can comprise various logical expressions by using AND and OR. However, if FOR ALL ENTRIES is specified, there must be at least one Comparison with a column of the internal table itab, which can be specified either statistically or dynamically (Release 6.40 and higher). In a statement with a SELECTstatement with FOR ALL ENTRIES, the addition ORDER BY can only be used with the addition PRIMARY KEY.
    The whole logical expression sql_cond is evaluated for each individual line of the internal table itab. The resulting set of the SELECT statement is the union of the resulting sets from the individual evaluations. Duplicate lines are automatically removed from the resulting set. If the internal table itab is empty, the whole WHERE statement is ignored and all lines in the database are put in the resulting set.
    Notes
    In Release 6.10 and higher, the same internal table can be specified after FOR ALL ENTRIES and after INTO.
    The addition FOR ALL ENTRIES is only possible before WHERE conditions of the SELECT statement.
    Example
    Exporting all flight data for a specified departure city. The relevant airlines and flight numbers are first put in an internal table entry_tab, which is evaluated in the WHERE condition of the subsquent SELECT statement.
    PARAMETERS p_city TYPE spfli-cityfrom.
    TYPES: BEGIN OF entry_tab_type,
             carrid TYPE spfli-carrid,
             connid TYPE spfli-connid,
           END OF entry_tab_type.
    DATA: entry_tab   TYPE TABLE OF entry_tab_type,
          sflight_tab TYPE SORTED TABLE OF sflight
                           WITH UNIQUE KEY carrid connid fldate.
    SELECT carrid connid
           FROM spfli
           INTO CORRESPONDING FIELDS OF TABLE entry_tab
           WHERE cityfrom = p_city.
    SELECT carrid connid fldate
           FROM sflight
           INTO CORRESPONDING FIELDS OF TABLE sflight_tab
           FOR ALL ENTRIES IN entry_tab
           WHERE carrid = entry_tab-carrid AND
                 connid = entry_tab-connid.
    Regards,
    Santosh

  • I want to know the table name and field names of this descriptions

    i want to know the table name and field names of this descriptions
    FPAApprover.UniqueName,FPAApprover.PasswordAdapter

    Hi Ramana,
    Go to the system table DD03T , use the table contents..
    In the field ' DDTEXT ' , give your keywords...
    for ex : say Unique name... as  UniqueName* in field DDTEXT
    Execute.. u will find the entries....
    May be ur problem will be solved...
    Thank u...
    Reward if useful and close the thread..
    Rajiv

  • How to control the data to display for every users?

    Hello Experts,
    Im creating a module in ORACLE forms6i and I want to control all the data to display for every USERs. I have 1 Table and it has 5 columns.
    My module has 5 columns and 5 rows of records to display.
    Problems:
    For USER1, I want to display all DATA in column3 and column4 only and all remaining columns shoud be null.
    For USER2 , I want to dislplay all data in Column1 only and all remaining columns should be null.
    How can i control all the data to display for each columns? Can you help me please. Im using the Clear_Items but its not working only the first row are null but the remaining
    rows has its records.
    Thanks.
    Lala

    I understand that you want certain columns not to show at all on the canvas when a certain user opens the form. Then, in the when-new-form-instance trigger, you should set_item_property(x_item, visible, property_false) for each item you do not want to be dislayed, depending on the user.

  • What are the tables PHO and LOC of OIM Schema?

    Hi,
    In the schema documentation of OIM tables you have the following description for the tables PHO and LOC:
    LOC - Holds information about locations
    PHO - Holds all communication addresses for this contact -- e.g., contact telephone numbers,fax numbers, e-mail, etc.
    When those have have some records? I haven't seen yet any form ou function where I can put some information like that.
    I don't have any problem with them and it is just for curiosity. As I understand the OIM User Model, I thought those tables were part of OIM User Model, where:
    Organization (field ACT_Key of USR table)
    Location (I guess table LOC but it is always empty in my env). There is a field USR_LOCATION but it is not shown by default.
    User Group (all groups a user is member are in the USG table)
    User Defined Fields (all fields start with USR_UDF of USR table)
    Manager (USR_MANAGER that is alwasys empty and USR_MANAGER_KEY that has the Key of User's Manager)
    Organization (ACT_KEY of USR table)
    Contact Information (I guess it is the table PHO)
    Thanks,
    Renato.

    They probably serve no purpose anymore but might have been used at some point during the life cycle of the product.
    -Kevin

  • How to put pictures inside the table in Pages for IPad?

    How can I put pictures inside the table in Pages for IPad? I can do that in Pages in my macbook, but I can't in IPad.

    It would appear that unless you are working from a document that already had section breaks (or the equivilent) ,you can't. I have some files in pages that began as MS Word documents with multiple sections that allow that by tapping on the footer (or header) and making the change. Files created in Pages (or from other sources but without section beaks) do not.

  • What are the tables rfpdo and rfpdo1?

    what are the tables rfpdo and rfpdo1?
    wht are these fields?
    rfpdo-allgstid
    rfpdo1-allgfael

    Look at <a href="http://help.sap.com/saphelp_46c/helpdata/en/40/5f3275e24bd111950d0060b03c6b76/frameset.htm">Data Collection Programs for FI-GL, FI-LC, CO-OM and CO-PA</a>
    <i>Data Collection Programs for FI-GL, FI-LC, CO-OM and CO-PA
    Description
    1. Data retrieval from the FI general ledger With the report RFBILA00, data from the balance sheet and the P+L statement can be transferred to SAP-EIS. Detailed information on this is stored with the corresponding parameter of the report RFBILA00 (RFPDO-BILA_EIS).
    2. The interface to FI-LC has been revised and the sender structure enhanced. AS sender field names were changed, it is necessary to adapt transfer rules created in release 2.2. Detailed information on this interface is contained in the online help for transfer program RGCEISS1.
    3. CO-PA data can be transferred into SAP-EIS using a basic report. More information on this can be found in the Implementation Guide of SAP-EIS.
    4. Data from CO-OM can be transferred to SAP-EIS using Report Writer reports. Since reports must fulfill certain conditions for the data transfer, standard reports in the report group '1EI' are delivered for CO-CCA. From the same group, you can define reports which transfer data from CO-OPA to SAP-EIS. You will find more information on this in the implementation guide.</i>
    Regards

  • I have 2 displays 1920 and 3840, use 1920 for every day work, some pages I would like to open in 3840 display, is this possible?

    I have 2 displays 1920x1080 and 3840x2160,
    I use 1920x1080 for every day work, some pages I would like to open in or redirect to the 3840x2160 display, is this possible?

    No, but there is a developer tool that you can add a custom size to. It is called Responsive Design View.

  • How to have a vertical grid lineon the waveform graph indicator for every 10% percent of the maximum X axis value?

    Hi,
    how to have a vertical grid line on the waveform graph indicator for every 10% percent of the maximum X axis value, so the x axis will split into 10, the vertical grids line in total will be 11 (including first and last)
    Example if the maximum X axis value is 11.56, first vertical grid is at the origin(0), second vertical grid is at 1.156 and continue to last one 11.56

    Thanks JohnM and Evan,
    the increment work great and i modify it to pass the 10% into "start" too, so it will start at the point of 10% of maximum range
    attached file to let people download in future, if they met the similar situation
    Attachments:
    10percent.vi ‏31 KB

Maybe you are looking for

  • Which Is True for 24/7 Sleep? Hard Drive Could Fail Because It's Constantly Spinning or Because It's Suddenly Switched ON

    Hi. It's sleep vs. shutdown again. I read some computer components are better off on sleep mode, some components are better off shutted down. If each component lasts longer in sleep mode and some shutted down, what then is the best for Macs as a whol

  • Frame dispose problem

    hello guys i have my master panel working and one button on that opens a graph panel. i want to have an exit button on the graph panel that can close it coz at the moment user will have to kill the window. the dispose() menthod i m applying in the bu

  • Connect to itunes error. cannot boot iphone.

    Hi all, after upgrading to iOS 5, the iphone just reset and when powered-on, it is asking to "connect to itunes". When connect to itunes, it says it cant get activated. Please advise what else to do? Thanks in advance.

  • Need  help sending e-mail a mobile messages

    hi! i'm a n00b in Java. Can you please tell how can i send e-mail and mobile messages in java? thnx!!

  • Slow start up and almost frozen finder

    please can anyone help me on how to reset my computer or something???? My problem is it takes about 1 hour from when i turn my Powerbook G4 on till it gets into finer and even when i get to finder it takes about 2 min to open my HD folder and my appl