cancel
Showing results for 
Search instead for 
Did you mean: 

How can i check if the RFC Read table has the data in MII?

Former Member
0 Kudos

I am a new developer in MII.The function need work as follow.

Read the SAP Table, if has data, will go the first action. If not, go second action.

At first i want to check repeat itemcount, but if the repeater item count is zero, it will not go though the below actions under repeater.

H can i check if RFC read table has data?

i want to use follow code but it not work..

RFC_READ_TABLE.Response{/RFC_READ_TABLE/TABLES/DATA/item/WA} ==''

Accepted Solutions (1)

Accepted Solutions (1)

former_member185280
Active Contributor

You can try something like RFC_READ_TABLE.Response{count(/RFC_READ_TABLE/TABLES/DATA/item)}>0 in your Conditional action.

Regards,
Christian

Former Member
0 Kudos

Thanks, the code yoy provide work fine but i met another problem.

The count is 1 but the item/WA is empty.

The XML return is follow:

<?xml version="1.0" encoding="UTF-8"?><item>

<WA/>

</item>

I want to check if the RFC_READ_TABLE.Response{/RFC_READ_TABLE/TABLES/DATA/item/WA} is null or empty.

Answers (2)

Answers (2)

Former Member
0 Kudos

Or you can try in Condition action block

stringif(RFC_READ_TABLE.Response{/RFC_READ_TABLE/TABLES/DATA/item/WA} == nullstring, 0, 1)

Regards

Ram Upadhayay

former_member185280
Active Contributor
0 Kudos

Try using " instead of ' for string literals. If you haven't already I would recommend reading thru the online help files. There is a lot of useful information in there and even if you can't absorb it all in one go it would give you a good understanding of where to look when you run into issues.

Regards,
Christian