If I run any of the demo programs whose names start with SALV_DEMO, the screens do not show any data.
Example for program SALV_DEMO_TABLE_SIMPLE:
As you can see, there's no data, so impossible to play with sort, filter and so on.
How to add some data?
You have to read the comments at the beginning of the source code.
For instance, there is the following comment for program SALV_DEMO_TABLE_SIMPLE:
* If the table ALV_T_T2 is empty, please create data for the demo
* by running report BCALV_GENERATE_ALV_T_T2
The program BCALV_GENERATE_ALV_T_T2 will fill the tables ALV_T_T2, ALV_CHCK, ALV_TAB and ALV_CUR, based on some predefined constants and some random logic.
It should be sufficient to run the program with the default values:
By default, after the data has been inserted into the four tables, it displays the contents of ALV_T_T2:
Most of SALV_DEMO* and BCALV_TEST* programs are based on these tables.
NB: other demo programs, like BCALV_GRID* or BCALV_EDIT*, are based on other tables like SCARR, SFLIGHT, etc., which are filled by another report, SAPBC_DATA_GENERATOR.
Related
I am having an issue with my Microsoft Access database. One of my tables looks completely blank, but it has 11632 records listed in the bottom. Take a look at this screenshot. Though the table shows up blank, when I run the query it pulls the correct data from this table, so I know the data is there, it is just not appearing for some reason. I have tried on Access 2013 and 2016 on a different computer, and both have the same effect. I have also tried compacting and repairing, and also exporting the table but the file it exports to also appears blank, aside from the field names. Any ideas on what I could try?
Thanks!
Turn your import into a 2 step process (or more...). Write it raw into a scratch pad table. Then fire an append query, that has the appropriate criteria to result in only valid records going into the final table.
This isn't unusual at all given that some outside data sources may not have the controls to prevent bad records. Sometimes one must "wash" the data with several different query criteria/steps in order to filter out the bad guys.
I'm looking to compare two datasets with each other. In an ideal world, I'd like to have it to show a green item if the data matches between the two. I have created two different GDocs files to get the code out there, to prevent SO from dinging me on formatting.
The first dataset is from our program itself, it pulls everything from our application, and displays the information, based on company code. The second dataset is from an external source requiring validation. The main fields I am matching are "NPI Number (Type 1)" from DS1 vs. "NPI" from DS2. If there is a match to highlight in green the row from both sides of data.
Dataset 1
Dataset 2
You may need to use LookUp function and set that as a expression to fill the background color of a text box or row of a table
Sample Expression: =iif(Len(Lookup(Fields!NPI.Value, Fields!NPI.Value, Fields!ProviderName.Value, "DS1"))>0,"Green","Red")
I have created a sample here. Download entire content and run it.
I have list of 100 views for which I need to check if those views have fields A and B. If any of those 100 views uses those two fields, I need to display a message. Any existing function module will help.
Sujeet,
Function module ISB_TABLE_READ_FIELDS accepts a table or view name and returns a table of fields on the structure. If you don't have this function module, you can write your code to select entries from table DD03L, which is keyed on table name and contains all of the fields on all database table structures.
Once you have the list of fields, the code to implement the logic you want should be trivial.
I doubt there is an existing SAP Function Module to do this - I suspect you will have to write some ABAP or do some Excel manipulation.
I would expect that there is a table within SAP which defines views - I'm not sure which though.
If no-one suggests anything else I would use ST05 - "SQL Trace" to see which tables SAP reads when you call SE12 to look at the view you are interested in. You can look at the SELECT statements and see which tables it reads to get the view definition.
I just tried pressing F1 on a field in SE12 for a view to see if there was a mention of a table. The technical info made reference to a structure containing the string "DD27" - I had a look in SE16 for tables with similar names and DD27SV looks like it might help.
Have a look and see what you think - you'd need to query that table in some ABAP or extract to Excel and do equivalent manipulation there.
Would you please help me (total beginner) to prepare a VBA macro that would open a sheet on the background and import specific selection as shown below:
Let's say we have downloaded wordcount analysis (xlsx) like this downloaded from a CAT tool for testing.
Now I would need to add a macro to my main sheet that would read lines starting (Column A) with "All". If "All" then I'd need to record columns of that line (specficilly Columns A - O) in array / hashtable?.
Please take a look at this image that summs it all (better than explaining it for me :-)
Let me know in case you need to know more details.
All tips / suggestions are greatly appreciated.
Many thanks!
My suggestion (I'm a beginner too) would be to use the Macro Recorder. Great tool to learn (example).
start recording
filter for 'ALL'
copy/past the Cells
stop Recording
Then have a look at the recorded code and adjust it :)
Looking at your data and the final layout you are looking for, using a Pivot Table would provide you with all of the flexibility you need.
You can:
filter which data to display
generate calculated values based on data in other columns
choose what order your columns are displayed
dynamically change the layout if you decide you want a different view
From your data, I was able to generate the following Pivot Table in about 15 minutes.
There are several good, simple tutorials on building Pivot Tables. A Google search will turn up plenty.
Things you will need to learn about for your particular problem:
Classic display (I used the classic display to get this particular layout)
Calculated Fields (many of the columns in the pivot table are calculated based on your spec). There is a maximum string length of 255 characters for a field calculation, so you may need to rename some of the columns in the original data set.
Of course, basics of Pivot Tables
Loading new data and updating your pivot table
Good Luck!
I had a problem in creating the Dynamic report in SSRS. My problem is:
In a table I have stored SQL scripts with the column SQLScripts. If you execute these SQL scripts you get different number of columns for each script.
My problem is, I have one report with buttons of these scripts, for example test1, test2...like that. If you press test1 button this should take the test one SQL script and should display the report with appropiate columns in that sqlscripts.
I can't create individual reports for each test report, they are plenty. Are there any options for me to solve this problem...
The only way I've been able to get this to work sofar is:
Each report has 2 datasets.
ReportData
DataHeaders
The "DataHeaders" need to have the proper name of the datafields in "ReportData". Be careful since SSRS replaces blanks and special characters with "_"
Now, create a table (or matrix) and drag the DataHeaders as the Columns of your report. (This should be a grouped column). If you run it at this point, you'll see all your columns without any data. Now comes the magic:
Create another report that takes a "DataField" parameter. Create another table or matrix within this report and set it's dataset property to be "ReportData". In the DATA cell for the table, set it to the expression =Fields(Parameters!DataField.Value).Value
Now go back to your first report. Right click and insert a subreport. Right click on the subreport and select "Subreport Properties". Under general, select the second report you created to be used as the subreport. Under parameters, select the DataField parameter and set its value to something like =Fields!DataField.Value
In my case I did some formatting in this expression to fix the above mentioned issue with spaces and special characters, since my stored procedure was initially used in ASP.NET and this was just a proof of concept.
Also in my experience the performance isn't great. In fact it was kinda slow, though I haven't had a chance to switch it to use a shared dataset, which I suspect would help a bit. Please let me know if you find a better solution.
I have not found a way to do this completely dynamically. Here is a similar question with some possible solutions:
How do i represent an unknown number of columns in SSRS?
You basically need to create a 'master dataset' from the other Datasets that are based on your multitude of SQL scripts first.The master dataset should contain the data to be presented in it's most simplistic form, i.e. in a simple list format.
Finally, go to the toolbar in SSRS and drag a 'Matrix' into the report. A Matrix table acts similar to a pivot table in Excel or a CrossTab query in Access that will display whatever's in the Dataset.