Skip to Content

How to store translation statistics numbers to vbs variable values?


Is there an alternative to getting translation statistics data in transaction SLLS in a translation system, i.e. the alternatove to this process: Translation System -> Transaction SLLS -> Set Parameters -> Display Statistisc

The result is to get the number of lines to be translated. This approach is not good for vbs scripts as the displayed number of lines are not fileds which can be set as variable valuses in vbs.

I've tried transaction SE16 and the table SLLS_STATS_ATTR but I keep getting the message that there are no entries for the given key.

I've entered the source and target language, the translation area and the worklist number.

The table SLLS_STATSDATA gives me the info, but it's for all records. So again I would have to download and preprocess before I could use the summary numbers only.

Is there a possibility to get the total number of lines by new/modified/available in the vbs as value?

Thank you.



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Apr 28, 2017 at 06:38 AM

    Hello Sebastjan,

    there are solutions to solve your problem. Here is a solution with PowerShell, because I don't use VBScript anymore, it is deprecated. I advice you to use PowerShell as well instead VBScript. In my case I use the RFC-enabled function module RFC_READ_TABLE with .NET Connector NCo. I call the function module with the table SFLIGHT and the column SEATSMAX to sum it up. The data is a string, so it is necessary to convert it to CSV via ConvertFrom-CSV first to use Measure-Object method. So it is very easy to get the sum of a column, average, minimum or maximum.

      #-Sub Load-NCo--------------------------------------------------------
        Function Load-NCo {
          $ScriptDir = $PSScriptRoot
          If ([Environment]::Is64BitProcess) {
            $Path = $ScriptDir + "\x64\"
          Else {
            $Path = $ScriptDir + "\x86\"
          [Reflection.Assembly]::LoadFile($Path + "sapnco.dll") > $Null
          [Reflection.Assembly]::LoadFile($Path + "sapnco_utils.dll") > $Null
      #-Function Get-Destination--------------------------------------------
        Function Get-Destination {
          #-Connection parameters-------------------------------------------
            $cfgParams = New-Object SAP.Middleware.Connector.RfcConfigParameters
            $cfgParams.Add("NAME", "TEST")
            $cfgParams.Add("ASHOST", "NSP")
            $cfgParams.Add("SYSNR", "00")
            $cfgParams.Add("CLIENT", "001")
            $cfgParams.Add("USER", "BCUSER")
            $SecPasswd = Read-Host -Prompt "Passwort" -AsSecureString
            $ptrPasswd = [Runtime.InteropServices.Marshal]::SecureStringToBStr($SecPasswd)
            $Passwd = [Runtime.InteropServices.Marshal]::PtrToStringBStr($ptrPasswd)
            $cfgParams.Add("PASSWD", $Passwd)
          Return [SAP.Middleware.Connector.RfcDestinationManager]::GetDestination($cfgParams)
      #-Sub Read-Table------------------------------------------------------
        Function Read-Table () {
          $destination = Get-Destination
            [SAP.Middleware.Connector.IRfcFunction]$rfcFunction = 
          #-Set import parameter--------------------------------------------
            $rfcFunction.SetValue("QUERY_TABLE", "SFLIGHT")
            $rfcFunction.SetValue("DELIMITER", ";")
            [SAP.Middleware.Connector.IRfcTable]$Fields = `
            $Fields.SetValue(0, "SEATSMAX")
          #-Call function module--------------------------------------------
            Try {
              #-Get column names--------------------------------------------
                ForEach ($Row in $Fields) {
                  $ColumnNames = $ColumnNames + $Row.GetValue("FIELDNAME") + ";"
                $ColumnNames = $ColumnNames.Substring(0, $ColumnNames.Length - 1)
                $strCSV = $ColumnNames + "`r`n"
              [SAP.Middleware.Connector.IRfcTable]$Table = `
              #-Get table data----------------------------------------------
                ForEach ($Row in $Table) {
                  $strCSV = $strCSV + $Row.GetValue("WA").ToString().Trim() + "`r`n"
              $CSV = ConvertFrom-Csv $strCSV -Delimiter ";"
              $CSV | Measure-Object "SEATSMAX" -Sum
            Catch {
              Write-Host "Exception" $_.Exception.Message "occured"
      #-Sub Main------------------------------------------------------------
        Function Main () {
          If ($PSVersionTable.PSVersion.Major -ge 5) {

    You can find more information to use NCo with PowerShell here.

    Let us know your results.


    Add comment
    10|10000 characters needed characters exceeded