75
 How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial SAP DEVELOPER NETWORK  | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY  | bpx.sap.com © 2007 SAP AG 1 How-to-Guid e: Guid ed Procedu res fo r SAP NetWeaver 7.0- Java-VMware-Trial Summary The first part of the scenario shows the Guided Procedures in action. It’s about an employee’s first day in a company and how he is automatically guided through different sections of the Employee Self Services without having to rea d all the manuals first. The second part covers how to build up this process w ith the Guided Procedure Design-Time. The third part covers how to build the callable-objects used as UI in the process. These are Web Dynpros implemented as Development Components.  Au th or :  Alexander Bruch, Peder Helle Company: SAP AG, Germany Created on : 1 th  Februar, 2007

How-to-Guide - Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial.pdf

Embed Size (px)

Citation preview

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 1

    How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SummaryThe first part of the scenario shows the Guided Procedures in action. Its about an employees first day in acompany and how he is automatically guided through different sections of the Employee Self Serviceswithout having to read all the manuals first. The second part covers how to build up this process with theGuided Procedure Design-Time. The third part covers how to build the callable-objects used as UI in theprocess. These are Web Dynpros implemented as Development Components.

    Author: Alexander Bruch, Peder HelleCompany: SAP AG, GermanyCreated on: 1th Februar, 2007

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 2

    Table of ContentsOverview.....................................................................................................................................2

    Story Outline ...........................................................................................................................2Roles....................................................................................................................................... 2Users ......................................................................................................................................2Duration ..................................................................................................................................3

    Detailed Storyboard ....................................................................................................................4Guided Procedures Running My First Day ..........................................................................4Guided Procedures Building the Guided Procedures.............................................................7Guided Procedures Developing the Web Dynpro ................................................................ 22

    Copyright .................................................................................................................................. 74

    Overview

    Story OutlineThe first part of the scenario shows the Guided Procedures in action. Its about an employees first day in acompany and how he is automatically guided through different sections of the Employee Self Serviceswithout having to read all the manuals first.

    The second part covers how to build up this process with the Guided Procedure Design-Time.

    The third part covers how to build the callable-objects used as UI in the process. These are Web Dynprosimplemented as Development Components.

    Roles

    DESIGNATION NAME COMMENTS

    GP Developer CTB Administrator Enterprise portal user fordeveloping

    New Employee Miller, Jamie Used in different scenarios asend-user

    Users

    Predefined users Password Comments

    CTB_ADMIN sap123 Administrator for WebAS and EnterprisePortal used for design time anddevelopment purposes

    welcome1 SDM deployment from the IDE

    14132 sap123 User (Jamie Miller) for differentscenarios

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 3

    Duration

    DESCRIPTION

    Chapter 0: Running the Guided Procedure My First Day 10 min

    Chapter 0: Online designing a Guided Procedure 45 min

    Chapter 0: Online developing Web Dynpro Callable Objects (GP) 90 min

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 4

    Detailed Storyboard

    Guided Procedures Running My First DayThis demo serves as an entry point for the design and development documented in the next two chapters. Itdemonstrates how a employees first day in a company is made easier with the usage of Guided Proceduresas a user interface based process. Instead of navigating through different worksets within the portal (as withEmployee Self Service), the new employee is guided through all steps required to get up-to-speed quickly.

    This demo is identical to the demo part 1 of the document Demonstrating_CAF.

    Steps

    Log on to the portal as an administrator(CTB_ADMIN).

    Start a new Guided Procedure processby clicking on the link Start My FirstDay.

    Notice: In a productive system, thisprocess would be automaticallytriggered by a HR-system, e.g. at theday the employee joins the company.

    Notice: The second link Start My FirstDay (after) is a predefined processwhere all sessions in this documenthave already been implemented. Youcan use this in case you just want toshow the result.

    The new employee opens the portal andin the inbox sees all task waiting for him.One of the is the First Day GuidedProcedure.

    Log on to the portal as an employee(14132).

    Navigate to the workset Work.The Universal Work List (UWL) appearsand contains the current task for JamieMiller.To open the process, click on the linkWelcome to ITeLO.

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 5

    The employee is welcomed by a screentelling him the next steps and giving himbackground information on thecompany. All the personalizedinformation (name etc) are based on theuser information retrieved from theportal context. This means, when Jamieruns the process, the name of Jamie willbe displayed.

    Click on the button Start my first dayprocedure to continue.

    Jamie gets the information alreadystored in the HR system (which is basedon the data from his job application).Necessary changes to the data can bedone before confirming.

    Click on the button Confirm.

    Similar to the address data screen, thebank data is retrieved from the HRsystem and displayed. Again, changescan be made and confirmed.

    Click on the button Confirm.

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 6

    The Hardware Registration screen isdifferent from the other screen this isan entirely custom made applicationsince these information cannot be storedelsewhere (e.g. ERP). To Jamie this isjust another step in the process, though.The business case for the application isto make a self-assesment of all devicesand hardware handed out on the firstday. These data are stored in the CAFapplication itself.

    Jamie can add some new equipments,save and continue with the buttonComplete.

    Notice: The development scenario forthis application can be found in theHow-To-Guide for CAF Core.

    As part of the policy at ITeLO, Jamiehas to agree on the confidentialityobilgations. The agreement document isautomatically produced and filled withthe users name and displayed as anAdobe Interactive Form. Jamie can printout the formular, sign it and send it tothe HR department.One of the benefits of having this screenas part of the Guided Procedure is thatthe responsible manager now knowsthat all new employees must have seenthe agreement upon running theprocess. There is no way around bysaying Ive never seen that document,so I couldnt agree to it

    Proceed with the button Complete.

    Note: The adobe application might timeout the first time it is started after aserver restart. Click on the link in theactivities navigation (left side) to startagain. Eventually you will have to log offand on the portal and open the task inthe inbox again.

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 7

    The process has now been completed.

    Log off the portal.

    Guided Procedures Building the Guided ProceduresAfter you have demonstrated the result of a Guided Procedures a new employees first day you can usethe following section to demonstrate how such a process is build. The section concentrates on the first twosteps in the process the welcome-screen and the address-data screen. These two UIs are Web Dynprowith a so-called Guided Procedure Interface implementation, which makes it possible to use the input andoutput parameters from the Web Dynpro in Guided Procedure. Also, any actions (e.g. button-clicks) coulduse the Guided Procedure action context. This means, when clicking on a button you will not only executethe action of the Web Dynpro, but also e.g. complete a Guided Procedure step.

    How Web Dynpros are build is described in section 0. In this section you will use the already available WebDynpros.

    Recommendation: If you just want to show some small examples, you could create the callable objects andtest them. And after that, just take a brief look on the definitions of the actions, the block and the process.

    1.1.1 Building the Guided Procedures

    Log on to the Portal as anadministrator (CTB_ADMIN).

    Navigate to the Workset GuidedProcedures? Design Time and thento the folder CompositeToolBox.

    Proceed to the folder WorkArea.

    The subfolder are categorized in thegroups

    1. CallableObjects

    2. Actions

    3. Blocks

    4. Processes

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 8

    1.1.2 Creating Callable Objects

    The Guided Procedure is build bottom-up. You will start at the lowest level the Callable Objects and proceedupwards.

    Select the folder CallableObjectsand in the Gallery (to the left) selectCreate Callable Object.

    From the folder User Interface,select the type Web DynproComponent (GP Interface)

    and choose CO_Welcome as nameand description.

    Continue with Next

    In the list of Web Dynpros for GP,select com.sap.master.wd.firstday.WelcomeScreen.

    Continue with Next.

    Notice: If you would like to use yourown developed Web Dynpro, you cando so. Otherwise, be careful to useexactly this one!

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 9

    Confirm with Next on the next screen(Define Output), and Finish andOpen on the last screen.

    You have now defined a Web Dynprocallable object.

    You can now test the callable objectdirectly.

    Navigate to the tab Test on the loweriView and press Execute.

    Push the button Start my first dayprocedure and see what happens.

    The Web Dynpro returns the user-ID ofthe portal user.

    This ID is retrieved from the portalcontext and exposed as an outputparameter from the Web Dynpro. Thisparameter will be passed to the nextcallable object later in this section.

    The technical details on the WebDynpro are described in section 1.1.8.

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 10

    The callable object is now ready andmust be activated. Press the button

    .

    Return to the Gallery.

    Create another callable object of typeWeb Dynpro Component (GPinterface) with the nameCO_Address.

    Make sure the object is stored in thefolder CallableObjects.

    Select the Web Dynprocom.sap.master.firstdayaddress.AdressData.

    and continue with Next.

    Notice: If you would like to use yourown developed Web Dynpro, you cando so. Otherwise, be careful to useexactly this one!

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 11

    The next two screens show the inputand the output parameters. Confirmwith Next and Finish and Open.

    Again, you can test the object. Thistime you must create an inputparameter (the user-ID). PressCreate and enter 14132 in thevalue field. This is the new hireemployee user (refer to chapter 0).

    Later this input parameter will bemapped to the output of the previouscallable object.

    Execute the object and see whathappens.

    When executing the callable object,the Web Dynpro takes the parameteruserID, passes it to the backend (theHR System) via a Web Service anddisplays the result.

    Notice: Confirm does currently nothave any further functionality thancompleting the step, but could be usedfor sending the updated data back tothe HR system.

    Activate the callable object and returnthe the Gallery.

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 12

    Return to the Gallery.

    Create another callable object of typeWeb Dynpro Component (GPinterface) with the nameCO_BankData.

    Make sure the object is stored in thefolder CallableObjects.

    Select the Web Dynprocom.sap.master.firstdaybank.BankData.and continue with Next.

    Notice: If you would like to use yourown developed Web Dynpro, you cando so. Otherwise, be careful to useexactly this one!

    The next two screens show the inputand the output parameters. Confirmwith Next and Finish and Open.

    Again, you can test the object. Thistime you must create an inputparameter (the user-ID). PressCreate and enter 14132 in thevalue field. This is the new hireemployee user (refer to chapter 0).

    Later this input parameter will bemapped to the output of the previouscallable object.

    Execute the object and see whathappens.

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 13

    When executing the callable object,the Web Dynpro takes the parameteruserID, passes it to the backend (theHR System) via a Web Service anddisplays the result.

    Notice: Confirm does currently nothave any further functionality thancompleting the step, but could be usedfor sending the updated data back tothe HR system.

    Activate the callable object and returnthe the Gallery.

    You could continue to create Callable Objects using the Web Dynpro components for ConfidentialtyAgreement and so on.

    Please refer to the Master-folder for more detail (but do not change the settings here).

    1.1.3 Creating Actions

    The callable objects should now bewrapped into action objects. Select thefolder Actions and then selectCreate Action.

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 14

    Change the name of the action toWelcome to ITeLO.

    Insert the first callable object youcreated. Press the button

    .

    In the gallery, select from folderCompositeToolBox/WorkArea/CallableObjects the objectCO_Welcome.

    The result should look like thescreenshot to the right.

    Activate the action with the button

    .

    Proceed to the Gallery.

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 15

    Create another action. Change thename to Address Confirmation andinsert the callable objectCO_Address.

    Consult with the screenshot to theright.

    Activate and return to the gallery.

    Create another action. Change thename to Bankdata Confirmationand insert the callable objectCO_BankData.

    Consult with the screenshot to theright.

    Activate and return to the gallery.

    You could continue to create Actions using the Callable Objects Web Dynpro components forConfidentialty Agreement and so on.

    Please refer to the Master-folder for more detail (but do not change the settings here).

    1.1.4 Creating Blocks

    The actions will now be attached to ablock and the output parameter fromthe first action will be mapped to thesecond action.

    Select the folder Blocks and pressCreate Block in the gallery.

    Keep the default settings and pressCreate.

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 16

    Change the name of the block toWelcome and insert the threeactions youve created earlier.

    Notice: Select Welcome to ITeLOfirst to get the right sequence.

    Consult the screenshot to the right andsave the changes .

    To map the parameters from oneaction to another, navigate to the tabParameters.

    Select the (output) parameter for theaction Welcome userID and the(input) parameter for the actionAddress UserID (Notice theUppercase!).

    Important: It is not obvious from thisscreen which parameter is used for theinput of the Address Action. You willhave to look at the Action (or CallableObject) itself to find this out.

    Push Group.

    Change the name of the mappedparameter toMap_Welcome_Address.

    The result is now a mapping betweenthe two first actions in the GuidedProcedure; the output from theWelcome screen (the userID) ispassed to the input of Address Data.

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 17

    We have now to map the parametersfrom the action Welcome to theaction BankData.

    Select the (output) parameter for theaction Welcome userID and the(input) parameter for the actionBankData UserID (Notice theUppercase!).Push Group.

    Change the name of the mappedparameter toMap_Welcome_BankData.

    For each mapping, uncheck theExposed in and Exposed outcheckboxes.

    Activate and return to the gallery.

    1.1.5 Creating the Process

    The final step is to create the processitself.

    Select the folder Processes andfrom the gallery, press CreateProcess.

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 18

    Change to name to myFirstDay andinsert the block you created earlier(Welcome).

    Save the process:

    By now each action has a specific roleassigned to it. In our process we wouldlike to consolidate all actionsprocessed by one user (or role) intoone process role.

    Open the tab Roles.

    Select the role Processor ofAddress Confirmation and pushPropose Consolidation.

    Change the name of the Process Roleto Processor of Actions andconfirm with Go.

    Save the process:

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 19

    Some of the roles must have a defaultuser assigned. Open the tab Defaultroles.

    Add the user CTB_ADMIN to theroles Overseer, Administrator andOwner.

    Add the user 14132 (Miller, Jamie) tothe role Processor of Actions.

    Notice: The user 14132 is definedmanually in this scenario, but couldalso be filled in from the contextparameters.

    Save the process:

    Before you can activate the process,some instantiation parameters have tobe set.

    Navigate to the last tab Instantiationin the Process View.

    Check the option Process StartedAutomatically.

    Activate the process.

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 20

    After the activation, you can start theprocess directly from the Design Time.

    Again, navigate to the tabInstantiation.

    Check the option Start ProcessAutomatically.

    Click on Generate Instantiate URL.The result is showed in thescreenshot.

    You are now ready to start theprocess. Click on Open InstantiateApplication.

    1.1.6 Run the Guided Procedure

    A window will open telling you that theprocess has been started and is readyfor processing (by Jamie Miller).

    Notice: This is the way e.g. a HRsystem will trigger a process on aspecific date in this case on JamieMillers first day at ITeLO. There areseveral different options for this usingAPIs or Web Services. One solution isimplemented on the Startpage (in theworkset CompositeToolBox)triggering the Web Dynpro ApplicationAinstantiation.

    When Jamie Miller enters the portal,the process has already been started.

    Logon to the portal as Jamie Miller(user 14132).

    Navigate to the workset Work.The Universal Work List (UWL)appears and contains the current task

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 21

    for Jamie Miller.To open the process, click on the linkWelcome to ITeLO.

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 22

    Guided Procedures Developing the Web DynproThis section digs into the deep of implementing the UI for the Guided Procedure. It describes how you createa new development component (Web Dynpro project) with the Guided Procedure library references forCallable Objects.

    You do not need an access to the NWDI for this scenario since all references are already synchronized andready to use. The workaround for this can be found on SDN:https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/3895 (please notice: this blog is SP7!).

    If you would like to develop other components and therefore need the access to NWDI, you must registeryourself on the JDI Self Services page: https://nwdiss.wdf.sap.corp:10000/jss/servlet/JSS

    Tip: As this scenario uses the concept of the NWDI Life-Cycle Management actively, you may use this as anentry point for presentations on NWDI.

    The documentation assumes you will be working directly on the operating system all references thereforerefer to ivml2005.

    1.1.7 Step 1 Create the Web Dynpro Development Component

    Since the references are already included in theinstallation, you can start the development withcreating a new project.

    Open the perspective Web Dynpro.

    Create a new Development Component fromthe file menu New/Development ComponentProject.

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 23

    Select Local Development/MyComponentsand proceed with Next.

    Type in the name of the project:demo/wd/firstday.

    Select the Web Dynpro Type and press Next.

    Press Finish on the next screen.

    Notice: There is a project available calledmaster/wd/firstday, which is already deployedand used in the second scenario of thisdocument. You may use this as backup, butplease do not change it.

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 24

    Navigate to the folder DC metadata/DCDefinition/Used DCs and add the GuidedProcedure references (DCs) to your project byselecting the Add Used DC (right-mouseclick).

    Navigate to the compartment SAP-EU andadd the dependency for caf/eu/gp/api (PublicParts - external) with dependency typeDesign Time, Build Time and Run Time andthe qualifier weak.

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 25

    From the same compartment as above, add thedependency for caf/eu/gp/api/wd (PublicParts - GPWebDynproCO) with dependencytype Design Time, Build Time and Run Timeand the qualifier weak.

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 26

    From the compartment SAP-JEE, add thedependency for com.sap.security.api.sdawith dependency type Design Time, BuildTime and Run Time and the qualifier weak.

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 27

    The library reference must now be added to theproject select Properties.

    Go to Web Dynpro References/Libraryreferences and press add.

    Enter the library name caf/eu/gp/api andconfirm.

    The project has now been setup with allnecessary references needed for exposing theWeb Dynpro in a Guided Procedure.

    1.1.8 Step 2 Creating the Web Dynpro Component WelcomeScreen

    The first component to be created is thewelcome-screen for the new employee. Thiscomponent retrieves the user-data from theportal-context, displays the firstname in theview and outputs the user-id to be used laterin the Guided Procedure.

    Open the context menu and select CreateWeb Dynpro Component.

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 28

    Enter WelcomeScreen as name for thecomponent and com.sap.demo.wd.firstdayas package.

    Deselect the option Embed new View.

    Press Finish.

    Go to your newly created component, selectImplemented Interfaces , open the contextmenu and select Add.

    Select IGPWebDynproCO and confirm.

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 29

    Now it is time to implement the code for thecontroller of the interface. Open the contextmenu of Interface Controller and selectEdit.

    Open the tab page Context and add the newvalue attributes portalUserID andfirstName.

    This attribute portalUserID is used for readingthe user-id from the portal context and use thisinformation to retrieve data from the backendlater in the Guided Procedure.

    The attribute firstName is used forpersonalizing the welcome screen.

    To add a new method, open the tab pageMethods and add a new method of typeMethod. Name it complete and leave thereturn type void.

    Press Next and then Finish.

    This method will be use as action when theuser continues from the welcomeScreen,indicating that the step has been completed.

    Notice: The methods execute andgetDescription are inherited from the interfaceIWebDynproCO.

    Now comes the programming part.

    First open the Implementation tab.

    To accelerate the code-generation, paste the import-statements into the import-brackets (found on the top ofthe page).

    //@@begin importsimport com.sap.demo.wd.firstday.wdp.IPrivateWelcomeScreenInterface;import com.sap.caf.eu.gp.co.api.GPCallableObjectFactory;import com.sap.caf.eu.gp.co.api.GPWebDynproResourceAccessor;import com.sap.caf.eu.gp.co.api.IGPCOResultStateInfo;import com.sap.caf.eu.gp.co.api.IGPExecutionContext;import com.sap.caf.eu.gp.co.api.IGPTechnicalDescription;import com.sap.caf.eu.gp.exception.api.GPEngineException;import com.sap.caf.eu.gp.exception.api.GPInvocationException;import com.sap.caf.eu.gp.exception.api.GPTechnicalCallableObjectException;import com.sap.caf.eu.gp.structure.api.IGPAttributeInfo;import com.sap.caf.eu.gp.structure.api.IGPStructure;

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 30

    import com.sap.caf.eu.gp.structure.api.IGPStructureInfo;import com.sap.security.api.IUser;import com.sap.tc.logging.Category;import com.sap.tc.logging.Severity;import com.sap.tc.webdynpro.progmodel.api.IWDTextAccessor;import com.sap.tc.webdynpro.services.sal.um.api.IWDClientUser;import com.sap.tc.webdynpro.services.sal.um.api.WDClientUser;//@@end

    Now, you need to add a code-reference to the Guided Procedure Run-Time context.

    Navigate to the bottom of the code and add the private variable (see code on the right side).

    //@@begin othersprivate IGPExecutionContext executionContext;//@@end

    The method GetDescription returns technical descriptions of the callable object like input/output andconfiguration data. Enter the code to the right between the brackets:

    //@@begin getDescription()

    //@@end

    //@@begin getDescription()try {

    IWDTextAccessor textAccessor = wdComponentAPI.getTextAccessor();GPWebDynproResourceAccessor resourceAccessor = new GPWebDynproResourceAccessor(textAccessor);

    IGPTechnicalDescription technicalDescription =GPCallableObjectFactory.createTechnicalDescription(

    "CO_FirstDayEntryscreen","The first screen a new employee sees",resourceAccessor,locale);

    // Pre-existing input structure /* N O T U S E D H E R E */

    //Pre-existing structure for output parametersIGPStructureInfo output = technicalDescription.getOutputStructureInfo();

    //Create the attributes in the output structureIGPStructureInfo userStructure = output.addStructure("User");userStructure.addAttribute("userID", IGPAttributeInfo.BASE_STRING);

    //Result stateIGPCOResultStateInfo success = technicalDescription.addResultState("Success");

    success.setDescriptionKey("Success_desc");

    return technicalDescription;

    } catch (GPInvocationException e) {

    logger.logT(Severity.ERROR,Category.APPLICATIONS,"Incorrect technical name");

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 31

    logger.traceThrowableT(Severity.ERROR,"Exception while creating technical description: ",e);

    return null;}//@@end

    The method Execute implements functionality which runs at the startup of the component. In this scenario itretrieves the user data from the portal context.

    Enter the code to the right between the brackets:

    //@@begin execute()

    //@@end

    //@@begin execute()String userId = null;

    String firstName = null;

    IWDTextAccessor textAccessor = wdComponentAPI.getTextAccessor();

    GPWebDynproResourceAccessor resourceAccessor =

    new GPWebDynproResourceAccessor(textAccessor);

    this.executionContext = executionContext;

    //Process the input parameters

    /* N O T U S E D H E R E

    */

    //Retrieve user data from the UME (in the portal)

    IWDClientUser wdUser = WDClientUser.getLoggedInClientUser();

    IUser user = wdUser.getSAPUser();

    userId = user.getUniqueName();

    firstName = wdUser.getFirstName();

    wdContext.currentContextElement().setPortalUserID(userId);

    wdContext.currentContextElement().setFirstName(firstName);

    //Set the new values in the context

    /* N O T U S E D H E R E

    *///@@end

    The method Complete implements the functionality executed when the component is closing.

    In our case, this means filling the output parameters with the user-id and telling the GP-context that thecomponent (the step) has been completed within the process.

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 32

    Enter the code to the right between the brackets:

    //@@begin execute()

    //@@end

    //@@begin complete()IWDTextAccessor textAccessor = wdComponentAPI.getTextAccessor();GPWebDynproResourceAccessor resourceAccessor =

    new GPWebDynproResourceAccessor(textAccessor);

    try {IGPStructure output = executionContext.getOutputStructure();

    //Set the values of the output parametersIGPStructure user = output.addStructure("User");user.setAttributeValue(

    "userID",wdContext.currentContextElement().getPortalUserID());

    executionContext.setResultState("Success");

    executionContext.processingComplete();

    } catch (GPInvocationException e) {

    String localizedMessage =textAccessor.getText("ERROR_SETTING_PARAMETERS");

    wdThis.wdFireEventTechnicalException(new GPTechnicalCallableObjectException(logger, localizedMessage, e));

    } catch (GPEngineException e) {

    String localizedMessage = textAccessor.getText("INTERNAL_ERROR");

    wdThis.wdFireEventTechnicalException(new GPTechnicalCallableObjectException(logger, localizedMessage, e));

    }//@@end

    Next thing to do is to create the User Interface.

    Open the context menu from the node Viewsand select Create View.

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 33

    Name the view VWelcome and press finish.

    On the properties tab on the view, press addto define a controller for the view. This would bethe controller you implemented above, whichtakes care of handling data between the GuidedProcedure context and the Web Dynpro.

    Select WelcomeScreen (Web DynproComponent Interface Controller) and confirm.

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 34

    On the Actions tab, add a new action calledComplete and confirm with Finish (noparameters needed for this action).

    On the Implementation tab, navigate to themethod onActionComplete() and enter thecode to the right.

    //@@begin onActioncomplete(ServerEvent)wdThis.wdGetWelcomeScreenInterfaceController().complete();//@@end

    To be able to show the firstname of the portal-user, you must add a new value attribute to theview-context. Navigate to tab page Contextand add a new Value Attribute. Name itfirstName.

    The attribute from the Context-controller andthe view-controller now has to be mapped. Thisprovides the view with the data (the firstname)retrieved from the portal-context automatically.Whoever uses this process will see their ownfirstname in the welcome screen.

    Open the Data Modeler of the componentWelcomeScreen and double click on the datalink between the view VWelcome and theInterface Controller.

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 35

    Drag and drop the firstName node from theWelcomeScreenInterface to theVWelcome Context.

    Check the context element firstName andconfirm with OK.

    Confirm with Finish.

    Now you need to design the layout. Navigate tothe tab layout.

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 36

    Delete the DefaultTextView (context-menu? delete).Open the context menu onRootUIElementContainer and select InsertChild. Select the type Tray from the drop-down and press Finish.

    Enter the text Welcome to ITeLO as headerdescription of the tray (select Tray_Header,then property text).

    Change the width of the Tray to 400px.

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 37

    In the same way you added a tray, add threeTextView and a button as a child of thetray.

    For the first TextView enter Dear as value fortext.

    For the second TextView press the buttonto select the context value attribute firstNameas value for text (see screenshot to the right).

    For the third TextView enter On behalf ofITeLO, congratulations on your new position.as value for text.

    For the button: enter Start my first dayprocedure as text.

    The view should now look similar to thescreenshot on the right.

    To attach an action to the button, selectComplete from the drop-down list.

    To be able to see the component view as acallable object, the view must be embeddedinto a window.

    From the context-menu of the WindowWebDynproCO, select Embed View.Notice: Do not select the WelcomeScreen,the WebDynproCO is the window used for the

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 38

    Guided Procedure!

    Select Embed existing View.

    Select the view you created earlier VWelcome and confirm with Finish.

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 39

    The component is now ready to be build anddeployed. Select Build from the context menuof the Development Component.

    Notice: Do not use the Build-entry from theproject since the development component willnot automatically be build!

    If no error occurs in the task pane, deploy thecomponent to the server (otherwise, reviewyour coding). If requested, enter the passwordfor the Software Deployment Manager - SDM(see also chapter 0).

    Notice: If the IDE asks you to enable autobild,do so. Eventually you will have to repeat thedeployment.

    The component is now ready for use. You cantest it in the Guided Procedure Design Time asa callable object (see chapter 1.1.2 in thisdocument).

    1.1.9 Step 3 Creating the Web Dynpro Component Address Data

    The second component to be created is theview for the new employees address data. Theuser-id retrieved in the first component ispassed to the component and used asparameter for accessing the data in the HRsystem. The access is implemented as anEnterprise Service (Web Service).

    Notice: This component only retrieves data fromthe backend, but doesnt make any changes toit. This is done for simplicity reasons and foravoiding status-changes in the backend.

    Open the context menu and select Create WebDynpro Component

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 40

    Enter AddressData as name for thecomponent andcom.sap.demo.wd.firstdayaddress aspackage.

    Deselect the option Embed new View.

    Press Finish.

    To get an access to the HR System, you willnow create a model from a WSDL-file, whichcontains the information about the availableWebService.

    Navigate to the node Model and right-click onCreate Model.

    Select Import Adaptive Web Service Modeland continue with Next.

    The name of the Model should beEmployeeAddressData.

    The package:com.sap.demo.wd.firstdayaddress.model

    Select WSDL Source: Local File System orURL

    Continue with Next.

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 41

    Select the Use destinations for metadata andexecution option and enterFIRSTDAY_WS_METADATA_DEST for thename of the Metadata destination andFIRSTDAY _WS_EXECUTION_DEST for thename of the Execution destination.

    Continue with Next.

    Enter the URL:

    http://ivml2005:50000/EmployeeAddressData/Config1?wsdl

    And indicate ctb_admin with passwordsap123.

    Confirm all following screens and reload theproject (Right click on the project and selectReload).

    The Web Service proxy has now beengenerated.

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 42

    The next step consists in creating thecorresponding entries for the logicaldestinations. Open the Visual Administrator(click on the appropriate link of the start pageyou can find at http://ivml2005).Go to service Web Services Security of theserver node and create a destination within theDynamic WS Proxies folder within tabRuntime.

    Enter the nameFIRSTDAY_WS_METADATA_DEST.

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 43

    In the connection settings, enterhttp://ivml2005:50000/inspection.wsil in theURL field. Choose BASIC authentication andprovide the user name ctb_admin and thepassword sap123.

    Create another destination and enter the nameFIRSTDAY_WS_EXECUTION_DEST.

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 44

    In the URL field , enter http://ivml2005:50000and provide the same BASIC authentication.

    Save all configurations.

    Notice: This web service can be tested from the WSNavigator. To do so, open the urlhttp://ivml2005:50000/wsnavigator/enterwsdl.html.(or click on the appropriate link of the start page athttp://ivml2005.wdf.sap.corp)and paste the URL of the WSDL into the input field.

    The user for accessing the backend is found in the chapter 0.

    IMPORTANT:

    The Web Service is secured with http- authentication. Please be aware that using Adaptive Web ServiceModel or similar, these may be configurable.

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 45

    Go to your newly created componentAddressData, select Used Models, open thecontext menu and select Add.

    Select the Model EmployeeAddressData andconfirm with OK.

    A reference to the model has now been addedto the component.

    Select Implemented Interfaces , open thecontext menu and select Add.

    Select IGPWebDynproCO and confirm.

    As in the WelcomeScreen, implement the codefor the controller of the interface. Open thecontext menu of Interface Controller andselect Edit.

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 46

    Open the Data Modeler of the componentAddressData and create a data link from theInterface Controller to the modelEmployeeAddressData.Drag and drop the request model classes fromthe model context (EmployeeAddressData)on the left to the controller context(AddressDataInterface) on the right.

    The Edit Context mapping wizard now appears.

    Check the following context elements to bemapped to the input and output of the WebService call :

    - Personalid

    - City

    - FaxNo

    - PostalCityCode

    - StreetAndHouseNo

    - TelephoneNoRename the context node Response inResponse _GetAddressByPersonalID_R.Confirm with OK.

    Confirm with Finish.

    Then open the tab page Context and add thefollowing new value attributes :

    - firstName

    - HRMessage

    - lastName

    - personalID

    - portalUserID

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 47

    Add a new method of type Method. Name itcomplete and leave the return type void.

    This method will be use as action when theuser continues from the addressdata screen,indicating that the step has been completed.

    Now comes the programming part.

    First open the Implementation tab.

    To accelerate the code-generation, paste the following import-statements into the import-brackets (found onthe top of the page).

    //@@begin importsimport com.sap.demo.wd.firstdayaddress.wdp.IPrivateAddressDataInterface;import com.sap.caf.eu.gp.co.api.GPCallableObjectFactory;import com.sap.caf.eu.gp.co.api.GPWebDynproResourceAccessor;import com.sap.caf.eu.gp.co.api.IGPCOResultStateInfo;import com.sap.caf.eu.gp.co.api.IGPExecutionContext;import com.sap.caf.eu.gp.co.api.IGPTechnicalDescription;import com.sap.caf.eu.gp.exception.api.GPEngineException;import com.sap.caf.eu.gp.exception.api.GPInvocationException;import com.sap.caf.eu.gp.exception.api.GPTechnicalCallableObjectException;import com.sap.caf.eu.gp.structure.api.IGPAttributeInfo;import com.sap.caf.eu.gp.structure.api.IGPStructure;import com.sap.caf.eu.gp.structure.api.IGPStructureInfo;import com.sap.demo.wd.firstdayaddress.model.EmployeeAddressData;import com.sap.demo.wd.firstdayaddress.model.GetAddressByPersonalID_R;import com.sap.demo.wd.firstdayaddress.model.Request_GetAddressByPersonalID_R;import com.sap.security.api.IUser;import com.sap.security.api.IUserFactory;import com.sap.security.api.UMException;import com.sap.security.api.UMFactory;import com.sap.tc.logging.Category;import com.sap.tc.logging.Severity;import com.sap.tc.webdynpro.progmodel.api.IWDTextAccessor;//@@end

    Now, you need to add a code-reference to the Guided Procedure Run-Time context and to declare a membervariable for model instance of type EmployeeAddressData.

    Navigate to the bottom of the code and add the private variable (see code below).

    //@@begin others// Code-reference to the Guided Procedure Run-Time contextprivate IGPExecutionContext executionContext;// Model instanceprivate EmployeeAddressData model;//@@end

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 48

    The method wdDoInit creates explicitly a new Adaptive Web Service model instance and the Model ObjectGraph, and bind the executable Model Object to the Context.

    Enter the code to the right between the brackets:

    //@@begin wdDoInit()

    //@@end

    //@@begin wdDoInit()// create new model instancemodel = new EmployeeAddressData();// create new model objectsRequest_GetAddressByPersonalID_R requestMO = new Request_GetAddressByPersonalID_R(model);GetAddressByPersonalID_R emplMO = new GetAddressByPersonalID_R(model);// associate model objectsrequestMO.setGetAddressByPersonalID_R(emplMO);// bind executable model object to context nodewdContext.nodeRequest_GetAddressByPersonalID_R().bind(requestMO);//@@end

    The method GetDescription returns technical descriptions of the callable object like input/output andconfiguration data.

    Enter the code to the right between the brackets:

    //@@begin getDescription()

    //@@end

    //@@begin getDescription()try {

    IWDTextAccessor textAccessor = wdComponentAPI.getTextAccessor();GPWebDynproResourceAccessor resourceAccessor =

    new GPWebDynproResourceAccessor(textAccessor);

    IGPTechnicalDescription technicalDescription =GPCallableObjectFactory.createTechnicalDescription(

    "CO_FirstDayAddressScreen","The address screen for new employee",resourceAccessor,locale);

    // Pre-existing input structureIGPStructureInfo input = technicalDescription.getInputStructureInfo();IGPStructureInfo userInputStructure = input.addStructure("User");IGPAttributeInfo userId = userInputStructure.addAttribute("UserID", IGPAttributeInfo.BASE_STRING);userId.setMultiplicity(IGPAttributeInfo.MULITIPLICITY_1_1);

    //Pre-existing structure for output parametersIGPStructureInfo output = technicalDescription.getOutputStructureInfo();

    //Create the attributes in the output structureIGPStructureInfo userStructure = output.addStructure("User");userStructure.addAttribute("result", IGPAttributeInfo.BASE_STRING);

    //Result stateIGPCOResultStateInfo success =

    technicalDescription.addResultState("Success");

    success.setDescriptionKey("Success_desc");

    return technicalDescription;

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 49

    } catch (GPInvocationException e) {

    logger.logT(Severity.ERROR,Category.APPLICATIONS,"Incorrect technical name");

    logger.traceThrowableT(Severity.ERROR,"Exception while creating technical description: ",e);

    return null;}

    //@@end

    The method Execute implements functionality which runs at the startup of the component. In this scenario itretrieves the user data from the portal context.

    Enter the code between the brackets:

    //@@begin execute()

    //@@end

    //@@begin execute()

    IWDTextAccessor textAccessor = wdComponentAPI.getTextAccessor();

    GPWebDynproResourceAccessor resourceAccessor = new GPWebDynproResourceAccessor(textAccessor);

    try {

    String userId = null;

    String lastName = "";

    String firstName = "";

    String personalID = "";

    String hrMessage = "";

    this.executionContext = executionContext;

    //Process the input parameters

    IGPStructure input = executionContext.getInputStructure();

    IGPStructure inputStructure = input.getStructure("User");

    userId = (String)inputStructure.getAttributeAsString("UserID");

    wdContext.currentContextElement().setPortalUserID(userId);

    // Get some additional infos from the portal (they should actually

    // have been send as parameter from the first screen or retrieved from the backend system)

    try {

    IUserFactory factory = UMFactory.getUserFactory();

    IUser user = factory.getUserByLogonID(userId);

    lastName = user.getLastName();

    firstName = user.getFirstName();

    } catch (UMException e) {

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 50

    lastName = e.getMessage();

    firstName = e.getMessage();

    }

    //Retrieve ADDRESS DATA from the HR System

    try {

    // set input parameter for the Web Service call

    wdContext.currentRequest_GetAddressByPersonalID_RElement().modelObject().getGetAddressByPersonalID_R().setPersonalid(userId);

    // Web service call

    wdContext.currentRequest_GetAddressByPersonalID_RElement().modelObject().execute();

    // invalidate the model node Response_GetAddressByPersonalID_R contained as an inner node below the nodeRequest_GetAddressByPersonalID_R

    wdContext.nodeResponse_GetAddressByPersonalID_R().invalidate();

    } catch (Exception e) {

    //FOR DEBUGGING!!

    hrMessage = e.toString() + " User not found in HR: " + e.getMessage();

    // OFFLINE

    /*

    String streetNr = "Riddergatan 8";

    String postalCode = "SE-102 45";

    String city = "Stockholm";

    String country = "Sweden";

    String phone = "+46 8 877 9874";

    String fax = "";

    personalID = "568975";

    */

    }

    personalID = userId;

    //Set the new values in the context

    wdContext.currentContextElement().setAttributeValue(

    "lastName",

    lastName);

    wdContext.currentContextElement().setAttributeValue(

    "firstName",

    firstName);

    wdContext.currentContextElement().setAttributeValue(

    "personalID",

    personalID);

    wdContext.currentContextElement().setAttributeValue(

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 51

    "HRMessage",

    hrMessage);

    } catch (GPInvocationException e) {

    String localizedMessage =

    textAccessor.getText("ERROR_GETTING_PARAMETERS");

    wdThis.wdFireEventTechnicalException(

    new GPTechnicalCallableObjectException(logger, localizedMessage, e));

    } catch (Exception e) {

    String localizedMessage =

    textAccessor.getText("UNDEFINED ERROR");

    wdThis.wdFireEventTechnicalException(

    new GPTechnicalCallableObjectException(logger, localizedMessage, e));

    }

    //@@end

    The method Complete implements the functionality executed when the component is closing.

    Enter the code to between the brackets:

    //@@begin complete()

    //@@end

    //@@begin complete()IWDTextAccessor textAccessor = wdComponentAPI.getTextAccessor();GPWebDynproResourceAccessor resourceAccessor =

    new GPWebDynproResourceAccessor(textAccessor);

    try {String result = "Address data has been changed";

    String userId = "";

    IGPStructure output = executionContext.getOutputStructure();

    //Set the values of the output parameters // NOTE: SIMULATION of ADDRESS UPDATING!!

    userId = wdContext.currentContextElement().getPortalUserID();

    if (userId != null){

    if (userId.equals("User not found in HR")){

    result = "Data not changed";

    }

    }

    IGPStructure user = output.addStructure("User");user.setAttributeValue(

    "result",result);

    executionContext.setResultState("Success");executionContext.processingComplete();

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 52

    } catch (GPInvocationException e) {

    String localizedMessage =textAccessor.getText("ERROR_SETTING_PARAMETERS");

    wdThis.wdFireEventTechnicalException(new GPTechnicalCallableObjectException(logger, localizedMessage, e));

    } catch (GPEngineException e) {

    String localizedMessage = textAccessor.getText("INTERNAL_ERROR");

    wdThis.wdFireEventTechnicalException(new GPTechnicalCallableObjectException(logger, localizedMessage, e));

    } //@@end

    Next thing to do is to create the User Interface.

    Open the context menu and select Create View.

    Name the view VAddress and press Finish.

    On the properties tab on the view, press addto define a controller for the view. This would bethe controller you implemented above, whichtakes care of handling data between the GuidedProcedure context and the Web Dynpro.

    Select AddressData (Web Dynpro ComponentInterface Controller) and confirm.

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 53

    On the Actions tab, add a new action calledComplete and confirm with Finish (noparameters needed for this action).

    On the implementation tab, navigate to the method onActionComplete() and enter the code below.

    //@@begin onActioncomplete(ServerEvent) wdThis.wdGetAddressDataInterfaceController().complete(); //@@end

    In the Data Modeler tool, double-click on thelink between the view and the interfacecontroller. In the Edit Context Mapping wizard,drag and drop the request classes from theinterface controller AddressDataInterface onthe left to the context of the view VAddress.

    Check all the attributes of the Response nodeand confirm with OK.

    Do the same for the context attributes.

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 54

    Confirm with Finish.

    Now you need to design the layout. Navigate tothe tab layout.

    Delete the DefaultTextView (context-menu? delete).Open the context menu onRootUIElementContainer and select InsertChild. Select the type Tray from the drop-down and press Finish.

    Enter the text Address Details as headerdescription of the tray (select Tray_Header,then property text).

    Change the width of the Tray to 400px.

    To avoid implementing all the elements, youcan copy the layout from the master-project.

    Go to the bottom tab Navigator and open theproject

    LocalDevelopment~master~wd~firstday~sap.com.

    Go back to the Web Dynpro Explorer.

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 55

    Scroll down to the view VAddress and open itwith Edit.

    Copy the following elements :

    Paste them to your project.

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 56

    Unfortunately, not all elements are copiedcorrectly. You should therefore probablyrename some TransparentContainer like inthe picture on the right.

    You should also enter the context-attribute inthe property value (like you did inWelcomeScreen) for all InputFields.

    (Do not forget the message attribute)

    To attach an action to the button, selectComplete from the drop-down list (like youdid in WelcomeScreen).

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 57

    The view should now look like this:

    To be able to see the component view as acallable object, the view must be embeddedinto a window.

    From the context-menu of the WindowWebDynproCO, select Embed View.

    Notice: Do not select the AddressData, theWebDynproCO is the window used for theGuided Procedure!

    Select Embed existing View.

    Select the view you created earlier VAddress and confirm with Finish.

    Do not forget the close the master-project(the one you copied the elements from)!

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 58

    Your component is now ready to be build anddeployed. Select Build from the context menuof the Development Component.

    Notice: Do not use the Build-entry from theproject since the development component willnot automatically be build!

    If no error occurs in the task pane, deploy thecomponent to the server (otherwise, reviewyour coding). If requested, enter the passwordfor the Software Deployment Manager - SDM(please see chapter 0).

    Notice: If the IDE asks you to enable autobild,do so. Eventually you will have to repeat thedeployment.

    The component is now ready for use. You cantest it in the Guided Procedure Design Time asa callable object (see chapter 0 in thisdocument).

    1.1.10 Step 4 Creating the Web Dynpro Component Bank Data

    The third component to be created is the viewfor the new employees bank data. The user-idretrieved in the AddressData component ispassed to the component and used asparameter for accessing the data in the HRsystem. The access is implemented as anEnterprise Service (Web Service).

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 59

    Notice: This component only retrieves data fromthe backend, but doesnt make any changes toit. This is done for simplicity reasons and foravoiding status-changes in the backend.

    Open the context menu and select Create WebDynpro Component.

    Enter BankData as name for the componentand com.sap.demo.wd.firstdaybank aspackage.

    Deselect the option Embed new View.Press Finish.

    To get an access to the HR System, you willnow create a model from a WSDL-file, whichcontains the information about the availableWebService.

    Navigate to the node Model and right-click onCreate Model.

    Select Import Adaptive Web Service Modeland continue with Next.

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 60

    The name of the Model should beEmployeeBankData.

    The package:com.sap.demo.wd.firstdaybank.model

    Select WSDL Source: Local File System orURL

    Continue with Next.

    Select the Use destinations for metadata andexecution option and enterFIRSTDAY_WS_METADATA_DEST for thename of the Metadata destination andFIRSTDAY _WS_EXECUTION_DEST for thename of the Execution destination.

    (We use the same logical destinations as forthe AddressData component)

    Continue with Next.

    Enter the URL:

    http://ivml2005:50000/EmployeeBankData/Config1?wsdl.

    And indicate ctb_admin with passwordsap123.

    Confirm all following screens and reload theproject (Right click on the project and selectReload).

    The Web Service proxy has now beengenerated.

    Notice: This web service can be tested from the WSNavigator. To do so, open the urlhttp://ivml2005:50000/wsnavigator/enterwsdl.html.(or click on the appropriate link on the start page athttp://ivml2005)and paste the URL of the WSDL into the inputfield.

    The user for accessing the backend is found in the chapter 0.

    IMPORTANT:

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 61

    The Web Service is secured with http- authentication. Please be aware that using Adaptive Web ServiceModel or similar, these may be configurable.

    Go to your newly created componentBankData, select Used Models, open thecontext menu and select Add.

    Select the Model EmployeeBankData andconfirm with OK.

    A reference to the model has now been addedto the component.

    Select Implemented Interfaces , open thecontext menu and select Add

    Select IGPWebDynproCO and confirm.

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 62

    As in the previous components, implement thecode for the controller of the interface. Open thecontext menu of Interface Controller andselect Edit.

    Open the Data Modeler of the componentBankData and create a data link from theInterface Controller to the modelEmployeeBankData.Drag and drop the request model classes fromthe model context (EmployeeBankData) onthe left to the controller context(BankDataInterface) on the right.

    The Edit Context mapping wizard now appears.Check the following context elements to bemapped to the input and output of the WebService call :

    - Personalid

    - AccountNo

    - BankCountry

    - BankCodeNumber

    - BankCurrency

    - PaymentMethodRename the context node Response inResponse_GetBankAccountByPersonalID_R.Confirm with OK.

    Confirm with Finish.

    Then open the tab page Context and add thefollowing new value attributes :

    - HRMessage

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 63

    - portalUserID

    Add a new method of type Method. Name itcomplete and leave the return type void.

    This method will be use as action when theuser continues from the addressdata screen,indicating that the step has been completed.

    Now comes the programming part.

    First open the Implementation tab.

    To accelerate the code-generation, paste the following import-statements into the import-brackets (found onthe top of the page).

    //@@begin importsimport com.sap.caf.eu.gp.co.api.GPCallableObjectFactory;

    import com.sap.caf.eu.gp.co.api.GPWebDynproResourceAccessor;

    import com.sap.caf.eu.gp.co.api.IGPCOResultStateInfo;

    import com.sap.caf.eu.gp.co.api.IGPExecutionContext;

    import com.sap.caf.eu.gp.co.api.IGPTechnicalDescription;

    import com.sap.caf.eu.gp.exception.api.GPEngineException;

    import com.sap.caf.eu.gp.exception.api.GPInvocationException;

    import com.sap.caf.eu.gp.exception.api.GPTechnicalCallableObjectException;

    import com.sap.caf.eu.gp.structure.api.IGPAttributeInfo;

    import com.sap.caf.eu.gp.structure.api.IGPStructure;

    import com.sap.caf.eu.gp.structure.api.IGPStructureInfo;

    import com.sap.demo.wd.firstdaybank.wdp.IPrivateBankDataInterface;

    import com.sap.tc.logging.Category;

    import com.sap.tc.logging.Severity;

    import com.sap.tc.webdynpro.progmodel.api.IWDTextAccessor;//@@end

    Now, you need to add a code-reference to the Guided Procedure Run-Time context and to declare a member

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 64

    variable for model instance of type EmployeeBankData.

    Navigate to the bottom of the code and add the private variable (see code below).

    //@@begin others// Code-reference to the Guided Procedure Run-Time contextprivate IGPExecutionContext executionContext;// model instanceprivate EmployeeBankData model;//@@end

    The method wdDoInit creates explicitly a new Adaptive Web Service model instance and the Model ObjectGraph, and bind the executable Model Object to the Context.

    Enter the code to the right between the brackets:

    //@@begin wdDoInit()

    //@@end

    //@@begin wdDoInit() // create new model instance

    model = new EmployeeBankData(); // create new model objects

    Request_GetBankAccountByPersonalID_R requestMO = new Request_GetBankAccountByPersonalID_R(model);GetBankAccountByPersonalID_R emplMO = new GetBankAccountByPersonalID_R(model);

    // associate model objectsrequestMO.setGetBankAccountByPersonalID_R(emplMO);

    // bind executable model object to context nodewdContext.nodeRequest_GetBankAccountByPersonalID_R().bind(requestMO);

    //@@end

    The method GetDescription returns technical descriptions of the callable object like input/output andconfiguration data.

    Enter the code to the right between the brackets:

    //@@begin getDescription()

    //@@end

    //@@begin getDescription()try {

    IWDTextAccessor textAccessor = wdComponentAPI.getTextAccessor();GPWebDynproResourceAccessor resourceAccessor =

    new GPWebDynproResourceAccessor(textAccessor);

    IGPTechnicalDescription technicalDescription =GPCallableObjectFactory.createTechnicalDescription(

    "CO_FirstDayBankScreen","The Bank data screen for new employee",resourceAccessor,locale);

    // Pre-existing input structureIGPStructureInfo input = technicalDescription.getInputStructureInfo();

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 65

    IGPStructureInfo userInputStructure = input.addStructure("User");IGPAttributeInfo userId = userInputStructure.addAttribute("UserID", IGPAttributeInfo.BASE_STRING);userId.setMultiplicity(IGPAttributeInfo.MULITIPLICITY_1_1);

    //Pre-existing structure for output parametersIGPStructureInfo output = technicalDescription.getOutputStructureInfo();

    //Create the attributes in the output structureIGPStructureInfo userStructure = output.addStructure("User");userStructure.addAttribute("result", IGPAttributeInfo.BASE_STRING);

    //Result stateIGPCOResultStateInfo success =

    technicalDescription.addResultState("Success");

    success.setDescriptionKey("Success_desc");

    return technicalDescription;

    } catch (GPInvocationException e) {

    logger.logT(Severity.ERROR,Category.APPLICATIONS,"Incorrect technical name");

    logger.traceThrowableT(Severity.ERROR,"Exception while creating technical description: ",e);

    return null;}

    //@@end

    The method Execute implements functionality which runs at the startup of the component. In this scenario itretrieves the user data from the portal context.

    Enter the code between the brackets:

    //@@begin execute()

    //@@end

    //@@begin execute()

    IWDTextAccessor textAccessor = wdComponentAPI.getTextAccessor();GPWebDynproResourceAccessor resourceAccessor = new GPWebDynproResourceAccessor(textAccessor);

    try { String userId = null; String hrMessage = "";

    this.executionContext = executionContext;

    //Process the input parameters IGPStructure input = executionContext.getInputStructure(); IGPStructure inputStructure = input.getStructure("User"); userId = (String)inputStructure.getAttributeAsString("UserID");

    wdContext.currentContextElement().setPortalUserID(userId);

    //Retrieve BANK DATA from the HR Systemtry {

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 66

    // set input parameter for the Web Service call wdContext.currentRequest_GetBankAccountByPersonalID_RElement().modelObject().getGetBankAccountByPersonalID_R().setPersonalid(userId);

    // Web service call wdContext.currentRequest_GetBankAccountByPersonalID_RElement().modelObject().execute();

    // invalidate the model node Response_GetBankAccountByPersonalID_R contained as an inner node below the nodeRequest_GetBankAccountByPersonalID_R wdContext.nodeResponse_GetBankAccountByPersonalID_R().invalidate();

    } catch (Exception e) {// FOR DEBUGGING!!

    hrMessage = "Bankdata for: "+userId+" not found in HR: " + e.getMessage(); }

    //Set the new values in the context wdContext.currentContextElement().setAttributeValue(

    "HRmessage", hrMessage);

    } catch (GPInvocationException e) {

    String localizedMessage = textAccessor.getText("ERROR_GETTING_PARAMETERS"); wdThis.wdFireEventTechnicalException(

    new GPTechnicalCallableObjectException(logger, localizedMessage, e));

    } catch (Exception e) {

    String localizedMessage = textAccessor.getText("UNDEFINED ERROR"); wdThis.wdFireEventTechnicalException(

    new GPTechnicalCallableObjectException(logger, localizedMessage, e));}//@@end

    The method Complete implements the functionality executed when the component is closing.

    Enter the code to between the brackets:

    //@@begin complete()

    //@@end

    //@@begin complete()IWDTextAccessor textAccessor = wdComponentAPI.getTextAccessor();GPWebDynproResourceAccessor resourceAccessor =

    new GPWebDynproResourceAccessor(textAccessor);

    try {String result = "Bank data has been changed";String userId = "";

    IGPStructure output = executionContext.getOutputStructure();

    // Set the values of the output parameters // NOTE: SIMULATION of BANK UPDATING!!

    IGPStructure user = output.addStructure("User");user.setAttributeValue(

    "result",result);

    executionContext.setResultState("Success");executionContext.processingComplete();

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 67

    } catch (GPInvocationException e) {

    String localizedMessage =textAccessor.getText("ERROR_SETTING_PARAMETERS");

    wdThis.wdFireEventTechnicalException(new GPTechnicalCallableObjectException(logger, localizedMessage, e));

    } catch (GPEngineException e) {

    String localizedMessage = textAccessor.getText("INTERNAL_ERROR");

    wdThis.wdFireEventTechnicalException(new GPTechnicalCallableObjectException(logger, localizedMessage, e));

    }//@@end

    Next thing to do is to create the User Interface.

    Open the context menu and select CreateView.

    Name the view VBank and press Finish.

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 68

    On the properties tab on the view, press addto define a controller for the view. This would bethe controller you implemented above, whichtakes care of handling data between the GuidedProcedure context and the Web Dynpro.

    Select BankData (Web Dynpro ComponentInterface Controller) and confirm.

    On the Actions tab, add a new action calledComplete and confirm with Finish (noparameters needed for this action).

    On the implementation tab, navigate to themethod onActionComplete() and enter thecode on the right.

    //@@begin onActioncomplete(ServerEvent)wdThis.wdGetBankDataInterfaceController().complete();//@@end

    In the Data Modeler tool, double-click on thelink between the view and the interfacecontroller. In the Edit Context Mapping wizard,drag and drop the request classes from theinterface controller BankDataInterface on theleft to the context of the view VBank.

    Check all the attributes of the Response nodeand confirm with OK.

    Do the same for the context attribute

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 69

    HRmessage.

    Confirm with Finish.

    Now you need to design the layout. Navigate tothe tab layout.

    Delete the DefaultTextView (context-menu? delete).Open the context menu onRootUIElementContainer and select InsertChild. Select the type Tray from the drop-down and press Finish.

    Enter the text Bank Details as headerdescription of the tray (select Tray_Header,then property text).

    Change the width of the Tray to 400px.

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 70

    To avoid implementing all the elements, youcan copy the layout from the master-project.

    Go to the bottom tab Navigator and open theproject

    LocalDevelopment~master~wd~firstday~sap.com.

    Go back to the Web Dynpro Explorer.Scroll down to the view VBank and open itwith Edit.

    Copy the following elements :

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 71

    Paste them to your project.

    Unfortunately, not all elements are copiedcorrectly. You should therefore enter thecontext-attribute in the property value (likeyou did for the previous components) for allInputFields.

    (Do not forget the HRmessage attribute)

    To attach an action to the button, selectComplete from the drop-down list (like youdid in the previous components).

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 72

    The view should now look like this:

    To be able to see the component view as acallable object, the view must be embeddedinto a window.

    From the context-menu of the WindowWebDynproCO, select Embed View.

    Notice: Do not select the BankData, theWebDynproCO is the window used for theGuided Procedure!

    Select Embed existing View.

    Select the view you created earlier VBank and confirm with Finish.

    Do not forget the close the master-project(the one you copied the elements from)!

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 73

    Your component is now ready to be build anddeployed. Select Build from the context menuof the Development Component.

    Notice: Do not use the Build-entry from theproject since the development component willnot automatically be build!

    If no error occurs in the task pane, deploy thecomponent to the server (otherwise, reviewyour coding). If requested, enter the passwordfor the Software Deployment Manager - SDM(please see chapter 0).

    Notice: If the IDE asks you to enable autobild,do so. Eventually you will have to repeat thedeployment.

    The component is now ready for use. You cantest it in the Guided Procedure Design Time asa callable object (see chapter 0 in thisdocument).

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 74

    Copyright Copyright 2007 SAP AG. All rights reserved.No part of this publication may be reproduced or transmitted in any form or for any purpose without theexpress 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 componentsof 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,Informix, i5/OS, POWER, POWER5, OpenPower and PowerPC are trademarks or registered trademarks ofIBM Corporation.Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or registered trademarks ofAdobe Systems Incorporated 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 orregistered trademarks of Citrix Systems, Inc.HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide WebConsortium, 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 inventedand 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 servicesmentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG inGermany and in several other countries all over the world. All other product and service names mentionedare the trademarks of their respective companies. Data contained in this document serves informationalpurposes only. National product specifications may vary.These materials are subject to change without notice. These materials are provided by SAP AG and itsaffiliated companies ("SAP Group") for informational purposes only, without representation or warranty of anykind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The onlywarranties for SAP Group products and services are those that are set forth in the express warrantystatements accompanying such products and services, if any. Nothing herein should be construed asconstituting an additional warranty.These materials are provided as is without a warranty of any kind, either express or implied, including butnot limited to, the implied warranties of merchantability, fitness for a particular purpose, or non-infringement.SAP shall not be liable for damages of any kind including without limitation direct, special, indirect, orconsequential damages that may result from the use of these materials.SAP does not warrant the accuracy or completeness of the information, text, graphics, links or other itemscontained within these materials. SAP has no control over the information that you may access through theuse of hot links contained in these materials and does not endorse your use of third party web pages norprovide any warranty whatsoever relating to third party web pages.Any software coding and/or code lines/strings (Code) included in this documentation are only examples andare not intended to be used in a productive system environment. The Code is only intended better explainand visualize the syntax and phrasing rules of certain coding. SAP does not warrant the correctness and

  • How-to-Guide: Guided Procedures for SAP NetWeaver 7.0-Java-VMware-Trial

    SAP DEVELOPER NETWORK | sdn.sap.com BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com

    2007 SAP AG 75

    completeness of the Code given herein, and SAP shall not be liable for errors or damages caused by theusage of the Code, except if such damages were caused by SAP intentionally or grossly negligent.

    How-to-Guide: Guided ProceduresforSAP NetWeaver 7.0-Java-VMware-TrialSummaryTable of ContentsOverviewStory OutlineRolesUsersDuration

    Detailed StoryboardGuided Procedures Running My First DayGuided Procedures Building the Guided ProceduresGuided Procedures Developing the Web Dynpro

    Copyright