add custom field to powl

12
8/9/2019 Add Custom Field to POWL http://slidepdf.com/reader/full/add-custom-field-to-powl 1/12 Add custom feld to SC and POWL In this document you learn how to add custom felds in the shopping cart. Then we will see how to add these felds in POWL.  This can also be applied to other business objects. Adding the custom feld in SC Go to the ollowing path in SPRO SAP Supplier Relationship Management -> SRM Server -> Cross-Application Basic Settings -> Extensions and Field Control (Personaliation! !efne customer felds at "eader Le#el. Within Con"gure Customer Fields -> #e"ne Customer Fields on $eader %evel &e need to add the feld in two places $ppend the feld frst in Append 'or Customer Cross-#ocument #ataase Fields on $eader) %reate a new $ppend &tructure i you ha#e not any $dd the feld you want 'should start with (() in my case I ha#e created a data element that is a %"$* + with a domain with some #alues.

Upload: satyajc

Post on 01-Jun-2018

381 views

Category:

Documents


8 download

TRANSCRIPT

Page 1: Add Custom Field to POWL

8/9/2019 Add Custom Field to POWL

http://slidepdf.com/reader/full/add-custom-field-to-powl 1/12

Add custom feld to SC and POWL

In this document you learn how to add custom felds in the shopping cart. Then we will seehow to add these felds in POWL.

 This can also be applied to other business objects.Adding the custom feld in SC

Go to the ollowing path in SPROSAP Supplier Relationship Management -> SRM Server -> Cross-Application Basic Settings-> Extensions and Field Control (Personaliation!

!efne customer felds at "eader Le#el.Within Con"gure Customer Fields -> #e"ne Customer Fields on $eader %evel &e need toadd the feld in two places

$ppend the feld frst in Append 'or Customer Cross-#ocument #ataase Fields on $eader)%reate a new $ppend &tructure i you ha#e not any

$dd the feld you want 'should start with (() in my case I ha#e created a data element thatis a %"$* + with a domain with some #alues.

Page 2: Add Custom Field to POWL

8/9/2019 Add Custom Field to POWL

http://slidepdf.com/reader/full/add-custom-field-to-powl 2/12

!on,t acti#e the structure yet- we need to add the feld in another structure and it taes a loto time in the acti#ation so we are going to acti#e both structures at the same time.$ppend the feld also in Append 'or Customer Fields on Shopping Cart $eader you need tocreate also another $ppend &tructure i you ha#e not any.

/ow- acti#e both structures don,t worry it taes a lot o time.

%onfgure feld control. 0or display the feld we need to add it in Con"gure Field Control -> Con"gure Control 'orFields on $eader %evel -> Metadata 'or Fields on #ocument $eaders

Page 3: Add Custom Field to POWL

8/9/2019 Add Custom Field to POWL

http://slidepdf.com/reader/full/add-custom-field-to-powl 3/12

$dd a new entry or BUS2121 and mar it as 1nabled and 2isible

$t this point you can defne a dynamic class and method or control de #isuali3ation o thefeld. 0or this e4ample is not necessary but i you want only need to create a class with&uper %lass /SAPSRM/CL_PO_!"_M#$A_%&#L  and a method with the ollowing

parameters

With the parameter CS_M#$AA$A you can modiy the #isuali3ation o the felddynamically./ow the feld is displayed

Page 4: Add Custom Field to POWL

8/9/2019 Add Custom Field to POWL

http://slidepdf.com/reader/full/add-custom-field-to-powl 4/12

/ow the objecti#e is add this feld as selection criteria in POWL

Adding the custom feld in POWL$dd the feld in !5 %riteria0irst we need to add this feld in the structure /SAPSRM/S_S#ARC'%&#LS. %reate an$ppend &tructure and add the feld

Page 5: Add Custom Field to POWL

8/9/2019 Add Custom Field to POWL

http://slidepdf.com/reader/full/add-custom-field-to-powl 5/12

/ow we need to add this feld also in the #iew /SAPSRM/(_SRC_CR. &o go to &678 and addthe feld

 

We need to now which the eeder is used or &% or continue. 

Page 6: Add Custom Field to POWL

8/9/2019 Add Custom Field to POWL

http://slidepdf.com/reader/full/add-custom-field-to-powl 6/12

 Go to the ollowing path in SPROSAP Supplier Relationship Management à SRM Server à Cross-Application Basic Settingsà 

P*+% and Advanced Search) 

1nter in #e"ne #e'ault P*+% Application 'or Advanced Search 

and loo up the 9uery Id orthe object type BUS2121. We can see that is SAPSRM_AL_PURC'AS&")_*2_*1.

/ow go to the transaction POWL_+U#R!  and fnd this 9uery Id.

!o double:clic there and you can see what the eeder is.

Page 7: Add Custom Field to POWL

8/9/2019 Add Custom Field to POWL

http://slidepdf.com/reader/full/add-custom-field-to-powl 7/12

O- return to &P*O and go to Ad,ust P*+% %aout. Search Criteria. and Pushuttons 'transaction /SAPSRM/POWL_CUS$).

0ind the eeder type and select !5 %riteria and add a new line with the feld. $t this pointyou can assign the search help used or this feld in POWL.

/ow- i you go to POWL you don,t see the feld yet. Why;. <ou need to =reresh, the 9uery.0or do that go to se7> to the program POWL_*1 set your user and mar !isplay. Thenchoose the correct eeder and use the #elete /uer  button.

Page 8: Add Custom Field to POWL

8/9/2019 Add Custom Field to POWL

http://slidepdf.com/reader/full/add-custom-field-to-powl 8/12

/ow the feld is displayed.

"ote, I some errors are displayed when you use the custom feld chec this note/ote ?@@@??7 : !ump occurs when searching or customer felds 

"ote, There is a problem i you ha#e a custom feld at header and item le#el with thesame name. <ou should defne felds with diAerent names at header and item le#el. Ithe feld e4ists at header le#el- this will always ha#e priority- i it does not e4ist thereBthe search continues to item le#el.

 $dd the feld in result listI you also want to display the feld in the result list is necessary to add it in the structure/SAPSRM/S_POWL_R#SUL$_SC_&$M . There is an include reser#ed or this purpose

Page 9: Add Custom Field to POWL

8/9/2019 Add Custom Field to POWL

http://slidepdf.com/reader/full/add-custom-field-to-powl 9/12

&"CL_##W_P_S#ARC'_'R_CS%_SC C%ust.1nhancements in &hoppg %art "eader &earch*esultsD. %reate an $ppend structure in this structure and add the feld.*eturn to &P*O Ad,ust P*+% %aout. Search Criteria. and Pushuttons  or transaction/SAPSRM/POWL_CUS$ and add the feld.

*eresh the Euery with the program POWL_*1 and now the feld is also displayed in theresult list.

 Change POWL dinamicall-

Within the enhancement spot /SAPSRM/B_CLL_POWL_%###R you ha#e our 5adi!efnitions or change the beha#ior o POWL.

Page 10: Add Custom Field to POWL

8/9/2019 Add Custom Field to POWL

http://slidepdf.com/reader/full/add-custom-field-to-powl 10/12

Let see a tiny e4ample o use o one o these 5$!I defnitions- goto S#1. and choose!isplay.

14pand the node /SAPSRM/B_POWL_C'")_S#LCR&$ and choose %reate 5$!Iimplementation.

0irst- create the 1nhancement implementation. %hoose C/ewD and create a new one.

Page 11: Add Custom Field to POWL

8/9/2019 Add Custom Field to POWL

http://slidepdf.com/reader/full/add-custom-field-to-powl 11/12

 Then choose it and push O

/ow- create the 5$!I Implementation

/ow- i you want you can defne a flter or speciy with wich eeder the badi will be triggerd-

is good to do it but in this case is not necessary we,re going to control it by code. &o- go tothe implementing class

In the signature o the method you ha#e the parameters you need to now the eeder andapplication I!.

Page 12: Add Custom Field to POWL

8/9/2019 Add Custom Field to POWL

http://slidepdf.com/reader/full/add-custom-field-to-powl 12/12

Let,s see a sample code or hide the feld or change the search help is used?. !$T$ lsFselcriteria LI1 LI/1 O0 ctFselcriteria.H. I0 i#FtFpowlFtype 19 J&$P&*6F011!1*F&%FP*O0J.7. *1$! T$5L1 ctFselcriteria I/TO lsFselcriteria WIT" 1< selname K J((F%&TO6F0L

!J.

+. I0 sy:langu 19 J1&J. MPut here the condition you want...@. lsFselcriteria:hidden K JNJ.. 1L&1.. lsFselcriteria:ddicFshlp K J((FOT"1*F!!I%F&"1LPJ.>. lsFselcriteria:mandatory K JNJ.Q. 1/!I0.?8. 6O!I0< ctFselcriteria 0*O6 lsFselcriteria I/!1N sy:tabi4.??. 1/!I0.

*elated %ontenthttpRRwii.sdn.sap.comRwiiRdisplayRW!$5$PR!ocumentationSInormationSaboutSPOWLhttpRRwii.sdn.sap.comRwiiRdisplayRW!$5$PRPOWL httpRRwii.sdn.sap.comRwiiRdisplayRW!$5$PR0$9S$5OTSPOWL

p#