on 01-28-2015 3:14 AM
Hi All,
I created Analytical view on VBAK table. I applied some filters and dervied few sales orders. Now I want to pass these sales orders to VBAP table and derive few records and again applying few more filters on VBAP.
How do I achieve this?
Thanks
Srikanth
Hi sumeet,
It's not wise to change your table field data type. It can be used elsewhere right. So create a generated column. Formula will be something like to_integer("column").
Regards,
Safiyu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Safi,
Thanks a lot for your suggestion. I am developing model based on FS shared by Sri BW.
I am facing one major performance issue.I used calculation view for half of the development and created one more calculation view and used the previous one into the current calculation view in join.
And then starting joining with some more joins as per FS on different tables like LIKP and LIPS.
For first calculation view model I am getting the output but when I am putting the same in another calculation view its giving below error:
SAP DBTech JDBC: [2048]: column store error: search table error: [9] Memory allocation failed
Do I need to restructure my model by using attribute view and then using the same in analytic view?
BR
Sumeet
Hi safi,
Thanks for your reply. yes I got your point. Actually i am just trying through calculation view also. What i did I created one calculation view and did half part of development in calculation view say CALC1 and then created one more calculation view say CALC2 and called CALC1 in CALC2 in one of the join in CALC2 but when I did data preview its giving above error.
Is it not recomended to call one calc view in another?
Then what I did tried everything in one calc view but still it takes lot of time.
BR
Sumeet
Hi Sri,
Didnt get your question completly. But as per my understanding, you have to join sales order with vbap. Then again apply filters on it. If i am wrong, can you elaborate your requirement.
Regards,
Safiyu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Saif,
The following is my requirement
1. Select sale orders from VBAK where doc category is "D" for the selected date in the variable.
2. Pass all the sales orders to VBAP where rejection is <> blank and delievery status = A from VBUP
The above is just the one step in the whole set of requirement. i will go one by one.
Hope its clear.
Thanks
Sri
Hi,
Created Analytical view on VBAK table with filters defined in semantics.
Say filter is document category = C for date 20150110
In data preview i got 12 records. Now I want this 12 records to be joined with VBAP and VBUP and get values for only those records. Further more I need to put filter in VBAP where rejection is <>blank. So from 12 I may get only 10 records.
Hope its clear.
Thanks
Sri
Hi Sri,
Yes got it.
You can do this in a calculation view as shown in this image
Take vbap(projection 1) and vbup(projection 2) in one join. And in projection2 of vbup, apply filter for rejection from right click context menu. then take filtered vbak in projection 3. voila...
Note: You dont have to create a vbak analytical view. Directly you can put vbak table in projection 3 and apply filter in projection itself..
Hope it helps..
Cheers,
Safiyu
Hi Saif,
Here I am unable to understand logic.
I want to select sales orders from VBAK based on date, sales org , SD Document category and company code input parameter restriction. After getting sales orders i want to do inner join (I think) to get the sales order from other two tables.
Now what you have proposed i dont think i can do that in projection 3 and pass to other projections. IS my understanding right on your proposal?
Thanks
Sri
Hi Sri,
In projection 3 you select the req fields and then apply filter on those fields.. Similar to the analytical view you have created. if your analytical view consists of two or more tables then put the analytical view itself in projection 3.
Inner join of projection 1 and 2 with filers in projection 2 will give u the required output from vbap and vbup. and then inner join it with vbak table in projection 3 with filters to get the req output.
Did you try doing it in this way? Issues yet?
Regards,
Safiyu
Hi Safi,
I just tried it with analytical view also and achieved the same.
I added all the tables in data foundation and applied filters and joined the same.
And got the result.
Kindly let me know if my approach is correct or not.
And how can we measure the performance of any model which we are building?
Since i can see we can build requirement with different ways just like we see now.
Thanks in advance
Sumeet
Hi Sumeet,
Yes you can achieve it in different way. Analytical views are meant to be used to achieve star schema. Here you dont have any objects in your logical join node right. I am not so sure about this way of achieving it. . On the other side, Analytical view Joins faster. So this may be the best option. Should cross check on it. Anyways thanks for sharing it. And yeah ofcourse if you have objects in logical join, this is the right way.
Cheers,
Safiyu
Hi Sri,
I went through the doc. I'm implementing the similar scenario in my project.
For all master data level joins, join it in attribute views. And for transaction level, join these attributes and the corresponding fact table in analytical view. You can also join two or more fact tables in data foundation node. And to apply filters, right click on relevant column in data foundation and apply filter.
Let me know if you require further help on this.
Regards,
Safiyu
Hi Saif,
Thanks for going thru doc.
I completed first scenario VBAK, VBAP and VBUP with your help.
Now my issue is for the second scenario
Following is my first modelling
Now how to work with the second and other approaches. Can you help me in giving idea how to pass, join different restrictions and combine all together.
Thanks
Sri
Hi Sri,
Since you have many similar requirements, You can achieve these in analytical views as shown in diagram.
Choose the fields required from each table. It will get passed on to next table. And make sure to add the column on which you are joining only from a central table. ie, Here i have considered vbpa as central table. So chose vbeln from it on which we were joining. And wherever filters are required apply filter from the menu as shown in the picture.
Hope this helps.
Regards,
Safiyu
Hi safi,
i have joined couple of tables in data foundation but i can see datatypes cannot matches for some fields like POSNR and POSNV.
What needs to be done in this case? is there by anything we can change the datatype?
And same error I got while joing VBAP-POSNR and VBUP-POSNR. Both have different data types.
Error: "SAP_SLT".VBUP.POSNR(NVARCHAR)_"HANA".VBFA.POSNV(DECIMAL) are incompatible in Data Foundation node
BR
Sumeet
Hi Sumeet,
In that case you have to create a generated column in your source table. Which basically typecast your column to required data type. Here is syntax to create one.
ALTER TABLE "<your_schema>"."<your_dimension_table>" add ( <calculated_attribute_name> varchar GENERATED ALWAYS AS (<formula>));
Regards,
Safiyu
Hi Safi,
I am trying to alter with below syntax to convert datatype of POSNR from NVARCHAR to DECIMAL but its not allowing me to do the same. Why its not allowing me to do the same?
ALTER TABLE "SAP_SLT"."VBUP"
alter("POSNR" DECIMAL);
SAP DBTech JDBC: [7] (at 36): feature not supported: cannot modify column type from nvarchar to decimal: POSNR: line 2 col 7 (at pos 36)
BR
Sumeet
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.