SAP RFC "RFC_READ_TABLE" can search for job names like "*" and "%" of sm37

weiyinvelee

New Member
Joined
Oct 24, 2019
Messages
2
English is not good, please forgive me

You can search for information by giving the full name with the job name.
How to search like sm37, you can use * or % search range

Like this
StrMaterial = "888_A31-YCH-*"
But it doesn't work, so there should be other ways, or the instructions of the seniors.
For example,
tblOptions(1, "TEXT") = "JOBNAME EQ '" & StrMaterial & "'"
EQ want to change?


Code:
Private Sub GetBins()

    Set objFileSystemObject = VBA.CreateObject("Scripting.FileSystemObject")
    Set filOutput = objFileSystemObject.CreateTextFile("C:\LQUA.CSV", True)


    Set RFC_READ_TABLE = funcControl.Add("RFC_READ_TABLE")
    Set strExport1 = RFC_READ_TABLE.Exports("QUERY_TABLE")
    Set strExport2 = RFC_READ_TABLE.Exports("DELIMITER")
    Set tblOptions = RFC_READ_TABLE.Tables("OPTIONS")
    Set tblData = RFC_READ_TABLE.Tables("DATA")
    Set tblFields = RFC_READ_TABLE.Tables("FIELDS")
    
    strExport1.Value = "TBTCO"
    strExport2.Value = ","
    
    'StrMaterial = InputBox("Please Input Part Number")
    StrMaterial = "888_A31-YCH-*"
    '設定要找的job name是那一個, 多個條件時就直接在同一行之後用&來接AND
    tblOptions.AppendRow
    tblOptions(1, "TEXT") = "JOBNAME EQ '" & StrMaterial & "'"
 

weiyinvelee

New Member
Joined
Oct 24, 2019
Messages
2
English is not good, please forgive me

You can search for information by giving the full name with the job name.
How to search like sm37, you can use * or % search range

Like this
StrMaterial = "888_A31-YCH-*"
But it doesn't work, so there should be other ways, or the instructions of the seniors.
For example,
tblOptions(1, "TEXT") = "JOBNAME EQ '" & StrMaterial & "'"
EQ want to change?


Code:
Private Sub GetBins()

    Set objFileSystemObject = VBA.CreateObject("Scripting.FileSystemObject")
    Set filOutput = objFileSystemObject.CreateTextFile("C:\LQUA.CSV", True)


    Set RFC_READ_TABLE = funcControl.Add("RFC_READ_TABLE")
    Set strExport1 = RFC_READ_TABLE.Exports("QUERY_TABLE")
    Set strExport2 = RFC_READ_TABLE.Exports("DELIMITER")
    Set tblOptions = RFC_READ_TABLE.Tables("OPTIONS")
    Set tblData = RFC_READ_TABLE.Tables("DATA")
    Set tblFields = RFC_READ_TABLE.Tables("FIELDS")
    
    strExport1.Value = "TBTCO"
    strExport2.Value = ","
    
    'StrMaterial = InputBox("Please Input Part Number")
    StrMaterial = "888_A31-YCH-*"
    '設定要找的job name是那一個, 多個條件時就直接在同一行之後用&來接AND
    tblOptions.AppendRow
    tblOptions(1, "TEXT") = "JOBNAME EQ '" & StrMaterial & "'"
Checked for a long time
I thought I should use the instructions of abap to find
So it is "JOBNAME LIKE '111_A11-YA-*%'"
thank
 

Forum statistics

Threads
1,078,213
Messages
5,338,891
Members
399,265
Latest member
aj17x55

Some videos you may like

This Week's Hot Topics

Top