Application Development 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: 

Convert multiple Rows in a Single row with different columns in ALV Report

hossain_rajib55
Participant
0 Kudos
425

Hello Experts!!!

Looking for a guideline. As per my development i need to convert internal table multiples rows in a single row and values in different columns based on lifnr (Supplier) , gjahr (Fiscal Year), Poper (Period) for ALV report.

Please guided me.

Internal Table:

hossain_rajib55_0-1730872396143.png

Need as like below:

hossain_rajib55_1-1730872474147.png

Regards-

Rajib

 

8 REPLIES 8

Sandra_Rossi
Active Contributor
378

I don't know what your exact question is, but maybe you are looking for ASSIGN COMPONENT (classic question in the forum). Even ASSIGN without COMPONENT could be used.

DATA(field_name) = 'PERIOD' && POPER.

ASSIGN COMPONENT field_name OF STRUCTURE alv_line TO FIELD-SYMBOL(<period_quantity>).

<period_quantity> = <period_quantity> + HSL_CRDT.

 

0 Kudos
325

@Sandra_Rossi  in my internal table i have multiple vendor and those vendor has HSL value based on period. so need to show them in a single line vendor wise as well as need to show in which period its amount is present.

0 Kudos
320

So, my answer is fine, right?

raymond_giuseppi
Active Contributor
0 Kudos
366

Is the results table structure static or dynamic?

  • Use Runtime Type Services (RTTS) to create a dynamic table.
  • Then use assign to copy the data

0 Kudos
356

@raymond_giuseppi  Yes this one is dynamic structure.

302

If you can select multiple years, yes dynamic, but if only one year you can define a static version with 12 or 16 amounts columns (1-12, or more depending on Financial calendar 1-16?)

In first case

Else

hossain_rajib55
Participant
0 Kudos
255

@raymond_giuseppi  & @Sandra_Rossi  Thanks for your guideline.

Based on lifnr and period i need to combined in a row. I did the table structure and now need to move data.Now in which step should i follow.

hossain_rajib55_0-1730954919059.png

 

hossain_rajib55
Participant
232

Thanks to @Sandra_Rossi  and @raymond_giuseppi  for your valuable time. I solved it as per guideline.

Regards-

Rajib