Академический Документы
Профессиональный Документы
Культура Документы
Cookbook
How to Create Service Request Scenarios
July 2004
Stephan Rehmann, Martin Kreyscher, Dirk Ahlert
Web Form
Approve Request
Workflow
Processing
Cost of request is
automatically determined
(Easy Cost Planning)
and the processor can
trigger automatic
purchase order
generation (Easy
Execution)
One or more
processors carry out
actions (for example,
creating automatic
correspondence or R/3
transactions)
Page 1 of 83
Contents
1.
Introduction........................................................................................6
1.1
1.2
Prerequisites................................................................................................................6
2.
2.1
2.2
2.3
2.4
2.5
2.6
2.7
Costs..........................................................................................................................11
2.8
Running the Scenario................................................................................................12
2.8.1
Applicant with ITS Scenario.............................................................................12
2.8.2
2.8.3
Administrator....................................................................................................13
2.9
3.
Basic Customizing............................................................................15
3.1
General Details.........................................................................................................15
3.2
Request Entry Type...................................................................................................16
3.2.1
Entry Using ITS Service...................................................................................17
3.2.2
3.3
3.4
3.5
3.6
Characteristics...........................................................................................................19
3.7
The Action Box.........................................................................................................21
3.7.1
Overview...........................................................................................................21
3.7.2
3.8
Tasks.........................................................................................................................22
4.
4.1
Page 2 of 83
4.2
Layout Options for the Request Form......................................................................25
4.2.1
SAP Design or Plain HTML.............................................................................25
4.2.2
4.2.3
4.2.4
4.2.5
4.2.6
4.3
Elements of the Request Form..................................................................................27
4.3.1
SAP Design with Business HTML...................................................................27
4.3.2
Plain HTML......................................................................................................29
4.4
Initialization, Input Help, Verification, and User Commands..................................32
4.4.1
Initialization Through Parameterized URL Call...............................................32
4.4.2
4.4.3
Programming BAdIs.........................................................................................32
5.
5.1
5.2
Layout Options.........................................................................................................41
5.2.1
Images...............................................................................................................43
5.2.2
5.2.3
5.2.4
5.2.5
5.2.6
5.2.7
Multiple Languages..........................................................................................45
5.2.8
5.3
5.4
Initialization, Input Help, Verification, User Commands.........................................48
5.4.1
Initialization Through Parameterized URL Call...............................................48
Page 3 of 83
5.4.2
5.4.3
Programming BAdIs.........................................................................................48
6.
7.1
7.2
7.3
7.4
Processor Determination from the Standard Role in the Workflow.........................59
7.4.1
Processor Determination for Notifications and Tasks.......................................59
7.4.2
8.
9.2
9.3
9.4
9.5
ISR MiniApps...........................................................................................................70
9.5.1
MiniApp: ISR_MY_NOTI................................................................................70
9.5.2
9.5.3
10. Appendix..........................................................................................74
10.1
10.2
Page 4 of 83
10.3.3
General..............................................................................................................76
10.4
10.5
10.6
10.7
10.8
10.9
Page 5 of 83
1. Introduction
1.1 Main ISR Terms
Internalservicerequests(internetservicerequests,ISRs)makeitpossibleforoccasionalusers
torequestservicesinthecompanyintranet,inanextranet,orintheInternetusingrequest
formsthatdonotrequireanyspecialknowledgeofSAPR/3.
Whenauserfillsoutarequestform,anotificationisgeneratedintheR/3systemandsentto
theappropriatepersonbytheSAPBusinessWorkflow.Thispersoncanexecuteactions
directlyfromwithinthenotification(suchassendingemails,automaticallygeneratingand
sendingMicrosoftWorddocuments,triggeringpurchaseorders,orstartingR/3transactions).
Therequestformsandtheworkflowcanbeconfiguredindividuallybasedontheservice
requestsandtheconditionsinthecompany.CustomISRscenarioscanbecreatedquicklyand
easily.CloseintegrationwithControllingandEasyCostPlanning(ECP)enablescomplex
scenariosinwhichcostsarecalculatedautomaticallyandallocateddirectlytothecostobjects.
Note:
Inthepast,internalservicerequests(ISRs)werealsocalledInternetservicerequests.ISRs
arenowcalledinternalservicerequeststodistinguishthemfromtheWebrequestsinCRM.
WebrequestsinCRMaresimilartoISRs,butareintendedmoreforrequestscomingfrom
outsidethecompany.
1.2 Prerequisites
TobeabletouseISRswiththeITSforms,youneedSAPR/3release46Corlater.SAP
stronglyrecommendsthatyouinstallRelease46CSupportPackage15,sinceitcontains
importantnewdevelopmentsfortheISR.YoucanusetheISRbasedonITStechnologyorin
theSAPEnterprisePortal5.0inJavatechnology.WithmySAPERP2004youcandefinean
interactiveforminAdobePDF.YouneedtheSAPEnterprisePortalforthisaswell.
TobeabletouseISRsintheSAPEnterprisePortal,youneedthebusinesspackageManager
SelfService(MSS).TouseinteractiveAdobeforms,youneedmySAPERP2004plusAdobe
Reader6.0.2orhigher.YoualsoneedatleastSAPNetWeaver'04SP7.
YouneedtoeithersetupanITSfortheR/3systemorimplementtheEnterprisePortalwith
thecorrespondingJavaruntimeenvironment.Toaccesstherequestforms,youneedaWeb
browsersuchasInternetExplorerorNetscapeNavigator.Youneedtohaveinformationon
yourITSinstallation(URLforaccessingInternetservicesandthedestinationforpublishing
them),ortheinformationneededforimplementingaJavaiViewinSAPEnterprisePortal5.0.
NotealsothefollowingchangesregardingtheISRthatresultwhenWAS6.40isused:To
continuetouseexistingITSforms,youneedaseparateITSserver6.20.TheintegratedITS
serverofWAS6.40cannotbeused.ItisnolongerpossibletogeneratenewITSserviceswith
mySAPERP2004.
Page 6 of 83
Page 7 of 83
Page 8 of 83
Page 9 of 83
correctlyfirst:UtilitiesSettingITS.Formoredetails,seetheAppendixinsection8.2).
ReturntothebasicdataviewwithBack.Savethescenario.
Page 10 of 83
thescreenintheDataViewanddragFIELDtotheNewUserfield.IntheDefaultBinding
attributeofthetabObjectBinding,thelinkageofthecharacteristicfromISRCustomizing
tothefieldisspecifiedintheformwiththeformat$record.NEW_USER.DATA[*].FIELD.
RepeatthewholeprocedurefortheSYSTEMcharacteristic.Savetheformandexitthe
AdobeDesignerwithBack(F3).ThetechnicallinkageoftheformZ_ISR_FORM_RU01has
nowbeeninsertedintheFormfield.Youcanstarttheformdirectlywiththetestfunction
(calipersymboltotherightoftheFormfieldseesection6).
2.7 Costs
Forthissimpleexample,wewillnotlookatanycosts(checkboxThescenarioincurscostsis
notactivated).Ifyouactivatethisindicator,severalfieldsthatcontroltheintegrationofcosts
aredisplayed.Seesection8,CostsandIntegrationwithControllingforallnecessary
informationonintegrationoftheISRwithcosting.
Page 11 of 83
IfyouusetheSAPWorkplace,bringuptheISRstartpageunderEmployeeSelfService
InternalServiceRequest.Enterkeywordsinthetextfield(suchas"needuser"),thenchoose
Solutions.ThesystemdisplaysalistofdocumentsandISRrequestformsthatcontainthekey
wordsyouentered.Yournewrequestformforanewusershouldalsoappearinthelist.
(RecallthatyouenteredtherelevantkeywordsforthisrequestforminCustomizing.)Bring
uptherequestformbyclickingonthelink.
Note:IfyouarenotusingtheSAPWorkplace,youcanalsoaccessthestartpagedirectlyfrom
theWebbrowser:
http://<yourITSserverport>/QISR/!
TheformcanbeaccesseddirectlyfromtheWebbrowseraswell.Thesyntaxforaccessinga
scenariowithscenariokeyXXXXandthecorrespondingInternetserviceZYYYYisasfollows:
http://<IhrITSServerPort>/ZYYYY/!?~okCode=CREATE&scenario=XXXX
Onceyouhaveaccessedtherequestform,youcanseethatitdisplaysthetwospecial
characteristics(SYSTEMandNEW_USER)fromtheISRscenario,aswellastheaddress
dataoftheapplicantandthepersonwhoenteredthedata.Fillintheseformsandenter
additionaltextinthelowertextfield.Nowsubmityourrequest.Thesystemtheninformsyou
thatthenotificationhasbeencreatedandindicatesthenotificationnumber.Ifyouclickon
Selectnewservicerequest(onlyforformsinthestandardSAPdesign),youreturntotheISR
startpageandcanfollowupyourrequeststatusbychoosingOverviewofmyrequeststodate
(correspondstothestatusofnotificationprocessing).Thefunctionsprovidedbythestatus
monitorarealsoavailableasaseparateMiniApp,whichyoucancombinewiththeworkplace
orexistingInternetorIntranetportals(seesection7.4,ISRMiniApps).
2.8.2
TheISRformcanbeaccessedwithcontextualinformation(thatis,dataofthecurrent
applicationistransferredtotheform)orwithoutcontextualinformation.
Ifyouwanttoaccesstheformwithoutcontextualinformation,defineaniViewonthebasisof
themasteriViewInternetServiceRequest(Adobe)foryourEnterprisePortal.Forthe
parameterISRScenarioofyouriView,specifythetechnicalnameofyourscenario(suchas
RU01).
Page 12 of 83
Ifyouwanttoaccesstheformwithcontextualinformation,insertthescenariointoexisting
scenariogroups(suchasscenariosfortheEquipmentMonitor).Todothis,modifythe
suitablescenariogroupintheIMGunderCrossApplicationComponentsInternet/Intranet
ServiceInternalServiceRequestScenarioDefinitionDefineScenarioGroups.These
scenariogroupsareusedinthecorrespondingWebDynproapplicationsinSAPEnterprise
PortaltoaccessthedesiredISRforms.
SeealsothedocumentationontheWebDynproapplicationsthatyoucanfindintheSAP
LibraryintheSAPHelpPortal(http://help.sap.com)undermySAPEnterpriseResource
PlanningSAPERPCentralComponentCrossApplicationComponentsManager
SelfService.
2.8.3
Administrator
Nowputyourselfinthepositionofthesystemadministrator,whohasjustreceivedanewtask
forprocessing.StarttransactionIQS9(OfficeNotificationWorklistTasks).Choose
Myworklist:MytaskswiththeoptionTobeprocessedbymeandthenchooseExecute.The
systemdisplaysaworklistcontainingthetasksforyoutoprocess.
SelectataskandchooseDisplaytask.Youthenseetherequestdatathatyouenteredinthe
requestform,alongwithashortdescriptionofthetask.Ifyouwanttoseetheoriginalform,
chooseDisplayformintheactionboxontherighthandside.Youcanalsousethe
Notificationpushbutton(extended)togotothenotificationviewandseetherequestformon
theFormtab.(Normallytherequestfieldsaredisplayedinatabularviewhere,butyoucan
displaytheoriginalformifyouwant.SeeAppendix8.1).Asthesystemadministrator,you
cannowcreatetheuserinthesystem.Itispossibletoprovidethesystemadministratorwith
directaccesstothecorrespondingtransactionfromtheactionboxwiththecorresponding
defaults.Section3.4providescomprehensivedetailsontheactionbox.Whenthenewuser
hasbeencreated,theprocessorcanclosethetaskandthenotification.bychoosingChange
Taskinthemenuandthenchoosingthefollowingpushbuttonsinorder:ReleaseTask
CompleteTaskTaskSuccessfulSave.Toreturntothenotificationview,choose
Notification(Extended).Thereyoucanrelease,close,andsavethenotification.
WhenyouhavereturnedtotheISRstartpage,youcanseethatyourrequesthasbeen
processedsuccessfullyunderSeeOverviewofMyRequeststoDate.
Page 13 of 83
Whatistheoverallprocessthatneedstobesupported?
Whichfields(characteristics)shouldappearontherequestform? (ITSscenario:Ifyou
wantcheckboxesorradiobuttons,generateareferencefirst,withnormalentryfields.
ThenmodifytheInternetserviceafterwards. F4helpwithdropdownboxescanalsobe
createdbymeansofsubsequentmodificationoftheInternetservice.)
Doyouwanttousetheworkflowforprocessingnotifications,orshouldprocessorsselect
notificationsfromaworklist?
Is an approval step necessary? If so, use notification type 01, otherwise use 02.
Willmorethanoneprocessorbeworkingsimultaneously?Ifso,youneedtasks.Ifthe
processorscanworkinsequence,youdonotneedtasks.
Whatcriteriashouldbeusedtodeterminetheprocessor?Willprocessorsbepermanently
assignedtotasks?Orwilltheprocessorbeselectedbasedoncriteriasuchasrequest
fields,organizationalstructures,costs,ortheapplicant'slastname?
Whatactions(startingtransactions,answeringemails,andsoon)shouldbeprovidedin
theactionboxfortheprocessors?
Onceyouhaveclarifiedthesepoints,youcanstartcreatingtheISRscenario. Thefollowing
sectionsprovidedetailedinformationonallrelatedsubjects.
Wewishyoueverysuccessandhopeyouenjoycreatingyournewscenarios!
Page 14 of 83
3. Basic Customizing
TransactionQISRSCENARIOisthecentralCustomizingtransactionfortheISR,whereyou
canmakeallsettingsforcreatinganewISRscenario. Whenyoustartthetransaction,the
existingISRscenariosaredisplayed. Youcanaccessthesebydoubleclickingonthem.
Scenariokey:ThekeyforthescenariomustnotbeintheSAP(S*)namespace.
Scenarioactive:Onlyactivatedscenariosareavailable.WithmySAPERP2004youcan
specifyavalidityperiodduringwhichnewrequestscanbesubmittedbytheapplicant.
Requeststhathavealreadybeensubmittedcan,ofcourse,stillbeapprovedandprocessed
afterexpirationofthisperiod.
TheDescriptionisusedasthetitlefortheform.
Page 15 of 83
YoucanfindthecorrespondingformusingkeywordsontheISRstartpagebyusingthe
LongTextforthesearchhelp. Formoreinformationonthesearchengine,seetheSAP
LibraryunderAccountingControllingCostCenterAccountingInformation
SystemOnlineInformationSystemSearchingforDocumentationonReports
SearchingforDocumentsUsingtheRetrievalSystem.
Thenotificationtypedetermineswhetherthenotificationscenariosrequireapproval,and
ifso,defineshowtheapprovingmanagerisdetermined.Inaddition,youcanusethe
notificationtypetodefinethelayoutforthenotificationtransaction.Formostscenarios,
youcanusenotificationtype01(requiresapproval)or02(doesnotrequireapproval).If
youwanttocreateyourown,individualapplicationusingtheISRframeworkthatwill
containmanyscenarios,itisrecommendedthatyoucopynotificationtype01or02and
createyourscenariosusingyourownnotificationtype(CustomizingunderCross
ApplicationComponentsInternet/IntranetServicesInternalServiceRequest
PrepareGeneralNotificationNotificationCreationNotificationTypeDefine
NotificationType).If notification types 01 or 02 are not in your client, you can use
transaction QISR_SM29 to transfer the settings for notification types 01 and 02 from
client 000 to your client. You then need to edit the number ranges of the notification type
in Customizing underCrossApplicationComponentsInternet/IntranetServices
InternalServiceRequestScenarioDefinitionPrepareGeneralNotification
NotificationCreationNotificationTypeDefineNumberRanges.
ThecontactpersonforthescenariomustbeanR/3user.Thecontactpersonisonly
responsibleforthetechnicalaspectsofthescenario,notforquestionsregardingthe
contentofinternalservicerequests.Afeedbackbuttonappearsontherequestforms,
whichtriggersanemailtothecontactperson.Thecontactpersonisstoredinthe
notificationinthesystemifyouselectPartnerrolecontact.
Page 16 of 83
Youcanonlydefinespecialcharacteristics(andthusanindividualrequestform)ifyouhave
selectedtheentrytypeFormEntry,EntryUsingAdobe,EntryUsingJSPiView,orEntry
UsingBSP.
3.2.1
YouentertherequestusinganHTMLformspeciallydesignedforthescenario.AnInternet
servicemustbeassignedtothescenario.ThisservicemustcontaintheHTMLtemplatesand
languagedependentresourcesrequiredfortherequest.YoucanassignanInternetserviceto
onlyonescenario.
TocreateanewInternetserviceforyourISRscenario,chooseGenerate.Adialogbox
appearswiththreeoptions:
Withtemplate:
AnexistingInternetserviceiscopied.Theadvantagehereisthatthecompletelayoutof
thecopiedserviceistransferred.Thedisadvantageisthatthecharacteristicsofthenew
scenariothenneedtobeinsertedmanuallyintheHTMLtemplate.
Generate(SAPDesign):
AnewInternetserviceisgeneratedbasedonthetemplateserviceSR00.Thisservicehas
theSAPstandarddesignwhichisusedinallR/3transactions.AnInternetservicecreated
inthiswaycontainsallinputandoutputfieldsrequiredforimmediatetestingofthe
scenario.Thesysteminsertsarequestdataareacontainingthecorrespondingentryfields
forcharacteristicsthatweredefinedinthescenariospecificallyfortherequest.
Generate(PlainHTML):
AnewInternetserviceiscreatedbasedonthetemplateserviceSRPH.Thisservicehasa
simpledesignthatusesstandardHTMLelementsalmostexclusively,andisintendedtobe
setupindividuallybyWebdesigners.ThegeneratedInternetservicecontainsall
entry/outputfieldsrequiredforimmediatetestingofthescenariodefinition.Thesystem
automaticallyinsertsaRequestDataarea(withthecorrespondingentryfields)forthe
requestspecificcharacteristicsdefinedinthescenario.
Notes:
BeforeyoucantesttheInternetservice,youmustpublishitmanually.Youare
automaticallytakentotheeditingmodeoftheInternetserviceintheDevelopment
Workbench,whereyoucanpublishit(rightclickontheInternetServicePublish
CompleteService).YoucanthentesttheITSservicefromwithinscenariocustomizing
(testsymbolaftertheInternetservice).
IfyouwanttotesttheInternetservicedirectlyintransactionSE80,rightclickonthe
InternetserviceandchooseStartService.Sincethisdoesnotsettheparametersforthe
URL,ascreenisdisplayedonceyouhaveloggedoninwhichyouenterthescenariokey
incapitalletters,andthenchooseCreate.(YoucanalsocompletetheURLintheWeb
browser(suchaswithInternetserviceZRU01andscenariokeyRU01:
...scripts/wgate/ZRU01/!?~okCode=CREATE&SCENARIO=RU01)
Page 17 of 83
IfyouaddnewcharacteristicsinCustomizinglater,thisdoesnotinfluenceanInternet
servicethathasalreadybeengenerated.Insertthenewcharacteristicsmanuallyintothe
existingHTMLtemplate,orgeneratetheInternetservice.Caution:Whenyougeneratethe
service,youloseanymanualchangesyoumayhavemadetotheHTMLtemplate.
Ifyouwanttouseformelementssuchasdropdownlistboxes,checkboxes,orradio
buttonsinsteadofthesimpleentryfieldsgeneratedautomaticallyintheHTMLtemplate,
youcanredefinetheseelementsintheHTMLtemplatebasedontheexamplesinsection
4.3.
3.2.2
YouentertherequestusinganAdobeforminPDFformatspeciallydesignedforthescenario.
Aformmustbeassignedtothescenarioforthispurpose.Aformcanbeassignedtomore
thanonescenario,butthecharacteristicsofthedifferentscenariosmustbethesame.
YoucanassignanexistingAdobeformtotheISRscenarioorgenerateanewform.
GeneratinganAdobeForm
Youcanenteranamefortheformintheformfield.Theformgenerationprocesscreatesa
formwiththattechnicalname.Ifyouleavetheformfieldempty,thesystemgeneratesaform
withthenameZ_ISR_FORM_<scenario>(suchasZ_ISR_FORM_Z123forscenarioZ123).
TocreateanewAdobeformforyourISRscenario,chooseGenerate.Adialogboxappears
withthreeoptions:
WithoutTemplate:
AnewemptyAdobeformiscreated.Thecharacteristicsofthescenarioaretransferredto
thedatapartoftheformandareavailableonthebodypageoftheformlayoutfordata
bindingofthefieldsandformelementstobedefined.
WithTemplate(fromScenario):
AnexistingAdobeformiscopied.Inadditiontothecharacteristicsofthenewscenario,
thecharacteristicofthetemplatescenarioaretransferredtothedataviewdatacontainerof
thenewformandthenewinterface.
GenerateForm(SAPDesign):
AnewAdobeformiscreatedbasedonthetemplateISR_FORM_SCENARIO.Thisform
hastheSAPstandarddesignusedinallstandardscenarios.Theformcontainsvarious
graphicalelementsthatyoucanuseasatemplateforyourownfieldsandelementsonthe
form.YoucanalsousetheISRControlslibrary.Tofindouthowtoobtainthislibrary,see
Note741381(itisplannedtoshiptheISRLibrarywiththeSAPGUIinthefuture).
Page 18 of 83
Page 19 of 83
Thefollowingtypesofcharacteristicsareavailable:
Characteristicsreferringtoadictionarytype=Dataelement
Characteristicsreferringtoadictionarytype=Structure
Uncategorizedcharacteristics
ThecharacteristicscanbevaluatedontheHTMLtemplateunderthecharacteristicname
specifiedhere.Theonlyexceptionsarecharacteristicsreferringtoastructure.Inthiscase,
thestructurefieldscanbeusedwiththeirfieldnameswithoutastructurename(<structure
name><fieldname>)intheHTMLtemplate.Thatis,structuresarealwaysresolvedforthe
requestandcanthusbeseenashavingamorecompactdefinitioninsteadofbeingaseriesof
characteristicsthatreferencedataelements.
ThecharacteristicnamespecifiedinCustomizingisdisplayedontherequestformasafield
label.Categorizedcharacteristicscanusethefieldlengthinaddition.Forcharacteristicsthat
referencedataelementsorstructurefields,input/outputformatting(aswithscreenfields)is
executedaswell,includingtypechecks.
UncategorizedcharacteristicshavetheimplicitcategoryCHAR250withoutinput/output
conversion.
Page 20 of 83
Thefollowingrestrictionsapplytothedefinitionofthescenariocharacteristics:
Characteristicnamesorstructurefieldnamesmustbeuniqueinthescenario.
Characteristicnamesorstructurefieldnamesmustnotbeginwith"ISR_".
Characteristicnamesorstructurefieldnamesshouldnotbenamedinthesamewayas
theHTMLbusinessindicatorsLABEL,NAME,VALUE,DIM,MAXSIZE,TYPE,
EXISTS,ENABLED,orVISSIZE.
Themaximumlengthofthecharacteristicnamesorstructurefieldnamesis28
characters.
Themaximumdatalengthofthecharacteristicnamesorstructurefieldnamesis250
characters.
Themaximumlengthofthecharacteristicnameis40characters.
Inadditiontocharacteristicsyoudefineyourself,anentirerangeofstandardcharacteristicsis
providedwhichareautomaticallyinitializedandcanbedisplayedontherequestform(such
asenteredbyorapplicant).Theimplementedstandardcharacteristicsthatareonlyoutput
fieldsarelistedintheappendix.
IfyouuseAdobeforms,youmayhavetomakeadditionalsettingsforeachcharacteristic:
Thecharacteristicshouldcontainprogrammedinputhelp.Youmustspecifyonthe
characteristicthetechnicalnameyouareusingforthekeyvalueandthedefaultvalue
intheprogrammingoftheBAdImethod(seesection4.4.3).Thefollowingscreenshot
isanexample.
Thecharacteristicshouldbedisplayedasamultilinelongtextfield.Itshouldbe
possibletoenterabodytext,inwhichcaseyouchooseLongTextField.(Notethatthe
ISRframeworkalreadyprovidessuchafield:thegeneralfield
ISR_NEW_LONG_TEXT.)
Overview
Theactionboxcontainsatoolboxforthenotificationprocessorforprocessingtherequest(for
example,youcansendageneratedemail,startaparameterizedtransaction,callR/3BAPIs
forcreatingorchangingbusinessobjectsinR/3,orgenerateWorddocumentsallatthe
touchofabutton).SincerequestdataisknownintheISRframework,theprocessingsteps
canlargelybelefttothesystem.Theprocessor'smaintaskistochecktherequestorcomplete
therequestdataandthentriggertheprocessingtransactions.Thiseliminatestheneedto
manuallytransferrequestdata,whichsavestimeandreduceserrors.
TheISRframeworkprovidesseveralstandardactionsthatyoucanuseimmediately(suchas
display/changeformorstartparameterizedtransaction.Foracompletelist,seeappendix8.9).
Forspecialrequests,youcanimplementthecorrespondingfunctionmodulesthat
Page 21 of 83
automaticallyprocesstherequestdataasrequired.Theactionboxisthustheintegratinglink
betweentherequestformandR/3.
3.7.2
Toedittheactions,chooseActionBox.Actionsarealwaysdefinedforonenotificationtype
andcanbeusedspecificallyforISRscenariosofthisnotificationtype.ChooseNewEntries
andenterakeyandtheactionname.Enterthenotificationtypethatyouusedinyour
scenario.
IntheControlsection,enterthefollowing:
Scenariocontrolsthevisibilityoftheactionineachscenariothatbelongstoa
notificationtype.(Maketherequiredentriesfirst:Sortsequence,icon,andAs
documentation:NoneandchooseENTERtoseetheF4helpforthescenarios.)
Sortnumbercontrolstheorderinwhichtheactionsaredisplayedintheactionbox.
Useincontrolsthevisibilityoftheactionsinthenotification.ThedefaultisAllviews
(create,change,display).
andcontrolsthevisibilityinnotificationsand/ortasks.ThedefaultisNotificationand
task.
Documentationdefineswhetheraperformedactionisdocumentedinthenotification
(forthesakeofsimplicity,chooseNone).
IntheFunctionsection,youcanspecifythenameofthefunctionmodulethatisprocessed
whentheactionisaccessed.Severalexamplesofthesetypesoffunctionmodulesareincluded
inthestandardsystem(seeappendix8.9).
Thebusinesstransactioncontrolsthenotificationstatusinwhichtheactionisallowedtobe
triggered,andthestatusofthenotificationoncetheactionhasbeensuccessfullycompleted.
IntheInterfacesection,youspecifytheiconandtextthatappearintheactionbox.
IntheRulessection,youspecifythesequenceanddependenciesforcarryingouttheactions.
Ifyouhaveselectedthetaskoractionoptionunderdocumentation,twoadditionalsections
aredisplayedfortaskoractioncoding.Thecodingenablesyoutomakespecificevaluations
andselectionsusingspecialcodes.Forexample,youcanusetransactionIQS9toselectall
tasksthathaveacertaincode.EnterSAPISRasthecodename,andselectacodefromtheF4
helpfromthelistofcodesalreadydefinedfortheSAPISRcodegroup.Ifyouwanttoextend
thecodesforthecodegroupSAPISRorcreateyourowncodegroup,seeappendix8.8.
3.8 Tasks
WhenyousubmitanISRrequestform,anotificationiscreatedinR/3.Ifyourscenario
requiresthattherequestbeprocessedbymultipleuserssimultaneously,youcanassign
multipletaskstothenotification.
Page 22 of 83
Iftherequestonlyneedstobeprocessedbyoneuseratatime,youdonotneedtasks.Inthis
case,thenotificationissimplyforwardedtothenextprocessoraftereachstepiscompleted.
Ifyouwantoneormoretaskstobecreatedautomaticallywhenthenotificationiscreated,
chooseTasksinscenariocustomizing.Thetaskisautomaticallyassignedasequential
number.Enteranameforthetask.Theassignmentofakey(suchasacodegroup)canbe
usedlatertoevaluateorselectthetasks.Thismeansyoucanselectalltaskswithacertain
code,forexample,usingtransactionIQS9.EnterSAPISRasthekey(orcodegroup).Inthe
nextfield,youcanuseF4helptoselectoneofthecodesalreadydefinedforthecodegroup
SAPISR.IfyouwanttoextendthecodesforthecodegroupSAPISRorcreateyourowncode
group,seeappendix8.8formoreinformation.
Therearetwoalternativefieldsforselectingtheprocessorforthetask:
Amanager:Thiscanbearegistereduserinthesystem(partnerfunction:taskprocessor)
ortheresponsibledepartment(partnerfunction:responsibledepartment).Themanager
enteredisthetaskprocessor.
Thestandardrolefortheworkflowenablesflexibleprocessordetermination.Thetask
processorcanbeselectedbasedontheinputvaluesontherequestformoroninformation
suchasthecostcenterofthepersonenteringtherequest.(seesection5,Processor
DeterminationandWorkflow).
Page 23 of 83
SAPLQISR3110:Templateforcreatingarequest
SAPLQISR3120:Templateforchangingarequest
SAPLQISR3130:Templatefordisplayingarequest
SAPLQISR3200:Templateusedasaconfirmationaftertherequesthasbeen
submitted
Inthestandardconfiguration,thetemplatesforthechangeanddisplaymodesarebasedon
thetemplateforthecreatemode(SAPLQISR3110).Thismeansthatalltemplateshavethe
samelayout.Ifyouwanttomodifythelayout,youonlyneedtochangetemplateSAPLQISR3
110.
Thefieldsintherequestareautomaticallysettoreadyforinputwhereappropriateforthe
mode.Inthecreatemode,allfieldsarereadyforinput.Inthechangemode,onlythefields
thathavebeencreatedascharacteristicsarereadyforinput(unlikethegeneralISRfields,
Page 24 of 83
whichcanonlybechangedusingthenotificationtransactionbecausetheyareclosely
integratedwiththenotification).Inthedisplaymode,noneofthefieldsarereadyforinput.
(Technically,alltemplatesaredirectlylinkedtoscreens110,120,and130intransaction
QISR1,whichcontrolstheflowlogicoftherequestformandwhichfieldsarereadyfor
input).
TemplateSAPLQISR3200,whichdisplaysaconfirmationwhenarequestformhasbeen
successfullysubmitted,defaultstotemplateISR_STATUS_MESSAGE_1(or
ISR_STATUS_MESSAGE_1_PLAIN_HTMLforPlainHTML)oftheInternetservice
SR_LIBRARY.Ifyouwanttouseyourownlayoutfortheconfirmation,copytemplate
SR_LIBRARYtotemplateSAPLQISR3200andthenmodifythecopy.
Notes:
DonotchangeInternetserviceSR_LIBRARY,sinceitcontainsthefunctionlibraryforall
ISRscenarios.
AlwaysenterInternetservicesintheoriginallanguage,otherwiseproblemsmayarisedue
tolanguagedependency.Forrequestsindifferentlanguages,usethetextelementsinthe
HTMLtemplates(suchas#INFO),whosecontentsyoucandefineintheoriginal
languageintheTHEMEoftheInternetservice.Youcantranslatethetextsusing
transactionSE63.
4.2 Layout Options for the Request Form
TheISRframeworkisdesignedtoensureasmuchfreedomaspossiblewhencreatingrequest
forms,andatthesametimetoincludeasmanystandardrequestsaspossible.Therefore,an
InternetserviceiscreatedforeachISRscenario.YoucanmodifytheseInternetservicesas
needed.Thelayoutoptionsaredescribedbelow,startingwiththemostbasic.
4.2.1
WhenyougenerateanInternetserviceforyourISRscenario,thesystemdisplaysadialogbox
withthreeoptions:
Withtemplate:AnexistingInternetserviceiscopied.Theadvantagehereisthatthe
completelayoutofthecopiedInternetserviceistransferred.Thedisadvantageisthatyou
havetomanuallyenterthecharacteristicsforthenewscenariointheHTMLtemplate.
Generate(SAPDesign):AnewInternetserviceiscreatedbasedonthetemplateservice
SR00.ThisservicehasthestandardSAPdesignthatisusedinallR/3transactions.
ChoosethisoptionifyouwanttousetheSAPdesignforyourISRscenario.
Generate(PlainHTML):AnewInternetserviceiscreatedbasedonthetemplateservice
SRPH.ThishasasimplifiedlayoutwithmostlystandardHTMLelements,andis
designedtobeindividuallymodifiedbyWebdesigners.Choosethisoptionifyouwantto
useyourowndesign,suchasforanexternalenterpriseportal.
Page 25 of 83
4.2.2
Themesenableyoutousemorethanonedesignorlayoutvariantofarequestformatatime.
Forexample,youcancreateanewthemewiththecorrespondingHTMLtemplatesifyour
ISRrequestformisusedonahandhelddeviceorWAPcellphone.Youcanentertherequired
themewhenyouaccesstheURL(example:.../RU01/!?
~okCode=CREATE&SCENARIO=RU01&~theme=88).
4.2.3
Ifyouwanttohavedifferentlayoutsforthevariousrequestmodesthatdifferinmorethan
justwhichfieldsarereadyforinput,youhavetwooptions:
EachtemplateprovidesyouwiththeparameterISR_MODEintheBusinessHTML
environment.Dependingonthemode,thisparameterhasthevalueCREATE,
CHANGE,orDISPLAY.Thisenablesyoutohaveachangebutton,forexample,
displayedinthechangemodeasfollows:
`if ( ISR_MODE == "CHANGE" );`
<input type="submit" name="BUTTON_SAVE" >
`end`
4.2.4
Ifthelayoutsareverydifferent,youcandeletethereferencetotemplateSAPLQISR3
110andenteryourownindependentHTMLcodefortemplatesSAPLQISR3120and
SAPLQISR3130.
Layout Based On User Role
Itisoftenthecasethattheprocessorneedstohavemorerequestfieldsthantheuserswho
entertherequests.YoucanachievethisbyusingtheparameterISR_FORM_VIEWwithinthe
BusinessHTMLenvironment.ThisparameterhasthevalueISR_REQUESTasadefault.It
onlyhasthevalueISR_PROCESSwhentherequestformisaccessedbytheprocessor.You
canhaveanextrafielddisplayedfortheprocessorasfollows:
`if ( ISR_FORM_VIEW == "ISR_PROCESS" );`
<input type="text" name="COLOR" >
`end`
YoucanalsosettheparameterISR_FORM_VIEWwithintheBAdImethodsbasedonrules
thatyoudefine,andthuscontrolthelayoutmoreexactly.
4.2.5
YoucanusetheISRframeworktodefinerequestformswithmultiplepagesforamore
structuredentryofdata(ifnecessary,youcandisplaytheentriesmadeonthepreviouspages
onthefinalpage). Formswithmultiplepagesaredefinedasfollows:
Page 26 of 83
Onlythepagestructureisdefinedonthemaintemplate(suchasSAPLQISR3110). Fora
threepageform:
`if ( ISR_PAGE == 1 )`
`include(~theme="99", ~language="", ~name="page1.html")`
`elsif ( ISR_PAGE == 2 )`
`include(~theme="99", ~language="", ~name="page2.html")`
`elsif ( ISR_PAGE == 3 )`
`include(~theme="99", ~language="", ~name="page3.html")`
`end`
ThestandardparameterISR_PAGEdeterminesthecurrentpage.Thepagetemplates
themselvesareusedasincludes.EachofthesetemplateshasanewHTMLtemplateinthe
Internetservice.
YoucanscrollbymeansofabuttonwhichtriggersoneofthestandardISRcommands:
NEXT_PAGE:Onepageforward
PREV_PAGE:Onepageback
<input type="submit" value="Seite vor" onclick="SAPEvent('NEXT_PAGE')" />
<input type="submit" value="Seite zurck" onclick="SAPEvent('PREV_PAGE')" />
Whenoneofthesecommandsistriggered,thenumberofthecurrentpage(parameter
ISR_PAGE)isautomaticallyincrementedordecrementedbyone.Ifamorecomplex
scrollinglogicisrequired(forexample,dependingontheentriesmadeonthepage),youcan
explicitlysetthevalueoftheparameterISR_PAGEintheBAdImethods.
4.2.6
Youcanhavefieldsdisplayedbasedonthevaluesinindividualfields(showPROJECTand
ORDER):
`if ( PROJECT == "XYZ" && ORDER == "" )`
`SAP_ISRField(name="CO_AREA")`
`end`
Oryoucanswitchthereadyforinput/outputstatus:
`if ( ORDER == "XYZ" )`
`l_mode = "disabled";`
`else`
`l_mode = "enabled";`
`end`
`SAP_ISRField(mode=l_mode, name="CO_AREA")`
Page 27 of 83
descriptionoftheISRLibrary,seetheSAPLibraryunderCrossApplicationComponents
InternalServiceRequestsPreparingtheInternalServiceRequestDefinitionofan
HTMLFormDefineFormExamples:SpecificFormElementsinHTMLTemplates
(SAPDesignandPlainHTML).
4.3.1
Inputfield(onerow)forthecharacteristicCOLOR:
`SAP_ISRField(name="COLOR", size=30)`
Dropdownlistbox(inputhelp)forthecharacteristicCOLOR:
Youcancreatethevaluelistforadropdownlistboxdirectlyonthetemplate(alternatively
youcanusetheBAdImethodSCENARIO_SET_ADDITIONAL_VALUES).
`COLOR_Option[1] = "red";
COLOR_Option[2] = "green";
COLOR_Option[3] = "blue";
COLOR_Label[1] = "you like the red color?";
COLOR_Label[2] = "or the green color?";
COLOR_Label[3] = "or the blue color?";`
`SAP_ISRPulldownField(name="COLOR", key="COLOR_Option", fieldLabelWidth=20,
content="COLOR_LABEL", size=30)`
CheckboxforthecharacteristicsCOLORRED,COLORGR,andCOLORBL:
`SAP_ISRCheckBox( name="COLORRED", left=4, top=0,labelWidth=10 )`
`SAP_ISRCheckBox( name="COLORGR", left=4, top=0,labelWidth=10 )`
`SAP_ISRCheckBox( name="COLORBL", left=4, top=0,labelWidth=10 )`
RadiobuttonforthecharacteristicCOLOR:
`SAP_ISRRadioButton( id="11", name="COLOR", value="red", text="you like the red
color?", left=4, top=0, labelWidth=0 )`
`SAP_ISRRadioButton( id="12", name="COLOR", value="green", text="or the green
color?", left=4, top=0, labelWidth=0 )`
`SAP_ISRRadioButton( id="13", name="COLOR", value="blue", text="or the blue
color?", left=4, top=0, labelWidth=0 )`
Textfield(multiplerows)forthecharacteristicMYTEXT:
`SAP_ISRTextArea( id="MYTEXT", type="SAP_WEBGUI", name="MYTEXT", cols=80,
rows=4, left=1, top=6 )`
PredefinedstandardtextfieldsISR_NEW_TEXTandISR_TEXT
TheISRhasastandardtextfield,thecontentsofwhichareautomaticallytransferredto
thenotificationlongtext.Ifanadditionalcommentisenteredbythepersonenteringthe
requestorbythepersonprocessingit,thecommentisaddedtothenotificationlongtext.
Youcanalsoinsertanautomaticlogrowwiththedate,time,anduserinnotification
Page 28 of 83
customizingintheSAPreferenceIMGunderCrossApplicationComponents
Internet/IntranetServicesInternalServiceRequestScenarioDefinitionPrepare
GeneralNotificationNotificationProcessingOverviewofNotificationType
FormatLongText.NewcommentsareenteredinthetextfieldISR_NEW_TEXT,while
oldonesaredisplayedinthetextfieldISR_TEXT:
<!-- comments -->
`x = 1; y = 19;`
`if ( ISR_mode == "CREATE" );`
`SAP_ISRGroupBox(x , y , 069, 005, #comment)`
`SAP_ISRLongTextInput(cols=67, rows=5, left = x+1, top = y+1 );`
`y = y + 6;`
`elseif ( ISR_mode == "CHANGE" );`
`SAP_ISRGroupBox(x , y , 069, 010, #comment)`
`SAP_ISRLongTextOutput(cols=67, rows=7, left = x+1, top = y+1, height=5);`
`SAP_ISRLongTextInput(cols=67, rows=5, left = x+1, top = y+6 );`
`y = y + 11;`
`else;`
`SAP_ISRGroupBox(x , y , 069, 005, #comment)`
`SAP_ISRLongTextOutput(cols=67, rows=5, left = x+1, top = y+1 );`
`y = y + 6;`
`end;`
Buttons
Thestandardbuttonsforsubmitting,changing,andcheckingaredefinedasfollows:
`SAP_ISRStandardButtons( left=1 , top=20, buttonWidth=018 )`
Thefollowingshowshowtocreatethebuttonforafreelydefinableusercommand(or
pagescrolling),whichcanbeevaluatedintheBAdIs:
`SAP_ISRUserButton( buttonLabel="Calculate here",
quickinfo="Calculates the price of the order",
okcode="CALC", id="CALC", left=1 , top=30 )`
Positioning
AllISRfunctionsnormallyuseanabsolutepositioningoftheelementsontherequest
form.YoucanusethefunctionsSAP_ISRFieldListBegin()(forlisttypelayout)and
SAP_ISRFieldListRowBegin()(forcolumnlayout)togroupandpositionentryfields:
`x = 1; y = 1`
`SAP_ISRFieldListBegin( x , y ,018) `
`SAP_ISRField( name="ISR_INITIATED_BY-FIRSTNAME" ) `
`SAP_ISRFieldListRowBegin( ) `
`SAP_ISRField( name="ISR_INITIATED_BY-TEL_NUMBER" ) `
`SAP_ISRLabel( labelText="-", left = x+23); `
`SAP_ISRField( name="ISR_INITIATED_BY-TEL_EXTENSION",
fieldLabel="noLabel", left=x+22 ) `
`SAP_ISRFieldListRowEnd( ) `
`SAP_ISRField( name="ISR_INITIATED_BY-E_MAIL" ) `
`SAP_ISRField( name="ISR_INITIATED_BY-DEPARTMENT" ) `
`SAP_ISRFieldListEnd( ) `
Page 29 of 83
4.3.2
Plain HTML
UnliketheSAPdesignvariant,PlainHTMLvariantsuseasfewSAPandISRproprietary
businessHTMLconstructs(bluefont)aspossible.
Positioning
EachformelementislaidoutandpositionedusingnormalWebdesignmethods(tables,
transparentGIFS,andsoon).
NameofcharacteristicCOLOR:
`getLabel("COLOR")`
EntryfieldforcharacteristicCOLOR:
<input name="COLOR" value="`COLOR`" type="text" size="20" `disabled("COLOR")`>
Dropdownlistbox(inputhelp)forthecharacteristicCOLOR:
Youcancreatethevaluelistforadropdownlistboxdirectlyonthetemplate(alternatively
youcanusetheBAdImethodSCENARIO_SET_ADDITIONAL_VALUES).
`COLOR_Option[1] = "red";
COLOR_Option[2] = "green";
COLOR_Option[3] = "blue";
COLOR_Label[1] = "you like the red color?";
COLOR_Label[2] = "or the green color?";
COLOR_Label[3] = "or the blue color?";`
<select id="COLOR" name="COLOR" size="1" `disabled("COLOR")`>
`SetOptions("COLOR","COLOR_OPTION","COLOR_LABEL")`
</select>
Alternatively:
<select id="COLOR" name="COLOR" size=1 `disabled("COLOR")`>
<option value="red" `Selected("COLOR","red")` > you like the red color?
<option value="green" `Selected("COLOR","green")`> or the green color?
<option value="blue" `Selected("COLOR","blue")`> or the blue color?
</select>
CheckboxforcharacteristicCOLORwithmultiplerows:
`CheckboxProlog("COLOR[1]")`
<input name="COLOR[1]" value="red" type="checkbox"
`Checked("COLOR",1,"red")` `disabled("COLOR")`>you like the red color? <br>
`CheckboxProlog("COLOR[2]")`
<input name="COLOR[2]" value="green" type="checkbox"
`Checked("COLOR",2,"green")` `disabled("COLOR")`>and the green color? <br>
Page 30 of 83
`CheckboxProlog("COLOR[3]")`
<input name="COLOR[3]" value="blue" type="checkbox"
`Checked("COLOR",3,"blue")` `disabled("COLOR")`>and the blue color? <br>
OrwithdifferentcharacteristicsCOLORRED,COLORGR,andCOLORBL:
`CheckboxProlog("COLORRED")`
<input name="COLORRED" value="red" type="checkbox"
`Checked("COLORRED",1,"red")` `disabled("COLORRED")`>you like the red color? <br>
`CheckboxProlog("COLORGR")`
<input name="COLORGR" value="green" type="checkbox"
`Checked("COLORGR",1,"green")` `disabled("COLORGR")`>and the green color? <br>
`CheckboxProlog("COLORBL")`
<input name="COLORBL" value="blue" type="checkbox"
`Checked("COLORBL",1,"blue")` `disabled("COLORBL")`>and the blue color? <br>
RadiobuttonforthecharacteristicCOLOR:
<input name="COLOR" value="red" type="radio" `checked("COLOR",1,"red")`
`disabled("COLOR")`>you like the red color?
<br>
<input name="COLOR" value="green" type="radio" `checked("COLOR",1,"green")`
`disabled("COLOR")`>or the green color?
<br>
<input name="COLOR" value="blue" type="radio" `checked("COLOR",1,"blue")`
`disabled("COLOR")`>or the blue color?
<br>
TextfieldforcharacteristicMYTEXT:
<textarea wrap="physical" rows="5" cols="75" name="`GetTextAreaName("MYTEXT",75)`"
`readonly("MYTEXT")`>`GetTextAreaContent("MYTEXT")`</textarea>
Note:PlacethecallforGetTextAreaContent directlybetween>andthe</textarea>.This
avoidsunwantedspacesatthebeginningofthetextbeingentered.
PredefinedstandardtextfieldsISR_NEW_TEXTandISR_TEXT
TheISRhasastandardtextfield,thecontentsofwhichareautomaticallytransferredto
thenotificationlongtext.Ifanadditionalcommentisenteredbythepersonenteringthe
requestorbythepersonprocessingit,thecommentisaddedtothenotificationlongtext.
Youcanalsoinsertanautomaticlogrowwiththedate,time,anduserinnotification
customizingintheSAPreferenceIMGunderCrossApplicationComponents
Internet/IntranetServicesInternalServiceRequestScenarioDefinitionPrepare
GeneralNotificationNotificationProcessingOverviewofNotificationType
FormatLongText.ThenewcommentsareenteredinthetextfieldISR_NEW_TEXT,
whileoldonesaredisplayedinthetextfieldISR_TEXT:
<!-- new comment when form is submitted or changed -->
Page 31 of 83
Buttons
Thestandardbuttonsforsubmitting,changing,andcheckingaredefinedasfollows:
<input type="submit" name="BUTTON_SEND" value="Absenden" `disabled("BUTTON_SEND")`
onclick="SAPEvent('SEND')">
<input type="submit" name="BUTTON_CHECK" value="Prfen"
`disabled("BUTTON_CHECK")` onclick="SAPEvent('CHECK')">
Thefollowingshowshowtocreatethebuttonforafreelydefinableusercommand(or
pagescrolling),whichcanbeevaluatedintheBAdIs:
<input type="submit" name="B_CALC" value="Rechnen" onclick="SAPEvent('CALC')">
ThefieldsontherequestformcanbeinitializedbymeansofaparameterizedURLcall.The
syntaxforinitializingtheCOLORcharacteristicwithREDandtheTASTEcharacteristicwith
GOODisshowninthefollowingexample:
.SCENARIO=MK01&scenario_params=COLOR=RED$TASTE=GOOD
4.4.2
Youcandefineanyinitializations,inputhelps,orverificationsdirectlyintheHTML
template.ModifytheHTMLtemplatesaccordingly.IfyouusethenormalJavaScript
methods,theverificationswillonlytakeplaceintheclientsandsotheperformancewillbe
better.IfyouusetheSAPHTMLBusinessfunctionsasthescriptlanguage,processingtakes
placeontheITS.Performanceisasgoodforinitializationsandinputhelpasitisinthe
JavaScriptsolution.Wherevalidationsareconcerned,theclientonlyJavaScriptsolutionhas
betterperformance.(ForinputhelpwithSAPHTMLBusinessfunctions,seesection4.3.1)
Page 32 of 83
4.4.3
Programming BAdIs
4.4.3.1 Methods for ISR BAdIs QISR1: Exits for Form Processing
UsingtheBAdIdefinitionQISR1,theISRenablesyoutocontroltheflowlogicforthe
requestforminR/3indetail.AtotaloffiveBAdImethodsareavailable:
Call ISR
Form
INT_SERVICE_REQUEST_INIT
(only in mode=CREATE)
Initialization
SCENARIO_SET_FORM_VIEW
PBO
SCENARIO_SET_ADDITIONAL_VALUES
SCENARIO_PROCESS_USER_COMMAND
INT_SERVICE_REQUEST_CHECK
(not in mode=DISPLAY)
PAI
No
Check ok
and SUBMIT
form?
Yes
Create/Change Notification
INT_SERVICE_REQUEST_INIT:Initializationisrunasthefirstmethodwhena
newrequestformiscalled(createmode).
SCENARIO_SET_FORM_VIEW:Determineformviewisrunwhenanewrequest
formiscalled(possiblyafterBAdImethodINT_SERVICE_REQUEST_INIT)
SCENARIO_SET_ADDITIONAL_VALUES(correspondstoPBOscreen):Set
additionalvaluesforinputhelpisrunwhenarequestformiscalled(create,display,
change)beforetheformisoutput
Note:Inthisexit,filltheinternaltableADDITIONAL_DATAwithvaluesthatare
neededbytheformatruntimebutarenotsavedintherequest.Thatis,hereyoucan
setvaluelistsfordropdownlistboxes(seeexamplesbelow)andcontrolparameters.
TheinternaltableADDITIONAL_DATAisnotdeletedautomaticallydatais
Page 33 of 83
retaineduntiltheformissubmitted.TheMODEparameterenablesyoutoconfigure
thelogicbasedonthecurrentmode(CREATE,CHANGE,DISPLAY).
SCENARIO_PROCESS_USER_COMMAND(correspondstoPAIscreen):Process
ownusercommandsisrunfirstwhenaneventistriggeredontherequestform
(check,submit,usercommand)
INT_SERVICE_REQUEST_CHECK:Checkisrunsecondwhenaneventis
triggeredontherequestform(check,submit,usercommand).(Thecheckistherefore
alwaysrunbeforethenotificationiscreated.)
Eventsontherequestform(check,submit,usercommand)areexecutedlast.
YoucancreatetheimplementationsfortheBAdImethodsforyourISRscenarioasfollows:
InthebasicCustomizingforyourISRscenario,chooseBusinessAddInwhichtakesyou
directlytotheBAdIbuilderfortheQISR1definition.Todisplayaparticularimplementation
oftheBAdImethodforascenario,chooseImplementationsDisplayanddoubleclickon
animplementation.Thefiltervalue(withthesamenameasascenario)indicateswhich
scenariotheimplementationbelongsto.Itispossibleformorethanonescenariotobe
assignedtoanimplementation(morethanonefiltervalue).Onceyouhaveselectedan
implementation,youcangototheBAdImethodsbydoubleclickingontheInterfacetab.The
programcodethatisdisplayedforeachmethodisonlyrunforthescenariosdefinedbythe
filtervalues.
Page 34 of 83
IfyouwanttocreateanewBAdIimplementationforyourscenario,chooseImplementations
Createandenteranamefortheimplementation.Enterashortdescription,andentera
scenarionameasthefiltervalue.Saveandactivatetheimplementation.Youcannow
programthedesiredmethods.Youmustthenactivatetheimplementation.
4.4.3.2 Data Structure in the ISR Framework
YoucanusethefollowingstandardISRdatastructuresforimplementingBAdImethods:
Name
Description
Category
FLT_VAL
Currentscenario
QSCENARIO
MODE
QISRDMODE
Currentprocessingmode(CREATE,CHANGE,DISPLAY);correspondstothetemplateparameter
ISR_MODE
FORM_VIEW
QISRDFORMVIEW
Currentformview(ISR_PROCESSorISR_REQUEST),correspondstothetemplateparameter
ISR_FORM_VIEW
PAGE
QISRDFORMPAGE
Currentpagenumber;correspondstothetemplateparameterISR_PAGE
GENERAL_DATA
QISRSGENERAL_PARAM
GeneralISRdata(requestedby,enteredby,priority,notificationshorttext,etc.)
SPECIAL_DATA
QISRTSPECIAL_PARAM
TablewithspecialrequestdatathatdependonthescenarioandthatwasdefinedascharacteristicsinISR
Customizing.Thetablehasarowforeachcharacteristic,withthecolumnFIELDNAME
ADDITIONAL_DATA QISRTSPECIAL_PARAM
Additionaltableforinputhelpvaluesetc.,whichcanbeusedasneeded
USER_COMMAND*
SYUCOMM
Thelastcommandthatwastriggeredontheform
RETURN*
BAPIRET1
Returnstructureforerrormessages
*onlyinBAdImethodSCENARIO_PROCESS_USER_COMMAND
4.4.3.3 Examples
Initialization(INITmethod)ofcharacteristicNEW_COSTCENTERwiththestandard
ISRparameterINITIATED_BYMASTER_CCTR:
* local data
Page 35 of 83
Outputnotificationwhenchecking(checkmethod):
*
IF general_data-initiated_by-lastname is initial.
message e105(qisr).
return-type = 'E'.
return-id = 'QISR'.
return-number = '107'.
EXIT.
ENDIF.
ProcessusercommandCALC(usercommandmethod):
data:
ls_special_data type qisrsspecial_param.
data:
ls_total
type i,
ls_monitor(1) type c.
* process user commands
case user_command.
when 'CALC'.
* read special data MONITOR
LOOP AT special_data INTO ls_special_data.
CASE ls_special_data-fieldname.
WHEN 'MONITOR'.
ls_monitor = ls_special_data-fieldvalue.
WHEN OTHERS.
ENDCASE.
ENDLOOP.
read table special_data into ls_special_data
with key fieldname = 'EST_COSTS'.
if sy-subrc eq 0.
* calculate estimated costs dependent on MONITOR
ls_total = 100.
if ls_monitor eq 'X'.
ls_total = ls_total + 350.
endif.
* write estimated costs into special field EST_COSTS
write ls_total to ls_special_data-fieldvalue LEFT-JUSTIFIED .
modify special_data from ls_special_data index sy-tabix.
Page 36 of 83
endif.
endcase.
Inputhelp(SetAdditionalDatamethod):
Tocreateinputhelpforacharacteristic(suchasAIRPORT)intheBAdI,youneedto
createtwoadditionalinternaltablesforthetextstobeprovided(suchas
AIRPORT_OPTION_LABEL)andthevaluetobetransferred(suchas
AIRPORT_OPTION).OntheHTMLtemplate,theinputhelpisdisplayedusinga
dropdownlistbox(section4.3).Foracompleteexample,seetheBAdIimplementation
forthestandardscenarioSH01ShuttletoAirport.
TomaketheeffectivenessofaBAdImethoddependonthemode:
ReadingandsettingthespecialrequestfieldsintheBAdImethods:
ItiseasytoaccessthegeneralrequestdataintheBAdIimplementationsbecausethisdata
istransferredtothemethodsasaGENERAL_DATAstructure.Thespecialrequestdata
definedascharacteristicsinISRCustomizing,ontheotherhand,islistedinatable.The
SPECIAL_DATAtablecontainsarowforeachcharacteristic.Therefore,itisnormally
necessarytotransferthistabulardataintocorrespondingapplicationstructuresatthestart
ofaBAdImethod,andthenwriteitbacktothetableattheendofthemethod.Two
functionmodulesareavailableforthispurpose:
ISR_SPECIAL_DATA_TO_STRUC
MovesthespecialrequestdatafromtheSPECIAL_DATAtabletoastructure.The
requestdatathathasthesamenameasafieldnameinthestructureistransferredfromthe
tabletothestructure.
ISR_STRUC_TO_SPECIAL_DATA
SameasISR_SPECIAL_DATA_TO_STRUCbutinthereversedirection.
Example1:StructurewithreferencetotheDDIC
* Stammdaten Innenauftrag:
DATA: ls_master_data TYPE bapi2075_7.
* spezielle Antragsdaten in Struktur fllen
CALL FUNCTION ISR_SPECIAL_DATA_TO_STRUC
EXPORTING
it_special_data = special_data
CHANGING
cs_data
= ls_master_data.
* weitere Verarbeitungsschritte
Page 37 of 83
*
* Zurckfllen der speziellen Antragsdaten
CALL FUNCTION 'ISR_STRUC_TO_SPECIAL_DATA
EXPORTING
is_data
= ls_master_data
CHANGING
ct_special_data = special_data.
Example2:Localstructure
* Stammdaten Innenauftrag:
DATA: BEGIN OF mydata,
order
TYPE aufnr,
description(40) TYPE c,
END OF mydata.
* spezielle Antragsdaten in Struktur fllen
CALL FUNCTION ISR_SPECIAL_DATA_TO_STRUC
EXPORTING
it_special_data = special_data
CHANGING
cs_data
= mydata.
* weitere Verarbeitungsschritte
*
* Zurckfllen der speziellen Antragsdaten
CALL FUNCTION 'ISR_STRUC_TO_SPECIAL_DATA
EXPORTING
is_data
= mydata
CHANGING
ct_special_data = special_data.
YoucanusethesamefunctionmodulesforreadingandsettingtheADDITIONAL_DATA
table.
Page 38 of 83
Todesignformsforyourportal,youonlyneedtocreatetwoJavaServerPages(JSPs).The
followingsectionexplainsthesyntax,structure,andlayoutoftheJSPs.
Unfortunately,itiscurrentlynotpossibletohaveaJavaiViewgenerated.Thereforeyouneed
tocopyanexistingJavaiView,modifyit,andinstallitinyourPortal.Thisprocessis
describedinmoredetailbelow.
YoucanonlyassignoneJavaiView(whichdeterminesthelayoutoftherequestform)toeach
ISRscenario.TheJavaiViewforanISRrequestformhasthefollowingfilesthatarestoredin
aPARfile:
The*.parfilehastwoJSPpagesthatdeterminethelayoutoftherequestform(IsrMain.jsp)
andtheconfirmationpage(IsrConfirmation.jsp)(successmessageoncetherequesthasbeen
submitted).Thedefault.propertiesfilecontainsthereferencetoagenericJavaservice
(com.sap.pct.fin.isrprocessevent)thatimplementsthegenericflowlogicofanISRrequest
form.ThisgenericJavaservicemustnotbechanged.
Theoriginal*.jarfileortheManifest.mffileisnotneeded.
TocreateanewJavaiView(suchasISR_TEST)foracertainR/3scenario(suchasTEST):
1. Copyoneofthesupplied.parfiles(suchascom.sap.pct.fin.isr_sor1mpo.par)andrename
thenew.parfile(suchasisr_test.par).
2. Extractisr_test.partothelocalC:\directoryonyourcomputerusingWinZiporasimilar
program.
SettheUsefoldernameindicatorwhenyoudotheextraction.
3. Indefault.properties(underC:\profiles\...),maintainthescenariokeydefinedinR/3(such
asIsrScenario=TEST)andthenameofthelogicalsystem(suchas
SystemIdentifier.value=SAP_R3_Financials).
Example:
Page 39 of 83
4. Thenewisr_test.parfilecontainstwoJSPs.Theseare:
15. Requestform(C:\pagelet\IsrMain.jsp)
16. Confirmationpage(C:\pagelet\IsrConfirmation.jsp)
IfyouuseBusinessPackageMSS50.1,thenamesofthesetwofilesmustnotbechanged.
ThemaintaskisnowtomodifytherequestformIsrMain.jsportheconfirmationpage
IsrConfirmation.jsp(seethefollowingsection).
IfyouuseBusinessPackageMSS50.2,youcanuseyourownJSPforIsrMain.jspwitha
nameyouassign(suchasMyOwnMain.jsp)insteadofIsrMain.Enterthenameofyour
JSPindefault.propertiesasthevalueofparameterIsr_NewMainJsp(seeunder2.).
InthiscaseyoucreatetheJSPinthefolderC:\pagelet\(suchasMyOwnMain.jsp).You
musttheninserttheJSPintothe*.parfile(suchasisr_test.par)asdescribedbelow.Ifyou
useyourownJSP,donotdeleteIsrMain.jsp.YoucannotreplaceIsrConfirmation.jspwith
yourownJSP.
Onceyouhavesetuptherequestform,addthedatayouchangedinsteps3and4using
AddtoZipfromtheWinZipprogramtothe.parfilecopiedinstep1(suchasisr_test.par)
usingthefollowingWinZipsettings:
Page 40 of 83
Makesurethatthepathsofthefilesinthecopied*.parfilesmatchthepathsinthe
original*.parfile.Thisshould,however,beachievedbyselectingSaveextrafolderinfo.
5. EnterthenameofthenewJavaiViewinextendedISRCustomizing(view:
V_SCENARIOXMPOorwithtransactionsQISRSCENARIO(sinceMSS50.2)or
SIMG_SPORT(MSS50.1))astheportalcomponent(suchasisr_test.default).Useupper
andlowercasesasappropriate.
6. LoadthenewJavaiViewwiththeiViewPDKContentAdmin.ArchiveUploaderin
EnterprisePortal5.0.
Caution:Makesurethatthemenupathsinthe.parfilearenotlostwhenyouprocessthe
files.
5.2
Layout Options
TheISRframeworkisdesignedtoensureasmuchfreedomaspossiblewhencreatingrequest
forms,andatthesametimetoincludeasmanystandardrequestsaspossible.Youtherefore
createyourownJSP(IsrMain.jsp)foreachISRscenario,whichyoucanmodifyasneeded.
Thelayoutoptionsaredescribedbelow,startingwiththemostbasic.
NotethatintheWebbrowsertheformisstateless.Thismeansthereisonlyaconnection
betweentheserverandR/3whenyouaccesstheformagain,orwhentheformisprocessed
Page 41 of 83
forexamplebychoosingapushbuttonandtheflowlogicoftheformisprocessed.This
ensuresthebestpossibleperformancewhenmanyusersareusingtheISRframeworkatthe
sametime.Forthisreasonitisnecessarytostoresomeformspecificandscenariospecific
parametervaluesinthebrowsertemporarily.Thisisachievedwiththehiddeninputfields.
Example:
<input type="hidden" id="SCENARIO" name="SCENARIO"
value='<%= ISR.getScenario() %>'>
TheselinesshouldthereforenotbemissingormodifiedinanyJSP.
IsrMain.jspmustalwayshavethefollowingstructure.Copyingandmodifyinganexisting
scenarioassuresthattheJSPcontainsallnecessarydirectives.
<%@taglib uri="htmlbtld" prefix="hbj" %>
<%@ page session="true" %>
<jsp:useBean id="ISR" scope="request" class="com.sap.pct.fin.util.isrprocessevent.IsrBean" />
<jsp:useBean id="ISRBundle" scope="page"
class="com.sap.pct.fin.util.isrprocessevent.IsrBundle" />
<%-- Main ISR page to display the service request form in all modes (CREATE; DISPLAY; CHANGE)
--%>
<hbj:content id="myContext" >
<hbj:page title="Service Request: Name Of The Request">
<jsp:setProperty name="ISRBundle"
property="pageContext"
value="<%= myContext %>"
/>
<hbj:form id = "myForm">
<%-- Hidden input fields for statelessness --%>
<input type="hidden" id="SCENARIO" name="SCENARIO"
InsertyourrequestfieldsorotherHTMLhere
</hbj:form>
</hbj:page>
</hbj:content>
Page 42 of 83
5.2.1
Images
YoucanaddgraphicsasGIFfiles.
Toadda.giffiletoyour.parfile(suchasisr_test.par),usetheAddtoZipfunctioninWinZip.
Makesurethatthepathofyour.giffileinthe.parfilematchesthepathimages\...ofthe
existingfileerror.gif.
YouinsertyourfileintotheJSPasshownbelow.The.giffileinthisexamplehasthename
TRAFFIC_LIGHT_RED.GIF.TheIDparametercanbefilledasneeded(suchas
ownpicture):
<hbj:image id="ownpicture"
src='<%= componentRequest.getResource(componentRequest.getComponentContext().
getComponentName(), "image", "images/" +
"TRAFFIC_LIGHT_RED.GIF").
getResourceInformation().getURL(componentRequest) %>' alt="E" />
5.2.2
YouaccesstheformdatathatwasinitializedandtestedinR/3byusingagenericJavabean.
Youcanaccessthevalue,thelabel(short,medium,long),theoutputlength,andtheready
forinputstatusofallthecharacteristicsdefinedinthescenario.Thefollowingmethodsare
available(suchasfortheNEW_USERcharacteristic):
<%=
<%=
<%=
<%=
<%=
<%=
5.2.3
ISR.getValue("NEW_USER") %>
ISR.getLabelK("NEW_USER") %>
ISR.getLabelM("NEW_USER") %>
ISR.getLabelL("NEW_USER") %>
ISR.getSize("NEW_USER") %>
ISR.getDisabled("NEW_USER") %>
EnterprisePortal5.0enablesflexibleyetuniformcreationoftheportallayoutusing
standardizedCSSstylesheets.Thesecanbeadaptedtothebrandingofyourcompanybythe
portaladministrator.Theendusercanselectthelayoutfortheirportalfromastandard
selectionoflayoutthemes.AprerequisiteofastandardlayoutforthecentralCSSstylesheets
isthattheJavaiViewsuseHTMLbusinesscontrols(HTMLB).HTMLBalsoenables
effective,timesavingprogrammingofformelements,andisthususedfortheISRaswell.
TheHTMLBtaglibdirectiveisdefinedatthebeginningofIsrMain.jspandIsrConfirmation:
<%@taglib uri="htmlbtld" prefix="hbj" %>
5.2.4
YoucancreatedifferentlayoutsforthedifferentrequestmodesusingtheISR_MODE
parameterintheJSP.Dependingonthemode,thisparameterhasthevalueCREATE,
CHANGE,orDISPLAY.YoucouldthereforeaddapushbuttonsuchasSendintheCreate
modeasfollows:
Page 43 of 83
5.2.5
Itisoftenthecasethattheprocessorneedstohavemorerequestfieldsthantheuserswho
entertherequests.TheparameterISR_FORM_VIEWisprovidedintheJSPforthispurpose.
ThishasthedefaultvalueISRREQUEST.Whentheprocessorcallsuptherequestform,it
hasthevalueISR_PROCESS(orISR_APPROVEforthepersonapproving).Youcandisplay
anextrafieldfortheprocessorasfollows:
<% if (ISR.getValue("ISR_FORM_VIEW").equals("ISR_PROCESS") == true) { %>
<hbj:button id="SEND"
text="Send"
tooltip=Send request
onClick="submit"
design="emphasized"
/>
<% } %>
Tocontrolthelayoutinmoredetail,youcanalsosettheparameterISR_FORM_VIEWfrom
withintheBAdImethods(seesection4)usingrulesthatyoudefine.
5.2.6
YoucanusetheISRframeworktodefinerequestformswithmultiplepagesforamore
structuredentryofdata(ifnecessary,youcandisplaytheentriesmadeonthepreviouspages
onthefinalpage). TheparameterISR_PAGEisprovidedforthispurposeintheJSP. Youcan
scrollbackwardsorforwardsusingbuttonsthattriggeroneoftwoISRstandardcommands:
NEXT_PAGE:Onepageforward
PREV_PAGE:Onepageback
<hbj:button id="PREV_PAGE"
text="<- previous page"
tooltip="previous page"
onClick="submit"
design="emphasized"
/>
<hbj:button id="NEXT_PAGE"
text="next page ->"
tooltip="next page"
onClick="submit"
design="emphasized"
/>
Page 44 of 83
Whenoneofthesecommandsistriggered,thenumberofthecurrentpage(parameter
ISR_PAGE)isautomaticallyincrementedordecrementedbyone.Ifamorecomplex
scrollinglogicisrequired(forexample,dependingontheentriesmadeonthepage),youcan
explicitlysetthevalueoftheparameterISR_PAGEintheBAdImethods.
5.2.7
Multiple Languages
Therequestfieldsthatyoudefinedascharacteristicshavedescriptionsthatcomefromthe
requestfieldsfromR/3.Thismeansthatthedescriptionsareavailableinallrequired
languages.
Inaddition,standardtextsareprovidedforlongtexts,erroroutput,andbuttonsbymeansof
theresourcebundleISRBundleintheJSP.Thismeansthatyoucandisplaytheheaderforthe
longtextasfollows:
<hbj:textView text="<%= ISRBundle.getLocalString(\"oldcomment\") %>" design="LABEL"/>
Youcanalsodefineyourownresourcebundleswiththestandardtechniquesandusethemin
theJSP.
5.2.8
Youcandisplayfieldsdependingonthevaluesofindividualcharacteristics(suchas
ORDER):
<% if (ISR.getValue("ORDER").equals("403567") == true) { %>
<hbj:inputField id="NEW_USER"
type="String"
visible="true"
disabled='<%= ISR.getDisabled("NEW_USER") %>'
value='<%= ISR.getValue("NEW_USER") %>'
size='<%= ISR.getSize("NEW_USER") %>'
/>
<% } %>
Inputfield(onerow)forthecharacteristicCOLOR:
<hbj:inputField id="COLOR"
type="String"
visible="true"
disabled='<%= ISR.getDisabled("COLOR") %>'
value='<%= ISR.getValue("COLOR") %>'
size='<%= ISR.getSize("COLOR") %>'
/>
Dropdownlistbox(inputhelp)forthecharacteristicCOLOR:
Youcangeneratethevaluelistforthedropdownlistbox(suchasCOLOROPTIONand
COLOROPTIONLABEL)intheBAdIMethod
SCENARIO_SET_ADDITIONAL_VALUES.(Intheexampleshown,selectinganentry
Page 45 of 83
CheckboxforthecharacteristicCOLOR:
<hbj:checkbox key="COLOR"
id="ID1"
text="Checkbox Color"
tooltip="Click the checkbox"
disabled='<%= ISR.getDisabled("COLOR") %>'
checked='<%= ISR.getChecked("COLOR") %>'
encode="false"
/>
RadiobuttonforthecharacteristicCOLOR:
<hbj:radioButtonGroup id="COLOR" columnCount="2"
selection='<%= ISR.getValue("COLOR") %>'>
<hbj:radioButton id="R1"
key="red"
text="Choice: red"
tooltip="Chose red"
disabled='<%= ISR.getDisabled("COLOR") %>'
encode="false"
/>
<hbj:radioButton id="R2"
key="blue"
text="Choice: blue"
disabled='<%= ISR.getDisabled("RADIO") %>'
/>
</hbj:radioButtonGroup>
Textfield(multiplerows)forthecharacteristicMYTEXT:
<hbj:textEdit id="MYTEXT"
text='<%= ISR.getTextAreaContent("MYTEXT") %>'
cols="80"
rows="5"
/>
PredefinedstandardtextfieldsISR_NEW_LONG_TEXTandISR_LONG_TEXT
TheISRhasastandardtextfield,thecontentsofwhichareautomaticallytransferredto
thenotificationlongtext.If an additional comment is entered by the person entering the
request, the person approving it, or the person processing it, the comment is added to the
Page 46 of 83
notification long text. You can also insert an automatic log row with the date, time, and
user in notification customizing in the SAP reference IMG under Cross-Application
Components Internet/Intranet Services Internal Service Request Scenario
Definition Prepare General Notification Notification Processing Overview of
Notification Type Format Long Text.Newcommentsareenteredinthetextfield
ISR_NEW_LONG_TEXT,whileoldonesaredisplayedinISR_LONG_TEXT:
<hbj:textEdit id="ISR_LONG_TEXT"
text='<%= ISR.getTextAreaContent("ISR_LONG_TEXT") %>'
cols="80"
rows="5">
<%
ISR_LONG_TEXT.setDisabled(true);
%>
</hbj:textEdit>
<hbj:textEdit id="ISR_NEW_LONG_TEXT"
text='<%= ISR.getTextAreaContent("ISR_NEW_LONG_TEXT") %>'
cols="80"
rows="5"
/>
Buttons
Thestandardbuttonsforsubmitting,changing,andcheckingaredefinedasfollows:
<hbj:button id="CHECK"
text="Check"
tooltip="Submit ISR-Form"
onClick="submit"
design="emphasized"
/>
<hbj:button id="SEND"
text="Send/Save"
tooltip="Submit ISR-Form"
onClick="submit"
design="emphasized"
/>
Youcancreatethebuttonforafreelydefinableusercommand(whichcanbeevaluatedin
theBAdIs)bydefiningtheIDofthebuttonaccordingly. TheIDisavailableasauser
commandintheR/3BAdIs.
Date field
Prerequisite: Business Package MSS 50.2 and the correction in OSS Note 552175 in your
plug-in system.
You can also use the date field together with HTMLB input help. To do this, assign the
value true to the parameter showhelp.
EntryfieldforcharacteristicDATE:
<hbj:inputField id="DATE"
type="Date"
showhelp=true
visible="true"
Page 47 of 83
Positioning
HTMLBandthegridlayoutsenablerelativepositioning. However,youcanalsoposition
withalloftheotherHTMLmethods,suchas:
<table border="0" align="center" width="98%"><tr><td>
</td></tr></table>
HTML methods are sometimes advantageous when you want to improve the performance
of the form.
<hbj:gridLayout>
<hbj:gridLayoutCell rowIndex="1" columnIndex="1">
<hbj:textView text="NOTIF_NO_OUT" design="LABEL"/>
</hbj:gridLayoutCell>
<hbj:gridLayoutCell rowIndex="1" columnIndex="2">
<hbj:textView text='<%= ISR.getValue("NOTIF_NO_OUT") %>'/>
</hbj:gridLayoutCell>
<hbj:gridLayoutCell rowIndex="2" columnIndex="1">
<hbj:textView text="RETURN-MESSAGE" design="LABEL"/>
</hbj:gridLayoutCell>
<hbj:gridLayoutCell rowIndex="2" columnIndex="2">
<hbj:textView text='<%= ISR.getValue("RETURN-MESSAGE") %>'/>
</hbj:gridLayoutCell>
</hbj:gridLayout>
ThefieldsontherequestformcanbeinitializedbymeansofaparameterizedURLcall.The
syntaxforinitializingtheCOLORcharacteristicwithREDandtheTASTEcharacteristicwith
GOODisshowninthefollowingexample:
.isr_test.default?SCENARIO_PARAMS=COLOR=RED$TASTE=GOOD
5.4.2
Youcandefineanyinitializations,inputhelp,andverificationsdirectlyintheJSP.Modifythe
JSPsaccordingly.IfyouusethenormalJavaScriptmethods,theverificationswillonlytake
placeintheclients,whichimprovesperformance.IfyouuseJavaasthescriptlanguage,
processingisontheWebserver.AllR/3data(suchasvalidationtables)isavailablefor
initializationsandinputhelpintheR/3BAdIs.
Page 48 of 83
5.4.3
Programming BAdIs
TheR/3logicwithJavaiViewsisbasicallythesameasthatwithInternetServices(ITS).See
section4.4.3.
WithoutTemplate:
AnnewemptyAdobeformiscreated.The characteristics of the scenario are transferred to
the data part of the form and are available on the body page of the form layout for data
binding of the fields and form elements to be defined.However,thelayout(bodypage)is
empty.YoumustmanuallymodifythelayoutusingthescreenelementsoftheLibrary
(rightside)bydragginganddroppingthem.
WithTemplate(fromScenario):
AnexistingAdobeformiscopied.In addition to the characteristics of the new scenario,
the characteristic of the template scenario are transferred to the data view data container of
the new form and the new interface.
GenerateForm(SAPDesign):
AnewAdobeformiscreatedbasedonthetemplateISR_FORM_SCENARIO.Thisform
hastheSAPstandarddesignusedinallstandardscenarios.Theformcontainsvarious
graphicalelementsthatyoucanuseasatemplateforcustomfieldsandelementsonthe
form.You can also use the ISR Controls library.Forinformationabouthowtoobtainthis
library,seeNote741381.(ItisplannedtoshiptheISRLibrarywiththeSAPGUIinthe
future.)
WiththeformgeneratedthusfaryouaccesstheFormBuilder(seefigurebelow),whichyou
canalsoaccessdirectlywithtransactionSFP.TheAdobeformisaclientindependent
workbenchobject.Thismeansthattogenerateanewform,youneedacustomerpackageto
whichtheworkbenchobjectformisassigned.Forthisyouneedatransportrequesttobeable
Page 49 of 83
totransporttheformtoothersystems.Insteadoftransportingtheform,however,youcanalso
createitasalocalobject.
YoucannowmakechangestotheformintheFormBuilder(forexplanations,seebelow).
Whenyouarefinished,youmustsaveandactivatetheform.
Page 50 of 83
ThestructureCONTROL_PARAMisonlyforinfluencingthelayoutofthescreen
elementsatruntime.UsingthescriptlanguageoftheFormBuilderandthecontentof
CONTROL_PARAMoftheFormBuilder,anyfieldcanbesettovisible/notvisible,
readyforinput/notreadyforinput,etc.Fordetailedexplanationsontheuseofthe
FormBuilderscriptlanguageinR/3,seethedocumentation(section6.7).For
examplesregardingtheuseofthescriptlanguage,seethescreenelementsoftheISR
Library(seebelow)oroftheformsshippedbySAP.Thestructure
CONTROL_PARAMcontainsthefollowingfields:
ISR_MODE(=CREATE,CHANGE,DISPLAY)indicatesthemodeoftheform
ISR_REQUEST_NOcontainsthenotificationnumber(ifavailable)
ISR_EVENTcontainsthelasteventfired.Thisparametermustbeusedfor
customerdefinedeventsonpushbuttons.Whenthepushbuttonisexecuted,event
CHECK_DATEfires.ThiseventcanbeevaluatedinthecorrespondingBAdI(see
section4.4.3).
Exampleforpushbuttonscriptwithevent:
data.#subform[0].Button::mouseDown(FormCalc,client)
//SetISR_EVENTforBAdIprocessinginbackend
$record.CONTROL_PARAM.ISR_EVENT="CHECK_DATE"
data.#subform[0].Button::click(JavaScript,client)
//TriggercalltobackendforBAdIusercommandprocessing
app.eval("event.target.SAPSubmit();");
ISR_FORM_VIEW(=ISR_REQUEST,ISR_APPROVE,ISR_PROCESS)
containsthecurrentISRrole(applicant,approver,processor)oftheuserthatjust
accessedtheform.
ISR_PAGEcontainsthepageoftheform(defaultvalue1)
ISR_REVIEWhasthevalueXassoonastheperspectiveReviewandSubmit
appears(thisperspectiveisonlyprovidedtotheapplicant).
ISR_CONFIRMATIONhasthevalueXassoonastheperspectiveConfirmation
appears(thisperspectiveisonlyavailableintheCREATEandCHANGEmodes).
Exampleforascript(FormCalc)ofaninputfield:
data.#subform[0].TextField1[1]::ready:form(FormCalc,client)
//CheckISRcontrolparametersforread/writeaccess
if($record.CONTROL_PARAM.ISR_REVIEW=="true"|
Page 51 of 83
$record.CONTROL_PARAM.ISR_MODE=="DISPLAY"|
$record.CONTROL_PARAM.ISR_FORM_VIEW=="ISR_APPROVE")
then
this.access="readOnly"
endif
Thefieldisnotreadyforinput
o whentheformisdisplayedintheperspectiveReviewandSubmit
o whentheformisaccessedindisplaymode
o fortheapproverrole
6.3 Automatic Generation of New Characteristics
WhenyousaveandexittheFormBuilder,adialogboxappearsinwhichyoucanhave
thesystemgeneratenewcharacteristicsinISRbasiccustomizing.
ThepushbuttonImportFormFieldsnexttotheformfieldaddsnewcharacteristics
basedontheformopposite.
IfyouhaveaddednewformelementsintheFormBuilderforwhichthereisnolinkagetoa
characteristicintheDataView(thatis,thereisnodatabindingbetweentheformelementand
acharacteristic),acharacteristicisgeneratedwiththesametechnicalnameastheform
element(specifiedintheFormBuilderfortheformelementunderObjectBindinginthe
Namefield).Thenameofthecharacteristicistakenfromthedescriptionentereddirectlyon
theformelement.Thedatabindingwiththeformelementisthenaddedtotheform
automatically.
Notes:
Ifmorethanoneformelementhasthesametechnicalname,thecharacteristicisonly
createdonce.
Thegeneratedcharacteristicsarenormallyuntyped.Exception:formfieldsofthetype
DatearegeneratedwiththeDDICreferencefieldSYDATUM.
Whennewcharacteristicsaregenerated,existingcharacteristicsarenotchanged.
IfnewcharacteristicsareaddedmanuallyinISRCustomizing,theycanbetransferred
withtheChangepushbuttonintheDataViewcontextoftheform(dialogbox).
6.4 Definition of New Screen Elements on the Form
OntherightsideofthescreenintheLibrary,chooseascreenelement(suchasTextEdit)
fromatab(suchasStandard)andselectit.Thendragittothebodypage.Youcanthen
modifytheattributesoftheelement(size,position,description,fieldtype,etc.).Youcanthen
manuallylinkthenewscreenelementtoanexistingcharacteristicfromISRCustomizing,or
havethesystemgenerateacharacteristicautomatically.
Page 52 of 83
Whencharacteristicsaregeneratedautomaticallybasedonnewformelements,the
databindingtotheformelementsisgeneratedaswell(seesection6.3).
6.6 Testing
BeforeyoucantesttheAdobeformwiththetestfunction(testsymbolnexttotheform),the
portalservermustbespecifiedinR/3Customizing.Todothis,gotoAdditionalDatafor
ScenarioandchooseServer.Inthetable,selectAdobeServerandentertheURLforthe
server(suchasHTTP://<your
server>/WEBDYNPRO/DISPATCHER/SAP.COM/PCUI_GP~ISR/).Replace<yourserver>
withthenameofyourserverandtheport.Example:PGWDF123.WDF.SAP.CORP:40000.
Thisserversettingappliestoallscenariosinthatsystemandclient.
6.7 Additional Documentation
FormoreinformationondefiningAdobeforms,seethedocumentationfortheFormBuilder
intheSAPLibraryunderSAPNetWeaverApplicationPlatform(SAPWebApplication
Server)BusinessServicesPDFBasedForms.
IfyouwanttoenterformsinSAPdesign,seetheDesignGuidelinesforAdobeformsinSAP
design,availableintheSAPServiceMarketplaceunderservice.sap.com/isr.For
suchforms,SAPprovidesacollectionofpredefinedscreenelementsasanadditionalLibrary
(ISRLibrary),whichyoucanuseintheFormBuilder.Note741381describeshowtoobtain
thisISRLibraryandaddittotheFormBuilder.
Page 53 of 83
6.8 Standard and Custom Scenarios with Adobe Forms in the SAP Enterprise
Portal
TheAdobeformsaretechnicallypartoftheWebDynproapplicationIsrForminthe
DevelopmentComponent(DC)ISRfromtheSoftwareComponentPCUI_GP.
IfyouwanttousecustomscenarioswithAdobeformsinyourEnterprisePortal,youneedto
defineaniViewbasedontheWebDynproapplicationIsrFormandaddittoyourportal.You
canoptionallyusethegeneraliViewIsrAdobeForm(com.sap.pct.isradobeform)withthePCD
parametersscenarioandmode.ThisiViewisdeliveredwithmySAPERP2004SP2.Youcan
alsouseitasatemplateforcustomiViews.
ScenariosProvided
TheWebDynproapplicationIsrFormconsistsofa"roadmap"withthreesteps(1:Data
entry,2:Checkandsubmit,3:Confirmation)alongwiththeAdobeformandpushbuttonsfor
navigatingbetweenthesteps(seefigurebelow).
AllsuppliedscenariosoftheISRareintegratedinotherWebDynproapplications,soaccess
tothemiscontextsensitive.
Twosolutionsareavailable:
DirectintegrationintheroadmapofotherWebDynproapplications
Example:PersonnelChangeRequest(PCR)intheBusinessPackageMSS
Indirectintegrationthroughascenariogroup
Scenariogroupsareusedforcontextbasedaccesstooneormorescenariosbymeans
ofanapplicationtoolbar.Youcontrolwhichscenariosareavailableintheapplication
toolbarinCustomizingunderCrossApplicationComponentsInternet/Intranet
ServicesInternalServiceRequestScenarioDefinitionDefineScenarioGroups.
Youcanalsoreplacethestandardscenarioswithyourowncustomscenarios.
Youcanprogramacheckroutineforeachscenariothatverifieswhetherthecontextinwhich
thescenarioisaccessediscorrect.Ifthecontextisnotcorrect,youcanhaveanerrormessage
issuedthatpreventstheISRformfrombeingaccessed.Todothis,useBAdIQISR6with
methodSCENARIO_CHECK.
Note:TheseISRformsmustusecontextsensitiveaccess(example:EquipmentMonitor).
ContextsensitivemeansthatwhenanISRformisaccessedfromamonitor,dataontheobject
selectedinthemonitoristransferredtotheinternalservicerequest.Itmustbepossibleto
processthisdatainyourform.Formoreinformation,refertothedocumentationonthe
suppliedscenarios.
Page 54 of 83
Page 55 of 83
Youconfiguretheworkflowasfollows:
Activate the Workflow for General Notifications
FirstyouactivatetheworkflowforGeneralNotifications.YoudothisinCustomizingunder
CrossApplicationComponentsInternet/IntranetServicesInternalServiceRequest
ScenarioDefinitionPrepareGeneralNotificationNotificationProcessingActivate
WorkflowTemplateandAssignProcessor.
Page 56 of 83
UnderActivateeventlinking,activatethetwoworkflowtemplatesdescribedaboveforthe
threenamedevents:
AssignProcessorstoStandardTasksintheWorkflow
Theworkflowtemplatefornotificationprocessing(3100019)containsfourstandard
workflowtasks,whicharegenerallyexecutedinthefollowingsequence:
ApproveNotification(20000906)
Thesystemcheckswhetheranewnotificationrequiresapproval.Ifso,thisstandard
taskissenttotherelevantpersonforapproval.
ProcessNewNotificationsorNotificationsBackinProcessing(20000889)
Whenanewnotificationiscreatedoranotificationisbackinprocessingandnoopen
tasksexist,thestandardworkflowtaskissenttotheprocessorifapprovalwasgranted
ornoapprovalisneeded.
ProcessNotification(20000890)
Ifanewnotificationiscreatedoranotificationisbackinprocessingandopentasks
exist,thestandardworkflowtaskissenttotheprocessorifapprovalwasgrantedorno
approvalisneeded.
CompleteProcessing(20000887)
Ifnoopentasksexist,thisstandardworkflowtaskissenttotheprocessor.Onceall
tasksarecompleted,theprocessormusteithercloseprocessingorinitiatenewtasks.
Theprocessorofthislasttaskthusactsasacoordinator.
Note:Thistaskcannotbecompletedautomaticallybydefault.Itisnotpossibleto
closethenotificationautomaticallyaftercompletionofalltasks.Ifyouwanttoavoid
manualprocessing,seewhetheryourscenariocanbestructuredwithoutusingtasks.
Theprocessor/approverisselectedbasedontwocriteriathatmustbothbefulfilled:
Thispersonisassignedastheprocessorinworkflowcustomizingforthestandardtask.
Innotificationcustomizing,thispersonmustbeenteredinthepartnerfunctionperson
responsibleorapprover(section5.4.1ProcessorDeterminationinNotificationsand
Tasksdescribesthisindetail).
Thismeansthatauserenteredinthenotificationastheresponsiblepersonortheapprover
willnotreceiveaworkflowtaskunlessheisassignedtothattaskinworkflowcustomizing.
Instead,theworkflowtaskissenttoallotherusersassignedtothattaskinCustomizing.The
samethinghappensifnopersonresponsible/approverisenteredinthenotification.
Whendistributingthetasks,theworkflowalwayscomparesthelistofpossiblereceiverswith
theusersenteredinthenotification.Thistakesplaceusingstandardroles20000116
Page 57 of 83
(approval)and20000101(residualtasks)enteredinthestandardworkflowtaskspleasedo
notmodifythesestandardroles.
Theworkflowtemplatefornotificationprocessing(20001028)containsastandardworkflow
task:
CompleteTask(20000886)
Senttothetaskprocessorwhenthetaskiscreated.
Assignment of the processor to the standard workflow tasks takes place in Customizing under
Cross-Application Components Internet/Intranet Services Internal Service Request
Scenario Definition Prepare General Notification Notification Processing Activate
Workflow Template and Assign Processor Assign Agents.
7.3 Partner Functions and Partner Determination Procedures
Notificationprocessingcaninvolvevariouspeoplewithdifferentfunctions.Thepredefined
functionsforISRare:
AB=ResponsibleDepartment
Organizationalunitresponsibleforprocessingtherequest
AO=Author
Userwhosubmittedtherequest
KU=Coordinator
Userwhoprocessesthenotification,orcoordinatesitsprocessing
A=ISRContactPerson
UserwhobuilttheISRscenarioorisresponsibleforit.
G=Approver
Userwhoapprovesthenotification
P=TaskProcessor
Userwhoprocessesthetask
ThesepartnerfunctionsaredefinedinpartnerdefinitionprocedureSR00,whichisassignedto
theISRnotificationtypes(notificationtypes19,5079).Partnerfunctionsdefineonlyone
nameforaroleandtherelevantpartnertype(user,organizationalunit).
IfyourequireotherpartnerfunctionsforyourISRscenarios,youcandefineyourownpartner
determinationprocedure(listofpossiblepartnerfunctions)andassignittothecorresponding
notificationtype.SeeCustomizingunderCrossApplicationComponentsInternet/Intranet
ServicesInternalServiceRequestScenarioDefinitionPrepareGeneralNotification
NotificationCreationPartnerDefinePartnerDeterminationProcedures.
Page 58 of 83
IntheCustomizingactivityDefinePartnerDeterminationProcedures,chooseGeneral
Notification.Createanewpartnerdeterminationprocedureandenterthedesiredpartner
functionswiththecorrespondingpartnertypes.Formoreinformationonpartner
determinationprocedures,partnerfunctions,andpartnertypes,refertothedocumentationfor
theCustomizingactivity.
7.4 Processor Determination from the Standard Role in the Workflow
7.4.1
Regardlessofwhetheryouusetheworklistortheworkflow,youcanfindtheprocessorofa
notificationortaskusingthestandardfunctionfromtheworkflow.
Withnotifications,youmaintainthestandardroleinCustomizingfornotificationtypesunder
CrossApplicationComponentsInternet/IntranetServicesInternalServiceRequest
ScenarioDefinitionPrepareGeneralNotificationNotificationCreationPartner
DefinePartnerDeterminationProceduresAssignPartnerFunctionstoNotificationType.
SelectanotificationtypeanddoubleclicktheentryAssignPartnerFunctionstoNotification
Type.
UnderPartnerFunctionsforNotificationProcessinginthePersonResponsiblefield,selecta
partnerfunctiondefinedinyourpartnerdeterminationprocedure(normallyCoordinator).
Enterthedesiredstandardworkflowinthenextfield.
Page 59 of 83
To define the approver, select the Approval required indicator at the bottom of the screen and
enter Approver as the partner function in the Partner Function for Approver field.Entera
suitablestandardworkflowroleinthenextfield.
Youcanusethepushbuttonstogotothemaintenancescreenforworkflowstandardroles(see
nextsection).Ifyouhavenotcreatedastandardrole,youcandefineitusingtransaction
PFAC.
Fortasks,youcanenterafixedprocessororastandardrolewithflexibleprocessor
determinationdirectlyinISRCustomizing(entryTasks)forthecorrespondingtask.(ISR
Customizingthentakespriorityoverthestandardrolesfortaskprocessingthataremaintained
directlyinthenotification.)
7.4.2
The standard role for the workflow enables flexible processor determination.Theprocessor
ofthenotificationortaskcanbeselectedbasedonthescenarioandtheinputvaluesonthe
requestform(suchasthecostcenterofthepersonenteringtherequest).
Page 60 of 83
Note that the standard role must return objects with partner types (such as User) from the
chosen partner function so that the object can be transferred to the notification. For example,
task processors (partner type User) must be users.
Use the Create symbol to go to the maintenance transaction (PFAC) for standard roles.
In the Role definition, enter an abbreviation, a description, and the role type
Responsibilities (Note: The ISR framework supports only the role type
Responsibilities at the moment).
Inthedescription,youdefineinformationforthisstandardrole.Notethatthis
standardroleappliesforallISRscenariosofthisnotificationtype.
In the Role Container, you refer to any characteristics that you defined specifically for
ISR scenarios (input fields on the request form), and/or to table fields from the
VIQMEL (notification-specific data) structure.
The role container should always include VIQMEL-AUSWIRK (scenario name) to
enable you to organize processor determination specifically for a scenario.Choosethe
first'+'symbol(insertcontainerelement)andaffirmthesubsequentdialogbox(with
referencetodictionary).EntertableVIQMEL,thenENTER.Youseeallthefields
fromthetable.SelectthefieldAUSWIRKandconfirmyourentry.In the subsequent
dialog box, choose Create.Your container now contains the element Scenario.
Totransferthescenariocharacteristicsthatyoudefinedtothecontainer,clickonthe
first'+'symbol(insertcontainerelement)anddonotaffirmthesubsequentdialogbox
(noreferencetodictionary).Inthenextdialogbox,entertheelement(characteristic
name)andadescription.
Page 61 of 83
In the Responsibilities, you can define any responsibilities to which you want to assign
a processor.Youcandefinecriteriaforeveryresponsibility.(Forexample,youcan
definethenameofanITsystemintherolecontained.Everyresponsibility
responsiblesystemadministratorcanbevalidforaselectedITsystemname.)Itis
notnecessarytodefineallpossiblecriteria(elementsfromtherolecontainer)for
responsibilities.Emptyfieldsarenottakenintoaccountinroleresolution.Tocreatea
responsibility,chooseCreateresponsibility.Confirmthesubsequentdialogboxand
entertheallowedvaluesforthecorrespondingcharacteristic.Always enter a value for
the Scenario element to specify processor assignment for an ISR scenario.To assign a
user, choose the symbol Insert processor assignment.In the subsequent dialog box,
confirm User as the object type, confirm the validity period, and save the assignment.
Note:Beforeyouassigntheprocessor,youmustdefinethecorresponding
organizationstructuresintransactionPPOME.
If the SAP standard partner functions and the associated partner types User and Department
are not sufficient, you can define advanced partner determination procedures for a notification
type to include suitable partner functions.
Page 62 of 83
Youmustspecifyacontrollingarea.
Costscanberecordedindifferentways:
Estimatedcosts:
If you don't want to run a detailed cost calculation for the scenario, you enter the
estimated costs. The costs you enter are updated as the planned value on the specified
object.
Page 63 of 83
Template:
You use a template in Easy Cost Planning to update the actual costs to the object when the
notification is completed. The processor of the notification must manually perform an
activity to which function module QALK_ISR_AUTO_EXEC is assigned (example:
scenario SH01Action box function EX02 for scenario SH01). This function module
goes to the Execution Services transaction.
You can specify a template that determines the values for the cost allocation from the
information in the form. If you have not yet prepared a template, choose Create Template.
You then need to specify a costing variant and a fixed account assignment object.
Ifyouhavedecidedtouseatemplatetorecordthecosts,usetheEasyCostPlanning
functions.
For more information on Easy Cost Planning, refer to the SAP Library under Financials
Controlling Product Cost Controlling Product Cost Planning Easy Cost
Planning and Execution Services.
Pricelist:
The price list function simplifies ISR scenarios that involve administrative costs. The
administrative costs are calculated automatically based on the price list. The price list
contains all information needed to calculate the actual costs. A price list contains one or
more fixed prices.
Basedonthepredefinedprice(servicetype)selected,eachrequestautomaticallyupdates
coststoacostcollectorinControlling(suchasacostcenterororder)oncethenotification
iscompleted.Theprocessordoesnothavetoupdatethecostsmanually.
Each entry in the price list corresponds to a service type (two-digit numerical value) that
includes the following information:
Price (consisting of an activity price and a fixed quantity)
Cost receiver
Cost sender (sender cost center and activity type)
A service type is an activity that can be requested by an internal service request. In the
simplest case, an internal service request only offers one service type, for which the
Default indicator must be set. If more than one service type is possible, you use the
Default indicator to control which price is defaulted to the request form. The person
creating the request establishes the costs by selecting the appropriate service type. The
approver then sees the costs when they process the request. When the notification is
completed, the costs are allocated from the sender cost center to the cost collector.
Theapplicantcanselectapriceontheform.Toenabletheapplicanttoselecttheservice
typeontheform,youdefineafieldasadropdownlistboxandassigntoitthefield
SERVICE_TYPfromthegeneralfieldsofGENERAL_DATAwithdatabinding.
Ifyoudon'tallowapplicantstoselectthepricemanuallyinthisway,thedefaultservice
typeisusedautomatically.
Page 64 of 83
Foreachservicetype,specifyacostcenterandactivitytypeandassignanactivityprice,
quantity,andcurrency.Whenthenotificationiscompleted,thecostcenteriscredited
withthecosts(activitypricetimesquantity)bymeansofinternalactivityallocation.The
accountassignmentobjectselectedbasedonthestrategyintheCostsblockofISR
Customizingisdebitedwiththecosts.
You can check a price list for consistency by entering the name of the scenario in the
Scenario field and choosing Check Price List.
Prerequisites
The activity type can be created while the price list is being edited. The following
settings must be made for the activity type under Variance values for actual
allocation:
Actual activity type category: 1 (Manual entry, manual allocation)
Actual price indicator: 7 (Manually determined for actual allocations)
Compared with the template, the price list is a relatively simple method of updating service
costs to Controlling.Thetemplateisrecommendedforcomplexcostsallocations.
Costcollector
Page 65 of 83
Thecostscalculatedbyoneoftheabovemethodsareallocatedtotheaccountassignment
objectdefinedinISRCustomizingunderStrategy.
Thefollowingstrategiesareavailable:
Fixedaccountassignmentobject
Inthiscaseyouspecifyacostcenter,internalorder,orWBSelementasthecostcollector.
Costcenteroftheinitiator
Thecostcollectoristhecostcenterspecifiedintheapplicant'susermaster.
WBSelementoftheinitiator
ThecostcollectoristheWBSelementspecifiedintheapplicant'susermaster.
Userexit
YouspecifythecostcollectorbyimplementingtheBAdIQISR2(method
ISR_ACCOUNT_ASSIGNMENT_GET)foryourscenario.
Page 66 of 83
Page 67 of 83
Click on the Create folder symbol at the top left.Enteranameforthefolder.To create an ISR
link, click on Insert other object.Inthedialogboxthatappears,choosetheURLradiobutton
(default),andinthenextdialogboxenteradescriptionthatappearsintheLaunchPadandthe
linktotheISRservice(seetheprevioussectiononthesyntaxofURL).Youcanrearrangethe
entriesandfoldersbydraggingthemtonewlocations.On the User tab, you can now assign
the new single role.TestthenewLaunchPadmenuintheWorkplace.
Page 68 of 83
WhenaspecialISRscenarioisaccessed,thesystemdisplaystherequestformandallrequests
previouslysubmittedbythemanagerthatareinthesamecategory:
Themanagercanalsogetadetailedoverviewofthestatusofhisorherinternalservice
requests:
Page 69 of 83
Formoreinformation,refertothedocumentationforthebusinesspackageManagerSelf
ServiceintheiViewStudio(www.iviewstudio.com).
9.5 ISR MiniApps
YoucanuseISRMiniAppsinalltypesofintranetorInternetportals.Youmaywantto
modifythelayoutordesigntomatchthatoftheportal.Todoso,copytheISRstandard
MiniAppsandworkonlywiththecopies.Thispreventsyourmodificationsfrombeinglost
whenaSupportPackageisdownloaded.
9.5.1
MiniApp: ISR_MY_NOTI
TheInternetserviceISR_MY_NOTIenablesenduserstocheckthestatusoftheirrequests,
sendcommentstotheprocessor,andchangetheirrequests.Thisservicecanbeintegratedin
theWorkplaceforaninternalemployeeorasanelementofanexternalportal.Simplycopy
theInternetserviceandadjustthelayoutandthesettingsinthelistofgeneralparametersas
needed.ItcanbeadvantageoustouseseveralMiniApps,eachofwhichisrestrictedtoa
singlenotificationtypeorscenario.YoucanalsosettheparametersoftheURLtoachieve
thisrestriction.
Page 70 of 83
TheMiniAppdisplaystheshorttextforthenotificationcreated(foralistofshorttexts,see
Appendix8.1).Thelinksaftertheshorttextsgodirectlytotheoriginalrequest,towhichthe
endusercanaddcomments.(Youcanconfigurewhethertheendusercanchangeallrequest
fieldsoronlyaddcomments.SeeAppendix8.1).Thestatusofnotificationprocessingandthe
entrydatearealsospecified.Youcanalsoconfigurewhetherthelastchangedateorthe
plannedendofprocessingisdisplayed.Thisisderivedfromthepriorityofthenotification.
Youcandisplayuptofivespecialcharacteristicsundertheshorttext.Thisenablesyouto
separatemultiplerequestsforasinglescenario(forexample,thedestinationcanidentify
severalrequestsonhotelbookings).ThepossibleMiniAppsettingsarelistedascommentsin
theHTMLtemplate:
<!
internet service displays an overview of "my notifications" which were
generated from submitted ISR forms.
If you want only notifications for the special notification type XYZ to be displayed you
can call the URL with QMART=XYZ. (.../ISR_MY_NOTI/!?QMART=XYZ )
(No dropdown list is available in this mode)
If you want only notifications for the special scenario ABCD to be displayed you
can call the URL with SCENARIO=ABCD. (.../ISR_MY_NOTI/!?SCENARIO=ABCD )
(No dropdown list is available in this mode)
If you set the parameter DROPFLAG=X (see general parameterlist of ISR_MY_NOTI)
an additional dropdown list is offered - there the user can choose to display all notifications
or only the notifications for a single ISR scenario.
If you set the parameter FINDATFLAG=X (see general parameterlist of ISR_MY_NOTI)
the planned processing date is displayed instead of the last changed date. The processing
date is calculated automatically from priority and can be changed by the processor.
If you set the parameter WITHNUMBER=X (see general parameterlist of ISR_MY_NOTI)
the number of the notification is displayed in the first column.
You can define the selection period with the parameter PASTDAYS (see general parameterlist of
ISR_MY_NOTI). The selection period is from today - pastdays until today. The default of
pastdays is 365 (one year).
Page 71 of 83
If you want to display notifications from all users(!) you can set the parameter
ALLUSER=X (see general parameterlist of ISR_MY_NOTI).
(Caution, please limit the number of displayed notifications in this case
with the help of notification type QMART and selection period PASTDAYS!)
Each notification is displayed with up to five additional characteristics from the ISR form.
The displayed characteristics from the ISR form can be customized in the data base table
QISRCONTROL. If you want to display a characteristic please create entries in
QISRCONTROL following this logic:
1. characteristic:
QISRCONTROL-SCENARIO = <name of scenario in upper case>
QISRCONTROL-FIELD = FIELD1
QISRCONTROL-VALUE = <name of characteristic in upper case>
2. characteristic:
QISRCONTROL-SCENARIO = <name of scenario in upper case>
QISRCONTROL-FIELD = FIELD2
QISRCONTROL-VALUE = <name of characteristic in upper case>
...
5. characteristic:
QISRCONTROL-SCENARIO = <name of scenario in upper case>
QISRCONTROL-FIELD = FIELD5
QISRCONTROL-VALUE = <name of characteristic in upper case>
-->
9.5.2
ToenabletheprocessortoseeanoverviewintheWorkplaceofthenotificationsandtasks
awaitingprocessing,theseMiniAppsgeneratealistofnotificationsandtasksgrouped
accordingtostatus(thepersonplacingtherequestcanalsousethisMiniApp,buthethenhas
tousetheR/3transactions).Youcanpersonalizetheselectionofnotifications.Youcandefine
theselectioncriteriafortheMiniAppsinvariantmaintenancefortheworklisttransactions
(IQS8orIQS9).IntheMiniApps,youcanusethelinkafterthefigurestogototheworklist
transactionsandaccessnotifications.
Page 72 of 83
9.5.3
If you use the workflow, processors or approvers receive notifications automatically in their
Workflow Inbox.Fromthere,theycangotothenotificationtransaction.
Page 73 of 83
10.
Appendix
VALUE
1
2
DIRECT_FORM_DISPLAY
ALWAYS
ITS_ACTIVE
FIELD1
HTML_CTRL_STYLE_SHEET
<characteristic
name>
<characteristic
name>
<characteristic
name>
<characteristic
name>
<characteristic
name>
<CSS_Name>
HTML_CTRL_TEMPLATE
<HTML_Template>
FIELD2
FIELD3
FIELD4
FIELD5
HIDE_EMPTY_FIELDS
Comments
Defaultstrategy:Theshorttextforthenotificationisset
automaticallyinthefirstrowofthelongtextfortherequest
(commentsontherequest).Ifthelongtextisempty,theshort
textforthenotificationisthesameasthescenariodescription.
Theshorttextfortherequestisalwaysthesameasthescenario
description.
Theshorttextfortherequestisalwaysthesameasthescenario
descriptionwithinformationaboutthepersonplacingrequest.
Theoriginalformisalwaysdisplayedinthenotification/task
(extendedview)ratherthanthetabularrequestview.
IfthetransactionisstartedusingITS(HTMLGUI),theoriginal
formisdisplayedinthenotification/task(extendedview)rather
thanthetabularrequestview.
IntheMiniAppISR_MY_NOTI,selectedcharacteristicsare
displayedforbetteridentificationoftherequest.Biszufnf
Merkmaleknnenangezeigtwerden
If you want to define a custom layout for the tabular request view
displayed in the notification/task, you can define a CSS style
sheet and store it in the Web Repository (transaction SMW0).
The default is CK_ECP_STYLESHEET.
If you want to define a custom layout for the tabular request view
displayed in the notification/task, you can define your own
HTML template and store it in the Web Repository.The default
template is QISR_REQUEST_DATA_TEMPLATE.As a
placeholder, you can use:
<!STYLE!> in place of the CSS style sheet
<!REQUEST_FORM_URL!> in place of the URL for calling the
request form
<!REQUEST_DATA!> for the table of request data
<!HEADLINE!> for the language-dependent request data text
<!REQUEST_FORM_TEXT!> for the language-dependent
Display request form text
You can also substitute a corresponding placeholder for the value
of each special ISR request.
For example, you can replace the <!COLOR!> placeholder with
the value from the ISR characteristic COLOR.
If you set this parameter, the tabular request view does not
display ISR characteristics for which no value has been entered.
Page 74 of 83
WF_CREATED
<workflow
template>
WF_PROCESS
<workflow
template>
JSP_URL
<JSPURL>
WithbusinesspackageMSS5.0intheEnterprisePortal,itisnolongernecessarytomaintain
thetableQISRCONTROL.Instead,youcanmaintaintheCustomizingsettingswith
transactionQISRSCENARIO(pushbuttonAdditionalDataforScenario)forMSS50.2or
withtransactionSIMG_SPORTforMSS50.1.ThesettingsinQISRCONTROLalsoapplyto
theEnterprisePortaliftheCustomizingtransactionsmentionedhavenotbeenusedinMSS
5.0.
10.2 Configuration Settings for Adobe Forms
AdditionalsystemsettingsarenecessarybeforeyoucanuseAdobeforms.
ADSCaller:
Adestinationserviceisneededtobeabletoaccesstheformonthebackendsystem.Todo
this,youmustconfigureyourlocalJ2EEengine.
YoualsoneedaserviceuserADS_AGENT(passwordADOBE)inR/3forthedefaultclient.
ThisusermustbeassignedtoSAP_BC_FP_ICF.Thedefaultclientistheclientthatappears
onthelogonscreenoftheR/3systemasthedefaultvaluewhenyoulogonwiththeSAP
GUI.
Iftheuserdoesnotexistinthesystem,youmustcreateit.TheusertypemustbeService.You
cansetthisintheusertransactionontheLogonDatatab).
ToconfiguretheJ2EE:
StarttheJ2EEengineadministratorandchooseServicesDestinations.
CreateanHTTPdestinationwiththenameFP_ICF_DATA.
ChooseBASICauthenticationandentertheuserADS_AGENTwiththepasswordADOBE
(orthepasswordinR/3).
AdobeWebService:
TheAdobeserverneedstobeconfiguredaswell.
Page 75 of 83
GotoServicesWebServicesSecurity.ChooseWebServiceClientssap.com
tc~wd~pdfobjectcom.sap.tc.webdynpro.adsproxy.AdsProxy/ConfigPort_Document.
SelectCustomfortheURLandentertheserverorport.Theentryshouldlooksomethinglike
this:
http://myserver:12345/AdobeDocumentServices/Config?style=document
SelectBASICastheauthenticationandentertheuserADSuser(casesensitive)andthe
passwordsapads.
Saveyoursettings.
Starttheapplicationtc~wd~pdfobjectagain.
Todothis,gototheVisualAdministrator,selectApplications(topofthepage)andclickon
tc~wd~pdfobject.Stoptheapplicationandthenstartitagain.
10.3 Configuration Settings for ITS
10.3.1
To specify the URL for test calls (such as http://PGU9C.WDF.SAPAG.DE:1080/scripts/wgate) and the ITS instance for publishing the Internet services, choose
Utilities Settings ITS.BothentriesmustpointtothesameITS.(Note:Publishingdoes
notusuallyworkonallITSs.YoumustnormallyselectaspecialITS.)Forthefixedsettings
inyoursystem,contactyoursystemadministrator.
10.3.2
TopublishyourInternetservicesfromtransactionSE80,youneedtosetupanIACOR
connectionbetweentheR/3systemandtheITS.Ifyouhaveproblemspublishingyour
Internetservices,contactyourITSadministrator.
10.3.3
General
Table TWPURLSVR (in the component system): for the corresponding logical system (see
client maintenance), the ITS server and port must be entered in this table (such as
myITS.wdf.sap-ag.de:1080).
You can only enter one server for a component system. It is therefore not possible to use more
than one server.
10.4 Predefined Request Fields
ForacompletelistofpredefinedISRrequestfields,refertotheSAPLibraryunderCross
ApplicationComponentsInternalServiceRequestsPreparingtheInternalService
RequestDefinitionofanHTMLFormFormDefinition.
Page 76 of 83
Simplestway:debuginR/3only
InSE80,starttransactionQISR1(functiongroupQISR3).On the first screen, enter
the ISR scenario in capital letters and (optionally) the notification number, switch the
debugger on by entering /H, and choose Create, Change, or Display.Youcannow
debugtheentireflowlogicbeforetherequestformisdisplayed.Thesystemthen
displaysoneofthemainscreens(110,120,or130),whichshowsthegeneralISR
fields(ISR_GENERAL_DATA).However,itisnotpossibletoseethespecial
Page 77 of 83
characteristics(ISR_SPECIAL_DATA)foryourscenario,sincethesearenotdefined
onthescreens.ThespecialcharacteristicsareprovidedwithdatadirectlybytheITS
context,andarethusonlyvisibleinthebrowser.Youcanstillcheckand/orsubmitthe
request.Thespecialcharacteristicsarethenallinitialunlessyoufillthemmanuallyin
thedebugger(theglobalobjectreferencetothecurrentlyprocessedrequestisG_ISR.
Thisreferencehasa(private)internaltableSPECIAL_DATA.Thistablecontainsthe
specialrequestdataandcanbechangedifrequired.
ThismethodoferroranalysisiscompletelyindependentoftheITSandthefirewall.
DebugusingtheITSdebuggerport
TheITSmethodenablesyoutodebugscreenbasedInternetservices.Startyour
InternetserviceinthebrowserwithouttheOKCODEorSCENARIOparameters
(example:http://..../scripts/wgate/ZRU01/!).Thestartscreenisdisplayed.Theperson
makingtherequestdoesnotseethisscreen,sincethecallnormallyhastheOKCODE
andSCENARIOparameters;thismeansthatthestartscreenisskipped.Once
transactionQISR1(calledforallISRscenarios)hasbeenstarted,thestartscreenis
displayed.YoucannowlogontoR/3withthedebuggerport(youcanfindoutthe
rightoneforyourR/3systemfromyoursystemadministrator).Thistakesyoudirectly
tothecorrespondingpositionintransactionQISR1.IntheR/3system,switchthe
debuggeronbyentering/H.Once you have activated the debugger in the debugger
system, you can enter your scenario names on the start screen and then choose Create.
Thistakesyoudirectlytothepointintheprogramcodewhereinitializationforthe
scenariostarts.Youcannowdebugtheflowlogic.
Ifyouareinterestedinanalyzingtheformlogicorsubmittingtherequest,startyour
requestformwiththefullURL(suchashttp://.../scripts/wgate/ZRU01/!?
~okCode=CREATE&scenario=RU01).ThenstarttheR/3debuggerport,switchthe
debuggeronwith/H,andtriggeraneventinthebrowser(check,submit,oruser
command).ThisenablesyoutodebugtheentireISRscenarioincludingtheentryof
specialcharacteristics.
Unfortunately,duetocustomerfirewallsitisoftennotpossibletodothisviathe
debuggerport.
OutputofITScontext:
Fortestingpurposes,youcangeneratethevaluesforallrequestfieldsasacomment
ontheHTMLpagecreatedbyITS.ThiscanbelookedataftercallingtheISRrequest
bydisplayingthesourcetextinthebrowser.Anotherparametermustbeaddedtothe
URLtocalltheISRrequest:
&~record=1
ThemustbeapprovedbeforehandbytheITSadministrator.
Skippingthecheckroutineswhensubmittingrequest
Iffortestingpurposesyouwanttoskipallcheckroutines(particularlytheBAdI
methodINT_SERVICE_REQUEST_CHECK)thatarerunbeforeaformissubmitted,
Page 78 of 83
setparameterQISRto"C"inyourfixeduservalues.Don'tforgettodeletethis
parameterafterwards.
Errormessages:Outputerrornumberandmessageclass
Forerrormessagesthatareoutputwhenyousubmitaform,thenotificationnumber
andmessageclasscanbedisplayedinsteadofthenotificationtext.Todothis,set
parameterQISRto"M"inyourfixeduservalues.
ChangeISRform
DisplayISRform
Page 79 of 83
YoucanusethefollowingmoduletoaccesstheEasyExecutionServicesofECP(EasyCost
Planning):
QALK_ISR_AUTO_EXEC CallExecutionServicesforthetask
Youcanfindotherfunctionmodulesusingthefollowinggenerickeys:
QM06_FA* Functionmodulesforactions
QM06_FM* Functionmodulesfortasks
(orgeneralQM06*)
Youcanusethefollowingfunctionmoduleasatemplateforaparameterizedtransactioncall:
KWEB_BUDG_ACTION_SUPPLEMENT Performsthebudgetsupplementaction
10.10
ThefollowingsectioncontainsalistofmethodsavailableintheJSP(withMSS5.0).
Explanationoftheimportparameters:
Fieldname NameofthecharacteristicfromtheR/3scenario(Fieldnameisoftype
String)
Index
Indexnumber,ifmultiplevaluesareexpectedforacharacteristic
(IndexisoftypeInteger)
Method
publicString
getAdditionalData
Importparameter:
TypeName
Stringfieldname,
intindex
publicint
getAdditionalDataLength
Stringfieldname
publicStringgetChecked
Stringfieldname,
intindex
Stringfieldname
publicStringgetDisabled
Stringfieldname
Description
Usageforinputhelp:
Returnsthevalueforthecharacteristic
(fieldname)anditsindex(index).Thevalues
arefilledintheBAdI
SCENARIO_SET_ADDITIONAL_DATAin
R/3.
Usageforinputhelp:
Outputsthenumberofentriesper
characteristic
Usageforcheckboxes:
Outputsthevalueforanindexforacheckbox
true,false
Usageforcheckboxes:
Outputsthevalue(implicitIndex=1)fora
checkboxtrue,false
Accesstodataofcharacteristics:
Outputswhetherthefieldontheformforthe
Page 80 of 83
publicStringgetIsrEvent
publicString
getIsr_form_view
publicStringgetIsr_page
publicStringgetLabelL
Stringfieldname
publicStringgetLabelM
Stringfieldname
publicStringgetLabelS
Stringfieldname
publicStringgetMode
publicString
getNewMainJsp
publicStringgetNotif_no
publicStringgetScenario
publicStringgetSelected
Stringfieldname,
Stringkey,
intindex
publicStringgetSize
Stringfieldname
publicint
getSpecialDataLength
Stringfieldname
publicString
getTextAreaContent
Stringfieldname
specifiedcharacteristicisreadyforinput:
true,false
Accesstogeneralformdata:
Returnsthevalueofthetriggeredevent
Accesstogeneralformdata:
Returnsthevaluefortheuser'srole;see
section5.2.5;ISR_REQUEST,
ISR_PROCESS,ISR_APPROVE
Accesstogeneralformdata:
Returnsthevalueoftheformpage.
Accesstodataofcharacteristics:
Description,long
Accesstodataofcharacteristics:
Description,medium
Accesstodataofcharacteristics:
Description,short
Accesstogeneralformdata:
Returnsthevalueoftherequestmodeofthe
form,seesection5.2.4
CREATE,CHANGE,DISPLAY
Accesstogeneralformdata:
ReturnsthenameoftheJSPfilespecifiedin
theProperties,whichisusedinsteadof
IsrMain.jsp(seeNote570417)
Accesstogeneralformdata:
Returnsthenotificationnumber(onlyin
changeanddisplaymodes)
Accesstogeneralformdata:
Returnsthevalueoftheformscenario
Usageforinputhelp:
Returnstruefortheselectedvalue(key)of
thecharacteristic(fieldname)anditsindex
(index).Forothervalues,falseisreturned.
Thevaluesfortheinputhelparefilledinthe
BAdI
SCENARIO_SET_ADDITIONAL_DATAin
R/3;seesection5.3
Accesstodataofcharacteristics:
Lengthoffield
Accesstodataofcharacteristics:
Outputsthenumberofentriesper
characteristic
Accesstotext:
ReturnsthetextfortheID(fieldname);see
section5.3
Page 81 of 83
publicStringgetValue
Stringfieldname,
intindex
Stringfieldname
Accesstodataofcharacteristics:
Returnsthevalueofacharacteristic
(fieldname)anditsindex(index)
Returns the value (implicit Index = 1) for a
characteristic (fieldname)
RelevantforSupportPackages(SP)
Release4.6C:SP1517
(before SP 15, the functions of the form
views are not available)
515872
543620
552175
553079
554644
570417
580399
582359
Description
The Form View and Page fields are not filled in
BAdIs or in the business HTML template.The BAdI
method SCENARIO_SET_FORM_VIEW is not
called.
ThesolutiondescribedinthisNotecanalsobeused
whentheBAdImethodsinthesystemneedtobe
regenerated.
Programterminationinfunctionmodule
ISR_CUST_CONTROL_VALUE_GET
OnlyrelevantwhenbusinesspackageMSSisused.
WithMSS50.2andtheattachedcorrection,open
requestsintheiViewStatusOverviewcanbe
canceled.
ForMSSonly:TheNotedescribeswhatyouneedto
dotouseadatefieldontheform.
ForMSSonly:Enablesbranchingtoextended
Customizing(replacestableQISRCONTROL;see
section9.1)fromtransactionQISRCONTROL.
ForMSSonly:Enablesmorethan255elementstobe
displayedininputhelp,ormorethan255entriesper
characteristictobereadfromR/3.
ForMSSonly:EnablesyoutouseyourownJSP
insteadofmodifyingthesuppliedJSPIsrMain.jsp.
ForMSSonly:StatusintheiViewStatusOverviewis
notupdated.
ForMSSonly:Thelongtextformattingisfaulty
Page 82 of 83
Copyright
Copyright 2004 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 registered trademarks 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, 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.
Page 83 of 83