Powered By

Free XML Skins for Blogger

Powered by Blogger

Friday, August 22, 2008

Removing '#' in Analyzer (Report)

In ODS, there are records having a value BLANK/EMPTY for some of the fields. EX: Field: `Creation Date' and there is no value for some of the records.

For the same, when I execute the query in Analyzer, the value `#' is displaying in place of `BLANK' value for DATE and other Characteristic fields. Here, I want to show it as `BLANK/SPACE' instead of `#'. How to do this?

I had a similar problem and our client didn't want to see # signs in the report. And this is what I did. I created a marco in Workbook as SAPBEXonRefresh and run my code in Visual Basic editor. You can run same code in query also as when you will refresh query this # sign will be taken care. You can see similar code in SAP market place.

I will still suggest not to take out # sign as this represent no value in DataMart. And this is SAP standard. I did convince my client for this and later they were OK with it.

The codes are below:

Sub SAPBEXonRefresh(queryID As String, resultArea As Range)

If queryID = "SAPBEXq0001" Then
resultArea.Select

'Remove '#'
Selection.Cells.Replace What:="#", Replacement:="", LookAt:=xlWhole, _ SearchOrder:=xlByRows, MatchCase:=False, MatchByte:=True

'Remove 'Not assigned'
Selection.Cells.Replace What:="Not assigned", Replacement:="", LookAt:=xlWhole, _ SearchOrder:=xlByRows, MatchCase:=False, MatchByte:=True

End If

' Set focus back to top of results
resultArea(1, 1).Select

End Sub

No comments:

Archives