Step by step periodic declaration

Hi Experts,
could some one explain the step by step process for creation on periodic declarations?
Full points will be given to useful answers.
Thanks in advance.

Dear,
Please go through the following information.
[Creation of periodic declarations|http://help.sap.com/printdocu/core/Print46c/en/Data/htm/english.htm]
Logistics->Materials Management>Purchasing-->Periodic Declarations.
Reward Points if useful.
Thanks and Regards,
Naveen Dasari.

Similar Messages

  • BDC step-by-step

    Hi Experts,
    I am new to R/3 can any one explain the BDC in detail step-by-step.
    You have any detail documents related to this topic pls send  it to this mail id
    [email protected]
    Regards
    Krishna.

    Hi,
    Go thru this doc.
    BATCH DATA COMMUNICATION
    About Data Transfer In R/3 System
    When a company decides to implement the SAP R/3 to manage business-critical data, it usually does not start from a no-data situation. Normally, a SAP R/3 project comes into replace or complement existing application.
    In the process of replacing current applications and transferring application data, two situations might occur:
    •     The first is when application data to be replaced is transferred at once, and only once.
    •     The second situation is to transfer data periodically from external systems to SAP and vice versa.
    •     There is a period of time when information has to be transferred from existing application, to SAP R/3, and often this process will be repetitive.
    The SAP system offers two primary methods for transferring data into SAP systems. From non-SAP systems or legacy system. These two methods are collectively called “batch input” or “batch data communication”.
    1. SESSION METHOD
    2. CALL TRANSACTION
    3. DIRECT INPUT
    Advantages offered by BATCH INPUT method:
    1.     Can process large data volumes in batch.
    2.     Can be planned and submitted in the background.
    3.     No manual interaction is required when data is transferred.
    4.     Data integrity is maintained as whatever data is transferred to the table is through transaction. Hence batch input data is submitted to all the checks and validations.
    To implement one of the supported data transfers, you must often write the program that exports the data from your non-SAP system. This program, known as a “data transfer” program must map the data from the external system into the data structure required by the SAP batch input program.
    The batch input program must build all of the input to execute the SAP transaction.
    Two main steps are required:
    •     To build an internal table containing every screen and every field to be filled in during the execution of an SAP transaction.
    •     To pass the table to SAP for processing.
    Prerequisite for Data Transfer Program
    Writing a Data Transfer Program involves following prerequisites:
    Analyzing data from local file
    Analyzing transaction
    Analyzing transaction involves following steps:
    •     The transaction code, if you do not already know it.
    •     Which fields require input i.e., mandatory.
    •     Which fields can you allow to default to standard values.
    •     The names, types, and lengths of the fields that are used by a transaction.
    •     Screen number and Name of module pool program behind a particular transaction.
    To analyze a transaction::
    •     Start the transaction by menu or by entering the transaction code in the command box.
    (You can determine the transaction name by choosing System – Status.)
    •     Step through the transaction, entering the data will be required for processing your batch input data.
    •     On each screen, note the program name and screen (dynpro) number.
    (dynpro = dyn + pro. Dyn = screen, pro = number)
    •     Display these by choosing System – Status. The relevant fields are Program (dynpro) and Dynpro number.  If pop-up windows occur during execution, you can get the program name and screen number by pressing F1 on any field or button on the screen.
    The technical info pop-up shows not only the field information but also the program and screen.
    •     For each field, check box, and radio button on each screen, press F1 (help) and then choose Technical Info.
    Note the following information:
    -     The field name for batch input, which you’ll find in its own box.
    -     The length and data type of the field. You can display this information by double clicking on the Data Element field.
    •     Find out the identification code for each function (button or menu) that you must execute to process the batch-input data (or to go to new screen).
    Place the cursor on the button or menu entry while holding down the left mouse button. Then press F1.
    In the pop-up window that follows, choose Technical info and note the code that is shown in the Function field.
    You can also run any function that is assigned to a function key by way of the function key number. To display the list of available function keys, click on the right mouse button. Note the key number that is assigned to the functions you want to run.
    Once you have program name, screen number, field name (screen field name), you can start writing.
    DATA TRANSFER program.
    Declaring internal table
    First Integral Table similar to structure like local file.
    Declaring internal table like BDCDATA
    The data from internal table is not transferred directly to database table, it has to go through transaction. You need to pass data to particular screen and to particular screen-field. Data is passed to transaction in particular format, hence there is a need for batch input structure.
    The batch input structure stores the data that is to be entered into SAP system and the actions that are necessary to process the data. The batch input structure is used by all of the batch input methods. You can use the same structure for all types of batch input, regardless of whether you are creating a session in the batch input queue or using CALL TRANSACTION.
    This structure is BDCDATA, which can contain the batch input data for only a single run of a transaction. The typical processing loop in a program is as follows:
    •     Create a BDCDATA structure
    •     Write the structure out to a session or process it with CALL TRANSACTION USING; and then
    •     Create a BDCDATA structure for the next transaction that is to be processed.
    Within a BDCDATA structure, organize the data of screens in a transaction. Each screen that is processed in the course of a transaction must be identified with a BDCDATA record. This record uses the Program, Dynpro, and Dynbegin fields of the structure.
    The screen identifier record is followed by a separate BDCDATA record for each value,  to be entered into a field. These records use the FNAM and FVAL fields of the BDCDATA structure. Values to be entered in a field can be any of the following:
    •     Data that is entered into screen fields.
    •     Function codes that are entered into the command field. Such function codes execute functions in a transaction, such as Save or Enter.
    The BDCDATA structure contains the following fields:
    •     PROGRAM: Name of module pool program associated with the screen. Set this field only for the first record for the screen.
    •     DYNPRO: Screen Number. Set this field only in the first record for the screen.
    •     DYNBEGIN: Indicates the first record for the screen. Set this field to X, only for the first record for the screen. (Reset to ‘  ‘ (blank) for all other records.)
    •     FNAM: Field Name. The FNAM field is not case-sensitive.
    •     FVAL: Value for the field named in FNAM. The FVAL field is case-sensitive. Values assigned to this field are always padded on the right, if they are less than 132 characters. Values must be in character format.
    Transferring data from local file to internal table
    Data is uploaded to internal table by UPLOAD of WS_UPLOAD function.
    Population of BDCDATA
    For each record of internal table, you need to populate Internal table, which is similar to BDCDATA structure.
    All these five initial steps are necessary for any type of BDC interface.
    DATA TRANSFER program can call SESSION METHOD or CALL TRANSACTION.  The initial steps for both the methods are same.
    First step for both the methods is to upload the data to internal table. From Internal Table, the data is transferred to database table by two ways i.e., Session method and Call transaction.
    SESSION METHOD
    About Session method
    In this method you transfer data from internal table to database table through sessions.
    In this method, an ABAP/4 program reads the external data that is to be entered in the SAP System and stores the data in session. A session stores the actions that are required to enter your data using normal SAP transaction i.e., Data is transferred to session which in turn transfers data to database table.
    Session is intermediate step between internal table and database table. Data along with its action is stored in session i.e., data for screen fields, to which screen it is passed, the program name behind it, and how the next screen is processed.
    When the program has finished generating the session, you can run the session to execute the SAP transactions in it. You can either explicitly start and monitor a session or have the session run in the background processing system.
    Unless session is processed, the data is not transferred to database table.
    BDC_OPEN_GROUP
    You create the session through program by BDC_OPEN_GROUP function.
    Parameters to this function are:
    •     User Name:     User name
    •     Group:          Name of the session
    •     Lock Date:          The date on which you want to process the session.
    •     Keep:          This parameter is passed as ‘X’ when you want to retain session after
                   processing it or ‘   ‘ to delete it after processing.
    BDC_INSERT
    This function creates the session & data is transferred to Session.
    Parameters to this function are:
    •     Tcode:          Transaction Name
    •     Dynprotab:          BDC Data
    BDC_CLOSE_GROUP
    This function closes the BDC Group. No Parameters.
    Some additional information for session processing
    When the session is generated using the KEEP option within the BDC_OPEN_GROUP, the system always keeps the sessions in the queue, whether it has been processed successfully or not.
    However, if the session is processed, you have to delete it manually. When session processing is completed successfully while KEEP option was not set, it will be removed automatically from the session queue.  Log is not removed for that session.
    If the batch-input session is terminated with errors, then it appears in the list of INCORRECT session and it can be processed again. To correct incorrect session, you can analyze the session. The Analysis function allows to determine which screen and value has produced the error. If you find small errors in data, you can correct them interactively, otherwise you need to modify batch input program, which has generated the session or many times even the data file.
    CALL TRANSACTION
    About CALL TRANSACTION
    A technique similar to SESSION method, while batch input is a two-step procedure, Call Transaction does both steps online, one after the other. In this method, you call a transaction from your program by
    Call transaction     <tcode> using <BDCTAB>
         Mode <A/N/E>
         Update <S/A>
         Messages into <MSGTAB>.
    Parameter – 1     is transaction code.
    Parameter – 2     is name of BDCTAB table.
    Parameter – 3     here you are specifying mode in which you execute transaction
              A is all screen mode.  All the screen of transaction are displayed.
              N is no screen mode. No screen is displayed when you execute the transaction.
         E is error screen. Only those screens are displayed wherein you have error record.
    Parameter – 4     here you are specifying update type by which database table is updated.
         S is for Synchronous update in which if you change data of one table then all the related Tables gets updated. And sy-subrc is returned i.e., sy-subrc is returned for once and all.
         A is for Asynchronous update. When you change data of one table, the sy-subrc is returned. And then updating of other affected tables takes place.  So if system fails to update other tables, still sy-subrc returned is 0 (i.e., when first table gets updated).
    Parameter – 5     when you update database table, operation is either successful or unsuccessful or operation is successful with some warning. These messages are stored in internal table, which you specify along with MESSAGE statement. This internal table should be declared like BDCMSGCOLL, a structure available in ABAP/4. It contains the following fields:
         1. Tcode:      Transaction code
         2. Dyname:      Batch point module name
         3. Dynumb:      Batch input Dyn number
         4. Msgtyp:      Batch input message type (A/E/W/I/S)
         5. Msgspra:     Batch input Lang, id of message
         6. Msgid:     Message id
         7. MsgvN:     Message variables (N = 1 - 4)
    For each entry, which is updated in database, table message is available in BDCMSGCOLL. As BDCMSGCOLL is structure, you need to declare a internal table which can contain multiple records (unlike structure).
    Steps for CALL TRANSACTION method
    1.     Internal table for the data (structure similar to your local file)
    2.     BDCTAB like BDCDATA
    3.     UPLOAD or WS_UPLOAD function to upload the data from local file to itab. (Considering file is local file)
    4.     Loop at itab.
    Populate BDCTAB table.
    Call transaction     <tcode> using <BDCTAB>
         Mode <A/N/E>
                           Update <S/A>.
    Refresh BDCTAB.
    Endloop.
    (To populate BDCTAB, You need to transfer each and every field)
    The major differences between Session method and Call transaction are as follows:
              SESSION METHOD               CALL TRANSACTION
    1.          Data is not updated in database table unless Session is processed.               Immediate updation in database table.
    2.          No sy-subrc is returned.               Sy-subrc is returned.
    3.          Error log is created for error records.               Errors need to be handled explicitly
    4.          Updation in database table is always synchronous               Updation in database table can be synchronous Or Asynchronous.
    Error Handling in CALL TRANSACTION
    When Session Method updates the records in database table, error records are stored in the log file. In Call transaction there is no such log file available and error record is lost unless handled. Usually you need to give report of all the error records i.e., records which are not inserted or updated in the database table. This can be done by the following method:
    Steps for the error handling in CALL TRANSACTION
    1.     Internal table for the data (structure similar to your local file)
    2.     BDCTAB like BDCDATA
    3.     Internal table BDCMSG like BDCMSGCOLL
    4.     Internal table similar to Ist internal table
         (Third and fourth steps are for error handling)
    5.     UPLOAD or WS_UPLOAD function to upload the data from the local file to itab. (Considering file is local file)
    6.     Loop at itab.
    Populate BDCTAB table.
    Call transaction <tr.code> using <Bdctab>
                              Mode <A/N/E>
                              Update <S/A>
                              Messages <BDCMSG>.
          Perform check.
          Refresh BDCTAB.
          Endloop.
    7     Form check.
    IF sy-subrc <> 0.  (Call transaction returns the sy-subrc if updating is not successful).
    Call function Format_message.
    (This function is called to store the message given by system and to display it along with record)
    Append itab2.
    Display the record and message.
    DIRECT INPUT
    About Direct Input
    In contrast to batch input, this technique does not create sessions, but stores the data directly. It does not simulate the online transaction. To enter the data into the corresponding database tables directly, the system calls a number of function modules that execute any necessary checks. In case of errors, the direct input technique provides a restart mechanism. However, to be able to activate the restart mechanism, direct input programs must be executed in the background only. Direct input checks the data thoroughly and then updates the database directly.
    You can start a Direct Input program in two ways;
    Start the program directly
    This is the quickest way to see if the program works with your flat file. This option is possible with all direct input programs. If the program ends abnormally, you will not have any logs telling you what has or has not been posted. To minimize the chance of this happening, always use the check file option for the first run with your flat file. This allows you to detect format errors before transfer.
    Starting the program via the DI administration transaction
    This transaction restarts the processing, if the data transfer program aborts. Since DI document are immediately posted into the SAP D/B, the restart option prevents the duplicate document posting that occurs during a program restart (i.e., without adjusting your flat file).
    Direct input is usually done for standard data like material master, FI accounting document, SD sales order and Classification for which SAP has provided standard programs.
    First time you work with the Direct Input administration program, you will need to do some preparation before you can transfer data:
    -     Create variant
    -     Define job
    -     Start job
    -     Restart job
    Common batch input errors
    -     The batch input BDCDATA structure tries to assign values to fields which do not exist in the current transaction screen.
    -     The screen in the BDCDATA structure does not match the right sequence, or an intermediate screen is missing.
    -     On exceptional occasions, the logic flow of batch input session does not exactly match that of manual online processing. Testing the sessions online can discover by this.
    -     The BDCDATA structure contains fields, which are longer than the actual definition.
    -     Authorization problems.
    RECORDING A BATCH INPUT
    A B recording allows you to record a R/3 transaction and generate a program that contains all screens and field information in the required BDC-DATA format.
    You can either use SHDB transaction for recording or
    SYSTEM &#61614; SERVICES &#61614; BATCH INPUT &#61614; EDIT
    And from here click recording.
    Enter name for the recording.
    (Dates are optional)
    Click recording.
    Enter transaction code.
    Enter.
    Click Save button.
    You finally come to a screen where, you have all the information for each screen including BDC_OKCODE.
    •     Click Get Transaction.
    •     Return to BI.
    •     Click overview.
    •     Position the cursor on the just recorded entry and click generate program.
    •     Enter program name.
    •     Click enter
    The program is generated for the particular transaction.
    BACKGROUND PROCESSING
    Need for Background processing
    When a large volume of data is involved, usually all batch inputs are done in background.
    The R/3 system includes functions that allow users to work non-interactively or offline.  The background processing systems handle these functions.
    Non-interactively means that instead of executing the ABAP/4 programs and waiting for an answer, user can submit those programs for execution at a more convenient planned time.
    There are several reasons to submit programs for background execution.
    •     The maximum time allowed for online execution should not exceed 300 seconds.  User gets TIMEOUT error and an aborted transaction, if time for execution exceeds 300 seconds. To avoid these types of error, you can submit jobs for background processing.
    •     You can use the system while your program is executing.
    This does not mean that interactive or online work is not useful. Both type of processing have their own purposes. Online work is the most common one entering business data, displaying information, printing small reports, managing the system and so on.  Background jobs are mainly used for the following tasks; to process large amount of data, to execute periodic jobs without human intervention, to run program at a more convenient, planned time other than during normal working hours i.e., Nights or weekends.
    The transaction for background processing is SM36.
    Or
    Tools &#61614; Administration &#61614; Jobs &#61614; Define jobs
    Or
    System &#61614; services &#61614; Jobs
    Components of the background jobs
    A job in Background processing is a series of steps that can be scheduled and step is a program for background processing.
    •     Job name.  Define the name of assigned to the job. It identifies the job. You can specify up to 32 characters for the name.
    •     Job class.  Indicates the type of background processing priority assigned to the job.
    The job class determines the priority of a job.  The background system admits three types of job classes: A B & C, which correspond to job priority.
    •     Job steps.  Parameters to be passed for this screen are as follows:
    Program name.
    Variant if it is report program
    Start criteria for the job: Option available for this are as follows:
         Immediate - allows you to start a job immediately.
         Date/Time - allows you to start a job at a specific name.
         After job - you can start a job after a particular job.
         After event - allows you to start a job after a particular event.
         At operation mode - allows you to start a job when the system switches to a particular operation mode.
    Defining Background jobs
    It is two step process: Firstly, you define the job and then release it.
    When users define a job and save it, they are actually scheduling the report i.e., specifying the job components, the steps, the start time.
    When users schedule program for background processing, they are instructing the system to execute an ABAP/4 report or an external program in the background.  Scheduled jobs are not executed until they are released. When jobs are released, they are sent for execution to the background processing system at the specified start time. Both scheduling and releasing of jobs require authorizations.
    HANDLING OF POP UP SCREEN IN BDC
    Many times in transaction pop up screen appears and for this screen you don’t pass any record but some indication to system telling it to proceed further. For example: The  following screen
    To handle such screen, system has provided a variable called BDC_CURSOR. You pass this variable to BDCDATA and process the screen.
    Usually such screen appears in many transactions, in this case you are just passing information, that YES you want to save the information, that means YES should be clicked. So you are transferring this information to BDCDATA i.e., field name of YES which is usually SPOT_OPTION. Instead of BDC_OKCODE, you are passing BDC_CURSOR.
    BDC_CURSOR is also used to place cursor on particular field.
    AN EXAMPLE WITH SESSION METHOD
    Following program demonstrates how data is passed from flat file to SAP transaction and further to database table by using SESSION method.
    The transaction is TFBA (to change customer).
    A simple transaction where you are entering customer number on first screen and on next screen data is displayed for the particular customer number. Field, which we are changing here, are name and city. When you click on save, the changed record gets saved.
    Prerequisite to write this BDC interface as indicated earlier is:
    1. To find screen number
    2. To find screen field names, type of the field and length of the field.
    3. To find BDC_OKCODE for each screen
    4. Create flat file.
    Flat file can be created in your hard disk as follows:
    1     Vinod Krishna     Hyderabad
    2     Kavitha     Secunderabad
    3     Kishore     Hyderabad
    (Where 1st character field is Customer number, 2nd field is Customer name and 3rd field is City.)
    To transfer this data to database table SCUSTOM following interface can be used.
    REPORT DEMO1.
    Following internal table is to upload flat file.
    DATA: BEGIN OF ITAB OCCURS 0,
                   ID(10),
                   NAME(25),
                   CITY(25),
                 END OF ITAB.
    *Following internal table BDCDATA is to pass date from internal table to session.
    DATA: BDCTAB LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
    Variables
    DATA: DATE1 LIKE SY-DATUM. DATE1 = SY-DATUM - 1. “ This is for Hold Date
    To upload flat file to internal table.
    CALL FUNCTION UPLOAD
    EXPORTING
    FILE NAME                    = ‘C:\FF.TXT’
    FILE TYPE                    = ‘ASC”
    TABLES
    DATA_TAB                    = ITAB
    EXCEPTIONS
    CONVERSION_ERROR          = 1
    INVALID_TABLE_WIDTH          = 2
    INVALID_TYPE               = 3
    NO_BATCH                    = 4
    UNKNOWN_ERROR          = 5
    OTHERS                    = 6.
    If sy-subrc = 0.
    Calling Function to Create a Session
    CALL FUNCTION ‘BDC_OPEN_GROUP’
    EXPORTING
    CLIENT                    = SY-MANDT
    GROUP                    = ‘POTHURI’
    HOLDDATE                    = DATE1
    KEEP                         = ‘X’
    USER                         = SY-UNAME
    EXCEPTIONS
    CLIENT_INVALID               = 1
    DESTINATION_INVALID          = 2
    GROUP_INVALID               = 3
    GROUP_IS_LOCKED          = 4
    HOLDDATE_INVALID          = 5
    INTERNAL_ERROR               = 6
    QUEUE_ERROR               = 7
    RUNNING                    = 8
    SYSTEM_LOCK_ERROR          = 9
    USER_INVALID               = 10
    OTHERS                    = 11.
    If sy-subrc = 0.
    *-- MAIN Logic--
    LOOP AT ITAB
      PERFORM GENERATE_DATA. “ Populating BDCDATA Table
      CALL FUNCTION ‘BDC_INSERT’
           EXPORTING
    TCODE               = ‘TFBA’
    TABLES
    DYNPROTAB          = BDCTAB
    EXCEPTIONS
    INTERNAL_ERROR          = 1
    NOT_OPEN               = 2
    QUEUE_ERROR          = 3
    TCODE_INVALID          = 4
    PRINTING_INVALID     = 5
    POSTING_INVALID     = 6
    OTHERS               = 7.
      REFRESH BDCTAB
    ENDLOOP.
    Calling function to close the session
    CALL FUNCTION ‘BDC_CLOSE_GROUP’
    EXCEPTIONS
    NOT_OPEN          = 1
    QUEUE_ERROR     = 2
    OTHERS          = 3.
    Endif.
    Endif.
    *& Form GENERATE_DATA
       Create BDC Data
    FORM GENERATE_DATA
    Passing information for 1st screen on BDCDATA
    BDCTAB-PROGRAM = ‘SAPMTFBA’.
    BDCTAX-DYNPRO = 100.
    BDCTAP-DYNBEGIN = ‘X’.
    APPEND BCDTAB.CLEAR BDCTAB.
    Passing field information to BDCDATA
    BDCTAB-FNAM = ‘SCUSTOM-ID’
    BDCTAB-FVAL = ITAB-ID.
    APPEND BDCTAB.CLEAR BDCTAB.
    Passing BDC_OKCODE to BDCDATA
    BDCTAB-FNAM = ‘BDC_OKCODE’.
    BDCTAB-FVAL = ‘/5’.
    APPEND BDCTAB.CLEAR BDCTAB.
    Passing screen information for next screen to BDCDATA
    BDCTAB-PROGRAM = ‘SAPMTFBA’.
    BDCTAB-DYNPRO = 200.
    BDCTAB-DYNBEGIN = ‘X’.
    APPEND BDCTAB.CLEAR BDCTAB.
    Passing screen information to BDCDATA
    BDCTAB-FNAM = ‘SCUSTOM-NAME’.
    BDCTAB-FVAL = ITAB-NAME.
    APPEND BDCTAB.CLEAR BDCTAB.
    Passing screen information to BDCDATA
    BDCTAB-FNAM = ‘SCUSTOM-CITY’.
    BDCTAB-FVAL = ITAB-CITY.
    APPEND BDCTAB.CLEAR BDCTAB.
    Passing BDC_OKCODE to BDCDATA
    BDCTAB-FNAM = ‘BDC_OKCODE’.
    BDCTAB-FVAL = ‘SAVE’.
    APPEND BDCTAB.CLEAR BDCTAB.
    ENDFORM.                              “GENERATE_DATA
    AN EXAMPLE WITH CALL TRANSACTION
    Same steps to be repeated for CALL TRANSACTION
    The only difference between the two types of interface is in Session method, you create session and store information about screen and data into session. When session is processed the data is transferred to database. While in CALL TRANSACTION, data is transferred directly to database table.
    REPORT DEMO1.
    Follow above Code till MAIN Logic. Even the Subroutine should be copied
    LOOP AT ITAB
    PERFORM GENERATE_DATA, “Populating BDCDATA Table
    Call transaction ‘TFBA’ using BCDDATA Mode ‘A’ Update ‘S’.
    REFRESH BDCTAB
    ENDLOOP.
    Thanks
    Sunil

  • Oracle 10gR2 WebService Call-In & Call-Out via PL/SQL (Step-by-Step Guide)

    Hi Everyone,
    This guide is for those of you who tried to Call-In and Call-Out WebService via Oracle 10gR2 using PL/SQL but failed a couple of times, re-installed a couple of times and retry, got it to work but don't know what made it work scenarios.
    Hope this helps ;-)
    Thanks,
    Henry Wu
    Instructions on how to use Oracle10gR2 Webservice Call-Out feature (Oracle JAX-RPC DII - Dynamic Invocation (DII) APIs)
    PREREQUISITE
    =================================================================
    1. Download Oracle Database 10g Release 2 (10.2.0.1.0) (ZIP, ~655MB)
    http://www.oracle.com/technology/software/products/database/oracle10g/htdocs/10201winsoft.html
    http://download.oracle.com/otn/nt/oracle10g/10201/10201_database_win32.zip
    1.1 Choose Enterprise Edition
    2. Download 10.1.3.1 Callout Utility for 10g (R1 +R2) RDBMS (ZIP, ~13MB)
    http://download.oracle.com/technology/sample_code/tech/java/jsp/dbws-callout-utility-10131.zip
    2.1 Extract to C:\oracle\product\10.2.0\db_1\dbws_callout_utility_10131
    3. Download OC4J Standalone - Oracle Containers for J2EE (OC4J) 10g Release 3 (10.1.3.3) (ZIP, ~93MB; Pure Java—runs on all certified platforms)
    http://www.oracle.com/technology/software/products/ias/index.html (Download Site)
    http://download.oracle.com/otn/java/oc4j/101330/oc4j_extended_101330.zip
    3.1 Extract to C:\oracle\product\10.2.0\db_1\oc4j_extended_101330
    STEP-BY-STEP PROCEDURES
    =================================================================
    1. Prepare the database
    1.1 Connect to SYS account (or any account that can connect as SYSDBA)
    1.2 alter system set shared_pool_size=96M scope=both
    1.3 alter system set java_pool_size=80M scope=both
    1.4 ALTER USER SCOTT ACCOUNT UNLOCK;
    1.5 ALTER USER SCOTT IDENTIFIED BY "tiger";
    1.6 ALTER USER SCOTT QUOTA UNLIMITED ON USERS;
    1.7 GRANT PUBLIC TO SCOTT;
    1.8 GRANT Create Public Synonym TO SCOTT;
    2. Load Oracle SOAP client to SCOTT (for Oracle 10g Release 2 Database)
    2.1 Commands
    2.1.1 Open command prompt (cmd.exe)
    2.1.2 loadjava -u scott/tiger -r -v -f -genmissing -s -grant public C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\webservices\lib\soap.jar C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\lib\dms.jar C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\jlib\javax-ssl-1_1.jar C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\j2ee\home\lib\servlet.jar C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\j2ee\home\lib\mail.jar C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\j2ee\home\lib\activation.jar C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\j2ee\home\lib\http_client.jar C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\j2ee\home\lib\ejb.jar
    2.1.3 It will take around 3 minutes and you will see "something" like the following when it completes (count may not be exact) :
    Classes Loaded: 909
    Resources Loaded: 75
    Sources Loaded: 0
    Published Interfaces: 0
    Classes generated: 0
    Classes skipped: 0
    Synonyms Created: 984
    Errors: 0
    2.1.3 Close this command prompt
    3. Load Oracle JAX-RPC client to SYS (for Oracle 10g Release 2 Database)
    3.1 Commands
    3.1.1 Open command prompt (cmd.exe)
    3.1.2 loadjava -u sys/oracle -r -v -f -genmissing -s -grant public C:\oracle\product\10.2.0\db_1\dbws_callout_utility_10131\sqlj\lib\dbwsclientws.jar C:\oracle\product\10.2.0\db_1\dbws_callout_utility_10131\sqlj\lib\dbwsclientdb102.jar
    3.1.2.1 It will take around 15 minutes and you will see "something" like following when it completes (count may not be exact) :
    Classes Loaded: 4027
    Resources Loaded: 81
    Sources Loaded: 0
    Published Interfaces: 0
    Classes generated: 61
    Classes skipped: 0
    Synonyms Created: 4108
    Errors: 0
    3.1.3 Close this command prompt
    4. Execute UTL_DBWS packages to SYS (for Oracle 10g Release 2 Database)
    4.1 Commands
    4.1.1 Connect to SYS account only
    4.1.2 Execute the following (in TOAD you should execute them as Script, press the "thunder" button)
    4.2.1 @"C:\oracle\product\10.2.0\db_1\dbws_callout_utility_10131\sqlj\lib\utl_dbws_decl.sql"
    4.2.2 @"C:\oracle\product\10.2.0\db_1\dbws_callout_utility_10131\sqlj\lib\utl_dbws_body.sql"
    4.2.3 CREATE PUBLIC SYNONYM utl_dbws FOR sys.utl_dbws;
    5. Call-out a free Web Service using SCOTT
    5.1 Commands
    5.1.1 Connect to user SCOTT with password of TIGER
    5.1.2 Copy and Paste the following "Anonymous Block" (sample #1) and execute it :
    5.1.2.1 It sould return "PL/SQL DII client return ===> Redwood City"
    declare
    service_ utl_dbws.SERVICE;
    call_ utl_dbws.CALL;
    service_qname utl_dbws.QNAME;
    port_qname utl_dbws.QNAME;
    operation_qname utl_dbws.QNAME;
    string_type_qname utl_dbws.QNAME;
    retx ANYDATA;
    retx_string VARCHAR2(1000);
    retx_double number;
    retx_len number;
    params utl_dbws.ANYDATA_LIST;
    l_input_params utl_dbws.anydata_list;
    l_result ANYDATA;
    l_namespace VARCHAR2(1000);
    begin
    -- open internet explorer and navigate to http://webservices.imacination.com/distance/Distance.jws?wsdl
    -- search for 'targetNamespace' in the wsdl
    l_namespace := 'http://webservices.imacination.com/distance/Distance.jws';
    -- search for 'service name' in the wsdl
    service_qname := utl_dbws.to_qname(l_namespace, 'DistanceService');
    -- this is just the actual wsdl url
    service_ := utl_dbws.create_service(HTTPURITYPE('http://webservices.imacination.com/distance/Distance.jws?wsdl'), service_qname);
    -- search for 'portType name' in the wsdl
    port_qname := utl_dbws.to_qname(l_namespace, 'Distance');
    -- search for 'operation name' in the wsdl
    -- there will be a lot, we will choose 'getCity'
    operation_qname := utl_dbws.to_qname(l_namespace, 'getCity');
    -- bind things together
    call_ := utl_dbws.create_call(service_, port_qname, operation_qname);
    -- default is 'FALSE', so we make it 'TRUE'
    utl_dbws.set_property(call_, 'SOAPACTION_USE', 'TRUE');
    -- search for 'operation soapAction' under <wsdl:operation name="getCity">
    -- it is blank, so we make it ''
    utl_dbws.set_property(call_, 'SOAPACTION_URI', '');
    -- search for 'encodingstyle' under <wsdl:operation name="getCity">
    utl_dbws.set_property(call_, 'ENCODINGSTYLE_URI', 'http://schemas.xmlsoap.org/soap/encoding/');
    -- search for 'binding style'
    utl_dbws.set_property(call_, 'OPERATION_STYLE', 'rpc');
    -- search for 'xmlns:xs' to know the value of the first parameter
    -- under <wsdl:message name="getCityResponse"> you will see the line <wsdl:part name="getCityReturn" type="xsd:string" />
    -- thus the return type is 'string", removing 'xsd:'
    string_type_qname := utl_dbws.to_qname('http://www.w3.org/2001/XMLSchema', 'string');
    -- in the line <wsdl:operation name="getCity" parameterOrder="zip">
    -- the parameterOrder is 'zip', thus we put in 'zip'
    -- the 'ParameterMode.IN' is used to specify that we will be passing an "In Parameter" to the web service
    -- the 'ParameterMode.IN' is a constant variable in the sys.utl_dbws package
    utl_dbws.add_parameter(call_, 'zip', string_type_qname, 'ParameterMode.IN');
    utl_dbws.set_return_type(call_, string_type_qname);
    -- supply the In Parameter for the web service
    params(0) := ANYDATA.convertvarchar('94065');
    -- invoke the web service
    retx := utl_dbws.invoke(call_, params);
    -- access the returned value and output it to the screen
    retx_string := retx.accessvarchar2;
    dbms_output.put_line('PL/SQL DII client return ===> ' || retx_string);
    -- release the web service call
    utl_dbws.release_service(service_);
    end;
    5.1.3 Copy and Paste the following "Anonymous Block" (sample #2) and execute it :
    5.1.3.1 It should return "PL/SQL DII client return ===> twelve thousand three hundred and forty five"
    declare
    service_ utl_dbws.SERVICE;
    call_ utl_dbws.CALL;
    service_qname utl_dbws.QNAME;
    port_qname utl_dbws.QNAME;
    operation_qname utl_dbws.QNAME;
    string_type_qname utl_dbws.QNAME;
    retx ANYDATA;
    retx_string VARCHAR2(1000);
    retx_double number;
    retx_len number;
    params utl_dbws.ANYDATA_LIST;
    l_input_params utl_dbws.anydata_list;
    l_result ANYDATA;
    l_namespace VARCHAR2(1000);
    begin
    -- open internet explorer and navigate to http://www.dataaccess.com/webservicesserver/numberconversion.wso?WSDL
    -- search for 'targetNamespace' in the wsdl
    l_namespace := 'http://www.dataaccess.com/webservicesserver/';
    -- search for 'service name' in the wsdl
    service_qname := utl_dbws.to_qname(l_namespace, 'NumberConversion');
    -- this is just the actual wsdl url
    service_ := utl_dbws.create_service(HTTPURITYPE('http://www.dataaccess.com/webservicesserver/numberconversion.wso?WSDL'), service_qname);
    -- search for 'portType name' in the wsdl
    port_qname := utl_dbws.to_qname(l_namespace, 'NumberConversionSoap');
    -- search for 'operation name' in the wsdl
    -- there will be a lot, we will choose 'NumberToWords'
    operation_qname := utl_dbws.to_qname(l_namespace, 'NumberToWords');
    -- bind things together
    call_ := utl_dbws.create_call(service_, port_qname, operation_qname);
    -- default is 'FALSE', so we make it 'TRUE'
    utl_dbws.set_property(call_, 'SOAPACTION_USE', 'TRUE');
    -- search for 'operation soapAction' under <operation name="NumberToWords">
    -- it is blank, so we make it ''
    utl_dbws.set_property(call_, 'SOAPACTION_URI', '');
    -- search for 'encodingstyle'
    -- cannot find xml tag 'encodingstyle', so we just use the following as the generic encoding style
    utl_dbws.set_property(call_, 'ENCODINGSTYLE_URI', 'http://schemas.xmlsoap.org/soap/encoding/');
    -- search for 'binding style'
    -- although 'document' was used, it produced an error, thus we will use 'rpc'
    -- this value is generally only 'document' or 'rpc'
    utl_dbws.set_property(call_, 'OPERATION_STYLE', 'rpc');
    -- search for 'xmlns:xs' to know the value of the first parameter
    -- under <xs:element name="NumberToWords"> you will see the line <xs:element name="ubiNum" type="xs:unsignedLong" />
    -- thus the return type is 'unsignedlong', removing 'xs:'
    -- however, upon testing, using 'unsignedlong' produced an error, while 'string' did not, so we will use 'string'
    string_type_qname := utl_dbws.to_qname('http://www.w3.org/2001/XMLSchema', 'string');
    -- under <xs:element name="NumberToWords"> you will see the line <xs:element name="ubiNum" type="xs:unsignedLong" />
    -- the element name is 'ubiNum', thus we put in 'ubiNum'
    -- the 'ParameterMode.IN' is used to specify that we will be passing an "In Parameter" to the web service
    -- the 'ParameterMode.IN' is a constant variable in the utl_dbws package
    utl_dbws.add_parameter(call_, 'ubiNum', string_type_qname, 'ParameterMode.IN');
    utl_dbws.set_return_type(call_, string_type_qname);
    -- supply the In Parameter for the web service
    params(0) := ANYDATA.convertvarchar('12345');
    -- invoke the web service
    retx := utl_dbws.invoke(call_, params);
    -- access the returned value and output it to the screen
    retx_string := retx.accessvarchar2;
    dbms_output.put_line('PL/SQL DII client return ===> ' || retx_string);
    -- release the web service call
    utl_dbws.release_service(service_);
    end;
    NOTES AND REFERENCES
    =================================================================
    This detailed step-by-step guide was produced with the following guide http://www.oracle.com/technology/sample_code/tech/java/jsp/callout_users_guide.htm
    I could still not load Oracle JAX-RPC client to SCOTT (step 4) as it produces an error. See the following for more details :
    http://forums.oracle.com/forums/thread.jspa?threadID=633219&tstart=0
    Also, I could not consume some of the other free Web Services out there for reasons I don't know, hope someone can help clarify. See the following for more details :
    http://forums.oracle.com/forums/thread.jspa?threadID=630733&tstart=0
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    Instructions on how to use Oracle10gR2 Webservice Call-In feature
    PREREQUISITE
    =================================================================
    1. Download Oracle Database 10g Release 2 (10.2.0.1.0) (ZIP, ~655MB)
    http://www.oracle.com/technology/software/products/database/oracle10g/htdocs/10201winsoft.html
    http://download.oracle.com/otn/nt/oracle10g/10201/10201_database_win32.zip
    1.1 Choose Enterprise Edition
    2. Download OC4J Standalone - Oracle Containers for J2EE (OC4J) 10g Release 3 (10.1.3.3) (ZIP, ~93MB; Pure Java—runs on all certified platforms)
    http://www.oracle.com/technology/software/products/ias/index.html (Download Site)
    http://download.oracle.com/otn/java/oc4j/101330/oc4j_extended_101330.zip
    2.1 Extract to C:\oracle\product\10.2.0\db_1\oc4j_extended_101330
    STEP-BY-STEP PROCEDURES
    =================================================================
    1. Connect to SYS account and create user STORE
    CREATE USER store IDENTIFIED BY store;
    GRANT connect, resource TO store;
    2. Connect to Oracle using the user STORE and password STORE
    CONNECT store/store;
    3. Execute the following objects for this excercise
    CREATE SEQUENCE order_sq;
    CREATE TABLE product_types (
    product_type_id INTEGER
    CONSTRAINT product_types_pk PRIMARY KEY,
    name VARCHAR2(10) NOT NULL
    CREATE TABLE products (
    product_id INTEGER
    CONSTRAINT products_pk PRIMARY KEY,
    product_type_id INTEGER
    CONSTRAINT products_fk_product_types
    REFERENCES product_types(product_type_id),
    name VARCHAR2(30) NOT NULL,
    description VARCHAR2(50),
    price NUMBER(5, 2)
    CREATE TABLE customers (
    customer_id INTEGER
    CONSTRAINT customers_pk PRIMARY KEY,
    first_name VARCHAR2(10) NOT NULL,
    last_name VARCHAR2(10) NOT NULL,
    dob DATE,
    phone VARCHAR2(12)
    CREATE TABLE orders (
    order_id INTEGER
    CONSTRAINT orders_pk PRIMARY KEY,
    product_id INTEGER
    CONSTRAINT purchases_fk_products
    REFERENCES products(product_id),
    customer_id INTEGER
    CONSTRAINT purchases_fk_customers
    REFERENCES customers(customer_id),
    quantity INTEGER NOT NULL
    INSERT INTO customers (
    customer_id, first_name, last_name, dob, phone
    ) VALUES (
    1, 'John', 'Brown', '01-JAN-1965', '800-555-1211'
    INSERT INTO product_types (
    product_type_id, name
    ) VALUES (
    1, 'Book'
    INSERT INTO products (
    product_id, product_type_id, name, description, price
    ) VALUES (
    1, 1, 'Modern Science', 'A description of modern science', 19.95
    COMMIT;
    CREATE OR REPLACE PACKAGE dbfunc AS
    FUNCTION place_order (
    p_product_id INTEGER,
    p_customer_id INTEGER,
    p_quantity INTEGER
    RETURN VARCHAR2;
    END dbfunc;
    CREATE OR REPLACE PACKAGE BODY dbfunc AS
    FUNCTION place_order (
    p_product_id INTEGER,
    p_customer_id INTEGER,
    p_quantity INTEGER
    RETURN VARCHAR2 IS
    v_customer_count INTEGER;
    v_product_count INTEGER;
    v_order_id INTEGER;
    BEGIN
    -- count the number of products with the
    -- supplied p_product_id (should be 1 if the product exists)
    SELECT COUNT(*)
    INTO v_product_count
    FROM products
    WHERE product_id = p_product_id;
    IF v_product_count = 0 THEN
    RETURN 'No such product';
    END IF;
    -- count the number of customers with the
    -- supplied p_customer_id (should be 1)
    SELECT COUNT(*)
    INTO v_customer_count
    FROM customers
    WHERE customer_id = p_customer_id;
    IF v_customer_count = 0 THEN
    RETURN 'No such customer';
    END IF;
    -- get the next value from orders_sq
    SELECT order_sq.nextval
    INTO v_order_id
    FROM dual;
    -- place the order
    INSERT INTO orders (
    order_id, product_id, customer_id, quantity
    ) VALUES (
    v_order_id, p_product_id, p_customer_id, p_quantity
    COMMIT;
    RETURN 'Order placed with id of ' || v_order_id;
    EXCEPTION
    WHEN OTHERS THEN
    ROLLBACK;
    RETURN 'Order not placed';
    END place_order;
    END dbfunc;
    4. Install and Configure OC4J
    4.1 Change Directory
    4.1.1 Open command prompt (cmd.exe)
    4.1.2 CD C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\bin
    4.2 Configure Environment variables (type in command prompt)
    4.2.1 set JAVA_HOME=C:\oracle\product\10.2.0\db_1\jdk
    4.2.2 set ORACLE_HOME=C:\oracle\product\10.2.0\db_1\oc4j_extended_101330
    4.3 Starting OC4J for the first time
    4.3.1 oc4j -start
    4.3.2 If this is not your first time to "start" oc4j, go to step 4.3.4
    4.3.3 Set oc4jadmin password (use the password "oracle" w/o the quotation marks)
    08/03/21 17:13:54 Set OC4J administrator's password (password text will not be displayed as it is entered)
    Enter password:
    Confirm password:
    Confirm password: The password for OC4J administrator "oc4jadmin" has been set.
    08/03/21 17:14:01 The OC4J administrator "oc4jadmin" account is activated.
    4.3.4 OC4J has started if you see the message :
    08/03/21 17:14:16 Oracle Containers for J2EE 10g (10.1.3.3.0) initialized
    4.3.5 Leave this command prompt open
    4.4 Configure Data Source
    4.4.1 Open a new command prompt via the cmd.exe command
    4.4.2 type "hostname" and then press enter
    4.4.3 Keep this command prompt open for later use
    4.4.4 Open Windows Explorer and navigate to the folder C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\j2ee\home\config
    4.4.5 Open the file data-sources.xml
    4.4.6 Modify and Save the file so that it will look something like the following :
    4.4.6.1 Note that "hpv2710us" is my hostname found in step 4.4.2
    4.4.6.2 Note that "ORCLDEV" is the name of my Oracle Instance. (Default installation uses ORCL only)
    <connection-pool name="Example Connection Pool">
    <connection-factory factory-class="oracle.jdbc.pool.OracleDataSource"
    user="store"
    password="store"
    url="jdbc:oracle:thin:@//hpv2710us:1521/ORCLDEV">
    </connection-factory>
    </connection-pool>
    4.4.7 Close the text editor
    4.4.8 Close the Windows Explorer
    4.4.9 Close this command prompt (type exit)
    5. Publishing a PL/SQL Package as a Database Web Service
    5.1 Create the config.xml file
    5.1.1 Open Notepad.exe
    5.1.2 Copy and Paste the following :
    5.1.2.1 Note that "hpv2710us" is my hostname found in step 4.4.2
    5.1.2.2 Note that "ORCLDEV" is the name of my Oracle Instance. (Default installation uses ORCL only)
    <web-service>
    <display-name>PLSQL Web Service</display-name>
    <description>PLSQL Sample</description>
    <destination-path>./dbfunc.ear</destination-path>
    <temporary-directory>/tmp</temporary-directory>
    <context>/plsqlsample</context>
    <stateless-stored-procedure-java-service>
    <jar-generation>
    <schema>store/store</schema>
    <db-url>jdbc:oracle:thin:@hpv2710us:1521:ORCLDEV</db-url>
    <prefix>db.func.place.order</prefix>
    <db-pkg-name>dbfunc</db-pkg-name>
    </jar-generation>
    <uri>/dbfunc</uri>
    <database-JNDI-name>jdbc/OracleDS</database-JNDI-name>
    </stateless-stored-procedure-java-service>
    <wsdl-gen>
    <wsdl-dir>wsdl</wsdl-dir>
    <option name="force">true</option>
    <option name="httpServerURL">http://localhost:8888</option>
    </wsdl-gen>
    <proxy-gen>
    <proxy-dir>proxy</proxy-dir>
    <option name="include-source">true</option>
    </proxy-gen>
    </web-service>
    5.1.3 Save file as config.xml in the directory C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\j2ee\home\config
    5.1.3.1 Note it should be config.xml and not config.txt
    5.1.4 Close the text editor
    5.2 Publish dbfunc Oracle Package as a Web Service
    5.2.1 Open a new command prompt via the cmd.exe command
    5.2.2 CD C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\j2ee\home
    5.2.3 mkdir ear
    5.2.4 CD ear
    5.2.5 set ORACLE_HOME=C:\oracle\product\10.2.0\db_1\oc4j_extended_101330
    5.2.6 set CLASSPATH=.;%ORACLE_HOME%\webservices\lib\wsdl.jar;%ORACLE_HOME%\lib\xmlparserv2.jar;%ORACLE_HOME%\soap\lib\soap.jar
    5.2.7 java -jar %ORACLE_HOME%\webservices\lib\WebServicesAssembler.jar -config C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\j2ee\home\config\config.xml
    Please wait ...
    STORE.DBFUNC
    5.2.8 java -jar %ORACLE_HOME%\j2ee\home\admin_client.jar deployer:oc4j:localhost:23791 oc4jadmin oracle -deploy -file C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\j2ee\home\ear\dbfunc.ear -deploymentName dbfunc
    08/03/21 17:46:23 Notification ==>Application Deployer for dbfunc COMPLETES. Operation time: 296 msecs
    5.2.9 java -jar %ORACLE_HOME%\j2ee\home\admin_client.jar deployer:oc4j:localhost:23791 oc4jadmin oracle -bindWebApp -appname dbfunc -webModuleName dbfunc_web
    5.2.10 java -jar %ORACLE_HOME%\j2ee\home\admin_client.jar deployer:oc4j:localhost:23791 oc4jadmin oracle -bindAllWebApps -appname dbfunc
    5.2.11 Close this command prompt (type exit)
    6. Test dbfunc Web Service
    6.1 Restart OC4J
    6.1.1 Open the command prompt you used to start OC4J in step 4.1.1/4.3.1
    6.1.2 In the keyboard, hit Ctrl+C
    6.1.2.1 Type "Y" and then hit Enter
    08/03/21 18:02:51 Shutting down OC4J...
    Terminate batch job (Y/N)? Y
    6.1.2.2 Note that the command prompt should still be open
    6.1.2.2.1 If you accidentally closed the command prompt just do the following
    6.1.2.2.1.1 Do 4.1.1 to 4.2.2 and then proceed to 6.1.3
    6.1.3 oc4j -start
    Starting OC4J from C:\oracle\product\10.2.0\db_1\oc4j_extended_101330\j2ee\home...
    08/03/21 18:07:57 Oracle Containers for J2EE 10g (10.1.3.3.0) initialized
    6.1.4 Leave this command prompt open
    6.2 Use the Web Service to "Order an Item"
    6.2.1 Connect to Oracle using the user STORE and password STORE
    6.2.2 select * from orders
    6.2.2.1 Zero row should return
    6.2.3 Open Internet Explorer
    6.2.4 Navigate to http://localhost:8888/plsqlsample/dbfunc
    6.2.5 Input the following :
    6.2.5.1 param0 value: 1
    6.2.5.2 param1 value: 1
    6.2.5.3 param2 value: 10
    6.2.6 Click the Invoke button
    6.2.7 A pop-up window will appear having the following contents :
    <?xml version="1.0" encoding="UTF-8" ?>
    - <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    - <SOAP-ENV:Body>
    - <ns1:placeOrderResponse xmlns:ns1="http://db.func.place.order/dbfunc.wsdl" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <return xsi:type="xsd:string">Order placed with id of 1</return>
    </ns1:placeOrderResponse>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    6.2.8 Go back to SQLPLUS or Toad and execute "select * from orders" again
    6.2.8.1 There should be one row
    ORDER_ID, PRODUCT_ID, CUSTOMER_ID, QUANTITY
    1, 1, 1, 10
    NOTES AND REFERENCES
    =================================================================
    This detailed step-by-step guide was produced with the following article by Jason Price http://www.oracle.com/technology/pub/articles/price_10gws.html

    Success!!!
    I had to grant this permissions:
    call dbms_java.grant_permission( 'WS_TEST', 'SYS:java.lang.RuntimePermission', 'getClassLoader', '' );
    call dbms_java.grant_permission( 'WS_TEST', 'SYS:java.lang.RuntimePermission', 'accessClassInPackage.sun.util.calendar', '' );
    call dbms_java.grant_permission( 'WS_TEST', 'SYS:java.lang.RuntimePermission', 'setFactory', '' )
    call dbms_java.grant_permission( 'WS_TEST', 'SYS:java.util.PropertyPermission', 'HTTPClient.socket.idleTimeout', 'write' );
    call dbms_java.grant_permission( 'WS_TEST', 'SYS:java.net.SocketPermission', 'localhost', 'resolve' );
    call dbms_java.grant_permission( 'WS_TEST', 'SYS:java.net.SocketPermission', '127.0.0.1:8084', 'connect,resolve' );
    As I wrote earlier, WS_TEST is my user into which I load JAX-RPC client. Note that, if you load JAX-RPC client into user another than SYS, you have NOT to use -s -grant public option (wassam wrote about this too). Another thing is that I (finally) didn't load OC4J. To consume WebService I use utl_dbws.invoke(call_Handle CALL, request SYS.XMLTYPE) function.
    voytec001

  • Pls explain sales order stock step by step with t-codes

    Hi friends,
    can anybody explain the step by step procedure for configuring sales order stock.
    Stock that is used for a sales order. It is directly allocated to a sales order. Components can only be used to produce material ordered by the customer and the finished product can only be delivered to the customer via the sales order.
    You can manage valuated or non-valuated sales order stock.
    If the sales order stock is not valuated, it is managed via a cost collector. The system does not carry out invoice verification postings for goods movements, and you cannot obtain an overview of how the stock is valuated until the end of the settlement period in Controlling.
    If the sales order stock is valuated, you have immediate access to its value in Financial Accounting. The assigned accounts are debited and credited as a result of the valuated goods movements.
    but i am not clear of how to map it into sap.kindly explain it step by step.

    thank you

  • Screen - exits - step by step simple examples

    hi ,
    i am new to user exits.
    pls help me by giving step by step example for creating a subscreen with 2 fields , and incorporate with some standard sap transactions.
    there are many who discussed the same topic in the forum ,but i find confusing.
    *so please don't give me the links, take standard transaction and provide me step by step .
    Thank you.
    regards
    Sree

    hi,
    SAP provides standard transactions to enter data into database. But a client may want to maintain some additional information in SAP other than what is provided.
    To make provisions for this, additional screens have to be provided and additional fields must be added into appropriate database table.
    To pave way for this, SAP has provided the option for screen exits. Usually, SAP provides the following:
    An append structure in the database table with the new fields.
    A subscreen area into the standard screen u2013 where the programmer can attach his subscreen of his own program with the new fields.
    A function group under which the new subscreen has to be created with the new fields.
    Function exits to synchronize the PBO and PAI of the standard SAP program with the PBO and PAI of the subscreen u2013 so that data can flow back and forth between the standard SAP program and the program written by the developer for the subscreen. These function modules also exist in the same function group under which the subscreen will have to be developed.
    Finally, a linkage has to be done between the subscreen area of standard SAP screen with the custom subscreen constructed by the developer.
    Typically, SAP provides an enhancement in which the developer can create an append structure, use the function exits to synchronize the PBO and PAI of the standard SAP program and the custom subscreen program, and make the necessary linking( as mentioned above in step 4. But, again, this is not a hard and fast rule. Linking in some case, is also done by configurations.) SAP also usually provides the name of the function group under which the subscreen has to be developed.
    Necessary guidance about implementing a screen exit development is usually available in the Documentation section of the enhancement ( can be availed by transaction SMOD).
    Pre-Requisites
    The developer to work on screen exit should have essential knowledge on the following:
    DDIC concepts, including the knowledge of append structure.
    Concept of SAP Enhancements and implementing them using Projects.
    Concept of function exits.
    Knowledge on Module Pool u2013 including subscreens, Tabstrip controls etc.
    Steps
    Guidelines
    So, a developer can follow the guidelines mentioned below to implement a screen exit to a standard SAP transaction, as and when required:
    Find out the Required Enhancements
    Go to SMOD. Press F4 in the Enhancement field. In the next popup window, click pushbutton u2018SAP Applicationsu2019. A list will appear that contains information on all the enhancements, categorized under functional areas. Developer must search for the enhancements relevant to his functional area of interest u2013 for e.g., Purchasing, Asset Accounting, etc.
    Note down the enhancements. Then, come to the initial screen of SMOD and view the documentation of each enhancement to find out which one is required for your development.
    Utilize the Enhancement in a Project
    After you have found one, do as directed in the documentation. Generally, the steps are as follows:
    Create a project using CMOD including your enhancement.
    Create the append structure with new fields.
    Go to the desired function group and create a subscreen with the new fields. Write PBO and PAI for the subscreen, if required.
    Use the function exits in the enhancement to link the PBO and PAI of the subscreen with that of the main SAP program supporting the SAP transaction.
    Maintain necessary linkage between the subscreen area of standard SAP program with the custom subscreen developed along with the custom program name. This can be done in the project (developed by CMOD including the enhancement) or outside as a part of configuration.
    Activate the project.
    Test to ensure that required functionality are met.
    Case Study 1
    Add three new custom fields for Asset master and maintain information for them
    Requirement
    Three fields in the legacy system have to be maintained in Asset master. These fields are:
    Original Asset number u2013 20 characters
    Location 2 u2013 15 Characters.
    Model no u2013 20 characters
    Location 2 should start with u2018Lu2019.
    Pre-Analysis
    Finding out the Enhancement
    As described above, the enhancement is determined. It was found, that enhancement AIST0002 will serve the purpose. It contains the following components (can be viewed by transaction SMOD):
    Exit Type Description EXIT_SAPL1022_001 Function Exit Check of User-Defined Fields when Using Create and Change BAPI EXIT_SAPLAIST_002 Function Exit Transfer Data for User Subscreens in PBO. EXIT_SAPLAIST_003 Function Exit Transfer of User-Defined Fields to SAP Master Data Transactions CI_ANLU Customizing Include Include structure to add new fields
    Studying the Function Exits
    The function module level documentation for the function exits are then viewed from transaction SE37. The documentation clearly laid out for the purpose for their use:
    EXIT_SAPLAIST_002
    Function module Level Documentation
    This function module is called by asset master data maintenance at the start of the dialog. (When changing, it is called after reading of the data from the database; when creating it is called after the transfer of the default values from the asset class and reference asset.) The purpose of the function module is to enable this function group to recognize the master data. For interpreting or controlling master data fields that are important for user fields, it is possible to transfer to global variables at this point, so that they can be recognized when the user subscreens are processed.
    Import Parameters
    Understanding
    This function module is called at the PBO to pass the information retrieved from the database to pass them to the custom subscreen and its underlying program. Import parameter : I_ANLU will be populated with the values for user-defined fields which will be passed to the subscreen program. So, there must be some sort of variable assignment from I_ANLU.
    EXIT_SAPLAIST_003
    Function module Documentation: This function module is called by SAP asset master data maintenance after the screens are processed, but before saving. The purpose of the function module is to transfer fields entered on user sub-screens of SAP asset data maintenance to the database for updating. The export parameter for this function module is:
    Understanding
    This function module will be used to transfer the user entered data in the subscreen fields to the main SAP program, which will then be saved into the database.
    Studying the Documentation of the Enhancement
    The enhancement documentation (as is viewed from the initial screen of SMOD] also supports the idea. Moreover, it informs that we need to develop a subscreen under function group XAIS. This is the function group under which the two function exit modules also exist. So, if the custom subscreen refers to the global data of the function group XAIS, then those values will also be available to these function exits as well.
    Going to SE80 and viewing the function group XAIS helps us to inform that there are three DDIC tables declared for it:
    Deciding the Final course of Action
    After making all the investigations, the final course of action was determined.
    SrlNo Step Justification
    A project has to be created using transaction CMOD where the enhancement AIST0002 will be included.
    Customizing include CI_ANLU has to be created with the custom fields demanded When CI_ANLU will be developed, the custom fields will get appended to the database table ANLU. Also, these fields will be used to create screen fields in the new subscreen.
    A custom subscreen, say, 9000 will be developed under function group XAIS. The screen group for the screen will be u2018CUSTu2019 (or any name). The three custom fields added to table ANLU (by creating CI_ANLU) will be used to create new fields in the screen.
    In the PAI of the subscreen, validation for Location to start with u2018Lu2019 will be added. The subscreen with three new fields has to be developed so that it can be attached to a subscreen area of the asset master screens.
    In the custom include of the function exit module u2018EXIT_SAPLAIST_002u2019, the following code will be written:-
    ANLU = I_ANLU. I_ANLU is the import parameter of this FM. The value is assigned to the global variable ANLU, referring which the three new subscreen fields are developed. So, data retrieved from database table ANLU will be passed to this FM as I_ANLU by the standard SAP main program. The value will be taken and passed to the global variable of the function group XAIS, so that the three custom fields (referring to ANLU of XAIS) get populated.
    In the custom include of the function exit module u2018EXIT_SAPLAIST_003u2019, the following code will be written:-
    E_ANLU = ANLU. The changed values in the subscreen fields exist in global variable ANLU for the function group XAIS. This function exit module will pass the data back to the SAP main program as E_ANLU.
    Proper linkage/configuration has to be done so that the new subscreens get linked to the appropriate subscreen area of the Asset master screen. This has to be done u2013 otherwise, the new custom subscreen will not be displayed in the Asset master screens.
    Development
    Creating a Project to include the enhancement
    Go to transaction CMOD and create a project.
    Enter a description for the project. Then, click on the pushbutton u2018Enhancement Assignmentsu2019 in the Application Toolbar.
    Enter the name of the enhancement and Save.
    Go to u2018Componentsu2019.
    Creating Custom Include for ANLU
    The screen shown below will appear, showing all the enhancement components under the assignment AIST0002. Double-click on the name of the Include Structure to create it.
    Create the include structure with three new fields, as required. Then, save and activate it.
    Develop the subscreen and the program
    Go to transaction SE80. For the function group XAIS, create a new subscreen 9000.
    Create it as subscreen.
    Then, go to the Layout of the screen and create three new fields from Database table ANLU.
    Drag the fields in the screen body and place them.
    Then, save and activate the screen and come back to screen flow editor.
    Create the PAI module to add validation for field u201CLocation 2u201D, as required .
    Activate the whole function group and come out.
    Write code in the Function Exits to synchronize the programs
    Now, code has to be written in the function modules EXIT_SAPLAIST_002 and EXIT_SAPLAIST_003 so that data flows to and fro between the main SAP program and custom subscreen program. For that, go back to transaction CMOD and change the function exits.
    Write code in the function module EXIT_SAPLAIST_002 called once at the beginning of the transaction:
    Write code in EXIT_SAPLAIST_003 to pass the data from the subscreen to SAP main program.
    Then, activate everything u2013 the whole project and come out.
    Complete the configuration to link the subscreen
    The development portion is complete. Now, linking of the subscreen has to be done with the subscreen area of the main program. In most of the cases, this linking can be done in the enhancement itself. But, here, requirement is a bit different. It is done by configuration using SPRO.
    Assets are created under Asset class. And for each asset class, there is a layout assigned to it. For a layout, there are multiple tab pages assigned to it. And, for each tab page, there are multiple screen groups/field groups assigned.
    Here, the requirement is to create these three custom fields in the tab page u2018Generalu2019 of asset master screen ( AS01/AS02/AS03/AS91).
    Determine the Layout
    To achieve this, first of all, we need to find out which layout is assigned to asset class 1000.For that, go to transaction AOLK( information has to be obtained from functional consultant).Select the Asset Class u20181000u2019 and click on folder u2018General Assignment of Layoutu2019.
    Here, for Asset class 1000, for all the user groups, tab layout SAP is assigned. Since layout u2018SAPu2019 cannot be changed, it has to be copied and manipulated to include our screen group. Later, the new layout has to be assigned over here.
    Create new tab layout
    Go to transaction AOLA. Copy the tab layout u2018SAPu2019 to create another layout, say, YSUB.
    System will copy all the settings and will inform you about that.
    Select your newly created layout and double-click on the folder u2018Tab page titlesu2019.
    You want to put your custom fields in the tab page u201CGeneralu201D. So, select this tab page entry and double-click on the folder "Position of Groups".
    Here, all the field groups currently residing in the tab-page u201CGeneralu201D are shown. Add an entry for your newly created fields.
    Select the group box from the list. An entry will come with u201CUu201D padded with the custom subscreen prepared by you.
    Then, save and come out.
    Assign the new Layout to Asset Class
    Now, go to tcode AOLK and assign tab layout YSUB for asset class 1000.
    Save and come out.
    Test the Exit
    Everything is over. Now, go to transaction code AS01/02/03 or AS91 to deal with an asset of asset class 1000. You will see your new fields added to the screen. Add values to themu2026save. Then, enter into the tcodes again to see whether the values entered by you are being displayed or not.

  • Pls give me step by step sequence of Automatic Payment Prog

    Hi,
    Pls give me step by step sequence of Automatic Payment Program.
    Thanks in Advance

    Hi,
    Automatic Processing :  In this processing the system prepares open item to be paid and prepare a payment document & to this payment document the system prepares a cheque with the payment advise note automatically
    Configuration of Automatic Payment Program :  SPRO -  Ref-IMG-FA-A/R&A/P u2013 Business Transaction- Outgoing Payments u2013 Automatic Outgoing Payment u2013 Payment Method/Bank Selection for payment program u2013 Set up all Company codes for payment transactions.(T.Code:FBZP)
    New Entries
    Company code : 6023
    Control data
    Paying Company code : 6023
    Enter & Save  back to menu item
    Setup paying  Company Code for Payment Transactions :
    New entries
    Paying Company Code : 6023
    Control Data
    Minimum amount for incoming payment ________
    Minimum amount for outgoing payment  500  INR
    Forms
    Sender Details
    Select Forms
    Form for the payment advice u2013 Select International Payment advice Note F_110_IN_AVIS
    Save          back to menu Item
    Setup payment methods per country per payment Transaction :
    New Entries
    Country IN
    Payment method X (any identification No or Alpha)
    Description Cheq
    Payment method for
    u2022     Outgoing payment
    Payment method classification    * Check
                                       Posting Details
                                       Document type for payment KZ
                                       Clearing Document Type     KA
    Use classic payment medium programs payment medium program RFFOUS_C
    RFFO  :     Program Code
    US     :     Country
    C     :     Payment
    Name of Print dataset :  LIST1S
    & SAVE  Back to menu Item
    Setup payment methods per Co code for Payment Transactions
    New Entries
    Paying Company Code : 6023
    Payment Method X
    Minimum Amount 500
    Maximum Amount  5000000
    Select form data
    Forms
    Form for the payment transfer medium F_110_PRENUM_CHECK
    (International u2013 Check (with check management)
    Next form
    Enter & Save  back to menu item
    Set up Bank determination for Payment Transaction : 
    Select Position button
    Paying Company Code 6023
    Paying Company Code     Name
    6023     Reliance Infocom
    Select Company Code
    Select Bank Selection : Ranking Order
    New Entries
    PAYMENT      CURRENCY            RANK ORDER          HOUSE BANK
    X          INR               1                   6SBI0
    X          INR               2                   6ICIC  (NEXT PREFERED BANK)
    ENTER & SAVE
    Select Bank Accounts
    New Entries
    HOUSE BANK     PAYMENT     CURRENCY        ACCOUNT ID    BANK SUB A/C
    6SBI0               X                   INR          6S002          211002
    6ICIC                X                   INR          6I002          211002
    If we do not specify currency --- all the currency accepted
    Save
    Select Available Amounts
    New Entries
    House Bank     Account ID     Days     Currency     Available for O/  Pay
    6SBI0             6S002     999         INR               500000
    6ICIC              6I002     999         INR               500000
    Save & Bank to Menu Item
    CHANGE VENDOR MASTER RECORD TO SPECIFY THE PAYMENT METHOD    XK02 :
    Vendor          1000000
    Co Code      6023
    Co Code Data
      Payment Transactions
    Enter
    Automatic Payment Transactions
    Payment Method    X
    & Save
    lly
    For all the Vendor Master Record specify the payment method
    Execution of Automatic Payment Program :-       Accounting u2013 FA u2013 A/P u2013 Periodic
    Processing F-110 u2013 Payments
    Enter Run Date : 20-04-2006
    Identification Code : YRK00
    Select Parameters
    Posting Date : 20-04-2006 Doc entered upto 20-04-2006
    Payment Control
    Company Code     Pmt Method          Next Posting Date
         6023               X               21-04-2006
    Accounts
    Select Vendor Accounts 1000000 to 3840099
    Specify the range of vendors
    Save the parameters
    Select Status Button
    Select Proposal Button
       Start immediately
    Continue
    Press enter key until the system displays a message payment proposal has been created.
    To Check Payments List u2013 Select Edit Proposal
        Continue
    The System displays
    Vendor      Item      PM       H.Bank                    Curr        Amount
    1000000          2          X           6S002    6SBIO        INR       500000-00
    To Block the Payment :   Double click on the item - again double Click
    Block
    Payment Block   A  Blocked for payment
    Continue
    Select back button
    Select exceptional list item u2013 Select Reallocation Block
    Payment Method X
    House Bank 6ICIC  61002
    Continue
    Select back button
    Save
    Select back button
    Select Printout/datamedium
    From printing/data medium exchange
    Program                Varient
    RFFOAVIS                            6023  AVIS
    Keep the cursor on first row/Columns Enter
    Name  : 6023 AVIS
    Select maintain Varients
    Select Continue Button
    Program run date
    Paying Co. Code  6023
    Number of Sample
    u2022     Print immediately
    u2022     Select attributes
    Varient Name
    Meaning     Payment advice form
    & Save
    Select back button
    Keep the cursor on 3rd row first column
    Program     Variant
    RFFOAVIS     6023 AVIS
    RFFOEDI1
    RFFOUS_C    6023SBI  (3RD ROW FIRST COLUMN)
    Select maintain Variant
    Paying Co Code : 6023
    Further Selection
    Paymethod   X
    House Bank  6SBI0
    Account ID 6S002
    Check Lot No : 2
    *     Print Checks                    Printer LP01   *  Print immediately
    *     Print Payment Advise Note          Printer LP01   *  Print immediately
    *     Print Payment Summery          Printer LP01   *  Print immediately
    Output Control
    Number of Sample Printouts     0
    Select Attributes Button
    Varient Name          6023SBI
    Meaning          State Bank of India
    Save
    Select back button
    From Printing
    Program Variant
    RFFOAVIS
    RFFOEDI1
    EFFOCUS_C 6023 ICICI
    Maintain Varient
    Paying Co Code : 6023
    Further Selections
    Payment Method X
    House Bank 6 ICIC
    Account ID 61002
    Check Lot No.2
    Print Control
    *     Print Checks                    Printer LP01   *  Print immediately
    *     Print Payment Advise Note          Printer LP01   *  Print immediately
    *     Print Payment Summery          Printer LP01   *  Print immediately
    Output Control
    Number of Sample Printouts     0
    Select Attributes Button
    Varient Name          6023ICICI
    Meaning          ICICI
    Save
    Select back button
    Select Status Button
    Select Payment Run
    Start Date : 20-04-2006  Start immediately
    Create Payment medium
    Select Continue Button
    Press Enter Key until system the display message u2013 payment run has been carried out
    Select Printout
    Print JOB
    JOB NAME          F11020060420-YRK00--?  1
    To check the job: System u2013 Services u2013 Output u2013Control u2013 Execute
    Spool No Type Date Time Status Pg Title Cheque
    *1167
    Select Display Content Button
    *1168               Payment Advice
    Post with Print Form  : 
    Accounting u2013 FA u2013 A/P u2013 Document Entry u2013 Outgoing Payment u2013 F-58
    Post+Print Form
    Payment method and form specifications
    Co Code   : 6023
    Payment Method X
    House Bank 6 ICIC
    Check Lot No : 2
    Alternative Form F110-PRENUM-CHK
    Printer
    Printer for Forms LP01       * Print immediately
    Payment Advice Printer LP01
    Enter Payments
    Document Date : 20-04-2006
    Posting Date      : 20-04-2006
    Bank Posting details
    Amount : 10000
    Value Date : 20-04-2006
    Payee
    Vendor  383001
    Select Process Open Items
    Select Partial Payment
    Simulate
    Post
    Print Parameters
    Output          LP01
    Number of copies 1
    *Continue
    The System display-PrintJob was generated System u2013 Services- Output Control
    Spool Req Number   XXXX
    Execute               Title
    Cheque
    u2022     Select  Display Content Button

  • Step by Step Deploying ADF Faces to OC4J 10.1.2

    Hi there,
    I've already read the previous topic about deploying ADF Faces to OC4J 10.1.2.
    But I'm still getting failed to deploy it.
    Some clue that I know are:
    - Using JDK 1.4.2 (not 1.5)
    - Using J2ee 2.3 (not 2.4)
    - Using ADF Runtime installer to OC4J 10.1.2
    But i've got some problem, when I'm trying to run my project using jdk 1.4.2. It gives me an error like this:
    classloader.util.AnnotatedClassFormatError: MBeanServerEjbHome_StatefulSessionHomeWrapper1
         Invalid class: MBeanServerEjbHome_StatefulSessionHomeWrapper1
         Loader: system.root:0.0.0
         Code-Source: /D:/av/src/Jdev1013/jdev/system/oracle.j2ee.10.1.3.36.73/embedded-oc4j/application-deployments/admin_ejb/deployment-cache.jar
         Configuration: <ejb> in wrappers
         Dependent class: com.evermind.server.ejb.deployment.SessionBeanDescriptor
         Loader: oc4j:10.1.3
         Code-Source: /D:/av/src/Jdev1013/j2ee/home/lib/oc4j-internal.jar
         Configuration: &lt;code-source> in META-INF/boot.xml in D:\av\src\Jdev1013\j2ee\home\oc4j.jar
    Can anyone tell me how to deploy ADF Faces to 10.1.2 step by step?
    Thanx in advance :),
    Andre

    I have the same problem. My applications works fine with Jdev 10.1.3 but after deploying it on the application server I'm getting this error.
    Started
    adfmobile: jsp: init
    adfmobile: Started
    adfmobile: resources: init
    adfmobile: JspServlet: unable to dispatch to requested page: Exception:oracle.jsp.parse.JspParseException:
    /index.jspx: Line # 9, <jsp:output omit-xml-declaration="true" doctype-root-element="HTML" doctype-system="http://www.w3.org/TR/html4/loose.dtd"
    doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" xmlns:jsp="http://java.sun.com/JSP/Page"/>
    Error: jsp:output is not a registered tag in that namespace.
    adfmobile: JspServlet: unable to dispatch to requested page: Exception:oracle.jsp.parse.JspParseException:
    /index.jspx: Line # 9, <jsp:output omit-xml-declaration="true" doctype-root-element="HTML" doctype-system="http://www.w3.org/TR/html4/loose.dtd"
    doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" xmlns:jsp="http://java.sun.com/JSP/Page"/>
    Error: jsp:output is not a registered tag in that namespace.
    Any hints?
    Regards,
    Thomas

  • Please tell me the step by step process of backup and full restore

    Dear all,
    we are using ecc5 and windows and oracle 9i I am going to apply support package .Please tell me the step by step process of backup and full restore . I am using DB13 for backup. Please suggest.
    Regards,
    Shiva

    Hi,
    Login as <SID>adm user & run the following command
    brrestore -b <backup logfilelogfile> -m full
    this command restore the backup.
    you can find backup logfile in /oracle/<SID>/sapbackup/.ant or .aft .
    For backup using brtools follow the following procedure:-
    Run Brtools Than you get the following option
    1 = Database backup
    2 - Archivelog backup
    3 - Database copy
    4 - Non-database backup
    5 - Verification of database backup
    6 - Verification of archivelog backup
    7 + Additional functions
    8 - Reset input values
    Standard keys: c - cont, b - back, s - stop, r - refr, h - help
    BR662I Enter your choice:
    1
    BR280I Time stamp 2008-04-04 18.41.57
    BR663I Your choice: '1'
    BR280I Time stamp 2008-04-04 18.41.57
    BR657I Input menu 15 - please check/enter input values
    BRBACKUP main options for backup and database copy
    1 - BRBACKUP profile (profile) ....... [initPRD.sap]
    2 - Backup device type (device) ...... [tape]
    3 ~ Tape volumes for backup (volume) . []
    4 # BACKINT/Mount profile (parfile) .. []
    5 - Database user/password (user) .... [system/*******]
    6 - Backup type (type) ............... [online]
    7 - Back up disk backup (backup) ..... [no]
    8 # Delete disk backup (delete) ...... [no]
    9 ~ Files for backup (mode) .......... [all]
    Standard keys: c - cont, b - back, s - stop, r - refr, h - help
    BR662I Enter your choice:
    3
    BR280I Time stamp 2008-04-04 18.42.25
    BR663I Your choice: '3'
    BR280I Time stamp 2008-04-04 18.42.25
    BR681I Enter string value for "volume" (scratch|<tape_vol>|<tape_vol
    PRDB04
    BR280I Time stamp 2008-04-04 18.43.06
    BR683I New value for "volume": 'PRDB04'
    BR280I Time stamp 2008-04-04 18.43.06
    BR657I Input menu 15 - please check/enter input values
    BRBACKUP main options for backup and database copy
    1 - BRBACKUP profile (profile) ....... [initPRD.sap]
    2 - Backup device type (device) ...... [tape]
    3 ~ Tape volumes for backup (volume) . [PRDB04]
    4 # BACKINT/Mount profile (parfile) .. []
    5 - Database user/password (user) .... [system/*******]
    6 - Backup type (type) ............... [online]
    7 - Back up disk backup (backup) ..... [no]
    8 # Delete disk backup (delete) ...... [no]
    9 ~ Files for backup (mode) .......... [all]
    Standard keys: c - cont, b - back, s - stop, r - refr, h - help
    BR662I Enter your choice:
    c
    BR280I Time stamp 2008-04-04 18.43.46
    BR663I Your choice: 'c'
    BR259I Program execution will be continued...
    BR280I Time stamp 2008-04-04 18.43.46
    BR657I Input menu 16 - please check/enter input values
    Additional BRBACKUP options for backup and database copy
    1 - Confirmation mode (confirm) ....... [yes]
    2 - Query mode (query) ................ [no]
    3 - Compression mode (compress) ....... [hardware]
    4 - Verification mode (verify) ........ [no]
    5 - Fill-up previous backups (fillup) . [no]
    6 - Parallel execution (execute) ...... [0]
    7 - Additional output (output) ........ [no]
    8 - Message language (language) ....... [E]
    9 - BRBACKUP command line (command) ... [-p initPRD.sap -d tape -v
    Standard keys: c - cont, b - back, s - stop, r - refr, h - help
    BR662I Enter your choice:
    c
    BR280I Time stamp 2008-04-04 18.44.29
    BR663I Your choice: 'c'
    BR259I Program execution will be continued...
    BR291I BRBACKUP will be started with options '-p initPRD.sap -d tape
    E'
    BR280I Time stamp 2008-04-04 18.44.29
    BR670I Enter 'c[ont]' to continue, 'b[ack]' to go back, 's[top]' to
    c
    BR280I Time stamp 2008-04-04 18.45.13
    BR257I Your reply: 'c'
    BR259I Program execution will be continued...
    ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    BR051I BRBACKUP 6.20 (113)
    BR189W Expiration period equal 0 - backup volumes could be immediate
    BR055I Start of database backup: bdxpzadt.ant 2008-04-04 18.45.13
    BR319I Control file copy was created: /oracle/PRD/sapbackup/cntrlPRD
    BR280I Time stamp 2008-04-04 18.45.13
    BR057I Backup of database: PRD
    BR058I BRBACKUP action ID: bdxpzadt
    BR059I BRBACKUP function ID: ant
    BR110I Backup mode: ALL
    BR077I Database file for backup: /oracle/PRD/sapbackup/cntrlPRD.dbf
    BR061I 25 files found for backup, total size 45884.883 MB
    BR143I Backup type: online
    BR113I Files will be compressed by hardware
    BR130I Backup device type: tape
    BR102I Following backup device will be used: /dev/rmt0.1
    BR103I Following backup volume will be used: PRDB04
    BR280I Time stamp 2008-04-04 18.45.13
    BR256I Enter 'c[ont]' to continue, 's[top]' to cancel the program:
    c
    BR280I Time stamp 2008-04-04 18.45.50
    BR257I Your reply: 'c'
    BR259I Program execution will be continued...
    BR208I Volume with name PRDB04 required in device /dev/rmt0.1
    BR210I Please mount BRBACKUP volume, if you have not already done so
    BR280I Time stamp 2008-04-04 18.45.50
    BR256I Enter 'c[ont]' to continue, 's[top]' to cancel the program:
    c
    BR280I Time stamp 2008-04-04 18.46.26
    BR257I Your reply: 'c'
    BR259I Program execution will be continued...
    BR280I Time stamp 2008-04-04 18.46.26
    BR226I Rewinding tape volume in device /dev/rmt0 ...
    BR351I Restoring /oracle/PRD/sapbackup/.tape.hdr0
    BR355I from /dev/rmt0.1 ...
    BR241I Checking label on volume in device /dev/rmt0.1
    BR280I Time stamp 2008-04-04 18.46.26
    BR226I Rewinding tape volume in device /dev/rmt0 ...
    BR202I Saving /oracle/PRD/sapbackup/.tape.hdr0
    BR203I to /dev/rmt0.1 ...
    BR209I Volume in device /dev/rmt0.1 has name PRDB04
    BR202I Saving init_ora
    BR203I to /dev/rmt0.1 ...
    BR202I Saving /oracle/PRD/920_64/dbs/initPRD.sap
    BR203I to /dev/rmt0.1 ...
    Let me know If you have any problem regarding backup & restore
    karan

  • How to create SAPScript program? step-by-step process?

    Hi everybody
    Can anybody please provide some information on how to create SAP Script program?
    Please provide step-by-step process if possible as examples given in abap certification program
    thanks

    Hi
    here is the sample program for SAP SCRIPTS
    *& Report  ZHMR_POANNEX                                                *
         MODULE Materials Management
          Objective :Calling program for ANNEXURE FOR P.O
          text ................................................
          text ................................................
          text ................................................
    REPORT  ZHMR_POANNEX                            .
    TABLES :EKKO,STXH.
    PARAMETERS
    SELECTION-SCREEN BEGIN OF BLOCK BLK WITH FRAME TITLE text-001.
    PARAMETERS : P_EBELN LIKE EKKO-EBELN.
    SELECTION-SCREEN END OF BLOCK BLK.
    DATA DECLARATION
    DATA : V_LIFNR LIKE EKKO-LIFNR,
           V_AEDAT LIKE EKKO-AEDAT,
           V_NAME  LIKE LFA1-NAME1,
           V_ADRNR LIKE LFA1-ADRNR,
           V_BSTYP LIKE EKKO-BSTYP.
    DATA : BEGIN OF IT_ADRC OCCURS 0,
           NAME1  LIKE ADRC-NAME1,
           STREET LIKE ADRC-STREET,
           CITY1  LIKE ADRC-CITY1,
           POST_CODE1 LIKE ADRC-POST_CODE1,
           COUNTRY LIKE ADRC-COUNTRY,
           END OF IT_ADRC.
    DATA : IT_TEXT LIKE TLINE OCCURS 0 WITH HEADER LINE,
           IT_NOTE LIKE TLINE OCCURS 0 WITH HEADER LINE,
           IT_DEL  LIKE TLINE OCCURS 0 WITH HEADER LINE,
           IT_SHIP LIKE TLINE OCCURS 0 WITH HEADER LINE.
    DATA : V_ID  LIKE THEAD-TDID ,
           V_LAN LIKE THEAD-TDSPRAS,
           V_NAME1 LIKE THEAD-TDNAME ,
           V_OBJ LIKE THEAD-TDOBJECT VALUE 'EKKO',
           N1 TYPE I,N2 TYPE I,N3 TYPE I ,N4 TYPE I.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        INPUT         = P_EBELN
    IMPORTING
       OUTPUT        = P_EBELN.
    TO GET VENDOR NAME ,,PO DATE
    SELECT SINGLE
                 LIFNR
                 AEDAT
                 BSTYP
                 FROM EKKO
                 INTO (V_LIFNR, V_AEDAT,V_BSTYP)
                 WHERE EBELN EQ P_EBELN.
    IF SY-SUBRC EQ 0.
    SELECT SINGLE NAME1 ADRNR
                  FROM LFA1
                  INTO (V_NAME,V_ADRNR)
                  WHERE LIFNR EQ V_LIFNR.
      IF SY-SUBRC EQ 0.
    SELECT NAME1
            STREET
            CITY1
            POST_CODE1
            COUNTRY
            FROM ADRC
            INTO CORRESPONDING FIELDS OF TABLE IT_ADRC
            WHERE ADDRNUMBER EQ V_ADRNR.
    IF SY-SUBRC NE 0.
    ENDIF.
      ENDIF.
    ENDIF.
    *TO GET HEADER TEXT
      IF V_BSTYP = 'L'.
        V_ID = 'L01'.
      ELSEIF V_BSTYP = 'F'.
        V_ID = 'F01'.
      ENDIF.
      V_NAME1 = P_EBELN.
    SELECT SINGLE TDID INTO V_ID FROM STXH WHERE TDOBJECT EQ V_OBJ AND
                                      TDNAME EQ V_NAME1 AND
                                      TDID EQ V_ID .
      IF SY-SUBRC EQ 0.
    CALL FUNCTION 'READ_TEXT'
      EXPORTING
       CLIENT                        = SY-MANDT
        ID                            = V_ID
        LANGUAGE                      = SY-LANGU
        NAME                          = V_NAME1
        OBJECT                        = V_OBJ
      TABLES
        LINES                         = IT_TEXT.
    ENDIF.
    *TO GET HEADER NOTE
      IF V_BSTYP = 'L'.
        V_ID = 'L02'.
      ELSEIF V_BSTYP = 'F'.
        V_ID = 'F02'.
      ENDIF.
    SELECT SINGLE TDID INTO V_ID FROM STXH WHERE TDOBJECT EQ V_OBJ AND
                                      TDNAME EQ V_NAME1 AND
                                      TDID EQ V_ID .
      IF SY-SUBRC EQ 0.
    CALL FUNCTION 'READ_TEXT'
      EXPORTING
       CLIENT                        = SY-MANDT
        ID                            = V_ID
        LANGUAGE                      = SY-LANGU
        NAME                          = V_NAME1
        OBJECT                        = V_OBJ
      TABLES
        LINES                         = IT_NOTE.
    ENDIF.
    *TO GET TERMS OF DELIVERY
      IF V_BSTYP = 'L'.
        V_ID = 'L05'.
      ELSEIF V_BSTYP = 'F'.
        V_ID = 'F05'.
      ENDIF.
    SELECT SINGLE TDID INTO V_ID FROM STXH WHERE TDOBJECT EQ V_OBJ AND
                                      TDNAME EQ V_NAME1 AND
                                      TDID EQ V_ID .
      IF SY-SUBRC EQ 0.
    CALL FUNCTION 'READ_TEXT'
      EXPORTING
       CLIENT                        = SY-MANDT
        ID                            = V_ID
        LANGUAGE                      = SY-LANGU
        NAME                          = V_NAME1
        OBJECT                        = V_OBJ
      TABLES
        LINES                         = IT_DEL.
    ENDIF.
    *TO GET SHIPPING INSTRUCTIONS
    IF V_BSTYP = 'L'.
        V_ID = 'L06'.
      ELSEIF V_BSTYP = 'F'.
        V_ID = 'F06'.
      ENDIF.
    SELECT SINGLE TDID INTO V_ID FROM STXH WHERE TDOBJECT EQ V_OBJ AND
                                      TDNAME EQ V_NAME1 AND
                                      TDID EQ V_ID .
      IF SY-SUBRC EQ 0.
    CALL FUNCTION 'READ_TEXT'
      EXPORTING
       CLIENT                        = SY-MANDT
        ID                            = V_ID
        LANGUAGE                      = SY-LANGU
        NAME                          = V_NAME1
        OBJECT                        = V_OBJ
      TABLES
        LINES                         = IT_SHIP.
    ENDIF.
    OPEN FORM
    DESCRIBE TABLE IT_TEXT LINES N1.
    DESCRIBE TABLE IT_NOTE LINES N2.
    DESCRIBE TABLE IT_DEL LINES N3.
    DESCRIBE TABLE IT_SHIP LINES N4.
    IF NOT ( N1 = 0 AND N2 = 0 AND N3 = 0 AND N4 = 0 ).
    CALL FUNCTION 'OPEN_FORM'
    EXPORTING
       FORM                              = 'ZHML001_POANNEX'
       LANGUAGE                          = SY-LANGU.
    else.
    message 'For This P.O no annexure is maintained.' type 'I'.
    endif.
    WRITE FORM
    LOOP AT IT_ADRC.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
       ELEMENT                        = 'HEADER'
       WINDOW                         = 'HEADER'.
    ENDLOOP.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
       ELEMENT                        = 'FOTTER'
       WINDOW                         = 'FOTTER'.
    IF NOT IT_TEXT[] IS INITIAL.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
       ELEMENT                        = 'TEXT1'
       WINDOW                         = 'MAIN'.
    LOOP AT IT_TEXT.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
       ELEMENT                        = 'TEXT'
       WINDOW                         = 'MAIN'.
    ENDLOOP.
    ENDIF.
    IF NOT IT_NOTE[] IS INITIAL.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
       ELEMENT                        = 'NOTE1'
       WINDOW                         = 'MAIN'.
    LOOP AT IT_NOTE.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
       ELEMENT                        = 'NOTE'
       WINDOW                         = 'MAIN'.
    ENDLOOP.
    ENDIF.
    IF NOT IT_DEL[] IS INITIAL.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
       ELEMENT                        = 'DEL1'
       WINDOW                         = 'MAIN'.
    LOOP AT IT_DEL.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
       ELEMENT                        = 'DEL'
       WINDOW                         = 'MAIN'.
    ENDLOOP.
    ENDIF.
    IF NOT IT_SHIP[] IS INITIAL.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
       ELEMENT                        = 'SHIP1'
       WINDOW                         = 'MAIN'.
    LOOP AT IT_SHIP.
    CALL FUNCTION 'WRITE_FORM'
    EXPORTING
       ELEMENT                        = 'SHIP'
       WINDOW                         = 'MAIN'.
    ENDLOOP.
    ENDIF.
    CLOSE FORM
    CALL FUNCTION 'CLOSE_FORM'.
    Reward if it is helpful.
    Regards,
    Sangeetha.A

  • How to create function module step by step

    hi experts,
    i am new to ABAP.
    can anybody tell me the step by step process on how to create a function module for adding two numbers without using editor screen.
    ex: 2+3=5.

    Hi,
    You can only create function modules and function groups using the Function Builder in the ABAP Workbench. For further information, refer to Creating New Function Modules. This section uses an example to illustrate how a function module is created from the point of view of ABAP programming.
    Function Groups and Function Modules:
    Firstly, we create a new function group DEMO_SPFLI to hold the function module. Then, we can create the new function module.
    Parameter Interface:
    You can specify the types of interface parameters in function modules in the
    same way as the parameter interfaces of subroutines. Since function
    modules can be used anywhere in the system, their interfaces can only contain
    references to data types that are declared systemwide. These are the elementary
    ABAP data types, the systemwide generic types, such as ANY TABLE, and types
    defined in the ABAP Dictionary. You cannot use LIKE to refer to data types
    declared in the main program.
    Exceptions:
    Our function module needs an exception that it can trigger if there are no entries
    in table SPFLI that meet the selection criterion. The exception NOT_FOUND
    serves this function.
    Source Code:
    Having defined the parameter interface and exceptions, we can now write the
    source code of our function module. To do this, choose Source code in the
    Function Builder. This opens the ABAP Editor for the include program
    L<fgrp>U<xx> (see Function Groups). This is the include that will
    hold the program code for the function module;
    Data in Function Modules
    You can use the TYPES and DATA statements to create local data types and
    objects. The interface parameters also behave like local data objects. In
    addition, you can access all of the global data of the main program. This data is
    defined in the include program L<fgrp>TOP. To open this include, choose Goto
      Global data. The global data behaves like the instance attributes of a class.
    The first time you call a function module in a particular function group, the data is
    loaded into memory. It can then be accessed and changed by all of the function
    modules in the group. The system retains the values until the next time a function
    module is called.
    Calling Subroutines
    You use subroutines for local modularization. Function modules can
    also use this technique. The function module that they call are defined in the
    corresponding main program.
    If you only want to call a subroutine from a single function module, it is best to
    define them in the same include program as the function module itself, directly
    after the ENDFUNCTION statement. These subroutines can be called from all
    function modules in the function group, but for clarity, they should only be called
    from the function module that precedes them.
    If you want to define a subroutine that will be called from several different function
    modules, you can define a special include program for it with the name
    L<fgrp>F<xx>.
    Raising Exceptions
    There are two ABAP statements for raising exceptions. They can only be used in
    function modules:
    RAISE <except>.
    and
    MESSAGE..... RAISING <except>.
    The effect of these statements depends on whether the calling program handles
    the exception or not. If the name <except> of the exception or OTHERS occurs
    in the EXCEPTIONS addition of the CALL FUNCTION statement, the exception is
    handled by the calling program.
    If the calling program does not handle the exception
      The RAISE statement terminates the program and switches to debugging mode.
      The MESSAGE ..... RAISING statement display the specified message. How the
    processing continues depends on the message type.
    If the calling program handles the exception, both statements return control to the
    program. No values are transferred. The MESSAGE ..... RAISING statement
    does not display a message. Instead, it fills the system fields SY-MSGID, SYMSGTY,
    SY-MSGNO, and SY-MSGV1 to SY-MSGV4.
    Source Code of READ_SPFLI_INTO_TABLE
    The entire source code of READ_SPFLI_INTO_TABLE looks like this:
    FUNCTION READ_SPFLI_INTO_TABLE.
    ""Local interface:
    *" IMPORTING
    *" VALUE(ID) LIKE SPFLI-CARRID DEFAULT 'LH '
    *" EXPORTING
    *" VALUE(ITAB) TYPE SPFLI_TAB
    *" EXCEPTIONS
    *" NOT_FOUND
    SELECT * FROM SPFLI INTO TABLE ITAB WHERE CARRID = ID.
    IF SY-SUBRC NE 0.
    MESSAGE E007(AT) RAISING NOT_FOUND.
    ENDIF.
    ENDFUNCTION.
    The function module reads all of the data from the database table SPFLI where
    the key field CARRID is equal to the import parameter ID and places the entries
    that it finds into the internal table SPFLI_TAB. If it cannot find any entries, the
    exception NOT_FOUND is triggered using MESSAGE...RAISING. Otherwise, the
    table is passed to the caller as an exporting parameter.
    Regards,
    Chandru

  • Screen  exit example step by step

    screen  exit example step by step need.

    hI
    REWARD IF USEFULL
    User Exits in FI/CO
    by Tami Becker, SAP Platinum Consultant, SAP America, Inc.
    Overview
    R/3 provides three "customization spots" that allow you to enhance FI/CO features without modifying the standard code. Although often collectively referred to as "user exits," two of the three have different names. SAP Enhancements are used to expand the standard functionality within SAP. Enhancements use function modules and are called from the standard SAP code. Each module in the system has a set of delivered enhancements that help companies expand the standard functionality where they need it. Enhancements were new in release 3.0.
    The Open FI Interfaces or Business Transaction Events are also used to expand the standard functionality within SAP. These events are defined in the IMG. Business Transaction Events were new in release 4.0. They are not available for all modules and are not called on all integrated transactions into FI as of release 4.5B. This will change with each release and should be retested.
    The older User Exits in FI/CO are "Z" programs that are defined in table T80D for client-dependent user exits, and in table T80I for client-independent user exits. These are also used to expand the standard functionality within the FI/CO modules. These User Exits have been available since the early releases of SAP. All of these FI/CO User Exits are listed in this document in the Configuring User Exits (Older). The list is included because these User Exits are not a part of the Enhancements or Business Transaction Events and do not have an Info System for searching.
    Benefits
    •     Standard SAP functionality can be enhanced without modification to the standard code.
    •     Upgrades do not erase the functionality and it does not have to be re-transported or re-entered into the system. The enhancements should be thoroughly tested when upgrading to ensure the system will still work as implemented.
    Configuring SAP Enhancements
    Basic Steps in Configuring an Enhancement
    •     Find the appropriate Enhancement.
    •     Enter the ABAP code in the "Z" program within the function module.
    •     Create a project.
    •     Add the Enhancement to the project.
    •     Activate the project.
    Example Business Scenario for Enhancements
    Company A has a requirement to validate all customer master records created with a U.S. address. The U.S. entity reports on the industry field on the customer master. This is only a U.S. requirement and should not be required for the other countries, so the field status would not work. To accomplish this requirement, Company A will need to set up an Enhancement for the customer master transaction. The necessary steps are detailed below with screenprints. This example was configured in a 4.6C system.
    Detailed Steps
    1.     Tools   ABAP Workbench   Utilities   Enhancements   Definition   Utilities   List Enhancements
    2.     Do not execute this without any parameters! There are too many Enhancements and it will probably time out. You’re searching for a customer master exit. Enter mast in the short text (see Figure 1). You’ll start there. Searching for an exit can be tricky, so make sure you try several things before giving up.
    3.     Execute the search.
    Figure 1. Start Your Search for a Master Exit Here
    4.     Look through the list until you find the Enhancement for User exits: Customer Master Data.
    5.     Double-click on the enhancement SAPMF02D. This will take you to the details of the Enhancement and list the function modules included in the Enhancement.
    6.     To continue, double-click on the function module EXIT_SAPMF02D_001
    7.     This will take you to the source code for the function module. Click on the Import tab to review the tables/fields that are available for the Enhancement (see Figure 2).
    Figure 2. The Tables That Are Available for the Enhancement
    8.     To view the tables/fields that can be changed in the function module, click on the Export and Changing tabs. For this function module, these tabs are empty because you can only validate data. You cannot change any fields in this enhancement.
    9.     Return to the Source Code tab.
    10.     Scroll down until you see the Include statement in the program. The "Z" program listed after the Include is where your code will be written (see Figure 3).
    Figure 3. Your Program Will Begin After the Include Statement
    11.      Double-click on the Include. You will be prompted to create the include. Click on Yes to create.
    12.      At this point you will be prompted to enter a development class and to create a transport request. If you do not know which development class to use, please contact your technical team.
    13.     Enter the following ABAP code into the program (Figure 4):
    User exit to ensure that all US customers have a group key
    entered on the customer master.
    if i_kna1-land1 = 'US' and
    i_kna1-brsch = ' '.
    message e001(F2).
    endif.
    Figure 4. The ABAP Code You Need to Enter
    14.      Note that the table name matches the table name in the import tab tables.
    15.      In this example you are using the standard message class F2 with message number 001. Normally, you will create your own message within your own message class. All customer message classes must begin with a "Z" and are created in transaction SE91.
    16.     Save the program.
    17.     The next step is to create the project. Go to transaction code CMOD or follow menu path: Tools   ABAP Workbench   Utilities   Enhancements   Project Management.
    18.     Enter the project name; begin the name with a "Z."
    19.     Click on the Create button.
    Figure 5. Click on Create After You Type in the Project Name
    20.      Enter in a description for the project.
    21.      Click on the Enhancement Assignments button.
    22.      You will be prompted to save the enhancement. Click on Yes.
    23.      At this point you will be asked for a development class and to create a transport for the project. You may use the same one created when adding the ABAP code to the function module.
    24.     Enter the name of the enhancement SAPMF02D (see Figure 6).
    Figure 6. Enter the Name of the Enhancement Here
    25.     Save the project.
    26.     Back out of the enhancement assignment.
    27.     Activate the project by hitting the Activate button.
    The SAP Enhancement is ready to be tested! Try creating a customer with U.S. as the country and a blank group key. Be sure to test one with a group key to make sure the message is not displayed in error as well.
    Configuring Business Transaction Events
    Basic Steps in Configuring an Event
    •     Make sure the application is active for Business Transaction Events.
    •     Copy the sample interface function module into a "Z" function module.
    •     Enter the ABAP code into the source code section of the new "Z" function module. You may choose to create a "Z" program to enter the code into and then insert the "Z" program into your function module source code.
    •     Activate the function module.
    •     Assign the function module to the event, country and application.
    Example Business Scenario for Business Transaction Events
    Company A would like to copy the group key field from the vendor master into the allocation field on all the line items within a vendor invoice and payments, including the vendor lines. This requirement assumes only one vendor is posted to in a document.
    To accomplish this requirement, Company A will use the Business Transaction Event 1130, Post Document: SAP Internal Field Substitution.
    1.     IMG Menu Path: Financial Accounting   Financial Accounting Global Settings   Use Business Transaction Events   Environment   Infosystem (Processes).
    2.     Find the correct Business Event. You are updating a field, so you select the Processes Info System instead of the Publish and Subscribe Info System.
    3.     Execute the search with the defaults.
    4.     Find the correct interface for updating a document: Post Document: SAP- Internal Field Substitution (see Figure 7).
    Figure 7. Find the Correct Interface for the Business Event
    5.     Put your cursor on the event and click on the Sample Function Module button.
    6.     You are now in transaction SE37 – Function Builder. This is the function module (sample_process_00001130) you will need to copy into a "Z" name function module for your coding (see Figure 8).
    Figure 8. This Is the Function Module You Need to Copy Your "Z" Name Function Module
    7.     Click on the Copy button.
    8.     Enter the "Z" function module name in the To Function Module field (see Figure 9).
    9.     Enter a Function Group. If you need to create a "Z" function group, go to transaction code SE37 and follow menu path: Go to   Function Groups   Create Group. A function group is a logical grouping of function modules, and the ABAP code is generated for function groups. You will be prompted for a development class and transport when creating the function group.
    Figure 9. Enter Your "Z" Function Module Name Here
    10.     In Function Builder (transaction SE37), enter the new "Z" function module. Click on the Change button.
    11.     The system will default into the source code screen where you may enter your ABAP code.
    12.     Notice the tables available for the code. Additional tables may be declared if necessary.
    13.     Enter the following source code (see Figure 10):
    tables: lfa1.
    data: z_groupkey like lfa1-konzs.
    z_groupkey = ' '.
    loop at t_bseg.
    check for vendor lines. If one is found, read the vendor master and
    retrieve the group key field.
    if t_bseg-koart eq 'K'.
      select single konzs from lfa1 into z_groupkey
        where lifnr = t_bseg-lifnr.
    endif.
    Move the group key field into all line items allocation field.
    loop at t_bsegsub.
      t_bsegsub-zuonr = z_groupkey.
      modify t_bsegsub index sy-tabix.
    endloop. "t_bsegsub
    endloop. "t_bseg
    Figure 10. The Screen Where You Enter Your Source Code
    14.     Save the function module.
    15.     Back out to the main Function Builder screen by clicking on the green arrow button.
    16.     Activate the function module by clicking on the Activate button (see Figure 11).
    Figure 11. Activate the Function Module from This Screen
    17.     Assign the function module to the event in the IMG: Financial Accounting   Financial Accounting Global Settings   Business Transaction Events   Settings   Process Function Modules   of an SAP Appl.
    18.     Hit enter past the warning messages that this is SAP data.
    19.     Click on the New Entries button.
    20.     Enter the process for your interface. In your example it is 00001130.
    21.     Enter the country the interface is valid for. If it is valid for all countries, leave this field blank.
    22.     Enter the application the interface should be called for. If it should be called for all applications, leave this field blank. Please note that not all integrated transactions are programmed to go through these interfaces! You will need to test to find out!
    23.     Enter the new "Z" function module (see Figure 12).
    Figure 12. Enter Your New "Z" Function Module Here
    24.     Save the settings. At this point you will be prompted for a CTS number for the configuration change.
    25.     The Business Transaction Event is complete! You are ready for testing.
    Configuring User Exits (Older)
    Basic Steps in Configuring an User Exit
    •     Create a "Z" program for the User Exits and enter the necessary ABAP code.
    •     Enter the new program name into table T80D.
    •     Configure the application to call the User Exit.
    List of User Exits
    •     Variable Field Movements
    •     Substitutions in FI, CO, PCA
    •     Validations in FI, CO, PCA
    •     Rollups in SPL
    •     Fixed Field Movements in SPL
    •     Cost Center Summarization on Detail Screen
    •     Sets Formula Variables
    Example Business Scenario for User Exits
    Company A would like to add a "Z" field in the Special Purpose Ledger to capture a Business Unit field for reporting. They have used all the standard SAP fields such as Business Area and Profit Center. The field will only be used for reporting and is only needed in the Special Purpose Ledger. You created a special ledger table (ZZSPL1) with field Z_BUNIT and need to populate this field based on a combination of G/L account, fund and functional area.
    To accomplish this requirement, Company A will use the Variable Field Movement User Exit. To make maintenance easier, table ZZBUSUNIT was created with the G/L account, fund and functional area fields as key fields, and the business unit field as a non-key field. You generated the table maintenance so the table could be updated using transaction SM30. SAP users update the business unit determination rules in table ZZBUSUNIT by entering the G/L account, fund and functional area, and then the business unit that combination should be posting to. The User Exit will read table ZZBUSUNIT using the G/L account, fund and functional area from the posting transaction and determine the business unit. The steps for using the user exit are detailed below. This example was created on a 4.6C system.
    1.     Copy the delivered template User Exit program RGIVU000_TEMPLATE into a "Z" program. Follow menu path Tools   ABAP Workbench   Development   ABAP Editor (transaction code SE38). In early releases, the delivered program was RGIVU000.
    2.     You will be prompted for a development class and a transport. Please check with the technical team for the correct development class.
    3.     At the initial ABAP Editor screen, enter your new "Z" program name, select the Source Code button and click on Change (see Figure 13).
    Figure 13. To Enter Your New Code, Select Source Code and Click on the Change Button
    4.     Enter the following code in the User Exit (Figure 14):
    FORM E01_MVC USING FROM_FIELD TO_FIELD.
    to_field = 'CORP'. "Set a default business unit.
    read table zzbusunit to determine the business unit field.
    select single z_bunit from zzbusunit into to_field
       where hkont = accit_glx-hkont and
        geber = accit_glx-geber and
        fkber = accit_glx-fkber.
    ENDFORM.
    Figure 14. Enter Your New Code at This Screen.
    5.     Activate the program by clicking on the Activate button.
    6.     Change the configuration in the User Exit table to point to your new "Z" program.
    7.     Follow the IMG menu path: Financial Accounting   Special Purpose Ledger   Basic Settings   User Exits   Maintain Client Specific User Exits.
    8.     The entry to maintain is application area GIMV: Variable Field Movement. Enter your "Z" program (see Figure 15).
    Figure 15. Enter Your "Z" Program in the Application Area GIMV: Variable Field Movement
    9.     Save the changes.
    10.     The final configuration step is to assign the User Exit in the variable field movement for your special ledger table. In the IMG: Financial Accounting &#61664; Special Purpose Ledger &#61664; Basic Settings &#61664; Master Data &#61664; Maintain Field Movements. Field movements control how the fields in a special ledger table are populated. They can be populated straight from other fields in a posting or through User Exits.
    Figure 16. After You Assign the Business Unit Field and the G/L Account, the Exit Field Should Contain U01.
    11.     Assign the business unit field as a receiver and the G/L account as the sender. The Exit field should contain U01 (see Figure 16).
    12.     The User Exit number U01 calls User Exit E01_MVC form in the "Z" program.
    13.     Save the field movement.
    14.     You are ready to test your User Exit!

  • Kindly explain the step by step procedure for configuring sales order stock

    Hi friends,
    can anybody explain the step by step procedure for configuring sales order stock.
    Stock that is used for a sales order. It is directly allocated to a sales order. Components can only be used to produce material ordered by the customer and the finished product can only be delivered to the customer via the sales order.
    You can manage valuated or non-valuated sales order stock.
    If the sales order stock is not valuated, it is managed via a cost collector. The system does not carry out invoice verification postings for goods movements, and you cannot obtain an overview of how the stock is valuated until the end of the settlement period in Controlling.
    If the sales order stock is valuated, you have immediate access to its value in Financial Accounting. The assigned accounts are debited and credited as a result of the valuated goods movements.
    but i am not clear of how to map it into sap.kindly explain it step by step.
    regards,
    willaims

    Follow the link
    this will explain about complete config
    http://help.sap.com/bp_bblibrary/600/Documentation/V4J_BB_ConfigGuide_EN_US.doc

  • I m new for SAP script can anyone tell me step by step

    hi
    i m new for SAP script can anyone tell me step by step.
    how i can work with sap script and how can i call report programe by sap script
    thanks .

    Hi laxman,
    Follow these steps
    Goto transaction code Se71
    then give a name starting with Z r Y to create a new script then
    1) create header data and basic settings
    2)Pages u have to give ur pages number in character format only
    3)window here u have to create windows for different variables such as for logo and etc., there will be a default window named  as main mindow in this now u have to add new window for that
    4)Page windows to add page windows follow these steps
    goto edit option in the toolbar and select CREATE ELEMENT from which u can add already above declared windows
    5) paragraph formats Here u have to define allignments and all for u proper display
    Ex: A1, AF ....
    6)Character formats here u have to declare the character format depending on u requirement such as times ne roman etc.,
    After craeting all these press F9 so that u will be directed to coding part where u have declare the coding according to ur requirement
    Regards,
    Pavan

  • Step 1, Step 2, etc - Multipage process?

    Is there an example of a multipage process in a webapp that doesn't commit to the database until all are complete?
    I am looking at UIX-JSP mostly right now, but info for similar controller stuff with BC4J-JSP would be ok, too.
    For some reason I thought there was a wizard or UML support for designing such a thing, but I must have gotten mixed up. It'd be nice to design these with a activity diagram. Now all I can find is the <train> element, which seems to be for display purposes only. There's not any declarative support for something like this is there?
    BTW I noticed a the UIX-JSP show/hide wizard creates a bogus <train>, with a step 1, step 2.

    You can use the 'train' tag to displaye these steps. The generated train is only for demonsstration purposes. It makes you aware that this tag is avalable for use as part of the page structure. You may want to look at the UIX Developers Guide that is part of the Jdeveloper documentation for more details on the UIX tags and page structure.

  • What is step by step in real time project i.e. end-to-end life cycle?

    what is step by step in real time project i.e. end-to-end life cycle?

    Hi Vamsi,
    The below explanation gives you an idea of what is going to come after what in a software development.
    These below stages are know as Software Development Life Cycle/Waterfall Model.
    1. System/Information Engineering and Modeling
    As software is always of a large system (or business), work begins by establishing the requirements for all system elements and then allocating some subset of these requirements to software. This system view is essential when the software must interface with other elements such as hardware, people and other resources. System is the basic and very critical requirement for the existence of software in any entity. So if the system is not in place, the system should be engineered and put in place. In some cases, to extract the maximum output, the system should be re-engineered and spruced up. Once the ideal system is engineered or tuned, the development team studies the software requirement for the system.
    2. Software Requirement Analysis
    This process is also known as feasibility study. In this phase, the development team visits the customer and studies their system. They investigate the need for possible software automation in the given system. By the end of the feasibility study, the team furnishes a document that holds the different specific recommendations for the candidate system. It also includes the personnel assignments, costs, project schedule, target dates etc.... The requirement gathering process is intensified and focussed specially on software. To understand the nature of the program(s) to be built, the system engineer or "Analyst" must understand the information domain for the software, as well as required function, behavior, performance and interfacing. The essential purpose of this phase is to find the need and to define the problem that needs to be solved .
    3. System Analysis and Design
    In this phase, the software development process, the software's overall structure and its nuances are defined. In terms of the client/server technology, the number of tiers needed for the package architecture, the database design, the data structure design etc... are all defined in this phase. A software development model is thus created. Analysis and Design are very crucial in the whole development cycle. Any glitch in the design phase could be very expensive to solve in the later stage of the software development. Much care is taken during this phase. The logical system of the product is developed in this phase.
    4. Code Generation
    The design must be translated into a machine-readable form. The code generation step performs this task. If the design is performed in a detailed manner, code generation can be accomplished without much complication. Programming tools like compilers, interpreters, debuggers etc... are used to generate the code. Different high level programming languages like C, C++, Pascal, Java are used for coding. With respect to the type of application, the right programming language is chosen.
    5. Testing
    Once the code is generated, the software program testing begins. Different testing methodologies are available to unravel the bugs that were committed during the previous phases. Different testing tools and methodologies are already available. Some companies build their own testing tools that are tailor made for their own development operations.
    6. Maintenance
    The software will definitely undergo change once it is delivered to the customer. There can be many reasons for this change to occur. Change could happen because of some unexpected input values into the system. In addition, the changes in the system could directly affect the software operations. The software should be developed to accommodate changes that could happen during the post implementation period.
    Reward if helpful.
    Thankyou,
    Regards.

Maybe you are looking for

  • Purpose of AP_INTERFACE_CONTROLS in the payables open import program.

    Hi, Can anyone explain the purpose of the table AP_INTERFACE_CONTROLS in the payable open import program. Regards Deepak

  • What aspect ratio is the 15'' macbook pro retina 2013 model?

    Hello. Can someone please tell me what the aspect ratio of the 2013 Macbook Pro retina 15inch is? Is it 16:10 or 16:9

  • Problems using Reports on Linux

    Hello everybody Here is a strange problem I often see when I access Reports Builder on Linux machine. When I make a report for the first from the menu it works fine. I save the report and if I try to open it again the Reports builder crashes with the

  • Making Primary Key on Null Column !

    I am not happy the way Oracle treat adding constraint on existing table. I have one column initially accept NULL Values. after I import the data into this table. this column does not have any NULL value. I want to make this column as Primary Key. How

  • Script the database outline without data

    Hi All, how to copy the whole database to another server, without data. i know there is a function in management studio, there is a function to script database, however you are not able to apply the script directly to another server, because of the r