March 31, 2010 @ 12:15 am
Removing ‘#’ in BEX analyzer
In BEX analyzer, a query cell with blank value (in characteristics) is filled by default with values like ‘not assigned’ or ‘#’ , and sometimes this is not the best output to present to an end-user.
Googling the web, we found a easy solution to replace those values with the desired blank value. The solution is based on Visual Basic and consists on creating a macro like this one:
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:=TrueEnd If
‘ Set focus back to top of results
resultArea(1, 1).SelectEnd Sub
Our reference was a cool article, located at this link.
Good coding!
Filed under BW Permalink · No Comments »
