Help me! about default paramenter in sql procedure

I have an application develop in VB6 - Oracle Database - WINDOW XP OS. I usually using default value parameter in procedure. For example:
PROCEDURE abc(val1 VARCHAR2, val2 NUMBER DEFAULT 0) AS ...
Everything is ok
But when I using WINDOW 7 OS then default value is not work. It's show invalid argument error
I don't know the reason why?
Can anyone help me? Thanks in advance

Windows 7 is not tested, certified, or supported with any Oracle product.
My recommendation would be to get an enterprise operating system to go with your enterprise database.
Windows 7, so far, is not ready for prime time.

Similar Messages

  • Need help in writing a tricky sql/PL/Sql Procedure

    Hi,
    I have a Branch table with just two fields in it node1 and Node2, The table looks like this
    node1 | node2
    -------|---------
    1 | 2
    3 | 2
    3 | 4
    4 | 5
    1 | 5
    1 | 6
    5 | 6
    in the above data if you draw lines between node_1 and node_2 you will see that there are 3 different paths to get from 1 to 5, as follows
    /--------6-------\
    1----------------------5
    \2------3-------4/
    Now I need to Find all the nodes between 1 and 5 or all the possible paths from node 1 to node 5 in this case I have 3 possible paths they are as follows
    1-2-3-4-5
    1-3-5
    1-5
    Now I know if this data was stored in a hierarchical manner I can get the results i want by using CONNECT BY and SYS_CONNECT_BY_PATH.
    Is there a way to transform this data into a hierarchcal manner so that I can use the CONNECT BY or can somebody give me an Idea as to how to write a PL/SQL procedure to get the result I want.
    Any help will be greatly appreciated

    Hi!
    1.Create another table Branch1 to hold 'transformed data'.
    2.Use the following procedure to insert data into branch1 table.
    declare
    cursor n is select * from branch;
    begin
    for nrec in n loop
    if nrec.node1 = 5 then
         insert into branch1(node1,node2) values(nrec.node2,nrec.node1);
    elsif nrec.node2= 5 then
         insert into branch1(node1,node2) values(nrec.node1,nrec.node2);
    else
    if      nrec.node2> 5      then
         insert into branch1(node1,node2) values(nrec.node1,nrec.node2);
    elsif nrec.node1> 5 then
         insert into branch1(node1,node2) values(nrec.node2,nrec.node1);
    elsif (nrec.node1 < nrec.node2 ) then
         insert into branch1(node1,node2) values(nrec.node1,nrec.node2);
    else
         insert into branch1(node1,node2) values(nrec.node2,nrec.node1);
    end if;
    end if;
    end loop;
    commit;
    end;
    3.Then execute the following connect by query:
    SQL> select lpad(' ',level*2,' ')||node1 from branch1
    2 start with node1=1
    3 connect by prior node2=node1;
    Hope this is satisfactory.
    Thanks!

  • ORA-01458 error while using Pro*C to invoke PL/SQL procedure, pls help

    I am using Pro*C (Oracle 10g on Itanium platform) to invoke PL/SQL procedure to read RAW data from database, but always encoutered ORA-01458 error message.
    Here is the snippet of Pro*C code:
    typedef struct dataSegment
         unsigned short     len;
         unsigned char     data[SIZE_DATA_SEG];
    } msg_data_seg;
    EXEC SQL TYPE msg_data_seg IS VARRAW(SIZE_DATA_SEG);
         EXEC SQL BEGIN DECLARE SECTION;
              unsigned short qID;
              int rMode;
              unsigned long rawMsgID;
              unsigned long msgID;
              unsigned short msgType;
              unsigned short msgPriority;
              char recvTime[SIZE_TIME_STRING];
              char schedTime[SIZE_TIME_STRING];
              msg_data_seg dataSeg;
              msg_data_seg dataSeg1;
              msg_data_seg dataSeg2;
              short     indSeg;
              short     indSeg1;
              short     indSeg2;
         EXEC SQL END DECLARE SECTION;
         qID = q_id;
         rMode = (int)mode;
         EXEC SQL EXECUTE
              BEGIN
                   SUMsg.read_msg (:qID, :rMode, :rawMsgID, :msgID, :msgType, :msgPriority, :recvTime,
                        :schedTime, :dataSeg:indSeg, :dataSeg1:indSeg1, :dataSeg2:indSeg2);
              END;
         END-EXEC;
         // Check PL/SQL execute result, different from SQL
         // Only 'sqlcode' and 'sqlerrm' are always set
         if (sqlca.sqlcode != 0)
              if (sqlca.sqlcode == ERR_QUEUE_EMPTY)          // Queue empty
                   throw q_eoq ();
              char msg[513];                                        // Other errors
              size_t msg_len;
              msg_len = sqlca.sqlerrm.sqlerrml;
              strncpy (msg, sqlca.sqlerrm.sqlerrmc, msg_len);
              msg[msg_len] = '\0';
              throw db_error (string(msg), sqlca.sqlcode);
    and here is the PL/SQL which is invoked:
    SUBTYPE VarChar14 IS VARCHAR2(14);
    PROCEDURE read_msg (
         qID          IN     sumsg_queue_def.q_id%TYPE,
         rMode          IN     INTEGER,
         raw_msgID     OUT     sumsg_msg_data.raw_msg_id%TYPE,
         msgID          OUT sumsg_msg_data.msg_id%TYPE,
         msgType          OUT sumsg_msg_data.type%TYPE,
         msgPrior     OUT sumsg_msg_data.priority%TYPE,
         msgRecv          OUT VarChar14,
         msgSched     OUT VarChar14,
         msgData          OUT sumsg_msg_data.msg_data%TYPE,
         msgData1     OUT sumsg_msg_data.msg_data1%TYPE,
         msgData2     OUT sumsg_msg_data.msg_data2%TYPE
    ) IS
    BEGIN
         IF rMode = 0 THEN
              SELECT raw_msg_id, msg_id, type, priority, TO_CHAR(recv_time, 'YYYYMMDDHH24MISS'),
                   TO_CHAR(sched_time, 'YYYYMMDDHH24MISS'), msg_data, msg_data1, msg_data2
                   INTO raw_msgID, msgID, msgType, msgPrior, msgRecv, msgSched, msgData, msgData1, msgData2
                   FROM (SELECT * FROM sumsg_msg_data WHERE q_id = qID AND status = 0 ORDER BY sched_time, raw_msg_id)
                   WHERE ROWNUM = 1;
         ELSIF rMode = 1 THEN
              SELECT raw_msg_id, msg_id, type, priority, TO_CHAR(recv_time, 'YYYYMMDDHH24MISS'),
                   TO_CHAR(sched_time, 'YYYYMMDDHH24MISS'), msg_data, msg_data1, msg_data2
                   INTO raw_msgID, msgID, msgType, msgPrior, msgRecv, msgSched, msgData, msgData1, msgData2
                   FROM (SELECT * FROM sumsg_msg_data WHERE q_id = qID AND status = 0 ORDER BY recv_time, raw_msg_id)
                   WHERE ROWNUM = 1;
         ELSE
              SELECT raw_msg_id, msg_id, type, priority, TO_CHAR(recv_time, 'YYYYMMDDHH24MISS'),
                   TO_CHAR(sched_time, 'YYYYMMDDHH24MISS'), msg_data, msg_data1, msg_data2
                   INTO raw_msgID, msgID, msgType, msgPrior, msgRecv, msgSched, msgData, msgData1, msgData2
                   FROM (SELECT * FROM sumsg_msg_data WHERE q_id = qID AND status = 0 ORDER BY priority, raw_msg_id)
                   WHERE ROWNUM = 1;
         END IF;
         UPDATE sumsg_msg_data SET status = 1 WHERE raw_msg_id = raw_msgID;
    EXCEPTION
         WHEN NO_DATA_FOUND THEN
              raise_application_error (-20102, 'Queue empty');
    END read_msg;
    where sumsg_msg_data.msg_data%TYPE, sumsg_msg_data.msg_data1%TYPE and sumsg_msg_data.msg_data2%TYPE are all defined as RAW(2000). When I test the PL/SQL code seperately, everything is ok, but if I use the Pro*C code to read, the ORA-01458 always happen, unless I change the SIZE_DATA_SEG value to 4000, then it passes, and the result read out also seems ok, either the bigger or smaller value will encounter ORA-01458.
    I think the problem should happen between the mapping from internal datatype to external VARRAW type, but cannot understand why 4000 bytes buffer will be ok, is it related to some NLS_LANG settings, anyone can help me to resolve this problme, thanks a lot!

    It seems that I found the way to avoid this error. Now each time before I read RAW(2000) data from database, i initialize the VARRAW.len first, set its value to SIZE_DATA_SEG, i.e., the outside buffer size, then the error disappear.
    Oracle seems to need this information to handle its data mapping, but why output variable also needs this initialization, cannot precompiler get this from the definition of VARRAW structure?
    Anyone have some suggestion?

  • Creating a CSV file from a pl/sql procedure

    Hi Everyone,
    I would like to know how to write a procedure in pl/sql where i need to check if they are any records in a table say "Table A".
    If they are any records in the "Table A" then we need to write those records in the "Table A" to the CSV file.
    If they are no records then we need to insert a record into the CSV file that "No records are found in "Table A".
    Could anybody please help ?
    Thanks in advance

    see this
    ops$tkyte@8i> create or replace procedure dump_table_to_csv( p_tname in varchar2,
    2 p_dir in varchar2,
    3 p_filename in varchar2 )
    4 is
    5 l_output utl_file.file_type;
    6 l_theCursor integer default dbms_sql.open_cursor;
    7 l_columnValue varchar2(4000);
    8 l_status integer;
    9 l_query varchar2(1000)
    10 default 'select * from ' || p_tname;
    11 l_colCnt number := 0;
    12 l_separator varchar2(1);
    13 l_descTbl dbms_sql.desc_tab;
    14 begin
    15 l_output := utl_file.fopen( p_dir, p_filename, 'w' );
    16 execute immediate 'alter session set nls_date_format=''dd-mon-yyyy hh24:mi:ss''
    17
    18 dbms_sql.parse( l_theCursor, l_query, dbms_sql.native );
    19 dbms_sql.describe_columns( l_theCursor, l_colCnt, l_descTbl );
    20
    21 for i in 1 .. l_colCnt loop
    22 utl_file.put( l_output, l_separator || '"' || l_descTbl(i).col_name || '"'
    23 dbms_sql.define_column( l_theCursor, i, l_columnValue, 4000 );
    24 l_separator := ',';
    25 end loop;
    26 utl_file.new_line( l_output );
    27
    28 l_status := dbms_sql.execute(l_theCursor);
    29
    30 while ( dbms_sql.fetch_rows(l_theCursor) > 0 ) loop
    31 l_separator := '';
    32 for i in 1 .. l_colCnt loop
    33 dbms_sql.column_value( l_theCursor, i, l_columnValue );
    34 utl_file.put( l_output, l_separator || l_columnValue );
    35 l_separator := ',';
    36 end loop;
    37 utl_file.new_line( l_output );
    38 end loop;
    39 dbms_sql.close_cursor(l_theCursor);
    40 utl_file.fclose( l_output );
    41
    42 execute immediate 'alter session set nls_date_format=''dd-MON-yy'' ';
    43 exception
    44 when others then
    45 execute immediate 'alter session set nls_date_format=''dd-MON-yy'' ';
    46 raise;
    47 end;
    48 /
    Procedure created.
    ops$tkyte@8i> exec dump_table_to_csv( 'emp', '/tmp', 'tkyte.emp' );
    PL/SQL procedure successfully completed.

  • Execute CDC mappings from a PL/SQL procedure

    Hi,
    I´m using OWB 11.2.0.2 for Linux. I´ve created some CDC mappings to update cubes with changes coming from other tables and cubes (from the tables that implement those cubes with the relational option). The issues are:
    - The CDC mappings run successfully from the OWB (Project Navigator - Start), but I cannot execute them from a procedure in PL/SQL with the following code:
    PROCEDURE "PROC_RUNCDCMAPPINGS" IS
    --inicializar variables aquí
    RetVal NUMBER;
    P_ENV WB_RT_MAPAUDIT.WB_RT_NAME_VALUES;
    -- ventana principal
    BEGIN
    RetVal:= BARIK.CDC_LOAD_CUBO_RECARGA.MAIN(P_ENV);
    RetVal:= BARIK.CDC_LOAD_CUBO_TOR.MAIN(P_ENV);
    RetVal:= BARIK.CDC_LOAD_CUBO_TOAE.MAIN(P_ENV);
    RetVal:= BARIK.CDC_LOAD_CUBO_VIAJES.MAIN(P_ENV);
    RetVal:= BARIK.CDC_LOAD_CUBO_TICKETINCIDENCIA.MAIN(P_ENV);
    RetVal:= BARIK.CDC_LOAD_CUBO_LIQMONEDERO.MAIN(P_ENV);
    RetVal:= BARIK.CDC_LOAD_CUBOS_LIQTEMPORALES.MAIN(P_ENV);
    COMMIT;
    END;
    It doesn´t report any error (the value for RetVal after execution is 0), but the cubes are not loaded with changes, and the changes stored in the J$_%tables are not consumed.
    Some of the options that may impact in the mappings are:
    - All the CDC are of Simple type
    - There are more than one subscriber to consume the changes, as for some tables, its changes must feed more than one CDC.
    - All the mappings include only one execution unit per mapping.
    - The integration/load template is the default: DEFAULT_ORACLE_TARGET_CT
    Other question is: As I explained, I need more than one subscriber because same updates must be consumed by different CDC mappings, to load different cubes, but I´ve not been able to assign the subscribers to only the tables associated with them, so all the subscribers are subscribed to all the changes in all the CDC tables, but as many of those subscribers never consume the changes of same tables, in the J$_% tables remains the not consumed records, and I haven´t found the way to purge those tables (other than the delete from J$_), nor to assign the tables with the subscribers (so the subscribers are only subscribed to their interested changes, that will be consumed, so the tables will be emptied after the consumption).
    Any help with these problems will be greatly appreciated.
    Tell me if more info is needed to clarify the situation.
    Best regards,
    Ana

    Hi David,
    Thank you for your reply.
    These mappings are the mappings needed to update the cubes with the changes detected by the CDC system, they are located under the Mapping Templates folder and I´m using code templates for the control of the loading and the integration (the DEFAULT_ORACLE_TARGET_CT) mapping.
    What I need is to execute these mappings within a PL/SQL procedure that will be invoked from different tools.
    I´ve done it for regular mappings (not CDC mappings), and it works. The code is the same as for the CDC ones:
    PROCEDURE "PROC_RUNLOADMAPPINGS" IS
    --inicializar variables aquí
    RetVal NUMBER;
    P_ENV WB_RT_MAPAUDIT.WB_RT_NAME_VALUES;
    -- ventana principal
    BEGIN
    RetVal:= BARIK.LOAD_CUBO_RECARGA.MAIN(P_ENV);
    RetVal:= BARIK.LOAD_CUBO_TOR.MAIN(P_ENV);
    RetVal:= BARIK.LOAD_CUBO_TOAE.MAIN(P_ENV);
    RetVal:= BARIK.LOAD_CUBO_VIAJES.MAIN(P_ENV);
    RetVal:= BARIK.LOAD_CUBO_TICKETINCIDENCIA.MAIN(P_ENV);
    COMMIT;
    END;
    -- End of PROC_RUNLOADMAPPINGS;
    ,and when I run it, the mappings are executed, but with the CDC ones it doesn´t (even when no error is reported).
    I know that they are deployed in the selected agent (in my case the Default_Agent), but when I start them from the OWB, the mapping packages are created in the DB schema, so, I thought that maybe I could invoke them....so what you tell me is that the only way to invoke them is from SQL*Plus? not from a regular PL/SQL procedure?
    Thank you very much,
    Ana

  • Creating page items from pl/sql procedure and using them on a page

    I have a page containing 2 select lists (P21_DEPARTMENTS and P21_DATE). Originally I added them as items that were "select list with submits". The problem is that based on the clearance level of the currently logged on user I only wanted the P21_DEPARTMENTS to be a select list if the user was an administrator. If however the user is not an admin then I want the page to have a hidden form field called P21_DEPARTMENTS that stores the user's department and has a label item that has the department name.
    There is also a report region that generates a table based on the department selected from the select list (if the user is an admin) or the value stored in the hidden form field if the user is not.
    My problem is that I cannot have both those items on the same page and use the HTML built-in authentication to determine which item should be rendered because I need to use the same ID for both items so that the stored procedure in my report region doesn't break. HTML does not permit items to share the same ID.
    I tried to circumvent the problem by creating a stored procedure that performs all of the item rendering in the procedure and uses "htp.p()" to output all of my HTML code. This solution would allow me to pass a parameter into the procedure informing me as to whether or not the user is an administrator. If the user is an administrator the procedure would use a conditional statement and render a select list. If not, the hidden form field and label option would be used instead.
    I finally got the stored procedure working perfectly. Now I am encountering the most bizarre thing. Since the "select list with submit" was not working (I used the same code that gets generated when I created other items using htmlDB's GUI) I decided to use a JavaScript function instead that gets triggered by the onChange event. I send along the value that is currently selected in the select list and in the function I set:
    location.href='http://www.myoraclesite.com/pls/htmldb/f?p=111:21:729740000000000000::NO::P21_DEPARTMENTS:1';
    In theory this should work. The problem is that it doesn't. The page reloads and the P21_DEPARTMENTS select list is not pre-selected.
    The only thing I can think of is that when htmlDB generates page items that you've created with it's own admin tool it assigns some internal guid or something as opposed to when someone tries to generate dynamic page items of their own from a pl/sql procedure it's like the application doesn't even know they exist.
    Any help would be GREATLY appreciated.
    My only other solution would be to create a totally separate page (one for admin and another for non-admin). I would really like to avoid this.
    Thanks in advance.

    I would love to be able to generate my menus and
    various other items in my htmlDB applications in much
    the same way I can using ASP, PHP and Cold Fusion.
    Users should have the ability to write server-side
    code wherever they feel like it. The way htmlDB works
    right now I spend more time trying to figure out how
    to create simple effects and generate simple
    interfaces when I need to be building a portal. Ami - it's important to understand that HTML DB is not like other languages. Thus, trying to force concepts which are common in other languages into HTML DB will often result in more work.
    It's definitely worth the time to go over the HTML DB 2-day Developer, which can be found here: http://www.oracle.com/technology/products/database/htmldb/pdf/B14377_01.pdf
    I can build a portal using Classic ASP, C#, PHP or Cold
    Fusion in like 1/10 of the time that it takes me to
    build one using htmlDB. I understand that this is not
    meant for the hard-core programmer but no web
    programming application in today's day and age should
    prevent experts from getting under the hood.And I can build a Portal in HTML DB in 1/10 the time it will take me to do it in any other language. It's like anything else - proficiency comes with practice and work.
    As for getting under the hood, there is plenty of places you can do that with HTML DB. Keep in mind that HTML DB itself is an HTML DB application, so the limits on what you can build with HTML DB are virtually limitless.
    Sorry for the vent there. After spending the last 2
    days trying to figure out how to implement such a
    straightforward thing and now being informed that it
    can't be done kind of bugged me.I understand your frustration, as I've been there before. My rule for beginners is that if you are writing more than a line or two of code in the first week, you're doing something wrong. Stop, take a break, and then use the ample resources (including searching this forum) to help solve your problem. There are plenty of resources available for you to learn about HTML DB on the HTML DB home page: http://otn.oracle.com/htmldb
    Good luck,
    - Scott -

  • PL/SQL Procedure Calling Java Host Command Problem

    This is my first post to this forum so I hope I have chosen the correct one for my problem. I have copied a java procedure to call Unix OS commands from within a PL/SQL procedure. This java works well for some OS commands (Eg ls -la) however it fails when I call others (eg env). Can anyone please give me some help or pointers?
    The java is owned by sys and it looks like this
    CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "ExecCmd" AS
    //ExecCmd.java
    import java.io.*;
    import java.util.*;
    //import java.util.ArrayList;
    public class ExecCmd {
    static public String[] runCommand(String cmd)
    throws IOException {
    // set up list to capture command output lines
    ArrayList list = new ArrayList();
    // start command running
    System.out.println("OS Command is: "+cmd);
    Process proc = Runtime.getRuntime().exec(cmd);
    // get command's output stream and
    // put a buffered reader input stream on it
    InputStream istr = proc.getInputStream();
    BufferedReader br = new BufferedReader(new InputStreamReader(istr));
    // read output lines from command
    String str;
    while ((str = br.readLine()) != null)
    list.add(str);
    // wait for command to terminate
    try {
    proc.waitFor();
    catch (InterruptedException e) {
    System.err.println("process was interrupted");
    // check its exit value
    if (proc.exitValue() != 0)
    System.err.println("exit value was non-zero: "+proc.exitValue());
    // close stream
    br.close();
    // return list of strings to caller
    return (String[])list.toArray(new String[0]);
    public static void main(String args[]) throws IOException {
    try {
    // run a command
    String outlist[] = runCommand(args[0]);
    for (int i = 0; i < outlist.length; i++)
    System.out.println(outlist);
    catch (IOException e) {
    System.err.println(e);
    The PL/SQL looks like so:
    CREATE or REPLACE PROCEDURE RunExecCmd(Command IN STRING) AS
    LANGUAGE JAVA NAME 'ExecCmd.main(java.lang.String[])';
    I have granted the following permissions to a user who wishes to run the code:
    drop public synonym RunExecCmd
    create public synonym RunExecCmd for RunExecCmd
    grant execute on RunExecCmd to FRED
    grant javasyspriv to FRED;
    Execute dbms_java.grant_permission('FRED','java.io.FilePermission','/bin/env','execute');
    commit
    Execute dbms_java.grant_permission('FRED','java.io.FilePermission','/opt/oracle/live/9.0.1/dbs/*','read, write, execute');
    commit
    The following test harness has been used:
    Set Serverout On size 1000000;
    call dbms_java.set_output(1000000);
    execute RunExecCmd('/bin/ls -la');
    execute RunExecCmd('/bin/env');
    The output is as follows:
    SQL> Set Serverout On size 1000000;
    SQL> call dbms_java.set_output(1000000);
    Call completed.
    SQL> execute RunExecCmd('/bin/ls -la');
    OS Command is: /bin/ls -la
    total 16522
    drwxrwxr-x 2 ora9sys dba 1024 Oct 18 09:46 .
    drwxrwxr-x 53 ora9sys dba 1024 Aug 13 09:09 ..
    -rw-r--r-- 1 ora9sys dba 40 Sep 3 11:35 afiedt.buf
    -rw-r--r-- 1 ora9sys dba 51 Sep 3 09:52 bern1.sql
    PL/SQL procedure successfully completed.
    SQL> execute RunExecCmd('/bin/env');
    OS Command is: /bin/env
    exit value was non-zero: 127
    PL/SQL procedure successfully completed.
    Both commands do work when called from the OS command line.
    Any help or assistance would be really appreciated.
    Regards,
    Bernard.

    Kamal,
    Thanks for that. I have tried to use getErrorStream and it does give me more info. It appears that some of the commands cannot be found. I suspected that this was the case but I am not sure about how this can be as they all appear to reside in the same directory with the same permissions.
    What is more confusing is output like so:
    SQL> Set Serverout On size 1000000;
    SQL> call dbms_java.set_output(1000000);
    Call completed.
    SQL> execute RunExecCmd('/usr/bin/id');
    OS Command is: /usr/bin/id
    exit value was non-zero: 1
    id: invalid user name: ""
    PL/SQL procedure successfully completed.
    SQL> execute RunExecCmd('/usr/bin/which id');
    OS Command is: /usr/bin/which id
    /usr/bin/id
    PL/SQL procedure successfully completed.
    Regards,
    Bernard

  • DBMS_METADATA.GET_DDL inside the pl/sql procedure

    We have a requirement to drop certain materialized view and need to recreate based on certain condition inside the
    pl/sql procedure.i am using the dbms_metadata to get the Mv ddls.
    var1 := 'SELECT DBMS_METADATA.GET_DDL('MATERIALIZED_VIEW,'MV_NAME','OWNER')'|| 'from dual' || ';' ;
    dbms_output.put_line(var1);
    But i am unable to get the create ddl syntax in var1.
    Can anyone help me on this

    Hi Deepu,
    you are not helping us too much. You information are coming drop by drop.
    Anyway, I don't have a materialized view but I have tried with a table.
    Here is my test and output (what I expect you too show us too):
    First test using normal SELECT FROM DUAL:
    SET LONG 2000000
    SET HEAD OFF
    SET ECHO ON
    SELECT DBMS_METADATA.get_ddl ('TABLE', 'ALERT_QT', 'SYS') FROM DUAL;
    Output:
    SQL>
    SQL> SELECT DBMS_METADATA.get_ddl ('TABLE', 'ALERT_QT', 'SYS') FROM DUAL;
      CREATE TABLE "SYS"."ALERT_QT"
       (    "Q_NAME" VARCHAR2(30),
            "MSGID" RAW(16),
            "CORRID" VARCHAR2(128),
            "PRIORITY" NUMBER,
            "STATE" NUMBER,
            "DELAY" TIMESTAMP (6),
            "EXPIRATION" NUMBER,
            "TIME_MANAGER_INFO" TIMESTAMP (6),
            "LOCAL_ORDER_NO" NUMBER,
            "CHAIN_NO" NUMBER,
            "CSCN" NUMBER,
            "DSCN" NUMBER,
            "ENQ_TIME" TIMESTAMP (6),
            "ENQ_UID" VARCHAR2(30),
            "ENQ_TID" VARCHAR2(30),
            "DEQ_TIME" TIMESTAMP (6),
            "DEQ_UID" VARCHAR2(30),
            "DEQ_TID" VARCHAR2(30),
            "RETRY_COUNT" NUMBER,
            "EXCEPTION_QSCHEMA" VARCHAR2(30),
            "EXCEPTION_QUEUE" VARCHAR2(30),
            "STEP_NO" NUMBER,
            "RECIPIENT_KEY" NUMBER,
            "DEQUEUE_MSGID" RAW(16),
            "SENDER_NAME" VARCHAR2(30),
            "SENDER_ADDRESS" VARCHAR2(1024),
            "SENDER_PROTOCOL" NUMBER,
            "USER_DATA" "SYS"."ALERT_TYPE" ,
            "USER_PROP" "SYS"."ANYDATA" ,
             PRIMARY KEY ("MSGID")
      USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "SYSAUX"  ENABLE
       ) USAGE QUEUE PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGIN
    G
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "SYSAUX"
    OPAQUE TYPE "USER_PROP" STORE AS LOB (
      ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10
      CACHE
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT))
    {code}
    Now with the procedure storing in CLOB variable
    {code:sql}
    SET SERVEROUTPUT ON SIZE UNLIMITED
    SET LIN 5000
    SET LONG 20000000
    SET ECHO ON
    DECLARE
       l_clob         CLOB;
    BEGIN
       l_clob := DBMS_METADATA.get_ddl ('TABLE', 'ALERT_QT', 'SYS');
       DBMS_OUTPUT.put_line (l_clob);
    END;
    Output:
    SQL>
    SQL> DECLARE
      2     l_clob         CLOB;
      3  BEGIN
      4     l_clob := DBMS_METADATA.get_ddl ('TABLE', 'ALERT_QT', 'SYS');
      5     DBMS_OUTPUT.put_line (l_clob);
      6  END;
      7  /
      CREATE TABLE "SYS"."ALERT_QT"
       (    "Q_NAME" VARCHAR2(30),
            "MSGID" RAW(16),
            "CORRID" VARCHAR2(128),
            "PRIORITY" NUMBER,
            "STATE" NUMBER,
            "DELAY" TIMESTAMP (6),
            "EXPIRATION" NUMBER,
            "TIME_MANAGER_INFO" TIMESTAMP (6),
            "LOCAL_ORDER_NO" NUMBER,
            "CHAIN_NO" NUMBER,
            "CSCN" NUMBER,
            "DSCN" NUMBER,
            "ENQ_TIME" TIMESTAMP (6),
            "ENQ_UID" VARCHAR2(30),
            "ENQ_TID" VARCHAR2(30),
            "DEQ_TIME" TIMESTAMP (6),
            "DEQ_UID" VARCHAR2(30),
            "DEQ_TID" VARCHAR2(30),
            "RETRY_COUNT" NUMBER,
            "EXCEPTION_QSCHEMA" VARCHAR2(30),
            "EXCEPTION_QUEUE" VARCHAR2(30),
            "STEP_NO" NUMBER,
            "RECIPIENT_KEY" NUMBER,
            "DEQUEUE_MSGID" RAW(16),
            "SENDER_NAME" VARCHAR2(30),
            "SENDER_ADDRESS" VARCHAR2(1024),
            "SENDER_PROTOCOL" NUMBER,
            "USER_DATA" "SYS"."ALERT_TYPE" ,
            "USER_PROP" "SYS"."ANYDATA" ,
             PRIMARY KEY ("MSGID")
      USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "SYSAUX"  ENABLE
       ) USAGE QUEUE PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
      TABLESPACE "SYSAUX"
    OPAQUE TYPE "USER_PROP" STORE AS LOB (
      ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10
      CACHE
      STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT))
    {code}
    It should be nice if you could post your tests too if they are not working.
    Regards.
    Al                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • ORA-02393 in an APEX PL/SQL Procedure

    Hi,
    I have a PL/SQL procedure in APEX that runs queries against a remote Database using a DB link. I do multiple calls to the DB in a FOR LOOP query. The procedure is failing with the error: "ORA-02393: exceeded call limit on CPU usage"
    I was wondering if this could be caused by the way that APEX handles db sessions. How or when does APEX close the db session? Or is it leaving it open?
    Do you have any suggestions on how to close the DB session so I don't run into this error?
    Appreciate your help.
    Alejandro

    You want to add this to your DAD
    PlsqlMaxRequestsPerSession 100
    Where 100 is the max number of requests a database session will serve before closing. 100 is just an example. The highest number you can have without causing the issue would be what you want.
    By default, Mod_plsql uses a connection pool, and the default value is 1000 page serves prior to closing the session. PlsqlMaxRequestsPerSession will set that to the value specified.
    Anton

  • Block based on PL/SQL Procedure

    Hello,
    I have been thinking about building an architecture with
    database views to support block querying and stored procedures
    for DML. By doing this I keep the forms entirely seperated from
    the table model, which is good maintenance. Changes to the data
    model will affect the views and the stored procedures, not so
    much the forms. Another advantage is that block-fields that come
    from lookup-tables will be queryable and updateable without too
    much programming. And of course perfomance is good since all SQL
    is server-processed.
    Does anyone know where to look for documenation on basing a
    block on stored procedures ? The online help does not contain
    too much on this.
    Has anyone used this technique successfully and can tell me
    about a few advantages of it ? Disadvantages ?
    Regards
    /Stefan Nilsson, Sigma
    null

    Yes, I've tried that since Forms 5.0. I remember 3 possible
    sources for the block, FROM CLAUSE SUBQUERY, TRANSACTIONAL
    TRIGGERS , and PROCEDURES.
    Advantages,
    It is now easier to design screen with any functionality, like
    blocks where you are going to manipulate columns from different
    tables. Exactly what you have in mind when you mentioned about
    views.
    It also supports sources other than relational tables .like
    the object tables or even non-Oracle data sources.
    All you have to code are procedures to support the SELECT,
    LOCK, INSERT, DELETE, and UPDATE functions.
    Disadvantages,
    You have to code advanced PL/SQL procedures. Price to pay for
    excellent functionality.
    I can't exactly remember the documentation, but there is a
    book titlted Advanced Developers or domething...
    Stefan Nilsson (guest) wrote:
    : Hello,
    : I have been thinking about building an architecture with
    : database views to support block querying and stored procedures
    : for DML. By doing this I keep the forms entirely seperated from
    : the table model, which is good maintenance. Changes to the data
    : model will affect the views and the stored procedures, not so
    : much the forms. Another advantage is that block-fields that
    come
    : from lookup-tables will be queryable and updateable without too
    : much programming. And of course perfomance is good since all
    SQL
    : is server-processed.
    : Does anyone know where to look for documenation on basing a
    : block on stored procedures ? The online help does not contain
    : too much on this.
    : Has anyone used this technique successfully and can tell me
    : about a few advantages of it ? Disadvantages ?
    : Regards
    : /Stefan Nilsson, Sigma
    null

  • Regarding execution of pl/sql procedure using JSP

    HI all
    Please help me.
    i am customizing a jsp page ,which is executing one sql procedure first then selecting data from the table in which procedure is inserting.
    How can i pass parameter dynamically to the sql procedure ? ,which i am getting from an HTML page.
    Please help me out.
    regards
    satendra

    this is the sample code provided by oracle.
    * This sample shows how to call PL/SQL blocks from JDBC.
    import java.sql.*;
    class PLSQL
    public static void main (String args [])
    throws SQLException, ClassNotFoundException
    // Load the Oracle JDBC driver
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    String url = "jdbc:oracle:oci8:@";
    try {
    String url1 = System.getProperty("JDBC_URL");
    if (url1 != null)
    url = url1;
    } catch (Exception e) {
    // If there is any security exception, ignore it
    // and use the default
    // Connect to the database
    Connection conn =
    DriverManager.getConnection (url, "scott", "tiger");
    // Create the stored procedures
    init (conn);
    // Cleanup the plsqltest database
    Statement stmt = conn.createStatement ();
    stmt.execute ("delete from plsqltest");
    // Close the statement
    stmt.close();
    // Call a procedure with no parameters
    CallableStatement procnone = conn.prepareCall ("begin procnone; end;");
    procnone.execute ();
    dumpTestTable (conn);
    procnone.close();
    // Call a procedure with an IN parameter
    CallableStatement procin = conn.prepareCall ("begin procin (?); end;");
    procin.setString (1, "testing");
    procin.execute ();
    dumpTestTable (conn);
    procin.close();
    // Call a procedure with an OUT parameter
    CallableStatement procout = conn.prepareCall ("begin procout (?); end;");
    procout.registerOutParameter (1, Types.CHAR);
    procout.execute ();
    System.out.println ("Out argument is: " + procout.getString (1));
    procout.close();
    // Call a procedure with an IN/OUT prameter
    CallableStatement procinout = conn.prepareCall ("begin procinout (?); end;");
    procinout.registerOutParameter (1, Types.VARCHAR);
    procinout.setString (1, "testing");
    procinout.execute ();
    dumpTestTable (conn);
    System.out.println ("Out argument is: " + procinout.getString (1));
    procinout.close();
    // Call a function with no parameters
    CallableStatement funcnone = conn.prepareCall ("begin ? := funcnone; end;");
    funcnone.registerOutParameter (1, Types.CHAR);
    funcnone.execute ();
    System.out.println ("Return value is: " + funcnone.getString (1));
    funcnone.close();
    // Call a function with an IN parameter
    CallableStatement funcin = conn.prepareCall ("begin ? := funcin (?); end;");
    funcin.registerOutParameter (1, Types.CHAR);
    funcin.setString (2, "testing");
    funcin.execute ();
    System.out.println ("Return value is: " + funcin.getString (1));
    funcin.close();
    // Call a function with an OUT parameter
    CallableStatement funcout = conn.prepareCall ("begin ? := funcout (?); end;");
    funcout.registerOutParameter (1, Types.CHAR);
    funcout.registerOutParameter (2, Types.CHAR);
    funcout.execute ();
    System.out.println ("Return value is: " + funcout.getString (1));
    System.out.println ("Out argument is: " + funcout.getString (2));
    funcout.close();
    // Close the connection
    conn.close();
    // Utility function to dump the contents of the PLSQLTEST table and
    // clear it
    static void dumpTestTable (Connection conn)
    throws SQLException
    Statement stmt = conn.createStatement ();
    ResultSet rset = stmt.executeQuery ("select * from plsqltest");
    while (rset.next ())
    System.out.println (rset.getString (1));
    stmt.execute ("delete from plsqltest");
    rset.close();
    stmt.close();
    // Utility function to create the stored procedures
    static void init (Connection conn)
    throws SQLException
    Statement stmt = conn.createStatement ();
    try { stmt.execute ("drop table plsqltest"); } catch (SQLException e) { }
    stmt.execute ("create table plsqltest (x char(20))");
    stmt.execute ("create or replace procedure procnone is begin insert into plsqltest values ('testing'); end;");
    stmt.execute ("create or replace procedure procin (y char) is begin insert into plsqltest values (y); end;");
    stmt.execute ("create or replace procedure procout (y out char) is begin y := 'tested'; end;");
    stmt.execute ("create or replace procedure procinout (y in out varchar) is begin insert into plsqltest values (y); y := 'tested'; end;");
    stmt.execute ("create or replace function funcnone return char is begin return 'tested'; end;");
    stmt.execute ("create or replace function funcin (y char) return char is begin return y || y; end;");
    stmt.execute ("create or replace function funcout (y out char) return char is begin y := 'tested'; return 'returned'; end;");
    stmt.close();
    }

  • Calling PL/SQL Procedures from Java

    Hello,
    I want to know, if it is possible to call PL/SQL Procedures from
    SQLJ(which uses htp.print from the Package web toolkit ).
    Though, it is possible to call normal procedures but if I want
    to call PL/SQL procedures with htp.print then I get I error.
    For example:
    #sql{Call html_test()};
    Can you give me a advice?
    Your help is much appreciated!
    M|ller

    Oracle's htp packages are develop to be work with
    mod_plsql/OAS/OWS webserver.
    If you are trying to use htp packages first need to instanciate
    some enviroment vars for htp packages, for example first you has
    to call to owa.initialize procedure, populate owa.cgi array and
    so on.
    If you need more information about how this toolkit works you
    could get the source of DB Prism at
    http://www.plenix.com/dbprism/ this open source framework
    includes backward compatibility with mod_plsql application and
    then includes settings of this values from Java code.
    Best regards, Marcelo.

  • SQL to PL/SQL procedure

    Hi,
    I am trying to convert a sql to a pl/sql procedure. Say I have a simple sql like "select ename, empno, sal from emp where empno in (7839,7364,1200);"
    I need to convert this to a pl/sql procedure : exec get_emp_data(7839,7364,1200);
    The number of values passed would be dynamic. I mean, it could be "exec get_emp_data(7839,7364);" or "exec get_emp_data(7839);" and so on. It needs to retrieve the data accordingly.
    No limit on the number of input values passed, but all of them would be values for empno column only.
    How would I go about doing this ?
    Thanks
    -Fx

    Welcome to the forums!
    Check out this blog post: The Tom Kyte Blog: Varying in lists...
    You can take the version dependent solution provided in the link and then wrap a procedure around it.
    Hope this helps!

  • Error-code OWS-00037 with doc/lit WS for a pl/sql procedure in 10.1.3.1

    Hi.
    I'm having a problem when I generate a doc/lit webservice for a pl/sql procedure that returns a collection type containing complex types. During the generation of the service JDeveloper returns with a stack trace in which it complains about zero or more soap headers and it shows fault-code: OWS-00037.
    For clarity, I did not specify any soap headers in the wizard and also did not a add any type mappings.
    I will add the complete stack-trace later to this thread..
    Hope you can help me..
    -Tom

    Hi,
    Glad that somebody else too got this problem. Well, as I had mentioned in my previous posting too, I think there are some procedures in the package, dbms_lob, like the writeappend, createtemporary etc.. which is not found in my dbms_lob.sql file, I am using 8.0.5, but I found these procedures in the 8i, I think it is becos of that.
    By the way if anybody got this solution and got any workaround, please help me too.
    I am still waiting for the solution to that.
    Shanthi

  • Help me about tickets

    Hi . I am new to sap sd help me about sap sd
    Thanks & regards
    suresh babu.k

    Dear Suresh,
    CIN
    CIN Means Country India Version
    In Indian Taxing procedure, Excise Duty plays a vital role in manufacturing scenariou2019s. Excise related configuration is known as CIN configuration. CIN Configuration is a topic in itself.
    Some info on CIN Configuration (it may not appear as understandable below, but if you check on screen, it will be understood better)
    Country Version India comes with four pricing procedures as follows:
    JINFAC (Sales from manufacturing plants)
    JINEXP (Export sales)
    JINDEP (Sales from depots)
    JINSTK (Stock transfers )
    CIN: IMG > Logistics - General > Tax on Goods Movement > India > Basic Settings > Maintain Excise Registrations
    In this IMG activity, you maintain the data relating to your excise registrations.
    Enter each of your excise registrations, specifying a four-character code for each Excise Registration Ids
    In this activity, you maintain excise registration IDs. You create one ID for each of your business's excise registrations.
    For each excise registration in your business create a registration ID, and state:
    Which taxes the registration covers (additional excise duty, special excise duty, and cess) Fields for any taxes that are not covered will be hidden in transactions involving excise duty.
    The maximum number of items to be printed on each excise invoice
    Whether you are allowed partial CENVAT credits
    Maintain Registration ID NUMBER, Excise code number, excise registration number
    ECC Number: Specifies the organization's ECC number.
    Excise Registration Number: A number assigned to each premises or location that has registered as a manufacturer with the excise authorities.
    Every entity with an excise registration number is required to keep its own excise books.
    Excise range: Specifies the excise range in whose area the excise registration is located.
    Excise Division: Specifies the excise division in whose area the excise registration is located.
    Excise Collectorate: The code of the excise collectorate in whose area the excise registration is located.
    Indicator for confirming, AED usage Additional Excise duty Percentage.
    These are livable under the additional duties of excise act. These duties are in addition to basic excise duty and special excise duty. Example - Additional Excise duty is livable in case of textile products, tobacco and sugar.
    Similarly for SED CESS Number of Items in Excise Invoice Shows the maximum number of line items that the authorities allow per excise invoice.
    Dependencies - This information is used when you create an excise invoice in Sales and Distribution (SD) for factory sales and for other movements. This information is used to split the transfer postings' items into multiple subcontracting challans.
    Excise register set description: Description of the excise registers set.
    Partial CENVAT Credit: Indicates that the excise registration ID is allowed to credit only a portion of its input excise duty to its CENVAT account
    Dependencies - When you post a goods receipt, the system splits the input excise duty on the material into its deductible and nondeductible amounts. It posts the deductible duty to the appropriate CENVAT account, and adds the nondeductible duty to the material value.
    This information is also shown when you post the vendor's excise invoice.
    Maintain Company Code Settings.
    In this IMG activity, you maintain the data relating to your company codes.
    Document Type for CENVAT Postings.
    It controls, which document type the system uses when making CENVAT postings in Financial Accounting (FI). Here ED is document type for cenvat posting.
    Indicator for providing debit account overwriting
    Debit Account Overwrite Indicator. X - Indicates debit accounts can be overwritten. Use In excise journal voucher transaction. It provides the flexibility to the user to enter the debit account of his choice depending on the nature of transaction.
    Automatic balance Indicator - Excise year start month. The calendar month marking the beginning of the excise year. This start month represents the month for the start of the excise invoice number range. The month 04 is entered here indicating April of the calendar year as the start month for excise invoices. Any change by the Excise authorities regarding start month should be taken care of by an entry in this field and initialization.
    Excise invoice selection procedure :Excise invoice selection type. To indicate the method opted by the company for selecting the excise invoice. It can be either earliest or latest invoices that were received. Number of excise invoices to be selected Indicates the number of excise invoices that needs to be selected in the excise invoice selection.
    Days to be considered for excise invoice selection Number of days from document date for excise invoice selection.
    Example - If the value of this field is 20 and today is 28-03-97. The excise invoice selection will show the related invoices only for the period 08-03-97 to 28-03-97.
    Document type for TDS FI posting: Financial accounting document type for TDS posting.
    Document type for FI posting on Utilisation Financial accounting document type for TDS posting.
    Indicator for item level excise duty round off - This indicator is to be used for deciding whether Item level excise duty amount rounding off is required during procurement cycle. If marked 'X' then the excise duty amount will be rounded off to the nearest rupee at the Purchase order level. This will not round off the CENVAT credit to be taken. If the duty amount is less than one rupee then no rounding is done.
    Rounding off of Excise duty for outgoing excise invoice - You can round off the Excise amount to be paid during an outgoing
    Excise invoice by marking this indicator as 'X'. The rounding is done at the item level for each item where the amount is greater than 1 Rupee.
    Immediate Credit on Capital Goods - Instructs the system, when you verify a goods receipt for capital goods, to immediately post half of the input excise duty to the appropriate CENVAT accounts. The rest is posted the CENVAT on hold account, for use in the following year.
    CVD Clearing Account - Specifies which G/L account the system credits when you take a CENVAT credit on countervailing duty in the Incoming Excise Invoices transaction.
    Exchange rate type - Key representing a type of exchange rate in the system.
    You enter the exchange rate type to store different exchange rates. Example - You can use the exchange rate type to define a buying rate, selling rate, or average rate for translating foreign currency amounts. You can use the average rate for the currency translation, and the bank buying and selling rates for valuation of foreign currency amounts.
    Exchange rate type to be used for Export excise duty converts - When you are creating an Excise invoice for export sales then the exchange rate for duty calculation will be picked up using this Exchange rate type.
    Maintain Plant Settings - In this IMG activity, you maintain excise information relating to your plants.
    Plant Settings - In this activity, you maintain excise information relating to your plants.
    For each plant:
    Specify whether it is a manufacturing site or a depot.
    Assign it an excise registration ID. - You can assign the same ID to more than one plant, if required.
    Depot - Indicates that the plant in question is a depot. - Depots are required to prepare register RG 23D, and follow different procedures for goods receipt and invoice generation.
    Number of goods receipt per excise invoice.
    Multiple GR for one excise invoice, Single credit
    Multiple GR for one excise invoice, multiple credit
    Maintain Excise Groups - In this IMG activity, you define your excise groups. For each excise group, you can also control how various excise invoice transactions will work.
    Excise Groups - In this activity, you define excise groups. An excise group allows you to maintain a separate set of excise registers and excise accounts. The RG 23A, RG 23C and PLA serial numbers are created for an excise group.
    Recommendation - Under normal circumstances, excise authorities require every business to maintain only one set of excise registers and one set of accounts. But through exemption from the authorities, multiple books can be maintained.
    If your company has only one set of excise registers, then you need to maintain only one excise group.
    1. Create one excise group for each set of registers that you need to keep.
    2. Assign the excise groups to plants.
    3. Maintain whether this Excise group is for a depot or not.
    If you receive only one consignment for an Excise challan then you can leave GR's per EI as blank. If you receive multiple GR's for a given Excise challan and would like to avail multiple credits mark the GRs per EI as 'Multiple GR's for one excise invoice, multiple credit'. Alternatively if you want to avail the credit only after all the goods receipts have been made mark it as ' Multiple GR for one excise invoice, single credit'.
    4. If you want to automatically create Excise invoice during Sales cycle at the time of billing the tick the indicator 'Create EI'
    5. During depot sales if you do not want to do RG23D selection and posting separately and would like to complete RG23D selection in one step mark the indicator 'RG23D Auto post'. This will post the selected records into RG23D automatically. You cannot cancel the selection later.
    6. If the indicator 'Default GR qty' is marked system will default the Excise challan quantity on to the Goods receipt if the Excise invoice number is given in the pop-up.
    7. If the indicator 'Folio no create' is marked system will generate Folio numbers for RG23D during receipt of excise invoice into depot.
    8. 'Automatic posting' when ticked will post the Excise invoice other movements automatically along with creation in single step.
    9. 'Create Part1 for Block Stock' when marked will create a Part1 during the receipt of material into Blocked stock .
    10. 'Create Part1 for STO' when marked will create a Part1 during the receipt of material through inter plant transfers.
    11. 'Create Part1 for consumption stock' when marked will create a Part1 during the receipt of material into consumption stock. Excise Group Governs which set of excise registers a business transaction will be included in.
    Following is the relation between excise group, plant and registration. - In define excise groups in Customizing.
    Then, in transactions involving excise duty, for example, when you post a vendor's excise invoice, you specify which excise group you are using. This information tells the system which G/L accounts to post the excise to. At the end of the period, when you come to prepare your excise registers, you create different sets for each excise group.
    Indicates that the plant in question is a depot. - Depots are required to prepare register RG 23D, and follow different procedures for goods receipt and invoice generation.
    GR Per Excise Invoice
    Multiple GR for one excise invoice , Multiple credit
    Multiple GR for one excise invoice , Single Credit
    Create Excise Invoice Automatically - Instructs the system to automatically create a Sales and Distribution (SD) excise invoice immediately you create a commercial invoice or a pro forma invoice.
    The excise invoice is created in the background. - If you want to make use of this function, you must also define the default plant, excise group, and series groups in Customizing for Sales and Distribution (SD), by choosing Excise Group - Series Group Determination.
    RG23D Sales Creation and posting option - RG23D Automatic Option if selected will create Depot excise invoice by posting the selection of excise invoices in single step. If this is not selected then you need to separately do RG23D selection followed by PGI and then RG23D verification and posting. If you need automatic posting of RG23D selection then the Post Goods Issue should have been completed before running RG23D selection.
    Default excise qty in GR - If this indicator is ticked then while doing Goods Receipt using 'MB01' system will default the excise invoice quantity on to the Goods receipt document.
    Folio number for depo Posting - If this indicator is marked then while creating Excise invoice for other movements system automatically does the Verify and Post. You need not separately Post the excise invoice
    Also we can set indicator for creation of part 1 for:
    Blocked stock
    Stock transport order
    Consignment stock
    Maintain Series Group - In this IMG activity, you define the different excise series groups within your company. Series groups allow you to maintain multiple number ranges for the outgoing excise documents. Based on excise regulations and exemptions from the authorities you can maintain multiple number series for outgoing documents. But each of these series has to be declared to the excise authorities.
    Define excise series groups based on type of outgoing document
    Assign series group to excise registration ID
    If no financial postings are required for an Excise invoice in this seris group then you tick the 'No utilization' indicator.
    If the CENVAT has to be paid immediately and you need not wait for the Fort nightly payment then mark the 'Immediate Utilization' Iindicator. Example - You could define two series groups, group 001 for excise invoices, and group 002 for 57 F4 documents.
    No account postings for CENVAT in sales cycle
    No utilization Flag
    If you do not need any CENVAT utilization for an excise invoice but would like to just generate an excise invoice then you need to mark this indicator.
    If the flag is checked then system will create an Excise invoice in the given Series group but there will not be any account postings or Part2 postings.
    Immediate Utilization of CENVAT - Specifies that when you create an excise invoice, the system immediately pays the amount from CENVAT and creates the Part II entry. Such invoices will not be listed for fortnightly utilization.
    If you have both fortnightly and immediate utilization for the same excise group, the account determination within CIN IMG should point to the ED interim account.
    Account determination for immediate payment will be done exactly the same as being done for fortnightly utilization program.
    Maintain Excise Duty Indicators - In this IMG activity, you maintain the excise duty indicators.
    IMG > Logistics - General > Tax On Goods Movement > India > Basic Settings > Determination of Excise Duty > Select Tax Calculation Procedure
    In this IMG activity, you specify which tax procedure you want to use for determining excise duties and sales taxes on input materials in India.
    If you use condition-based excise determination, use a copy of the tax procedure TAXINN.
    If you use formula-based excise determination, use a copy of the tax procedure TAXINJ.
    This tax procedure also supports condition-based excise determination, so that you can work with both concurrently.
    We strongly recommend that new customers use condition-based excise determination. Note that once you have started using a tax procedure, you cannot switch to another one, otherwise you will not be able to display old documents.
    Maintain Excise Defaults - In this IMG activity, you define which tax procedure and pricing condition types are used in calculating excise taxes using formula-based excise determination.
    If you use condition-based excise determination, fill out the CVD cond. field and leave all the others blank.
    If you use formula-based excise determination, fill out all of the fields as follows:
    Enter the tax procedure and the pricing conditions that are relevant for excise tax processing.
    Specify the purchasing and sales conditions types used for basic excise duty, additional excise duty, special excise duty, and cess.
    Specify the conditions in the sales order that are used for excise rates.
    Specify the countervailing duty condition type used for import purchase orders.
    See also : SAP Library -> Logistics -> Country Versions -> Asia-Pacific -> India -> Materials Management (MM) -> Condition-Based Excise Determination and -> Formula-Based Excise Determination.
    IMG > Logistics - General > Tax On Goods Movement > India > Basic Settings > Determination of Excise Duty > Condition-Based Excise Determination
    When you enter a purchasing document, for example, a purchase order, the R/3 System automatically calculates the applicable excise duties using the condition technique.
    Features: The standard system comes with two tax calculation procedures.
    TAXINN is only supports condition-based excise determination, whereas TAXINJ supports condition-based excise determination and formula-based excise determination. Both tax procedures contain condition types that cover all of the excise duties and sales taxes applicable.
    Since the exact rates of excise duty can vary on a large number of factors, such as which vendor you purchase a material from, or which chapter ID the vendor stocks the material under, you create condition records for every sort of excise duty.
    When you come to enter a purchasing document, the system applies the excise duty at the rates you have entered in the condition records.
    Customizing: Make the settings in Customizing Basic -> India -> for Logistics u2013 General, by choosing Taxes on Goods Movements Account -> Excise Duties Using Condition Technique and u2026-> Settings Determination.
    These activities include one activity where you define a tax code for condition-based excise determination.
    Master Data - Create condition records for all excise duties that apply, and enter the tax code for condition-based excise determination in each.
    Day-to-Day Activities - When you enter a purchase order or other purchasing document, enter the tax code for condition-based excise determination in each line item. The system then calculates the excise duties using the condition records you have created.
    When the ordered materials arrive, you post the goods receipt and the excise invoice. The system posts the excise duty to the appropriate accounts for deductible input taxes when you enter the excise invoice.
    Creating Condition Records for Excise Duty
    1. In the command field, enter FV11 and choose .
    2. Enter the condition type that you want to create a condition record for and choose .
    The Key Combination dialog box appears.
    3. Select the combination of objects that you want to create the condition record for. On the dialog box, Control Code means "chapter ID." So, for example, to create a condition record for a tax that applies to a combination of country, plant, and chapter ID, select Country/Plant/Control Code.
    4. Choose.
    5. Enter data as required. - In the Tax Code field, enter the dummy tax code that you have defined.
    6. Save the condition record.
    Formula-Based Excise Determination - When you execute a business transaction involving materials that are subject to excise duty, the system automatically calculates the duty for you.
    In order for the system to be able to determine which rate of excise duty to apply, you must have maintained all the data on the Excise Rate Maintenance screen, which you can Master Data access from the SAP Easy Access screen by choosing Indirect Taxes Excise Rate Maintenance.
    You maintain the following types of data:
    Plant master data
    You assign each of your plants an excise duty indicator. You can use the same indicator for all the plants with the same excise status from a legal point of view, such as all those that are in an exempt zone. See also the information about manufacturers that are only entitled to deduct a certain portion of the duty (see
    Partial CENVAT Credit).
    Vendor master data
    For each of your vendors with the same excise status from a legal perspective, you define an excise duty indicator. You must also specify the vendor type u2013 for example, whether the vendor is a manufacturer, a depot, or a first-stage dealer. You must also stipulate if the vendor qualifies as a small-scale industry. For each permutation of plant indicator and vendor indicator, you then create a final excise duty indicator.
    Customer master data
    Similarly, you assign the same excise duty indicator to each of your customers that share the same legal excise status.
    Again, for each permutation of plant indicator and customer indicator, you then create a final excise duty indicator.
    Material master data
    each material is assigned a chapter ID.
    Excise tax rate
    for every chapter ID and final excise duty indicator, you maintain the rate of excise duty.
    If your business only qualifies for partial CENVAT credit, you must customize your system accordingly.
    Let us consider an example to illustrate how the system determines which rate of excise duty to apply to a material. Assume you are posting a sale of ball bearings to a customer. The system automatically determines the rate of excise duty as follows:
    1. Looks up the customer master data to see what status you have assigned the customer.
    Let's assume you've assigned the customer status 3.
    2. Looks up the plant master data to see what status you have assigned the plant. Similarly, your plant has status 2.
    3. The system looks up the table under Excise Indicator for Plant and Customer to see what the final excise duty indicator is for customer status 3 and plant status 2: It is 7.
    4. The system determines the chapter ID of the ball bearing for the plant.
    Letu2019s assume the chapter ID at plant for the ball bearings is 1000.01.
    5. Finally, the system looks up the table under Excise Tax Rate to see what rate of duty applies to chapter ID 1000.01 under
    status 7.
    Define Tax Code for Purchasing Documents - In this IMG activity, you define a tax code for the purposes of calculating excise duty when you enter purchasing documents. Only carry out this activity if you use condition-based excise
    determination.
    Create a new tax code, and set the tax code type to V (input tax). Do not make any other settings for it.
    Assign Tax Code to Company Codes
    In this IMG activity, assign the tax code for purchasing documents to the company codes where it will be used.
    Only carry out this activity if you use condition-based excise determination.
    Classify Condition Types - In this IMG activity, you specify which condition types you use for which sort of tax. Note that this only applies to condition types that you use with the new excise determination method. The system uses this information when you create a document from another one. For example, when you enter an incoming excise invoice from a purchase order, or when you create an outgoing excise invoice from a sales order, the system determines the various excise duties in the excise invoice using the information that you have entered here. In addition, when you create a purchasing document, the system only uses the condition types that you enter here.
    For taxes on purchases, use the condition types contained in the tax procedure.
    For taxes on sales, use the condition types contained in the pricing procedures.
    The standard system comes with sample settings for the tax calculation procedures and pricing procedures.
    Use these settings as a basis for your own.
    IMG > Logistics - General > Tax On Goods Movement > India > Account Determination
    Define G/L Accounts for Taxes - In this IMG activity, you specify which G/L accounts you will use to record which taxes.
    Requirements - You have set up G/L accounts for each of the processing keys listed below.
    Assign an account to each of the following posting keys. The accounts for VS1, VS2, and VS3 are used as clearing accounts during excise invoice verification.
    VS1 (basic excise duty)
    VS2 (additional excise duty)
    VS3 (special excise duty)
    VS5 (sales tax setoff)
    MWS (central sales tax)
    MW3 (local sales tax)
    ESA (service tax)
    ESE (service tax expense)
    Specify Excise Accounts per Excise Transaction - In this IMG activity, you specify which excise accounts (for excise duty and CENVAT) are to be posted to for the various transaction types. Enter all the accounts that are affected by each transaction type. If you use sub transaction types, enter the accounts for each sub transaction type as well.
    Transaction type UTLZ is used for determining accounts only while posting excise JVs and also if the payment of excise duty has to be done fortnightly. The fortnightly CENVAT payment utility picks up the credit side accounts from the transaction types of GRPO, EWPO, and TR6C for determining the CENVAT and PLA accounts. There is no separate transaction type for fortnightly payment.
    Example:
    Excise TT DC ind Account name
    GRPO CR CENVAT clearing account
    GRPO CR RG 23 BED account
    GRPO DR CENVAT on hld account
    Specify G/L Accounts per Excise Transaction - In this IMG activity, you assign the excise and CENVAT accounts to G/L accounts. When you come to execute the various transactions, the system determines which G/L accounts to post to by looking at the:
    Excise group
    Company code
    Chart of accounts
    Furthermore, if you want separate account determination settings within an excise group, you can also use sub transaction types.
    Requirements
    You have already:
    Defined the G/L accounts
    Defined the excise groups
    Maintained the transaction accounts
    Activities - For each excise group, assign the excise and CENVAT accounts to G/L accounts. For most businesses, one set of accounts will suffice for all transactions.
    Note : you need not remit the CENVAT to the excise department immediately, so maintain the credit account for transaction type DLFC as an excise duty interim account. This will be set off when you remit the duty. Config setting needed to be done in order to get the Excise Details Screen in Material Master.
    Even though this functionality is available in enterprise version, a small configuration step has to be made in Screen Sequences for Material Master.
    Following document helps you to do this configuration.
    Material Master à Logistics General
    1. Go to IMG Define Structure of Data Screen for each Configuring the Material master Screen Sequence.
    2. Select your screen sequence. Usually it would be 21. Select the same and click on Data Screen in the left frame.
    3. Once the data screens are exhibited, select data screen no. 15, ie. SSq. 21and Scrn 15, which is u201CForeign Trade: Import Datau201D. Select the same and click on Sub screens in the left frame.
    4. Go to the last sub screen i.e. 21-15-6 - SAPLMGD1- 0001 and select the same. Click on tab view sub screen and ensure that the sub screen is blank.
    5. Now in the last sub screen i.e. no.6 you delete SAPLMGD1 u2013 0001 and instead add SAPLJ1I_MATERIAL_MASTER and in the screen no. 2205.
    6. Save the setting.
    7. Create a Material Master and check whether in Screen Foreign Trade
    u2013 Import, Excise related sub screen appears.
    Whether you are allowed partial CENVAT credits 
    Maintain Registration ID NUMBER, Excise code number, excise registration number  
    Excise Registration Number 
    A number assigned to each premises or location that has registered as a manufacturer with the excise authorities. 
    Every entity with an excise registration number is required to keep its own excise books. 
    ECC Number 
    Specifies the organization's ECC number. 
    Excise Registration Number 
    A number assigned to each premises or location that has registered as a manufacturer with the excise authorities. 
    Every entity with an excise registration number is required to keep its own excise books. 
    Excise range: Specifies the excise range in whose area the excise registration is located. 
    Excise Division 
    Specifies the excise division in whose area the excise registration is located. 
    Excise Collectorate 
    The code of the excise collectorate in whose area the excise registration is located. 
    Indicator for confirming AED usage 
    Additional Excise Duty Percentage. These are leviable under the additional duties of excise act. These duties are in addition to basic excise duty and special excise duty. 
    Example 
    Additional Excise duty is leviable in case of textile products, tobacco and sugar. 
    Similarly for SED CESS 
    Number of Items in Excise Invoice 
    Shows the maximum number of line items that the authorities allow per excise invoice. 
    Dependencies 
    This information is used when you create an excise invoice in Sales and Distribution (SD) for factory sales and for other movements. 
    This information is used to split the transfer postings' items into multiple subcontracting challans. 
    Excise register set description 
    Description of the excise registers set. 
    Partial CENVAT Credit 
    Indicates that the excise registration ID is allowed to credit only a portion of its input excise duty to its CENVAT account. 
    Dependencies 
    When you post a goods receipt, the system splits the input excise duty on the material into its deductible and nondeductible amounts. It posts the deductible duty to the appropriate CENVAT account, and adds the nondeductible duty to the material value. 
    This information is also shown when you post the vendor's excise invoice. 
    Maintain Company Code Settings 
    Use 
    In this IMG activity; you maintain the data relating to your company codes. 
    Document Type for CENVAT Postings 
    It controls, which document type the system uses when making CENVAT postings in Financial Accounting (FI). Here ED is document type for cenvat posting. 
    Indicator for providing debit account overwriting 
    Debit Account Overwrite Indicator. X - Indicates debit accounts can be overwritten. Use In excise journal voucher transaction. It provides the flexibility to the user to enter the debit account of his choice depending on the nature of transaction. 
    Automatic balance Indicator 
    Excise year start month 
    The calendar month marking the beginning of the excise year 
    Use 
    This start month represents the month for the start of the excise invoice number range. The month 04 is entered here indicating April of the calendar year as the start month for excise invoices. Any change by the Excise authorities regarding start month should be taken care of by an entry in this field and initialization. 
    Excise invoice selection procedure 
    Excise invoice selection type. To indicate the method opted by the company for selecting the excise invoice. It can be either earliest or latest invoices that were received. 
    Number of excise invoices to be selected 
    Indicates the number of excise invoices that needs to be selected in the excise invoice selection. 
    Days to be considered for excise invoice selection 
    Number of days from document date for excise invoice selection. 
    Example 
    If the value of this field is 20 and today is 28-03-97. The excise 
    invoice selection will show the related invoices only for the 
    period 08-03-97 to 28-03-97. 
    Document type for TDS FI posting 
    Financial accounting document type for TDS posting. 
    Document type for FI posting on Utilisation 
    Financial accounting document type for TDS posting. 
    Indicator for item level excise duty round off 
    This indicator is to be used for deciding whether Item level excise duty amount rounding off is required during procurement cycle. If marked 'X' then the excise duty amount will be rounded off to the nearest rupee at the Purchase order level. This will not round off the CENVAT credit to be taken. If the duty amount is less than one rupee then no rounding is done 
    Rounding off of Excise duty for outgoing excise invoice 
    You can round off the Excise amount to be paid during an outgoing Excise invoice by marking this indicator as 'X'. The rounding is done at the item level for each item where the amount is greater than 1 Rupee. 
    Immediate Credit on Capital Goods 
    Instructs the system, when you verify a goods receipt for capital goods, to immediately post half of the input excise duty to the appropriate CENVAT accounts. 
    The rest is posted the CENVAT on hold account, for use in the following year. 
    CVD Clearing Account 
    Specifies which G/L account the system credits when you take a CENVAT credit on countervailing duty in the Incoming Excise Invoices transaction. 
    Exchange rate type 
    Key representing a type of exchange rate in the system. 
    Use 
    You enter the exchange rate type to store different exchange rates. 
    Example 
    You can use the exchange rate type to define a buying rate, selling rate, or average rate for translating foreign currency amounts. You can use the average rate for the currency translation, and the bank buying and selling rates for valuation of foreign currency amounts.  
    Exchange rate type to be used for Export excise duty converts 
    When you are creating an Excise invoice for export sales then the exchange rate for duty calculation will be picked up using this Exchange rate type. 
    Maintain Plant Settings 
    Use 
    In this IMG activity, you maintain excise information relating to your plants. 
    Plant Settings 
    In this activity, you maintain excise information relating to your plants. 
    Activities 
    For each plant: 
    ? Specify whether it is a manufacturing site or a depot. 
    ? Assign it an excise registration ID. 
    You can assign the same ID to more than one plant, if required. 
    Depot 
    Indicates that the plant in question is a depot. 
    Dependencies 
    Depots are required to prepare register RG 23D, and follow different procedures for goods receipt and invoice generation. 
    Number of goods receipt per excise invoice. 
    Multiple GR for one excise invoice, Single credit 
    Multiple GR for one excise invoice, Multiple credit 
    Maintain Excise Groups 
    Use 
    In this IMG activity, you define your excise groups. For each excise group, you can also control how various excise invoice transactions will work. 
    Excise Groups 
    In this activity, you define excise groups. An excise group allows you to maintain a separate set of excise registers and excise accounts. The RG 23A, RG 23C and PLA serial numbers are created for an excise group. 
    Recommendation 
    Under normal circumstances, excise authorities require every business to maintain only one set of excise registers and one set of accounts. But through exemption from the authorities, multiple books can be maintained. 
    If your company has only one set of excise registers, then you need to maintain only one excise group. 
    Activities 
    1. Create one excise group for each set of registers that you need to keep. 
    1. Assign the excise groups to plants. 
    2. Maintain whether this Excise group is for a depot or not. 
    3. If you receive only one consignment for an Excise challan then you can leave GR's per EI as blank. If you receive multiple GR's for a given Excise challan and would like to avail multiple credit mark the GRs per EI as 'Multiple GR's for one excise invoice, multiple credit'. Alternatively if you want to availa the credit only after all the goods receipts have been made mark it as ' Multiple GR for one excise invoice, single credit'. 
    4. If you want to automatically create Excise invoice during Sales cycle at the time of billing the tick the indicator 'Create EI' 
    5. During depot sales if you do not want to do RG23D selection and posting separately and would like to complete RG23D selection in one step mark the indicator 'RG23D Auto post'. This will post the selected records into RG23D automatically. You cannot cancel the selection later. 
    6. If the indicator 'Default GR qty' is marked system will default the Excise challan quantity on to the Goods receipt if the Excise invoice number is given in the pop-up. 
    7. If the indicator 'Folio no create' is marked system will generate Folio numbers for RG23D during receipt of excise invoice into depot. 
    8. 'Automatic posting' when ticked will post the Excise invoice other movements automatically along with creation in single step. 
    9. 'Create Part1 for Block Stock' when marked will create a Part1 during the receipt of material into Blocked stock . 
    10. 'Create Part1 for STO' when marked will create a Part1 during the receipt of material through inter plant transfers.  
    11. 'Create Part1 for consumption stock' when marked will create a Part1 during the receipt of material into consumption stock. 
    Excise Group 
    Governs which set of excise registers a business transaction will be included in. 
    Following is the relation between excise group, plant and registration. 
    Dependencies 
    In define excise groups in Customizing. 
    Then, in transactions involving excise duty, for example, when you post a vendor's excise invoice, you specify which excise group you are using. This information tells the system which G/L accounts to post the excise to. 
    At the end of the period, when you come to prepare your excise registers, you create different sets for each excise group. 
    Indicates that the plant in question is a depot. 
    Dependencies 
    Depots are required to prepare register RG 23D, and follow different procedures for goods receipt and invoice generation. 
    GR Per Excise Invoice 
    Multiple GR for one excise invoice , Multiple credit 
    Multiple GR for one excise invoice , Single Credit 
    Create Excise Invoice Automatically 
    Instructs the system to automatically create a Sales and Distribution (SD) excise invoice immediately you create a commercial invoice or a pro forma invoice. 
    The excise invoice is created in the background. 
    Dependencies 
    If you want to make use of this function, you must also define the default plant, excise group, and series groups in Customizing for Sales and Distribution (SD), by choosing Excise Group - Series Group Determination. 
    RG23D Sales Creation and posting option 
    RG23D Automatic Option if selected will create Depot excise invoice by posting the selection of excise invoices in single step.  
    If this is not selected then you need to separately do RG23D selection followed by PGI and then RG23D verification and posting.  
    If you need automatic posting of RG23D selection then the Post Goods Issue should have been completed before running RG23D selection. 
    Default excise qty in GR 
    If this indicator is ticked then while doing Goods Receipt using 'MB01' system will default the excise invoice quantity on to the Goods receipt document. 
    Folio number for depo 
    Posting 
    If this indicator is marked then while creating Excise invoice for other movements system automatically does the Verify and Post. You need not separately Post the excise invoice 
    Also we can set indicator for creation of part 1 for: 
    Blocked stock  
    Stock transport order 
    Consignment stock 
    Maintain Series Groups 
    Use 
    In this IMG activity, you define the different excise series groups within your company. Series groups allow you to maintain multiple number ranges for the outgoing excise documents. 
    Based on excise regulations and exemptions from the authorities you can maintain multiple number series for outgoing documents. But each of these series has to be declared to the excise authorities. 
    Activities 
    ? Define excise series groups based on type of outgoing document 
    ? Assign series group to excise registration ID 
    ? If no financial postings are required for an Excise invoice in this seris group then you tick the 'No utilization' indicator. 
    ? If the CENVAT has to be paid immediately and you need not wait for the Fort nightly payment then mark the 'Immediate Utilization' indicator. 
    Example 
    You could define two series groups, group 001 for excise invoices, and group 002 for 57 F4 documents. 
    No account postings for CENVAT in sales cycle 
    No utilization Flag 
    If you do not need any CENVAT utilization for an excise invoice but would like to just generate an excise invoice then you need to mark this indicator. 
    IF the flag is checked then system will create an Excise invoice in the given Series group but there will not be any account postings or Part2 postings. 
    Immediate Utilization of CENVAT 
    Specifies that when you create an excise invoice, the system immediately pays the amount from CENVAT and creates the Part II entry. Such invoices will not be listed for fortnightly utilization. 
    If you have both fortnightly and immediate utilization for the same excise group, the account determination within CIN IMG should point to the ED interim account. 
    Account determination for immediate payment will be done exactly the same as being done for fortnightly utilization program. 
    Maintain Excise Duty Indicators 
    Use 
    In this IMG activity, you maintain the excise duty indicators. 
    IMG > Logistics - General > Tax On Goods Movement > India > Basic Settings > Determination of Excise Duty > 
    Select Tax Calculation Procedure 
    Use 
    In this IMG activity, you specify which tax procedure you want to use for determining excise duties and sales taxes on input materials in India. 
    ? If you use condition-based excise determination, use a copy of the tax procedure TAXINN. 
    ? If you use formula-based excise determination, use a copy of the tax procedure TAXINJ. 
    This tax procedure also supports condition-based excise determination, so that you can work with both concurrently. 
    We strongly recommend that new customers use condition-based excise determination. Note that once you have started using a tax procedure, you cannot switch to another one, otherwise you will not be able to display old documents.  
    Maintain Excise Defaults 
    Use 
    In this IMG activity, you define which tax procedure and pricing condition types are used in calculating excise taxes using formula-based excise determination. 
    Activities 
    If you use condition-based excise determination, fill out the CVD cond. field and leave all the others blank. 
    If you use formula-based excise determination, fill out all of the fields as follows: 
    ? Enter the tax procedure and the pricing conditions that are relevant for excise tax processing. 
    ? Specify the purchasing and sales conditions types used for basic excise duty, additional excise duty, special excise duty, and cess. 
    ? Specify the conditions in the sales order that are used for excise rates. 
    ? Specify the countervailing duty condition type used for import purchase orders. 
    See also 
    SAP Library -> Logistics -> Country Versions -> Asia-Pacific -> India -> Materials Management (MM) -> Condition-Based Excise Determination and -> Formula-Based Excise Determination.  
    IMG > Logistics - General > Tax On Goods Movement > India > Basic Settings > Determination of Excise Duty > 
    Condition-Based Excise Determination  
    Use 
    When you enter a purchasing document, for example, a purchase order, the R/3 System automatically calculates the applicable excise duties using the condition technique. 
    Features 
    The standard system comes with two tax calculation procedures. TAXINN is only supports condition-based excise determination, whereas TAXINJ supports condition-based excise determination and formula-based excise determination. Both tax procedures contain condition types that cover all of the excise duties and sales taxes applicable. 
    Since the exact rates of excise duty can vary on a large number of factors, such as which vendor you purchase a material from, or which chapter ID the vendor stocks the material under, you create condition records for every sort of excise duty. 
    When you come to enter a purchasing document, the system applies the excise duty at the rates you have entered in the condition records. 
    Activities 
    Customizing 
    Make the settings in Customizing Basic? India?for Logistics - General, by choosing Taxes on Goods Movements Account? Excise Duties Using Condition Technique and ...?Settings Determination.  
    These activities include one activity where you define a tax code for condition-based excise determination. 
    Master Data 
    Create condition records for all excise duties that apply, and enter the tax code for condition-based excise determination in each. 
    Day-to-Day Activities 
    When you enter a purchase order or other purchasing document, enter the tax code for condition-based excise determination in each line item. The system then calculates the excise duties using the condition records you have created. 
    When the ordered materials arrive, you post the goods receipt and the excise invoice. The system posts the excise duty to the appropriate accounts for deductible input taxes when you enter the excise invoice. 
    Creating Condition Records for Excise Duty  
    1. In the command field, enter FV11 and choose .  
    2. Enter the condition type that you want to create a condition record for and choose .  
    The Key Combination dialog box appears. 
    3. Select the combination of objects that you want to create the condition record for.  
    On the dialog box, Control Code means "chapter ID." 
    So, for example, to create a condition record for a tax that applies to a combination of country, plant, and chapter ID, select Country/Plant/Control Code. 
    4. Choose .  
    5. Enter data as required.  
    In the Tax Code field, enter the dummy tax code that you have defined. 
    6. Save the condition record. 
    Formula-Based Excise Determination  
    Use 
    When you execute a business transaction involving materials that are subject to excise duty, the system automatically calculates the duty for you. 
    Prerequisites 
    In order for the system to be able to determine which rate of excise duty to apply, you must have maintained all the data on the Excise Rate Maintenance screen, which you can Master Data?access from the SAP Easy Access screen by choosing Indirect Taxes Excise Rate Maintenance.? 
    You maintain the following types of data: 
    ? Plant master data 
    You assign each of your plants an excise duty indicator. You can use the same indicator for all the plants with the same excise status from a legal point of view, such as all those that are in an exempt zone. 
    See also the information about manufacturers that are only entitled to deduct a certain portion of the duty (see Partial CENVAT Credit). 
    ? Vendor master data 
    For each of your vendors with the same excise status from a legal perspective, you define an excise duty indicator. You must also specify the vendor type - for example, whether the vendor is a manufacturer, a depot, or a first-stage dealer. You must also stipulate if the vendor qualifies as a small-scale industry.  
    For each permutation of plant indicator and vendor indicator, you then create a final excise duty indicator. 
    ? Customer master data 
    Similarly, you assign the same excise duty indicator to each of your customers that share the same legal excise status. 
    Again, for each permutation of plant indicator and customer indicator, you then create a final excise duty indicator. 
    ? Material master data 
    Each material is assigned a chapter ID. 
    ? Excise tax rate 
    For every chapter ID and final excise duty indicator, you maintain the rate of excise duty. 
    If your business only qualifies for partial CENVAT credit, you must customize your system accordingly.  
    Activities 
    Let us consider an example to illustrate how the system determines which rate of excise duty to apply to a material. Assume you are posting a sale of ball bearings to a customer. The system automatically determines the rate of excise duty as follows: 
    1. Looks up the customer master data to see what status you have assigned the customer.  
    Let's assume you've assigned the customer status 3. 
    2. Looks up the plant master data to see what status you have assigned the plant.  
    Similarly, your plant has status 2. 
    3. The system looks up the table under Excise Indicator for Plant and Customer to see what the final excise duty indictor is for customer status 3 and plant status 2: It is 7.  
    4. The system determines the chapter ID of the ball bearing for the plant.  
    Let's assume the chapter ID at plant for the ball bearings is 1000.01. 
    5. Finally, the system looks up the table under Excise Tax Rate to see what rate of duty applies to chapter ID 1000.01 under status 7. 
    Define Tax Code for Purchasing Documents 
    Use : In this IMG activity, you define a tax code for the purposes of calculating excise duty when you enter purchasing documents. 
    Only carry out this activity if you use condition-based excise determination. 
    Activities: Create a new tax code, and set the tax code type to V (input tax). Do not make any other settings for it. 
    Assign Tax Code to Company Codes 
    Use 
    In this IMG activity, assign the tax code for purchasing documents to the company codes where it will be used. 
    Only carry out this activity if you use condition-based excise determination. 
    Classify Condition Types 
    Use 
    In this IMG activity, you specify which condition types you use for which sort of tax. Note that this only applies to condition types that you use with the new excise determination method. 
    The system uses this information when you create a document from another one. For example, when you enter an incoming excise invoice from a purchase order, or when you create an outgoing excise invoice from a sales order, the system determines the various excise duties in the excise invoice using the information that you have entered here. 
    In addition, when you create a purchasing document, the system only uses the condition types that you enter here. 
    ? For taxes on purchases, use the condition types contained in the tax procedure. 
    ? For taxes on sales, use the condition types contained in the pricing procedures. 
    Standard settings 
    The standard system comes with sample settings for the tax calculation procedures and pricing procedures. 
    Use these settings as a basis for your own. 
    IMG > Logistics - General > Tax On Goods Movement > India > Account Determination 
    Define G/L Accounts for Taxes 
    Use 
    In this IMG activity, you specify which G/L accounts you will use to record which taxes. 
    Requirements 
    You have set up G/L accounts for each of the processing keys listed below. 
    Activities 
    Assign an account to each of the following posting keys. The accounts for VS1, VS2, and VS3 are used as clearing accounts during excise invoice verification. 
    ? VS1 (basic excise duty) 
    ? VS2 (additional excise duty) 
    ? VS3 (special excise duty) 
    ? VS5 (sales tax setoff) 
    ? MWS (central sales tax) 
    ? MW3 (local sales tax) 
    ? ESA (service tax) 
    ? ESE (service tax expense) 
    Specify Excise Accounts per Excise Transaction 
    Use 
    In this IMG activity, you specify which excise accounts (for excise duty and CENVAT) are to be posted to for the various transaction types. Enter all the accounts that are affected by each transaction type. 
    If you use subtransaction types, enter the accounts for each subtransaction type as well. 
    Activities 
    Transaction type UTLZ is used for determining accounts only while posting excise JVs and also if the payment of excise duty has to be done fortnightly. 
    The fortnightly CENVAT payment utility picks up the credit side accounts from the transaction types of GRPO, EWPO, and TR6C for determining the CENVAT and PLA accounts. There is no separate transaction type for fortnightly payment. 
    Example 
    Excise TT DC ind Account name 
    GRPO CR CENVAT clearing account 
    GRPO CR RG 23 BED account 
    GRPO DR CENVAT on hld account 
    Specify G/L Accounts per Excise Transaction 
    Use 
    In this IMG activity, you assign the excise and CENVAT accounts to G/L accounts. 
    When you come to execute the various transactions, the system determines which G/L accounts to post to by looking at the: 
    ? Excise group 
    ? Company code 
    ? Chart of accounts 
    Furthermore, if you want separate account determination settings within an excise group, you can also use sub transaction types.  
    Requirements 
    You have already: 
    ? Defined the G/L accounts 
    ? Defined the excise groups 
    ? Maintained the transaction accounts 
    Activities 
    For each excise group, assign the excise and CENVAT accounts to G/L accounts. For most businesses, one set of accounts will suffice for alltransactions. 
    Note 
    You need not remit the CENVAT to the excise department immediately, so maintain the credit account for transaction type DLFC as an excise duty interim account. This will be set off when you remit the duty. 
    Config setting needed to be done in order to get the Excise Details Screen in Material Master. 
    Even though this functionality is available in enterprise version, a small config step has to be made in Screen Sequences for Material Master. 
    Following document helps you to do this configuration. 
    ? Material Master ? Logistics General ?1. Go to IMG Define Structure of Data Screen for each?Configuring the Material master Screen Sequence. 
    2. Select your screen sequence. Usually it would be 21. Select the same and click on Data Screen in the left frame. 
    3. Once the data screens are exhibited, select data screen no. 15, ie. SSq. 21and Scrn 15, which is "Foreign Trade: Import Data". Select the same and click on Subscreens in the left frame. 
    4. Go to the last sub screen i.e. 21-15-6 - SAPLMGD1- 0001 and select the same. Click on tab view subscreen and ensure that the subscreen is blank. 
    5. Now in the last sub screen i.e. no.6 you delete SAPLMGD1 - 0001 and instead add SAPLJ1I_MATERIAL_MASTER and in the screen no. 2205. 
    6. Save the setting. 
    7. Cre

Maybe you are looking for

  • Cross Reference within external Database using XREF API

    Hi Experts,    Can we do Cross Reference within external Database using  XREF API uses JDBC to access the Oracle Database Stored Procedures in SAP PI? How to use a JNDI Data source to access the DB and how to do the Connection Pooling will be done by

  • How do U get icloud to appear in the finder

    in Mountain Lion you can save text edit files to the icloud. How do I get iCloud to appear in the sidebar in Finder. On icloud only iwork is displayed for files.  I usedropbox and it looks just like any other folder in Finder. Does iCloud behave the

  • Tax Reconciliation Report

    I've seen a few references to a "Tax Reconciliation Report" in posts on this forum.  Can someone please send me to the transaction to access this report? Thanks!

  • Have Acrobat 7.0 Pro then Downloaded Reader 9 - old docs cannot be modified now

    I can create and save docs with Acrobat as normal. When saved documents are opened, it is opened by the new reader and I lose all of the functions of Acrobat. Am I therefore forced to buy the Acrobat Update to version 9 or is there a fix so that I re

  • How do I delete large quantities of e-mails without clicking each individual one?

    I am away from my desk , sometimes for days at a time. I easily received 50+ e-mails a day, and if I don't have time to just sit and individually go through and delete each one I don't need, it builds up to crazy numbers....I am currently at over 10,