semantic groups in dtp _ scn

Upload: smith-kumar

Post on 06-Jul-2018

217 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/17/2019 Semantic Groups in DTP _ SCN

    1/6

    Getting Started Newsletters Store 

    Products Services & Support About SCN Downloads

    Industries Training & Education Partnership Developer Center  

    Lines of Business University Alliances Events & Webinars Innovation

    Log On Join UsHi, Guest   Search the Community

     Activity Communications Actions

    Browse

    SAP Business Warehouse 

    2   Tweet

    Introduction

    From SAP BI 7.0 onwards, in DTP we have an option for semantic groups. We have different perception about

    Semantic Groups in DTP and its usage. Here I am summarizing specific usage of semantic group with examples.

     

    Case 1. Calculation on group of records

     Example: I would like to provide discount to each customer based on total sales value of Customer No, Country and

    Product category.

    Discount should be assigned to each row i.e. for each product. I am having below sample records.

     Product N o C us tom er N o C ountr y Pr oduc t C ate gor y Sa le Va lue (In

    US $)

    P001 C001 US Home 5000

    P002 C002 UK Electronics 3000

    P003 C003 Germany Kids 2000

    P004 C004 India H ome 4000

    P005 C001 US Electronics 1000

    P006 C003 Germany Kids 6000

    P007 C005 France Home 5000

    P008 C004 India Electronics 3000

    P009 C002 UK Kids 2000

    P010 C001 US Home 1000

     

    Discount Criteria based on Sales value as per grouping (Customer No + Country + Product Category) 

    Total Sales (In US $) Discount %

    >=1000 AND =5000 AND =10000 20

     Data Upload from PSA to Standard DSO.

    DTP Package size is 5 Records.

     End routine is calculating total sales which are used for discount calculation of each customer based on Sales

    value and assigning it to each product row.

     Without Semantic Group Data U pload

     Total sales value and Discount amount when data loaded without semantic group is as below

    Semantic Groups in DTP

    Posted by Sangita Kumari in SAP Business Warehouse  on 16-Jun-2013 14:04:54

    Share   2Like

    http://scn.sap.com/community/developer-centerhttps://twitter.com/intent/tweet?hashtags=scn&original_referer=http%3A%2F%2Fscn.sap.com%2Fcommunity%2Fdata-warehousing%2Fbw%2Fblog%2F2013%2F06%2F16%2Fsemantic-groups-in-dtp&ref_src=twsrc%5Etfw&text=Semantic%20Groups%20in%20DTP&tw_p=tweetbutton&url=http%3A%2F%2Fscn.sap.com%2Fcommunity%2Fdata-warehousing%2Fbw%2Fblog%2F2013%2F06%2F16%2Fsemantic-groups-in-dtp&via=SAPCommNethttp://scn.sap.com/community/developer-centerhttps://twitter.com/intent/tweet?hashtags=scn&original_referer=http%3A%2F%2Fscn.sap.com%2Fcommunity%2Fdata-warehousing%2Fbw%2Fblog%2F2013%2F06%2F16%2Fsemantic-groups-in-dtp&ref_src=twsrc%5Etfw&text=Semantic%20Groups%20in%20DTP&tw_p=tweetbutton&url=http%3A%2F%2Fscn.sap.com%2Fcommunity%2Fdata-warehousing%2Fbw%2Fblog%2F2013%2F06%2F16%2Fsemantic-groups-in-dtp&via=SAPCommNethttp://scn.sap.com/communicationshttp://scn.sap.com/community/getting-startedhttp://scn.sap.com/welcomehttp://scn.sap.com/actionshttp://scn.sap.com/community/downloadshttp://scn.sap.com/community/data-warehousing/bw/bloghttp://scn.sap.com/community/data-warehousing/bw/blog/2013/06/14/various-ways-for-file-moving-from-one-folder-to-other-on-application-serverhttp://scn.sap.com/community/data-warehousing/bw/blog/2013/06/20/long-texts-in-bw-74https://www.sapstore.com/?url_id=banner-US-2015-SCN-HeadLinkhttp://scn.sap.com/people/sangita.kumarihttp://scn.sap.com/servlet/JiveServlet/showImage/38-87240-231944/A1.jpghttps://twitter.com/intent/tweet?hashtags=scn&original_referer=http%3A%2F%2Fscn.sap.com%2Fcommunity%2Fdata-warehousing%2Fbw%2Fblog%2F2013%2F06%2F16%2Fsemantic-groups-in-dtp&ref_src=twsrc%5Etfw&text=Semantic%20Groups%20in%20DTP&tw_p=tweetbutton&url=http%3A%2F%2Fscn.sap.com%2Fcommunity%2Fdata-warehousing%2Fbw%2Fblog%2F2013%2F06%2F16%2Fsemantic-groups-in-dtp&via=SAPCommNethttp://scn.sap.com/community/uachttp://scn.sap.com/people/sangita.kumarihttp://scn.sap.com/login.jspahttp://scn.sap.com/activityhttp://scn.sap.com/community/data-warehousing/bw/blog/2013/06/16/login.jspahttp://scn.sap.com/community/data-warehousing/bw/bloghttp://scn.sap.com/community/newslettershttp://scn.sap.com/contenthttp://scn.sap.com/community/data-warehousing/bw/blog/2013/06/16/semantic-groups-in-dtp

  • 8/17/2019 Semantic Groups in DTP _ SCN

    2/6

     Product

    No

    Customer 

    No

    C ount ry Produc t

    Category

    Sale Value

    (In US $)

    Total Sales

    (In US $)

    Discount

    Amount (In

    US $)

    P001 C001 US Home 5000 5000 500

    P002 C002 UK Electronics 3000 3000 150

    P003 C003 Germany Kids 2000 2000 100

    P004 C004 India Home 4000 4000 200

    P005 C001 US Electronics 1000 1000 50

    P006 C003 Germany Kids 6000 6000 600

    P007 C005 France Home 5000 5000 500

    P008 C004 India Electronics 3000 3000 150

    P009 C002 UK Kids 2000 2000 100

    P010 C001 US Home 1000 1000 50

     Here if you notice about Customer C001 having same country and product category but Total sale is assigned as 5000

    and 1000 respectively.

    In such case for Product P010, customer received only 5% discount where as actually he/she should get 10%.

     Similar case is for Customer C003 and product P003.

     This is because Data uploaded into 2 equal packages of 5 records each, first 5 records into 1st package and rest 5

    records in 2nd package.

     Since in First package 5 records are as below,

     

    ProductNo

    Customer No

    Country ProductCategory

    Sale Value (InUS $)

    P001 C001 US Home 5000

    P002 C002 UK Electronics 3000

    P003 C003 Germany Kids 2000

    P004 C004 India Home 4000

    P005 C001 US Electronics 1000

     

    Total Sales Value is calculated as below

     Product

    No

    Customer 

    No

    Country Product

    Category

    Sale

    Value (In

    US $)

    Total

    Sale (In

    US $)

    P001 C001 US Home 5000 5000

    P002 C002 UK Electronics 3000 3000

    P003 C003 Germany Kids 2000 2000

    P004 C004 India Home 4000 4000

    P005 C001 US Electronics 1000 1000

     So Discount values for first 5 rows are stored into Target DSO as below

     Product

    No

    Customer 

    No

    Country Product

    Category

    Sale Value

    (In US $)

    Total Sale

    (In US $)

    Discount

    Amount (In

    US $)

    P001 C001 US Home 5000 5000 500

    P002 C002 UK Electronics 3000 3000 150

    P003 C003 Germany Kids 2000 2000 100

    P004 C004 India Home 4000 4000 200

    P005 C001 US Electronics 1000 1000 50

     For next 5 rows as below

     Product

    No

    Customer 

    No

    Country Product

    Category

    Sale Value

    (In US $)

    Total Sale

    (In US $)

    Discount

    Amount (In

    US $)

    P006 C003 Germany Kids 6000 6000 600

    P007 C005 France Home 5000 5000 500

    P008 C004 India Electronics 3000 3000 150

    P009 C002 UK Kids 2000 2000 100

    P010 C001 US Home 1000 1000 50

  • 8/17/2019 Semantic Groups in DTP _ SCN

    3/6

     

    With Semantic Group Data Upload

     Key fields are Customer no, Country and Product category

     Total sales value and Discount amount when data loaded with semantic group are as below

     Produc t N o C us tomer 

    No

    C ount ry Produc t

    Category

    Sale Value (In

    US $)

    Total Sale (In

    US $)

    Discount

    Amount

    (In US $)

    P001 C001 US Home 5000 6000 500

    P002 C002 UK Electronics 3000 3000 150

    P003 C003 Germany Kids 2000 8000 200

    P004 C004 India Home 4000 4000 200

    P005 C001 US Electronics 1000 1000 50

    P006 C003 Germany Kids 6000 8000 600

    P007 C005 France Home 5000 5000 500

    P008 C004 India Electronics 3000 3000 150

    P009 C002 UK Kids 2000 2000 1 00

    P010 C001 US Home 1000 6000 100

     In this case records will be grouped based on Semantic key definition and even if there are 2 packages each will have

    records as below.

     Records in First package grouped based on are Customer No, Country and Product Category

     

    Product

    No

    Customer 

    No

    Country Product

    Category

    Sale Value

    (In US $)

    Total Sale

    (In US $)

    Discount

    Amount (In US

    $)

    P001 C001 US Home 5000 6000 500

    P002 C002 UK Electronics 3000 3000 150

    P005 C001 US Electronics 1000 1000 50

    P009 C002 UK Kids 2000 2000 100

    P010 C001 US Home 1000 6000 100

     

    Records in Second package

     Product

    No

    Customer 

    No

    C ount ry Produc t

    Category

    Sale Value

    (In US $)

    Total Sale

    (In US $)

    Discount

    Amount (In

    US $)

    P003 C003 Germany Kids 2000 8000 200

    P004 C004 India Home 4000 4000 200

    P006 C003 Germany Kids 6000 8000 600

    P007 C005 France Home 5000 5000 500

    P008 C004 India Electronics 3000 3000 150

     Due to this semantic grouping we have correct values for the Total Sales and our discount values are also calculated

    as expected.

     Please note to accommodate records as per semantic group, package size will be automatically adjusted. Hence, it

    will not be constant through out the load.

     Case 2. Error handling

     Similarly if Error handling is enabled and error DTP is available, error handling functionality will work as below based

    on semantic group.

     Without Semantic Group Data U pload

     In case there is an error in the record having product no P001 then it will go into error stack and rest of the records will

    be uploaded. In such case for Product P010, total sales value will be 1000 and hence discount will be 5% i.e. 50$.

     Even later if we will correct first record (P001) into error stack and upload it through error DTP, Discount value will not

    change for record P010.

     With Semantic Group Data Upload

     In case there is an error in the record having product no P001 then it will go into error stack along with record having

    product id P010 and rest of records will be

    uploaded into target. It is due to semantic definition, so even one record is having error, both records are transferred

    into error stack to maintain semantic grouping.

     

  • 8/17/2019 Semantic Groups in DTP _ SCN

    4/6

     Average User Rating

    (17 ratings)

    2   Tweet

    In such case, when product P001 will be corrected into error stack and error DTP will run, it will upload both records

    with correct total sales and discount value.

     Additional Note

    Here I have used only 2 cases for illustration purpose. In real life there can be more use cases as per specific needs.

     Please note above example is to explain the concept of semantic groups. There can also be other ways to achieve this

    calculation.

     Hope it will help to get better insight about semantic groups into DTP for beginners.

    13260 Views

    Topics: enterprise_data_warehousing/business_warehouse  Tags: sap_netweaver_bw, sap_bw, sap_netweaver_bi, sap_bi

    Share   2Like

    25 Comments

    Like (1)

    Suman Chakravarthy K 16-Jun-2013 15:02

    Nice demonstration with real-time examples...But this example is to upload to DSO(W-Optimized)One , Am i right? If you upload these 10 records to Standard DSO, then the behavior will changebased on the Key fields and settings in your DSO. Thanks,Suman

    Like (2)

    Sangita Kumari 16-Jun-2013 15:04 (in response to Suman Chakravarthy K)

    Hello Suman, Thanks for comments. Even in Std DSO, if you have defined only Product id as keyfield it will behave as I mentioned in the above example. So here assumption is in Std

    DSO only product id is key field.But you are right if you have already defined Customer No, Country and Productcategory  as key field in Std DSO behavior will be different. Best Regards,Sangita

    Like (1)

    Suman Chakravarthy K 16-Jun-2013 15:05 (in response to Sangita Kumari)

    Yeah, Now it is very clear to me. Anyway, nice efforts.. Regards,Suman

    Like (0)

    Kannan Jagadeesan 17-Jun-2013 06:48

    Good work - keep it up. Kannan

    Like (1)

     Anshu Lilhori 17-Jun-2013 07:15

    Really helpful documnet to understand the concept of semantic keys in grouping the same data andprocessing it in similar package. It automatically increases the Package size based on records i believe. Regards,

     Anshu Li lhori

    http://scn.sap.com/community/data-warehousing/bw/blog/tags#/?tags=sap_netweaver_bihttp://scn.sap.com/people/kannan.jagadeesanhttp://scn.sap.com/community/data-warehousing/bw/blog/tags#/?tags=sap_bwhttp://scn.sap.com/people/suman.kchakravarthyhttp://scn.sap.com/community/data-warehousing/bw/blog/tags#/?tags=sap_bihttp://scn.sap.com/people/suman.kchakravarthyhttp://scn.sap.com/people/sangita.kumarihttp://scn.sap.com/people/suman.kchakravarthyhttp://scn.sap.com/community/data-warehousing/bw/blog/tags#/?tags=sap_netweaver_bwhttp://scn.sap.com/people/suman.kchakravarthyhttp://scn.sap.com/community/data-warehousing/bw/blog/tags#/?tags=enterprise_data_warehousing%2Fbusiness_warehousehttp://scn.sap.com/people/anshu.lilhorihttp://scn.sap.com/people/kannan.jagadeesanhttp://scn.sap.com/people/anshu.lilhorihttp://scn.sap.com/people/sangita.kumari

  • 8/17/2019 Semantic Groups in DTP _ SCN

    5/6

    Like (0)

    Sangita Kumari 18-Jun-2013 12:46 (in response to Anshu Lilhori)

    Thanks Anshu. It automatically increases or decreases the package size based on semanticgrouping. Regards,Sangita

    Like (0)

    Manna Das 17-Jun-2013 07:50

    really great document with brief explanation. 

    Kind RegardsManna Das

    Like (0)

    Ramanjaneyulu Korrapati 17-Jun-2013 10:30

    Nice article with good examples. very well documented. thanks for sharing. ThanksRK

    Like (0)

    Umashankar Poojar  17-Jun-2013 11:41

    Very good article to understand the concept with example. Thanks for sharing. Cheers!

    Umashankar 

    Like (0)

    Sangita Kumari 18-Jun-2013 12:45

    Thanks All for your valuable feedback and appreciation!! Regards,Sangita

    Like (1)

    Krishna Chaitanya 02-Sep-2013 11:23

    Good work... nice efforts...Informative..Thanks :) Regards, Krishna.

    Like (1)

    Harish Allachervu 08-Feb-2014 17:43

    Exceptional articulation thanks or sharing and making us to understood very clearly with your 

    fabulous blog.... Regards,Harish

    Like (0)

    Padmasekhar Pediredla 08-Feb-2014 18:39

    excellent

    Like (0)

    Giri Prasad 10-Feb-2014 13:19

    Very good.

    Like (0)

    Selvam Ramalingam 21-Apr-2014 21:32

    Thanks for sharing, excellent document

    Like (1)

    Duke wu 25-Apr-2014 08:31

    simple and useful,

    http://scn.sap.com/people/duke.wuhttp://scn.sap.com/people/mkrishna.chaitanyahttp://scn.sap.com/people/harish.ahttp://scn.sap.com/people/harish.ahttp://scn.sap.com/people/selvam.ramalingamhttp://scn.sap.com/people/umashankar.poojarhttp://scn.sap.com/people/sangita.kumarihttp://scn.sap.com/people/kr.chhttp://scn.sap.com/people/kr.chhttp://scn.sap.com/people/deepthi123.deepthi123http://scn.sap.com/people/mkrishna.chaitanyahttp://scn.sap.com/people/padmasekhar.phttp://scn.sap.com/people/sangita.kumarihttp://scn.sap.com/people/umashankar.poojarhttp://scn.sap.com/people/sangita.kumarihttp://scn.sap.com/people/sangita.kumarihttp://scn.sap.com/people/padmasekhar.phttp://scn.sap.com/people/manna.dashttp://scn.sap.com/people/deepthi123.deepthi123http://scn.sap.com/people/duke.wuhttp://scn.sap.com/people/selvam.ramalingamhttp://scn.sap.com/people/manna.das

  • 8/17/2019 Semantic Groups in DTP _ SCN

    6/6

    Follow SCNSite Index Contact Us SAP Help Portal

    Privacy Terms of Use Legal Disclosur e Copyr ight

    Like (0)

    anirban mukhopadhyay 25-Apr-2014 12:11

    Hi Sangita, 

    Firstly, this is a top notch article with crisp explanations.

    However, I just had a little thought. I don't think that the DTP package size increases anytime. For thesame set of semantic keys, standard aggregation takes place and thus there is one record for thesame set of semantic keys. These records have been aggregated during extraction from the source.When semantic keys are used, internally sorting of the source data takes place during extraction onthe basis of the semantic keys. 

    Let me know what you think!

    Regards, Anirban. 

    Like (3)

    Sangita Kumari 17-May-2014 14:41 (in response to anirban mukhopadhyay)

    Hello Anirban, Thanks for appreciation. To answer your question, I will suggest try to load data withsemantic key and without semantic key and observe each DTP package size. It will be self explanatory and shall answer your question. Thanks. Regards,Sangita

    Like (0)

    anirban mukhopadhyay 13-May-2014 14:15 (in response to Sangita Kumari)

    Will Do.

    Like (0)

    Mohammed Abdullah 22-May-2014 09:07

    Excellent document !! Keep it up !!,

    Like (0)

    vimon wu 22-Aug-2014 03:48

    nice document, simple but helpful.

    Like (0)

    Evgeniy Potseluev 11-Aug-2015 11:47

    Thanks!

    Like (0)

    Jinal patel 01-Jan-2016 16:57

    one step up after reading this doc to get along with DTPs. Good Work!!

    Like (0)

    Ravi Raja 20-Apr-2016 13:40

    Thanks. Nice examples to show effective use of Symantic Grouping in DTP.

    Like (0)

    Prakash Doguparthy 11-May-2016 12:44

    Thanks for your explanation, Good Job !

    http://www.sap.com/corporate-en/our-company/legal/impressum.epxhttp://www.sap.com/corporate-en/our-company/legal/copyright/index.epxhttp://scn.sap.com/people/anirban.mukhopadhyayhttp://bit.ly/SCNTwRhttp://scn.sap.com/people/jinal007%40http://scn.sap.com/people/vimon.wuhttp://scn.sap.com/people/sangita.kumarihttp://scn.sap.com/people/prakash.doguparthyhttp://scn.sap.com/people/sangita.kumarihttp://scn.sap.com/people/prakash.doguparthyhttps://accounts.sap.com/ui/public/viewTextResource?scenario=SCN&spId=504efd8ee4b0555c3c17b94e&resourceType=RESOURCE_PRIVACYPOLICY&version=1&spDisplayName=SAP%20Community%20Networkhttps://accounts.sap.com/ui/public/viewTextResource?scenario=SCN&spId=504efd8ee4b0555c3c17b94e&resourceType=RESOURCE_TERMS_OF_USE&version=1&spDisplayName=SAP%20Community%20Network&locale=enhttp://scn.sap.com/people/anirban.mukhopadhyayhttp://scn.sap.com/people/vimon.wuhttp://bit.ly/SCNFBhttp://scn.sap.com/people/mohd.abdullahhttp://help.sap.com/http://scn.sap.com/people/ravi.raja3http://scn.sap.com/people/jinal007%40http://scn.sap.com/docs/DOC-18476http://scn.sap.com/people/anirban.mukhopadhyayhttp://scn.sap.com/people/anirban.mukhopadhyayhttp://bit.ly/SCNyouThttp://spr.ly/SCNgoogleplushttp://scn.sap.com/people/evgeniypotseluevhttp://scn.sap.com/people/evgeniypotseluevhttp://scn.sap.com/people/mohd.abdullahhttp://scn.sap.com/people/ravi.raja3http://scn.sap.com/docs/DOC-19361