Reputation: 37
How to sort by any fields (date example)
I want to retrieve a list of customers sorted by a specific fields, using BAPI Functions and JCo.
I am able to retrieve the list of customers perhaps they are not sorted.
<BAPI_CUSTOMER_FIND>
<import>
<MAX_CNT>100</MAX_CNT>
</import>
<tables>
<SELOPT_TAB>
<row>
<TABNAME>KNA1</TABNAME>
<FIELDNAME>NAME1</FIELDNAME>
<FIELDVALUE>*</FIELDVALUE>
</row>
</SELOPT_TAB>
</tables>
</BAPI_CUSTOMER_FIND>
Upvotes: 0
Views: 891
Reputation: 6859
when you directly call a standard bapi that doesn't sort, you have to sort yourself in Java.
Or you write your own function module in ABAP that calls the bapi and sorts the table before it returns the table to the caller.
Upvotes: 5