Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Sort /Group by in SmartForms

Former Member
0 Likes
913

Hi ABAPers,

Im having a hard time using a smartforms...actually my problem is that i need to sort /group my data by hkont and Currency..which is supposed to be a General Ledger Account and Currency.

Here is a sample data in my internal table :

<b><b>Burks Hkont Currency Ebeln </b> Waers</b>

MMC 1130001 USD 1400000673 1000

USD 1400000674 200

USD 1400000675 150

4110001 EUR 1400000676 100

EUR 1400000677 100

the output report must be like this:

<b>GL ACCT : 10000123

COMPANY DOCUMENT # CURRENCY AMOUNT</b>

MMC 1400000673 USD 1000

1400000674 USD 200

1400000675 USD 150

<b>GL ACCT : 452644

COMPANY DOCUMENT # CURRENCY AMOUNT</b>

</b> 4110001 EUR 1400000676 100

EUR 1400000677 100

Please give me some advice

Thanks in advance

aVaDuDz

Hi ABAPers,

Im having a hard time using a smartforms...actually my problem is that i need to sort /group my data by hkont and Currency..which is supposed to be a General Ledger Account and Currency.

Here is a sample data in my internal table :

<b><b>Burks Hkont Currency Ebeln </b> Waers</b>

MMC 1130001 USD 1400000673 1000

USD 1400000674 200

USD 1400000675 150

4110001 EUR 1400000676 100

EUR 1400000677 100

the output report must be like this:

<b>GL ACCT : 10000123

COMPANY DOCUMENT # CURRENCY AMOUNT</b>

MMC 1400000673 USD 1000

1400000674 USD 200

1400000675 USD 150

<b>GL ACCT : 452644

COMPANY DOCUMENT # CURRENCY AMOUNT</b>

</b> 4110001 EUR 1400000676 100

EUR 1400000677 100

Please give me some advice

Thanks in advance

aVaDuDz

3 REPLIES 3
Read only

Former Member
0 Likes
694

Hi

Move your data into another internal table with structure as

Hkont

Currency

Bukrs

Ebeln

Waers

Sort on Hkont and Currency.

Use this new internal table for displaying your data.

Regards

Raj

Read only

Former Member
0 Likes
694

Hi,

Tables option there is a sort option you pass the field then it will sort itab accordingly,otherwise before passing to tables in SF, sort it in global definitions or before that

Regards

Shiva

Read only

0 Likes
694

> Hi,

>

> Tables option there is a sort option you pass the

> field then it will sort itab accordingly,otherwise

> before passing to tables in SF, sort it in global

> definitions or before that

>

> Regards

> Shiva

Hi Shiva,

I tried the table option Sort Criteria...but every time a create a Fieldname like HKONT it prompts in an eror " You may only read from Table IT_OR-stadata.

Please help me what to do..

my internal table is :

IT_OR-Stadata into WA_OR

Thanks

aVaDuDz