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

smartform table data group those with same document number

Former Member
0 Likes
1,281

Hi Experts,

I want to group records based on Docno & Doc.type.

For example Consider 4300000024, it's displaying 4 times. I want to display 4300000024 and WE once (like a subheading) and the remaining column values as displayed itself.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,068

Hi Kali,

I solved it myself.

I have slno as first column. So i write the following code inside the cell for doc no.

READ TABLE it_out INTO wa_temp WITH KEY slno = wa_out-slno - 1 belnr = wa_out-belnr.
IF wa_out-belnr = wa_temp-belnr.
CLEAR: wa_out-belnr, wa_out-blart, wa_temp.
ENDIF.

3 REPLIES 3
Read only

former_member196331
Active Contributor
0 Likes
1,068

You want to need exactly like this.

43000000024

43000000024 We 89 001040009 Inventory-steel 1004 405.00

43000000024 We 89 001040001 GR/IR Clear a 1004 -450.00

If Yes Possible, In driver program it self, we can do.

In final table sort Doc no, add 43000000024 1 extra row, make all the columns empty except doc no.
Sort it by doc no.

completed.

Read only

Former Member
0 Likes
1,068

Hi,

I cant do it in the driver program. there i am looping a header table with document number so i need those values inside the smartform.

I want o/p to be like,

43000000024 We 89 001040009 Inventory-steel 1004 405.00

96 001040001 GR/IR Clear a 1004 -450.00

89 001040009 Inventory-steel 1004 405.00

96 001040001 GR/IR Clear a 1004 -450.00

Read only

Former Member
0 Likes
1,069

Hi Kali,

I solved it myself.

I have slno as first column. So i write the following code inside the cell for doc no.

READ TABLE it_out INTO wa_temp WITH KEY slno = wa_out-slno - 1 belnr = wa_out-belnr.
IF wa_out-belnr = wa_temp-belnr.
CLEAR: wa_out-belnr, wa_out-blart, wa_temp.
ENDIF.