Sample Code request

Hi experts!!
I 'm new to ABAP objects and i would like you, if possible, to provide me with some "real"  code using objects.
All i find on the internet is small examples with airplanes, cars etc..
They are easy to understand as syntax but  not realistic enough to understand the business use of objects.
Thanx in advance!!!

alv invoice report
*& Report  ZLCL_ALV_INT_INVOICE                                        *
REPORT  ZLCL_ALV_INT_INVOICE                    .
DATA: O_CONT1 TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
      O_CONT2 TYPE REF TO CL_GUI_CUSTOM_CONTAINER,
      O_GRID1 TYPE REF TO CL_GUI_ALV_GRID,
      O_GRID2 TYPE REF TO CL_GUI_ALV_GRID.
DATA: IT_VBRK LIKE VBRK OCCURS 1 WITH HEADER LINE.
DATA: IT_VBRP LIKE VBRP OCCURS 1 WITH HEADER LINE.
DATA: WA_VBRK LIKE VBRK.
*--Layout
DATA: WA_LAYO TYPE LVC_S_LAYO.
      CLASS LCL_BILLING DEFINITION
CLASS LCL_BILLING DEFINITION.
  PUBLIC SECTION.
    CLASS-METHODS: HANDLE_HOTSPOT_CLICK
             FOR EVENT HOTSPOT_CLICK
             OF CL_GUI_ALV_GRID
             IMPORTING E_ROW_ID.
ENDCLASS.                    "LCL_BILLING DEFINITION
      CLASS LCL_BILLING IMPLEMENTATION
CLASS LCL_BILLING IMPLEMENTATION.
  METHOD HANDLE_HOTSPOT_CLICK.
    IF NOT E_ROW_ID IS INITIAL.
*--Reading selected billing docno
      READ TABLE IT_VBRK INTO WA_VBRK INDEX E_ROW_ID-INDEX.
*--GETTING BILLING DOC ITEMS
      REFRESH IT_VBRP.
      SELECT *
        FROM VBRP
        INTO TABLE IT_VBRP
        WHERE VBELN = WA_VBRK-VBELN.
      CALL SCREEN 200.
    ENDIF.
  ENDMETHOD.                    "HANDLE_HOTSPOT_CLICK
ENDCLASS.                    "LCL_BILLING IMPLEMENTATION
SELECT-OPTIONS: S_VBELN FOR IT_VBRK-VBELN.
START-OF-SELECTION.
  PERFORM GET_DATA.
  SET SCREEN 100.
*&      Form  GET_DATA
      text
FORM GET_DATA .
*--billing header data
  SELECT *
    FROM VBRK
    INTO TABLE IT_VBRK
    WHERE VBELN IN S_VBELN.
  IF SY-SUBRC <> 0.
    MESSAGE I000(Z00) WITH 'No Data Found'.
  ENDIF.
  EXIT.
ENDFORM.                    " GET_DATA
*&      Module  STATUS_0100  OUTPUT
      text
MODULE STATUS_0100 OUTPUT.
  SET PF-STATUS 'MENU'.
ENDMODULE.                 " STATUS_0100  OUTPUT
*&      Module  USER_COMMAND_0100  INPUT
      text
MODULE USER_COMMAND_0100 INPUT.
  CASE SY-UCOMM.
    WHEN 'BACK'.
      PERFORM EXIT_PROGRAM.
  ENDCASE.
ENDMODULE.                 " USER_COMMAND_0100  INPUT
*&      Module  PBO_100  OUTPUT
      text
MODULE PBO_100 OUTPUT.
  IF O_CONT1 IS INITIAL.
    CREATE OBJECT O_CONT1
      EXPORTING
        CONTAINER_NAME              = 'VBRK_CONT'
      EXCEPTIONS
        CNTL_ERROR                  = 1
        CNTL_SYSTEM_ERROR           = 2
        CREATE_ERROR                = 3
        LIFETIME_ERROR              = 4
        LIFETIME_DYNPRO_DYNPRO_LINK = 5
        OTHERS                      = 6
    IF SY-SUBRC <> 0.
      MESSAGE I000(Z00) WITH 'Error in container'.
      EXIT.
    ENDIF.
    CREATE OBJECT O_GRID1
      EXPORTING
         I_PARENT          = O_CONT1
      EXCEPTIONS
        ERROR_CNTL_CREATE = 1
        ERROR_CNTL_INIT   = 2
        ERROR_CNTL_LINK   = 3
        ERROR_DP_CREATE   = 4
        OTHERS            = 5
    IF SY-SUBRC <> 0.
      MESSAGE I000(Z00) WITH 'Error in Grid'.
      EXIT.
    ENDIF.
  ENDIF.
*--Layout for 1st grid
  WA_LAYO-KEYHOT = 'X'.
  WA_LAYO-GRID_TITLE = 'Billing Document Header Data'.
  CALL METHOD O_GRID1->SET_TABLE_FOR_FIRST_DISPLAY
    EXPORTING
      I_STRUCTURE_NAME              = 'VBRK'
      IS_LAYOUT                     = WA_LAYO
    CHANGING
      IT_OUTTAB                     = IT_VBRK[]
    EXCEPTIONS
      INVALID_PARAMETER_COMBINATION = 1
      PROGRAM_ERROR                 = 2
      TOO_MANY_LINES                = 3
      OTHERS                        = 4.
  IF SY-SUBRC <> 0.
    MESSAGE I000(Z00) WITH 'Error in showing grid'.
    EXIT.
  ENDIF.
*-Setting the focus on the grid
  CALL METHOD CL_GUI_CONTROL=>SET_FOCUS
    EXPORTING
      CONTROL           = O_GRID1 "Grid control object
    EXCEPTIONS
      CNTL_ERROR        = 1
      CNTL_SYSTEM_ERROR = 2
      OTHERS            = 3.
  IF SY-SUBRC <> 0.
    MESSAGE I000(Z00) WITH 'Error in setting focus'.
  ENDIF.
*--Event handler registration
  SET HANDLER LCL_BILLING=>HANDLE_HOTSPOT_CLICK FOR O_GRID1.
ENDMODULE.                 " PBO_100  OUTPUT
*&      Module  STATUS_0200  OUTPUT
      text
MODULE STATUS_0200 OUTPUT.
  SET PF-STATUS 'MENU'.
ENDMODULE.                 " STATUS_0200  OUTPUT
*&      Module  USER_COMMAND_0200  INPUT
      text
MODULE USER_COMMAND_0200 INPUT.
  CASE SY-UCOMM.
    WHEN 'BACK'.
      LEAVE TO SCREEN 100.
  ENDCASE.
ENDMODULE.                 " USER_COMMAND_0200  INPUT
*&      Module  PBO_200  OUTPUT
      text
MODULE PBO_200 OUTPUT.
  IF O_CONT2 IS INITIAL.
    CREATE OBJECT O_CONT2
        EXPORTING
        CONTAINER_NAME              = 'VBRP_CONT'
    EXCEPTIONS
      CNTL_ERROR                  = 1
      CNTL_SYSTEM_ERROR           = 2
      CREATE_ERROR                = 3
      LIFETIME_ERROR              = 4
      LIFETIME_DYNPRO_DYNPRO_LINK = 5
      OTHERS                      = 6
    IF SY-SUBRC <> 0.
      MESSAGE I000(Z00) WITH 'Error in container'.
      EXIT.
    ENDIF.
    CREATE OBJECT O_GRID2
      EXPORTING
        I_PARENT          = O_CONT2
      EXCEPTIONS
        ERROR_CNTL_CREATE = 1
        ERROR_CNTL_INIT   = 2
        ERROR_CNTL_LINK   = 3
        ERROR_DP_CREATE   = 4
        OTHERS            = 5.
    IF SY-SUBRC <> 0.
      MESSAGE I000(Z00) WITH 'Error in grid linking'.
      EXIT.
    ENDIF.
    CALL METHOD O_GRID2->SET_TABLE_FOR_FIRST_DISPLAY
      EXPORTING
        I_STRUCTURE_NAME              = 'VBRP'
      CHANGING
        IT_OUTTAB                     = IT_VBRP[]
      EXCEPTIONS
        INVALID_PARAMETER_COMBINATION = 1
        PROGRAM_ERROR                 = 2
        TOO_MANY_LINES                = 3
        OTHERS                        = 4.
    IF SY-SUBRC <> 0.
      MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                 WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
  ELSE.
*--refreshing the alv grid with the latest content of the internal table
*--which is linked
    CALL METHOD O_GRID2->REFRESH_TABLE_DISPLAY
      EXCEPTIONS
        FINISHED = 1
        OTHERS   = 2.
    IF SY-SUBRC <> 0.
      MESSAGE I000(Z00) WITH 'Error in Refreshing gird'.
    ENDIF.
  ENDIF.
ENDMODULE.                 " PBO_200  OUTPUT
*&      Form  EXIT_PROGRAM
      text
FORM EXIT_PROGRAM .
*--Deallocating the memory
  IF NOT O_CONT2 IS INITIAL.
    CALL METHOD O_CONT2->FREE
      EXCEPTIONS
        CNTL_ERROR        = 1
        CNTL_SYSTEM_ERROR = 2
        OTHERS            = 3.
    IF SY-SUBRC <> 0.
      MESSAGE I000(Z00) WITH 'Error in deallocating memory'.
      EXIT.
    ENDIF.
    CLEAR: IT_VBRP,
           IT_VBRP[].
    FREE:  IT_VBRP,
           IT_VBRP[].
  ENDIF.
  IF NOT O_CONT1 IS INITIAL.
    CALL METHOD O_CONT1->FREE
      EXCEPTIONS
        CNTL_ERROR        = 1
        CNTL_SYSTEM_ERROR = 2
        OTHERS            = 3.
    IF SY-SUBRC <> 0.
      MESSAGE I000(Z00) WITH 'Error in deallocating memory'.
      EXIT.
    ENDIF.
    CLEAR: IT_VBRK,
           IT_VBRK[].
    FREE:  IT_VBRK,
           IT_VBRK[].
  ENDIF.
*--Cearing the buffered content
  CALL METHOD CL_GUI_CFW=>FLUSH
    EXCEPTIONS
      CNTL_SYSTEM_ERROR = 1
      CNTL_ERROR        = 2
      OTHERS            = 3.
  IF SY-SUBRC <> 0.
    MESSAGE I000(Z00) WITH 'Error in clearing Buffer'.
    EXIT.
  ENDIF.
  LEAVE PROGRAM.
ENDFORM.                    " EXIT_PROGRAM
FOR SCREEN 100
PROCESS BEFORE OUTPUT.
  MODULE STATUS_0100.
  MODULE PBO_100.
PROCESS AFTER INPUT.
  MODULE USER_COMMAND_0100.
FOR SCREEN 200
PROCESS BEFORE OUTPUT.
  MODULE STATUS_0200.
  MODULE PBO_200.
PROCESS AFTER INPUT.
  MODULE USER_COMMAND_0200.

Similar Messages

  • [NOT iPhone] sample code request: quartz CGDataProvider / destination code

    Lets try this another way, does anyone have a pointer to some good sample code for using CGDataProviders and Destinations to load and view JPEG files? I can't seem to find any in the apple support pages.
    thanks.

    addition: I'm working in C/C++ so Obj-C code is less helpful...

  • Request for sample code of hr_ex_employee_api.actual_termination_emp

    Hi,
    I need sample code for hr_ex_employee_api.actual_termination_emp . anyone who worked on this api or who have knowledge of this api,Please send the sample code
    Thanks and Regards
    Dixit

    I do not have sample code but it is not a difficult API to call. I have worked on it before, so if you have a specific question on it, happy to help out if I can.

  • Request for sample code, Validating XML Schema

    Does anyone have some sample code to validate
    an XML Schema with the Oracle parser?
    Also, the classgen code seems to have more XML Schema classes in it. There is an xschema.jar full of XML Schema related code. Would it be possible to use this code?
    I've tried DOMSample.java with the v2 parser. It seems to happily echo Schema based XML files that are obviously wrong. (I use Tibco's XML Authority to verify the XML file and XML Schema).

    I do not have sample code but it is not a difficult API to call. I have worked on it before, so if you have a specific question on it, happy to help out if I can.

  • Need sample code for Using BADI ME_PROCESS_REQ_CUST

    Dear all,
    Initially my requirement is to Validate the Document Type of Purchase Request ion as per material.
    I have created a implementation for BADI : ME_PROCESS_REQ_CUST .
    im new to OOPS-ABAP, so pls send *sample code for how to use these methods PROCESS_ITEM,
    like declarations, assignment of data into internal table  for further validation*.
    Regards,
    NIranjan.G

    Hi,
    get the item data ....
         *DATA : lt_item TYPE MEREQ_ITEM,
                       ls_item liek line of it_item*
             CALL METHOD im_item->GET_DATA
               RECEIVING
                 RE_DATA = lt_item .
    you will get the data in lt_item.. table
    Thanks,
    Shailaja Ainala.

  • Sample Code in BADI for Open Hub Services

    Hi all,
            We have a requirement to extend(add few new fields and  populate them using BADI) for the target structure of Infospoke in Open hub services.
    I have 2 issues which are stopping us to proceed further.
           1.   I did this by just adding new fields in this change mode of target Structure (didn't used 'Append structure' as while saving and creating T.port request,its popping error like 'Structure not present in TRDIR).I am not able to assign this to any T.request,as of now I have saved it as Local object.How can I assign this to an request?is it possible?.
           2. After putting breakpoint in the BADI I don't see any data in the Importing table.I need some sample code in the BADI which should populate the New fields in the target structure.
    It will be great if anyone of you will give us any solution for the same.
    Thanks,
    Rahul.
    Edited by: Rahul Siddi on Oct 12, 2009 3:04 PM

    Hello Rahul,
    Find the code below with the steps to be implemented.
    Enter your infospoke in the edit mode.
    - On the Transformation tab set the indicator for the Infospoke with Transformation with BADI so that the infospoke is activated.
    - This will take you to the Addin implementation/BADI builder.
    - Enter the short text/description for the implementation. The implementation name is always the same as the technical name of the infospoke
    - The implementation of the BADI is always filter dependant.
    - In the properties tab of the infospoke enter your infospoke under the Filter specifications.
    If you do not specify an InfoSpoke under Filter Specifications, then this implementation is valid for all InfoSpokes. This means that this is called up for all InfoSpokes during the extraction.
    - Activate your class
    - From your interface tab page, double click on the Transofrm Method and you will arrive in the class builder page
    - Here you can enter the code
    - To do a look up of the master data you have to write a code similar to the one I've given below. This is just an example for looking up material master.
    IF FLT_VAL = 'Your infospoke'.
    T_DATA_IN] = I_T_DATA_IN[.
    Select zstd_cost from /bi0/pmaterial into table T_return
    For all entries in T_DATA_IN
    WHERE material = T_DATA_IN-material.
    ...Continue with your code.
    Append output from T_return to your output E_T_DATA_OUT
    - Activate your method. Return to the BAdI builder. Return to your InfoSpoke.
    Check if you missed any of these...
    Kris...

  • Materials about badi Pt_abs_req and a sample code of using it.

    hi,
    i need to use the Pt_abs_req. i tryed a lot but i didnt get any hit what it processsing . so try to give a sample code using this. please any one help me.

    Well in the same thread, there are many notes, did you apply all the notes? Please ensure all the notes are implemented first. 1850185 1839544 1833463 1822392 1743398 1721247 You can take a trace using ST12 as well In a test system you can try the modification and see too if the above notes doesn't help. Also, Ensure you have less request in SENT, APPROVED status, and error status, Typically we recommend to close out or delete older requests of leave request as they put load in validation.

  • New cluster sample code

    Hello,
    There is a new cluster sample code under the sample code directory.
    Description:
    Giving a new collection of documents or a document hitlist from a new query, it will be more efficient for
    users to known what is in the collection by organizing the collection based on the document sementics. To
    partition a collection is the task of clustering. Here is an implementation and sample code of clustering
    based on Oracle Text.
    http://otn.oracle.com/sample_code/products/text/htdocs/cluster.html

    You'll find all the details you need to accomplish this in the ADF Developer's Guide for Forms/4GL Developers on the ADF Learning Center at http://www.oracle.com/technology/products/adf/learnadf.html.
    Section "8.3 Adding a Custom Service Method" explains how to add a service method to your application module.
    Section "7.8.3 Example of Creating a New Service Request" shows the code required to create a new row in a view object.
    Then you would just use the setAttribute() method on the target row to set the desired attributes to the new values based on the values from the source row.
    Section "8.4.1 How to Publish Custom Service Methods to Clients" describes how you would publish your service method to clients.
    Section "10.3.3 How the Data Model and Service Methods Appear in the Data Control Palette" describes where to look to see your published client methods in the data control palette to drop them as a button on a page.
    Section "4.5 Understanding the Active Data Model" explains why the UI will automatically refresh to display the changes you've made in your application module method when it's invoked.

  • ARB PHP Sample Code SOAP Exception

    Hello Everybody
    I m using ARB PHP Sample Code.
    I m using it as it is provided with my login id and transaction key
    I m using PHP 5.2 version
    I m quite new to SOAP.
    Everything seems fine but the script is throwing following exception.
    SoapFault exception: [soap:Client] Server was unable to read request.
    ---> There is an error in XML document (2, 584). ---> Input string was
    not in a correct format. in /mysite//php_arb/PHP/
    api_authorize_net_soap_v1.php:1869 Stack trace: #0 /mysite//php_arb/
    PHP/api_authorize_net_soap_v1.php(1869): SoapClient-
    >__soapCall('ARBCreateSubscr...', Array) #1 /mysite//php_arb/PHP/
    subscription_create.php(24): AuthorizeNetWS-
    >ARBCreateSubscription(Object(ARBCreateSubscription)) #2
    May i please have some help on how to resolve this and get the code
    working for me?
    I m trying to trace out the issue but my efforts are in vain.
    I look forward to recieve some help from everybody in this group
    Pls reply
    Thanking You in advance

    Hello Devster,
    Thank you to post your question on TechNet forum.
    After reviewing the whole post, I have a question to you. You can access the report via the link, http://myServer/Reports_DEVPROJECT/Pages/Report.aspx?ItemPath=%2fData+Mgmt%2fSample+Letter.
    From the URL, I can see that the report is located at: /Data Mgmt/Sample Letter, instead of /DataMgmt/Sample Letter. In addition, I found that the target report is "/DataMgmt/Sample HAP Letter" instead of "/DataMgmt/Sample Letter" as the error described. I
    am not sure whether you post out the correct code segment.
    Please check the above things on your side, and hope it is helpful to you.
    Regards,
    Edward
    Edward Zhu
    TechNet Community Support

  • Sample Code to check AD User Status

    Gurus,
    I want to check status of ADUser using Java Code , request you to please share any code snippet.
    Thanks.
    Edited by: OIMAndMe on Jan 2, 2013 11:00 PM

    get the below one for sample code
    http://www.myjeeva.com/2012/05/querying-active-directory-using-java/
    Querying deleted objects container in Active Directory using JNDI
    there is no such status attribute in ad but you have to get the userAccountControl attribute for same. add the userAccountControl in the returnAttribute and then decode it (for example,if the value of userAccountControl =512 means Enable)

  • ServerSession in FBS  (otn sample code)

    I download FBS OTN sample code which version
    use Toplink for manage persistence..
    I have notice about some class that hold
    ServerSession as it member variable
    such as
    ////////////// FBS
    package oracle.otnsamples.ibfbs.trademanagement.helper;
    public class StockRateHelper {
    // Toplink Server session
    private ServerSession server = null;
    public StockRateHelper()
    throws TradeManagementEventException{
    try {
    // Initialize ServerSession from session.xml
    server = (ServerSession) SessionManager.getManager().getSession(new XMLLoader(),
    "FBSServerSession",
    Thread.currentThread().getContextClassLoader());
    }catch(DatabaseException dbEx) {
    throw new TradeManagementEventException(" Error initializing Server Session :"+dbEx);
    public void loadRates(Collection stockRates)
    throws DatabaseException {
    // Initialize client session
    ClientSession client = server.acquireClientSession();
    // Enable batch-writing [ Write Optimization ]
    client.getLogin().useBatchWriting();
    // Sequence pre-allocation has been enabled in project.xml with size of 50
    // Get a transaction
    UnitOfWork uow = client.acquireUnitOfWork();
    // Register the objects with transaction
    uow.registerAllObjects(stockRates);
    // Commit
    uow.commit();
    I can deploy and run this sample (after spend a moment
    for fix database schema) on OC4J10g developer preview
    I have some Question
    - why ServerSession not need to login before it provide ClientSession
    - I don't see code for disconnect (logout) from DB , does it cause resource leak ?
    thank you

    Hi,
    why ServerSession not need to login before it provide ClientSession.When we use SessionManager to retrieve sessions, in the call to getSession(), if the session is not already in the session manager's in-memory cache of sessions, the session manager creates the session and logs in. Hence we don't have to login explicitly( when using SessionMananger).
    To open Session with No Login
    SessionManager manager = SessionManager.getManager();
    Session session = manager.getSession( new XMLLoader(), // XML Loader (sessions.xml file)
                                              "mysession", // session name
                    YourApplicationClass.getClassLoader(), // classloader
                                                    false, // log in session
                                                   false); // refresh session
    I don't see code for disconnect (logout) from DB , does it cause resource leak ?When using a three-tier architecture ( Sever-Client Session ), the client session is used to perform all operations. The client forwards all the request to the server session, which either operates on the cache or the database ( if the data is not present in the cache) . Hence the sever session is the entity that takes care of managing database resources and it has the intelligence built-in to manage the connections and resources. We don't have to worry about that. Finally when the
    application goes down, we must take care of closing the server session.
    We hav't explicitly closed the sever session in this application. If you require to close the server session and not
    depend on the timeout mechanism, you can explicitly close the connection when the application is destroyed.
    LoadDataServletCtxLsnr.java
    public void contextDestroyed(ServletContextEvent sce) {
        // Close server session
    I have notice about some class that hold ServerSession as it member variableAll the classes point to the same instance of SeverSession and they don't have seperate instances. There can be only one seversession for an application. The ServerSession instance is got from the Sigleton class SessionManager which manages the ServerSession.
    HTH.
    Regards
    Elango.

  • Web Service API sample code

    Howdy All,
    I am trying to work through the iTunes U Admin's guide directions on how to upload content using the Web Service API. I have completed everything through step 2, (I believe it is page 48 in the current guide), Request an Upload URL from iTunes U. After I try to POST a file to the URL returned in step 2 the only response I receive back from the server is a 500 error. I am writing my application in C# so using a UNIX curl script to perform the file upload is not possible, and that seems to be the only thing close to sample code that I can find.
    Has anybody else written some .NET code that performs the file upload in step 3 that they would be willing to share? Even Java code that I could port over to C# would be a good start. I can also post some of my own code if there is anybody that feels like taking a look at it.
    Thanks,
    David
      Other OS  

    Couple of pointers for you ...
    First is that the documentation (last time I looked) has a bug that will prevent you from using the web services API. Here is a link to the changes you need to make:
    http://discussions.apple.com/thread.jspa?threadID=899752&tstart=15
    Next, when I was working through this stuff, I found learned a ton about HTTP I didn't previously know (like how to construct a valid multipart MIME doc). If it would be helpful, your POSTed doc should look pretty close to this:
    Content-Type: multipart/form-data; boundary=0xKhTmLbOuNdArY
    --0xKhTmLbOuNdArY"
    Content-Disposition: form-data; name="file"; filename="myXMLFile.xml"
    Content-Type: text/xml; charset="utf-8"
    <?xml version="1.0" encoding="UTF-8"?>
    <ITunesUDocument>
    <ShowTree>
    <KeyGroup>maximal</KeyGroup>
    </ShowTree>
    </ITunesUDocument>
    --0xKhTmLbOuNdArY--
    I would be happy to share my own code, but it might not be what you're after (I used Objective-C and Apple's NSMutableHTTPRequest Cocoa class to do my HTTP POST). I am not a C# guy, but I would bet dollars-to-donuts that C# has some kind of class that serves as a wrapper for an HTTP POST request ... you give it the HTML, it POSTs.
    MacBook Pro   Mac OS X (10.4.8)   I lied. I'm running Leopard

  • KIMYONG :  API ( FND_SUBMIT,  FND_REQUEST) Sample Code 소개

    Purpose
    Extension 개발자들이 간혹 요청하는 Standard API (FND_SUBMIT, FND_REQUEST)의 sample code입니다.
    Configuring the Script
    FND_SUBMIT test procedure and sample code
    Creates a procedure called fnd_submit_test that can be registered and run as a concurrent program.
    This procedure will use the FND_SUBMIT API to submit a request set. (Function Security Reports - This request set should be seeded, if it is not available the values in the script may need to be changed.) The procedure will then place itself in a Paused status until the request set completes.
    Running the Script
    1. Install this procedure in the APPS schema.
    2. Register the procedure as a concurrent program
    Caution
    This script is provided for educational purposes only and not supported by Oracle Support Services. It has been tested internally, however, and works as documented. We do not guarantee that it will work for you, so be sure to test it in your environment before relying on it.
    Proofread this script before using it! Due to the differences in the way text editors, e-mail packages and operating systems handle text formatting (spaces, tabs and carriage returns), this script may not be in an executable state when you first receive it. Check over the script to ensure that errors of this type are corrected.
    Script
    REM +==========================================================================
    REM | Concurrent Processing Sample Code
    REM |
    REM | FILE:
    REM | fnd_submit_test.pls
    REM |
    REM | REVISION:
    REM | $Id$
    REM |
    REM | DESCRIPTION:
    REM | FND_SUBMIT test procedure and sample code
    REM | Creates a procedure called fnd_submit_test that can be registered
    REM | and run as a concurrent program.
    REM | This procedure will use the FND_SUBMIT API to submit a request set.
    REM | (Function Security Reports - This request set should be seeded, if
    REM | it is not available the values in the script may need to be changed.)
    REM | The procedure will then place itself in a Paused status until the
    REM | request set completes.
    REM |
    REM | INSTRUCTIONS:
    REM |
    REM | 1. Install this procedure in the APPS schema.
    REM |
    REM | 2. Register the procedure as a concurrent program
    REM |
    REM |
    REM +==========================================================================
    whenever sqlerror exit failure rollback;
    create or replace procedure fnd_submit_test (errbuf out varchar2,
    retcode out varchar2) as
    success boolean;
    req_id number;
    req_data varchar2(10);
    srs_failed exception;
    submitprog_failed exception;
    submitset_failed exception;
    begin
    -- Use FND_FILE to output messages at each stage
    fnd_file.put_line(fnd_file.log, 'Starting test...');
    -- Read fnd_conc_global.request_data, if available then we have been
    -- reawakened after the request set has completed.
    -- If so, exit.
    req_data := fnd_conc_global.request_data;
    if (req_data is not null) then
    errbuf := 'Done!';
    retcode := 0 ;
    return;
    end if;
    -- Step 1 - call set_request_set
    fnd_file.put_line(fnd_file.log, 'Calling set_request_set...');
    success := fnd_submit.set_request_set('FND', 'FNDRSSUB43');
    if ( not success ) then
    raise srs_failed;
    end if;
    fnd_file.put_line(fnd_file.log, 'Calling submit program first time...');
    -- Step 2 - call submit program for each program in the set
    success := fnd_submit.submit_program('FND','FNDMNFUN', 'STAGE10', 'System Administrator', chr(0));
    if ( not success ) then
    raise submitprog_failed;
    end if;
    fnd_file.put_line(fnd_file.log, 'Calling submit program second time...');
    success := fnd_submit.submit_program('FND','FNDMNMNU', 'STAGE10', 'System Administrator', chr(0));
    if ( not success ) then
    raise submitprog_failed;
    end if;
    fnd_file.put_line(fnd_file.log, 'Calling submit program third time...');
    success := fnd_submit.submit_program('FND','FNDMNNAV', 'STAGE10', 'System Administrator', chr(0));
    if ( not success ) then
    raise submitprog_failed;
    end if;
    -- Step 3 - call submit_set
    fnd_file.put_line(fnd_file.log, 'Calling submit_set...');
    req_id := fnd_submit.submit_set(null,true);
    if (req_id = 0 ) then
    raise submitset_failed;
    end if;
    fnd_file.put_line(fnd_file.log, 'Finished.');
    -- Set conc_status to PAUSED, set request_data to 1 and exit
    fnd_conc_global.set_req_globals(conc_status => 'PAUSED', request_data => '1') ;
    errbuf := 'Request set submitted. id = ' || req_id;
    retcode := 0;
    exception
    when srs_failed then
    errbuf := 'Call to set_request_set failed: ' || fnd_message.get;
    retcode := 2;
    fnd_file.put_line(fnd_file.log, errbuf);
    when submitprog_failed then
    errbuf := 'Call to submit_program failed: ' || fnd_message.get;
    retcode := 2;
    fnd_file.put_line(fnd_file.log, errbuf);
    when submitset_failed then
    errbuf := 'Call to submit_set failed: ' || fnd_message.get;
    retcode := 2;
    fnd_file.put_line(fnd_file.log, errbuf);
    when others then
    errbuf := 'Request set submission failed - unknown error: ' || sqlerrm;
    retcode := 2;
    fnd_file.put_line(fnd_file.log, errbuf);
    end;
    rem ===================================================================
    commit;
    exit;
    Reference
    자세한 사항은 Note 221542.1 를 참고하세요.

    Not sure about that particular option, but in general you pass in pairs - an example from code I didn't write but maintain (so if this is the worst possible way, I apologize)
    proj_req_id6 := FND_REQUEST.SUBMIT_REQUEST('SQLGL', 'XXXX_GLGENLED_PDF',
                              'XXXX General Ledger',
                              '',dummy_default,
                              'P_SET_OF_BOOKS_ID='||v_rep_cmp.set_of_books_id,'P_CHART_OF_ACCOUNTS_ID=101',
                              'P_KIND=L','P_CURRENCY_CODE='||v_rep_cmp.currency_code,
                              'P_ACTUAL_FLAG=A','P_BUD_ENC_TYPE_ID=100',
                              'P_START_PERIOD='||'&1','P_END_PERIOD='||'&1',
                              'P_MIN_FLEX='||v_min_flex||'.'||v_emp_cost_center.COST_CENTER||'.00000.000.000.000.00',
                              'P_MAX_FLEX='||v_max_flex||'.'||v_emp_cost_center.COST_CENTER||'.99999.999.999.ZZZ.99',
                              'P_PAGE_SIZE=180',chr(0),'',
                              '','','','','','','','','','');You see where I have option pairs - for example
    'P_ACTUAL_FLAG=A'Tells my program that the value for parameter P_ACTUAL_FLAG is A
    This example is from a SQL*Plus script, hence the &1 for the value substitutions.
    Hope that helps

  • Pleasee Help , URGENTT , Need sample code

    We should upload Sales Order XML File into OA Tables everyday .
    As I am very new to XML I request to give complete sample code ( giving just the logic needs time to understand, very urgent..)
    The current XML File can have mutilpe one sales order and each sales order can have many lines .Each line can have multiple taxes.
    Pls give the sample Code which you think is the best approach.
    I have used xpath(may not be right)
    I want to insert Parent Node / Child Node / Grand Child Done as one set of data.
    I used Xpath syntax , when I give the Parent node path in for loop, it inserts all parent nodes data at one time into the table , similarly all child nodes at one time .
    So I am unable to link grand child record with child record and parent record.
    To be specific , I am unable to trace these are the tax records for this line from this order.
    I have used xpath. I have loaded the xml file into table with clob variable
    l_OrderRequest_nodelist := xslprocessor.selectNodes(xmldom.makeNode(l_doc), '/Recordset');
    FOR rec IN 0 .. xmldom.getlength(l_OrderRequest_nodelist) -1 loop l_OrderRequest_node := xmldom.item(l_OrderRequest_nodelist,
    rec);
    end loop;
    we are not validating Sales order XML File with DTD or XSD .
    Please give sample code for parent / child /grandchild .
    Below is the sample file.
    - <Recordset>
    - <Header dueDate="2007-01-17T16:09:05" orderDate="2004-01-17" orderID="0009" transactionID="1389" type="new">
    <KeyIndex>2</KeyIndex>
    - <BillTo>
    - <Address addressID="5619" isoCountryCode="US">
    <Name>fMat</Name>
    - <PostalAddress name="default">
    <Street>34545</Street>
    <City>dfgfg</City>
    <State>AZ</State>
    <PostalCode>85086-1693</PostalCode>
    <County>Maricopa</County>
    <Country>US</Country>
    </PostalAddress>
    <Email name="default">[email protected]</Email>
    </Address>
    </BillTo>
    <PromotionCode />
    - <SubTotal>
    <Money currency="USD">32.49</Money>
    </SubTotal>
    - <Tax>
    <Money currency="USD">2.32</Money>
    <Description />
    </Tax>
    - <Shipping>
    <Money currency="USD">8.95</Money>
    <Description />
    </Shipping>
    </Header>
    - <Detail lineNumber="1" quantity="1">
    - <ItemDetail>
    - <UnitPrice>
    <Money currency="USD">29.99</Money>
    </UnitPrice>
    <ShortName>Little;reg; pxxxx® Learning System</ShortName>
    </ItemDetail>
    - <Tax>
    <Money currency="USD">1.68</Money>
    <Description />
    - <TaxDetail category="sales">
    - <TaxAmount>
    <Money currency="USD">1.68</Money>
    </TaxAmount>
    <TaxLocation>AZ</TaxLocation>
    </TaxDetail>
    </Tax>
    </Detail>
    - <Detail lineNumber="2" quantity="1">
    - <ItemDetail>
    - <UnitPrice>
    <Money currency="USD">29.99</Money>
    </UnitPrice>
    <ShortName>Little;reg; pxxxx® Learning System</ShortName>
    </ItemDetail>
    - <Tax>
    <Money currency="USD">1.68</Money>
    <Description />
    - <TaxDetail category="sales">
    - <TaxAmount>
    <Money currency="USD">1.68</Money>
    </TaxAmount>
    <TaxLocation>AZ</TaxLocation>
    </TaxDetail>
    </Tax>
    - <Tax>
    <Money currency="USD">0.68</Money>
    <Description />
    - <TaxDetail category="sales">
    - <TaxAmount>
    <Money currency="USD">0.68</Money>
    </TaxAmount>
    <TaxLocation>DISTRICT</TaxLocation>
    </TaxDetail>
    </Tax>
    </Detail>
    </Recordset>
    We are working on Oracle9i Enterprise Edition Release 9.2.0.6.0
    Thanks in Adv
    Kal

    Hi
    here is a quick demo:
    DATA: a,b, result(10).
    IF a IS Initial.
      Result = 'yes'.
    ELSEIF NOT a IS Initial AND NOT b is initial.
      Result = 'no'.
    Else.
    RESULT = 'abc'.
    ENDIF.

  • How to Delete a Specific Cell in a Matrix + plz Give sample code for Lost F

    hello there !!!!
    i m in Great Trouble please help me out..
    i have to search for a specific Column n then i have to validate that portion, similarly after validating i have to add update delete all the fuction apply... so please help me i m very upset.
    Public Sub HandleEventts_Allowance(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef EventEnum As SAPbouiCOM.BoEventTypes, ByRef BubbleEvent As Boolean)
            Try
                Dim Count As Int32
                If FormUID.Equals("Allowance") Then
                    If (pVal.BeforeAction = True) And (pVal.ItemUID = "1") And (pVal.EventType = SAPbouiCOM.BoEventTypes.et_CLICK) Then
                        If pVal.Row = 0 Then
                            'BubbleEvent = False
                        End If
                        o_Matrix = SBO_Application1.Forms.Item(FormUID).Items.Item("MatAllow").Specific
                        Count = o_Matrix.RowCount()
                        SBO_Application1.MessageBox("Matrix Count is " & o_Matrix.RowCount)
                        Validate(pVal, EventEnum, FormUID, BubbleEvent)
                    End If
                End If
            Catch ex As Exception
                SBO_Application1.MessageBox(ex.Message)
            End Try
        End Sub
        Public Sub Validate(ByRef pval As SAPbouiCOM.ItemEvent, ByRef EventEnum As SAPbouiCOM.BoEventTypes, ByVal FormUID As String, ByRef BubbleEvent As Boolean)
            Dim Row, ii As Integer
            o_Matrix = SBO_Application1.Forms.Item(FormUID).Items.Item("MatAllow").Specific
            o_Matrix.FlushToDataSource()
            Try
                For Row = 2 To o_Matrix.RowCount
                    StrName = Convert.ToString(DBtable.GetValue("CardCode", Row - 1)).Trim()''' i got Error over there n rest of my code is also not working pls...
                    StrUId = Convert.ToString(DBtable.GetValue("U_AlwID", Row - 1)).Trim()
                    StrEnter = Convert.ToString(DBtable.GetValue("U_SupEnter", Row - 1)).Trim()
                    StrExist = Convert.ToString(DBtable.GetValue("U_SupExist", Row - 1)).Trim()
                    If Row - 1 < DBtable.Rows.Count - 1 Or (Not (StrName.Equals(String.Empty) And StrUId.Equals(String.Empty) And (StrEnter.Equals(String.Empty) Or StrExist.Equals(String.Empty))) And (Row - 1 = DBtable.Rows.Count - 1)) Then
                        If (Not StrName.Equals(String.Empty)) And ((StrUId.Equals(String.Empty) Or StrEnter.Equals(String.Empty)) Or StrExist.Trim.Equals(String.Empty)) Then
                            SBO_Application1.StatusBar.SetText("Invalid values provided!Blank values not vllowed", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error)
                            BubbleEvent = False
                            Exit Sub
                        End If
                        For ii = Row To DBtable.Rows.Count - 1
                            If Convert.ToString(DBtable.GetValue("ColName", ii)).Trim().Equals(StrName.Trim()) Then
                                SBO_Application1.StatusBar.SetText("Invalid Allowance ID: Duplication Not Allowed", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error)
                                oForm.Mode = SAPbouiCOM.BoFormMode.fm_UPDATE_MODE
                                BubbleEvent = False
                                Exit Sub
                            End If
                        Next
                        If CDbl(StrName) < 0 Then
                            SBO_Application1.StatusBar.SetText("Invalid values provided!Blank values not vllowed", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error)
                            BubbleEvent = False
                            Exit Sub
                        End If
                    End If
                Next Row
            Catch ex As Exception
                SBO_Application1.MessageBox(ex.Message)
            End Try
        End Sub

    Hello there
    sir i want to Add Update and delete these three basic operation onto the Matrix, Sir u game me a Sample code of Delete a specific Column...
    Sir can u do me a favour pls leave every thing n just told me how to update a matrix ,like i have to fill the matrix field through the DATABASE table now i want to update the DataBase table from the matrix..
    i just only know thta i have to fill back database table with the help of FLUSHTODATABASE()
    here is my Sample Code...n i have to update in the validate portion...
    Public Sub HandleEventts_Allowance(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef EventEnum As SAPbouiCOM.BoEventTypes, ByRef BubbleEvent As Boolean)
            Try
                Dim oCellValue As SAPbouiCOM.EditText
                If FormUID.Equals("Allowance") Then
                    If (pVal.ItemUID = "MatAllow") Then
                        If pVal.Row = 0 Then Exit Sub
                        o_Matrix = SBO_Application1.Forms.Item(FormUID).Items.Item("MatAllow").Specific
                        If (pVal.Row > o_Matrix.RowCount) Then Exit Sub
                        oForm = SBO_Application1.Forms.Item(FormUID)
                        If (pVal.ItemUID = "1" Or EventEnum = SAPbouiCOM.BoEventTypes.et_CLICK) Then
                            o_Matrix = SBO_Application1.Forms.Item(FormUID).Items.Item("MatAllow").Specific
                            If pVal.ColUID = "ColName" And pVal.BeforeAction = True Then
                                If pVal.Row = 0 Then Exit Sub
                                oCellValue = CType(o_Matrix.Columns.Item(pVal.ColUID).Cells.Item(pVal.Row).Specific(), SAPbouiCOM.EditText)
                                If (oCellValue.Value.Trim().Equals(String.Empty) And o_Matrix.RowCount <> pVal.Row) Then
                                    SBO_Application1.StatusBar.SetText("Invalid Allowance ID: Blank Value Not Allowed", )
                                    oCellValue.Active = True
                                    BubbleEvent = False
                                    Exit Sub
                                End If
                            End If
                        End If
                    End If
                End If
                Validate(pVal, EventEnum, FormUID, BubbleEvent)
            Catch ex As Exception
                SBO_Application1.MessageBox(ex.Message)
            End Try
        End Sub
    Public Sub Validate(ByRef pval As SAPbouiCOM.ItemEvent, ByRef EventEnum As SAPbouiCOM.BoEventTypes, ByVal FormUID As String, ByRef BubbleEvent As Boolean)
            Dim str, str1 As String
            Dim checkbox1, Checkbox2 As SAPbouiCOM.CheckBox
            Dim o_Matrix As SAPbouiCOM.Matrix
            Dim Sum As Integer
            Dim oRecordset As SAPbobsCOM.Recordset
            Dim Container As Integer
            Dim Count As Int32
            o_Matrix = SBO_Application1.Forms.Item(FormUID).Items.Item("MatAllow").Specific
            oRecordset = o_CompanyObj.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
            Try
                For Count = 0 To DBtable.Rows.Count - 1
                    CodeFill = Convert.ToString(DBtable.GetValue("Name", Count).Trme())
                    NameID = Convert.ToString(DBtable.GetValue("ColUID", Count).Trim())
                    Price = Convert.ToString(DBtable.GetValue("ColPrice", Count).Trim())
                    Quantity = Convert.ToString(DBtable.GetValue("ColQuant", Count).Trim())
                    Total = Convert.ToString(DBtable.GetValue("ColTotal", Count).Trim())
                    checkbox1 = o_Matrix.Columns.Item("ColSEnter").Cells.Item(Count).Specific
                    Checkbox2 = o_Matrix.Columns.Item("ColSExist").Cells.Item(Count).Specific
                    If (checkbox1.Checked = True) And (Checkbox2.Checked = True) Then
                        Dim Sql As String
                        Sql = "Update [@Supplier] Set U_Price=' " & Price & " ',U_ID=" & NameID & "Where Name ='" & CodeFill & " '"
                        oRecordset.DoQuery(Sql)
                    End If
                Next Count
                SBO_Application1.MessageBox("Record was Updated")
            Catch ex As Exception
                SBO_Application1.MessageBox(ex.Message)
            End Try
        End Sub

Maybe you are looking for

  • Refreshing DEV from TEST in R12

    Hi all, I'm planning to Refresh a Development instance from a Test instance. Both the source and Target are within the same server. I'm following the Note: 406982.1- Cloning Oracle Applications Release 12 with Rapid Clone. Here, I'm refering to Secti

  • Is there something wrong with the IOS 6 update?

    Ever since I downloaded the iTunes IOS 6 update on my 2nd-gen iPad, I haven't been able to check my list of purchased apps in the purchased section the iTunes store app. I tried logging out & signing back in and I tried rebooting my iPad, but neither

  • GL Account Hierarchy

    Hi BW Experts, Our's is a BW 3.0B system connected to ECC 6.0. In BW we have a hierarchy defined for GL Account which has GL accounts listed in both Assets & Liabilities. This hierarchy is coming from ECC as designed by functional team. The client re

  • HT1766 My iPod Touch (1st gen) is taking literally hours to back up. Why?

    I tried to sync music onto it today and it said stage 1 of 5: Backing up. it said this for 5 hours. Now i am trying to install a newer iOS but the same thing is happening. What can I do?

  • Worksetmap not showing correct links when we launch via quick link

    Hello Portal gurus, My Scenario: I'm using EP7 (SP Launch a quick link from a HTML to display Worksetmap iview. Problem: Displays the whole role node of links but not the relevant links. Displays properly when we click on the relevant DTN(detailed le