Skip to Content
0

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

Feb 16, 2017 at 02:28 PM

237

avatar image
Former Member

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} ==''

capture.jpg (51.5 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
christian libich Feb 16, 2017 at 05:39 PM
1

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

Regards,
Christian

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

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.

0
christian libich Feb 20, 2017 at 01:50 PM
0

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



Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Mar 03, 2017 at 09:03 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded