Creating Callable Objects Webdynpro

Embed Size (px)

Citation preview

  • 8/10/2019 Creating Callable Objects Webdynpro

    1/16

    Version 1.00 July 2006

    SAP Composite ApplicationSAP Composite ApplicationSAP Composite ApplicationSAP Composite Application

    FrameworkFrameworkFrameworkFramework

    Creating a CallableObject: Web DynproForm

  • 8/10/2019 Creating Callable Objects Webdynpro

    2/16

    SAP AGSAP AGSAP AGSAP AGNeurottstrae 1669190 WalldorfGermanyT +49/18 05/34 34 24F +49/18 05/34 34 20www.sap.comwww.sap.comwww.sap.comwww.sap.com

    Copyright 2005 SAP AG. All rights reserved.

    No part of this publication may be reproduced or transmitted in

    any form or for any purpose without the express permission of

    SAP AG. The information contained herein may be changed

    without prior notice.

    Some software products marketed by SAP AG and its distributors

    contain proprietary software components of other software

    vendors.

    Microsoft, Windows, Outlook, and PowerPoint are registered

    trademarks of Microsoft Corporation.

    IBM, DB2, DB2 Universal Database, OS/2, Parallel Sysplex,

    MVS/ESA, AIX, S/390, AS/400, OS/390, OS/400, iSeries,

    pSeries, xSeries, zSeries, z/OS, AFP, Intelligent Miner,

    WebSphere, Netfinity, Tivoli, and Informix are trademarks or

    registered trademarks of IBM Corporation in the United States

    and/or other countries.

    Oracle is a registered trademark of Oracle Corporation.

    UNIX, X/Open, OSF/1, and Motif are registered trademarks of

    the Open Group.

    Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame,

    VideoFrame, and MultiWin are trademarks or registered

    trademarks of Citrix Systems, Inc.

    HTML, XML, XHTML and W3C are trademarks or registeredtrademarks of W3C , World Wide Web Consortium,

    Massachusetts Institute of Technology.

    Java is a registered trademark of Sun Microsystems, Inc.

    JavaScript is a registered trademark of Sun Microsystems, Inc.,

    used under license for technology invented and implemented by

    Netscape.

    MaxDB is a trademark of MySQL AB, Sweden.

    SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver,

    and other SAP products and services mentioned herein as well as

    their respective logos are trademarks or registered trademarks of

    SAP AG in Germany and in several other countries all over the

    world. All other product and service names mentioned are the

    trademarks of their respective companies. Data contained in this

    document serves informational purposes only. National product

    specifications may vary.

    These materials are subject to change without notice. These

    materials are provided by SAP AG and its affiliated companies

    ("SAP Group") for informational purposes

    only, without representation or warranty of any kind, and SAP

    Group shall not be liable for errors or omissions with respect to

    the materials. The only warranties for SAP Group products and

    services are those that are set forth in the express warranty

    statements accompanying such products and services, if any.

    Nothing herein should be construed as constituting an additional

    warranty.

    Disclaimer

    Some components of this product are based on Java. Any code

    change in these components may cause unpredictable and severe

    malfunctions and is therefore expressively prohibited, as is any

    decompilation of these components.

    Any Java Source Code delivered with this product is only to be

    used by SAPs Support Services and may not be modified or

    altered in any way.

  • 8/10/2019 Creating Callable Objects Webdynpro

    3/16

    Ty p o g r a p h i c C o n v e n t i o n s

    Type Style Represents

    Example Text Words or characters quoted fromthe screen. These include fieldnames, screen titles,pushbuttons labels, menunames, menu paths, and menuoptions.

    Cross-references to otherdocumentation.

    Example text Emphasized words or phrases inbody text, graphic titles, andtable titles.

    EXAMPLE TEXT Technical names of systemobjects. These include reportnames, program names,transaction codes, table names,and key concepts of aprogramming language whenthey are surrounded by bodytext, for example, SELECT andINCLUDE.

    Example text Output on the screen. Thisincludes file and directory namesand their paths, messages,names of variables andparameters, source text, andnames of installation, upgradeand database tools.

    Example text Exact user entry. These arewords or characters that youenter in the system exactly asthey appear in thedocumentation.

    Variable user entry. Anglebrackets indicate that youreplace these words andcharacters with appropriateentries to make entries in thesystem.

    EXAMPLE TEXT Keys on the keyboard, forexample, F2 or ENTER .

    I c o n s

    Icon Meaning

    Caution

    Example

    Note

    Recommendation

    Syntax

  • 8/10/2019 Creating Callable Objects Webdynpro

    4/16

    ContentsScenario..................................................................................................................................... 2

    About This Document................................................................................................................ 2 General prerequisites ......................................................................................................... 2 Approaches to build up our model ..................................................................................... 2 Applicable Releases........................................................................................................... 2 Disclaimer........................................................................................................................... 2

    The Step By Step Solution ........................................................................................................ 3 Entering basic data............................................................................................................. 4 Adding form elements ........................................................................................................ 5

  • 8/10/2019 Creating Callable Objects Webdynpro

    5/16

    ScenarioWeb Dynpro Form Callable Objects make it possible to create forms within GuidedProcedures Design Time. In this simple example, a Time-off request form will be created.

    About This DocumentBy using a Web Dynpro Forms Callable Object, you can create simple screens without usinganything other than the Portal.

    General prerequisitesYou need to have CAF GP installed.

    Approaches to build up our modelYou are free to choose either the top-down approach and create the Process, Block, andAction and then insert a new callable object; or you can start with the callable object firstwithout having any other model item.

    Top-down approach

    In this case you create all the Design Time objects (Process, Block, and Action) that willmake use of this callable object beforehand.

    Bottom-up approach

    In this case you create the callable object first and insert it into the embedding Design Timeobjects later.

    Applicable Releases

    This tutorial is compatible with the following release Beginning with SAP NetWeaver 2004sSPS07.

    DisclaimerAny software coding and/or code lines / strings ("Code") included in this documentation areonly examples and are not intended to be used in a productive system environment. TheCode is only intended better explain and visualize the syntax and phrasing rules of certaincoding. SAP does not warrant the correctness and completeness of the Code given herein,and SAP shall not be liable for errors or damages caused by the usage of the Code, except ifsuch damages were caused by SAP intentionally or grossly negligent.

  • 8/10/2019 Creating Callable Objects Webdynpro

    6/16

    The Step By Step SolutionOpen your Enterprise Portal via http://:/irj/portal, navigate to tab GuidedProcedures and to tab Design Time .

    1. In the left You Can section of thescreen, choose Create CallableObject to open the Callable ObjectDesign Time.

  • 8/10/2019 Creating Callable Objects Webdynpro

    7/16

    Entering basic data1. In the first screen select the type of

    callable object: Web Dynpro Form .

    Enter the basic data for the callableobject:

    Name

    Description

    Language

    Location (Click the Choose button to select the folder for thelocation)

    Click Next .

    2. Now you can add and remove formelements.

    To add an element, click Add . Adrop-down list will appear where youcan select the type of form elementyou want to add.

    To remove an element, clickRemove. To remove a singleelement, first select it by clicking onits radio button on the left.

  • 8/10/2019 Creating Callable Objects Webdynpro

    8/16

    Adding form elements3. Try adding an input field by clicking

    Add , and then Add Input Field fromthe drop-down list.

    4. Fill the input fields as displayed tocreate a form element of typestring

    Notes:Read only: Indicates that this input fieldcannot be changed during runtime.

    Optional: indicates that the user candecide whether to give a value or notduring runtime.

    5. When completed, press Create .

  • 8/10/2019 Creating Callable Objects Webdynpro

    9/16

  • 8/10/2019 Creating Callable Objects Webdynpro

    10/16

    9. Fill the required fields as shown instep 7).

    10. To create the second form elementof type date repeat steps 8 and 9.

    11. The result so far should look likethis:

    12. Now try adding a Dropdown Field by

    clicking on Add , and then AddDropdown Field in the drop-downlist.

    13. Fill the input fields as shown:

  • 8/10/2019 Creating Callable Objects Webdynpro

    11/16

    14. To create new entries (value types)for the drop-down press Add Entry.

    15. Enter the data as displayed

    16. When completed, press Create , tocreate the form element.

    17. The result is should to be asdisplayed.

  • 8/10/2019 Creating Callable Objects Webdynpro

    12/16

    18. Try creating additional form elements based on the data provided below.

    Element ID Label Values

    Radio ButtonGroup

    paid Paid YES

    NO

    Checkbox

    Group

    approval Approval Required

    Button submit Submit -

    19. Press Add and select Add RadioButton Group from the menu bar.

    20. Enter the field displayed as shown.

    21. Press Add Entry to create theentries as shown for Radio ButtonID and Radio Button Label.

  • 8/10/2019 Creating Callable Objects Webdynpro

    13/16

    22. To create a check box group, pressAdd and select Add CheckboxGroup.

    23. Enter the field displayed as shown.

    24. Press Add Entry to create theentries shown for Checkbox ID andCheckbox Label

    25. Press Create.

    26. To create a Button, press Add andselect Add Button.

  • 8/10/2019 Creating Callable Objects Webdynpro

    14/16

    27. Enter the required fields and pressCreate.

    28. The resulting form should look likethis:

    Click Next to continue.

    29. Your Callable Object is nowcomplete. Click Finish and Open to

    save and open it. If you started withthe top-down approach, press theFinish button.

  • 8/10/2019 Creating Callable Objects Webdynpro

    15/16

    30. On the screen that appears, youcan test and activate your CallableObject.

    To test, click on the Test tab on thebottom pane.

    To activate click on the Activatebutton ( ).

  • 8/10/2019 Creating Callable Objects Webdynpro

    16/16

    www.sap.com/netw eaver