Function of T-code CS-15

Hai Experts,
                    While Exploring some data, I used the T-code CS-15 in Production Server. I entered a Material , selected the direct type of where used list and selected the Material BOM.
I went to next screen, entered the required Quantity and in the Output selection, clicked on the variable list.
In the Display and Print options, there were default entries. I tried to execute, as there was no data, I changed the inputs in Display and Print options. I dont remember which option I selected, when I presses F4. At that time, the system gave some warning and gave options OK and Cancel, somehow without reading the warning, I clicked OK.
Then all the Production activities were stopped for some 10 minutes, later the Production server started working correctly.
I am not sure wether this happened because of my activity or from something else.
Can anyone tell me correctly what has happened
Also wanted to know if there will be any configuration changes from the activity done by me.
Are many activities are getting affected?

This reminds me of a program I once found which was horrid if the selection screen was empty. Earlier in the day the system was suffering from massive performance problems for other known "basis" reasons, so we told the developer that his program had caused it.
Well... he fixed it before it did revert back with the same and was very co-operative about the whole thing...
Cheers,
Julius

Similar Messages

  • Function of Tax code in tax determination

    1.What is the function of Tax code in tax determination, and where it is assigned ?
    2.What is the use of VAT registration number in Control Tab page in Cusomer master ? Does it effect the tax determination in a transaction ?

    Hi Sunil,
    1.  Tax code determines the percentage of tax on purchases
    Steps for Tax determination:
      Define Condition Types
      Define Procedures --- You need to define the tax calculation procedure for your country
       Select the calculation procedure / control data------- give the Procedure for tax determination
             You create the tax code at Tcode-- FTXP
    There you provide the tax percentages for the tax code
        Define the tax account the Account key (OB40), which will be an account determination
    2. VAT registration No in customer master will be used for any kind of tax exemptions if applicable
    There can be impact inthe tax determination as the customer is entitled for the exemption.
    Award points if useful,,
    Thanks and regards,
    Sri

  • How to search for a string in ALL Function Modules source code

    Hello,
    I want to search for the string "HELLO" in all FUNCTION MODULES source code(FM, no reports/programs).
    Is this possible? How?
    Cheers,
    Andy

    hi,
    Execute RPR_ABAP_SOURCE_SCAN to search for a string in the code ... Press where-used-list button on the program which takes to the function group or the function module where it is used ..
    Regards,
    Santosh

  • COMMIT failed in RSORAADM, object JOB, function CREATE, return code 4

    Dear Gurus,
    When I am trying to schedule a backup through DB13, I am getting an error as
    "COMMIT failed in RSORAADM, object JOB, function CREATE, return code 4"
    Can any body tell me what is the error about and how to resolve it.
    Thanks
    Best Regards
    Dilip

    hi Kaushal,
    Thanks for your reply.  Yes I could solve the issue as my Operation mode was inactive, I made it active and then could schedule the DB13 jobs. 
    Can you tell me what is the relationship between DB13 jobs scheduling and Operation mode.  Also note when I am scheduling DB13 jobs that time none of the background job is running ie my background wp is free. It is only after I activated day/night operation mode, I could schedule the backup.
    Thanks once again.  Your input was of great help to me.
    Best Regards
    Dilip

  • SQL functions in TOOL code

     

    In my original email I should have made the point clear that an indexed
    column was required, that led to some confusion, apologies.
    Under Oracle 7 even if the column is indexed the query engine still does a
    full scan of the index to find the maximum or minimum value. As strange as
    this seems it is possible to view it using the Oracle trace functions such
    as tkprof. This method is quicker than not having an index but the cursor
    method is far more efficient.
    When using a cursor based approach Oracle will go straight to the first
    record of the index (depending on MAX or MIN) and retrieve the data. By
    exiting at that point the function has been performed and the I/O operations
    are extremely low compared to a full index scan.
    Of course there is a trade off depending on the amount of rows but for large
    indexed tables the cursor approach will be far faster than the normal
    functions. I'm not sure how other RDBMS's handle MAX/MIN but this has been
    my experience with Oracle. This process may be faster still by using PL/SQL
    but then you are incorporating specific database languages which is
    obviously a problem if you port to a different RDBMS. Here is some code you
    can try for Oracle PL/SQL functions:
    declare
    cursor myCur1 is
    select number_field
    from number_table
    order by number_field desc;
    begin
    open myCur1;
    fetch myCur1 into :max_val;
    close myCur1;
    end;
    I hope this clarifies things a bit more. If in doubt of the execution plan
    of a performance critical query use the database trace functions as they
    show up all sorts of surprises. MAX and MIN are easy to understand when
    viewing code but perform poorly under Oracle, whether v8 behaves differently
    I have yet to discover.
    Cheers,
    Dylan.
    -----Original Message-----
    From: [email protected] [mailto:[email protected]]
    Sent: Thursday, 7 January 1999 3:37
    To: [email protected]
    Subject: RE: SQL functions in TOOL code
    I guess my point is that MAX can always be implemented more
    efficiently than the SORT/ORDER-BY approach (but may not be the
    case, depending on the RDBMS). If an ORDER-BY
    can use an index (which means that the indexing mechanism involves
    a sorted collection rather than an unordered hashtable) so can
    MAX - in which case finding a MAX value could be implemented
    in either O(1) or O(logn) time, depending on the implementation.
    The last sentence being the major point of this whole discussion,
    which is that your mileage may vary depending on the RDBMS - so
    try using both approaches if performance is a problem.
    In terms of maintenance, MAX is the much more intuitive approach
    (In My Opinion, of course), since a programmer can tell right away
    what the code is attempting to do.
    Chad Stansbury
    BORN Information Services, Inc.
    -----Original Message-----
    From: [email protected]
    To: [email protected]; [email protected]; [email protected]
    Sent: 1/6/99 10:45 AM
    Subject: RE: SQL functions in TOOL code
    Well, yes, but in that specific case (looking for max() value) would not
    be
    true that, if you have an index (and only then) on that specific column
    some
    databases (like Oracle) will be smart enough to use index and find max
    value
    without full table scan and without using order by clause?
    Dariusz Rakowicz
    Consultant
    BORN Information Services (http://www.born.com)
    8101 E. Prentice Ave, Suite 310
    Englewood, CO 80111
    303-846-8273
    [email protected]
    -----Original Message-----
    From: Sycamore [SMTP:[email protected]]
    Sent: Wednesday, January 06, 1999 10:29 AM
    To: [email protected]; [email protected]
    Subject: Re: SQL functions in TOOL code
    If (and only if) an index exists on the exact columns in the ORDER BY
    clause, some databases are smart enough to traverse the index (inforward
    or
    reverse order) instead of doing a table scan followed by a sort.
    If there is no appropriate index, you always end up with some kind ofsort
    step.
    Of course this is all highly schema- and database-dependent, so youmust
    weigh those factors when deciding to exploit this behavior.
    Kevin Klein
    Sycamore Group, LLC
    Milwaukee
    -----Original Message-----
    From: [email protected] <[email protected]>
    To: [email protected] <[email protected]>
    Date: Wednesday, January 06, 1999 9:40 AM
    Subject: RE: SQL functions in TOOL code
    This seems a bit counter-intuitive to me... primarily due to
    the fact that both MAX and ORDER-BY functionality would require
    a full table scan on the given column... no? However, I would
    think that a MAX can be implemented more efficiently since it
    just requires the max value in a given set (which can be performed
    in O(n) time on an unordered set) versus an ORDER-BY (sort)
    performance on an unordered set of at best O(nlogn) time.
    Am I missing something? Please set me straight on this 'un.
    Chad Stansbury
    BORN Information Services, Inc.
    -----Original Message-----
    From: Jones, Dylan
    To: 'Vuong, Van'
    Cc: [email protected]
    Sent: 1/5/99 4:42 PM
    Subject: RE: SQL functions in TOOL code
    Hi Van,
    Operating a function such as MAX or MIN is possible as given in your
    example
    but it is worth pointing out the performance overhead with such a
    method.
    When you use MAX, Oracle will do a full table scan of the column so
    if
    you
    have a great many rows it is very inefficient.
    In this case use a cursor based approach and depending on your
    requirments
    (MAX/MIN) use a descending or ascending ORDER BY clause.
    eg.
    begin transaction
    for ( aDate : SomeDateDomain ) in
    sql select DATE_FIELD
    from DATE_TABLE
    order by
    DATE_FIELD DESC
    on session MySessionSO
    do
    found = TRUE;
    aLatestDate.SetValue(aDate);
    // Only bother about the first record
    exit;
    end for;
    end transaction;
    On very large tables the performance increases with the above method
    will be
    considerable so it is worth considering which method to use whensizing
    your
    database and writing your code.
    Cheers,
    Dylan.
    -----Original Message-----
    From: Vuong, Van [mailto:[email protected]]
    Sent: Tuesday, 5 January 1999 6:50
    To: [email protected]
    Subject: SQL functions in TOOL code
    Is it possible to execute a SQL function from TOOL code?
    For example:
    SQL SELECT Max(Version) INTO :MyVersion
    FROM Template_Design
    WHERE Template_Name = :TemplateName
    ON SESSION MySession;
    The function in this example is MAX().
    I am connected to an Oracle database.
    Thanks,
    Van Vuong
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive<URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive<URL:http://pinehurst.sageit.com/listarchive/>
    >
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive<URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>
    To unsubscribe, email '[email protected]' with
    'unsubscribe forte-users' as the body of the message.
    Searchable thread archive <URL:http://pinehurst.sageit.com/listarchive/>

  • GIVE ME DETAILS FUNCTION ON T CODE RSRV  DETAILS

    GIVE ME DETAILS FUNCTION ON T CODE RSRV  DETAILS

    Hi,
    RSRV is a diagnostic tool in BW, System will automatically corrects if there are any inconsistancies with the BW objects
    It is used for Analysis and Repair purpose of BW objects like:
    1. Master Data Consistency Checks
    2. Transaction Data Consistency Checks
    3. Size of Dimensio tables
    4. Checking SID values
    5. PSA duplicate record check
    6. Checking Aggregates
    7. Partitions of Info cuses etc...
    You can check everything.
    Just expand it > drag n drop the required test to the right panel and give the object > execute.
    Transaction RSRV: BI Data and Metadata Test and Repair Environment.
    Transaction RSRV checks the consistency of data stored in BI. It mostly examines the foreign key relationships between individual tables in the enhanced star schema of the BI system.
    The transaction interface was re-designed for SAP BW release 3.0A. The following provides an introduction to running the transaction.
    Starting the Transaction
    You can reach the test and repair environment:
    by entering the transaction code RSRV
    in the SAP Easy Access Menu under SAP Menu -> Administration -> Analysis Tool>/>
    from InfoObject maintenance (transaction RSD1)
    from transaction RSD1 by choosing Analyze from the initial screen.
    in the maintenance screen for a characteristic by choosing Edit -> Analyze InfoObject from the main menu.
    The Initial Screen
    When using the test and repair environment for the first time, the message "Values were not found for all setting parameters" draws your attention to the fact that there are not any saved settings for your user.
    After confirming the dialog box, you reach the initial screen of the transaction. This is divided into two parts:
    1. On the left-hand side, you can see a tree structure with the pool of available tests.
    2. The right-hand side is empty at first. The tests you have selected will be put here. A selection of tests is called a Test Package here.
    Combined and Elementary Tests
    An Elementary Test is a test that cannot be divided into smaller tests and can therefore only be executed as a whole (or not at all).
    In this regard, a Combined Test determines which elementary tests are to be executed after entering the parameters. You can remove individual elementary tests from the test package before carrying out the actual test run, in order to reduce run time, for example.
    Combining a Test Package and Executing it.
    Firstly select one or more tests with drag&drop or by double-clicking. Each selected test appears as a closed folder in the view of your test package. (An exception is elementary tests without parameters: These do not appear as a folder). You can also drag a whole folder of tests from the test pool across to the right-hand screen area; all tests that are located in the hierarchical structure under this folder are then added to the test package. You can also display a short description of the test, if required. Do this right-clicking on a test and choosing "Description" from the context menu.
    Afterwards, you must supply the tests with parameters. Tests without parameters must not be given parameters. You are given notification of this when selecting them. You can enter parameters by double-clicking on a test (test package) or by opening a test folder.
    A popup appears in which you have to enter the required parameter values. Often, there is value help available. After the parameters are entered, a folder with the name Parameter is added under the test. This contains the parameter values. The test name can change in some circumstances, enabling you to see at first glance for which parameter values the test is to be executed. It is possible, and often useful, to select the same test several times and give it different parameters. When you have supplied the combined test with parameters, the folder with the name Elementary Tests is added under this one. It contains the elementary tests from which the combined test is built. You can delete individual elementary tests in the test pool using drag&drop.
    After supplying all tests with parameters, you can start the test run by clicking on the Execution button. After execution, the test icons change from a gray rhombus to a red, yellow or green one, depending on whether the test had errors, warnings or was error-free.
    Test Results
    The test results are written to the application log. Depending on the settings, the system jumps automatically to this display, or you can reach it by clicking on the Display button. The results are saved in the database, and can therefore be compared later with additional test runs.
    In the left-hand side of the window, you can see an overview of the most recent test runs. Double-clicking on a folder displays all messages under these nodes as a flat (non-hierarchical) list in the right-hand screen area. Long texts or detail data may be available for individual messages, which can be displayed with a mouse click.
    Repairs
    Some tests can repair inconsistencies and errors. Automatic correction is generally not possible: If entries are missing from the SID table for a characteristic, in which case the lost SIDs are still being used in a dimension table (and the corresponding dimension keys are still being used in the fact table) of an InfoCube, you can only remove the inconsistency by reloading the transaction data of the InfoCube. Also note that you must make repairs in the correct sequence. You must always read the documentation for the test and have a good idea about how the error occured, before making the repairs.
    After executing the test run, go from the application log back to the initial screen to make these repairs. Click on the Fix Errors button to start an error run. Since the dataset could have changed between the test and the repair run, the required tests are executed again before the actual repair. The results can be found in the application log once again.
    After a repair, the test package should be executed again in order to check that the error has been fixed.
    Test Packages
    The test package is deleted if you do not save the test package in the display before leaving the test environment. Choose Test Package -> Save Test Package from the main menu. You can do the following from options in the Test Package menu:
    Load packages; locks are not set for the package; it can only be saved under different names.
    Load for processing - the package is then locked against changes by others - and you can save the package again under a different name.
    Delete and
    Schedule execution at a later date or at regular intervals in background processing.
    Note that the execution of test packages can be integrated in process chains. See below for how you do this.
    Settings
    In the Settings menu option, you can make user-specific settings (adjust the size of the screen areas, for example) and save them. These settings are read automatically when starting the test environment. Additional settings options are being delivered with support packages since the test environment is currently still under development. A message notifies the user at the start if there aren't any values for the setting options.
    Jobs Menu Option
    You can access the job overview via the Jobs -> Job Overview menu. Use this when you want to check the status of a test package you have scheduled.
    Application Log Menu Option
    You can display old logs from previous test runs in the dialog box, as well as scheduled ones. The option of deleting test logs can also be found here.
    New Selection
    The currently selected test package is deleted using the New Selection function (from the memory, though not from the database if the test package had already been saved).
    Filter
    Use Filter to delete all elementary tests without errors or warnings from the test package after a test run.
    Executing Test Packages in Process Chains
    In process chain maintenance, transaction RSPC, add your process chain to ABAP program RSRV_JOB_RUNNER. (To do this, in the process type view under General Services, choose the ABAP Program process type by Drag&Drop. When you maintain the process variants, you are asked to specify the program name and a program variant. Enter RSRV_JOB_RUNNER as the name of the program. Choose a program variant name and then Change. On the next screen, you can change or display already existing variants and create new variants. When creating a new variant you are asked to specify the package name (value help is available), the level of detail for the log (to which the RSRV log is to be integrated in the process chain log), and a message type that signifies process chain processing is to be terminated.
    The RSRV processes log in the process chain is structured as follows:
    It starts with a summary of any errors or warnings that have been produced for each elementary test.
    It finishes with a view of the log from the RSRV test package, up to and including the specified level of detail.
    Example: If you choose 3 as the level of detail, only messages at levels up to 3 are included in the Process Chain log. Messages produced for a more detailed level of the test package when it is tested are not displayed in this log. Note that, in contrast to the application log, errors are not passed from more to less detailed levels in the process log. For example, if a single error is produced at level 4, the initial summary reports that the test has produceded an error, but this error is not listed in the second part of the log.
    A complete log is always written, independently of the log for the RSRV process in the process chain. You can view this log from the menu option Application Log -> Display Log -> From Batch.
    Note that there are currently no transport objects for test packages, meaning that these cannot be transported. Process chains that execute RSRV test packages have to be postprocessed manually after being transported into another system: You have to create the corresponding test packages.
    on RSRV
    Thanks,
    JituK

  • How to read current line number in function module sourrce code?

    Hi All,
    How to read current line number in function module sourrce code?
    regards,
    Anuj

    If you have new editor you would be able to see the line number. 
    Or in the Dump screen - there is a button called Debugger - click that you would be able to see the code where dump has occured..  you would be able to find the line number from there.
    To get the new editor with line number , you need to change the settingsin SE38.
    Regards
    Vivek

  • Function of T-Code FPDR (Posting of Delayed Revenue)

    Hi All..
    I have a question about functionality  of transaction code FPDR in SAP RM-CA.
    I want to deferred the revenue as long as the duration of the contract automatically.
    any one could help me about manual using T-CODE FPDR?
    Thanks a Lot
    Regards,
    Gansara Kusumah

    Hi William,
    I already reviewed that function module. But, i still doesn't have an idea about the relationship between
    table FKKDEFREV, TCODE FPDR, and table DFKKOP. Do you know where i can find an example data for table FKKDEFREV
    so i can debug FPDR it self?
    Thanks a lot bill

  • Is there a available function for T-CODE: CC07

    Hello:
         Is there a available function for T-CODE: CC07 . or a function for  program RCS00160??
    thanks a lot.

    Hi
    I didnt get your question. may i knw whether u need a function module or ur question is different?if you need a function module then the followinf fms are available
    CALL FUNCTION 'CSCO_BOM_DISPLAY'
    CALL FUNCTION 'EQUIPMENT_CHECK'
    CALL FUNCTION 'CUKD_GET_RELATIONS_FOR_OBJECT'
    CALL FUNCTION 'CUKD_GET_KNOWLEDGE'
    CALL FUNCTION 'FUNC_LOCATION_READ'
    CALL FUNCTION 'CLMA_CLASS_EXIST'  and 
    many more....
    Regards,
    Samanth

  • Functionality of transaction code '1KEH'

    Hello SAP guru's,
    I would like to know the functionality of transaction code 1KEH in EC-PCA module. how does it works, when you run as part of month end activities is there any financial accounting impact? kindly let me know step by step process of this transaction code.

    Hi Naveen,
    Please go to the below links:
    Period Closing Activities for Material Stocks - Profit Center Accounting (EC-PCA) - SAP Library
    and user manual:
    http://corporateu.ciber-itc.com/lumileds/monthEnd/EC_PCA_Transfer_Material_Stocks_1KEH.pdf
    Hope they're useful to you.
    Regards,
    Julie

  • Manage table function's source code in OWB metadata

    Hi all,
    please I would like to know if it possible to code a table function in OWB's metadata.
    I'll try to better explain myself; I know how to use a tf in a mapping but I also would like to manage the table function's source code in OWB metadata repository.
    It appears you cant code a table function as procedures/functions: there's no ref_cursor as input , no pipelined option and so on.
    I'm workin on 10.2.0.4 OWB repos.
    Any information will be appreciated, thanks.
    best regards, David

    ... you are right. You cannot write the code of a table function inside owb. You must write the table function external and create it in the database. In owb you only can call the table function.
    Regards,
    Detlef

  • Execute more than 1 function from process code IDOC

    Hello,
    Is it possible to execute more than 1 function via process code of an IDOC?
    I am talking about inbound IDOC.
    Sara

    Hi Sara,
    What is the exact requirement.
    Regards,
    Madhu.

  • Give me the functionality of transaction code st01

    give me the functionality of transaction code st01

    Hi Ravi,
    The tx ST01 give a datailed trace of the underlying system while executing something from sap.
    For example what Authorization objects are hit by a user when he performs a tcode or what are the dbtables/sqlstatements etc are run  or what kernel functions are executed .
    This somewhat helps in debugging like matters.
    One can even set parameters for this by using filters.Suppose u want to trace what authorization objs are hit by a specific user when he executes a specific tcode  got to edit ->filter->shared and enter the user name client no and tcode. So that not all the users are traced but only this specific user for the specific tcode is traced. On analysis u can knaow what authorization objects he hitted on executing the specific tcode.
    Try it with the other areas like Db access, Table Buffer, etc and u will get a more clearer picture.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/1f/83113f4bc511d189750000e8322d00/frameset.htm
    This is a good place to start with.
    Pl dont forget to award points if resolved.
    Regards

  • ** Embeding BPC functions inside VBA Code **

    Hi all,
    I am wokring in a BPC application which is a bit more customized and has some complexities.
    Basically It's a client-server app, with BPC in backend and Excel as Front end.
    Does anyone know whether it's possible to embed BPC functions inside VBA code?
    For example, If I want  to store a the value of a property of a dimension member into a VBA variable, is it possible?.
    Inside VBA,
    MyVar = EVPRO("MY_APPS","MEMBER-X","ACTIVE")   won't work until VBA is told about the details of EVPRO.
    Any idea whether this could work using some special techniques that tell VBA the details about EVPRO and other BPC
    functions?
    Thanks
    DipM

    Hi,
    I am not sure if that is possible. Although you can try this below work around.
    sheets(1).cells(1,1).value="=  EVPRO(""MY_APPS"",""MEMBER-X"",""ACTIVE"") "
    MyVar=sheets(1).cells(1,1).value
    Although this is just a workaround but works smoothly. Hope this is of some use to you.
    Regards,
    Badrish

  • Functionality og the code

    Hi ,
    We have the following code. I am not getting the functionality of the code. Please have a look into the code and let me know the functionality.
    BEGIN
                    INSERT INTO tab1 (sucess_flag ,run_DATE,comments)
                    VALUES  ('Y',SYSDATE,'SUCCESSFUL');
                            --COMMIT;
               EXCEPTION
               WHEN OTHERS THEN
                   NULL;
        END;
       --COMMIT;
      ELSE
       BEGIN
           INSERT INTO tab1 (sucess_flag ,run_DATE,comments)
                    VALUES  ('N',SYSDATE,'COUNT 0');
           EXCEPTION
                  WHEN OTHERS THEN
                        NULL;
            END;
            --COMMIT;
       END IF;
      END IF;
        IF  var1 >0 THEN
                 COMMIT;
       ELSE
            ROLLBACK;
                    INSERT INTO tab1(sucess_flag ,run_DATE,comments)
                    VALUES  ('N',SYSDATE,'UNSUCCESSFUL-0 Rec.');
                            COMMIT;
            END IF;
        EXCEPTION
            WHEN OTHERS THEN
                    INSERT INTO tab1 (sucess_flag ,run_DATE,comments)
                    VALUES  ('N',SYSDATE,'UNSUCCESSFUL');
                            COMMIT;
    END; Thanks,
    Ora.

    Hi,
    Can you be more specific about what you don't understand? For example:
    966949 wrote:
    Hi ,
    We have the following code. I am not getting the functionality of the code. Please have a look into the code and let me know the functionality.
    BEGIN
    INSERT INTO tab1 (sucess_flag ,run_DATE,comments)
    VALUES  ('Y',SYSDATE,'SUCCESSFUL');
    --COMMIT;
    do you understand that the part above attempts to add a row to the tab1 table? Do you need to have someone explain what tab1 is, or what 'Y' means?
    EXCEPTION
    WHEN OTHERS THEN
    NULL;
    END;The EXCEPTION section above ignores any error that may occur in the corresponding BEGIN section (the INSERT statement, in this case).
    By the way, "EXCEPTION WHEN OTHERS NULL;" is almost always a terrible programming practice. You should only use use "WHEN OTHERS" if you want to do something special before raising the error; that is, 'WHEN OTHERS" should always be followed, sooner or later, by "RAISE;".
    {code}
    --COMMIT;
    ELSE
    BEGIN
    INSERT INTO tab1 (sucess_flag ,run_DATE,comments)
    VALUES ('N',SYSDATE,'COUNT 0');
    EXCEPTION
    WHEN OTHERS THEN
    NULL;
    END;
    --COMMIT;
    {code}Like the preceding code, this is attempting to add a row to a table, and ignoring any errors that may cause.
    {code}
    END IF;
    END IF;
    {code}Apparantly, what you posted is taken out of context. These two END IF statements should have corresponding IF statements.
    {code}
    IF var1 >0 THEN
    COMMIT;
    ELSE
    ROLLBACK;
    INSERT INTO tab1(sucess_flag ,run_DATE,comments)
    VALUES ('N',SYSDATE,'UNSUCCESSFUL-0 Rec.');
    COMMIT;
    END IF;
    EXCEPTION
    WHEN OTHERS THEN
    INSERT INTO tab1 (sucess_flag ,run_DATE,comments)
    VALUES ('N',SYSDATE,'UNSUCCESSFUL');
    COMMIT;
    END;
    {code}It's very hard to make sensible comments on the code without seeing all the code. Also, it helps to have test versions of any tables referenced (CREATE TABLE and INSERT statements).
    My best guess, based on the fragment you posted, is that tab1 is a log table. The code you posted adds messages to that log table, based on whether some other statements (which you didn't show, but apparantly occur earlier in the code) worked or not.

  • GDE - function module.. code .. problem

    hi all,
    I am extracting data using FM
    from PAYR and REGUH.
    I need:
    Payr
    doc1 ven01.........filds.a b c.
    doc2 ven02.........filds..
    doc3 ven02.........filds..
    doc4 ven03.........filds..
    My Fm is working fine.
    I need from REGUH:
    doc1 ven01.........filds p q r..
    doc2 ven02.........filds..
    doc3 ven02.........filds..
    doc4 ven03.........filds..
    doc5 ven05.........filds..
    doc6 ven06.........filds..
    doc5 and Doc6 not there in Payr table. finally i need 6 records with a, b,c, p, q, r
    I wrote code:
    ========
    error : It returns dump..
    saying : INDEX problem..?
    Modify e_t_data index sy-tabix.
    FUNCTION z_biw_payr_get_data .
    ""Local interface:
    *"  IMPORTING
    *"     VALUE(I_REQUNR) TYPE  SRSC_S_IF_SIMPLE-REQUNR
    *"     VALUE(I_DSOURCE) TYPE  SRSC_S_IF_SIMPLE-DSOURCE OPTIONAL
    *"     VALUE(I_MAXSIZE) TYPE  SRSC_S_IF_SIMPLE-MAXSIZE OPTIONAL
    *"     VALUE(I_INITFLAG) TYPE  SRSC_S_IF_SIMPLE-INITFLAG OPTIONAL
    *"     VALUE(I_READ_ONLY) TYPE  SRSC_S_IF_SIMPLE-READONLY OPTIONAL
    *"     REFERENCE(I_REMOTE_CALL) TYPE  SBIWA_FLAG DEFAULT
    *"       SBIWA_C_FLAG_OFF
    *"  TABLES
    *"      I_T_SELECT TYPE  SRSC_S_IF_SIMPLE-T_SELECT OPTIONAL
    *"      I_T_FIELDS TYPE  SRSC_S_IF_SIMPLE-T_FIELDS OPTIONAL
    *"      E_T_DATA STRUCTURE  ZBIW_AP_PAYR OPTIONAL
    *"  EXCEPTIONS
    *"      NO_MORE_DATA
    *"      ERROR_PASSED_TO_MESS_HANDLER
    Example: DataSource for table SFLIGHT
      TABLES: payr.
    Auxiliary Selection criteria structure
      DATA: l_s_select TYPE srsc_s_select.
    Maximum number of lines for DB table
      STATICS: s_s_if TYPE srsc_s_if_simple,
    counter
              s_counter_datapakid LIKE sy-tabix,
    cursor
              s_cursor TYPE cursor.
    *internal tables:
    I_payr like payr occurs 0 with header line.
    I_reguh like reguh occurs 0 with header line.
    Select ranges
      RANGES: l_r_gjahr   FOR zap_payr-gjahr,
              l_r_vblnr   FOR zap_payr-vblnr,
              l_r_zbukr   FOR zap_payr-zbukr.
    Initialization mode (first call by SAPI) or data transfer mode
    (following calls) ?
      IF i_initflag = sbiwa_c_flag_on.
    Initialization: check input parameters
                    buffer input parameters
                    prepare data selection
    please Check DataSource validity
        CASE i_dsource.
          WHEN 'ZAP_PAYR'.
          WHEN OTHERS.
            IF 1 = 2. MESSAGE e009(r3). ENDIF.
    this is a typical log call. Please write every error message like this
            log_write 'E'                  "message type
                      'R3'                 "message class
                      '009'                "message number
                      i_dsource   "message variable 1
                      ' '.                 "message variable 2
            RAISE error_passed_to_mess_handler.
        ENDCASE.
        APPEND LINES OF i_t_select TO s_s_if-t_select.
    Fill parameter buffer for data extraction calls
        s_s_if-requnr    = i_requnr.
        s_s_if-dsource = i_dsource.
        s_s_if-maxsize   = i_maxsize.
    Fill field list table for an optimized select statement
    (in case that there is no 1:1 relation between InfoSource fields
    and database table fields this may be far from beeing trivial)
        APPEND LINES OF i_t_fields TO s_s_if-t_fields.
      ELSE.                 "Initialization mode or data extraction ?
    Data transfer: First Call      OPEN CURSOR + FETCH
                   Following Calls FETCH only
    First data package -> OPEN CURSOR
        IF s_counter_datapakid = 0.
    Fill range tables BW will only pass down simple selection criteria
    of the type SIGN = 'I' and OPTION = 'EQ' or OPTION = 'BT'.
          LOOP AT s_s_if-t_select INTO l_s_select WHERE fieldnm = 'GJAHR'.
            MOVE-CORRESPONDING l_s_select TO l_r_gjahr.
            APPEND l_r_gjahr.
          ENDLOOP.
          LOOP AT s_s_if-t_select INTO l_s_select WHERE fieldnm = 'VBLNR'.
                  MOVE-CORRESPONDING l_s_select TO l_r_vblnr.
            APPEND l_r_vblnr.
          ENDLOOP.
          LOOP AT s_s_if-t_select INTO l_s_select WHERE fieldnm = 'ZBUKR'.
            MOVE-CORRESPONDING l_s_select TO l_r_zbukr.
            APPEND l_r_zbukr.
          ENDLOOP.
    Determine number of database records to be read per FETCH statement
    from input parameter I_MAXSIZE. If there is a one to one relation
    between DataSource table lines and database entries, this is trivial.
    In other cases, it may be impossible and some estimated value has to
    be determined.
    Extracts from Tableu2026..1
          OPEN CURSOR WITH HOLD s_cursor FOR
          SELECT mandt zbukr hbkid hktid rzawe chect checf laufd laufi lifnr
            kunnr empfg ubhkt vblnr gjahr zaldt waers rwbtr strgb pridt
            priti prius xmanu xbanc bancd extrd extrt xbukr zanre znme1
            znme2 znme3 znme4 zpstl zort1 zstra zpfac zland zregi zbnks
            zbnkn zbnkl zbkon voidr voidd voidu checv hbkiv hktiv zpst2
            xragl pernr seqnr btznr rec_belnr rec_gjahr zpfor uzawe ichec
            irefe rwskt
          FROM  payr
          WHERE zbukr  IN l_r_zbukr
                AND   vblnr  IN l_r_vblnr
          AND   gjahr  IN l_r_gjahr.
        AND   rzawe  EQ 'C'.
        ENDIF.                             "First data package ?
    Fetch records into interface table.
      named E_T_'Name of extract structure'.
        FETCH NEXT CURSOR s_cursor
                   APPENDING CORRESPONDING FIELDS
                   OF TABLE e_t_data
                   PACKAGE SIZE s_s_if-maxsize.
        IF sy-subrc <> 0.
          CLOSE CURSOR s_cursor.
          RAISE no_more_data.
        ENDIF.
    **get all u2018Du2019 and 2 series VBLNR records from REGUH
    _** --- CHECK the codes for WITH CASE 1 OR CASE 2._
    Case 1 :
    *Select * from reguh*
         Into corresponding fields of table i_reguh
         For all entries in e_t_data
         Where lifnr = e_t_data-lifnr
          And  rzawe = u2018Du2019
          and  Vblnr like u20182%u2019.
    Or u2026u2026 Or u2026u2026 Or u2026u2026
    Case2 :
    *Select * from reguh*
         Into corresponding fields of table i_reguh
         Where rzawe = u2018Du2019
          and  Vblnr like u20182%u2019.
    Loop at e_t_data.
      Read table i_reguh with key lifnr = e_t_data-lifnr
        If sy-subrc = 0.
          E_t_data-laufi  like reguh- laufi.
          E_t_data-Zbukr like reguh-zbukr.
          E_t_data-lifnr like reguh- lifnr .
          E_t_data-empfg like reguh- empfg.
          E_t_data-vblnr  like reguh-vblnr
          E_t_data-waers like reguh-waers
          E_t_data-srtgb like reguh-srtgb.
          E_t_data-znme1 like reguh- znme1.
          E_t_data-znme2  like reguh- znme2.
          E_t_data-znme3 like reguh- znme3.
          E_t_data-znme4 like reguh- znme4.
          E_t_data-zpstl like reguh-zpstl.
          E_t_data-zort1   like reguh-zortl.
          E_t_data-zstra like reguh-zstra.
          E_t_data-zpfac like reguh-zpfac.
          E_t_data-zland like reguh-zland.
          E_t_data-zregi like reguh-zregi.
          E_t_data-zbnkl like reguh-zbnkl.
          E_t_data-rzawe like reguh-rzawe.
          E_t_data-hktid like reguh-hktid.
          E_t_data-hbkid like reguh-hbkid.
          E_t_data-zpst2 like reguh-zpst2.
          E_t_data-uzawe like reguh-uzawe.
                E_t_data-pernr like reguh-pernr.
         E_t_data-btznr like reguh-btanr.
         E_t_data-laufd like reguh-laufd.
         E_t_data-zaldt like reguh-zaldt.
         E_t_data-rwbtr like reguh-rwbtr.
         E_t_data-rwskt like reguh-rwskt.
         Modify e_t_data index sy-tabix.
    Else.
         E_t_data-laufi  like reguh- laufi.
                E_t_data-Zbukr like reguh-zbukr.
         E_t_data-lifnr like reguh- lifnr .
         E_t_data-empfg like reguh- empfg.
         E_t_data-vblnr  like reguh-vblnr
         E_t_data-waers like reguh-waers
         E_t_data-srtgb like reguh-srtgb.
         E_t_data-znme1 like reguh- znme1.
         E_t_data-znme2  like reguh- znme2.
         E_t_data-znme3 like reguh- znme3.
         E_t_data-znme4 like reguh- znme4.
         E_t_data-zpstl like reguh-zpstl.
         E_t_data-zort1   like reguh-zortl.
         E_t_data-zstra like reguh-zstra.
         E_t_data-zpfac like reguh-zpfac.
         E_t_data-zland like reguh-zland.
         E_t_data-zregi like reguh-zregi.
         E_t_data-zbnkl like reguh-zbnkl.
         E_t_data-rzawe like reguh-rzawe.
         E_t_data-hktid like reguh-hktid.
         E_t_data-hbkid like reguh-hbkid.
         E_t_data-zpst2 like reguh-zpst2.
         E_t_data-uzawe like reguh-uzawe.
         E_t_data-pernr like reguh-pernr.
         E_t_data-btznr like reguh-btanr.
         E_t_data-laufd like reguh-laufd.
         E_t_data-zaldt like reguh-zaldt.
         E_t_data-rwbtr like reguh-rwbtr.
         E_t_data-rwskt like reguh-rwskt.
    Modify e_t_data index sy-tabix.
    Endif.
    Endloop.
    Logic for eliminating voided Checks Begin
        itab[] = e_t_data[].
        SORT itab BY chect.
        LOOP AT itab WHERE ( voidu NE space ) AND ( voidd NE space ).
          wa_idx = sy-tabix.
          wa_chect = itab-chect. CLEAR wa_found.
                wa_zbukr = itab-zbukr.
          wa_hbkid = itab-hbkid.
          wa_hktid = itab-hktid.
          wa_rzawe = itab-rzawe.
          DO.
            SELECT SINGLE * FROM payr WHERE
            zbukr = wa_zbukr AND
            hbkid = wa_hbkid AND
            hktid = wa_hktid AND
            rzawe = wa_rzawe AND
            chect = wa_chect.
            IF sy-subrc NE 0.
    Not transferring this record to BW
          message 'Invalid Check No.' type 'I'.
              DELETE itab.
              wa_found = 'Y'. EXIT.
            ENDIF.
            IF ( payr-voidu NE space ) AND ( payr-voidd NE space ).
              wa_chect = payr-checv.
              wa_zbukr = payr-zbukr.
              wa_hbkid = payr-hbkid.
                        wa_hktid = payr-hktid.
              wa_rzawe = payr-rzawe.
    If the Replacement Check # points to Original Check No., this record
    will be skipped.
              IF itab-chect = payr-checv.
                DELETE itab INDEX wa_idx.
                EXIT.
              ENDIF.
            ELSE.
              MOVE-CORRESPONDING payr TO itab.
              APPEND itab. wa_found = 'Y'.
              MOVE-CORRESPONDING itab TO itab1.
              APPEND itab1.
              EXIT.
            ENDIF.
            IF wa_found = 'Y'.
              EXIT.
            ENDIF.
          ENDDO.
        ENDLOOP.
        SORT itab by zbukr hbkid hktid rzawe chect.
            DELETE ADJACENT DUPLICATES FROM itab COMPARING zbukr hbkid hktid
        rzawe chect.
        LOOP AT itab1.
          READ TABLE itab WITH KEY
          zbukr = itab1-zbukr
          hbkid = itab1-hbkid
          hktid = itab1-hktid
          rzawe = itab1-rzawe
          chect = itab1-chect BINARY SEARCH.
          IF ( itab-voidu IS NOT INITIAL ).
            DELETE TABLE itab FROM itab1.
          ENDIF.
        ENDLOOP.
    04/13/08 commented to satisfy 4th condition
    Do not extract the Original record of the replaced Check
       LOOP AT itab.
         IF ( itab-voidu IS NOT INITIAL ) AND
            ( itab-voidd IS NOT INITIAL ).
           DELETE itab.
         ENDIF.
       ENDLOOP.
    04/13/08 commented to satisfy 4th condition
    Logic for eliminating voided Checks End
    ***The below process can be used for Delta Extraction using Time Stamp
       loop at itab.
         concatenate itab-pridt itab-priti into wa_timstmp.
         move wa_timstmp to itab-timstmp.
         move-corresponding itab to e_t_data.
         append e_t_data.
       endloop.
        e_t_data[] =    itab[].
        s_counter_datapakid = s_counter_datapakid + 1.
      ENDIF.              "Initialization mode or data extraction ?
    ENDFUNCTION.
    =========
    Please advise me and where will i correct the code.
    Thanks in advance,
    Siri.
    Edited by: SIRI SIRI on Jun 3, 2008 3:26 PM

    Hi,
    use the following:
    define a index variable.
    data: l_index type sy-tabix.
    in your loop at e_t_data.
    loop at e_t_data.
    new statement
    l_index = sy-tabix.
    changed statement
    modify e_t_data index l_index.
    endloop.
    The other read operations on internal tables will reset sy-tabix so that it will point to a invalid record.
    regards
    Siggi

Maybe you are looking for