Creating a Stand By DataBase for Production

Hi,
One more question How to do create a Standy Database for the Production
Database.
Can one tell the procedure to create a Standy By database ??
Thanks,
Pavan Kumar

That's documented in the Data Guard Concepts and Administration manual. Chapters 3 & 4 cover creating physical and logical standby databases.
http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/partpage1.htm
Of course, since you didn't mention what version of Oracle you're using, I picked the 10.2 documentation to link to. You can find other manuals online at http://tahiti.oracle.com if you're using a different version.
Justin

Similar Messages

  • Creating a RAC standby database for a single instance database

    Dear All,
    I have a task of migrating a 500GB single instance database to a two-node RAC database with a little downtime at hand. My migration strategy is to:
    1) Create a RAC physical standby for the Single Instance database
    2) Switchover to RAC standby.
    Primary and Standby OS and DB configurations:
    OS: Windows Server EE 2003 (64-bit)
    DB: Oracle 10g Database Release 2 (10.2.0.4)
    Oracle 10g Clusterware Release 2 (10.2.0.4)
    To create a RAC standby, I will:
    a) Install Clusterware (10.2.0.1)
    b) Install Database (10.2.0.1)
    c) Patch both Clusterware and Database (10.2.0.4)
    d) Create ASM instance for both the nodes (+ASM1 & +ASM2)
    e) create standby controlfile on primary
    f) Move standby controlfile, RMAN backup of primary, pfile, listener.ora, tnsnames.ora, password file to standby host-1
    g) make necessary changes to the pfile on standby host-1 like cluster_database, instance_name, thread, ...
    h) mount standby database and restore backup
    Kindly validate my steps and if there already exists such a document then please do provide me with a link.
    Regards

    Please refer to MAA whitet paper :
    [http://www.oracle.com/technology/deploy/availability/pdf/MAA_WP_10g_RACPrimaryRACPhysicalStandby.pdf]
    [MAA website|http://www.oracle.com/technology/deploy/availability/htdocs/maa.htm]

  • Can I use data guard to create a RAC standby database for a non RAC primary

    Hi,
    we need to RAC our production database but the normal methods will mean a long outage. It is possible to create a standby as a single node RAC database and when ready do a graceful failover to the standby database and open it for business. The next step would be to create another RAC node from this on the original server.
    servers are already cluster aware, using ASM etc
    Oracle 10.2

    Yes, you will be able to setup RAC stnadby for a non-RAC Primary. For primary it just needs a available destination for redo shipping it doesn't matter whether it's RAC enabled or not. And ofcourse you are using 10.2 anyway only one node will be running MRP and that is too in standby mount mode.
    However since you have are using You may follow below sequence.
    1. Setup a new standby as RAC enabled.
    2. Perform a switchover.
    3. Shutdown the Old primary (which is standby now).
    4. Install CRS and RDBMS on the old primary and it's new node.
    5. Modify the cluster_database=TRUE and cluster_database_instances=<required number of instances>.
        With above modification mount the standby database in standby mode and start MRP.
    6. Introduce the database and instances to the OCR using SRVCTL add command.
    7. Once you your database is synchronized with Primary do a switchover.
    9. Now you can repeat step 3 to 6 on the other site too.   <- if you need your secondary site to be RAC enabled too
    10. Finally both the sites should be RAC enabled.
    Hope this is helpful!!!
    Thanks,
    Asif Haliyal

  • I need to create a one-time database for our Christmas list and print labels.  Is there a free Mavericks-compatible download that will do this?

    Since I will only use it once a year, I am looking for a free download that will allow me to create a small (80-100 names and addresses) database AND print out mailing labels from that list.  I used to have FileMaker Pro 6 and it worked beautifully.  However, it is not compatible with my new operating system - Mavericks - and I am not willing to spend $180 for the necessary upgrade to FileMaker Pro 12, especially since I will only be using it once a year.  I have Numbers, which works for my other databases, but it is not designed to print labels.  Help!

    You could create a Christmas list group in Contacts, and use the File > Print facility in Contacts that supports Avery Mail Labels in the layout tab. Simpler and cheaper than learning a database.

  • Open database for product specifications

    Hi forum
    I was wondering if there is an open database available with device specifications for Cisco appliances?
    I'm currently working on a project where I'm collecting as much information about our network appliances  as possible.
    So, if I could get my hands on a database where I can look up specifications or an API of some kind, that would make my job a lot easier.
    Kind regards
    Thomas

    Hi Harpal,
    You can have data source as source of your transformation for Open Hub Destination.
    Just check if your data source is active in the system or not.
    Regards,
    Durgesh.

  • How to create new view in WebUI for Product

    Hello,
    We want to create a new view (Z) based on the fields of the BOL object and show it in the WebUI. Is there any step by step explanation how to do it?
    Thanks in advance,
    Sergey Kozyrev

    Hi Sijo,
    The following would be the steps to integrate a z component to a std component:
    1. Create the view that you would like to integrate with the standard component in a separate z component and design its configuration
    2. Add the view in the Component Interface of runtime repository editor. Executing the z component directly must display the view without any errors
    3. In the standard component, add the z component in Component Usage of runtime repository editor
    4. In the standard component, add the custom component view in Viewsets->Viewarea->View (overview page view) of runtime repository editor
    5. Now the view would be there in the available views of the overview page. Move it to the list of visible view on the right side
    6. Execute the std component through Web UI and the view should appear
    7. Make sure the Web UI uses the same role config key as that of the overview page in which you have added the view

  • Rman back up on stand by database

    Hi all,
    I created one stand by database. log shipping is not in place yet.
    I manually copied rman files and archive files from the primary database and copied to standby.
    Whenever I was trying to restore the database. it gives me below error. please see and let me know if I am doing it wrong.
    Recovery Manager: Release 10.2.0.3.0 - Production on Tue Sep 28 11:20:16 2010
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    connected to target database: WTFNL (DBID=3371173325, not open)
    RMAN>
    using target database control file instead of recovery catalog
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of configure command at 09/28/2010 11:20:16
    RMAN-05021: this configuration cannot be changed for a BACKUP or STANDBY control file
    RMAN>
    Recovery Manager complete.
    RAMAN backup completed.
    Tue Sep 28 11:20:16 EST 2010
    Thanks

    Make sure from where you are giving commands...
    Oracle Error :: RMAN-05021
    this configuration cannot be changed for a BACKUP or STANDBY control file
    Cause
    The user attempted to modify the configuration which cannot be changed for a BACKUP or STANDBY control file while the mounted control file was either BACKUP or STANDBY. The following configurations can be changed only when connected to primary database instance that has CURRENT/CREATED control file type mounted: CONFIGURE RETENTION POLICY CONFIGURE EXCLUDE CONFIGURE ENCRYPTION CONFIGURE DB_UNIQUE_NAME
    Action
    Connect to primary database instance and execute the command.

  • IPC Pricing routine for Product Family Margin in Quotation is not working

    Hi,
    I am working on the IPC Pricing Routine to calculate Item's Product Family Margin in the Quotation. 
    Process followed:
    Step 1:  Created a Group condition ZPFM for Product Family Margin and assigned to the pricing procedure. 
    Step 2:  Created a Value Routine to determine ZPFM's Condition Rate and Condition Value.
    Logic: 
              1.  Collect (Sum Of)  the Cost (ZSVC) and the Subtotal 3 of the items which are in same Material Group.
               2.  Assign the ZPFM Condition Value = Sum of Subtotal 3 - Cost.
    Issue:  The condition value for ZPFM is calculating correct for all line items except the last item.  I am getting some junk value always to the last item. If I delete the last time, again next last item is giving wrong value.  The calculation value in the routine debugging log (SM53) is showing correct value.  However, assigning the wrong value.  No other routines have been assigned to this condition type in the pricing procedure. 
    Routine Code:
    package stanley.pricing.userexits.val;
    import java.math.BigDecimal;
    import com.sap.spe.pricing.customizing.PricingCustomizingConstants;
    import com.sap.spe.pricing.transactiondata.PricingTransactiondataConstants;
    import com.sap.spe.pricing.transactiondata.userexit.IPricingConditionUserExit;
    import com.sap.spe.pricing.transactiondata.userexit.IPricingItemUserExit;
    import com.sap.spe.base.logging.UserexitLogger;
    import com.sap.spe.pricing.transactiondata.userexit.ValueFormulaAdapter;
    //import com.sap.spe.pricing.transactiondata.userexit.IPricingCondition;
    public class Z_CondValueRoutine730 extends  ValueFormulaAdapter{
       private static UserexitLogger uelogger =
              new UserexitLogger(Z_CondValueRoutine730.class);
      public BigDecimal overwriteConditionValue(IPricingItemUserExit pricingItem,
             IPricingConditionUserExit pricingCondition) {
      // Variable Declarations.
      BigDecimal conditionValueZCVC=PricingTransactiondataConstants.ZERO;
      BigDecimal conditionValueZCVCAccrual=PricingTransactiondataConstants.ZERO;
      BigDecimal subTotal3=PricingTransactiondataConstants.ZERO;
      BigDecimal subTotal3Accrual=PricingTransactiondataConstants.ZERO;
      if(pricingCondition.getConditionTypeName().equalsIgnoreCase("ZPFM")){
                IPricingItemUserExit[] prItems;
                prItems = pricingItem.getUserExitDocument().getUserExitItems();
                String materialGroup = pricingItem.getAttributeValue("MATL_GRP");
                uelogger.writeLogDebug("  Material Group  :"+materialGroup);
                for (int i=0;i<prItems.length;i++){
                     String materialGroup1 = prItems[i].getAttributeValue("MATL_GRP");
                     if (materialGroup1.equalsIgnoreCase(materialGroup)){
                          subTotal3 = prItems[i].getSubtotal(PricingCustomizingConstants.ConditionSubtotal.SUBTOTAL_3).getValue();
                          subTotal3Accrual = subTotal3Accrual.add(subTotal3);
                          IPricingConditionUserExit[] conditionsForCumulation = prItems[i].getUserExitConditions();
                          for (int j = 0; j < conditionsForCumulation.length; j++) {
                               if(conditionsForCumulation[j].getConditionTypeName()==null) {
                                   continue;
                               else if ( conditionsForCumulation[j].getConditionTypeName().equalsIgnoreCase("ZCVC")){
                                    conditionValueZCVC = conditionsForCumulation[j].getConditionValue().getValue();
                                    conditionValueZCVCAccrual = conditionValueZCVCAccrual.add(conditionValueZCVC);
                BigDecimal conditionValueZPFM=PricingTransactiondataConstants.ZERO;
                conditionValueZPFM = subTotal3Accrual.subtract(conditionValueZCVCAccrual);
               BigDecimal conditionRateZPFM=PricingTransactiondataConstants.ZERO;
               conditionRateZPFM = conditionValueZPFM.multiply(new BigDecimal ("100"));
              conditionRateZPFM = conditionRateZPFM.divide(subTotal3Accrual,7,BigDecimal.ROUND_FLOOR);
             uelogger.writeLogDebug(subTotal3Accrual+"-"+conditionValueZCVCAccrual+" = "+conditionValueZPFM);
             uelogger.writeLogDebug("Condition Rate  :"+conditionRateZPFM);
           pricingCondition.setConditionRateValue(conditionRateZPFM.setScale(2,BigDecimal.ROUND_HALF_UP));
           pricingCondition.setConditionValue(conditionValueZPFM.setScale(2,BigDecimal.ROUND_HALF_UP));
              return null;
           return null;

    Hi,
    I think you should change xkwert variable instead of komv-kwert.
    Standard routines does the same.
    Aslo check in SPRO settings that routine is attached and
    getting triggered by putting break-point.
    Regards,
    Vishal

  • Is it possible to create report with two databases in Web Analysis Studio

    Hi,
    I am new to Hyperion Web Analysis, Could anyone help me out, whether its possible to create report with two databases for eg: OLAP(ESSBASE) and relational.
    Thanks & Regards,
    Prashanthi.

    Hi Mohit,
    Thanks for the reply, could you throw out some scenario so that i can try it out.As I am just trying my hands wet on this would like to know in detail & even i have gone through WA user guide but dint get any clue. Please throw some light.
    thanks
    prasanthi

  • What are the differences of creating a physical standby database with ASM?

    I want to create a physical standby database for my 10g(10.2.0.1) database. But it is using ASM. Is it possible to create a standby database for a database using ASM?
    What are the differences of creating a physical standby database with ASM?

    tell us what your research shows and we'll try to
    validate it. I am simulating Oracle ASM on a PC and I want to try
    DataGuard on it now. So I am trying to create DataGuard
    on an ASM system. The purpose is only learning and test.That's telling us how you are researching, not what you have observed.
    Your research could have included looking at the documetation, and you might have found http://download.oracle.com/docs/cd/B19306_01/server.102/b14239/scenarios.htm#sthref1642
    which discusses exactly what you are looking for.
    Message was edited by:
    Hans Forbrich

  • Creating A New MySQL Database With Coldfusion Code

    Hi,
    I was wondering if anyone knew how to create a whole entire
    new database simply by executing a Coldfusion template (via a form
    for example).
    I'm pretty confident at creating a new table in an already
    existing database but not sure how to go about creating an entirely
    new database from pure ColdFusion code using MySQL.
    I basically want to create some portal for myself to do this
    to save on arduous time. It'll need to be a form because I'll have
    to give it a name, username, password etc. I need the seperate
    databases for my separate clients you see.
    One point I should make is that it is on a shared server so I
    don't have direct access to the CF Administrator.
    Any advice on achieving this or highlighting the pitfalls
    would be greatly appreciated.
    Many thanks in advance!
    Michael.

    quote:
    Originally posted by:
    Sabaidee
    if it is on a shared server, then you very likely do not have
    enough permissions to create new batabases in MySQL either...
    is there an option for you in your hosting control panel (or
    whatever it is called) to create a new MySQL database for your
    account without any involvement of server admins? if so then,
    technically you may be able to create a new db programmatically.
    but i doubt you can...
    I know it sounds cheeky but any chance you could supply
    example code for doing this with ColdFusion and MySQL? This way I
    will then be able to try it rather than waiting for my host to get
    back to me.
    I would have tried doing it already because I use SQL quite
    often with queries etc, but I just don't have the technical know
    how for this specific task at hand.
    Many thanks for your help!

  • Custom metadata sets for Productions?

    I've added a new metadata set that suits our needs, but it is not showing up as an option when creating a new production - is there some option that I missed in order to allow this, or is there a completely different process involved with creating a new metadata set for production folders? Can someone tell me what I missed or walk me through how to do that? Thank you!

    Did you make sure to assign the new MD Set to Productions and not Media? If so there must be something else wrong with the way you set it up. Make sure the ID says:
    paproductionyourmetadatasetname
    If it does not ID this way it will not show in new Productions.

  • BDC for production order confirmation (co11n)

    Dear All,
    Is it better to create a table control BDC for Production Order confirmation (CO11n)?
    Or there is any other efficient way?
    Pls guide me.
    Thank you
    Vijay

    Hi,
    There are different BAPIs available:
    BAPI_PRODORDCONF_CREATE_ACT    Enter activity confirmation
    BAPI_PRODORDCONF_CREATE_HDR    Enter Order Confirmations
    BAPI_PRODORDCONF_CREATE_TE     Enter Time Event Confirmation
    BAPI_PRODORDCONF_CREATE_TT     Enter Time Ticket Confirmation
    You can use them depenidng on your requirement..

  • How to create a database for sample code from Tutorial/Book?

    I want to try out the sample code from [http://shop.oreilly.com/product/0636920013471.do] for the book SQL Pocket Guide 3rd Ed.
    I have downloaded the oracle vm/appliance for oracle 11g2 and I have started sqlplus as sysdba.
    I'm feeling overwhelmed with these links describing how to create a database:
    [http://www.adp-gmbh.ch/ora/admin/creatingdbmanually.html]
    [http://tldp.org/HOWTO/Oracle-7-HOWTO-3.html]
    [http://www.adp-gmbh.ch/ora/admin/creatingdbmanually.html]
    (1) What is the command to list the existing databases?
    (2) What is the command to delete an existing database?
    (3) When creating a new database with the create database command, is it necessary to specify the logfile, character set, national character set, datafile, sysaux datafile, undo tablespace, temp table space? Do these have reasonable defaults? I'm not sure what proper directories are to specify for Linux and the examples are for windows.
    Can someone give me a simplified create database command to create a database called 3rdEdPocketGuide? Should I follow the example at [http://tldp.org/HOWTO/Oracle-7-HOWTO-3.html] and instead of orcl use 3rdEdPocketGuide?
    (4) What command do I use to execute the script that comes with the book SQL Pocket Guide 3rd Ed? This is the script that has all the drop table, create table and insert commands in it.
    (5) What command do I use in sqlplus to set the current default database prior to running this script? Perhaps this is the connect command? I don't want my script to create tables in the system database.
    (6) I tried the command "connect 3rdEdPocketGuide" and it prompted for a password! Yikes! What password? Do I need to specify a password when I create a database? I cannot tell if I have successfully created such a database or it is just prompting me for a password to thwart malicious users. Is it is possible to create databases which don't require a password or maybe a zero length password?
    Thanks
    Siegfried
    Edited by: user8816970 on Sep 26, 2012 12:01 PM
    Edited by: user8816970 on Sep 26, 2012 12:18 PM

    user8816970 wrote:
    Paul,
    Thanks! I tried changing my profile name to siegfried but I'm not seeing the change...
    Anyway, I'm trying your suggestion to use SQL Developer which was already installed in the virtual box appliance and I cannot figure out how to get a connection.
    When I use the defaults of sid=xe, port=1521, hostname=localhost and specify
    username=sysdba
    password=
    I get status: failure - test failed: listener refursed connection with the following error: ORA 12505, TNS: listener does not current know of sid given.
    So I try sid=orcl and that works better: status: failure - test failed: ORA-01017: invalid username/passowrd; login denied
    OK, sqlplus let me in with out a password, why does not this work?
    So I try checking the box for "OS Authentication" and I get the same error!
    Hoek: I tried searching the documentation and found "3 Exploring Oracle Database with SQL Developer" at http://docs.oracle.com/cd/E11882_01/appdev.112/e10766/toc.htm but following those directions did not help. Can you be more specific? The directions were for a tutorial and I need to know what the passwords are for the database set up with [http://www.oracle.com/technetwork/database/enterprise-edition/databaseappdev-vm-161299.html|http://www.oracle.com/technetwork/database/enterprise-edition/databaseappdev-vm-161299.html] . I also found [http://docs.oracle.com/cd/E11882_01/appdev.112/e10766/tdddg_connecting.htm#CEGHFHIG|http://docs.oracle.com/cd/E11882_01/appdev.112/e10766/tdddg_connecting.htm#CEGHFHIG] but that did not help either.
    Everyone:
    Do I need to create a user using SQL*Plus first so I can login with "Oracle SQL Developer" so I create my database called? What would be the "create user" command I would execute?
    OK, so I run sqlplus and issue these commands
    create user siegfried identified by abc ;
    grant connect to siegfried ;
    connect siegfried/abc;
    Now, how do I create a database? In Microsoft SQL Server one has to create a database first and if you just start creating tables without creating a database first, the tables will be created in the system database and this is usually undesirable.
    Sometimes a database is known in the java connection string as the catalog. Is there any such analog in oracle SQL plus?
    So now what do I do? I want to create a bunch of tables using my script I downloaded from 3rd Ed SQL Pocket Guide. Does my new user "siegfried" have the right to create tables? I guess I could try but I don't want to create tables in the system database.
    I noticed I can also use "Oracle SQL Developer" to connect with my new "siegfried" account. It seems that I should have been able to connect with sysdba... strange.
    So now I am connected in the "Oracle SQL Developer" and I see no list of databases.
    Thanks!
    Siegfried
    >Paul,
    Thanks! I tried changing my profile name to siegfried but I'm not seeing the change...
    Anyway, I'm trying your suggestion to use SQL Developer which was already installed in the virtual box appliance and I cannot figure out how to get a connection.
    When I use the defaults of sid=xe, port=1521, hostname=localhost and specify
    username=sysdba
    password=
    I get status: failure - test failed: listener refursed connection with the following error: ORA 12505, TNS: listener does not current know of sid given.
    So I try sid=orcl and that works better: status: failure - test failed: ORA-01017: invalid username/passowrd; login denied
    OK, sqlplus let me in with out a password, why does not this work?
    So I try checking the box for "OS Authentication" and I get the same error!
    Hoek: I tried searching the documentation and found "3 Exploring Oracle Database with SQL Developer" at http://docs.oracle.com/cd/E11882_01/appdev.112/e10766/toc.htm but following those directions did not help. Can you be more specific? The directions were for a tutorial and I need to know what the passwords are for the database set up with [http://www.oracle.com/technetwork/database/enterprise-edition/databaseappdev-vm-161299.html|http://www.oracle.com/technetwork/database/enterprise-edition/databaseappdev-vm-161299.html] . I also found [http://docs.oracle.com/cd/E11882_01/appdev.112/e10766/tdddg_connecting.htm#CEGHFHIG|http://docs.oracle.com/cd/E11882_01/appdev.112/e10766/tdddg_connecting.htm#CEGHFHIG] but that did not help either.
    Everyone:
    Do I need to create a user using SQL*Plus first so I can login with "Oracle SQL Developer" so I create my database called? What would be the "create user" command I would execute?
    OK, so I run sqlplus and issue these commands
    create user siegfried identified by abc ;
    grant connect to siegfried ;
    connect siegfried/abc;
    above does NOT use SQL*Net to connect to the instance
    >
    Now, how do I create a database? In Microsoft SQL Server one has to create a database first and if you just start creating tables without creating a database first, the tables will be created in the system database and this is usually undesirable.
    Sometimes a database is known in the java connection string as the catalog. Is there any such analog in oracle SQL plus?
    So now what do I do? I want to create a bunch of tables using my script I downloaded from 3rd Ed SQL Pocket Guide. Does my new user "siegfried" have the right to create tables? I guess I could try but I don't want to create tables in the system database.
    I noticed I can also use "Oracle SQL Developer" to connect with my new "siegfried" account. It seems that I should have been able to connect with sysdba... strange.
    So now I am connected in the "Oracle SQL Developer" and I see no list of databases.SQL Developer can only connect to the instance via SQL*Net
    >
    Thanks!
    Siegfrieda database in SQL Server is same as schema/user in Oracle

  • BAPI_GOODSMVT_CREATE for production order,not update database

    hi guru,
    i am using BAPI_GOODSMVT_CREATE for production order.When i m testing this BAPI
    at se37 it creates one mat doc no and i m not getting any return messages.Now i m
    writing code for it at se38. but it does not update the database even though i used
    bapi_transaction_commit. here sy-subrc = 0.bt when i m checking MSEG table showing
    that mat doc no does not exists.
    please help me out  asap.
    thanks and regurds,
    manasi

    CHECK THIS CODE
    REPORT ZBAPI_GOODSMVT_CREATE.
    *DECLARING INTERNAL TABLE TO HOLD FILE DATA.
    DATA: BEGIN OF itab OCCURS 0,
              text(200),
          END OF itab.
    *DECLARING INTERNAL TABLE TO PASS FILE DATA.
    TYPES: BEGIN OF tw_goodsmvt,
                pstng_date TYPE budat,
                doc_date TYPE bldat,
                material TYPE matnr,
                plant TYPE werks_d,
                stge_loc TYPE lgort_d,
                move_type TYPE bwart,
    *            entry_qnt TYPE erfmg,
                costcenter TYPE kostl,
            END OF tw_goodsmvt,
            tt_goodsmvt TYPE STANDARD TABLE OF tw_goodsmvt.
    DATA: lt_goodsmvt TYPE tt_goodsmvt,
          lw_goodsmvt TYPE tw_goodsmvt.
    *declaring internal table of bapi structure.
    DATA:s_goodsmvt_header LIKE  bapi2017_gm_head_01,
         lt_goodsmvt_item TYPE STANDARD TABLE OF bapi2017_gm_item_create WITH HEADER LINE,
         lt_return TYPE STANDARD TABLE OF bapiret2 WITH HEADER LINE.
    DATA:str_filename TYPE string,
         gm_code TYPE gm_code,
          v_head_count TYPE i VALUE 0,
          v_prev_count TYPE i VALUE 1,
          v_qnt TYPE string,
          v_dummy.
    *selection screen
    SELECTION-SCREEN BEGIN OF BLOCK bk with frame title text_001.
    PARAMETERS:p_docdat TYPE bldat,
               p_pstdat TYPE budat,
               fname LIKE rlgrap-filename.
    SELECTION-SCREEN END OF BLOCK bk.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR fname.
    *to provide F4 functionality.
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          program_name = syst-cprog
        IMPORTING
          file_name    = fname.
    * start of selection
    START-OF-SELECTION.
      str_filename = fname.
      gm_code = '06'.
    * to upload data
      CALL FUNCTION 'GUI_UPLOAD'
        EXPORTING
          filename            = str_filename
          filetype            = 'ASC'
          has_field_separator = 'X'
          read_by_line        = 'X'
        TABLES
          data_tab            = itab.
    *SPLITING DATA TO INTERNAL TABLES.
      LOOP AT itab.
        IF itab+0(1) EQ 'H'.
          v_head_count =  v_head_count + 1.
          IF v_head_count GT v_prev_count.
            PERFORM bapi_upload.
          ENDIF.
          SPLIT itab-text AT ',' INTO v_dummy
                                      lw_goodsmvt-pstng_date
                                      lw_goodsmvt-doc_date.
          s_goodsmvt_header-doc_date   = lw_goodsmvt-doc_date.
          s_goodsmvt_header-pstng_date = lw_goodsmvt-pstng_date.
          v_prev_count = v_head_count.
      ELSEIF itab+0(1) EQ 'L'.
        SPLIT itab-text AT ',' INTO v_dummy
                                    lw_goodsmvt-material
                                    lw_goodsmvt-plant
                                    lw_goodsmvt-stge_loc
                                    lw_goodsmvt-move_type
                                    v_qnt
                                    lw_goodsmvt-costcenter.
    * PASSING DATA TO INTERNAL TABLE TYPE BAPI STRUCTURE.
        lt_goodsmvt_item-material = lw_goodsmvt-material.
        lt_goodsmvt_item-plant    = lw_goodsmvt-plant.
        lt_goodsmvt_item-stge_loc = lw_goodsmvt-stge_loc.
        lt_goodsmvt_item-move_type = lw_goodsmvt-move_type.
        lt_goodsmvt_item-entry_qnt = v_qnt.
        lt_goodsmvt_item-costcenter = lw_goodsmvt-costcenter.
        APPEND lt_goodsmvt_item.
      ENDIF.
      v_prev_count = v_head_count.
      ENDLOOP.
      PERFORM bapi_upload.
    *&      Form  bapi_upload
    form bapi_upload .
    CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
      EXPORTING
        goodsmvt_header             = s_goodsmvt_header
        goodsmvt_code               = gm_code
    *   TESTRUN                     = ' '
    * IMPORTING
    *   GOODSMVT_HEADRET            =
    *   MATERIALDOCUMENT            =
    *   MATDOCUMENTYEAR             =
      tables
        goodsmvt_item               = lt_goodsmvt_item
    *   GOODSMVT_SERIALNUMBER       =
        return                      = lt_return.
            PERFORM commit_work TABLES lt_return.
            CLEAR : lw_goodsmvt, s_goodsmvt_header.
            REFRESH: lt_goodsmvt[], lt_goodsmvt_item[].
    endform.                    " bapi_upload
    *&      Form  commit_work
    *       text
    *      -->P_LT_RETURN  text
    form commit_work  tables   p_lt_return structure bapiret2.
      IF NOT lt_return[] IS INITIAL.
    *error handling
    loop at lt_return.
    CALL FUNCTION 'FORMAT_MESSAGE'
    EXPORTING
       ID              = lt_return-id
       LANG            = sy-langu
       NO              = lt_return-NUMBER
       V1              = lt_return-message_v1
       V2              = lt_return-message_v2
       V3              = lt_return-message_v3
       V4              = lt_return-message_v4
    IMPORTING
       MSG             = lt_return-MESSAGE
    EXCEPTIONS
       NOT_FOUND       = 1
       OTHERS          = 2.
    WRITE: lt_return-id, lt_return-message, lt_return-message_v1, lt_return-message_v2,
                 lt_return-message_v3, lt_return-message_v4.
          CLEAR lt_return.
        ENDLOOP.
      ELSE.
    * commit work
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    *   EXPORTING
    *     WAIT          =
       IMPORTING
         RETURN        = lt_return.
    WRITE: lt_return-id, lt_return-message, lt_return-message_v1, lt_return-message_v2,
                 lt_return-message_v3, lt_return-message_v4.
          CLEAR lt_return.
    endif.
    endform.                    " commit_work

Maybe you are looking for

  • ResourceServlet doesn't work correctly

    I have on my web.xml <servlet> <servlet-name>resources</servlet-name> <servlet-class>oracle.adf.view.faces.webapp.ResourceServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>resources</servlet-name>

  • How to restrict page prompt

    I have added 2 pages in single dashboard page. i want to restrict page1 prompt with out affecting to page2 prompt. If i run report by selecting year prompt in page1 it is affecting to page2 which is having in same page

  • Browser drags with ads. pdf link fails.

    web sites are filled with adds, mouse has little or very delayed response, clicking on link to pdf file (as in a statement) fails with error message indicating web issue, but all web sites have same problem.  Either there is a virus infection or some

  • Unsupported image format after using external editor

    A new twist (for me) on the familiar unsupported image format problem: On my MacBook Pro (running Aperture 2.1.4) I export an image to PS as a 16 bit TIFF 300 dpi to work on it; when I'm done it comes back as a TIFF. But Aperture won't open the edite

  • Import bulk users ad

    Guys, I would like to get some more info about the import users through a csv in Ad. First, i did read some fine articles(like this: http://www.computerperformance.co.uk/Logon/Logon_CSVDE_Bulk.htm) but most of the time i get more questions after read