on 01-29-2016 7:13 AM
hi all,
I have a query on the limitations of the standard Bapi RFC_READ_TABLE.
I am trying to read data from the table AFKO (Process order Header table) using RFC_READ_TABLE from SAP MII through BLS.
I am passing the,
RFC_READ_TABLE.Request{/RFC_READ_TABLE/INPUT/QUERY_TABLE} as AFKO
RFC_READ_TABLE.Request{/RFC_READ_TABLE/INPUT/DELIMITER} as ","
RFC_READ_TABLE.Request{/RFC_READ_TABLE/TABLES/OPTIONS} as
<?xml version="1.0" encoding="UTF-8"?><OPTIONS>
<item>
<TEXT>SFCPF IN ('ZPAS') AND AUFNR IN ('000082023648','000000306116','000082023649','000000306117')</TEXT>
</item>
</OPTIONS>
RFC_READ_TABLE.Request{/RFC_READ_TABLE/TABLES/FIELDS} as
<xml version="1.0" encoding="UTF-8"?><FIELDS>
<item>
<FIELDNAME>AUFPL</FIELDNAME>
<OFFSET>000000</OFFSET>
<LENGTH>000010</LENGTH>
<TYPE/>
<FIELDTEXT/>
</item>
<item>
<FIELDNAME>GAMNG</FIELDNAME>
<OFFSET>000000</OFFSET>
<LENGTH>000013</LENGTH>
<TYPE/>
<FIELDTEXT/>
</item>
<item>
<FIELDNAME>PLNBEZ</FIELDNAME>
<OFFSET>000000</OFFSET>
<LENGTH>000018</LENGTH>
<TYPE/>
<FIELDTEXT/>
</item>
</FIELDS>
RFC_READ_TABLE.Request{/RFC_READ_TABLE/TABLES/RowCount} as 100
I get the below error:
[ERROR] Unable to make RFC call Exception: [A condition specified dynamically has an unexpected format.]
If I change the
RFC_READ_TABLE.Request{/RFC_READ_TABLE/TABLES/OPTIONS} to
<?xml version="1.0" encoding="UTF-8"?><OPTIONS>
<item>
<TEXT>SFCPF IN ('ZPAS') AND AUFNR IN ('000082023648','000000306116')</TEXT>
</item>
</OPTIONS>
It works fine.
Please assist on what exactly can be the issue for this error. Same is the scenario for other tables like MARC, AFPO, MAKT as well.
hi christian,
Thanks for your reply.
I broke my where clause into below to ways:
1st option:
<?xml version="1.0" encoding="UTF-8" standalone="no"?><OPTIONS>
<item>
<TEXT>SFCPF IN ('ZPAS') AND AUFNR IN ('000082023649')</TEXT>
<TEXT>SFCPF IN ('ZPAS') AND AUFNR IN ('000082023648')</TEXT>
</item>
</OPTIONS>
This gives me outpuit for only PO: '000082023648', whereas ECC has detials for both the PO.
2nd Option:
<?xml version="1.0" encoding="UTF-8" standalone="no"?><OPTIONS>
<item>
<TEXT>SFCPF IN ('ZPAS') AND AUFNR IN ('000082023649')</TEXT>
</item>
<item>
<TEXT>SFCPF IN ('ZPAS') AND AUFNR IN ('000082023648')</TEXT>
</item>
</OPTIONS>
This gives the error that the data structure is not defined correctly.
Kindly suggest.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think TEXT in the OPTIONS table has a max length of 72 so you may have to break up your options into multiple rows.
Regards,
Christian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.