Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Loading in …3
×
1 of 31

WebDynPro for Java Common Error v5

0

Share

Download to read offline

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all

WebDynPro for Java Common Error v5

  1. 1. WebDynPro for Java: Common Error Prevention and Fixes
  2. 2. © SAP AG 2006, SAP TechEd ’06 / Session ID / CD110 Agenda Jodi Johnson Developer, CLOROX
  3. 3. © SAP AG 2006, SAP TechEd ’06 / Session ID / CD110 Learning Objectives As a result of this workshop, you will be able to:  Avoid some common but nasty errors in WebDynPro  Correct the errors you couldn’t avoid  Understand the impact of the errors  Use practical tips to create an easier to maintain and more robust application
  4. 4. SETUP Issues (Development Configuration and Multiple Tracks)
  5. 5. © SAP AG 2006, SAP TechEd ’06 / Session ID / CD110 Glossary Development Configuration (DC): the framework of a WebDynPro application TRACK: individual instance of WebDynPro BUSINESS PACKAGE: grouping of DCs that are treated as a unit(SCA) SCA: Software Deployment Archives, used by BASIS to import WebDynPro Code between portals SYSTEM: HR ESS/MSS ECC5.0 PORTAL 6.2 SP 13
  6. 6. © SAP AG 2006, SAP TechEd ’06 / Session ID / CD110 DC – Tips - Multiple Tracks Make sure correct portal is selected
  7. 7. © SAP AG 2006, SAP TechEd ’06 / Session ID / CD110 DC – Tips - Multiple Tracks Ensure host matches selected portal host
  8. 8. © SAP AG 2006, SAP TechEd ’06 / Session ID / CD110 DC – Tips - Multiple Tracks REASON: Can use separate tracks and portals to support Production, code for a project and check Service Packs.
  9. 9. © SAP AG 2006, SAP TechEd ’06 / Session ID / CD110 DC – Tip – Use correct prefix for DCs Business Package (ESS) No Business Package
  10. 10. © SAP AG 2006, SAP TechEd ’06 / Session ID / CD110 DC – Tip – Use correct prefix for DCs REASON: All DCs are grouped by business package and transported to portals as a SCA.
  11. 11. © SAP AG 2006, SAP TechEd ’06 / Session ID / CD110 DCs - Problem – Creating DC on server Wrong place to add dc Right place to add dc
  12. 12. © SAP AG 2006, SAP TechEd ’06 / Session ID / CD110 DCs - Problem – Creating DC on server EFFECT: Cannot remove DC from server. The SCA will not build correctly, BASIS must manually exclude the bad DC before the build will succeed SOLUTION: Only upgrading to the next Service Pack will remove the DC from the server.
  13. 13. © SAP AG 2006, SAP TechEd ’06 / Session ID / CD110 DCs – Problem - Changing SAP vanilla DCs Importing Vanilla SAP Configuration to make changes
  14. 14. © SAP AG 2006, SAP TechEd ’06 / Session ID / CD110 DCs – Problem - Changing SAP vanilla DCs EFFECT: Everything works until a Service Pack is applied. SAP DC will revert back to vanilla. SOLUTIONS: Rewrite any changes made to SAP DC. OR Copy the SAP DC and make changes to that DC.
  15. 15. © SAP AG 2006, SAP TechEd ’06 / Session ID / CD110 DCs – Tip – Service Packs PROBLEM: Service Packs will revert any SAP DCs to vanilla and drop any new NON-SAP DCs. EFFECT: Only vanilla SAP DCs will exist. SOLUTION: Keep a list of all DCs created for a project, BASIS can load them on the track after the Service Pack is applied.
  16. 16. CONTEXT (RFCs and Models)
  17. 17. © SAP AG 2006, SAP TechEd ’06 / Session ID / CD110 CONTEXT Overview RFC - Remote Function Calls (passes data from backend to WebDynPro) Model One to one relationship with RFC Used Model Allows access to Model by Custom Controller and Views Custom Controller (Value Nodes and Attributes) Views
  18. 18. © SAP AG 2006, SAP TechEd ’06 / Session ID / CD110 CONTEXT Inheritance from Custom Controller to View Views can inherit context Value Node and Attributes from Custom Controller but Custom Controller cannot inherit from Views
  19. 19. © SAP AG 2006, SAP TechEd ’06 / Session ID / CD110 RFCs – Tip – Maximize coding in backend REASON: Code runs quicker. Backend (ECC 5.0) is where data is maintained and validated. WebDynPro should be used for display, parsing and enforcing field requirements.
  20. 20. © SAP AG 2006, SAP TechEd ’06 / Session ID / CD110 RFC/Models – Tips – Use Input and Rename Output Use the RFC Input Rename the output in the RFC input
  21. 21. © SAP AG 2006, SAP TechEd ’06 / Session ID / CD110 RFC/Model – Tip – Coding for reading models try{ Z_Rfc_Read_Sample_Input readInput = new Z_Rfc_Read_Sample_Input (); wdContext.nodeSampleReadModel().bind(readInput); wdContext.nodeReadOutput().invalidate(); } catch (Exception e) { }
  22. 22. © SAP AG 2006, SAP TechEd ’06 / Session ID / CD110 RFC/Model – Tip – Coding for reading models TIP: Use a try {} when reading the model REASON: Sometimes a null record is returned as the first record. If this happens then the framework will go fetch the correct record only if a try{} is coded.
  23. 23. © SAP AG 2006, SAP TechEd ’06 / Session ID / CD110 RFC/Model – Tip – Coding for reading models TIP: Always read the input TIP: Always invalidate the output REASON: Won’t work properly otherwise. NOTE: Same rules apply to saving models - move data to input - invalidate the output - save input
  24. 24. © SAP AG 2006, SAP TechEd ’06 / Session ID / CD110 RFC – Problem - Adding new fields to RFC Must Reimport the RFC(Model)
  25. 25. © SAP AG 2006, SAP TechEd ’06 / Session ID / CD110 RFC – Problem - Adding new fields to RFC EFFECT: Need to reimport model and restart Portal whenever the RFC structure is changed. SOLUTION: Upfront analysis, put all fields that will likely be needed for future upgrades in the RFC. Better too many fields than too few.
  26. 26. © SAP AG 2006, SAP TechEd ’06 / Session ID / CD110 RFC/Model – Problem - Data structure differences PROBLEM: WebDYnPro contains different data types than ABAP Specifically, WebDynPro can translate a char(1) as Boolean. If a Boolean field is changed to a different data type, reimporting the RFC will not remove the reference to the Boolean field in the context. SOLUTION: Delete the context by hand and reattach
  27. 27. © SAP AG 2006, SAP TechEd ’06 / Session ID / CD110 DEMO
  28. 28. © SAP AG 2006, SAP TechEd ’06 / Session ID / CD110 Summary  Do the analysis/design upfront  Don’t modify SAP DCs – create new ones  Work on only one track at a time  Code data verification on the backend  Include all possible fields in the RFCs
  29. 29. © SAP AG 2006, SAP TechEd ’06 / Session ID / CD110 Further Information  Public Web: www.sap.com www.sdn.sap.com  Related Workshops/Lectures at SAP TechEd ’05 Session ID, Title, Session Type  Americas’ SAP Users’ Group (ASUG) www.asug.com
  30. 30. © SAP AG 2006, SAP TechEd ’06 / Session ID / CD110 THANK YOU FOR YOUR ATTENTION ! QUESTIONS – SUGGESTIONS – DISCUSSION
  31. 31. © SAP AG 2006, SAP TechEd ’06 / Session ID / CD110 Please complete your session evaluation. Be courteous — deposit your trash, and do not take the handouts for the following session. Feedback Thank You !

×