0% found this document useful (0 votes)
430 views17 pages

SAP CRM Events

The document discusses defining account classification in SAP CRM. It explains classification categories, criteria, and attributes. It provides two scenarios for assigning attributes to the standard category or creating a new category with custom criteria and attributes.

Uploaded by

kenguva_tirupati
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
430 views17 pages

SAP CRM Events

The document discusses defining account classification in SAP CRM. It explains classification categories, criteria, and attributes. It provides two scenarios for assigning attributes to the standard category or creating a new category with custom criteria and attributes.

Uploaded by

kenguva_tirupati
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

1/2/2015

SAPCRMTechnicalTutorialsbyNavalBhatt.

SAPCRMTechnicalTutorialsbyNaval
Bhatt.
SAPCRMtutorialsforall:Pleasefeelfreetocontactmeonnaval.k.bhatt@gmail.com.Thisblogisforhelpingthosewhoare
facingissuesinCRMtechnicalandfunctional.Notforcareercounselling,Pleaserefrainfromsendingthosequestions.Please
dosomeresearchbeforeaskinganyquestion.Pleasedon'tcopyandpastetherequirementswhichyougetfromyourclient.
YOURURGENCYISNOTMYPROBLEM:)Iwilltakemysweettimeinreplying.
Home

MyIntro

BasicsofOOABAP...

SAPJobWebsites

Documentpdfs...

PracticalBOLprogramming..

Middlewareconcepts...

SAPCRMrelatedlinks...

InterviewQuestions....

Saturday,May19,2012

AccountClassification
SearchThisBlog

DefineAccountClassification
Use
Usingclassificationcategories,youcanflexiblycombineclassificationcriteriaand
attributes,asyourequire.Forexample,acompanycouldbeacustomerinthebusinessunit
"Automation"butacompetitorinthebusinessunit"MobilePhones".
Inthisactivity,youdefinetheclassificationcategories,criteria,andattributesyourequire.

Search

Followers:Jointoget
regularupdate

ClassificationCategories

Jointhissite
withGoogleFriendConnect

Oneclassificationcategoryisdeliveredforaccounts,withanumberofpredefinedcriteria.
However,youwillgenerallydefineyourownclassificationcategories:

Members(103) More

Youareallowedamaximumoffivecriteriapercategory.Theassignmentof
criteriatocategorycanbechangedprovidednodatahasbeencreatedyetforthe
accountclassification.
Youcanaddanunlimitednumberofyourownorpredefinedattributestoa
category.
CriteriaandAttributes

Alreadyamember?Signin

Whendefiningcriteriaandattributesyouspecifythefollowing:
HandlerClass
Thehandlerclassisusedtodeterminethevaluerangesforcriteriaand
attributes.ItiscalledwhenevervaluesarerequiredontheUIorvalidated.
Usinghandlerclassesalsoallowsyoutoimplementyourownlogicforoverriding
valuesreturnedforstandardattributesandcriteria.
Thehandlerclassinheritsthemethodsfromthesuperclass
CL_CRM_BUPA_CLASS_HANDLER(deliveryclassGoftable
CRMC_BP_CLATTR,thereforeprotectedagainstSAPupdates).
Thefollowingmethodshavetoberedefinedforyourhandlerclasstoderivethe
valuehelpcorrectly:

Myotherblogs
SAPBPM&Workflowtutorials
Mytravelexperiences
Me&mypursuitofhappiness
Wanderinghermit
Photography

IF_CRM_BUPA_CLASS_HANDLER~GET_DDLB_VALUES
IF_CRM_BUPA_CLASS_HANDLER~GET_VH_DESCRIPTION

Joinmeonmyphotography
journey

Domain
http://sapcrmtutorial.blogspot.in/search?updatedmax=20120519T08:19:0007:00&maxresults=7&reversepaginate=true

1/17

1/2/2015

SAPCRMTechnicalTutorialsbyNavalBhatt.

Forattributes,youcanalsoassignadomainwithanattachedvaluetable.The
handlerclassevaluatesthedomainvaluesorattachedvaluetableandpasses
these,ifavailable,totheimplementationforfurtherprocessing.Ifneithera
domainnorhandlerclassisassigned,however,valuescanbeenteredontheUI
withoutavaluehelp,intheformofafreetext.

FindusonFacebook

NavalBhattPhotography..
Like

SingleValue
NavalBhatt
Photography..
sharedKaspars
Daleckis
Photography's
video.

Anattributecanbesinglevalueormultivalue.Forexample,anaccountcan
havedifferentrolesforthesamecombinationofcritieriawithidenticalvalues,but
onlyonerating.
DefaultSettings
Abasicsetofcriteriaandattributesareprovidedasstandardfortheclassificationcategory
ACCOUNT.Ifthesedonotmeetyourbusinessrequirements,youhavetwooptions:

June27,2014

Enhancethestandardwithyourowncriteriaandattributes
Createyourownclassificationcategorywiththenecessarycriteriaandattributes

03:37

Activities

Scenario1:AssigningYourOwnAttributestothe
StandardClassificationCategoryACCOUNT

KasparsDaleckisPhotography
Ifyou'refeelinguninspired,this
videowillalmostcertainlyhelp.

IfyouwanttoenhancethestandardcategoryACCOUNTwithyourownattributes,youcan
definethenewattributesinthisCustomizingactivityandassignthemtostandardcategory
ACCOUNT.
Youdefinetherelevantvaluerangesfortheseattributesaccordingtothestepsdescribed
forscenario2.

554peoplelikeNavalBhattPhotography..

Scenario2:CreatingYourOwnClassification
Category

ShowMore

Tointroduceanewclassificationcategory,consistingofyourowncombinationofcriteria
(thiscanalsoincludestandardcriteriasuchas"salesorganization#or"country#)anda
rangeofattributes,performthefollowingsteps:
1.Inthecustomernamespace,createahandlerclasswhichprovidesvalueranges
andvaluehelptypesforcustomcriteriaandattributes.
2.Defineaclassificationcategory,criteria,andattributes,andassignthecriteriaand
attributestothenewcategory(step1isaprerequisiteforassigningthehandlerclass
tonewcriteriaandattributes).
3.Createanewconfigurationforthecustomclassificationcategory.

NavalBhattPhotography..onFacebook

BlogArchive
2014(13)
2013(57)
2012(154)

4.GenerateandadjusttheruntimerepositoryforUImaintenanceofthenewcategory
usinganenhancementset.
5.Addnewassignmentblocktoaccountoverviewpage.

December(2)
November(8)
October(1)
September(15)

6.Createanewconfigurationtoenableasearchbythecriteria,attributesandvalues
associatedwiththenewcategory.
7.Enhancethesearchstructurewiththesearchtermforthenewcategory.

August(14)
July(26)
June(18)

8.ImplementthemethodsGET_DDLB_VALUESandGET_VH_DESCRIPTIONof
thehandlerclasstoprovidevaluesandvaluehelptypes.
1.CreatingaHandlerClass

Foreachcriterion,youneedtoenterahandlerclasswhichinheritstheinterfacemethods
IF_CRM_BUPA_CLASS_HANDLER~GET_DDLB_VALUESand
IF_CRM_BUPA_CLASS_HANDLER~GET_VH_DESCRIPTION.Thishandlerclassmustbe
asubclassofeitherclassCL_CRM_BUPA_CLASS_HANDLERor
CL_CRM_BUPA_CLASSIFICATION.Byenteringoneoftheseclassesasthesuperclass,
theaboveinterfaceispasseddowntothesubclass.
Youcancreatedifferenthandlerclasses,whichcanbeassignedtodifferentcriteriaand
attributes,dependingonyourbusinessrequirements:
http://sapcrmtutorial.blogspot.in/search?updatedmax=20120519T08:19:0007:00&maxresults=7&reversepaginate=true

May(10)
CRMMiddleware
SurvivalGuide
Important
middleware
transactions
Anintroduction
aboutIPC
Territory
Management
Codeforchecking
theaction
2/17

1/2/2015

SAPCRMTechnicalTutorialsbyNavalBhatt.

triggered.

EnterclassCL_CRM_BUPA_CLASSIFICATIONasthesuperclassforyour
handlerclassifyouwanttouseastandardcriterionorattributeandoverridethe
valuesreturnedbythestandard.

Account
Classification
Basiccodefor
datetypevalue
setting.

EnterclassCL_CRM_BUPA_CLASS_HANDLERasthesuperclassforyour
handlerclassifyouwanttocreateyourowncriteriaorattributesanddefinethe
valuerangeandvaluehelptypeaccordingtoyourrequirements(standardcriteria
andattributesarenotsufficient).
Note
Ifyouintendtousevaluesassociatedwithadomain(fixedvalues,attached
valuetable)foranattribute,youdonothavetouseahandlerclass.Thevalues
willberetrievedautomaticallyfromthedomainassignedtotheattributein
Customizing.

BasicsofCRMUI
component
programming.
CRMchange
document
appointment
date

2.DefiningaClassificationCategory,Criteria,andAttributes

Howtouse
messagesin
CRMwebUI

Prerequisite:Step1tobeabletoassignthehandlerclasstonewcriteriaandattributes
1.InthisCustomizingactivity,createanewclassificationcategoryandentera
description(leavefieldsSearchStructureandFieldNameblank).Savethechanges.

April(9)
March(28)

2.CreatenewcriteriaandenterthenameoftheclassyoucreatedinthefieldHandler
Class.Eachcriterioncanbeassignedadifferenthandlerclass.Thehandlerclass
specifiedcanalsobeassignedtoanattribute(seenextstep).

February(13)
January(10)

3.Createnewattributes.Youcanenterthenameofahandlerclass(whichcanalso
beassignedtoacriterion),thenameofadomain,ornoneofthese.
Ifyouspecifyadomain,makesurethatthereiseitheravaluetableassociated
withthisdomainorfixedvaluesdefinedforthedomain.Otherwisenovaluescan
bereturnedfortheattribute.
Ifahandlerclassisenteredinadditiontoadomain,thevaluesareretrievedfrom
thedomainduringruntimeandsubsequentlypassedtothehandlerclass.A
filteringofthesevaluescanbedoneintheimplementationofthemethod
GET_DDLB_VALUES.(Wherefilteringisnotrequiredandthereisthereforeno
logicimplemented,thevaluesprovidedtothemethodGET_DDLB_VALUESare
merelypassedonforfurtherprocessing).
Ifyouenterahandlerclassonly,theimplementationofmethod
GET_DDLB_VALUESreturnsthevaluesassociatedwiththeattribute.
Ifneitherahandlerclassnoradomainisspecified,thevaluesenteredforthis
attributeareregardedasfreetext.Thismeansthatvaluesenteredforthis
attributewillnotbevalidated.
Definewhethertheattributeissinglevalueormultivalue.
4.ChooseCategoriesintheviewclusterstructureandselecttheclassification
categoryyoucreated.ChooseCategory>Criteria.Youdefinethenumberand
combinationofcriteriathatapplytothenewclassificationcategory.Amaximumof
fivedifferentcriteriacanbeassignedtothecategoryinthefieldsCiterion1to
Criterion5.
Note

poweredby

PopularPosts

Avaluehastobeenteredforthefirstcriterion.
Criteriahavetobeenteredconsecutively,startingwiththefirstcriterionand
withoutanygaps.
Asubsequentchangetoacriterion,associatedwithaposition(changingthe
assignedcriterion,deletingthelastcriterion),canonlybemadeifnovaluesexist
intheapplicationtableCRMM_BUT_CLASSfortherelevantcriterion,whichis
identifiedbyitsposition.

CRMTablesand
TransactionCodes
TABLENAMEDESCRIPTION
BUSINESSPARTNERS
BUT000BP:Generaldata
ContainsBusinessPartner
Number,PartnerCategory,
Partne...

Allavailablecriteriacanbeassignedtothecategory,includingstandardcriteria.
5.ChooseCategoriesintheviewclusterstructureandselecttheclassification
categoryyouhavecreated.ChooseCategory>Attributesandaddtheattributesyou
http://sapcrmtutorial.blogspot.in/search?updatedmax=20120519T08:19:0007:00&maxresults=7&reversepaginate=true

Important
methodsinCRM
webUI
Important
methodsinCRM
3/17

1/2/2015

SAPCRMTechnicalTutorialsbyNavalBhatt.

wanttoincludeintheselectedclassificationcategory.Youcanalsoaddstandard
attributes.
6.Saveyourchanges.
3.CreatingaNewConfigurationfortheClassificationCategory

1.ExecutetransactionBSP_WD_CMPWBforthecomponentBP_CLASS,andselect
theviewBP_CLASS/AccountClassificationOVwithadoubleclick.
2.GotothetabConfigurationandswitchtoeditmodeforthedefaultconfiguration.
3.ChooseCopyConfigurationandconfirmtheprompt.
Aconfigurationattributesdialogboxappears.
4.Selectthevalues:
ObjectType=BP_ACCOUNT
ObjectSubtype=<newclassificationcategorykey>(asdefinedinstep2)
ChooseEnter.
5.Adjusttheconfigurationappropriately(renameandconfigurethecategoriesas
definedinstep2).Todothis,deleteunusedfieldsandaddtextfieldsasrequired
(dependingonthetypeofvaluehelp).NotextfieldsarerequiredforDDLB.
6.Savetheconfiguration.
7.RepeatthesestepsfortheviewBP_CLASS/AccountClassificationEL.
4.GeneratingandAdjustingtheRuntimeRepository

1.StarttransactionSE38.
2.EnteroneofthefollowingprogramsandchooseExecute:
CRM_BUPA_UI_CREATE_CLASS_EOVP(ifyouareusingtheeditableoverview
page)
CRM_BUPA_UI_CREATE_CLASS(ifyouhavesettheuserparameter
CRM_UIU_OLD_UIC)
3.Selecttheenhancementsetforwhichyouwanttomakethenewclassification
categoryavailable.
Asenhancementsetsareclientdependent,checkwhichenhancementsetisactive
intheclientinwhichyouwanttomakethenewclassificationcategoryavailable.To
dothis,checktheviewBSPWDV_EHSET_ASGintransactionSM30.
4.Selectthenewclassificationcategoryandrunthereport.
5.AddingaNewAssignmentBlocktotheAccountOverviewPage

1.ExecutetransactionBSP_WD_CMPWBforthecomponentBP_HEADandthe
enhancementsetyouselectedinstep3,andselecttheview
BP_HEAD/BPHEADOverviewwithadoubleclick.
2.GotothetabConfigurationandswitchtoeditmodeforthedefaultconfiguration(or
theconfigurationforwhichyouwanttomakethenewclassificationcategory
available).
3.SelectthenewassignmentblockfromthelistofAvailableAssignmentBlocksand
moveittothelistofDisplayedAssignmentBlocks.
ChooseShowTechnicalDetailstoseeyourclassificationcategoryIDasaviewID.
4.InthelistofDisplayedAssignmentBlocks,enterthedescriptionoftheassignment
blockyouhavejustaddedandothersettingssuchasloadoption,etc.).
ThedescriptionspecifiedfortheclassificationcategoryinCustomizingisnotcopied
acrosshere.
5.Saveyourchanges.

webUIorcomponent
programming.ViewImplclass
methods:
DO_CONFIG_DETERMINATI
ON:Themethodisforrun
tim...
GetterSettermethodsin
WebUI
UsingGetandSettermethods
youcanretrievedatatofield
andsetspecificdatatofield.
UsingGet_Imethodyoucan
makeyourfield...
SAPCRMinterviewquestions
Q1.Whatisthetypical
landscapeforaCRMproject?
Whatisthemaximumnumber
oflandscapesthatyouhave
workedoninaproject....
SAPCRMMostusefulBADIs
(Updating).
ORDER_SAVEBADIisusedat
thetimeofsavingorder.1st
called
CHECK_BEFORE_SAVE
Usefulforcheckifthevalues
arefilledasexpect...
Oneorder
framework
OneOrderObject
ModelTheCRM
OneOrder
documentsarecreatedin
transactionCRMD_ORDER.
TheHeadertablethatis
updatedbythecrea...
HowtocreatePOPUPwindow
inUI
Openthecomponentandthen
viewwherethepopupistobe
raised.Youmustberaising
thepopuponsomeevent...
Youwillneedtocrea...
TPMTradepromotion
management:Technical
aspect.
Standardrole
:SAP_CRM_UIU_TPM_PROF
ESSIONALComponents:
TPMOE1.TPMSummary
oTradePromotion
Managementistheproce...
HowtousemessagesinCRM
webUI
Ingeneralthereare4different
Sourcesforerrormessages:
ImportantInfoMessageBSP
FrameworkmessagesUI
Frameworkmes...
AnintroductionaboutIPC
SAPCRMusesIPCto
determinepricinginformation
whencreatingabusiness

http://sapcrmtutorial.blogspot.in/search?updatedmax=20120519T08:19:0007:00&maxresults=7&reversepaginate=true

4/17

1/2/2015

SAPCRMTechnicalTutorialsbyNavalBhatt.
6.CreatingaNewConfigurationfortheSearch

Repeatthestepsperformedinstep3fortheviewBP_CLASS/AccountClassificationSearch
inthecomponentBP_CLASS(transactionBSP_WD_CMPWB):
1.Copythedefaultconfiguration,andentertheobjecttypeBP_ACCOUNTandselect
theIDofthenewclassificationcategoryfortheobjectsubtype.
2.Addallrelevantcriteriatotheconfigurationandchangethefieldlabelsaccordingly.
Removeanyunusedcriteriafromtheconfiguration.LeavethefieldsAttributeand
Valueunchanged.

transaction,suchasa
quotation,salesorder,service
proce...

TotalPageviews

3 7 8 8 4 4

3.Saveyourchanges.
Thetypeofvaluehelpforeachfieldisdeterminedatruntimeintheimplementationofthe
methodGET_VH_DESCRIPTIONofthehandlerclassassociatedwiththecorresponding
field.

FollowbyEmail
Emailaddress...

Submit

7.EnhancingtheSearchStructure

Aseparatecomponentmustbeavailableinthesearchstructure
CRMT_BUPA_IL_HEADER_SEARCHforeveryclassificationcategory:
1.EnhancethestructureCRMT_BUPA_IL_HEADER_SEARCHwithanew
componentinthecustomernamespaceusinganexistingappend.Ifacustomer
appenddoesnotyetexist,createoneandaddthenewcomponent.
2.Addthenewsearchparametertotheaccountsearchinthetransaction
BSP_WD_CMPWBforthecomponentBP_HEAD_SEARCH.Selecttheview
BP_HEAD_SEARCH/MainSearchandaddthenewsearchparametertothe
configuration.Enteranappropriatename,ideallythedescriptionoftheclassification
category.
3.EnterthenameofthesearchstructureCRMT_BUPA_IL_HEADER_SEARCHand
thefieldnameyouaddedtothisstructureinstep1inthedefinitionofthenew
classificationcategoryintheviewclusterCRMVC_BUPA_CLASS.
4.Saveyourchanges.
8.ImplementingMethodsforDerivingValueHelps

ImplementthemethodsGET_DDLB_VALUESandGET_VH_DESCRIPTIONofthehandler
classtoprovidevaluesandvaluehelptypes.
MethodGET_DDLB_VALUES
Thevaluesmaintainedforcriteriaandattributesareretrievedfroman
implementationofthemethodGET_DDLB_VALUES,whichneedstobe
redefinedinthehandlerclassyouhaveassignedtothecriterionorattribute.
Themethodiscalledatruntimeeverytimevaluesarerequestedwhencreating
classificationdataforanaccountusingadropdownlistbox.Itisalsocalled
whentheenteredvaluesarevalidatedwithinBOLandandtoprovidevalue
rangesintheaccountsearch(alsoseethenoteattheendofthissection).
Thereisbasicallynodifferenceinthewayvaluesareretrievedforcriteriaand
attributes,exceptthatanattributemightalsohaveanassociateddomainthat
providesvalues,passingthemtothehandlerclass.Ifthisisthecase,youdo
notneedtoimplementanylogicfortheseattributes.
Whethertherequestedvaluesapplyforacriterionoranattributeisindicatedby
thevaluepassedintheparameterIV_TECTYPEofthemethod
GET_DDLB_VALUES.TheIDpassedinIV_IDidentifieseitheracriterionoran
attribute,dependingonthevalueinIV_TECTYPE.
Foralanguagespecificdeterminationofvalues,thelanguageispassed
additionallyintheparameterIV_LANGU(inthestandard,thisparameterisused
intheinitialloadofclassificationvaluestoSAPNetWeaverBI).
Mutualdependencyofcriteria(inthestandardthereisamutualdependencyof
thecriteriaSALES_ORG,DIST_CHANN,andDIVISION,whichtogetherforma
http://sapcrmtutorial.blogspot.in/search?updatedmax=20120519T08:19:0007:00&maxresults=7&reversepaginate=true

5/17

1/2/2015

SAPCRMTechnicalTutorialsbyNavalBhatt.

validsalesarea)canberealizedbyretrievingvaluesalreadyenteredforcriteria
otherthanthosecurrentlyrequested.Thevaluesalreadyenteredforthecurrent
classification"line#arepassedintheparameterIS_CURRENT_CRITERIA.
MethodGET_VH_DESCRIPTION
Thetypeofvaluehelpforanycriterionorattributevalueisbydefaultadropdown
listbox.Thisappliesifthereisnoimplementationofthemethod
GET_VH_DESCRIPTIONforacriterionorattribute.
IfavaluehelpotherthanaDDLBisrequired,suchasastandardinputhelpusing
aDDICsearchhelp,themethodGET_VH_DESCRIPTIONneedstoberedefined
andimplemented.
Todothis,simplycopythecodeoftheexistingimplementationofthemethodin
theclassCL_CRM_BUPA_CLASSIFICATIONtoyourimplementationandmake
thenecessaryadjustments.
Thisbasicallyinvolveschangingthepartsofcodethatcheckthetechnicaltype
andIDpassed.ThiscanbedonebysettingvaluesforLV_F4_ATTR1,
LV_F4_ATTR2,EV_HELP_ID,andEV_HELP_ID_KIND.Aprerequisiteisthata
DDICsearchhelpexistsforyourvaluetable.
Note
Ifyouoptforyourownvaluehelpforcriteriaorattributes(usingaDDICsearch
help),youneedtoimplementthelogicinthemethodGET_DDLB_VALUESfor
therelevantcriterionorattribute,asthismethodmethodiscalledwhenthe
valuesenteredarevalidatedintheAPI.

Scenario3.OverridingValuesandValueHelpfor
StandardCriteriaandAttributes
Ifyouwanttooverridethelogicofthevaluedeterminationfordeterminationforstandard
criteriaorattributes,youneedtocreateyourownhandlerclassasasubclassoftheclass
CL_CRM_BUPA_CLASSIFICATION.
ByredefiningthemethodGET_DDLB_VALUESandimplementingyourownlogic,your
valueswillbeconsideredwhenmaintainingtheclassification,regardlessoftheclassification
type.
Todothis,youhavetoenteryourhandlerclassinsteadofthestandardhandlerclass
CL_CRM_BUPA_CLASSIFICATIONforthecriterionorattributeintheviewcluster
CRMVC_BUPA_CLASS.
BycallingthemethodGET_DDLB_VALUESofthesuperclasswithinyourimplementationof
themethodGET_DDLB_VALUES,youcanretrievestandardvaluesandmodifythevalue
range.
ChangingthehandlerclassassociatedwithacriterionorattributeinCustomizingdoesnot
entailamodification.
PostedbyNavalBhattat12:10AM

2comments:

Recommend this on Google

Labels:AccountClassification.,crmtutorials,sapcrmtutorial,SAPCRMtutorials

Saturday,May12,2012

Basiccodefordatetypevaluesetting.
<?xmlversion="1.0"?>
<SAPTimeRule>
<TimeRuleTree>
<!BeginofRuleTree>
<ruleline>
<!BeginofnewLINE>
<AssignTimeExpdisplaytype="AssignTime">
<!Assigntime>
<VarTimeExpdisplayType="VarTime"
name="RESULT"
http://sapcrmtutorial.blogspot.in/search?updatedmax=20120519T08:19:0007:00&maxresults=7&reversepaginate=true

6/17

1/2/2015

SAPCRMTechnicalTutorialsbyNavalBhatt.

position="B">
<!Variable:Time>
</VarTimeExp>
<MoveTimeExpdisplaytype="MoveTime"direction="+">
<!Move>
<VarTimeExpdisplayType="VarTime"
name="ZIEFAPPRD">referenceobject
position="B">
<!Variable:Time>
</VarTimeExp>
<ConstDuraExpdisplaytype="ConstDura"
duration="3"timeunit="DAY">>numberofdaystobeadded
<!ConstantDuration>
<VarObjectExpdisplaytype="VarObject"
name="SYSTEM"/>
<!Variable:Timeobject>
</ConstDuraExp>
</MoveTimeExp>
</AssignTimeExp>
</ruleline>
</TimeRuleTree>
</SAPTimeRule>
PostedbyNavalBhattat9:30AM

Nocomments:

+1 Recommend this on Google

Labels:datetypexmlcoding,sapcrmtutorial,SAPCRMtutorials

BasicsofCRMUIcomponentprogramming.
BasiccodeforUI.
createaninstance
DATA:lr_entTYPEREFTOif_bol_bo_property_access,
checkiftheinstanceisbound.
IFlr_entISBOUND.
me>typed_context>btpartnerset>on_new_focus(lr_ent).
*refreshthetext(necessaryafteremptytext!)
me>typed_context>bttexth>on_new_focus(lr_ent).

forerrorhandlingweusetrycatchblock.

TRY.
lr_entity?=lr_ent.
lv_collection=lr_entity>get_related_entities(
iv_relation_name='BTHeaderTextSet').
lr_ent=lv_collection>get_first().
me>typed_context>bttext>on_new_focus(lr_ent).
CATCHcx_crm_genil_model_error.
*shouldneverhappen
EXIT.
CATCHcx_sy_ref_is_initial.
ENDTRY.
PostedbyNavalBhattat9:25AM

2comments:

+2 Recommend this on Google

Labels:BasicsofCRMUIcomponentprogramming,crmtutorials,sapcrmtutorial,SAP
CRMtutorials
http://sapcrmtutorial.blogspot.in/search?updatedmax=20120519T08:19:0007:00&maxresults=7&reversepaginate=true

7/17

1/2/2015

SAPCRMTechnicalTutorialsbyNavalBhatt.

Thursday,May10,2012

CRMchangedocumentappointmentdate
Tosetuptheappointmentdatewehavetoaddacodesimilartobelowcodein
CRM_APPOINTMENT_BADIMethodIF_EX_CRM_APPOINTMENT_BADI~CRM_APPOINTMENT_MERGE

*
*DATADECLARATION
*
INCLUDEcrm_direct.
*Document
DATAlv_guidTYPEcrmt_object_guid.
DATAlv_item_guidTYPEcrmt_object_guid.
DATAlt_req_objectsTYPEcrmt_object_name_tab.
DATAlt_header_guidTYPEcrmt_object_guid_tab.
DATAlt_appointmentTYPEcrmt_appointment_wrkt.
DATAls_appointmentTYPEcrmt_appointment_wrk.
DATAlt_appointment_comTYPEcrmt_appointment_comt.
DATAls_appointment_comTYPEcrmt_appointment_com.
*Inputfielsandothers
DATAls_logical_date_keyTYPEcrmt_date_logical_date_key.
DATAlt_input_fieldsTYPEcrmt_input_field_tab.
DATAls_input_fieldsTYPEcrmt_input_field.
DATAls_input_field_namesTYPEcrmt_input_field_names.
DATAlt_input_field_namesTYPEcrmt_input_field_names_tab.
*Aux
DATAlv_timestamp_fromTYPEtimestamp.
DATAlv_timestamp_toTYPEtimestamp.
DATAlt_saved_objectsTYPEcrmt_return_objects.
*
*SELECTIONSCREEN*Thispartisaddedforyoutotestthecodeasanindependentreportprogram
*
SELECTIONSCREEN:BEGINOFBLOCKb1WITHFRAMETITLEtextb01.
PARAMETERSp_idTYPEcrmt_object_id."DocumentID
PARAMETERSp_kindTYPEcrmt_object_kind."AHeader,BItem
PARAMETERSp_itemTYPEcrmd_orderadm_inumber_int."Itemnumber.Example:10
SELECTIONSCREEN:ENDOFBLOCKb1.
SELECTIONSCREEN:BEGINOFBLOCKb2WITHFRAMETITLEtextb02.
PARAMETERSp_typeTYPEcrmt_appointment_wrkappt_type."AppointmentType
PARAMETERSp_datefTYPEsydatlo."Datefrom
PARAMETERSp_timefTYPEsytimlo."Timefrom
PARAMETERSp_datetTYPEsydatlo."Dateto
PARAMETERSp_timetTYPEsytimlo."Timeto
SELECTIONSCREEN:ENDOFBLOCKb2.
*
*READY,SET...GO!
*
STARTOFSELECTION.
*CheckFields
IFp_idISINITIALORp_kindISINITIALORp_typeISINITIALORp_datefISINITIALORp_timefISINITIAL.
MESSAGE'Pleasefillallinputfields,exceptdate_toandtime_to'TYPE'E'.
ENDIF.
IFp_kind='B'ANDp_itemISINITIAL.
MESSAGE'Pleasefillitemnumbertoupdate'TYPE'E'.
ENDIF.
*GetdocumentGUID
SELECTSINGLEguidFROMcrmd_orderadm_hINTOlv_guidWHEREobject_id=p_id.
IFSYSUBRCNE0.
MESSAGE'Documentnotfound'TYPE'E'.
ENDIF.

http://sapcrmtutorial.blogspot.in/search?updatedmax=20120519T08:19:0007:00&maxresults=7&reversepaginate=true

8/17

1/2/2015

SAPCRMTechnicalTutorialsbyNavalBhatt.
*GetitemGUID?
IFp_kind=gc_object_kindorderadm_i.
SELECTSINGLEguidFROMcrmd_orderadm_iINTOlv_item_guidWHEREheader=lv_guidAND
number_int=p_item.
IFSYSUBRCNE0.
MESSAGE'Itemnotfound'TYPE'E'.
ENDIF.
ENDIF.
*ReadDocumentInfo
INSERTlv_guidINTOTABLElt_header_guid.
INSERTgc_object_nameappointmentINTOTABLElt_req_objects.
CALLFUNCTION'CRM_ORDER_READ'
EXPORTING
it_header_guid=lt_header_guid
iv_mode=gc_modedisplay
it_requested_objects=lt_req_objects
IMPORTING
et_appointment=lt_appointment
EXCEPTIONS
document_not_found=1
error_occurred=2
document_locked=3
no_change_authority=4
no_display_authority=5
no_change_allowed=6
OTHERS=7.
IFsysubrcNE0.
MESSAGE'Errorreadingdocument'TYPE'E'.
ENDIF.
*Calculatetimestampfornewdate/time
CONVERTDATEp_datefTIMEp_timefINTOTIMESTAMPlv_timestamp_fromTIMEZONEsyzonlo.
CONVERTDATEp_datetTIMEp_timetINTOTIMESTAMPlv_timestamp_toTIMEZONEsyzonlo.
*Getcurrentappointmentdata
IFp_kindNEgc_object_kindorderadm_i.
READTABLElt_appointmentINTOls_appointmentWITHKEYref_kind=p_kindappt_type=p_type.
ELSE.
READTABLElt_appointmentINTOls_appointmentWITHKEYref_kind=p_kindref_guid=lv_item_guid
appt_type=p_type.
ENDIF.
IFsysubrcNE0.
MESSAGE'Appointmenttypenotfoundindocument'TYPE'E'.
ENDIF.
*Formattheappointmentdata
MOVECORRESPONDINGls_appointmentTOls_appointment_com.
ls_appointment_comtimestamp_from=lv_timestamp_from.
ls_appointment_comtimestamp_to=lv_timestamp_to.
*Setlogicalkeyandbuildinputfields
MOVECORRESPONDINGls_appointment_comTOls_logical_date_key.
CALLFUNCTION'CRM_APPT_BUILD_INPUT_FIELDS'
EXPORTING
iv_ref_handle='0'
iv_ref_guid=ls_appointment_comref_guid
iv_ref_kind=ls_appointment_comref_kind
is_logical_key=ls_logical_date_key
IMPORTING
es_input_fields=ls_input_fields.
IFsysubrc<>0.
MESSAGE'Errorgeneratinginputfields'TYPE'E'.
ENDIF.
INSERTls_input_fieldsINTOTABLElt_input_fields.
INSERTls_appointment_comINTOTABLElt_appointment_com.
*Clearthereferenceofthetimecontextforrecalculationofthedates
CALLFUNCTION'CRM_DATES_TIMECONTEXT_DELETE'.

http://sapcrmtutorial.blogspot.in/search?updatedmax=20120519T08:19:0007:00&maxresults=7&reversepaginate=true

9/17

1/2/2015

SAPCRMTechnicalTutorialsbyNavalBhatt.
*Changeappointmentinmemory
CALLFUNCTION'CRM_APPT_MAINTAIN_MULTI_OW'
EXPORTING
iv_ref_guid=ls_appointment_comref_guid
iv_ref_kind=ls_appointment_comref_kind
it_appointment_com=lt_appointment_com
CHANGING
ct_input_fields=lt_input_fields
EXCEPTIONS
precondition_violation=1
invariant_violation=2
OTHERS=3.
IFsysubrc<>0.
MESSAGE'Errorchangingappointment'TYPE'E'.
ENDIF.
*Savedocument
CALLFUNCTION'CRM_ORDER_SAVE'
EXPORTING
IT_OBJECTS_TO_SAVE=lt_header_guid
IV_UPDATE_TASK_LOCAL='X'
IMPORTING
ET_SAVED_OBJECTS=lt_saved_objects
EXCEPTIONS
DOCUMENT_NOT_SAVED=1
OTHERS=2.
IFsysubrc<>0ORlt_saved_objectsISINITIAL.
MESSAGE'Errorsavingdocument'TYPE'E'.
ELSE.
MESSAGE'Dateupdatedandsaved!'TYPE'S'.
ENDIF.
COMMITWORK.

PostedbyNavalBhattat7:56AM

1comment:

Recommend this on Google

Labels:CRMchangedocumentappointmentdate,CRMopportunity,crmtutorials,sapcrm
tutorial,SAPCRMtutorials

Saturday,May5,2012

HowtousemessagesinCRMwebUI
In general there are 4 different Sources for error messages:

1. Important Info Message


2. BSP Framework messages
3. UI Framework messages
4. BOL/Genil global message container
5. BOL/Genil object realated message containers

The message level is considered first before the message types are
considered. Message level is 1-9 corresponding to data element:
BSP_WD_MESSAGE_LEVEL
9

Only Collect in Trace Mode

Administrator

Experienced User

Office-Based Sales Employee

1
0

Customer
None

The message level implies for which user group the messages are designed
for.

http://sapcrmtutorial.blogspot.in/search?updatedmax=20120519T08:19:0007:00&maxresults=7&reversepaginate=true

10/17

1/2/2015

SAPCRMTechnicalTutorialsbyNavalBhatt.
In general the sorting sequence corresponds to the above sequence. Within
each group the sorting corresponds to Error Warning Info so on the
message type.

2ToNo.1:Howtocreateanimportantinfo
message:GetaccesstoUIFrameworkmessage
serviceavailableineverycontrollerclass.
Data: lv_msg_service type ref to cl_bsp_wd_message_service.
Lv_msg_service = Me-> view_manager->get_message_service().
Createanimportantinfomessage:
lv_msg_service->add_message(

IV_MSG_TYPE =
IV_MSG_ID =
IV_MSG_NUMBER=
IV_MSG_V1=
IV_MSG_V2=
IV_MSG_V3=
IV_MSG_V4=
IV_MSG_LEVEL=
IV_IMPORTANT_INFO = ABAP_TRUE).

Theparameteriv_msg_typeisignoredinthiscase.

3ToNo2:HowtouseBSPFramework
messages:
Thiskindofmessagesourceisavailableinthecontextnodeviaattributeerrorswhichisan
instanceofCL_BSP_MESSAGES.Theclassprovidesseveralmethodstoaddmessagesin
differentformatslikeT100,ExceptionObjectsetc.Thosemessagesgetanseverity
accordingtotheconstantsinthisclassandmessageswithseverity1or2(fatalerroror
error)willautomaticallykeeptheuseronthecurrentpageinorderforhimtocorrectthe
respectiveerrorfirst.
Messagescanbeassignedtofieldsofthecontextnodeswhichwillleadtoahighlightingof
thecorrespondingfieldsontheUI(dependingontheTagLibrary).
AllBSPFrameworkmessageswillautomaticallybedeletedafterthenextroundtrip(the
wholemessageobjectwillbeinvalidatedwiththenextroundtrip).
ErrorsintheautomatictypeconversionwillalsoleadtoBSPFrameworkmessages(e.g.
wrongformatentriesinadatefieldwillautomaticallybedisplayviathistypeofmessages,
noapplicationcodingisnecessaryhere,astheframeworkdoesprovidethis

4ToNo.3:HowtocreateanUIMessage:
GetaccesstoUIFrameworkmessageserviceavailableineverycontrollerclass.

Data: lv_msg_service type ref to cl_bsp_wd_message_service.


Lv_msg_service = Me-> view_manager->get_message_service().
Createanimportantinfomessage:
lv_msg_service->add_message(

IV_MSG_TYPE
IV_MSG_ID
IV_MSG_NUMBER
IV_MSG_V1
IV_MSG_V2
IV_MSG_V3
IV_MSG_V4
IV_MSG_LEVEL
IV_VERIFICATION).

Thiskindofmessagesisintendedtobesetoncontrollerlevel.Theoptionalparameter
iv_verificationcanbeusedtoregisteracallbackmethodtoverifythemessageoneach
http://sapcrmtutorial.blogspot.in/search?updatedmax=20120519T08:19:0007:00&maxresults=7&reversepaginate=true

11/17

1/2/2015

SAPCRMTechnicalTutorialsbyNavalBhatt.

roundtripifitisstillvalid.Ifthisisnotgiventhemessageisonlyshownonce,soit
disappearsafterthenextroundtrip.
BAPIMessages:Thefunctionalitytherecorrespondstotheabovestatements.Thisisonly
forthosecolleaguesrelevantwhoarecallingBAPIsfromtheirUIs.
Thecorrespondingmethodiscalled:
Add_bapi_messages

5To4and5:BOL/Genilglobalmessage
containerandBOL/Genilobjectrealatedmessage
containers:
ThisautomaticallywillbeprovidedbytheBOLImplementation:

6Messagefiltering:
Therearetwoconceptsformessagefiltering:
Messagescanbefilteredbymessagelevel.Thisisauserspecificsetting(UserParameter:
CRM_USER_LEVEL).
Inadditiontothisaprogrammedmessagefilterisavailable.
Perdefaultmessagesfromallsourcesexcept5specialBOMessagesareshown.
InordertoswitchonmessagesofasingleBOyouhavetoimplementmethod:
IF_BSP_WD_HISTORY_STATE_DESCR~GET_MAIN_ENTITY
Intheviewcontrollerwhichisloadedintotheworkarea.
Windowsarebypassedautomatically.
Ofcoursethisisonlyavalidoptioninthatcasetheworkareacontainsjustasingleentity.
Incasetheviewintheworkareahasnottheknowledgewhichisthemainentityoftheview
assemblyithastodispatchthemethodcalltoitssubviews(asinthebreadcrumb
implementation).
Sincethismethodisalsoofimportanceforthebreadcrumbimplementationitmightbe
alreadyimplementedinyourcase.
Ifyouneedmorecontrolaboutthemessagefilteringyoucanimplementmethod:
IF_BSP_WD_STATE_CONTEXT~GET_MESSAGE_FILTER
Intheviewcontrollerwhichisloadedintotheworkarea.
Windowsarebypassedautomatically.
HereyoureceivethecurrentfilterobjectoftypeCL_BSP_WD_MESSAGE_FILTER.
Nowyouareabletoswitchon/offtheseveralmessagesourcesand/oraddadditional
entitiesforwhichmessagesshouldbeshown.
Youmightchangethegivenfilterorcreateanewoneandyoumightalsopassonthefilter
objecttosubviewsinordertoaggregatetheappliedfiltersettings.
Inanycasethefilterobjecthastobereturned.

7Howtohandlemessagesonuserrequest:
Messagetypes:
Navigatablemessages
Nonnavigatablemessages

Implementation:
1.Getthemessageservice:
DATA:lr_serviceTYPEREFTOcl_bsp_wd_message_service.
lr_service=me>view_manager>get_message_service().
2.Fornavigatablemessagesonly:
2.1Createamessagehandlerclass
Thisclassmustimplementtheinterface
IF_BSP_WD_MESSAGE_HANDLERandwillbecalledwhenthemessage
linkisclicked.

http://sapcrmtutorial.blogspot.in/search?updatedmax=20120519T08:19:0007:00&maxresults=7&reversepaginate=true

12/17

1/2/2015

SAPCRMTechnicalTutorialsbyNavalBhatt.

2.2Subscribeforamessage
DATA:lr_handlerTYPEREFTOzmsgcallback.Handlerclass
from2.1
CREATEOBJECTlr_handler.
TRY.
lr_service>subscribe_message(iv_message_class=
'CRM_IC_APPL_UI_BDC'
iv_message_number='114'
iv_subscriber=
lr_handler
iv_activation=
abap_true).
CATCHcx_bsp_wd_dupl_mess_subscr.
ENDTRY.
3.Examplehowtoaddamessage:
lr_service>add_message(iv_msg_type='E'
iv_msg_id='CRM_IC_APPL_UI_BDC'
iv_msg_number='114').

PostedbyNavalBhattat8:40AM

1comment:

+1 Recommend this on Google

Labels:crmtutorials,HowtousemessagesinWEBUI,messagesinCRM,sapcrm
tutorial,SAPCRMtutorials,webUidevelopments.

Sunday,April29,2012

EverythingaboutCRMVevents
CRM_EVENT_MAINTAIN
____________________________________________________
ShortText
InitialViewMaintenanceforCustomizingEventHandler

Purpose
Thefollowingdocumentcontainsanexplanationoftheentriesandflagstobefoundinthe
EventHandlerCustomizingtableCRMC_EVENT_CALLandgeneralinformationonhowthe
EventHandlerworks.
Thistransactionissplitinto4sections1.maintenanceofCRMC_EVENT_CALL
(Assignments),2.HowCallbacksareSelected,3.Definitionsand4.Checks.These
sectionsaredescribedindetailbelow.
InRelease4.0,thefollowingchangehasbeenmade:
AnewentityhasbeenaddedtotheEventHandler.Thisistheobjectfunction.Object
functionsbelongtoobjectsorsets.Forexample,thepartnersethastheobject
functionsPartnerandBuyingCenterHandling.Functionmodulesareassignedtoan
objectfunctionwhichinturnisassignedanobject/set.Theobject/setisassignedtoa
transactioncategory(BUSObject)whichisassignedtoatransactiontypeoritem
type.Ifanobjectisnotassignedtoatransactiontype,thenanycallbacksassignedto
theobjectfunctioncanbeignoredbytheeventhandler.Thus,foreachtransaction
typeoritemtype,theEventHandlercandeterminewhichfunctionmodulesare
required.Viaanadditionalfunctionmodule(CRM_EVENT_FILTER_PROC_TYPEfor
transactiontypesandCRM_EVENT_FILTER_ITEM_TYPEforitemtypes),specific
objectfunctions(i.e.groupsofcallbacks)canbeexcludedfromselection.
WhicheventdoIneedtoregisterfor?
Tofindoutwhicheventisbestforyou,trythefollowing:
SettheuserparameterCRM_EVENT_TRACEtoX.Youcanfindthisinthemenuunder
http://sapcrmtutorial.blogspot.in/search?updatedmax=20120519T08:19:0007:00&maxresults=7&reversepaginate=true

13/17

1/2/2015

SAPCRMTechnicalTutorialsbyNavalBhatt.

System>UserProfile>OwnData,tabParameters.
Runyourtransactionasnormal.Inaseparatesession,calltransaction
CRMD_EVENT_TRACE.Theno.ofrecordsshownissetto250asdefault.Youmayneed
more.Whileworkinginyourtransaction,youcanrefreshthetracereport.Thiswillbe
automaticallyupdated.Asaresult,youwillbeabletoseewhicheventshavebeenset,
whichexecutiontimeshavebeenreached,andyoucanhopefullydecidewhichcombination
ofevent,objectandexecutiontimeisbestforyou.
1.MaintenanceofCRMC_EVENT_CALL
CRMC_EVENT_CALLisusedtoregisterfunctionmodulesforevents.
Whenaneventispublished,theeventhandlerfindsallfunctionmodules(callbacks)
registeredforthiseventandrunsthemattheappropriatetime.
FieldsinCRMC_EVENT_CALL:
Transactioncategory(SUB_TYPE)
Businesstransactioncategory(Sales,service,contact,opportunityetc.).Thiscanbethe
generalCRMtransactioncategoryBUS20001(thismakestheentryavailabletoeveryone)or
itcanbemorespecific(forexample,BUS2000114onlyappliestoleasingscenarios).
Pleasenote:everyprocesstypecontainsamaintransactioncategory(generallysales
BUS2000115)followedbysecondarytransactioncategories.Forexample,theprocesstype
SRVO(Serviceorder)containsthecategoriesSales(BUS2000115),Service(BUS2000116)
andContact(BUS2000126).Iftheentryyourequireexistsforyourmaincategory,youdo
notneedtorecreateanentryforthesecondarycategories.
Executiontime(EXE_TIME)
Thepointduringtheprocessingofatransactionwhenyouwantyourcallbacktorun.Various
executiontimesaresetduringtheprocessingofatransaction,forexample,endofitem
processing,endofheaderprocessing,beforesave.Whentheeventyouareregisteredforis
published,youmayneedtoreactimmediately,oryoumaywanttowaituntilalatertime
point.Forexample,ifpartnerdataischanged,thenthepricingdataneedstobechecked
immediately(executiontime001).Orgmanhowevercanwaituntiltheendofheader
processing(executiontime030)toreacttothischange.
Note:Youshouldnotuseexe_timeimmediately(001)ifyouregisterfortheeventSAVE.
ExecutiontimesaremaintainedunderDefinitionsExecutiontimes.
Priority(PRIO)
Priorityofcallback.Actsasanadditionalsortcriterionastowhencallbacksarecarriedout.
Objectname(OBJ_NAME)
Theobjectyouareinterestedin(e.g.Partner,Orgman).
Note:ObjectsaremaintainedunderDefinitionsObjects.
Event(EVENT)
Theeventyouareinterestedin(e.g.after_create,save,endofheaderprocessing).
Note:EventsaremaintainedunderDefinitionsEvents.
Attribute(ATTRI1)
Theattributeisusedasafiltertocutdownonthenumberoffunctionmodulescalled.
Dependingontheobjectorset,youmaynotalwaysneedtoreacttoaneventbeing
published.Ifyoualwaysneedtoreacttoaparticularevent,thenyoushouldsetATTRI1to
SPACEor<*>.Youcanassignanattributetothecallbacksothatitonlyreactswhenthis
attributeisset.Thisattributeisusedforexamplebythestatus,partnerandappointment
sets.Thepartnersetusesthisattributetocommunicateforwhichparticularpartneran
eventhasbeenpublished(0001forcontactpersonetc.).Thestatussetcommunicatesthe
statuschangeviathisattribute.Theappointmentsetcommunicatesthedatefieldbeing
changedviathisattribute.IfyousetSPACEor<*>foroneofthesesets,thenyourcallback
willreacttoeveryeventpublishedbythisset.
Function(FUNC_NAM)
Thenameofyourcallback(itshouldbeginwithCRMandendinEC).Beforeyoucanentera
callbackinthisview,ithastobeassignedtoanobjectfunction.
Note:CallbackscanbeassignedtoobjectfunctionsunderDefinitionsObject
function/Callbacks.
ObjectfunctionscanbedefinedunderDefinitionsObjectfunctions.
Performfunctionfordocumentheader(ONLY_HDR)
Thecallbackshouldbecarriedoutatheaderlevel.
Performfunctionfordocumentitem(ONLY_ITM)
Thecallbackshouldbecarriedoutatitemlevel.
Donotprocessfunctioniferroroccurs(ERROR_CHECK)
If,forsomereason,thecallbackraisedanerror,thisflagcausesthemessagetobepassed
ontothecallingprogram.
Forexample,iftheuserentersthewrongproduct,thenyoumaynotwantyourcallbackto
http://sapcrmtutorial.blogspot.in/search?updatedmax=20120519T08:19:0007:00&maxresults=7&reversepaginate=true

14/17

1/2/2015

SAPCRMTechnicalTutorialsbyNavalBhatt.

beprocessed.
Callcallback(CB_FREQ)
Frequencyandcharacterizationofthecallback.Thisattributeisvery,very,important!It
determineshowoftenthefunctionmoduleshouldbecalled.Thefollowingvaluesare
allowed:
CalltoHeader/Item,withObject,Event,Attr.,Old/NewData
(SPACE)
Thecallbackcanbecarriedoutforheadersanditems.The
callbackisprovidedwiththeobjectname,theevent,oldandnew
data.Olddataistheoldversionoftheworkareastructure.New
dataisthenewversionoftheworkareastructure.Thestructureto
bepassedisdefinedintableCRMC_EVENT_STRUC.Ifoldand
newdataarerequiredandthecallbackshouldrunimmediately
(Exe_time=001)onceaneventispublished,youmustusethis
settingandnot'K'.(Kisexplainedbelow).
CalltoHeader/ItemwithObject,Event,Attr.W/OutOld/New(A)
LikeSPACE,butwithoutoldandnewdata.
CalltoHeader/Item,W/OutObject,Event,Attr.,Old/NewData(B)
Thecallbackcanbecarriedoutforheaderanditems.Oldandnew
dataarenotprovided.
CallJustOncePerTransaction(C)
Thecallbackiscarriedoutonlyoncepertransaction.Oldandnew
dataarenotprovided.Note:Thisistheonlysettingthatshouldbe
usedwithEXE_TIME080(Save).
CalltoHdr/ItemwithObject/Event/attr.+CompressedOld/New(K)

Thecallbackcanbecarriedoutforheadersanditems.The
callbackisprovidedwiththeobjectname,theevent,and
cumulatedoldandnewdata.Thismeansthatifaneventis
publishedmorethanonce,yougettheolddatafromtheinitialcall,
andthenewdatafromthefinalcall.Allchangesinbetweenare
irrelevant.Normally,youneedtosetSPACEifyouwanttoreact
immediatelyandKifyoureactlater.However,forspecificpartner
data,i.e.ifyouareregisteredforachangetoaspecificpartner
function(fieldattri1=0001orsimilar)andnotgeneralpartner
changes(fieldattri1=<*>)youneedtouseSPACE,aspartner
datacannotbecumulated.
Changedon(CHANGED_AT)
Dateofchangetorecord
Changedby(CHANGED_BY)
Userwhomadethechange
ONLY_ONE_CALL=thisflaghasnorelevanceasofrelease3.0.
2.Howtheeventhandlerselectscallbacks
Theeventhandlerselectscallbacksforeachtransactionanditemtype.Forthetransaction
type,theselectionisasfollows:
IntableCRMC_PR_ASSIGN,businessobjectsarefoundforatransactiontype.Note:There
isalsoabusinessobjectBUS20001.EntriesinCRMC_EVENT_CALLforthisbusiness
objectarevalidforalltransactiontypes.
IntablesCRMC_OBJECT_ASSIandCRMC_OBJ_ASSI_I,theallowedsetobjectsare
determinedforthebusinessobjects.
IntableCRMC_OBJECT_FUNC,objectfunctionsaredeterminedforthesetobjects.
IntableCRMC_FUNC_ASSIGN,theallowedcallbacksaredeterminedfromtheobject
functions.
Inaddition,thereisafunctionmodule,CRM_EVENT_FILTER_PROC_TYPE_OWwhich
existstofilteroutadditionalobjectfunctionsbasedonobjectspecificandtransactiontype
specificCustomizing.
Fortheitemtype,theselectionisasfollows:
IntableCRMC_IT_ASSIGN,businessobjectsarefoundforanitemtype.Note:Thereis
alsoabusinessobjectBUS20001.EntriesinCRMC_EVENT_CALLforthisbusiness
objectarevalidforallitemtypes.
http://sapcrmtutorial.blogspot.in/search?updatedmax=20120519T08:19:0007:00&maxresults=7&reversepaginate=true

15/17

1/2/2015

SAPCRMTechnicalTutorialsbyNavalBhatt.

IntableCRMC_OBJ_ASSI_I,theallowedsetobjectsaredeterminedforthebusiness
objects.
IntableCRMC_OBJECT_FUNC,objectfunctionsaredeterminedforthesetobjects.
IntableCRMC_FUNC_ASSIGN,theallowedcallbacksaredeterminedfromtheobject
functions.
Inaddition,thereisafunctionmodule,CRM_EVENT_FILTER_ITEM_TYPE_OWwhich
existstofilteroutadditionalobjectfunctionsbasedonobjectspecificanditemtypespecific
Customizing.
3.Definitions
Thedefinitionsectioncontainsthefollowing:
Events:Theeventsthatcanbepublishedintheeventhandler
Objects:Theobjectsthatareusedtodesignatransactiontypeor
itemtype
StructureforEvent/Object:Ifanobjectwishestopass
informationwhenpublishinganevent(forexample,newquantities
inanorderorchangedpartnerdata),thenastructureisrequiredto
doso.Thestructureisenteredinthistablesothattheevent
handlercanformatthedata.
Objectfunctions:Objectfunctionsarefunctionscarriedoutbyan
objectorset.Theyareusedtogroupsetsofcallbacks,sothat
theycanbeplannedorexcludedwhenaneventispublished.
Object/Objectfunctions:Objectfunctionsareassignedto
objects.
Objectfunctions/Callback:Callbacksareassignedtoobject
functions.
Objects:Theobjectsandsetsavailabletodesigna1Order
transaction.
Times:Thesearetheexecutiontimesthatcanbesetduringthe
variousprocessingstagesofatransaction.Forexample,
initialization,delete,save,endofheaderprocessing.
4.Checks
Ifyouenteratransactiontypeandclicktheexecutebutton,youwillgetalistshowingall
callbacksthatarerelevanttothetransactiontype.Ifyouenteratransactiontype+item
typeandclicktheexecutebutton,youwillgetalistshowingallcallbacksthatarerelevant
totheitemtype.YouneedtoenterbothassomeCustomizingatheaderlevelhasaneffect
ontheitemlevel.Thischeckisparticularlyusefultoseeifanyunnecessarycallbackshave
beenassignedtothetransactiontypeoritem.Ifthisisthecase,thenyoushouldadjustthe
customizingtablesaccordinglyorenhancethefilterfunctionmodulesmentionedabove.

PostedbyNavalBhattat4:52AM

1comment:

+1 Recommend this on Google

Labels:crmtutorials,CRMVevents,eventhandlinginCRM,SAPCRMtutorials

Sunday,April22,2012

Authorizationforpersonalization
Thereare2thingsrequiredforthat:
1.CheckifyouhaveinauthorizationobjectUIU_COMPprivilegestodisplay
componentCRM_BSP_PERS.
2.inbusinessrolecustomizing,inthefunctionprofile,belowvaluesshouldbethere:

http://sapcrmtutorial.blogspot.in/search?updatedmax=20120519T08:19:0007:00&maxresults=7&reversepaginate=true

16/17

1/2/2015

SAPCRMTechnicalTutorialsbyNavalBhatt.

PERSONALIZATION=PP_ENABLED
1140994(Missingentriesforframeworkpersonalizationtable)

PostedbyNavalBhattat6:29AM

Nocomments:

+1 Recommend this on Google

Labels:Authorizationforpersonalization,crmtutorials,SAPCRMAuthorization,SAPCRM
tutorials

NewerPosts

Home

OlderPosts

Subscribeto:Posts(Atom)

Navalbhatt2012.AwesomeInc.template.PoweredbyBlogger.

http://sapcrmtutorial.blogspot.in/search?updatedmax=20120519T08:19:0007:00&maxresults=7&reversepaginate=true

17/17

You might also like