Help in perform using

Hallow
I wont to do this code for a lot of table that I have in program
I heard that I can use perform and <b>using</b> and changing but I don’t now how
Plz help
I have adrtab_3082 ,3083,3084,3085,3086……..
OPEN DATASET adress IN TEXT MODE
         ENCODING DEFAULT FOR OUTPUT.
  IF sy-subrc = 0.
    no_file = ' '.
    LOOP AT <b>adrtab_3082</b> INTO wa.
      TRANSFER wa TO adress.
    ENDLOOP.
    CLOSE DATASET adress.
  ELSE.
    no_file = 'X'.
  ENDIF.
  IF sy-subrc = 0.
  ENDIF. 
regards

Hi,
The following program works fine... except for the open dataset... has few problems in my system... but the transfer of internal table is fine...
Use it...
<b>
REPORT  ZNAN_TEST.
tables: lfa1, SSCRFIELDS.
data: flag type i value 0.
TABLES: MARA.
DATA: ADRESS TYPE STRING.
TYPES: BEGIN OF W_ITAB,
      PSTAT LIKE MARA-PSTAT,
      END OF W_ITAB.
DATA: ITAB TYPE TABLE OF W_ITAB.
start-of-selection.
SELECT PSTAT FROM MARA INTO TABLE ITAB.
perform data_transfer using itab[].
form data_transfer using itab TYPE TABLE  .
DATA: W_ITAB TYPE ITAB.
adress = 'D:\DESKTOP\TES.TXT'.
OPEN DATASET adress IN LEGACY TEXT MODE  FOR OUTPUT.
IF sy-subrc = 0.
LOOP AT itab INTO W_ITAB.
TRANSFER W_ITAB TO adress.
ENDLOOP.
CLOSE DATASET adress.
ELSE.
ENDIF.
endform.</b>
Hope this solves your problem!
*Reward if helpful*
regards,
Naveenan.

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

  • Web-based deployments can be performed using OUI

    10.2.0.x version
    Want to learn more about how Web-based deployments can be performed using OUI, if someone has good article or notes.

    By billing I assume you mean resource related billing. I don't think RRB will work without costing. Because the basic tables which act as source for RRB are cost item tables. Still, everything is possible if you make alterations to the programs. But you will have to do a cost-benefit analysis.
    I suggest that you don't think only in lines of RRB. You can write a program which can copy the materials and detemine materials for the activity types. This program can refer to one of the RRB profiles but only for material determination and can create a debit memo request or a kind of resource related quotation.
    Hope this helps.
    Bala

  • In which case we require to write perform using/changing

    hi,
    in which case we require to write perform using/changing .
    and what is excatly we r doing  with perform using.changing.
    please somebody help me.
    thanks
    subhasis

    This is an awfully basic question.
    Simply press F1 on PERFORM.
    And responders take note:
    bapi
    Rob

  • Improve data load performance using ABAP code

    Hi all,
             I want to improve my load performance using ABAP code, how to do this?. If i writing ABAP code in SE38 how i can call
    in BW side? if give sample code to improve load performance it will be usefull. please guide me.

    There are several points that can improve performance of your ABAP code:
    1. Avoid using SELECT...ENDSELECT... construct and use SELECT ... INTO TABLE.
    2. Use WHERE clause in your SELECT statement to restrict the volume of data retrieved.
    3. Use FOR ALL ENTRIES in your SELECT statement to retrieve the matching records at one shot.
    4.Avoid using nested SELECT and SELECT statements within LOOPs.
    5. Avoid using INTO CORRESPONDING FIELDS OF. Instead use INTO TABLE.
    6. Avoid using SELECT * and select only the required fields from the table.
    7. Avoid Executing a SELECT multiple times in the program.
    8. Avoid nested loops when working with large internal tables.
    9.Whenever using READ TABLE use BINARY SEARCH addition to speed up the search.
    10. Use FIELD-SYMBOLS instead of a work area when there are more than 200 entries in an internal table where some fields are being manipulated.
    11. Use MOVE with individual variable/field moves instead of MOVE-CORRESPONDING.
    12. Use CASE instead of IF/ENDIF whenever possible.
    13. Runtime transaction code se30 can be used to measure the application performance.
    14. Transaction code st05 can be used to analyse the SQL trace and measure the performance of the select statements of the program.
    15. Start routines can be used when transformation is needed in the data package level. Field/individual routines can be used for a simple formula or calculation. End routines are used when you wish to populate data not present in the source but present in the target.
    16. Always use a WHERE clause for DELETE statement. To delete records for multiple values, use SELECT-OPTIONS.
    17. Always use 'IS INITIAL' instead of equal to '' because null for a character is '' but '0' for an integer.
    Hope it helps.

  • Examining LR 4.x performance using Sysinternals ProcessMonitor

    Has anyone from Adobe looked at LR 4.x performance using Sysinternals ProcessMonitor?  I feel that it can give tremendous insight as to what the application is doing "under the covers" even without running it inside of a debugger.
    I'm providing two example captures, both in Excel format:
    1) Lightroom sitting completely idle (I haven't touched LR for a couple of minutes before capturing this information).  If I remember right, this is maybe 30 seconds worth of activity coming from Lightroom.
    Click the link to download: http://dl.dropbox.com/u/19756227/Lightroom/Lightroom%20Idle%20Logfile.xlsx
    2) Before starting the capture here, LR had been sitting idle for some time. I started the capture. clicked a new image (file name = 20120825_2470.CR2), activated the Crop Tool, deactivated the Crop Tool, then ended the capture. Probably about 10 or 11 seconds worth of capture time.
    Click the link to download: http://dl.dropbox.com/u/19756227/Lightroom/Lightroom%20Activate%20Crop%20Tool%20Logfile.xl sx
    Capture #1 is meant to give you some idea as to "background noise" ... meaning, a capture of what Lightroom is doing when it is not servicing the UI.
    Capture #2 is meant to show you how long it takes to load an image activate and deactivate the Crop Tool (this is in the Develop module).
    This is Lightroom 4.2RC running on a 3rd generation Core i7-2860QM (2.5Ghz) with 16gb of memory on Win7-64 with the images on a local hard drive (C drive) and the catalog and previews residing on an SSD (D drive).
    Some interesting things to note...
    - How often it opens my Dell U3011.icm monitor profile and how much time is spent there. (hint: a lot more than just once - and I wonder why it didn't just read the file once on startup and be done with it?)
    - How often it opens the CameraRaw\Defaults\Preferences.xmp file (again, a lot more than just once - why not load it once at start up?)
    - I see a lot of activity happening on a file on my hard drive (C:\Users\dwterry\AppData\Local\Temp\etilqs_MGZwZ6Ai0qSWbhO) and I'm wondering if there is any way I could tell Lightroom to store such files on my SSD instead? My catalog is stored on the SSD, so if Lightroom were to use the path of the Catalog to determine where to create these local temp files, it would allow me to optimize my system performance that way.
    - I see lots of activity reading my image (file name referenced up above). I figure that's just part of normal activity. Read the file in 64K at a time. Makes sense.
    - I see the xmp file being updated and I wonder why? I haven't changed anything yet. All I did was click on the image, activate and deactivate the crop tool without actually doing anything. Optimize it to only write to the .xmp file when something changes.
    - I see probably the majority of the time being spent creating and closing threads. That's probably where the real work happens. But I wonder if the threads could be optimized?
    Anyway... that's just a bit of insight from a little tool used to monitor the process.  I wonder if we could get Adobe Engineers (people with real access to the source code and debuggers) to check it out and see if they can find ways to optimize what Lightroom is doing?
    This is a brand new machine. It's faster than my previous computer. I upgraded specifically to try to work around LR 4.x sluggishness. LR 4.2 is still slower than 3.6 was on my old computer. My only goal here is to try to help identify the problem so that a cure can be found.

    As long as the X-Rite Eye-One Match application isn't launched AND the i1 Display dongle isn't plugged in, then it is not related. It does however explain why ambient light monitoring might cause LR's polling of the display profile to go loopy.
    I think you're on to something with monitoring sysinternals to identify the cause of sluggish LR behavior. Unfortunately my Win 7 i7 system runs fine and so far there’s nothing peculiar in the Resource Monitor that I can see, despite trying to bring it to its knees. The only thing I've been able to pin down is sluggish Develop sliders, which seems common when using very high resolution displays and/or dual displays. Open GL support or something similar to offload display rendering to the graphics card will be required, or just damn fast processors. Obviously, there are many other causes of sluggish LR performance, lockups, and crashes yet to be identified.

  • Perform using

    hallow
    i wont to now in which place it place better to use perform using and tables and which benefit i have from that ?
    simle sample will help
    regards

    PERFORM - parameter_list
    Syntax
    ... [TABLES itab1 itab2 ...]
    [USING a1 a2 ...]
    [CHANGING a1 a2 ...].
    Extras:
    1. ... TABLES itab1 itab2 ...
    2. ... USING a1 a2 ...
    3. ... CHANGING a1 a2 ...
    Effect
    These additions assign actual parameters to the formal parameters from the parameter interface for the subroutine subr. You can specify all data objects whose data type matches the typing of the corresponding formal parameter (see Check Typing) as actual parameters. Each formal parameter assumes all the properties of the actual parameter assigned to it when it is called.
    Addition 1
    ... TABLES itab1 itab2 ...
    Effect
    If you specify the addition TABLES, each table parameter t1 t2 ... for the subroutine called that is defined with the addition TABLES to the FORM statement must be assigned an internal table itab as the actual parameter. The assignment of the actual parameters to the formal parameters takes place using their positions in the lists t1 t2 ... and itab1 itab2 ... .
    You can only specify standard tables for itab. Transfer takes place by means of a reference. If a specified table itab has a header line, this is also transferred; otherwise, the header line in the corresponding table parameter t is blank when it is called.
    Note
    Use of table parameters in the interface for subroutines is obsolete but a large number of subroutines have not yet been converted to appropriately typed USING or CHANGING parameters, so that they must still be supplied with data by the TABLES addition to the PERFORM statement.
    Example
    Static call of the internal subroutine select_sflight transferring a table parameter.
    PARAMETERS: p_carr TYPE sflight-carrid,
    p_conn TYPE sflight-connid.
    DATA sflight_tab TYPE STANDARD TABLE OF sflight.
    PERFORM select_sflight TABLES sflight_tab
    USING p_carr p_conn.
    FORM select_sflight TABLES flight_tab LIKE sflight_tab
    USING f_carr TYPE sflight-carrid
    f_conn TYPE sflight-connid.
    SELECT *
    FROM sflight
    INTO TABLE flight_tab
    WHERE carrid = f_carr AND
    connid = f_conn.
    ENDFORM.
    Addition 2
    ... USING a1 a2 ...
    Addition 3
    ... CHANGING a1 a2 ...
    Effect
    If you specify the additions USING and CHANGING, an actual parameter a1 a2 ... of the appropriate type must be assigned to each of the formal parameters u1 u2 ... and c1 c2 ... defined with the same additions to the FORM statement. The actual parameters specified after USING and CHANGING form one shared list. They are assigned to the formal parameters after the position in the shared list. The type of parameter transfer is defined with the additions USING and CHANGING to the FORM statement. The addition USING must be before CHANGING. Otherwise, the assignment of the actual parameters to the additions USING and CHANGING is irrelevant to the PERFORM statement. It is also irrelevant whether only one or both of the additions is specified.
    Notes
    For the sake of program documentation, we advise that you specify the additions USING and CHANGING in the FORM statement according to the definition of the parameter interface.
    In non-Unicode programs, you can address memory area outside an actual parameter if an actual parameter a1 a2 ... is assigned offset or length specifications. In non-Unicode programs, the length is set to the length of the current parameter if an offset is specified without a length. Both of these lead to warnings in the syntax check and to syntax errors in Unicode programs. The rules for the ASSIGN statement apply to the addressable memory area in non-Unicode programs as well.
    Example
    The following five PERFORM statements mean the same but only the fourth is recommended, since it is the only one that documents the interface of the subroutine called.
    DATA: a1 TYPE string,
    a2 TYPE string,
    a3 TYPE string,
    a4 TYPE string.
    PERFORM test USING a1 a2 a3 a4.
    PERFORM test CHANGING a1 a2 a3 a4.
    PERFORM test USING a1 CHANGING a2 a3 a4.
    PERFORM test USING a1 a2 CHANGING a3 a4.
    PERFORM test USING a1 a2 a3 CHANGING a4.
    FORM test USING p1 TYPE string
    p2 TYPE string
    CHANGING value(p3) TYPE string
    value(p4) TYPE string.
    ENDFORM.

  • My iPhone 4 will not sync my new voice memos from the "Voice Memos" app to my computer. This is frustrating, should not be so hard, can someone please help. I use PC with windows 7 with iPhone version 6.1.3 and iTunes most recent. Thanks.

    My iPhone 4 will not sync my new voice memos from the "Voice Memos" app to my computer. This is frustrating, should not be so hard, can someone please help. I use PC with windows 7 with iPhone version 6.1.3 and iTunes most recent. Thanks.

    In the Music tab of iTunes, do you have 'Include Voice Memos' checked?

  • After installing iPhone Configutilities in my Mac, Personal Hotspot using USB is not working! Please help, I am using 10.7 Lion OS

    After installing iPhone Configutilities in my Mac, Personal Hotspot using USB is not working! Please help, I am using 10.7 Lion OS

    Did you talk to your carrier?

  • How do I set the HELP menu to use Indesign's local HELP files on the hard drive and not the web?

    How do I set the HELP menu to use Indesign's local HELP files on the hard drive and not the web?
    CS 5.0 launches the internet browser.  > TO SLOW I DONT WANT THIS.
    CS 3.0 uses the local help files > I WANT THIS FOR 5.0.

    You're not speaking to the right forum for your request. Help is a Suite-wide feature and here is the forum where the Help application is discussed, and where the proper Adobe people hang out:
    Community Help Application

  • Hey Im in need of some help, I was using my Internet on my MacBook pro

    Hey guys I need some help I was using my internet on my MacBook pro &amp; I closed my laptop because my grandma was at the door and when I opened my laptop back up it asked for my password so I typed it in &amp; it won't take it! Idk what to do please help!!!! I need it for my classes!!!!

    Worst scenario
    Install your Insalll Disc.
    Power down the computer. then push  in the insllar, and hold the letttre ''C tilll the gear comes up. You will be someone else

  • My iphone 4 will no longer connect to my Itunes since 7.1.1 update itunes has latest update as well followed help which involved using mobile device properties no good re installed itunes still same problem iphone is showing up on pc as connected

    my iphone 4 will no longer connect to my Itunes since 7.1.1 update, itunes has latest update as well followed help which involved using mobile device properties no good re installed itunes still same problem iphone is showing up on pc as connected but itunes unable to see it
    any Ideas cheers

    Try holding the power and home button untill the apple symbol appears and let it reboot, if that does not work Try a DFU restore https://discussions.apple.com/thread/5269891

  • Help needed in using the DocCheck utility

    Hi
    Can somebody help me to use the DocCheck utility.I need to check that all the java files have the required javadoc tags and they are correct.
    I have downloaded the zip file and I have been giving the following commands
    c:\javadoc -doclet com.sun.tools.doclets.doccheck.DocCheck -docletpath c:\svk\jdk1.2.2\bin\doccheck1.2b1\lib\doccheck.jar -sourcepath<full path with the file name>
    But I get the following error message : No package or class specified.
    I also tried giving the following command:
    D:\SegaSource\sega\src\com\sega\account>javadoc -doclet com.sun.tools.doclets.do
    ccheck.DocCheck -docletpath d:\jdk1.3\doccheck1.2b1\lib\doccheck.jar User.java
    But I get the following message:
    Loading source file User.java...
    Constructing Javadoc information...
    javadoc: warning - Import not found: com.sega.account.address.Address - ignoring
    javadoc: warning - Import not found: com.sega.account.icon.Icon - ignoring!
    javadoc: warning - Import not found: com.sega.common.DateUtil - ignoring!
    javadoc: warning - Import not found: atg.nucleus.GenericService - ignoring!
    javadoc: warning - Cannot find class com.sega.account.icon.Icon
    javadoc: warning - Cannot find class com.sega.account.address.Address
    javadoc: warning - Cannot find class com.sega.account.MasterManager
    7 warnings
    please help
    Thanks
    SVK

    I have never ran the DocCheck from the command prompt, so I really don't know how to do it, but I do run it succesfully using ant (build tool from apache - jakarta, if you use tomcat you already have it installed).
    So.. if you do use ant.. this will help:
    <target name="doccheck" depends="prepare">
         <javadoc
              packagenames="${packages}"
                    destdir="${doccheck.home}"
              doclet="com.sun.tools.doclets.doccheck.DocCheck"
              docletpath="${doccheck.path}" >
              <classpath refid="project.classpath"/>
              <sourcepath refid="project.classpath"/>
         </javadoc>
    </target>If you don't use it.. I guess I was of no help, sorry.
    Ylan

  • Best practice to monitor 10gR3 OSB performance using JMX API?

    Hi guys,
    I need some advice on the best practice to monitor 10gR3 OSB performance using JMX API.
    Jus to show I have done my home work, I managed to get the JMX sample code from
    http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/jmx_monitoring/example.html#wp1109828
    working.
    The following is the list of options I am think about:
    * Set up: I have a cluster of one 1 admin server with 2 managed servers, which managed server runs an instance of OSB
    * What I try to achieve:
    - use JMX API to collect OSB stats data periodically as in sample code above then save data as a record to a
         database table
    Options/ideas:
    1. Simplest approach: Run the modified version of JMX sample on the Admin Server to save stats data to database
    regularly. I can't see problems with this one ...
    2. Use WLI to schedule the Task of collecting stats data regularly. May be overkill if option 1 above is good for production
    3. Deploy a simple web app on Admin Server, say a simple servlet that displays a simple page to start/stop and configure
    data collection interval for the timer
    What approach would you experts recommend?
    BTW, the caveats os using JMX in http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/jmx_monitoring/concepts.html#wp1095673
    says
         Oracle strongly discourages using this API in a concurrent manner with more than one thread or process. This is because a reset performed in
         one thread or process is not visible to another threads or processes. This caveat also applies to resets performed from the Monitoring Dashboard of
         the Oracle Service Bus Console, as such resets are not visible to this API.
    Under what scenario would I be breaking this rule? I am a little worried about its statement
         discourages using this API in a concurrent manner with more than one thread or process
    Thanks in advance,
    Sam

    Hi Manoj,
    Thanks for getting back. I am afraid configuring aggregation interval from Dashboard doesn't solve problem as I need to collect stats data of endpoint URI or in hourly or daily basis, then output to CSV files so line graphs can be drawn for chosen applications.
    Just for those who may be interested. It's not possible to use SQL to query database tables to extract OSB stats for a specified time period, say 9am - 5pm. I raised a support case already and the response I got back is 'No'.
    That means using JMX API will be the way to go :)
    Has anyone actually done this kind of OSB stats report and care to give some pointers?
    I am thinking of using 7 or 1 days as the aggregation interval set in Dashboard of OSB admin console then collects stats data using JMX(as described in previous link) hourly using WebLogic Server JMX Timer Service as described in
    http://download.oracle.com/docs/cd/E12840_01/wls/docs103/jmxinst/timer.html instead of Java's Timer class.
    Not sure if this is the best practice.
    Thanks,
    Regards,
    Sam

  • I want to change my apple id password but I forgot the security questions please help me some using my icloud I'd

    I want to change my apple id password but I forgot the security questions please help me some using my icloud I'd and if confirmation is must so please phone number is mine please send a code please help me my apple

    Welcome to the Apple community.
    If you are unable to remember your password, security questions, don’t have access to your rescue address or are unable to reset your password for whatever reason, your only option is to contact AppleCare, upon speaking to an operator you should explain that your problem is related to your Apple ID, this way you will not be charged for assistance, even if you don’t have an AppleCare plan.
    The operator will take you through some steps you may have already tried, however they need to be sure they have exhausted all usual approaches before trying to reset your account, so you should try to be helpful and show patience with the procedure.
    The operator will need to verify they are speaking to the account holder and may ask you some questions that only the account holder could know, and you will need to answer them if the process is to proceed.
    Once the operator has verified your identity they will send a message through to your device which contains an alpha numeric code, which you will need to read back to them.
    Once this has been completed they will send an email to your iCloud email address after a period of 24 hours, so you should check that mail is enabled in your devices iCloud settings.
    Upon receipt of the email, use the reset link provided to reset your password, after which you should be able to make the adjustments to iCloud that you wish to do.

Maybe you are looking for