cancel
Showing results for 
Search instead for 
Did you mean: 

MAS Sort Activity Journal on Product Description

Former Member
0 Kudos

We are on CRM 4.0 SP07 and we are using Mobile Sales Activities with

Product Dependent Activity Journals (Button ‘Get PPR Items’ and

Button ‘Copy Previous’)

When we create an activity journal by clicking on the button ‘Get PPR

Items’ the list of products for that PPR is loaded in the tile. The

sorting of this list is probably by GUID of the products, because it is

not sorted by Product number and not by Product Description.

We would like to sort the list automatically by Product Description

(long text) when it is loaded in the tile. Also when using the button

Copy Previous, the list should automatically be sorted by product

description.

I have tried to add an event handler ctrlctrlActDocuGrid with Row

Loaded 2 with the following code:

adocactdocu2DSO.bcol.Sort “Productkey”, “ASC”

This is not working, it is causing the tile Product, Details to be

loaded when clicking on the button Get PPR Items

Can anyone help me on how and where I can program this sorting on the

product description in Mobile Application Studio, tile

MSAACTactdocu4docactdocu2 (docactdocu2).

I am not an expert on Visual Basic so detailed instructions will be

highly appreciated.

Thanks,

Meily Halbersma

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

the best way is to check which query bdoc is used and change the query bdoc Sort order in the segment of the query bdoc.

rg,

markus

Former Member
0 Kudos

I changed the sort order in the query Bdoc ACTIVITY_OBJECT, segment DOCUMENTATION, field SFAMARA, generated the metadata for the Bdoc on the laptop, but it had no effect on the Mobile application. Maybe I used the wrong Bdoc? If you know another way of solving this by entering code in MAS, please let me know.

Best regards,

Meily

Former Member
0 Kudos

Hi,

it is rather the qBDoc <b>DOCUMENTATION_QUERY</b> which is the underlying BDoc for Business Query Object BSDOCUMENTATION which is fired in the onsolve anchor method.

But anyway do you need a sorting or rather a grouping of the items?

As in the mentioned BDoc only the smocondocu table is available (with field MATNR and SFAMARA) only a sorting for material number but not for description is possible.

And this "correct" sorting only applies after reopening the tile when adding multiple items because of the refreshing.

Regards,

Wolfhard

Former Member
0 Kudos

Hi,

Thanks for your help.

We decided to leave the application as it is now. From your comment it was clear that a refresh would be necessary and that would not be any different then clicking on the column to do a sorting on the description.

Best regards,

Meily

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Use the same code as you have mentioned above to sort the business collection.

adocactdocu2DSO.bcol.Sort “Productkey”, “ASC”

This should work.

Regards,

Former Member
0 Kudos

Hi Sandeep,

I used the coding, but it is not working. After adding this code, clicking on the button Get PPR Items results in the tile "Product, Details" to be loaded.

I entered the code at the end of the programme for this button and also somewhere in the middle, but the result is the same.

Maybe the code for CRM 4.0 is different?

Best regards,

Meily

Former Member
0 Kudos

Hi Meily,

instead of creating a new event handler, try sorting the bcol at the end of the onclicked event handler of the button 'Get PPR items'.

boyai

Former Member
0 Kudos

Hi Boyai,

Thanks for your help, I located the onclicked event handler, but I have no idea what coding to use. Could you provide me with the exact coding that I should use?

I want to sort on the long text of the product description.

Meily