Performance wise Code In smartform

Hello,
I have one doubt for performance issue in smartform.
While creating 'Z' smartform  data fetching can be done by two ways,
Which one is better out of two mentioned -
1. Code in smartform itself.
2. Code in driver program and pass that data to smartform via form interface.
In SAP standard smartforms it is always done in Smartform itself.
Also please suggest which one is easy to debug?
Regards
Vishal
Edited by: Vishal Chavan on Jun 11, 2009 7:55 AM

Hi Vishal,
As far as i am concerned it is always better to separate the data selection from the data used in the smartform.
Having your code in a driver program has better advantage over the code in smartform.
1.It is easy to change and maintain the code.
2.You can use the driver program for different smartforms with minimal changes.
Performance and debugging doesn't differ much either you code it smartform or in the driver program.
For more information please go through the below link.
Link: [http://help.sap.com/saphelp_nw70/helpdata/EN/16/a369b1800e4bdda978ee0fe3b7bd2c/frameset.htm]
Regards,
Babul.

Similar Messages

  • Performance wise data representation

    Hello there,
    I would like to start discussion regarding performance wise solution implementation solution,
    From performance point of view, which choice would be better to be chosen among the following scenarios,
    1. one is to run a process run on every and each record in the a Huge table, for example with million records, for all the records,
    2. or to have another table which might have about 800 fields !! which might represents a map crossing the id values in the main Huge table, which must be filled based on the values in the main table!! as a pre-processing
    then instead of processing the Huge table, simple query the map table which could be indexed using the needed values,
    what is the order of causes of bad performance, a process on many records, or many records that represents a pre-processing
    many thanks

    Thank you Billy for replying,
    Billy  Verreynne  wrote:
    Nor is performance something that one looks at after the design is done and the code written. Performance is a primary factor that needs to be considered with the h/w bought, the s/w installed and configured, the design, and every single line of code written.yes, currently I am in the design phase so that I am trying to understand the major performance principles that might effect the software when dealing with huge amount of data , whether pre-processing would be better, and such implementation issues.
    Here is the case logically:
    The process I have mentioned in the post, corresponds to a procedure that must be applied on data from a table, then return a certain value, calculated on the fly.
    some of those processing might not needed to be done , so in order to avoid huge unnecessary operation I need to perform some kind of predicating or indexing based on certain values.
    what is the best practice for such scenarios, performance wise!
    Thanks

  • We have many mappings, which one is good in performance wise ?

    We have many mappings, which one is good in performance wise ?

    HI
    Different Mapping Techniques are available in XI. They are: Message Mapping, XSLT Mapping, Java Mapping and ABAP mapping.
    u2022The integration repository includes a graphical mapping editor. It includes built-in functions for value transformations and queue and context handling.  There is an interface for writing user-defined functions (java) as well.
    u2022XSLT mappings can be imported into the Integration Repository; java methods can be called from within the XSLT style sheet. Advantages of this mapping are: open standard, portable, extensible via Java user-defined functions.
    u2022If the transformation is very complex, it may be easiest to leverage the power of Java for mapping.
    u2022ABAP mapping programs can also be written to transform the message structures.
    Message Mapping
    SAP XI provides a graphical mapping tool that generates a java mapping program to be called at run time.
    u2022Graphically define mapping rules between source and target message types.
    u2022Queue-based model allows for handling of extremely large documents.
    u2022Drag-and-drop.
    u2022Generates internal Java Code.
    u2022Built-in and user-defined functions (in Java)
    u2022Integrated testing tool.
    u2022N:M mapping is possible.
    JAVA MAPPING:
    Usually Java mapping is preferred when the target structure is relatively complex and the transformation cannot be accomplished by simple graphical mapping.
    For e.g. consider a simple File->IDoc scenarion where the source file is a simple XML file, whereas the target file is an IDoc with more than one hierarchy level e.g FINSTA01. Content conversion in XI can only create a single level hierarchy, so in this scenario a Java mapping would come in handy.
    See these:
    http://help.sap.com/saphelp_nw04/helpdata/en/e2/e13fcd80fe47768df001a558ed10b6/frameset.htm
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/10dd67dd-a42b-2a10-2785-91c40ee56c0b
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-i
    /people/thorsten.nordholmsbirk/blog/2006/08/10/using-jaxp-to-both-parse-and-emit-xml-in-xi-java-mapping-programs
    When to use Java mapping
    1) Java mapping are used when graphical mapping cannot help you.
    Advantages of Java Mapping
    1)you can use Java APIs and Classes in it.
    2) file look up or a DB lookup is possible
    3) DOM is easier to use with lots of classes to help you create nodes and elements.
    Java mapping can be used when you have complex mapping structures.
    ABAP MAPPING:
    ABAP mappings are mapping programs in ABAP objects that customers can implement using the ABAP Workbench.
    An ABAP mapping comprises an ABAP class that implements the interface IF_MAPPING in the package SAI_MAPPING. The interface has a method EXECUTE with the some signature.
    Applications can decide themselves in the method EXECUTE how to import and change the source XML document. If you want to use the XSLT processor of SAP Web AS, you can use the ABAP Workbench to develop a stylesheet directly rather than using ABAP mappings.
    In ABAP mapping you can read access message header fields. To do this, an object of type IF_MAPPING_PARAM is transferred to the EXECUTE method. The interface has constants for the names of the available parameters and a method GET, which returns the respective value for the parameter name. The constants are the same as in Java mappings, although the constant MAPPING_TRACE does not exist for ABAP mappings. Instead, the trace object is transferred directly using the parameter TRACE of the method IF_MAPPING~EXECUTE.
    For more details refer
    http://help.sap.com/saphelp_nw70/helpdata/EN/ba/e18b1a0fc14f1faf884ae50cece51b/frameset.htm
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/5c46ab90-0201-0010-42bd-9d0302591383
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/e3ead790-0201-0010-64bb-9e4d67a466b4
    /people/sameer.shadab/blog/2005/09/29/testing-abap-mapping
    ABAP Mapping
    /people/udo.martens/blog/2006/08/23/comparing-performance-of-mapping-programs
    https://websmp101.sap-ag.de/~sapdownload/011000358700003082332004E/HowToABAPMapping.pdf
    /people/ravikumar.allampallam/blog/2005/02/10/different-types-of-mapping-in-xi
    /people/r.eijpe/blog
    ABAP Mapping Vs Java Mapping.
    Re: Message Mapping of type ABAP Class not being shown
    Re: Performance of mappings (JAVA, XSLT, ABAP)
    XSLT Mapping
    XSLT stands for EXtensible Stylesheet Language Transformations. It is an XML based language for transforming XML documents into any other formats suitable for browser to display, on the basis of set of well-defined rules.
    /people/sap.user72/blog/2005/03/15/using-xslt-mapping-in-a-ccbpm-scenario
    /people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping
    The above menotined are the mapping present in the XI.
    When it is critical and complicate we go for the ABAP,JAVA or XSLt mapping. For simple Mapping we go for the graphical mapping.
    the selection of mapping also depends upon the requirement and alos on our scenario.
    cheers

  • Performance wise, a select statement is faster on a view or on a table??

    Performance wise, a complex (with multi join) select statement is faster on a view or on a table??

    Hi,
    the purpose of a view is not to provide performance benefits, it's basically a way to better structure database code and data access. A view is nothing but a stored query. When the optimizer sees references to a view in a query, it tries to merge it (i.e. replace the view with its definition), but it some cases it may be unable to do so (in presence of analytic functions, rownum pseudocolumn etc.) -- in such cases views can lead to a performance degradation.
    If you are interested in performance, what you need is a materialized view, which is basically a table built from a query, but then you need to decide how you would refresh it. Please refer to the documentation for details.
    Best regards,
    Nikolay

  • Performance wise which is best extends Thread Class or implement Runnable

    Hi,
    Which one is best performance wise extends Thread Class or implement Runnable interface ?
    Which are the major difference between them and which one is best in which case.

    Which one is best performance wise extends Thread Class or implement Runnable interface ?Which kind of performance? Do you worry about thread creation time, or about execution time?
    If the latter, then don't : there is no effect on the code being executed.
    If the former (thread creation), then browse the API Javadoc about Executor and ExecutorService , and the other execution-related classes in the same package, to know about the usage of the various threading/execution models.
    If you worry about, more generally, throughput (which would be a better concern), then it is not impacted by whether you have implemented your code in a Runnable implementation class, or a Thread subclass.
    Which are the major difference between them and which one is best in which case.Runnable is almost always better design-wise :
    - it will eventually be executed in a thread, but it leaves you the flexibility to choose which thread (the current one, another thread, another from a pool,...). In particular you should read about Executor and ExecutorService as mentioned above. In particular, if you happen to actually have a performance problem, you can change the thread creation code with little impact on the code being executed in the threads.
    - it is an interface, and leaves you free to extend another class. Especially useful for the Command pattern.
    Edited by: jduprez on May 16, 2011 2:08 PM

  • Difference between Temp table and Variable table and which one is better performance wise?

    Hello,
    Anyone could you explain What is difference between Temp Table (#, ##) and Variable table (DECLARE @V TABLE (EMP_ID INT)) ?
    Which one is recommended to use for better performance?
    also Is it possible to create CLUSTER and NONCLUSTER Index on Variable table?
    In my case: 1-2 days transactional data are more than 3-4 Millions. I tried using both # and table variable and found table variable is faster.
    Is that Table variable using Memory or Disk space?
    Thanks Shiven:) If Answer is Helpful, Please Vote

    Check following link to see differences b/w TempTable & TableVariable: http://sqlwithmanoj.com/2010/05/15/temporary-tables-vs-table-variables/
    TempTables & TableVariables both use memory & tempDB in similar manner, check this blog post: http://sqlwithmanoj.com/2010/07/20/table-variables-are-not-stored-in-memory-but-in-tempdb/
    Performance wise if you are dealing with millions of records then TempTable is ideal, as you can create explicit indexes on top of them. But if there are less records then TableVariables are good suited.
    On Tables Variable explicit index are not allowed, if you define a PK column, then a Clustered Index will be created automatically.
    But it also depends upon specific scenarios you are dealing with , can you share it?
    ~manoj | email: http://scr.im/m22g
    http://sqlwithmanoj.wordpress.com
    MCCA 2011 | My FB Page

  • Urgent:page wise total in smartforms

    hi,all
    How to do page wise total in smartforms   ?
    use table in smartforms for summary in pagebreak
    ex. page1
    10 (line 1)
    20 (line 2)
    30 (line 3)
    total 100
    page 2
    40 (line 1)
    50 (line 2)
    total 50
    Total in page 1 incorrect = line1(page1) + line2(page1) + line3(page1) + line1 (in page2)
    Total in page 2 inccorrect = line2 (in page2) .
    please help me guys to solve this problem..

    r u printing the internal table data using the TABLE node then--> in the Calculation tab u can do this.
    first create a variable in Global difinations-->global data tab.(ex v_tot)
    then in the TABLE>calculations TAB> 1select ->sum then 2nd colun>give the field name which u want to calculate (ex-wa_itab-netwr) in the Target Filedname tab> give the varialbe u have declared for the total(ex v_tot). in TIME colums select AFTER theLOOP...
    then in theTABLE>footer>inset a line display the variable(total u r using).here
    after the the printing the total..->create a program lines> cleat the v_tot... why u need to clear this is.... u want to display only the total value which are displaying in the current page... after printing this v_tot... clear this... so that in the next page it start totaling the freshly...
    lem me know if u have any clarifications.
    u can calculate as the above way for all the 6 fields.
    please Avoid postin duplicate threads

  • Dynpro application: how to perform some  code when user click window close

    Hello,
    I'm developing dynpro application. This application needs to perform some code when exiting.
    I can do that with MODULE xxxxx AT EXIT-COMMAND. But this code can't be performed when user of application click on button closing window (classic R/3 window, not pop-up).
    Does anybody know how to bind some code to clicking on button closing window?
    Best regards,
    Josef Motl

    As far as the prompt that you get when you close the last window is coming from the counter that SAP maintains regarding the number of open sessions(windows). When this counter reaches 1, I guess they have a check to issue a prompt. There was a discussion in this forum a long time back regarding how we can know that session id like SM04. There was no conclusion reached then. Theoritically, let us know you know this id for the session in which the user opened a particular page, then you can see if that session is deleted and then take the necessary action. There are some TH_* function modules that seem to be promising, but I was not able to conclusively achieve the control over a particular session.
    See if you can look at SM04 and get an idea. Please do let us know if you find the solution.
    Srinivas

  • Processing in 2 internal tables -Performance wise better option

    Hi Experts,
    I have 2 internal tables.
    ITAB1 and ITAB2  both are sorted by PSPHI.
    ITAB1 has PSPHI  some more fields INVOICE DATE  and AMT
    ITAB2 has PSPHI  some more fields amount.
    Both itab1 and itab2 will always have same amount of data.
    I need to filter data from ITAB2 based invoice date given on selection screen.since ITAB2 doesnt have invoice date field.
    i am doing further processing to filter the records.
    I have thought of below processing logic and wanted to know if there is a better option performance wise?
    loop at ITAB1 into wa where invoice_date > selection screen date. (table which has invoice date)
    lv_index = sy-tabix.
    read table itab2 where psphi = wa-psphi and index = lv_index.
    if sy-subrc = 0.
    delete itab2 index lv_index.
    endif.
    endloop.

    Hi Madhu,
    My Requirement is as below could you please advice on this ?
    ITAB1
    Field   1 PSPHI ,    FIELD 2 INVOICE,  FIELD 3 INVOICE_DATE , FIELD4 AMT
                 15245,                       INV1,                           02/2011  ,  400
                  15245                       INV2                            02/2012  ,  430
    ITAB2
       Field   1 PSPHI ,    FIELD 2 PSNR,      FIELD 3 MATNR  , FIELD4 AMT
                 15245,                       PSNR1,                   X .          430
                  15245                       IPSNR2                    Y,          400
    When user enteres date on sel screen as 02/2011
    I want to delete the data from itab1 and itab2 for invoice date greater then 02/2011/
    If i delere ITAB1 for date > selection screen date.
    Loop itab1.
    delete itab2 where psphi in itab1 will delete both rows in above example because the field psphi which is common can be mutiple.
    endloop.
    Can you advice ?

  • Generate bar codes in smartforms

    Hi,
    I wonder to know how can I add bar codes to a smartform. Bar codes should be generated in a automatic sequence and its number should be printed too.
    Thanks a lot,
    Nuno Moreira

    Hi Gregor,
    Let me try to explain better.
    1. I'm using the bar code in smartforms and I'm able to generate the bar code graphic. But I want to print the bar code graphic and the bar code number, so what I was asking is if there is some way to associate automatically the number with bar code graphic, instead of write the number again with a regular font format, because like this is very difficult to format properlly the graphic with the associated number.
    2. What I want to do is, print daily several letters identified with a bar code, so it'll be nice if the system could generate a automatic sequence of number to convert in bar code graphics.
    I hope you could understand my doubts.
    Thanks again,
    Nuno Moreira

  • Performance wise which is better NOT IN or NOT EXISTS

    Performance wise which is better NOT IN or NOT EXISTS.

    also that not exists is not equivalent to not in
    SQL> select * from dept where not exists (select * from emp where dept.deptno=comm);
        DEPTNO DNAME          LOC
            10 ACCOUNTING     NEW YORK
            20 RESEARCH       DALLAS
            30 SALES          CHICAGO
            40 OPERATIONS     BOSTON
    SQL> select * from dept where deptno not in (select comm from emp);
    no rows selectedin most case, Oracle internally rewrite a NOT IN in a NOT EXISTS, because NOT EXISTS usually performs better.
    HTH
    Laurent

  • BO4 - The action cannot be performed WIS 30650 when try open some WEBI docs

    Get message BO4 - The action cannot be performed WIS 30650 when try open some WEBI docs.
    Documents created brand new in BI 4.0 .
    Some docs open fine.
    Get message even when log in as Administrator.
    Windows 2008 Server Oracle 11.2.0.1
    Any idea what causes this.
    Many Thanks

    Hi,
    Thanks for reponse.
    Distributed environment 1 server hosts web application server (Tomcat), 1 server hosts BOE components.
    Contacted BO support and we did right click on document/modify and get error message you referred to.
    However - also get this message when try right click modify existing web intelligence sample reports or even try open which ship with the product and have never been modified.
    Checked that file referred to exist in Input frs and does.
    Logged in as Administrator so not permission-realted.
    Thi seems like a huge bug to me that can't vene open the webi sample reports which ship with the product.
    servers look fine - I'm only one using and can create ans save reports fine just openiong or modifying some later or some of the sample ones.
    Our FRS is on networked location and uses UNC path - I'm assuming this has no impcat.
    Many Thanks

  • Package - performance-wise is it correct?

    Hi All
    I have created a package which runs as a concurrent programme to populate 9 tables. The package includes a separate procedures to populate each of the tables as below. I would like to know whether the below method is recommended performance-wise or is there are any other better approach to achieve this?
    Thanks in advance
    regards
    anna
    procedure populate_table1
    begin
    for my_cursor_emp in crs_emp
    loop
    insert into employees
    (emp_no
    ,first_name
    ,last_name
    values
    my_cursor_emp.emp_no
    ,my_cursor_emp.first_name
    ,my_cursor_emp.lastt_name
    end loop;
    end populate_table1
    Lot more columns are there in the above procedure. Package continues as
    procedure 2
    procedure 3
    ...

    Annas wrote:
    Hi All
    I have created a package which runs as a concurrent programme to populate 9 tables. The package includes a separate procedures to populate each of the tables as below. I would like to know whether the below method is recommended performance-wise or is there are any other better approach to achieve this?The recommended approach would be to get rid of the cursor loops.
    INSERT INTO source_table
    select <columns>
    from YOUR_QUERY;This assumes you actually NEED to populate 9 tables like you say, i find that suspect in and of itself. Can you explain the end goal here? Are you populating temporary tables, doing a data migration, something else?

  • Subroutine code in smartforms?

    How to write subroutine code in smartforms?

    Hi,
    Smarforms
    http://www.sap-img.com/smartforms/smart-006.htm
    http://www.sap-img.com/smartforms/smartforms-faq-part-two.htm
    Re: Need FAQ's
    SmartForms : some links
    http://www.sapgenie.com/abap/smartforms.htm
    http://www.sap-img.com/smartforms/sap-smart-forms.htm
    http://help.sap.com/saphelp_46c/helpdata/en/a5/de6838abce021ae10000009b38f842/frameset.htm
    http://help.sap.com/printdocu/core/Print46c/en/Data/htm/english.htm
    http://www.sap-img.com/smartforms/smart-001.htm
    http://www.sap-img.com/smartforms/smartform-tutorial.htm
    http://www.sap-img.com/smartforms/smart-002.htm
    http://www.sapgenie.com/abap/smartforms.htm
    http://www.sap-img.com/smartforms/sap-smart-forms.htm
    http://www.sap-img.com/smartforms/sap-smart-forms.htm
    http://www.sapgenie.com/abap/smartforms.htm
    http://www.sap-basis-abap.com/sapsf001.htm
    http://www.sap-img.com/smartforms/smartform-tutorial.htm
    http://www.sapbrain.com/TUTORIALS/TECHNICAL/SMARTFORMS_tutorial.html
    http://www.allsaplinks.com/smartform_example.html
    http://www.sap-basis-abap.com/sapsf001.htm
    Smart Form PDF Link
    http://help.sap.com/bp_presmartformsv1500/DOCU/OVIEW_EN.PDF
    http://sap.ionelburlacu.ro/sap0/sapsf001.htm
    http://help.sap.com/saphelp_erp2004/helpdata/en/a9/de6838abce021ae10000009b38f842/frameset.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/a5/de6838abce021ae10000009b38f842/content.htm
    http://help.sap.com/saphelp_nw2004s/helpdata/en/16/a369b1800e4bdda978ee0fe3b7bd2c/content.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/a5/de6838abce021ae10000009b38f842/content.htm
    http://www.sap-basis-abap.com/sapsf001.htm
    http://www.sap-img.com/smartforms/smart-001.htm
    Re: How to Debug a Smartform
    Debug of smartform and sapscript.
    Debugging SmartForms
    Debugging of a subroutine pool.
    http://help.sap.com/saphelp_erp2004/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm
    Kindly Award Points If You Find The Reply Helpful.
    Cheers,
    Chaitanya.

  • ZPL II Code in smartforms

    Hi all,
       How to write the ZPL II code in Smartforms? If anybody have idea about this help me.
    Thanks in advance,
      Sudha

    This can be done with command nodes.
    For example to rotate field by 90 degrees clockwise enter:
    Attribute name: S_LZPL_SETUP
    Attribute value:  '^FWR'
    You can find details in document "Bar Code Label Design and Printing from mySAP™ Business Suit via SAP® Smart Forms™"  which can be downloaded from
    www.zebra.com/sap

Maybe you are looking for

  • On Account Clearing Vendor/Customer

    Dear fellows We are to be implementing SAP ERP ECC 6 by u201CABACUS Consulting (Implementer)u201D here we enable the new GL functionality for segment reporting.  We have a hot issue with on account clearing in both customer and vendor. The scenario i

  • I would like to know which version of Firefox I have.

    How do I find out?

  • What is the use of an access object in a BOL hierarchy ????

    Hi All,      I want to know what is the use of an access object in BOL hierarchy .... if we can use a search object to search for entities ... then in what scenario will an access object be used ? Regards, Ashish

  • Adobe Air for Android - caching key event that have "unusual" keycode

    I am developing an application for a platform. The OS of this platform is Android Gingerbread (2.3.4) The platform has some buttons with "unusual" key code: 141, 131 etc. Native application that created in ADT can catch and respond to these keyboard

  • Podcast no longer available

    My podcast, The PiratesWeek podcast, has been available for almost a year on ITunes. Now it no longer shows up in the store. It still downloads from the feed, but when I try to access it from the URL apple sent me when I set it up http://itunes.apple