cancel
Showing results for 
Search instead for 
Did you mean: 

How to order the output RFC in a OVS?

Former Member
0 Kudos

Hi people..

we develop a bapi that brings this fields:

_______________________________

<b>Item</b> | <b>Code</b> | <b>Description</b> | <b>Meins</b>

0001 | 12523 | lalalalalalala | Unit A

0002 | 16434 | lololololololo | Unit B

0003 | 21744 | lelelelelelele | Unit C

0004 | 31555 | lululululululu | Unit D

But, when this is implementing in a OVS the output result is:

<b>Meins</b> | <b>Description</b> | <b>Item</b> | <b>Code</b>

Unit A | lalalalalalala | 0001| 12523

Unit B | lololololololo | 0002 | 16434

Unit C | lelelelelelele | 0003 | 21744

Unit D | lululululululu | 0004 | 31555

How can fix this order?

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

lajitha_menon
Contributor
0 Kudos

Hi there,

The order in which the OVS is displaying the fields is probably the alphabetical order in which they are present in your output context.

Change the context attribute name according to your sort order like 0_Item, 1_Code, 2_Description, 3_Meins and it should automatically display it in that order...

Try it and let me know if it works,

cheers

Former Member
0 Kudos

Actually, the order is defined not by name, but by order your are adding attributes to node. Either in IDE or dynamically.

VS

lajitha_menon
Contributor
0 Kudos

Hi VS,

I have seen that when you add attributes to a node, it always appear in the alphabetical order in that node, no matter when you add the attribute to the node, hence the suggestion.. Is it not so?

Cheers,

LM

Former Member
0 Kudos

LM,

I observe just the opposite: when you are usind IWDNodeInfo.iterateAttributes() attributes are supplied in order they where added. Both in NW04 and NW04s. If you armed with debuger, you can see that attribute entry get own sequential index when added, hence you ( or just me? can observe this behavior.

Valery Silaev

SaM Solutions

http://www.sam-solutions.net

lajitha_menon
Contributor
0 Kudos

Hi VS,

Well, it must be the version then. Maybe this behaviour was a bug in the lower versions(I am on sp14) which was rectified later, as I have found it not very friendly that it sorts it alphabetically regardless of when you add it.

Cheers,

LM

Answers (1)

Answers (1)

Former Member
0 Kudos

Felipe,

I've created a reusable OVS-RFC library some time ago, check https://weblogs.sdn.sap.com/pub/wlg/4015. [original link is broken] [original link is broken] [original link is broken] [original link is broken]

It allows to display only necessary fields (both in input and output) in predefined order. Also overall setup for OVS is a one statement.

Valery Silaev

SaM Solutions

http://www.sam-solutions.net