cancel
Showing results for 
Search instead for 
Did you mean: 

RFC Lookup, RFC_READ_TABLE (SORTING)

former_member185881
Active Participant
0 Kudos

Hello All

I am using RFC "RFC_READ_TABLE" to read table from SAP.

This table contains 2 fields.

I need value of SALES_ORG to be inserted in VKORG but after doing sorting with respect to PRIORITY from the table. (Only 1st record value need to be inserted in target field after sorting).

Example:

SALES_ORG    PRIORITY

1510                   3

1060                   1

2250                   2

In above example 1060 should get inserted in VOKRG.

screenshots are attached.

Display queue of RFC

Thanks

Dheeraj Kumar

Accepted Solutions (0)

Answers (4)

Answers (4)

markangelo_dihiansan
Active Contributor
0 Kudos

Hi Dheeraj,

You are getting a null from the output because the item node from the source is not mapped. A similar example can be found here:

Notice that a whole context was passed into the item.

Regards,

Mark

suman_saha
Contributor
0 Kudos

Hi Dheeraj,

The priority and the Sales_ORG you need to get from RFCLookUp.

Suman

former_member185881
Active Participant
0 Kudos

Hello Suman

This is the problem I am facing to get both the fields values from RFC.

I am getting only SALES_ORG. See display queue screenshot.

How to get two fields values from RFC.

Thanks

Dheeraj Kumar

suman_saha
Contributor
0 Kudos

Hi,

Yes we were also facing the same. We were unable to fetch more than one field at a time.

In your case,the 2nd value is the exception. Uncheck the use exception,the 2nd output field will not come.

You have to call RFCLookUp twice - once to fetch Priority and again to get SALES_ORG and use both outputs as shown.

We tried to use delimiter field, but didn't work for us in graphical one.

Suman

former_member185881
Active Participant
0 Kudos

Thanks Suman for hint. By using 2 RFC Lookup I achieved the result.

Thanks

Dheeraj Kumar

suman_saha
Contributor
0 Kudos

Hi Dheeraj

You may use sortbykey function:

Suman

suman_saha
Contributor
0 Kudos

Hi,

you need to insert copyValue with the index(the no of the record you need to insert,in this case 0) just before VKORG.

Regards,

Suman

iaki_vila
Active Contributor
0 Kudos

Hi Dheeraj,


(Only 1st record value need to be inserted in target field after sorting)

Have you tried with the copyValue function and set the parameter 1. Check how it works here Standard Functions in PI 7.0 - Process Integration - SCN Wiki

Regards-