cancel
Showing results for 
Search instead for 
Did you mean: 

startrfc - how to call with "input table"?

EYoung
Explorer
0 Kudos

I have not been able to get sapnwrfc for Perl to compile correctly on my AIX systems so i want to try something different.

I started to investigate using startrfc to get my data but am running in to a problem.

Problem Summary: I want to get information via RFC_READ_TABLE using startrfc. I can successfully call function modules but cannot figure out how to send in a "WHERE" clause using startrfc. Does anyone know how to send "input tables" to startrfc so that I can limit my results?

Background: I want to dump a list of the dialog UIDs in a SID/client. When I do RFC_READ_TABLE via SE37, it asks for an "OPTIONS" input table that you use to put the "WHERE" clause. I fill in the information in the "TEXT" field and all is well.

I can call startrfc with the -T option and capture the output to a file, but I cannot figure out how to use an input file to provide the OPTIONS table. -E doesn't work.

Here is what I call:


/usr/sap/<SID>/DVEBMGS60/exe/startrfc -t -3 -h <hostname> -s 60 -c 000 -l E -u <my id> -p <my password> -F RFC_READ_TABLE -E QUERY_TABLE=USR02 -E "DELIMITER=|" -T DATA,1000,w=output.txt -T OPTIONS,100,r=input.txt

My input file (input.txt) looks like:

TEXT="BNAME = 'someuid'"

Here is the error message I get when I run this.

RFC Call/Exception: SYSTEM_FAILURE

Group Error group 104

Key RFC_ERROR_SYSTEM_FAILURE

Message A dynamically specified column name is unknown.

Note that I know that there are other functions to check for existence. I am attempting to get a dump of all dialog users with some information from USR02 not normally provided by the builtin function modules (ERDAT). This is just the first step to getting there. Once I have this figured out, I'll send in a "*" to match all. Also, I am able to do this sort of successfully via Perl's sapnwrfc but am unable to get it compile on AIX and that is where I need to run this.

Can anyone help?

Edited by: Eric Young on Apr 7, 2011 5:59 PM

Edited by: Eric Young on Apr 7, 2011 6:00 PM

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Since you have tracing turned on (-t), what does the trace file show?

EYoung
Explorer
0 Kudos

It's fairly obtuse as well, but I can see that I'm sending something. I just don't know what it should look like so that SAP likes it. Here's the relevant send section:

000240 | 04000000 01033003 02000800 0001F400 |......0.......ô.|

000250 | 00000003 02030100 074F5054 494F4E53 |.........OPTIONS|

000260 | 03010330 00040000 00020330 03020008 |...0.......0....|

000270 | 00000032 00000001 03020303 00325445 |...2.........2TE|

000280 | 5854203D 2022424E 414D4520 20202020 |XT = "BNAME = 'S|

000290 | 20202020 20202020 20202020 20202020 |SOMEUID'" |

0002a0 | 20202020 20202020 20202020 20202020 | |

Please note that I've obfuscated "SOMEUID" and the corresponding HEX dump.

Edited by: Eric Young on Apr 7, 2011 6:26 PM