Best practice of coding optional prompts

Post Author: maddyforums
CA Forum: WebIntelligence Reporting
I have a report that has 35 optional prompts for which I want to pass default values if the user doesnu2019t enter any values. This report was originally designed using BO 6.5 and has to be redesigned in WebI XI R2. The main concern of the data modeling team is:
To avoid hard coding of the default values for these optional prompts as this kind of coding will result in messing up the code when a report has too many prompts and might cause performance issues. During scheduling they want to run some scripts to pass the default values to the prompts but the issue is when the report is manually refreshed. They want us to find out whether we can pass the default values to the prompts without hardcoding this logic in the universe/ report for the manual refresh.
Ex:
SELECT -
FROM -
WHERE  ( dbo.BDS_BDS_TEST_TABLE.PAID_DT <= case when ltrim(rtrim(@variable('To Date (MM/DD/CCYY) (Optional)'))) is null then dateadd(ss,-1, convert(datetime,convert(varchar, datepart(mm, getdate()))'/01/'convert(char(4), datepart(yy, getdate())),101)) 
else convert(datetime, ltrim(rtrim(@variable('To Date (MM/DD/CCYY) (Optional)'))), 101) end )
One of the team members has suggested the use of separate data providers for the prompt responses (A data provider that stores all the default prompt values) and uses the data provider functions to pass the values to the prompts. Please let me know whether this kind of approach works. What is the general coding approach for designing these kind of reports with lots of prompts? Please advice.

Hi Ian,
There will be some guidelines in the new documentation, which is currently not yet available.
Here some very short tipps:
- Use an assistance class for each component, which should hold the current data and where you can place central methods. Placing methods in external classes is better than putting them into the component controller, because there is less overhead and more functionality (e.g. optional parameters and exceptions).
- Hold your current data in the assistance class and only put them into the context if needed (e.g. via supply functions).
- Call your business logic from the assistance class during event handling. Then you have the opportunity to do navigation or not depending on the output of the business logic.
- You could use any other class for this purpose, but the assistance class is easier, because it is instantiated by the framework and you can access it via wd_assist-> instead of wd_this->my_class-> .
- Do not create a model component, because this is just overhead and no advantage. In earlier states of the WD project, we thought, a model component would be a good idea, but we changed our minds
- Use context mapping, where it is needed, e.g. if you use the same context in different views.
- It is quite well to call the assistance class from the views.
- Be careful, if you store any references to component parts in your assistance class. Some references may change during runtime, especially those of context nodes placed in a deep hierarchy.
Hope this helps, and more tipps will follow in the documentation or weblogs.
Ciao,  Regina

Similar Messages

  • WDA Best Practice for Coding

    Hi
    Are there any best practice guidelines for WDA?
    I have seen the naming conventions in the official book which I use but are there any actual coding standards such as whether to use the global controller to hold methods and then call these from the relevant onaction methods.
    i.e.
    METHOD onactionsave .
      lv_subrc = wd_comp_controller->check_input( ).
      check lv_subrc = 0.
      wd_comp_controller->save( ).
    ENDMETHOD.
    Just wondered...
    Also data declarations were traditionally done at the top of a method.  Is this still the case in WDA or is it more normal to declare variables etc as they are required - like in Java?
    Cheers
    Ian

    Hi Ian,
    There will be some guidelines in the new documentation, which is currently not yet available.
    Here some very short tipps:
    - Use an assistance class for each component, which should hold the current data and where you can place central methods. Placing methods in external classes is better than putting them into the component controller, because there is less overhead and more functionality (e.g. optional parameters and exceptions).
    - Hold your current data in the assistance class and only put them into the context if needed (e.g. via supply functions).
    - Call your business logic from the assistance class during event handling. Then you have the opportunity to do navigation or not depending on the output of the business logic.
    - You could use any other class for this purpose, but the assistance class is easier, because it is instantiated by the framework and you can access it via wd_assist-> instead of wd_this->my_class-> .
    - Do not create a model component, because this is just overhead and no advantage. In earlier states of the WD project, we thought, a model component would be a good idea, but we changed our minds
    - Use context mapping, where it is needed, e.g. if you use the same context in different views.
    - It is quite well to call the assistance class from the views.
    - Be careful, if you store any references to component parts in your assistance class. Some references may change during runtime, especially those of context nodes placed in a deep hierarchy.
    Hope this helps, and more tipps will follow in the documentation or weblogs.
    Ciao,  Regina

  • Best practices for coding in Exits

    Does anyone have any documents on the Dos and Don'ts in BADIs, Exits and SD routines from the angle of System performance and how to minimise the load. Iam not talking about the generic Optimisation documents but something specific to SD routines and general BADIs and Exits which fall under the Best practices (coding) of SAP. eg. One guideline from SAP is that Clients should not tamper with the 'x' variables (xvbak, xvbap etc.) in the SD form exits.
    Thanks,
    Madhavan

    Not sure why check is a problem in general however it reminds me on another tricky situation.
    For exampele there is a user-exit in CO-PA
         call customer-function '001'
               exporting
                    erkrs           = i_erkrs
                    ep_source       = <ls_ce1xxxx>
                    ep_source_bukrs = <gs_ce_bukrs>
                    exit_nr         = i_exit_nr
               importing
                    ep_target         = <ls_ce1xxxx>
                    ep_target_bukrs   = <gs_ce_bukrs>
                    e_bukrs_processed = l_bukrs_processed
                    et_field          = gt_field_user
               tables
                    gt_message_table = gt_message_table
               exceptions
                    others    = 1.
    as you can see <ls_ce1xxxx> is passed on ep_source and ep_target. If you have several clients but only one in which the user-exit should be active,  you usually encapsulate your coding like following.
    if sy-mandt = '100'.
      ep_target = <changed_values>.
    endif.
    But in this case you will learn that in every other client the values of ep_source will be cleared if you do not add a statement like ep_target = ep_source.
    before the if statement.
    Christian

  • Best Practice - Changing description for Org Unit/Position or creating new?

    Hello Freinds,
    I just want to know from your experience what's normally practiced in your implementations for OM :-
    For scenarios where there is a need to change the description of a particular org unit or position, do u
    1. just change the description effective a particular date (to maintain history) or
    2. put an end date to those objects and create new ones ?
    Solution 1 is quick and easy, but in IT0001 the description displayed is as on start date of that infotype which is normally a date prior to the change in desc of those objects. As a result this infotype keeps displaying old description.
    Is there any way to change this display to show the current description instead of the description as on start date of this infotype ???
    Solution 2 calls for a lot of related activities, say if i create a new org unit and delemit the old one - then i have to move all the sub org units and positions into this new one ... which is quite time consuming and doesn't really seem practical.
    How do u manage such scenarios ?
    Thanks
    Allen

    We use option #1, although I am not sure this is best practice.  Using option 1 for positions makes it challenging when it comes to reporting on length of time in position.  We frequently have the scenario where a person is reorged not because they applied for another position, but just because the big wigs want to move around the chess pieces.  In these cases we simply modify the position attributes and then run a PA action.  Then if you run a query and use the standard delivered Length of time in position field, it appears as if the person has been in the same position for years (which they have), but their position has been retitled, re-graded, and re-orged numerous times.  This makes it very difficult to get to an employee's length of time in their role. 
    This is a great discussion question I hope more people respond with what they do and why.

  • Best practice documentation of application

    Hello listers, I need to come up with a proposal for a standard on how we want (to force) our developers to document there code and all the neat stuff there are building. Is there a best practice for Oracle and if so can some direct me to the URL. Thanks Ronald

    Hi,
    There are a lot of such links available in the oracle site. Some of them are
    http://otn.oracle.com/docs/products/oracle8i/doc_library/817_doc/server.817/a76992/sql.htm
    http://otn.oracle.com/tech/pl_sql/content.html
    You can search for more in the oracle site for "Best Practices" or "Coding Standards". You can also search in
    "www.google.com" for external articles.
    Thanks,
    Sharmila

  • Order Process Best Practice Suggestions?

    Hey CF World,
    I have to revamp an online order process. The process is broken into 4 steps.
    The app as it exists today was built by a different developer and for the life of me, I have wasted about 5 hours trying to figure out exactly what the person is doing in the code just so I can make some basic tweaks to the process.
    Could anyone offer what might be considered today's best practice for a step by step order process?
    The thought is, if the user could complete step 1, upon clicking next the data elements of the form would be validated and then they would be taken to step 2, etc, etc... until the end where upon submission, the order would then be written to the database and next process triggered internally.
    Should I have one page that upon submit of step 1 cycles back to itself, processes the data and then loads a separate div of info for step 2 or...?
    Any suggestions would be great.  Thank you so much in advance for your help, I sincerely appreciate it.
    Ciao'
    D.

    Hello,
    Thank you so much for that. Let me qualify a few things as I probably should have in the first place. (my apologies)
    Coldfusion 8
    SQL Server  2005
    There is no payment or credit card information being provided.
    The user comes online, goes through a basic order process for some work to be done. As mentioned, it is a multi step process for gathering their information.
    Once the entire order is in and all the fields validated along the way to ensure they were populated where required, the order is to be written into the pending orders table and an email is sent to the branch closest to the customer notifying them of the new order with a link into the details. The branch then calls them directly to confirm the details of the order before activating it.
    So, the code I received, is next to impossible to follow through, for the life of me I can not figure out what the former developer has done. I need to make some changes to the process and if I can not even follow the flow to figure out where to make my changes, that could pose a problem.
    I have not coded too much in Coldfusion for the past two years but did so quite extensively before that. I totally agree on the CFTransaction suggestion. I guess what I was looking for is, are there any best practices for coding that I should be aware of, especially considering what I want to accomplish? Previously we used the "fusebox" concept of coding and had most of our code in CustomTags in a very reusable and easy to follow structure and flow.
    Any thoughts/suggestions would be great! Thank you very much!
    D.

  • Best Practice for ASA Route Monitoring Options?

    We have one pair Cisco ASA 5505 located in different location and there are two point to point links between those two locations, one for primary link (static route w/ low metric) and the other for backup (static route w/ high metric). The tracked options is enabled for monitoring the state of the primary route. the detail parameters regarding options as below,
    Frequency: 30 seconds               Data Size: 28 bytes
    Threshold: 3000 milliseconds     Tos: 0
    Time out: 3000 milliseconds          Number of Packets: 8
    ------ show run------
    sla monitor 1
    type echo protocol ipIcmpEcho 10.200.200.2 interface Intersite_Traffic
    num-packets 8
    timeout 3000
    threshold 3000
    frequency 30
    sla monitor schedule 1 life forever start-time now
    ------ show run------
    I'm not sure if the setting is so sensitive that the secondary static route begins to work right away, even when some small link flappings occur.
    What is the best practice to set those parameters up in the production environment. How can we specify the reasonanble monitoring options to fit our needs.
    Thank you for any idea.

    Hello,
    Of course too sensitive might cause failover to happen when some packets get lost, but remember the whole purpose of this is to provide as less downtime to your network as possible,
    Now if you tune these parameters what happen is that failover will be triggered on a different time basis.
    This is taken from a cisco document ( If you tune the sla process as this states, 3 packets will be sent each 10 seconds, so 3 of them need to fail to SLA to happen) This CISCO configuration example looks good but there are network engineers that would rather to use a lower time-line than that.
    sla monitor 123
    type echo protocol ipIcmpEcho 10.0.0.1 interface outside
    num-packets 3
    frequency 10
    Regards,
    Remember to rate all of the helpful posts ( If you need assistance knowing how to rate a post just let me know )

  • I purchased a  MBP 13.3/2.5/8GB/128GB FLASH from Apple store in Manhattan Beach,CA some months ago. It has only 128 GB storage. What us the best practical option for additional storage ?

    I purchased a  MBP 13.3/2.5/8GB/128GB FLASH from Apple store in Manhattan Beach,CA some months ago. It has only 128 GB storage.
    I soon realized that I did a big mistake not upgrading the storage when purchasing. I thought I could upgrade later which is not possible I understand.
    My Q:
    What is the best and most practical/userer friendly option for additional storage say up to 1 TB ?

    Hey leiv karsten,
    As your macbook is retina,you can't upgrade it like previous generation macbook pro.You can purchase a portable 1TB external harddrive.
    http://www.amazon.com/s/ref=lp_595048_nr_p_n_feature_two_brow_5?rh=n%3A172282%2C n%3A%21493964%2Cn%3A541966%2Cn%3A1292110011%2Cn%3A595048%2Cp_n_feature_two_brows e-bin%3A5446812011&bbn=595048&ie=UTF8&qid=1368944651&rnid=562234011

  • Best Practice Codec for Prompts on UCCX 8.5

    Hi 
    I currently have a UCCX 8.5 cluster on promises with all the prompts with Codec G.711. Also, the UCCX is using the Codec G.711.
    The company is requiring to change the system to codec G729 which will allow us to reduce bandwidth consumption as we have all our agents connected remotely over a MPLS Network. In addition to that, we don't local resources for transcoding. The transcoder are centralized in the same place as the CUCM and UCCX Platform. 
    Therefore, first off, what would the impact on changing the system and the prompts to G729, and  secondly, what would be the best practice in this scenario.
    I really appreciate any help.
    Thanks,
    Alexis 

    Hi Alexis,
    Please check the following post for similar query
    https://supportforums.cisco.com/discussion/10732576/design-consideration-uccx
    HTH
    Manish

  • SOA Suite 11g Coding Best Practice Document

    Hello,
    I am looking for coding best practice dosument for SOA suite 11g. I have seen one document for "soa_best_practices_1013x_drop3" but this was for SOA 10g. I could not find any such document for SOA 11g. Please let me know if some one has document for best practice, coding standard, naming convention for BPEL,OSB,B2B etc.
    Regards,
    Prashant

    Now we need to publish our services on the internet. I am looking for the security mechanism that I should apply in order to make the services secure. I may even like to verify that the request invoking service A is only coming from specified context.One approach we followed at a customer :
    - SOA was installed within internal firewall zone
    - A F5 BigIP Load Balancer was setup in DMZ. This load balancer terminated one way SSL connections coming from service consumers over internet. The load balancer forwaded the request to a pool of apache of web servers within DMZ
    - The Apache web servers had a redirection rule which forwarded the request to the soa server ports within the internal firwall zone. The internal firewall was opened to allow connections between apache web servers and soa server ports.
    - WS Security Username token/plain text password was used for message level security at the soa services layer.
    Some alterations you can do :
    1. enforce 2 way ssl and make load balancer to validate the CN of the client certificate. This can make sure only authorized clients are to make calls to the service
    2. OR setup some sort of IP filtering at DMZ firewall i.e. allow traffic only from authorized clients IP addresses to the load balancers virtual address for this specific service.

  • Seeking advice on Best Practices for XML Storage Options - XMLTYPE

    Sparc64
    11.2.0.2
    During OOW12 I tried to attend every xml session I could. There was one where a Mr. Drake was explaining something about not using clob
    as an attribute to storing the xml and that "it will break your application."
    We're moving forward with storing the industry standard invoice in an xmltype column, but Im not concerned that our table definition is not what was advised:
    --i've dummied this down to protect company assets
      CREATE TABLE "INVOICE_DOC"
       (     "INVOICE_ID" NUMBER NOT NULL ENABLE,
         "DOC" "SYS"."XMLTYPE"  NOT NULL ENABLE,
         "VERSION" VARCHAR2(256) NOT NULL ENABLE,
         "STATUS" VARCHAR2(256),
         "STATE" VARCHAR2(256),
         "USER_ID" VARCHAR2(256),
         "APP_ID" VARCHAR2(256),
         "INSERT_TS" TIMESTAMP (6) WITH LOCAL TIME ZONE,
         "UPDATE_TS" TIMESTAMP (6) WITH LOCAL TIME ZONE,
          CONSTRAINT "FK_####_DOC_INV_ID" FOREIGN KEY ("INVOICE_ID")
                 REFERENCES "INVOICE_LO" ("INVOICE_ID") ENABLE
       ) SEGMENT CREATION IMMEDIATE
    INITRANS 20  
    TABLESPACE "####_####_DATA"
           XMLTYPE COLUMN "DOC" STORE AS BASICFILE CLOB  (
      TABLESPACE "####_####_DATA"  XMLTYPE COLUMN "DOC" STORE AS BASICFILE CLOB  (
      TABLESPACE "####_####_DATA" ENABLE STORAGE IN ROW CHUNK 16384 RETENTION
      NOCACHE LOGGING
      STORAGE(INITIAL 81920 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
      PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT))
    XMLSCHEMA "http://mycompanynamehere.com/xdb/Invoice###.xsd" ELEMENT "Invoice" ID #####"
    {code}
    What is a best practice for this type of table?  Yes, we intend on registering the schema against an xsd.
    Any help/advice would be appreciated.
    -abe                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Hi,
    I suggest you read this paper : Oracle XML DB : Choosing the Best XMLType Storage Option for Your Use Case
    It is available on the XML DB home page along with other documents you may be interested in.
    To sum up, the storage method you need depends on the requirement, i.e. how XML data is accessed.
    There was one where a Mr. Drake was explaining something about not using clob as an attribute to storing the xml and that "it will break your application."I think the message Mark Drake wanted to convey is that CLOB storage is now deprecated and shouldn't be used anymore (though still supported for backward compatibility).
    The default XMLType storage starting with version 11.2.0.2 is now Binary XML, a posted-parsed binary format that optimizes both storage size and data access (via XQuery), so you should at least use it instead of the BASICFILE CLOB.
    Schema-based Binary XML is also available, it adds another layer of "awareness" for Oracle to manage instance documents.
    To use this feature, the XML schema must be registered with "options => dbms_xmlschema.REGISTER_BINARYXML".
    The other common approach for schema-based XML is Object-Relational storage.
    BTW... you may want to post here next time, in the dedicated forum : {forum:id=34}
    Mark Drake is one of the regular user, along with Marco Gralike you've probably seen too at OOW.
    Edited by: odie_63 on 18 oct. 2012 21:55

  • Best Practices - How to adjust light in selected areas and best options for export (only adjust ligh

    Hello,
    I have the cs suite, and recently downloaded the lightroom demo. I am fairly good with picking up programs but couldn't locate where or how i can select individual elements to lighten/darken? If i wanted to make a an object lighter, should i be doing this within ps or is there an easy to use tool within lightroom?
    Second question, when exporting into ps, what is the best practice.. should i only adjust lighting and any other edits within ps?
    cheers
    Kenny from Vancouver

    Kenny
    Take a look at the Adjustment Brush. It's in the tool pallette, just below the histogram when you're in the Develop Module. It will not only dodge and burn, but allow you to apply lots of other kinds of local changes.
    In general, I find that I can do everything in Lightroom for most images.
    Hal

  • Is hard-coded subview sizing brittle or best practice?

    Coming from a web background, where explicit sizing is generally not considered best practice, I am not used to 'hardcoding' positioning values.
    For example, is it perfectly acceptable to create custom UITableViewCells with hardcoded values for subviews' frames and bounds? It seems that when the user rotates the device, I'd need another set of hardcoded frames/bounds? If Apple decides to release a larger TABLET ... then I'd need yet another update to the code - it sounds strange to me in that it doesn't seem to scale well.
    In my specific case, I'd like to use a cell of style UITableViewCellStyleValue2 but I need a UITextField in place of the detailTextLabel. I hate to completely write my own UITableViewCell but it does appear that in most text input examples I've found, folks are creating their own cells and hardcoded sizing values.
    If that is the case, is there any way I can adhere to the predefined positioning and sizing of the aforementioned style's textLabel and detailTextLabel (ie: I'd like to replace or overlay my UITextField in place of the detailTextLabel but yet have all subview positioning stay in tact)? Just after creating a default cell, cell.textLabel.frame is returning 0 so I assume it doesn't get sized until the cell's 'layoutSubviews' gets invoked .. and obviously that is too late for what I need to do.
    Hope this question makes sense. I'm just looking for 'best practice' here.
    Message was edited by: LutherBaker
    Message was edited by: LutherBaker

    I think devs will be surprised at the flexibility in their current apps when/if a table it released. I'm of the opinion that little energy will be needed to move existing apps to a larger screen if at all. Think ratio, not general size.
    In terms of best practice...hold the course and let the hardware wonks worry about cross-over.

  • JAVA CODING STYLE - Best practice

    Hi all,
    In my current j2ee related project, i have being assigned to write a utility class assume (MyUtilityClass) which will have two methods..assume methodA() and methofB().
    Being it an utility class, i heard it should be only static methods and contants as final static in all utility class. Is there any rules (best practices) to write a component or an utility class in java..if yes where i can find more info on that?
    and for the above requirement i am planning to have
    an Interface and its impl [methods are static inside that].
    Thanks in advance

    Hi,
    Thanks for the reply..No i dont want to maintain any state.
    Actually the methods inside the class are goign to generate the checksum string for any file.
    the I/p for the method will be a File and output will a String (Calculated checksum value). one method will be for 32 bits and one for 128bit..this is my scenario..
    Interface ChecksumGenerator{
    public static String checksum32 (File){
    public static String checksum128(File){
    Class ChecksumGeneratorImpl implements ChecksumGenerator{
    public static String checksum32 (File){
    ///code
    public static String checksum128 (File){
    ///code
    }I will also have an Interface so that..in future the impl can also change..
    is that the right way to do that?
    by the way
    in my eclipse i am going to have 4 projects
    (1) ProjectPersistence
    (2) ProjectWeb
    (3) ProjectUtils
    (4) Project Business
    i am planing to have this class inside ProjectUtils
    thanks in advance....

  • Coding best practice display name vs internal name in itemUpdated event receiver

    Hi,
    In an itemupdated event receiver, when referring to list fields, is it better to use the field's internal name, or its display name?
    Is there a clear guideline or best practice, or is this a subjective discussion?
    Thanks in advance for your replies

    Hi Jorge,
    One of the best practice I follow is Repository pattern for list access, on that scenario I always use Internal Names.
    The rational behind this decision is Fristly, I will have full control, Secondly I need not to worry about column names changes by business/endusers through SharePoint UI which I cannot control of. Though we had governance in place and trained
    the users, still no avail, users will go and change the column names. 
    Thirdly, My code will not break when there is a display name change. One of my client was too UI rather than business logic, since the enduser are high profile managers, spacing between columns and readabiltily are first class citizen.  Those changes
    that we made to the list library did not affect our code and the application was running without code refactoring.
    Backto your question, I will use Internal names in my CAML query to minimize error as follows
    item["internalName"]
    Your question is subjective, I have not seen any best practices on this subject, being said that, if you are looking for best practice and guidance I would suggest you to start here -
    SharePoint 2010 Guidance
    http://msdn.microsoft.com/en-us/library/ff770300.aspx ( no idea on SP 2013 guidance availablity)
    Go through the code and doc, You will get the design rational behind each choice.
    Hope this helps!
    Ram - SharePoint Architect
    Blog - SharePointDeveloper.in
    Please vote or mark your question answered, if my reply helps you

Maybe you are looking for

  • Youtube issue with Belle refresh

    Invalid parameters,that's what I got after installing nokia belle refresh on my N8. tried to do a hard reset,but doesn't work Moderator's note: Mentioning of illegal third party software removed.  Attachments: Scr000001.jpg ‏21 KB

  • G5 DVI LCD HD TV HDMI

    I have a Dual 2.5 G5 with an Apple Cinema HD 23" LCD connected. I have just bought a Sony 32" HD LCD TV with a HDMI input and understand that all I need is a male DVI to male HDMI cable to then be able to use my Mac's DVD player to view movies on my

  • Persistent vs. in-memory queues

    Hello Experts, we are developing an SMS-based app. As of now, we imagine it like this: - Receiver thread reads incoming SMS messages and puts them into a queue - Processor thread reads messages from the queue and executes logic on them - Logger threa

  • About classes and Inheritance

    hi every one, i want use class with object in data block and i want know how i can use inheritance with objects. becouse i have interview in this two subjects, can any body support my. thanks,,,,,,,

  • Documents that are park in FBV0 do not update with the new user name when

    Hi,      I need to find out why documents that are park in FBV0 do not update with the new user name when any changes are made.  Also when we park using MIR7 and make changes to the documents at a later time the document updates with the new users na