Creating a job with DBMS_SCHEDULE  from Forms?

I'm new to DBMS_SCHEDULER. I'd like to run a stored procedure from an Oracle Forms application passing some parameters from the Form to the procedure, then immediately running the procedure and after the procedure has finished dropping it from the job list. The procedure may take some time to run and the user doesn't want to wait before exiting the form. Can this be done?

Sure, no problem. The job will be dropped after termination by default (autodrop). If privileges are ok it should work. Things to think about are error reporting and retries.
regards,
Ronald
http://ronr.nl/unix-dba

Similar Messages

  • Creating backup Job with DBMS_SCHEDULER

    Hello,
    Can someone please help me out here:
    I'm using Oracle10g release 1 on windowsXP
    I'm trying to create a backup job with dbms_scheduler and it's not working.
    This is what I did:
    I created a job as follows:
    BEGIN
    dbms_scheduler.create_job (
    job_name => 'RMAN_FULL',
    job_type => 'EXCUTABLE',
    job_action => 'E:\wkdir\rman_bkp',
    enabled => TRUE,
    start_date => '24-NOV-2007 2:10:00 PM',
    repeat_interval => 'FREQ=WEEKLY',
    comments => 'Full Database Backup');
    END;
    While rman_bkp is an RMAN command but it wasn't working.
    Please where do I get it wrong?
    Kindly put me through the EXECUTABLE or should I use PL/SQL_BLOCK and how?
    Thanks.
    Regards,
    Cherish

    Hi,
    There is a guide to running external jobs using the Scheduler here
    Guide to External Jobs on 10g with dbms_scheduler e.g. scripts,batch files
    You need to use the full path to a real Windows executable and the arguments to it e.g. for a batch script you would have to do something like
    c:\windows\cmd.exe /q /c c:\myscript.bat
    There is a forum dedicated to the Scheduler here
    Scheduler
    Hope this helps,
    Ravi.

  • Creating a job with arguments

    Hi,
    This might sound really remedial, but can someone explain to me how I go about creating a job with arguments with programs. It errors out when I try to use DEFINE_PROGRAM_ARGUMENTS and when I try to use SET_JOB_ARGUMENTS_VALUE. Maybe it's the order I do it in. Any directions would be much appreciated. Thanks!
    Tony

    Hi Tony,
    Almost any internal error is an Oracle bug and you should report this to support.
    This is definitely not supposed to happen and I haven't seen this error before, do you have a test case throwing the error ?
    Using program arguments should be fairly straightforward. Here's a simple example with two varchar2 arguments
    -- create a stored procedure with two arguments
    create or replace procedure myproc (arg1 in varchar2, arg2 in varchar2)
    is BEGIN null; END;
    -- create a program with two arguments and define both
    begin
    dbms_scheduler.create_program
    program_name=>'myprog',
    program_action=>'myproc',
    program_type=>'STORED_PROCEDURE',
    number_of_arguments=>2, enabled=>FALSE
    dbms_scheduler.DEFINE_PROGRAM_ARGUMENT(
    program_name=>'myprog',
    argument_position=>1,
    argument_type=>'VARCHAR2',
    DEFAULT_VALUE=>'13');
    dbms_scheduler.DEFINE_PROGRAM_ARGUMENT(
    program_name=>'myprog',
    argument_position=>2,
    argument_type=>'VARCHAR2');
    dbms_scheduler.enable('myprog');
    end;
    -- create a job pointing to a program and set both argument values
    begin
    dbms_scheduler.create_job('myjob',program_name=>'myprog');
    dbms_scheduler.set_job_argument_value('myjob',1,'first arg');
    dbms_scheduler.set_job_argument_value('myjob',2,'second arg');
    dbms_scheduler.enable('myjob');
    end;
    Hope this helps,
    Ravi.
    -Ravi

  • How to create a interface with NTR from SAP XI?

    How to create a interface with NTR from SAP XI?

    Hi,
        What do you mean by NTR ?...
    What are the details you needed...Please be clear and more elaborative as far as possible..so that you will get straight forward answers...
    HTH
    Rajesh

  • Problem creating a datablock with columns from 2 tables...

    Hello guys, i have a problem in creating a datablock with columns from 2 different tables. I try to create the datalock manually and in the Query Data Source Type Property i choose FROM clause query, and in the query data source name property i type my sql statement with the columns i want to display.After that i place the items that the datablock will contain , manually from the painter. However , when i run the application, the datablock doesn't display the items from the database. Am i doing something wrong?
    Thanx in advance,
    Regards,
    Bill.

    Never mind Peter, I found the error. I forgot to make execute_query for the datablock, so this was the reason why the items weren't displayed to me.
    Thanx anyway a lot for your advices and your time you spent !

  • Passing where clause with spaces from forms to reports

    Hi,
    Has anybody passed where clause as lexical parameter with spaces from forms to preports..
    I have seen people mention that, we can replace the spaces with special characters and then replace it again in the before trigger report..does anyone have a working example of that??
    Thanks.

    i solved the issue..
    i had written the procedure in the before report
    trigger instead of writing it in the before parameter
    form trigger..
    it works perfecto now..
    Thanks.We had removed the spaces and used commas to delimit each item.
    So you are saying spaces are not a problem in 10g?

  • Create Outbound delivery with QCI from Sale order

    Dear experts!
    Now, I'm getting some issues about searching function to create outbound delivery with QCI from Sale order.
    Note: My sale order have two item (10, 20) and when i create outbound delivery I also want to create QCI for them.
    Help me, Please
    Best regards, Huy.

    What is QCI?

  • Create Sales Order with Reference from Quotation

    Hi All,
    Is there any bapi or function to create sales order with reference from a quotation?
    I know BDC is possible but any other methods?
    Thanks
    Dyl

    You can use - BAPI_SALESDOCUMENT_COPY.
    Prerequisite is Copy control should exist in customizaiton.
    -Alpesh

  • Create xml file with values from context

    Hi experts!
    I am trying to implement a WD application that will have some input fields, the value of those input fields will be used to create an xml file with a certain format and then sent to a certain application.
    Apart from this i want to read an xml file back from the application and then fill some other context nodes with values from the xml file.
    Is there any standard used code to do this??
    If not how can i do this???
    Thanx in advance!!!
    P.S. Points will be rewarded to all usefull answers.
    Edited by: Armin Reichert on Jun 30, 2008 6:12 PM
    Please stop this P.S. nonsense!

    Hi,
    you need to create three util class for that:-
    XMLHandler
    XMLParser
    XMLBuilder
    for example in my XML two tag item will be there e.g. Title and Organizer,and from ur WebDynpro view you need to pass value for the XML tag.
    And u need to call buildXML()function of builder class to generate XML, in that i have passed bean object to get the values of tags. you need to set the value in bean from the view ui context.
    Code for XMLBuilder:-
    Created on Apr 4, 2006
    Author-Anish
    This class is to created for having function for to build XML
    and to get EncodedXML
      and to get formated date
    package com.idb.events.util;
    import java.text.SimpleDateFormat;
    import java.util.Date;
    import com.idb.events.Event;
    public class XMLBuilder {
    This attribute represents the XML version
         private static final double VERSION_NUMBER = 1.0;
    This attribute represents the encoding
         private static final String ENCODING_TYPE = "UTF-16";
         /*Begin of Function to buildXML
    return: String
    input: Event
         public String buildXML(Event event) {
              StringBuffer xmlBuilder = new StringBuffer("<?xml version=\"");
              xmlBuilder.append(VERSION_NUMBER);
              xmlBuilder.append("\" encoding=\"");
              xmlBuilder.append(ENCODING_TYPE);
              xmlBuilder.append("\" ?>");
              xmlBuilder.append("<event>");
              xmlBuilder.append(getEncodedXML(event.getTitle(), "title"));
              xmlBuilder.append(getEncodedXML(event.getOrganizer(), "organizer"));
              xmlBuilder.append("</event>");
              return xmlBuilder.toString();
         /End of Function to buildXML/
         /*Begin of Function to get EncodedXML
    return: String
    input: String,String
         public String getEncodedXML(String xmlString, String tag) {
              StringBuffer begin = new StringBuffer("");
              if ((tag != null) || (!tag.equalsIgnoreCase("null"))) {
                   begin.append("<").append(tag).append(">");
                   begin.append("<![CDATA[");
                   begin.append(xmlString).append("]]>").append("</").append(
                        tag).append(
                        ">");
              return begin.toString();
         /End of Function to get EncodedXML/
         /*Begin of Function to get formated date
    return: String
    input: Date
         private final String formatDate(Date inputDateStr) {
              String date;
              try {
                   SimpleDateFormat simpleDateFormat =
                        new SimpleDateFormat("yyyy-MM-dd");
                   date = simpleDateFormat.format(inputDateStr);
              } catch (Exception e) {
                   return "";
              return date;
         /End of Function to get formated date/
    Code for XMLParser:-
    Created on Apr 12, 2006
    Author-Anish
    This is a parser class
    package com.idb.events.util;
    import java.io.ByteArrayInputStream;
    import java.io.IOException;
    import javax.xml.parsers.ParserConfigurationException;
    import javax.xml.parsers.SAXParser;
    import javax.xml.parsers.SAXParserFactory;
    import org.xml.sax.InputSource;
    import org.xml.sax.SAXException;
    import org.xml.sax.XMLReader;
    import com.idb.events.Event;
    import com.sap.tc.webdynpro.progmodel.api.IWDMessageManager;
    public class XMLParser {
    Enables namespace functionality in parser
         private final boolean isNameSpaceAware = true;
    Enables validation in parser
         private final boolean isValidating = true;
    The SAX parser used to parse the xml
         private SAXParser parser;
    The XML reader used by the SAX parser
         private XMLReader reader;
    This method creates the parser to parse the user details xml.
         private void createParser()
              throws SAXException, ParserConfigurationException {
              // Create a JAXP SAXParserFactory and configure it
              SAXParserFactory saxFactory = SAXParserFactory.newInstance();
              saxFactory.setNamespaceAware(isNameSpaceAware);
              saxFactory.setValidating(isValidating);
              // Create a JAXP SAXParser
              parser = saxFactory.newSAXParser();
              // Get the encapsulated SAX XMLReader
              reader = parser.getXMLReader();
              // Set the ErrorHandler
    This method is used to collect the user details.
         public Event getEvent(
              String newsXML,
              XMLHandler xmlHandler,
              IWDMessageManager mgr)
              throws SAXException, ParserConfigurationException, IOException {
              //create the parser, if not already done
              if (parser == null) {
                   this.createParser();
              //set the parser handler to extract the
              reader.setErrorHandler(xmlHandler);
              reader.setContentHandler(xmlHandler);
              InputSource source =
                   new InputSource(new ByteArrayInputStream(newsXML.getBytes()));
              reader.parse(source);
              //return the results of the parse           
              return xmlHandler.getEvent(mgr);
    Code for XMLHandler:-
    Created on Apr 12, 2006
    Author-Anish
    This is a parser class
    package com.idb.events.util;
    import java.io.ByteArrayInputStream;
    import java.io.IOException;
    import javax.xml.parsers.ParserConfigurationException;
    import javax.xml.parsers.SAXParser;
    import javax.xml.parsers.SAXParserFactory;
    import org.xml.sax.InputSource;
    import org.xml.sax.SAXException;
    import org.xml.sax.XMLReader;
    import com.idb.events.Event;
    Created on Apr 12, 2006
    Author-Anish
    *This handler class is created to have constant value for variables and function for get events,
        character values for bean variable,
        parsing thr date ......etc
    package com.idb.events.util;
    import java.sql.Timestamp;
    import java.text.SimpleDateFormat;
    import java.util.Date;
    import java.util.Locale;
    import org.xml.sax.Attributes;
    import org.xml.sax.SAXException;
    import org.xml.sax.SAXParseException;
    import org.xml.sax.helpers.DefaultHandler;
    import java.util.*;
    import com.idb.events.Event;
    import com.sap.tc.webdynpro.progmodel.api.IWDMessageManager;
    public class XMLHandler extends DefaultHandler {
         private static final String TITLE = "title";
         private static final String ORGANIZER = "organizer";
         IWDMessageManager manager;
         private Event events;
         private String tagName;
         public void setManager(IWDMessageManager mgr) {
              manager = mgr;
    This function is created to get events
         public Event getEvent(IWDMessageManager mgr) {
              manager = mgr;
              return this.events;
    This function is created to get character for setting values through event's bean setter method
         public void characters(char[] charArray, int startVal, int length)
              throws SAXException {
              String tagValue = new String(charArray, startVal, length);
              if (TITLE.equals(this.tagName)) {
                   this.events.setTitle(tagValue);
              if (ORGANIZER.equals(this.tagName)) {
                   String orgName = tagValue;
                   try {
                        orgName = getOrgName(orgName);
                   } catch (Exception ex) {
                   this.events.setOrganizer(orgName);
    This function is created to parse boolean.
         private final boolean parseBoolean(String inputBooleanStr) {
              boolean b;
              if (inputBooleanStr.equals("true")) {
                   b = true;
              } else {
                   b = false;
              return b;
    This function is used to call the super constructor.
         public void endElement(String uri, String localName, String qName)
              throws SAXException {
              super.endElement(uri, localName, qName);
         /* (non-Javadoc)
    @see org.xml.sax.ErrorHandler#fatalError(org.xml.sax.SAXParseException)
    This function is used to call the super constructor.
         public void fatalError(SAXParseException e) throws SAXException {
              super.fatalError(e);
    This function is created to set the elements base on the tag name.
         public void startElement(
              String uri,
              String localName,
              String qName,
              Attributes attributes)
              throws SAXException {
              this.tagName = localName;
              if (ROOT.equals(tagName)) {
                   this.events = new Event();
         public static void main(String a[]) {
              String cntry = "Nigeria";
              XMLHandler xml = new XMLHandler();
              ArrayList engList = new ArrayList();
              engList = xml.getCountries();
              ArrayList arList = xml.getArabicCountries();
              int engIndex = engList.indexOf(cntry);
              System.out.println("engIndex  :: " + engIndex);
              String arCntryName = (String) arList.get(engIndex);
              System.out.println(
                   ">>>>>>>>>>>>>>>>>>>>" + xml.getArabicCountryName(cntry));
    Hope that may help you.
    If need any help , you are most welcome.
    Regards,
    Deepak

  • Make readonly pdf with data from forms

    Hi there,
    I really appriciate any help on this issue...
    I am not able to make read only file with data from the fillable pdf forms.
    Requirement is my client need some form where they can enter some data and make a read only file from those forms and send them to their clients.
    So I made fillable form in acrobat and send them, they will use reader to fill up the form but I dont know how to save those file with data so it will become just a document.
    is there any way ?
    Thanks....
    -M.

    I am soory I am slow...
    I made form file in acrobat... but after that my client is going to use reader and enter data to this forms and saves it. and then my client is going to send them to their customers.
    So I shall use reader code and make all fields read only right ?
    In this case I have to make a button and run this code on submit ?
    Thanks.
    -M.

  • Creating a .fmb with out using form builder

    Hi
    I am having a template to create form modules in the forms builder, for the most of the forms I need not change any
    of the PL/SQL code provided by the template. (All my business logic and information regading items in object navigator resides in the database) The only thing that I need to do is creation of fields in object navigator and provide the
    sub class information for it. So I felt that It's better to have a tool which generats the requried .fmb file if the all
    field details are stored in a table.
    While expermenting on that we came to know that there are some functions provided by Oracle Developer6.0 that creates all
    objects in the object navigator using a C program. These programs requires some header file, most of which are provided by
    Oracle developer6.0 and some are missing.
    Pls. let me know if any one experimented
    Thanx & Regards
    ([email protected])

    u have 2 options
    create  amterial master with price control indicator standrd and maintin the price of mateirial in account view now create a po with free line itme and do the gr now in this case sytem will create a accounting document and it post the amount to the stock account Dr.
    and no gr/ir  account hit will happen as it is a free itme so there is no question of paying any amount to vendor
    u can also use movement type 511 to do the gr for that free good
    option 2  create  am material with moving average price in this case if u do the gr then  system will not create any account document but point to note here is the price will become then zero in material master as map means latest price is updated in matreial master

  • Create SQL Job with Invoke-Sqlcmd

    I'm trying to run a set of .sql files, i didn't know how to pass a common variable to all, so i've started running the statements directly in ps.  One of these creates a job but i'm running into all of the errors due to the special characters and the
    variables, can someone help?
    $Client = "C0212"
    $Instance = "SQL03\"+$Client
    $sqlscript3 = "
    --NEED TO CHANGE THE LOG LOCATION BELOW
    USE [msdb]
    GO
    /****** Object:  Job [DatabaseBackup - USER_DATABASES - FULL]    Script Date: 11/15/2013 8:40:20 AM ******/
    BEGIN TRANSACTION
    DECLARE @ReturnCode INT
    SELECT @ReturnCode = 0
    /****** Object:  JobCategory [Database Maintenance]    Script Date: 11/15/2013 8:40:20 AM ******/
    IF NOT EXISTS (SELECT name FROM msdb.dbo.syscategories WHERE name=N''Database Maintenance'' AND category_class=1)
    BEGIN
    EXEC @ReturnCode = msdb.dbo.sp_add_category @class=N''JOB'', @type=N''LOCAL'', @name=N''Database Maintenance''
    IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollback
    END
    DECLARE @jobId BINARY(16)
    EXEC @ReturnCode =  msdb.dbo.sp_add_job @job_name=N''DatabaseBackup - USER_DATABASES - FULL'', 
    @enabled=1, 
    @notify_level_eventlog=2, 
    @notify_level_email=0, 
    @notify_level_netsend=0, 
    @notify_level_page=0, 
    @delete_level=0, 
    @description=N''Source: http://ola.hallengren.com'', 
    @category_name=N''Database Maintenance'', 
    @owner_login_name=N''sa'', @job_id = @jobId OUTPUT
    IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollback
    /****** Object:  Step [DatabaseBackup - USER_DATABASES - FULL]    Script Date: 11/15/2013 8:40:20 AM ******/
    EXEC @ReturnCode = msdb.dbo.sp_add_jobstep @job_id=@jobId, @step_name=N''DatabaseBackup - USER_DATABASES - FULL'', 
    @step_id=1, 
    @cmdexec_success_code=0, 
    @on_success_action=1, 
    @on_success_step_id=0, 
    @on_fail_action=2, 
    @on_fail_step_id=0, 
    @retry_attempts=0, 
    @retry_interval=0, 
    @os_run_priority=0, @subsystem=N''CmdExec'', 
    @command=N''sqlcmd -E -S `$(ESCAPE_SQUOTE(SRVR)) -d DBA -Q `"EXECUTE [dbo].[DatabaseBackup] @Databases = ''''USER_DATABASES'''', @Directory = N''''T:\SQLsafe Backups\SQL Native Backup'''', @BackupType = ''''FULL'''',
    @Verify = ''''Y'''', @CleanupTime = 170, @CheckSum = ''''Y'''', @LogToTable = ''''Y''''`" -b'', 
    --NEED TO CHANGE THE LOG LOCATION BELOW
    @output_file_name=N''C:\Program Files\Microsoft SQL Server\MSSQL11.$Client\MSSQL\LOG\DatabaseBackup_`$(ESCAPE_SQUOTE(JOBID))_`$(ESCAPE_SQUOTE(STEPID))_`$(ESCAPE_SQUOTE(STRTDT))_`$(ESCAPE_SQUOTE(STRTTM)).txt'', 
    @flags=0
    IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollback
    EXEC @ReturnCode = msdb.dbo.sp_update_job @job_id = @jobId, @start_step_id = 1
    IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollback
    EXEC @ReturnCode = msdb.dbo.sp_add_jobschedule @job_id=@jobId, @name=N''Saturday 4am'', 
    @enabled=1, 
    @freq_type=8, 
    @freq_interval=64, 
    @freq_subday_type=1, 
    @freq_subday_interval=0, 
    @freq_relative_interval=0, 
    @freq_recurrence_factor=1, 
    @active_start_date=20131109, 
    @active_end_date=99991231, 
    @active_start_time=40000, 
    @active_end_time=235959, 
    @schedule_uid=N''5b3c3fcf-28dc-4f4c-95ce-a624667ee378''
    IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollback
    EXEC @ReturnCode = msdb.dbo.sp_add_jobserver @job_id = @jobId, @server_name = N''(local)''
    IF (@@ERROR <> 0 OR @ReturnCode <> 0) GOTO QuitWithRollback
    COMMIT TRANSACTION
    GOTO EndSave
    QuitWithRollback:
        IF (@@TRANCOUNT > 0) ROLLBACK TRANSACTION
    EndSave:
    GO"
    Invoke-Sqlcmd –ServerInstance $Instance –Database msdb –Query $sqlscript3 -QueryTimeout 300

    So, if I try this:
    $Client = "C0212"
    Invoke-Sqlcmd -InputFile "C:\NewInstanceScripts\PSNI -3 - Create Full Backup job for ALL User Databases.sql" -Variable $Client
    and in my .sql file that line that contains the variable looks like this:
    @output_file_name=N'C:\Program Files\Microsoft SQL Server\MSSQL11.`$(Client)\MSSQL\LOG\DatabaseBackup_$(ESCAPE_SQUOTE(JOBID))_$(ESCAPE_SQUOTE(STEPID))_$(ESCAPE_SQUOTE(STRTDT))_$(ESCAPE_SQUOTE(STRTTM)).txt',
    I get the error: 
    Invoke-Sqlcmd : The format used to define the new variable for Invoke-Sqlcmd cmdlet is invalid. Please use the 'var=value' format for defining a new variable.
    If i try like this:
    Set @Client = "C0212"
    Invoke-Sqlcmd -InputFile "C:\NewInstanceScripts\PSNI -3 - Create Full Backup job for ALL User Databases.sql" -Variable @Client
    Line in .sql file like this:
    @output_file_name=N'C:\Program Files\Microsoft SQL Server\MSSQL11.@Client\MSSQL\LOG\DatabaseBackup_$(ESCAPE_SQUOTE(JOBID))_$(ESCAPE_SQUOTE(STEPID))_$(ESCAPE_SQUOTE(STRTDT))_$(ESCAPE_SQUOTE(STRTTM)).txt',
    I get the error: Set-Variable : A positional parameter cannot be found that accepts argument '2'.

  • To populate dynamically created int table with data from other table

    Hi everybody,
    I have already created an internal table dynamically, but now want to populate it with data from another IT depending on the plant name.
    My dynamic int table contains fields with plant name like '8001' ,'8002' and so on.
    no I want to read data from the other table and depending on bwkey which contains similar data like plant name , want to append to this new dynamic int table through read key statement.
    I cannot reference the field name hard coded as it does not allow field symbol reference to be hard coded.
    Pls help.

    Hi,
    Check the code below:
    REPORT  ztestdyn.
    TYPE-POOLS : slis.
    TABLES: yyle0003.
    DATA:
      g_exit    TYPE c,
      g_save    VALUE 'A',               "For parameter I_SAVE
      g_repid   LIKE sy-repid,           "For program name
      g_variant TYPE disvariant.         "For parameter IS_VARIANT
    *Tables
      DATA: d_ref TYPE REF TO data,
            d_ref1 TYPE REF TO data,
            i_alv_cat1 TYPE TABLE OF lvc_s_fcat,
            ls_alv_cat1 LIKE LINE OF i_alv_cat1.
      DATA: BEGIN OF total_tab OCCURS 0 ,
            tknum TYPE yyle0003-tknum,
            quantity TYPE p,  "yyle0003-QUANTITY,
            END OF total_tab.
      DATA: BEGIN OF g_scandata_tab OCCURS 0.
              INCLUDE STRUCTURE yyle0003.
      DATA: END OF g_scandata_tab.
      DATA: g_yyle0003_tab LIKE yyle0003 OCCURS 0 WITH HEADER LINE.
      DATA: g_itab1 TYPE TABLE OF yyle0003.
      DATA: wa_itab1 LIKE g_scandata_tab.
      TYPES: BEGIN OF itab2,
             tknum TYPE yyle0003-tknum,
             vhilm TYPE yyle0003-vhilm,
             quantity TYPE p,
             END OF itab2.
      DATA: g_itab3 TYPE TABLE OF itab2.
      DATA: wa_itab3 TYPE itab2.
      DATA: g_itab5 TYPE TABLE OF itab2.
      DATA: wa_itab5 TYPE itab2.
      DATA: g_itab4 TYPE TABLE OF itab2.
      DATA: wa_itab4 TYPE itab2.
      DATA: gv_wa TYPE REF TO data.
      DATA : wa_tab TYPE itab2.
      DATA: BEGIN OF itab6 OCCURS 0,
             vhilm TYPE yyle0003-vhilm,
             quantity TYPE p,
             END OF itab6.
    ******************Start of Internal Table Definition *******************
      DATA:
            g_custom_container_0100 TYPE REF TO cl_gui_custom_container,
            g_alv_grid_0100    TYPE REF TO cl_gui_alv_grid,
            g_container_0100   TYPE scrfname VALUE 'LIST',
            g_mylayout         TYPE lvc_s_layo,
            ok_code            LIKE sy-ucomm.
      FIELD-SYMBOLS :<f_fs> TYPE table,
                     <f_fs11> TYPE table,
                     <f_fs1> TYPE table,
                     <f_fs3> TYPE ANY,
                     <f_fs4> TYPE ANY,
                     <f_field> TYPE ANY,
                     <f_fs5> TYPE ANY.
      FIELD-SYMBOLS: <fs_wa> TYPE ANY.
      DATA: l_var TYPE i,
            l_i   TYPE i.
      DATA: l_var1 TYPE char20,
            l_var2 TYPE char20.
    DATA: l_TOTAL TYPE I,
          L_FILL TYPE i,
          L_TOT  TYPE I.
    DATA: l_int TYPE i,
           l_sum TYPE i.
    FIELD-SYMBOLS: <f_fs2> TYPE  itab2, "
                     <f_fs6> TYPE ANY,
                     <f_fs7> TYPE ANY.
      DATA: l_var3 TYPE char15.
      DATA: l_quant TYPE p.
    FIELD-SYMBOLS: <f_fs8> LIKE itab6, "
                     <f_fs9> TYPE ANY,
                     <f_fs10> TYPE ANY.
    FIELD-SYMBOLS : <f_fs12> TYPE ANY,
                      <f_fs13> TYPE ANY.
      SORT g_scandata_tab BY tknum vhilm.
      LOOP AT g_scandata_tab INTO wa_itab1.
        MOVE-CORRESPONDING wa_itab1 TO wa_itab3.
        APPEND wa_itab3 TO g_itab3.
      ENDLOOP.
      LOOP AT g_itab3 INTO wa_itab3.
        COLLECT wa_itab3 INTO g_itab4.
      ENDLOOP.
      LOOP AT g_itab4 INTO wa_itab4.
        MOVE-CORRESPONDING wa_itab4 TO wa_itab5.
        MOVE-CORRESPONDING wa_itab4 TO itab6.
        APPEND wa_itab5 TO g_itab5.
        COLLECT itab6.
      ENDLOOP.
      CLEAR wa_itab3.
      SORT g_itab4 BY tknum vhilm.
      DELETE ADJACENT DUPLICATES FROM g_itab4 COMPARING vhilm.
      DESCRIBE TABLE g_itab4 LINES l_var.
      l_i = '2'.
      ls_alv_cat1-fieldname = 'TKNUM'.
      ls_alv_cat1-col_pos = 1.
      ls_alv_cat1-coltext ='ShipmentNo.'.
      APPEND ls_alv_cat1 TO i_alv_cat1.
      DATA: l_var4(10) TYPE c,
            l_var5(10) TYPE c,
            l_fieldname(20) TYPE c..
      LOOP AT g_itab4 INTO wa_itab4.
        IF l_var >= 1.
          CONDENSE wa_itab4-vhilm NO-GAPS.
          ls_alv_cat1-fieldname = wa_itab4-vhilm. "l_fieldname.
          ls_alv_cat1-col_pos = l_i.
          ls_alv_cat1-coltext = wa_itab4-vhilm.
          ls_alv_cat1-do_sum  ='X'.
          APPEND ls_alv_cat1 TO i_alv_cat1.
          CLEAR : ls_alv_cat1, l_fieldname.
          l_i = l_i + 1.
        ENDIF.
        AT LAST.
          ls_alv_cat1-fieldname = 'TOTAL'. "l_fieldname.
          ls_alv_cat1-col_pos = l_i.
          ls_alv_cat1-coltext = 'TOTAL'.
          ls_alv_cat1-do_sum  ='X'.
          APPEND ls_alv_cat1 TO i_alv_cat1.
          CLEAR : ls_alv_cat1, l_fieldname.
        ENDAT.
        SORT i_alv_cat1 BY fieldname.
        DELETE ADJACENT DUPLICATES FROM i_alv_cat1.
      ENDLOOP.
      SORT i_alv_cat1 BY col_pos.
      CALL METHOD cl_alv_table_create=>create_dynamic_table
        EXPORTING
          it_fieldcatalog = i_alv_cat1
        IMPORTING
          ep_table = d_ref.
      ASSIGN d_ref->* TO <f_fs>.
      CREATE DATA gv_wa LIKE LINE OF <f_fs>.
      ASSIGN gv_wa->* TO <fs_wa>.
      DELETE ADJACENT DUPLICATES FROM <f_fs> COMPARING ALL FIELDS.
        LOOP AT itab6.
        CLEAR wa_itab5.
        wa_itab5-tknum = 'Total'.
        MOVE-CORRESPONDING itab6 TO wa_itab5.
        APPEND wa_itab5 TO g_itab5.
        CLEAR wa_itab5.
      ENDLOOP.
         DESCRIBE TABLE g_itab5 LINES L_TOT.
           LOOP AT TOTAL_TAB.
          L_TOTAL = L_TOTAL + total_tab-quantity.
         ENDLOOP.
      LOOP AT g_final ASSIGNING <f_fs2>.
        ASSIGN COMPONENT 'TKNUM' OF STRUCTURE <f_fs2> TO <f_fs6>.
        ASSIGN COMPONENT 'TKNUM' OF STRUCTURE <fs_wa> TO <f_fs7>.
        <f_fs7> = <f_fs6>.
        CONDENSE <f_fs2>-vhilm NO-GAPS.
        ASSIGN COMPONENT 'VHILM' OF STRUCTURE <f_fs2> TO <f_fs3>.
        ASSIGN COMPONENT 3 OF STRUCTURE <f_fs2> TO <f_fs4>.
        MOVE <f_fs3> TO l_var1.
        ASSIGN COMPONENT l_var1 OF STRUCTURE <fs_wa> TO <f_fs5>.
        <f_fs5> =  <f_fs4>.
        CLEAR total_tab-quantity.
        READ TABLE total_tab WITH KEY tknum = <f_fs6>.
        IF sy-subrc = 0.
          ASSIGN total_tab-quantity TO <f_fs12>.
          ASSIGN COMPONENT 'TOTAL' OF STRUCTURE <fs_wa> TO <f_fs13>.
          <f_fs13> = <f_fs12>.
        ENDIF.
        L_FILL = L_FILL + 1.
        IF L_FILL = L_TOT.
         ASSIGN L_TOTAL TO <f_fs12>.
          ASSIGN COMPONENT 'TOTAL' OF STRUCTURE <fs_wa> TO <f_fs13>.
          <f_fs13> = <f_fs12>.
        ENDIF.
        AT END OF <f_fs2>-tknum.
          APPEND <fs_wa> TO <f_fs>.
          CLEAR  <fs_wa>.
        ENDAT.
      ENDLOOP.
      CLEAR: <f_fs6>,
              <f_fs7>.
      CLEAR <fs_wa>.
    CALL SCREEN 0100.
    *&      Module  STATUS_0100  OUTPUT
          text
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'ZVKS'.
      SET TITLEBAR 'ZVKS'.
      CHECK sy-ucomm IS INITIAL.
      SORT g_scandata_tab BY tknum vhilm.
      CREATE OBJECT g_custom_container_0100
             EXPORTING container_name = g_container_0100
             EXCEPTIONS
               cntl_error = 1
               cntl_system_error = 2
               create_error = 3
               lifetime_error = 4
               lifetime_dynpro_dynpro_link = 5.
      CREATE OBJECT g_alv_grid_0100
             EXPORTING i_parent = g_custom_container_0100.
      g_mylayout-grid_title = 'Display Scanning data'.
      CALL METHOD g_alv_grid_0100->set_table_for_first_display
        CHANGING
          it_outtab                     = <f_fs>
          it_fieldcatalog               = i_alv_cat1
                    EXCEPTIONS
                      invalid_parameter_combination = 1
                      program_error                 = 2
                      too_many_lines                = 3
                      OTHERS                        = 4.
      IF sy-subrc <> 0.
                  MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    Regards
    Kannaiah

  • How to use parameter forms with run_report_object from Forms?

    Hi,
    I would like to run a rep report from Forms 9i. I have 9iAS R2 with a rep_<maschine_name> report server.
    Untill now I run reports with run_report_object and then used web_show_doc to display the PDF output. Now I have to display a parameter form first and only then can I run the report. Currently I am a bit lost and do not know how to do this? Could some one please point me to some examples or docs?
    Thanks in advance.

    [   Forms Reports Integration whitepaper  9i/10g ]
    see links below
    [    All Docs for all versions    ]
    http://otn.oracle.com/documentation/reports.html
    [     Publishing reports to web  - 10G  ]
    http://download.oracle.com/docs/html/B10314_01/toc.htm (html)
    http://download.oracle.com/docs/pdf/B10314_01.pdf (pdf)
    [   Building reports  - 10G ]
    http://download.oracle.com/docs/pdf/B10602_01.pdf (pdf)
    http://download.oracle.com/docs/html/B10602_01/toc.htm (html)
    [   Forms Reports Integration whitepaper  9i/10g ]
    9i - http://otn.oracle.com/products/forms/pdf/frm9isrw9i.pdf
    10g - http://www.oracle.com/technology/products/forms/pdf/10g/frm10gsrw10g.pdf
    http://www.oracle.com/technology/products/forms/techlisting10g.html
    ---------------------------------------------------------------------------------

  • Could not create a Job with BI Scheduler

    Hi all, we are attempting to create a job but when it runs we receive the following error:
    +++ ThreadID: 564 : 2007-06-11 10:10:08.000
    Global Error: [nQSError: 77006] Oracle BI Presentation Server Error: Authentication failed.
    Error Codes: WKY9UVRD:
    Authentication Failure.
    Error Codes: IHVF6OM7:OPR4ONWY:U9IM8TAC
    Odbc driver returned an error (SQLDriverConnectW).
    State: 08004. Code: 10018. [NQODBC] [SQL_STATE: 08004] [nQSError: 10018] Access for the requested connection is refused.
    [nQSError: 43001] Authentication failed for Administrator in repository Star: invalid user/password. (08004)
    +++ ThreadID: 564 : 2007-06-11 10:10:08.000
    ...Trying main loop again.
    +++ ThreadID: 564 : 2007-06-11 10:10:08.000
    ... Sleeping for 9 seconds.
    +++ ThreadID: 564 : 2007-06-11 10:10:17.000
    Global Error: [nQSError: 77006] Oracle BI Presentation Server Error: Authentication failed.
    Error Codes: WKY9UVRD:
    Authentication Failure.
    Error Codes: IHVF6OM7:OPR4ONWY:U9IM8TAC
    Odbc driver returned an error (SQLDriverConnectW).
    State: 08004. Code: 10018. [NQODBC] [SQL_STATE: 08004] [nQSError: 10018] Access for the requested connection is refused.
    [nQSError: 43001] Authentication failed for Administrator in repository Star: invalid user/password. (08004)
    +++ ThreadID: 564 : 2007-06-11 10:10:17.000
    Terminal Error: Exceeded number of retries.
    +++ ThreadID: 564 : 2007-06-11 10:10:08.000
    Global Error: [nQSError: 77006] Oracle BI Presentation Server Error: Authentication failed.
    Error Codes: WKY9UVRD:
    Authentication Failure.
    Error Codes: IHVF6OM7:OPR4ONWY:U9IM8TAC
    Odbc driver returned an error (SQLDriverConnectW).
    State: 08004. Code: 10018. [NQODBC] [SQL_STATE: 08004] [nQSError: 10018] Access for the requested connection is refused.
    [nQSError: 43001] Authentication failed for Administrator in repository Star: invalid user/password. (08004)
    +++ ThreadID: 564 : 2007-06-11 10:10:08.000
    ...Trying main loop again.
    +++ ThreadID: 564 : 2007-06-11 10:10:08.000
    ... Sleeping for 9 seconds.
    +++ ThreadID: 564 : 2007-06-11 10:10:17.000
    Global Error: [nQSError: 77006] Oracle BI Presentation Server Error: Authentication failed.
    Error Codes: WKY9UVRD:
    Authentication Failure.
    Error Codes: IHVF6OM7:OPR4ONWY:U9IM8TAC
    Odbc driver returned an error (SQLDriverConnectW).
    State: 08004. Code: 10018. [NQODBC] [SQL_STATE: 08004] [nQSError: 10018] Access for the requested connection is refused.
    [nQSError: 43001] Authentication failed for Administrator in repository Star: invalid user/password. (08004)
    +++ ThreadID: 564 : 2007-06-11 10:10:17.000
    Terminal Error: Exceeded number of retries.
    Any help?
    Thank you.,
    Regards.

    I have the same Problem :-(
    In adittion I have an authentivication with LDAP.
    If I create the user in the Repository I can connect to it but I receive the following Problem:
    +++ ThreadID: 82c : 2007-10-10 12:17:40.000
    [nQSError: 77006] Oracle BI Presentation Server Error: A fatal error occurred while processing the request. The server responded with: Odbc driver returned an error (SQLDriverConnectW).
    Error Codes: OPR4ONWY:U9IM8TAC
    State: 08004. Code: 10018. [NQODBC] [SQL_STATE: 08004] [nQSError: 10018] Access for the requested connection is refused.
    [nQSError: 13024] Successful completion of init block 'IB_LDAP' is required. (08004)
    If drop the User the Repository and use an LDAP User, I receive the following:
    +++ ThreadID: 38c : 2007-10-10 13:13:21.000
    [nQSError: 77006] Oracle BI Presentation Server Error: A fatal error occurred while processing the request. The server responded with: Authentication Failure.
    Error Codes: IHVF6OM7:OPR4ONWY:U9IM8TAC
    Odbc driver returned an error (SQLDriverConnectW).
    State: 08004. Code: 10018. [NQODBC] [SQL_STATE: 08004] [nQSError: 10018] Access for the requested connection is refused.
    [nQSError: 43001] Authentication failed for ExtOV01 in repository Star: invalid user/password. (08004)
    Regards,
    Stefan Hess

Maybe you are looking for

  • Is there a way to put links within documents in Pages

    Is there a way to put a link on the first page of a Pages document that would take you to a certain location within the same document or to another document?

  • Lenovo B575 Windows 7 Blue Screen BCCode 9f

    Hello recently my Lenovo B575 has been shutting down by itself lately. But only thing that they gave me information is about this  Problem signature: Problem Event Name: BlueScreen OS Version: 6.1.7601.2.1.0.768.3 Locale ID: 1033 Additional informati

  • Driver for HP psc 2510 and OSX 10.4.10?

    Apple sent an upgrade for my OS 10.4, recommending download, so I did. Subsequently, when I tried to print something from e-mail, a message appeared to the effect that the computer could not recognize the driver. My 2510 HP all in one came up on an a

  • For Each Loop for XML Task

    Hello Everyone, Please assist with a step by step guide on how to setup a For Each Loop for XML Task I'm trying to convert XML to XSLT I have tried more than 10 times and i just do not know what i am doing wrong - no error, my package just runs for a

  • Iphoto thumbnails

    iphoto thumbnails all the same...click on thumbnail...see a photo not same image as thumb...and upside down. I want to delete every picture and restart...how?