Problem in getting the BASKET HEADER DATA in java class?

Hi Gurus,
In the order_change.jsp i have created a new custom input field and when i give some text in it, i should pass this as extension data. For this i have created a class to add this extension data:
UserSessionData userSessionData = UserSessionData.getUserSessionData(request.getSession());
BusinessObjectManager isaBOM = (BusinessObjectManager)userSessionData.
                                                      getBOM(BusinessObjectManager.ISACORE_BOM);
ZCustomer mybom = (ZCustomer) userSessionData.getBOM(ZCustomer.ZCUSTOM_BOM);
Basket basket = isaBOM.getBasket();
HeaderData  headerData = isaBOM.getBasket().getHeaderData();
String extBasketHeaderData = request.getParameter("test");     
headerData.addExtensionData("ZTEST", extBasketHeaderData);
But iam getting a null pointer execption when the following is executed in the above code
HeaderData  headerData = isaBOM.getBasket().getHeaderData();
Can you please help me why i am getting null pointer exception when i try to get the header data.
I have tried interpreting my action class with the following classes
1. ordersend.do
2. maintainorder.do
2.orderchangeconfirmed.do
but not able to get the header data if include in any of the above the action class.
Please help me out in this regard.
Thanks a lot in Advance.
Regards,
Lakshman.

Hi All,
I have a similar kind of problem. I want to add extension data to a standard FM . But when I am creating a basket object
Basket basket = isaBOM.getBasket();   I am getting an error saying
                                                Type mismatch:Cannot convert from void to basket
and also If I am trying to import
                                                import com.sap.isa.businessobject.order.Basket;
I am getting an error saying
                     This compilation unit indirectly references the missing type com.sap.isa.businessobject.BusinessObjectBase(typically some required class file is referencing a type outside the classpath)
Kindly help me on this.
Thanks
Harshmeet Singh

Similar Messages

  • How to  get the profile object in simple java class  (Property accessor)

    Hi All,
    Please guide me how to get the profile object in simple java class (Property accessor) which is extending the RepositoryPropertyDescriptor.
    I have one requirement where i need the profile object i.e i have store id which is tied to profile .so i need the profile object in the property accessor of the SKU item descriptor property, which is extending RepositoryPropertyDescriptor.
    a.I dont have request object also to do request.resolvename.
    b.It is not a component to create setter and getter.It is simple java class which is extending the RepositoryPropertyDescriptor.
    Advance Thanks.

    Iam afraid you might run into synchronization issues with it. You are trying to get/set value of property of a sku repository item that is shared across various profiles.
    Say one profile A called setPropertyValue("propertyName", value).Now another profile B accesses
    getPropertyValue() {
    super.getPropertyValue() // Chance of getting value set by Profile A.
    // Perform logic
    There is a chance that profile B getting the value set by Profile A and hence inconsistency.
    How about doing this way??
    Create PropertyDescriptor in Profile (i.e user item descriptor), pass the attribute CustomCatalogTools in userProfile.xml to that property.
    <attribute name="catalogTools" value="atg.commerce.catalog.CustomCatalogTools"/>
    getPropertyValue()
    //You have Profile item descriptor and also storeId property value.
    // Use CustomCatalogTools.findSku();
    // Use storeId, profile repository item, sku repository item to perform the logic
    Here user itemdescriptor getPropertyValue/setPropertyValue is always called by same profile and there is consistency.
    -karthik

  • How can i get the HTTP header info using Java

    Hi,
    I kinda need to extract the HTTP header info from a page that i goto through a URL objecrt and socket. Java.
    Can someone please help me.. thanks!!!!
    System.out.println("Enter URL : ");
    String getAdd; // The URL that the crawler begins at.
    // Manually take in URL
    Scanner sc = new Scanner(System.in);
    getAdd = sc.nextLine();
    URL myURLobj = new URL(getAdd);
    String hostName = myURLobj.getHost();
              Socket s = new Socket(hostName, 80);

    URL url = new URL(getAdd);HttpURLConnection conn = (HttpURLConnection)url.openConnection();
    Map<String, List<String>> headerFields = conn.getHeaderFields();

  • Hi iam getting the alv grid data in excel format but iam facing one problem

    hi iam getting the alv grid data in excel format but iam facing one problem ,
    i.e., i want it read only  but iam getting it in edit mode i use layout default in excel iam getting in xl directly but in edit mode but i need it in read only mode
    what i have to do for that  and bdy knows reply me i need it urgently.

    there's always edit-mode if you choose excel-inplace - but noone can modify/rewrite the data
    A.

  • Transfer data from the PO to the invoice header data in MIRO (user exits)

    Hi.
    We are trying to transfer some basic information from the PO to the invoice header data by the time we process the logistic invoice verification (transaction MIRO).
    The information we want to transfer is:
    1.     PO Text (screen field DRSEG-TXZ01) -
    > should be transferred to Header text field (screen field INVFO-SGTXT) located in the tab u2018Basic Datau2019.
    2.     Purchasing Document Number (screen field DRSEG-EBELN) -
    > should be transferred to Assignment field (screen field INVFO-ZUONR) located in tab u2018Detailsu2019.
    The exits we had listed for this tasks are:
    EXIT_SAPLMR1M_002: Change Proposed Account Assignment
    EXIT_SAPLMR1M_003: Pass On Document Header Data
    EXIT_SAPLMR1M_004: Change the Withholding Tax- and Split Table
    EXIT_SAPLMRMP_010: Analyze Document Header and Item Data
    The second one, EXIT_SAPLMR1M_003, should have stopped at by the time we processed the information, but it didnu2019t.
    Iu2019ve heard EXIT_SAPLMRMP_010 would no longer be functional from version 4.6c.
    Users enter the information in MIRO following this chronological order:
    1.Invoice date
    2.Reference
    3.Purchase order number ---> operation which u201Ccallsu201D the PO to the screen.
    4.Amount
    5.Flag u201Ccalculate taxu201D field (if mandatory)
    6.Tax on sales/purchases code (if mandatory)
    And then they post. Thatu2019s all.
    Weu2019ve tried to get this data from the time we u201Ccallu201D the PO to the screen, just to see if we can get it before we saved the document, and we werenu2019t capable of doing it. The second option is to get the data right after we process the document (post it), so weu2019ve reached bapi INVOICE_UPDATE but we cannot locate the exact place to put the references to the dynpro (although, weu2019re not 100% sure if this bapi would solve the problem).
    Thanks in advance.
    Sebastian

    Hi Sunil.
    Function MRM_INVOICE_CHECK doesn't exist in system 4.6c. Also I've searched for it in ECC 5 and I got the same result. Are you sure about the name of the function?
    From the function group MRMC, I found this:
    MRM_BADI_INVOICE_CHECK    
    MRM_DUPLICATE_INVOICE_CHECK
    I haven't still check them. But for what I know, the second one (...DUPLICATE...) processes a control to avoid a double entry of the invoice, I not sure it will work. I'll let you know.
    Thanks for answering.
    Sebas

  • Get the custom fields data at the time of save

    Hi,
    We have added few fields in the ICWC for the complaint screen.
    At the time of save i am trigering a BADI.
    I would like to check the data that is entered in those fields of complaint screen.
    Is there any FM which can be used to get the data from the buffer ?
    I have the header GUID available to me .
    Thanks.
    R

    Hi,
    Let me elaborate a bit.
    Users would create the complaints in the ICWC.We have addeded few custom fields in the complaint screen.
    CRMT_CUSTOMER_H_WRKT is extended with the custom fields.
    At the save i am trigerring the Partner Determination BAdi.
    Here i have the complaint guid at run time.
    I would like to check the data entered in the custom field in the complaint screen. Based on this i would like to determine one more partner.
    My question is how can i get the custom field data in the complaint screen in this BAdi.
    The FM:  CRM_ORDER_READ is not returning this data.Is there any FM to get this ?
    Thanks.
    R.

  • I have a Problem in print the long description data through EDI.

    I have a Problem in print the long description data through EDI:Actually we want to print the long description data through EDI, but it not handling our huge long description data. Here is the example of that>We can print the first two lines into EDI output, but it is failing to print the below text: 
    <B>EPSON, TM-U590 Series: </B> Reliable 88 column slip printer. Operator friendly dot matrix impact printing. Ideal for hotel, bank, restaurant and many more applications .<br><BR> Includes: Printer, Black ribbon & a Connect-It Interface. Power Supply & interface cable sold separately. All printers are RoHS compliant & have a standard 1 year depot warranty. <BR> <BR>
       -------------------------------------Failing to print this lines------------------------------------------------------------------
    <b>COLORS:</b> Epson Cool White (ECW) Only<BR><BR><B><FONT COLOR=#FF0000#>Click links below for helpful Information</FONT><b><br><table border="0" bordercolor="" style="" width="100%" cellpadding="5" cellspacing="5"><tr><td><FONT SIZE="2"><CENTER><A HREF="www.sample.com"f.2605" target="_blank"><b>Spec Sheet</b></a></CENTER></FONT></td><td><FONT SIZE="2"><CENTER><A HREF="www.sample.com"f.2606" target="_blank"><b>MSRP Price List</b></a></CENTER></FONT></td><TD><FONT SIZE="2"><CENTER><A HREF="www.sample.com"f.2868" target="_blank"><b>Product Information Guide</b></a></CENTER></FONT></TD></TR><TR><td><FONT SIZE="2" COLOR=#0000FF><B>Warranty Information</B></FONT></td></tr><Tr><td><FONT SIZE="2"><CENTER><A HREF="www.sample.com"f.2554" target="_blank"><b>Depot Warranty</b></a></CENTER></FONT></td><td><FONT SIZE="2"><CENTER><A HREF="www.sample.com"f.2555" target="_blank"><b>Spare In the Air Warranty</b></a></CENTER></FONT></td><td></td></tr></table><br>
    Please provide some useful thoughts on this EDI issue.
    Thanks
    Ameer

    Try using the FM:
    ENQUE_READ2
    Passing the follwing values:
    GNAME --> VBAK (Sales Order header table)
    GARG   --> The lock argument
                       (This will be a combination of client number anb Sales Order No.
                        Eg: '3001210000054' where the first three digit i,e 300 is the client No
                       and 1210000054 is the sales order no.)
    Regards,
    Firoz.

  • Problem with getting the little blackberry icon

    Hi the blackberry I'm using is working and up to date. I was setting up my mates blackberry 9320 but having a problem with getting the little blackberry icon to appear in the top right corner of my phone where the GMS is and signal bar and stuff its something to do with blackberry.
    I tried downloading bbm and it say associating bbm with blackberry id and constant loads with nothing happening bbm not working
    I NEED THE TINY BB ICON AT TOP RIGHT???

    Hi neal123
                            That BlackBerry icon will appear near signal bar when we activate  BIS on a 3G device. Did he activated BIS on his account. ? 
    Click " Like " if you want to Thank someone.
    If Problem Resolves mark the post(s) as " Solution ", so that other can make use of it.

  • To find a user exit which update the Invoice header data

    Hi,
    I need a user exit which will update the invoice header data. For eg I need to update the fields RBKP_V-ESRNR and RBKP_V-ESRRE in table RBKP_V. I was using this user exit EXIT_SAPLMRMP_010 (Program ZXM08U16).But this is not working fine as this has no exporting parameter nor tables of structure RBKP_V.
    I need for transaction MIRO.
    Kindly help ...
    Points will be rewarded
    Thanks in advance

    Hi jayasree,
    with the help of the below given program you can find out the requried user exit by giving the T code (MIRO).
    *& Report Z_USEREXIT_DISPLAY *
    Title : Display UserExits *
    Transport Request No : *
    Modification Log *
    ModNo Date Consultant Description of Change(s) *
    REPORT z_userexit_temp
    NO STANDARD PAGE HEADING
    LINE-SIZE 200
    MESSAGE-ID zz.
    T A B L E D E C L A R A T I O N S *
    TABLES: tftit,
    e071,
    e070.
    S T R U C T U R E D E C L A R A T I O N S *
    TYPES: BEGIN OF x_tstc,
    tcode TYPE tcode,
    pgmna TYPE program_id,
    END OF x_tstc.
    TYPES: BEGIN OF x_tadir,
    obj_name TYPE sobj_name,
    devclass TYPE devclass,
    END OF x_tadir.
    TYPES: BEGIN OF x_slog,
    obj_name TYPE sobj_name,
    END OF x_slog.
    TYPES: BEGIN OF x_final,
    name TYPE smodname,
    member TYPE modmember,
    include(15), "Include name
    END OF x_final.
    I N T E R N A L T A B L E D E C L A R A T I O N S *
    DATA: it_tstc TYPE STANDARD TABLE OF x_tstc WITH HEADER LINE.
    DATA: it_tadir TYPE STANDARD TABLE OF x_tadir WITH HEADER LINE.
    DATA: it_jtab TYPE STANDARD TABLE OF x_slog WITH HEADER LINE.
    DATA: it_final TYPE STANDARD TABLE OF x_final WITH HEADER LINE.
    V A R I A B L E S D E C L A R A T I O N S *
    U S E R I N P U T S S C R E E N *
    S E L E C T I O N S C R E E N *
    SELECTION-SCREEN: BEGIN OF BLOCK blk01 WITH FRAME TITLE text-t01.
    PARAMETERS: p_tcode LIKE tstc-tcode OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK blk01.
    S t a r t o f S e l e c t i o n *
    START-OF-SELECTION.
    PERFORM get_tcodes. "Get Tcodes
    PERFORM get_objects. "Get Objects
    E n d o f S e l e c t i o n *
    END-OF-SELECTION.
    PERFORM display_results. "Display Results
    *& Form get_tcodes
    Get Tcodes
    FORM get_tcodes.
    SELECT tcode
    pgmna
    INTO TABLE it_tstc
    FROM tstc
    WHERE tcode = p_tcode.
    IF sy-subrc = 0.
    SORT it_tstc BY tcode.
    ENDIF.
    ENDFORM. " get_tcodes
    *& Form get_objects
    Get Objects
    FORM get_objects.
    DATA: l_fname LIKE rs38l-name,
    l_group LIKE rs38l-area,
    l_include LIKE rs38l-include,
    l_namespace LIKE rs38l-namespace,
    l_str_area LIKE rs38l-str_area.
    DATA: v_include LIKE rodiobj-iobjnm.
    DATA: e_t_include TYPE STANDARD TABLE OF abapsource WITH HEADER LINE.
    DATA: l_line TYPE string,
    l_tabix LIKE sy-tabix.
    IF NOT it_tstc[] IS INITIAL.
    SELECT obj_name
    devclass
    INTO TABLE it_tadir
    FROM tadir FOR ALL ENTRIES IN it_tstc
    WHERE pgmid = 'R3TR' AND
    object = 'PROG' AND
    obj_name = it_tstc-pgmna.
    IF sy-subrc = 0.
    SORT it_tadir BY obj_name devclass.
    SELECT obj_name
    INTO TABLE it_jtab
    FROM tadir FOR ALL ENTRIES IN it_tadir
    WHERE pgmid = 'R3TR' AND
    object = 'SMOD' AND
    devclass = it_tadir-devclass.
    IF sy-subrc = 0.
    SORT it_jtab BY obj_name.
    ENDIF.
    ENDIF.
    ENDIF.
    *- Get UserExit names
    LOOP AT it_jtab.
    SELECT name
    member
    INTO (it_final-name, it_final-member)
    FROM modsap
    WHERE name = it_jtab-obj_name AND
    typ = 'E'.
    APPEND it_final.
    CLEAR it_final.
    ENDSELECT.
    ENDLOOP.
    *- Process it_final contents.
    LOOP AT it_final.
    l_tabix = sy-tabix.
    CLEAR: l_fname,
    l_group,
    l_include,
    l_namespace,
    l_str_area.
    l_fname = it_final-member.
    CALL FUNCTION 'FUNCTION_EXISTS'
    EXPORTING
    funcname = l_fname
    IMPORTING
    group = l_group
    include = l_include
    namespace = l_namespace
    str_area = l_str_area
    EXCEPTIONS
    function_not_exist = 1
    OTHERS = 2.
    IF sy-subrc = 0.
    IF NOT l_include IS INITIAL.
    *- Get Source code of include.
    CLEAR: v_include, e_t_include, e_t_include[].
    v_include = l_include.
    CALL FUNCTION 'MU_INCLUDE_GET'
    EXPORTING
    i_include = v_include
    TABLES
    e_t_include = e_t_include.
    IF sy-subrc = 0.
    LOOP AT e_t_include.
    IF e_t_include-line CS 'INCLUDE'.
    CLEAR l_line.
    l_line = e_t_include-line.
    CONDENSE l_line NO-GAPS.
    TRANSLATE l_line USING '. '.
    l_line = l_line+7(9).
    it_final-include = l_line.
    MODIFY it_final INDEX l_tabix TRANSPORTING include.
    ENDIF.
    ENDLOOP.
    ENDIF.
    ENDIF.
    ENDIF.
    ENDLOOP.
    ENDFORM. " get_objects
    *& Form display_results
    Display Results
    FORM display_results.
    FORMAT COLOR COL_HEADING.
    WRITE:/1(150) sy-uline.
    WRITE:/ sy-vline,
    2(23) 'Extension Name',
    24 sy-vline,
    25(39) 'Exit Name',
    64 sy-vline,
    65(74) 'Description',
    140 sy-vline,
    141(9) 'Include',
    150 sy-vline.
    WRITE:/1(150) sy-uline.
    FORMAT RESET.
    SORT it_final BY name member.
    LOOP AT it_final.
    CLEAR tftit.
    SELECT SINGLE stext
    INTO tftit-stext
    FROM tftit
    WHERE spras = 'EN' AND
    funcname = it_final-member.
    WRITE:/ sy-vline,
    it_final-name COLOR COL_KEY, 24 sy-vline,
    25 it_final-member, 64 sy-vline,
    65 tftit-stext, 140 sy-vline,
    141 it_final-include, 150 sy-vline.
    WRITE:/1(150) sy-uline.
    ENDLOOP.
    Regards
    Srinivas

  • How to get the sample repository data of over 6000 records for products

    Hi,
    I have MDM installed and ready to use with the standard 9 repositories provided by SAP. I was wondering if I can get the unarchive .a2a file with the sample data of records (I think over 6000 records) for the Products repository. I have tried to bring in the two .a2a product files that I have, but it was giving version inconsistent errors. How do and where do I get the real sample data (not the one we can create in data manager) correct version provided by SAP, so that I can get my hands on SAP data manager funtionality.
    Thanks in advance,
    N@v!n K

    Hi Navin,
    Business Content archives that are provided by SAP for MDM do not come with the sample data.
    In the bsuiness content ,if you unzip the file you will see the a2a archive of the rep as provided by SAP and the import /export maps and the lookup data file.
    There is no main records that SAP provide with the sap content it is basically the data modell that SAP provides so that the foundation is set for you and you can now import and work with the data.
    However if you wish to use the demo repository or the training rep from Inquera then you will same some sample data already loaded in MDM rep to work upon.
    Regarding the version problem
    Check the MDM version of the business content rep with the MDM server you are using .They have to match to work correctly.
    You can work with a lower archives of the rep(say SP04) with an Upgraded MDM server (say SP06) by using the Update Repository option in the context menu of the MDM server in Console.
    But the vice versa is not possible.
    Check you MDM server version by clicking on the MDM server and see its details in the right side record detail pane.
    To know more on the demo and Inquera rep kinldy view the below links:
    https://www.sdn.sap.com/irj/sdn/nw-demomodel#section21 (Demo Rep)
    http://www.inquera.com/InqueraCatalog/CustomerLogin.asp(Demo Rep from Inquera you need to register and they will mail you)
    Hope It Helped
    Thanks & Regards
    Simona Pinto

  • Help needed in getting the previous Quarter Data

    Hello folks,
    I have this procedure where i have to modify the current procedure in the following manner:
    I need to get rid of the variables p_start and p_end so that i cannot see them in the crystal report and include the Frequency in the procedure to get the Data based on the Dates.
    and Main requirement is" If the Frequency is Quarterly " it should get the previous quarter Data, if "Frequency is monthly" it should return the previous month data.Can anyone please let me know where shud i make changes. Am including the procedure for refernce. Any help is appreciated
    Thanks a millioin,
    CREATE OR REPLACE PROCEDURE hcsc_recovery_report_h(report_record in out cr_return_types.gen_cursor,
    p_start       string,
    p_end         string)
    IS
    v_startdate date;
    v_enddate date;
    BEGIN
    v_startdate := to_date(p_start, 'YYYY/MM');
    v_enddate := last_day(to_date(p_end, 'YYYY/MM'));
    open report_record for
    select --distinct r.recovery_id
    r.event_id,
    r.event_case_id,
    c.client_id,
    c.client_code,
    c.client_name,
    b.branch_group_code,
    b.branch_group_description,
    g.employer_group_code,
    g.employer_group_name,
    e.client_policy_identifier,
    e.date_of_incident,
    e.event_type_code,
    sum(nvl(r.amount, 0)) as amt_received,
    nvl(sum(case
    when r.amount >= 0 then
    rd.fees
    else
    rd.fees * (-1)
    end),
    0) as fees,
    ec.close_date, *001* commented
    (case
    when ec.close_date <= to_date(to_char(v_enddate, 'MMDDRRRR') || '235959',
    'MMDDRRRR HH24MISS') then
    ec.close_date
    else
    null
    end) as close_date, --*001*  added
    get_case_value(ec.event_id, ec.event_case_id, v_enddate) as case_value,
    nvl(etl.fee_percent_flag, 'N') workmans_comp,
    max(to_char(r.recovery_date, 'FMMonthYYYY')) Year_Month,
    max(to_char(r.recovery_date, 'YYYYMM')) Y_M,
    max(to_date(to_char(r.recovery_date, 'MMYYYY'), 'MM/YYYY')) date_MY
    from recovery r,
    recovery_detail rd,
    event e,
    client c,
    branch_group b,
    employer_group g,
    event_case ec,
    event_type_lookup etl
    where r.event_id = e.event_id
    and r.event_case_id = ec.event_case_id
    and ec.event_id = e.event_id
    and rd.recovery_id(+) = r.recovery_id
    and r.recovery_date between v_startdate and
    to_date(to_char(v_enddate, 'MMDDRRRR') || '235959',
    'MMDDRRRR HH24MISS')
    and e.client_id = c.client_id
    and g.client_id = c.client_id
    and b.client_id = c.client_id
    and g.employer_group_id(+) = e.employer_group_id
    and b.branch_group_id(+) = g.branch_group_id
    and e.event_type_code = etl.event_type_code -- SST 130852 04/14/09
    group by r.event_id,
    r.event_case_id,
    c.client_id,
    c.client_code,
    c.client_name,
    b.branch_group_code,
    b.branch_group_description,
    g.employer_group_code,
    g.employer_group_name,
    e.client_policy_identifier,
    e.date_of_incident,
    e.event_type_code,
    ec.close_date,
    get_case_value(ec.event_id, ec.event_case_id, v_enddate),
    nvl(etl.fee_percent_flag, 'N')
    having sum(nvl(r.amount, 0)) <> 0
    order by c.client_code,
    b.branch_group_code,
    g.employer_group_code,
    r.event_case_id;
    Edited by: user11961230 on Oct 20, 2009 9:02 AM

    user11961230 wrote:
    1. I want to get rid of the p_start and p_end. So how do i declare the v_startdate and v_enddate in the following part?
    v_startdate := to_date(p_start, 'YYYY/MM');
    v_enddate := last_day(to_date(p_end, 'YYYY/MM'));I'm not sure what you mean by "declare".
    In PL/SQL, "declare" means state (at the beginning of a block) that there will be a certain variable with a certain name (such as v_startdate) and datatype (such as DATE). You're already declaring the variables v_startdate and v_enddate correctly, right before the BEGIN statement.
    Declaring a variable is not the same as initializing it, that is, giving it a value for the first time. Your next question seems to be about initializing..
    2. where exactly shud i include the logic that u have mentioned. sorry a dumb questionIn place of the two assignment statments that reference p_start and p_end.
    3. This time am gonna use frequency instead of report_type so that i will get rid of the p_start and p_end from the procedure.Do you mean you want to pass an argument (called frequency) that tells if you want a quarterly or a mionthly report, just like the variable report_type in my example?
    If so, replace report_type in my example with frequency.
    I think you want something like this:
    CREATE OR REPLACE PROCEDURE hcsc_recovery_report_h
    (      report_record         in out     cr_return_types.gen_cursor
    ,      frequency         IN           VARCHAR2
    IS
         -- Declare local variables:
         v_startdate     date;
         v_enddate      date;
    BEGIN
         -- Initialize v_startdate and v_enddate, depending on frequency
         IF  frequency = 'QUARTERLY'
         THEN
              v_startdate := TRUNC ( ADD_MONTHS (SYSDATE, -3)
                                           , 'Q'
              v_enddate := TRUNC (SYSDATE, 'Q');
         ELSIF  frequency = 'MONTHLY'
         THEN
              v_startdate := TRUNC ( ADD_MONTHS (SYSDATE, -1)
                             , 'MM'
              v_enddate := TRUNC (SYSDATE, 'MM');
         END IF;
         --   Subtract one second from v_enddate
              v_enddate := v_enddate - ( 1
                                            / (24 * 60 * 60)
         open report_record for
         select --distinct r.recovery_id
                r.event_id,
         and     r.recovery_date  BETWEEN  v_startdate     
                         AND       v_enddate
         ...When you post formatted text on this site (and code should always be formatted), type these 6 characters:
    (small letters only, inside curly brackets) before and after sections of formatted text, to preserve spacing.
    Edited by: Frank Kulash on Oct 20, 2009 2:37 PM
    Changed query to use BETWEEN                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Problem in getting the database connection from a connection pool

    Hai All,
    I am facing a problem in getting the database connection from a connection pool created on weblogic server 8.1.
    I am using the Oracle database 8.1.7.
    I have configured my connection pool, datasource and JNDI in weblogic.
    In my java program i have the following code to retrieve the connection.
    import java.sql.*;    
    import java.util.Hashtable;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    class jdbcshp1 {
        public static void main(String[] args) {
         Connection connection = null;
         try {
               Hashtable ht = new Hashtable();
               ht.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");  // Wanna get rid of this.
               ht.put(Context.PROVIDER_URL,"t3://localhost:7001"); // wanna get rid of this.
               // Get a context for the JNDI look up
               Context ctx = new InitialContext(ht);
            javax.sql.DataSource ds = (javax.sql.DataSource) ctx.lookup ("myjndi1");
              //Create a connection object
              connection = ds.getConnection();
         The above code is working fine but, the two ht.put statements are creating problem.
    The problem is, after converting the application into WAR file it can be deployed
    on any machine or different port on same machine. My application fails if its deployed on
    weglogicserver which is at different port.
    Is there any way that i can get rid of those ht.put statements or any other way to solve the problem.
    any help is appreciated.
    Thanks in advance
    Pooja.

    Hai All,
    Firstly, thanks for ur reply.
    Even i have seen some code which uses context constructor with out any parameter and works fine.
    i dont understand why its not working for my code.
    When i remove those ht.put code and use context constructor with out any parameter, it giving an error.
    Context ctx = new InitialContext();
    javax.sql.DataSource ds = (javax.sql.DataSource) ctx.lookup ("ocjndi");
    connection = ds.getConnection();The error is as follows:
    javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
    the above error is forcing me to include those code but if the port number is changed the code will not work. Plz let meknow if some setting have to be made.
    I appreciate all ur valuable help.
    Thanks once again.
    Pooja.

  • Getting The SAP KM data in a java class

    Hi Everyone
                    I want to get  the SAP KM data to a simple java class......I am able to get this with servlet but i want not a servlet but a simple java class that can get the Documents stored in SAP KM repository..................
    I am thinking of using any java Driver in some code like
    Class.forName ("com.sap.dbtech.jdbc.DriverSapDB");
                        String url = "http://host name :port";
                        Connection con = DriverManager.getConnection (url, "", "");
                        Statement stmt = con.createStatement ();
                   IUser serviceUser = WPUMFactory.getServiceUserFactory().getServiceUser("cmadmin_service");
                   ResourceContext c = new ResourceContext(serviceUser);
                   IResource r = ResourceFactory.getInstance().getResource(RID.getRID("/documents/Public Documents/"), c);
                   System.out.println("Current user   "+r.getContext().getUser().getDisplayName());
                   System.out.println("Current user  : "+r.getContext().getUser().getDisplayName());
                   System.out.println("Access RID  : "r.getAccessRID().toString()"<br>");
    But the above code is giving an exception---java.sql.SQLException: No suitable driver
    Can anyone tell me the suotable Lava driver to access SAP KM repository..Or any simple java code that can connect to SAP KM...
    Waiting for Ur reply
    Thanks & Regards
    Rupesh

    Is there a way to find the list of imports that a
    java class file has added.Yes. It's very easy. The answer is [url http://en.wikipedia.org/wiki/Mu_%28negative%29]Mu.

  • I need to get the Current System Date and time in the format

    I need to get the Current System Date and time in the format
    *6/24/2009 11:30:29 AM*
    How do i do it ?

    I seem to be saying this a lot lately.
    Google is your friend.
    I googled "java current date format" and SimpleDateFormat featured prominently in the results.

  • How do I get the last changed date & time of a file in app server?

    Hi Experts,
    How do I get the last changed date & time of a file in app server?
    Thanks!
    - Anthony -

    Hi,
    that's what I use...
      CALL 'C_DIR_READ_FINISH'.             " just to be sure
      CALL 'C_DIR_READ_START' ID 'DIR' FIELD p_path.
      IF sy-subrc <> 0.
        EXIT. "Error
      ENDIF.
      DO.
        CLEAR l_srvfil.
        CALL 'C_DIR_READ_NEXT'
          ID 'TYPE'   FIELD l_srvfil-type
          ID 'NAME'   FIELD l_srvfil-file
          ID 'LEN'    FIELD l_srvfil-size
          ID 'OWNER'  FIELD l_srvfil-owner
          ID 'MTIME'  FIELD l_mtime
          ID 'MODE'   FIELD l_srvfil-attri.
    *    l_srvfil-dir = p_path .
        IF sy-subrc = 1.
          EXIT.
        ENDIF." sy-subrc <> 0.
        PERFORM p_to_date_time_tz
          USING    l_mtime
          CHANGING l_srvfil-mod_time
                   l_srvfil-mod_date.
        TRANSLATE l_srvfil-type TO UPPER CASE.               "#EC TRANSLANG
        PERFORM translate_attribute CHANGING l_srvfil-attri.
        CHECK:
          NOT l_srvfil-file = '.',
          l_srvfil-type = 'D' OR
          l_srvfil-type = 'F' .
        APPEND l_srvfil TO lt_srvfil.
      ENDDO.
      CHECK NOT lt_srvfil IS INITIAL.
      pt_srvfil = lt_srvfil.
    FORM p_to_date_time_tz  USING    p_ptime  TYPE p
                            CHANGING p_time   TYPE syuzeit
                                     p_date   TYPE sydatum.
      DATA:
        l_abaptstamp TYPE timestamp,
        l_time       TYPE int4,
        l_opcode     TYPE x VALUE 3,
        l_abstamp    TYPE abstamp.
      l_time = p_ptime.
      CALL 'RstrDateConv'
        ID 'OPCODE' FIELD l_opcode
        ID 'TIMESTAMP' FIELD l_time
        ID 'ABAPSTAMP' FIELD l_abstamp.
      l_abaptstamp = l_abstamp.
      CONVERT TIME STAMP l_abaptstamp TIME ZONE sy-zonlo INTO DATE p_date
          TIME p_time.
    ENDFORM.                    " p_to_date_time_tz
    Regards,
    Clemens

Maybe you are looking for

  • Error code 8003 when trying to empty trash

    I searched the Internet for a while trying to find an answer to this, but I can't seem to come across one. On my own I was able to determine the cause for the problem, to some degree, but I don't know how to fix it. I have repaired my permissions. Ev

  • WRT54GS - Playstation 3

    So I made out on this foolish quest little knowing the horrors I would encounter: At this moment in time I'm getting the error on my PS3 -> 8030182 (which is not available on Google) Background:  Linksys WRT54GS v.5.1 (firmware updated to v1.50.9 Sep

  • Sync iPhone contacts to Outlook

    I downloaded the iCloud control panel and it works great.  however I can't figure out how to get teh contacts the way that I need them On Outlook I have a dozen folders, all sitting under the iCloud group.  However only one of the folders says iCloud

  • Perl script seems to hang

    I'm trying to get the perl scripts that launches our iTunesU page to work but I came to a stand still, quite literally. I go to our URL, iTunes launches, it selects the Music Store but nothing comes up), then it goes to our itunes.pl script and it si

  • Is iTunes 11 compatible with Windows 10 Technical Preview?

    Hello. I just installed Windows 10 Technical Preview and iTunes 11 on my PB, but now iTunes does not start up. Can anybody explain me why? kind regards, jolimans