Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Sorting P&L Statement from SAP

Hi All

At the moment I am working on a General Ledger project loading data from SAP. I am working with the template that Qlik has created (SAP-FI_General_Ledger_QlikStart) as the base. That works fine. I want to create the general Profit and Loss statement and I know how to link the accounts and create the P&L tables.

However, I don't know how to get the sorting of the P&L table right. When QV is loading data from SAP for the P&L tables it is loading the data in alphabetical order. Not in the order of the P&L statement.

Does anyone know where in SAP the sorting of the PandL statement should be? If there is a field in SAP that decided how the sorting of the P&L Statement is but it is not being updated by my client at the moment? I cant find this data and information.

I am loading data from SETNODE, SKAT, SETHEADERT, SETLEAF at the moment to create the P&L tables and link them to the rest of the data model.

I am thankful for any help.

//Fredrik

Tags (2)
5 Replies

Re: Sorting P&L Statement from SAP

I think qv loads data exactly in the order from the source but shows the data in tables/listboxes by default in numeric/alphabetical order. You could change these sorting to load-order within the tab sort. Further you could use recno() and/or rowno() to show the load-order in tables - it's recommended for data validation and to comment it out in the final app then it needed by large data a large amount of RAM.

- Marcus

Not applicable

Re: Sorting P&L Statement from SAP

Hi Marcus

Thanks you for your response. The problem is that the load order is alphabetical. If I sort by load order in objects the object will sort the records alphabetically the same if I use rowno().

I want to find a field in SAP that I can organize the load order by or sort the objects with. 

Re: Sorting P&L Statement from SAP

If your data are not too big you could load the data twice - first as a normal load and then from this table as a resident load which you could sort with a "order by" statement.

- Marcus

Not applicable

Re: Sorting P&L Statement from SAP

Yes, the thing is that I don't know the field that I can use to get the correct load order. I have looked through the tables in SAP that I load data from and I cant find a field that I can use to organize the load order. So that is what I wonder. If someone knows the field in SAP that should be used to organize the correct structure of the P&N statement.

Re: Sorting P&L Statement from SAP

Perhaps there are several fields combined for these sorting. You could export these sap-view directly to excel and investigate the data. I think then you will some pattern.

- Marcus

Community Browser