cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Smart Forms: General Indicator(Already sort)check box

Former Member
0 Kudos

If in the form interface a tables was passed that was sorted before by the application, and it is now processed in the loop of a data node, we must again list the sort fields explicitly and, in addition, mark the checkbox "already sorted".

I have given the fields name and trying to sort again with other fields but it seems that the sorting is not done.

Is it some thing which I am missing..

let me know.

Thanks,

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Even if you are passing an already sorted internal table, no need of checking in the 'already sorted' checkbox. Specify the field name in the 'Field name' and give the sort criteria(Whether it should be 'Event on Sort Begin' or 'Event on Sort end'). If u are having the intenal table it_vbrp with fields, it_vbrp-vbeln, it_vbrp-posnr, it_vbrp-matnr. And u want to sort on the basis of matnr, specify in the field name as MATNR and click on the event. Then an event will be created. Create a table line below the event and map the fields in it.

-


Shiny S Krishna

Former Member
0 Kudos

Thanks Krishna,

I created till creating the event..how to map the fields..?

which field should I map.

I have delivery document which has material,material des,size and quantatity.

I want to sort on material.

I removed the already sorted check and then error come as "internal table is kind sorted and cannot be used for sorting".

How should I map the field after I create the event.

Please advice.

Thanks in advance.

Former Member
0 Kudos

Hi,

Pls specify y u r sorting on the basis of material number. (You want to calculate the subtotal based on material no or you just want to display only..)

-


If u want to find the subtotal, pls find the below mentioned procedure :

-


In the table, in which you are displaying the items,

1.Give the field name for which you want the sort. Then click on the radio button u2018event on sort endu2019. ( For eg: you are looping the internal table it_lips into wa_lips which contains the fields vbeln ,posnr, matnr, netwr.... And you want to sort an find the subtotal of netwr on the basis of matnr. In the table, in the data tab give the sort criteria field as MATNR(not it_lips-matnr, just the filed name only) and click on event on sort end. )

2.An event node will be created.

3.Create two table lines in the event node.

a.One for displaying the material number

b.Other for displaying the subtotal.

4.Create program lines in the table and write the code as Subtotal = subtotal + wa_lips-netwr.

5.Create a text in the subtotal tableline and drag the subtotal variable there.

-


Shiny S Krishna

Former Member
0 Kudos

Hi Krishna,

I am sorting the material for pick and pack for delivery.

I have five field in the form

Material

Material description.

size

color

quant

The internal table is sorted table and if I just gave the material field(checked the Event on Sort field)..It gives an error as internal table is a table of sorted,you cannot use the use sort command as an error

If I check the already sorted I am able to activated without any error but in the form output the material is not sorted.

As you mentioned If I try to create the table line in the event for material and there are about 5 table lines created and how/what fields should I map there.

Thanks for suggestion and please suggest what field should I map in the field.

Please let me know.

Thanks,

Edited by: mark_yellow mark on Jul 3, 2008 5:56 PM

Former Member
0 Kudos

Krishna,

Is it some thing you can help with.

any help would be highly appreciated.

Thanks,