Very urgent-----help in performance tuning

hai all,
I had used inner join for getting data from 5 tables.
performance is very low in this case.
now i want to increase the performance. how can i do this.
coding for the select statement is ......
SELECT agpnr bname1 bname2 bpstlz bort01 bstras b~street2
           bname1_maco bname2_maco baliasname bispadrbsnd
    INTO CORRESPONDING FIELDS OF TABLE it_tab
    FROM jgtgpnr AS a
    INNER JOIN jgtsadr AS b ON
    aadrnr = badrnr
    INNER JOIN jjtvm AS c ON
    agpnr = ckunnr
    INNER JOIN kna1 AS k ON
    agpnr = kkunnr
    INNER JOIN knvv AS v ON
    agpnr = vkunnr
    WHERE ( ajktokd = 'MADV' OR ajktokd = 'MADO' )
    AND c~vkorg = pr_vkorg
    AND v~vkorg = pr_vkorg
    AND gpnr IN so_gpnr
    AND k~aufsd IN so_block
    AND v~aufsd IN so_blck
please give me a good suggesstion for this.
thanks in advance.

Hi
Try to use for all entries
Eg
if u have itab1 and itab2.
      select vbeln netwr from vbak into table itab1.
      if not itab1[] is initial
      select vbeln matnr matkl from vbap into table itab2
      for all entries in itab1 where vbeln = itab1-vbeln.
      endif.
  Hope this will help u.
regards
P.Thangaraj

Similar Messages

  • Need help in Performance tuning for function...

    Hi all,
    I am using the below algorithm for calculating the Luhn Alogorithm to calculate the 15th luhn digit for an IMEI (Phone Sim Card).
    But the below function is taking about 6 min for 5 million records. I had 170 million records in a table want to calculate the luhn digit for all of them which might take up to 4-5 hours.Please help me performance tuning (better way or better logic for luhn calculation) to the below function.
    A wikipedia link is provided for the luhn algorithm below
    Create or Replace FUNCTION AddLuhnToIMEI (LuhnPrimitive VARCHAR2)
          RETURN VARCHAR2
       AS
          Index_no     NUMBER (2) := LENGTH (LuhnPrimitive);
          Multiplier   NUMBER (1) := 2;
          Total_Sum    NUMBER (4) := 0;
          Plus         NUMBER (2);
          ReturnLuhn   VARCHAR2 (25);
       BEGIN
          WHILE Index_no >= 1
          LOOP
             Plus       := Multiplier * (TO_NUMBER (SUBSTR (LuhnPrimitive, Index_no, 1)));
             Multiplier := (3 - Multiplier);
             Total_Sum  := Total_Sum + TO_NUMBER (TRUNC ( (Plus / 10))) + MOD (Plus, 10);
             Index_no   := Index_no - 1;
          END LOOP;
          ReturnLuhn := LuhnPrimitive || CASE
                                             WHEN MOD (Total_Sum, 10) = 0 THEN '0'
                                             ELSE TO_CHAR (10 - MOD (Total_Sum, 10))
                                         END;
          RETURN ReturnLuhn;
       EXCEPTION
          WHEN OTHERS
          THEN
             RETURN (LuhnPrimitive);
       END AddLuhnToIMEI;
    http://en.wikipedia.org/wiki/Luhn_algorithmAny sort of help is much appreciated....
    Thanks
    Rede

    There is a not needed to_number function in it. TRUNC will already return a number.
    Also the MOD function can be avoided at some steps. Since multiplying by 2 will never be higher then 18 you can speed up the calculation with this.
    create or replace
    FUNCTION AddLuhnToIMEI_fast (LuhnPrimitive VARCHAR2)
          RETURN VARCHAR2
       AS
          Index_no     pls_Integer;
          Multiplier   pls_Integer := 2;
          Total_Sum    pls_Integer := 0;
          Plus         pls_Integer;
          rest         pls_integer;
          ReturnLuhn   VARCHAR2 (25);
       BEGIN
          for Index_no in reverse 1..LENGTH (LuhnPrimitive) LOOP
             Plus       := Multiplier * TO_NUMBER (SUBSTR (LuhnPrimitive, Index_no, 1));
             Multiplier := 3 - Multiplier;
             if Plus < 10 then
                Total_Sum  := Total_Sum + Plus ;
             else
                Total_Sum  := Total_Sum + Plus - 9;
             end if;  
          END LOOP;
          rest := MOD (Total_Sum, 10);
          ReturnLuhn := LuhnPrimitive || CASE WHEN rest = 0 THEN '0' ELSE TO_CHAR (10 - rest) END;
          RETURN ReturnLuhn;
       END AddLuhnToIMEI_fast;
    /My tests gave an improvement for about 40%.
    The next step to try could be to use native complilation on this function. This can give an additional big boost.
    Edited by: Sven W. on Mar 9, 2011 8:11 PM

  • How to write code for this logic in a routine, very urgent --help me

    hi all,
    i want to apply this logic into one subroutin ZABC.
    here i m giving my logic ,can any body help me in coding for this, this is very urgent, i hv to submit on wednesday.
    4.1 Read the company code number BSEG-BUKRS from document line item.
    4.2 Fetch PRDHA from MARA into GV_PRDHA where MATNR = BSEG-MATNR.
    4.3 Fetch Business area (GSBER) from ZFIBU into GV_GSBER where (PRDHA = GV_PRDHA and BUKRS = BSEG-BUKRS) OR (PRDHA = GV_PRDHA and BUKRS = SPACE).
    4.4 If business area match is found, go to step 3.9. Else continue.
    4.5 If BKPF-BLART IN set “ZVS_POSDT” OR BKPF-XBLNR starts with “I0*”, execute steps below. Else, go to Step 3.6.
    i. MOVE: BSEG-BKURS TO work area field WA_ZFIBUE-BUKRS,
    BSEG-MATNR TO work area field WA_ZFIBUE-MATNR,
    GV_PRDHA TO work area field WA_ZFIBUE-PRDHA,
    BSEG-HKONT TO work area field WA_ZFIBUE-HKONT,
    BSEG-GSBER TO work area field WA_ZFIBUE-GSBER,
    BSEG-PSWBT TO work area field WA_ZFIBUE-PSWBT,
    BKPF-BUDAT TO work area field WA_ZFIBUE-BUDAT,
    SY-DATUM TO work area field WA_ZFIBUE-CREDATE,
    SY-UZEIT TO work area field WA_ZFIBUE-CRETIME,
    Fetch running serial number (WA_ZFIBUE-SERIALNO) from ZFICO. This number will be stored in ZFICO with PARAMTYPE = "BPM030307", SUBTYPE = "ZFIBUE" and KEY1 = "SERIALNO". The actual serial number will be stored in the field VALUE1.
    i. Insert WA_ZFIBUE INTO ZFIBUE.
    ii. Send email notification to the user (if it is not already sent to user on the same posting date).
    Use function module ‘SO_NEW_DOCUMENT_ATT_SEND_API1’ to send mail.
    Fetch email address and date of last email from ZFICO. These values will be stored in ZFICO with PARAMTYPE = "BPM030307", SUBTYPE = "EMAIL" and KEY1 = "<USERNAME>". The email address will be stored in the field VALUE1 and posting date in VALUE2. Once mail is sent, VALUE2 is updated with latest posting date (BKPF-BUDAT).
    iii. Increment the running serial number and update ZFICO with new serial number.
    a. GV_ SERIALNO = WA_ZFIBUE-SERIALNO + 1
    b. Update ZFICO Set value1 = GV_SERIALNO
    Where PARAMTYPE = "BPM030307" AND
    SUBTYPE = "ZFIBUE" AND
    KEY1 = "SERIALNO".
    iv Move “VDFT” to BSEG-GSBER.
    v. Exit routine.
    4.6 Fetch MTART into GV_MTART from MARA where MATNR = BSEG-MATNR.
    4.7 If SY-BATCH = INITIAL AND GV_MTART <> ‘ROH’, issue the error message - “Maintain the mapping of product hierarchy <PRDHA> from article <MATNR> for <BUKRS>”. Else, go to step 3.8.
    4.8 If SY-BATCH <> INITIAL AND GV_MTART <> ‘ROH’, issue the error message - “Maintain product hierarchy on article master”. Go to step 3.10.
    4.9 Move GV_GSBER TO BSEG-GSBER.
    4.10 Exit Routine
    plz give me reply asap --this is very urgent
    thanks in advance
    swathi

    Hi Swathi,
    If it's very very urgent then you better get on with it, don't waste time on the web. Chop chop.

  • Very urgent help needed in activating a function module

    Hello experts.
    I had a standard report and i copied into an z report. i need to change some field output , and that field is there in a standard function module.so i copied that fun module  into z fun module and stored in a new fun group. Now it is showing the error in the z fun module. include in the fun module is giving the error stating that it is not existing. please help me in coping the standard fun module correctly . please its very urgent.

    Hi,
    You should not copy a Function module alone, as it will have some dependant INLCUDES and global data in TOP include of the function group.
    SO if you want the function module copy the entire Function Group into Z function group.
    Regards,
    Sesh

  • Need very urgent help

    Hi every1,
    i am in a very bad situation as i am very new to AS3, so i
    need some help from any one who can help me out of this.
    I have created a FLV Player using FLVPlayback Component
    everything is working fine but the only problem is the rewind and
    forward button behaves very strange when i test it on web page
    residing in a webserver.
    In brief i want to say that the rewind and forward control in
    the application works alright when i play it in my local machine
    but when i take the file to a web sever and play it the controls
    behave very strange (when i click on the forward and rewind button
    it just takes me to the end of the movie and to the start of the
    movie at one shot which should not be the purpose of the rewind and
    forward button).
    So, somebody please look at my code below and i will be very
    thank full to the person who can send me the correct code.
    The code for the rewind and forward control is higlighted in
    the below code. please help... .very urgent..........
    import fl.video.*;
    var flvSou:String;
    var dynText:String;
    myflv.autoPlay = true;
    onscreen_play_btn.visible = false;
    onscreen_replay_btn.visible = false;
    if (myflv.playing) {
    onscreen_play_btn.visible = false;
    onscreen_replay_btn.visible = false;
    //myflv.source = "Call_to_action.flv";
    myflv.source = root.loaderInfo.parameters.flvSou;
    dynTxt.text = String(root.loaderInfo.parameters.dynText);
    slash_txt.text = "/";
    myflv.playPauseButton = playPause_btn;
    myflv.stopButton = stop_btn;
    myflv.muteButton = mute_btn;
    myflv.volumeBar = volume_bar;
    myflv.volume = .6;
    myflv.forwardButton = forward_btn;
    myflv.backButton = back_btn;
    myflv.seekBar = seek_bar;
    myflv.bufferingBar = buffering_bar;
    myflv.fullScreenButton = fullscreen_btn;
    //========================= Actions for Button Controls
    =========================//
    //========================= Actions for Play and Pause Button
    =========================//
    playPause_btn.pause_mc.addEventListener(MouseEvent.CLICK,
    clickHandlerPause);
    function clickHandlerPause(event:MouseEvent):void {
    //trace("clickHandler detected an event of type: " +
    event.type);
    //trace("the event occurred on: " + event.target.name);
    trace("u clicked pause button");
    onscreen_play_btn.visible = true;
    //myflv.alpha = .5; // uncomment later
    playPause_btn.play_mc.addEventListener(MouseEvent.CLICK,
    clickHandlerPlay);
    function clickHandlerPlay(event:MouseEvent):void {
    //trace("clickHandler detected an event of type: " +
    event.type);
    //trace("the event occurred on: " + event.target.name);
    trace("u clicked play button");
    onscreen_play_btn.visible = false;
    //myflv.alpha = 100; // uncomment later
    if (onscreen_replay_btn.visible==true) {
    onscreen_replay_btn.visible=false;
    //========================= Actions for Play and Pause Button
    =========================//
    //========================= Actions for FLVPlayback
    =========================//
    myflv.addEventListener(MouseEvent.CLICK,
    clickHandlerPauseFlv);
    function clickHandlerPauseFlv(event:MouseEvent):void {
    //trace("clickHandler detected an event of type: " +
    event.type);
    //trace("the event occurred on: " + event.target.name);
    trace("u clicked video component button");
    trace(myflv.totalTime);
    if (myflv.playing==true) {
    myflv.pause();
    onscreen_play_btn.visible = true;
    //myflv.alpha = .5; // uncomment later
    } else {
    myflv.play();
    onscreen_play_btn.visible = false;
    onscreen_replay_btn.visible = false;
    //myflv.alpha = 100; // uncomment later
    //========================= Actions for FLVPlayback
    =========================//
    //========================= Actions for Fullscreen Button
    =========================//
    fullscreen_btn.addEventListener(MouseEvent.CLICK,onFullScreenButtonClick);
    function onFullScreenButtonClick(event:MouseEvent):void {
    stage.displayState = StageDisplayState.FULL_SCREEN;
    //or set it to normal like: stage.displayState =
    StageDisplayState.NORMAL;
    //========================= Actions for Fullscreen Button
    =========================//
    //========================= Actions for onScreenPlay Button
    =========================//
    onscreen_play_btn.addEventListener(MouseEvent.CLICK,onScreenPlayButtonClick);
    function onScreenPlayButtonClick(event:MouseEvent):void {
    trace("working");
    if (myflv.playing==true) {
    myflv.pause();
    } else {
    myflv.play();
    //myflv.alpha = 100; // uncomment later
    onscreen_play_btn.visible = false;
    //========================= Actions for onScreenPlay Button
    =========================//
    //========================= Actions for onScreenReplay Button
    =========================//
    onscreen_replay_btn.addEventListener(MouseEvent.CLICK,onScreenReplayButtonClick);
    function onScreenReplayButtonClick(event:MouseEvent):void {
    trace("working");
    myflv.play();
    //myflv.seek(0);
    onscreen_replay_btn.visible = false;
    if (onscreen_play_btn.visible==true) {
    onscreen_play_btn.visible=false;
    //========================= Actions for onScreenReplay Button
    =========================//
    //========================= Actions for Stop Button
    =========================//
    stop_btn.addEventListener(MouseEvent.CLICK, StopButtonClick);
    function StopButtonClick(event:MouseEvent):void {
    myflv.seek(0);
    //myflv.autoRewind = true;
    //myflv.stop();
    onscreen_replay_btn.visible = true;
    //========================= Actions for Stop Button
    =========================//
    //========================= Actions for Button Controls
    =========================//
    //========================= Actions for Displaying Elapsed
    and Total Time =========================//
    myflv.addEventListener(MetadataEvent.METADATA_RECEIVED,
    cp_listener);
    function cp_listener(eventObject:MetadataEvent):void {
    //trace("Elapsed time in seconds: " + myflv.playheadTime);
    //trace("Total time is: " + eventObject.info.duration);
    var rounded:int = Math.round(eventObject.info.duration);
    var minutes:int = Math.floor(rounded/60);
    var seconds:int = rounded%60;
    flvTotalTime_txt.text = eventObject.info.duration;
    flvTotalTime_txt.text = (minutes<10 ? "0" :
    "")+minutes+":"+(seconds<10 ? "0" : "")+seconds;
    //flvElapsedTime_txt.text = String(myflv.playheadTime);
    stage.addEventListener(Event.ENTER_FRAME, updateTime);
    function updateTime(ev:Event):void {
    var rounded:int = Math.round(myflv.playheadTime);
    var minutes:int = Math.floor(rounded/60);
    var seconds:int = rounded%60;
    flvElapsedTime_txt.text = String(myflv.playheadTime);
    flvElapsedTime_txt.text = (minutes<10 ? "0" :
    "")+minutes+":"+(seconds<10 ? "0" : "")+seconds;
    //========================= Actions for Displaying Elapsed
    and Total Time =========================//
    myflv.addEventListener(Event.COMPLETE, com_listener);
    function com_listener(eventObject:Event):void {
    trace("movie complete");
    myflv.stop();
    onscreen_replay_btn.visible = true;
    back_btn.addEventListener(MouseEvent.CLICK, BackButtonClick);
    function BackButtonClick(event:MouseEvent):void {
    myflv.play();
    //myflv.autoRewind = true;
    //myflv.stop();
    onscreen_replay_btn.visible = false;
    /************************************ THE CODE FOR FORWARD
    AND REWIND CONTROL STARTS HERE *****************************/
    var id1:Number;
    forward_btn.addEventListener(MouseEvent.MOUSE_DOWN,
    ForwardButtonDown);
    function ForwardButtonDown(event:MouseEvent):void {
    //forward_btn.onPress = function() {
    //mklik_flv.pause();
    var dest1:Number = myflv.playheadTime;
    id1 = setInterval(function ():void {
    myflv.seek(dest1 += 2);
    }, 100);
    forward_btn.addEventListener(MouseEvent.MOUSE_UP,
    ForwardButtonUp);
    function ForwardButtonUp(event:MouseEvent):void {
    //forward_btn.onRelease = function() {
    //myflv.play();
    clearInterval(id1);
    // ************************ Forward Button Function
    // ************************ Rewind Button Function
    var id2:Number;
    back_btn.addEventListener(MouseEvent.MOUSE_DOWN,
    BackButtonDown);
    function BackButtonDown(event:MouseEvent):void {
    //back_btn.onPress = function() {
    //mklik_flv.pause();
    var dest2:Number = myflv.playheadTime;
    id2 = setInterval(function ():void {
    myflv.seek(dest2 -= 2);
    }, 100);
    back_btn.addEventListener(MouseEvent.MOUSE_UP, BackButtonUp);
    function BackButtonUp(event:MouseEvent) {
    //back_btn.onRelease = function() {
    //mklik_flv.play();
    clearInterval(id2);
    }

    how long is your flv (in seconds), if allowed to play without
    ff/rewind/pause?

  • Very urgent help - for update field1 nowait across databaselink

    Hi,
    We have a form that uses select for update field1 nowait for a table that is accessed across a database link. When we try to do this the form errors out giving frm-92101 error. If I comment out the for update statement then it works fine. I know it the for update that is causing the problem but I'm not sure how to fix it. Can someone help me please. Very urgent, we are in the middle of upgrade and we found this issue while testing the forms.
    Any ideas or suggestions ?
    I'm using 10g App.Server and 10g database.
    Please help.
    Thanks in advance.

    under which trigger you ran that update ?

  • Very Urgent Help , ABAP SQL Query

    Guys,
    Please suggest.I have a table(custom_table1) with a field say A which is of date type = c and length = 9. And i want to query this table.Following is the query.
    Select substr(A,0,5) B C into itab From table custom_table1
    where b = ( select b from cusstom_table2 )
    and substr(A,0,5) = Input_A.
    That is i want to equate an Input_A (which is of 5 character length) with field A (only first 5 character of the 9 length). But it seems the query is wrong. Kindly help ,very urgent
    Thanks

    Thanks guys, U have helped me to fill up the where condition as
    but what about the column A in the select query ?I need only 5 characters from the field populated into Itab.
    CONCATENATE  srch_str '%' INTO srch_str.  -- bcos i want it to be 'InputA%'
    Select Substr(A,0,5) , B C Into Itab From CustomTable 1 where B = (Select B from customtable2) and A Like SrchStr
    Is there any means i can populate only the 5 characters from the select field A into Itab without using Substr (becos it doesnt work) ? Please help.

  • Very Urgent Help needed - Arabic support in  Forms6i& reports6i

    Hi,
    Its a very very very urgent requirement.
    How to Provide the arabic support in forms .
    I am working on Windows Xp operating system.
    1. How to Configure the Windows XP Operating system to provide arabic support?
    In Design time i want to use English and during runtime i should be able to toggle beteen English and Arabic for Entering the data.Arabic data should be captured in seperate fields.
    1. How to configure the oracle 8i/9i databases to provide both arabic(Saudi Arabia) and english? what characterset i need to
    choose for saudi arabic?
    2.How to install forms & Reports with arabic support?
    3.How to dispaly the data in both english and arabic in forms and reports during runtime?
    I will be really greatful if u are able to provide me that help and my advanced thanks to ur help.This very
    very urgent.
    Regds,
    B.Prasad
    [email protected]

    Badma,
    1. How to Configure the Windows XP Operating system to
    provide arabic support?Please go to "Regional and Language Options" from the Control Panel. In the "Standards and formats" group of the "Regional Opitons" tab, select "Arabic (Saudi Arabia)". In the "Language for non-Unicode programs" group of the "Advanced" tab, select "Arabic (Saudi Arabia)", then restart Windows. If "Arabic (Saudi Arabia)" is not listed, then please go to the "Langauges" tab and make sure the "Install files for complex script and right-to-left languages (including Thai)" in the "Supplemental language support" group is checked.
    1. How to configure the oracle 8i/9i databases to provide
    both arabic and english? what characterset i need to
    choose for saudi arabic?If you're not planning to support other languages than Arabic and English (7-bit), AR8MSWIN1256 should work for you. If you're planning to support other languages in the future, I would recommend you to create your database in UTF8 (Forms/Reports 6i doesn't work with AL32UTF8 database). Please note Arabic characters are represented in 2 bytes in UTF8 while they are 1 byte in AR8MSWIN1256.
    2.How to install forms & Reports with arabic support?If you need Arabic translation, then please select Arabic when you're asked the language(s) to install. Otherwise, notmal Forms/Reports installation should work for you.
    3.How to dispaly the data in both english and arabic in
    forms and reports?Set your NLS_LANG to ARABIC_SAUDI ARABIA.AR8MSWIN1256.
    Hope this helps.
    Regards,
    - Makoto

  • Attachment issue --very urgent help  required

    Hello friends,
    1)i have create page and deatal page . requirement is that we have to load required attachments in table region, if not loading required attachments exception will raise. this validation is working fine in create page.
    2)same in detail page i loaded required attachments also excepiton is raising.
    waht would be cause. i am very new to ADF technology.
    very urgent to fix this issue. any one help me out.
    Thanks,
    vamshi.
    Edited by: Krishna Vamshi on Jul 1, 2010 6:14 PM

    Kirshna,
    Unfortunately your question is very unclear.
    Let me say that if you are asking about OA Framework, you should ask on the OA Framework forum, not here.
    also excepiton is raising.It will help if you say what the exception is.
    John

  • How to convert PO sapscript layout to pdf - need VERY URGENT Help

    Dear All,
    Requirement: PO sapscript layout after some modifications (say, ZMEDRUCK) has to be converted to pdf. Through me9f user will be able to give ranges of PO numbers and can view the print preview for the po. After that on clicking the print button we get the printout of the pos one after another based on the user input of PO numbers.
    Our requirement is that when the user will click on the "Print Preview" of po (rather than pressing the print button) it i.e. PO sapscript layout has to get converted to pdf.
    If you have already encountered this scenario, could you please send me the source code regarding this at the earliest. If you want to email it to my personal id, please let me know so that I can give it to you. Thank you.
    It will be very beneficial for mine if you can send me some source code in this regard. (FYI. We want only “Print output” of PO sapscript. So, Print Program /SMB40/FM06P [after copying it to our ZSMB40/FM06P program] need to be modified for downloading the PO into PDF where there is no FMs like OPEN_FORM, WRITE_FORM, CLOSE_FORM. So already available source code in SAP forums can not help me.)). Kindly help me at the earliest. It’s VERY URGENT…
    Thank you.
    Thanks & Regards
    Sudipta

    Hi Chaith,
    Could you please provide me the source code regarding this at the earliest.
    We want only “Print output” of PO sapscript. So we need to modify only the Print Program SAPFM06P after copying it to ZSAPFM06P for downloading of modified PO (ZMEDRUCK) sapscript layout into PDF.
    I am already having some source code from sdn portral. I am attaching it herewith. But it's not working as some constants and variable values need to be given. We want to take download of PO into PDF from ME9F transaction itself.
    Could you please provide necessary values in the missing constants and variables and kindly resend the corrected modified Source code to me so that I can run the same code to  download the modified PO ZMEDRUCK into PDF . Need YOUR URGENT HELP...
    DATA: l_druvo LIKE t166k-druvo,
            l_nast  LIKE nast,
            aux_nast LIKE nast,
            l_from_memory,
            l_doc   TYPE meein_purchase_doc_print,
            ent_screen TYPE c,
            ent_retco TYPE i,
            toa_dara TYPE toa_dara,
            arc_params LIKE arc_params,
            aux_form LIKE tnapr-fonam.
      DATA: otf LIKE itcoo OCCURS 0 WITH HEADER LINE,
            lt_docs      TYPE TABLE OF docs,
            pdf_bytecount TYPE i,
            nom_archivo TYPE string.
      aux_form = 'ZMEDRUCK'.
      l_from_memory = c_true.
      SELECT *
        FROM nast
        INTO aux_nast
        UP TO 1 ROWS
        WHERE kappl = c_po     " Purchase Order
        AND   objky = t_datos-ebeln
        AND   aktiv = space
        ORDER BY erdat DESCENDING eruhr DESCENDING.
      ENDSELECT.
      aux_nast-sort1 = c_swp.
      CLEAR ent_screen.
      CLEAR ent_retco.
      IF aux_nast-aende EQ space.
        l_druvo = c_1.
      ELSE.
        l_druvo = c_2.
      ENDIF.
    l_druvo = '2'.
      CALL FUNCTION 'ME_READ_PO_FOR_PRINTING'
        EXPORTING
          ix_nast        = aux_nast
          ix_screen      = ent_screen
        IMPORTING
          ex_retco       = ent_retco
          ex_nast        = l_nast
          doc            = l_doc
        CHANGING
          cx_druvo       = l_druvo
          cx_from_memory = l_from_memory.
      CHECK ent_retco EQ 0.
      CALL FUNCTION 'ECP_PRINT_PO'
        EXPORTING
          ix_nast        = l_nast
          ix_druvo       = l_druvo
          doc            = l_doc
          ix_screen      = ent_screen
          ix_from_memory = l_from_memory
          ix_toa_dara    = toa_dara
          ix_arc_params  = arc_params
          ix_fonam       = aux_form                            
        IMPORTING
          ex_retco       = ent_retco.
      CLEAR otf.
      CALL FUNCTION 'READ_OTF_FROM_MEMORY'
        EXPORTING
          memory_key   = l_nast-objky  " PO Number
        TABLES
          otf          = otf
        EXCEPTIONS
          memory_empty = 1
          OTHERS       = 2.
      CALL FUNCTION 'CONVERT_OTF_2_PDF'
        IMPORTING
          bin_filesize           = pdf_bytecount
        TABLES
          otf                    = otf
          doctab_archive         = lt_docs
          lines                  = pdfout
        EXCEPTIONS
          err_conv_not_possible  = 1
          err_otf_mc_noendmarker = 2
          OTHERS                 = 3.
      CONCATENATE c_dest t_datos-ebeln c_ext INTO nom_archivo.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          bin_filesize = pdf_bytecount
          filename     = nom_archivo
          filetype     = c_bin
        IMPORTING
          filelength   = pdf_bytecount
        TABLES
          data_tab     = pdfout.

  • VERY URGENT Help with istalling developer 9i

    i downloaded all the files from the web site and they are *.brk after i ran the *.bat file i created a *.exe file i tryed to run it and this an error that the file isn't vaild on win 32 application it's very urgent if you have any idea how to install please send me an email to [email protected]
    Thanks

    hi,
    do u want interctive report in classical report?

  • Pls help in performance tuning SQL

    Hi All,
    Can someone please help me to tune this quesry. Rt now it is takin 20 mins tro retuns 80,000 rows and its using dblink
    SELECT COUNT(*) FROM
    (SELECT /*+driving_site(main)*/CORP_ACTG_PRD_YEAR,
    CORP_ACTG_PRD_NBR,
    FCN_CODE,
    LOCAL_CRNC_CODE,
    GL_LOCAL_AMT,
    CORP_ID,
    PGRD_COST_CTR_ID,
    MAJOR_CODE,
    EXP_MINOR_CODE,
    PGRD_EXP_CODE,
    PGRD_EXP_DESC,
    DIV_CODE,
    MKT_CODE,
    PROD_CODE,
    PGRD_PROJECT_CODE,
    PGRD_PROJ_SHORT_DESC
    FROM --#GifDBLink# main,
    [email protected] main,
    select actg_prd_year, actg_prd_nbr from DM_GIF_ESSBASE_CTRL
    where cur_prd_ind='Y' and src_id=84
    union
    select decode(actg_prd_nbr,1,actg_prd_year-1,actg_prd_year) actg_prd_year,
    decode(actg_prd_nbr,1,12,actg_prd_nbr-1) actg_prd_nbr
    from DM_GIF_ESSBASE_CTRL
    where cur_prd_ind='Y' and src_id=84
    union
    select decode(actg_prd_nbr,12,actg_prd_year+1,actg_prd_year) actg_prd_year,
    decode(actg_prd_nbr,12,1,actg_prd_nbr+1) actg_prd_nbr
    from DM_GIF_ESSBASE_CTRL
    where cur_prd_ind='Y' and src_id=84 ) minor
    where main.CORP_ACTG_PRD_YEAR = minor.actg_prd_year
    and main.CORP_ACTG_PRD_NBR = minor.actg_prd_nbr) T;

    user13365939 wrote:
    anyone?Incorrect.
    You are only one who can provide the information that was requested in this thread.
    Please see the FAQ, read the instructions and provide the necessary information.
    Re: 3. How to  improve the performance of my query? / My query is running slow.

  • Need help in Performance tuning

    Hi All,
            I am facing some performance issues in my program.  The program taking a hell lot of time to execute and some times timing out without giving the out put.  This is a report program with ALV output.  It is handling mainly Sales related data.
           The program is fetching a huge volume of data from different tables and processing this bulk data inside the loops several times.  In most of the queries I am unable to supply all key fields, because my requirement is like that only.  I have many places in my program i am using inner loop and function modules inside loop etc.
            Any pointers on this will be a great help.
    Regards,
    Jijeesh P G

    1) Make sure that any READ or LOOP inside an outer LOOP accesses the inner table with an appropriate key (either using BINARY search when reading a standard table or using sorted/hashed tables for inner tables only). This helps in most cases.
    2) If the tables witdh is more than aprox. 30 bytes LOOP ASSIGNING <wa> may help a bit. Declare <wa> for each table separately using the tables line type (otherway type casting would cost some additional time).
    3) You may use FM SAPGUI_PROGRESS_INDICATOR in the outer loops to inform the user while he is waiting.
    4) A COMMIT from time to time will reset the measured time for timeout ( and therefore avoids timeouts - do NOT use without checking step 1) ).
    4) The programm may use virtual memory if a huge amount of data is selected ( I have seen dumps in due to the fact that nor more disk space was available). So  - if STEPS 1)-3) failed - look a the process for rollling in/out).

  • Can someone competent help me? Very Urgent help Much Apreciated

    does anyone know what the
    java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]Optional feature not implemented
    error refers to? i cannot wee why i am getting this error when ever i run a SQL query through JDBC
    PLEASE HELP ME OR EVE IF YOU ARE UNSURE POST ME A SUGGESTION AND I WILL TY IT OUT
    thank you

    Can you post the code inside the try-catch block that is tossing this exception? Especially post the code containing whatever SQL statement is causing it, and tell us what kind of database it is hitting.

  • Very urgent help needed- Error while passing XML document to Oracle stored

    Hi !
    I have been struggling a lot to call Oracle 9i stored procedure passing Stringbuilder object type from ASP.NET
    I am using Visual Studio 2008 Professional, OS: Windows XP and Oracle: 9.2.0.1.0
    Following is the procedure:
    CREATE or REPLACE PROCEDURE loadCompanyInfo (clobxml IN clob) IS
    -- Declare a CLOB variable
    ciXML clob;
    BEGIN
    -- Store the Purchase Order XML in the CLOB variable
    ciXML := clobxml;
    -- Insert the Purchase Order XML into an XMLType column
    INSERT INTO companyinfotbl (companyinfo) VALUES (XMLTYPE(ciXML));
    commit;
    --Handle the exceptions
    EXCEPTION
    WHEN OTHERS THEN
    raise_application_error(-20101, 'Exception occurred in loadCompanyInfo procedure :'||SQLERRM);
    END loadCompanyInfo ;
    And following is the ASP.net code:
    StringBuilder b = new StringBuilder();
    b.Append("<?xml version=\"1.0\" encoding=\"utf-8\" ?>");
    b.Append("<item>");
    b.Append("<price>500</price>");
    b.Append("<description>some item</description>");
    b.Append("<quantity>5</quantity>");
    b.Append("</item>");
    //Here you'll have the Xml as a string
    string myXmlString1 = b.ToString();
    //string result;
    using (OracleConnection objConn = new OracleConnection("Data Source=testdb; User ID=testuser; Password=pwd1"))
    OracleCommand objCmd = new OracleCommand();
    objCmd.Connection = objConn;
    objCmd.CommandText = "loadCompanyInfo";
    objCmd.CommandType = CommandType.StoredProcedure;
    //OracleParameter pmyXmlString1 = new OracleParameter("pmyXmlString1", new OracleString(myXmlString1));
    objCmd.Parameters.Add("myXmlString1", OracleType.clob);
    objCmd.Parameters.Add(myXmlString1).Direction = ParameterDirection.Input;
    //objCmd.Parameters.Add("result", OracleType.VarChar).Direction = ParameterDirection.Output;
    try
    objConn.Open();
    objCmd.ExecuteNonQuery();
    catch (Exception ex)
    Label1.Text = "Exception: {0}" + ex.ToString();
    objConn.Close();
    When I am trying to execute it, I am getting the following error:
    Exception: {0}System.Data.OracleClient.OracleException: ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'LOADCOMPANYINFO' ORA-06550: line 1, column 7: PL/SQL: Statement ignored at System.Data.OracleClient.OracleConnection.CheckError(OciErrorHandle errorHandle, Int32 rc) at System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle, CommandBehavior behavior, Boolean needRowid, OciRowidDescriptor& rowidDescriptor, ArrayList& resultParameterOrdinals) at System.Data.OracleClient.OracleCommand.ExecuteNonQueryInternal(Boolean needRowid, OciRowidDescriptor& rowidDescriptor) at System.Data.OracleClient.OracleCommand.ExecuteNonQuery() at Default.Button1Click(Object sender, EventArgs e)
    I understand from this that the .net type is not the correct one, but I am not sure how to correct it. I could not find any proper example in any documentation that I came across. Most of the examples give information on how to read but not how to insert XML into Oracle table by calling Stored Procedure.
    Can you please help me to solve this problem? I hope that you can help solve this.
    Also, can you please give me an example of passing XML document XMLdocument to Oracle Stored procedure.
    In both the cases, if you can provide the working code then it would be of great help.
    Thanks,

    Hi ,
    Additional to the Above error details my BPEL code looks like this:
    <process name="BPELProcess1"
    targetNamespace="http://xmlns.oracle.com/Application10/Project10/BPELProcess1"
    xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:client="http://xmlns.oracle.com/Application10/Project10/BPELProcess1"
    xmlns:ora="http://schemas.oracle.com/xpath/extension"
    xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/">
    <partnerLinks>
    <partnerLink name="bpelprocess1_client" partnerLinkType="client:BPELProcess1" myRole="BPELProcess1Provider" partnerRole="BPELProcess1Requester"/>
    </partnerLinks>
    <variables>
    <variable name="inputVariable" messageType="client:BPELProcess1RequestMessage"/>
    <variable name="outputVariable" messageType="client:BPELProcess1ResponseMessage"/>
    </variables>
    <sequence name="main">
    <receive name="receiveInput" partnerLink="bpelprocess1_client" portType="client:BPELProcess1" operation="process" variable="inputVariable" createInstance="yes"/>
    <invoke name="callbackClient" partnerLink="bpelprocess1_client" portType="client:BPELProcess1Callback" operation="processResponse" inputVariable="outputVariable"/>
    </sequence>
    </process>
    Kindly help if anyone has faced this Issue before.
    Regards,
    Rakshitha

Maybe you are looking for

  • Style sheet cross browser issues

    Hi I am having a couple of issues with a test site i am producing The URL is above. All works ok in I.E.8 but in IE7 the links on the header are no longer in-line causing them to dissapear from view in some cases. And in IE6 the header size appears d

  • Installation of SP3 for WLS 6.1 fails on BEA_HOME

    Hi, I can't seem to install the service pack on an HP-UX 11. I did have the BEA_HOME and WL_HOME environment variables or run the setEnv.sh, but the installation doesn't seem to pick up the BEA_HOME directory. I tried even with BEAHOME and all, but n

  • Update from Exchange 2013 Cu2 to SP1 - Outlook 2010 with SP2 clients disconnected

    Hi, we recently upgraded a standalone Exchange 2013 Server to SP1. Owa works fine, but all internal Outlook 2010 Clients (with SP2) get disconnected. Creating a new Profile, and testing the internal autodiscovery leeds to an Error 12030 (Connection r

  • Where did my 1 gig storage/memory space go?

    I had near 200 some songs on my iPod thru another computer. I have a new intel at home so agreed to erase and sync my iPod to the new system when prompted. After erasing and sync, my ipod will hold now less than 45 total songs. Says I don't have spac

  • Converting M2V to DV results in heavy interlace/flicker video

    Hi, I recorded some VHS tapes to DVD using my standalone DVD recorder (LG). The resulting DVD looks really great, on TV and in DVD player on the mac. I want to convert it to .DV format for editing (the .m2v format crashes FCP all the time, don't know