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 & "'"
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
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
 
Upvote 0

Forum statistics

Threads
1,213,529
Messages
6,114,155
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top