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: 

ALV

Former Member
0 Kudos

Hi Expert,

I have my final data in itab_final table. I have GL ACCOUNT, COMPANY CODE,

COST ELEMENT.

Now the requirement is if anything changes among these three then it should be displayed in different block.

i.e. if GL ACCOUNT change then the record which are same should be displayed in output.If company code change then it should be displayed in same page in different block.

Pls help me ASAP

Thanks,

Sandeep Garg

6 REPLIES 6

Former Member
0 Kudos

Hi

Welcome to SDN forum.

Go through the following links and do accordingly

Simple ALV report

http://www.sapgenie.com/abap/controls/alvgrid.htm

http://wiki.ittoolbox.com/index.php/Code:Ultimate_ALV_table_toolbox

ALV

1. Please give me general info on ALV.

http://www.sapfans.com/forums/viewtopic.php?t=58286

http://www.sapfans.com/forums/viewtopic.php?t=76490

http://www.sapfans.com/forums/viewtopic.php?t=20591

http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.

2. How do I program double click in ALV?

http://www.sapfans.com/forums/viewtopic.php?t=11601

http://www.sapfans.com/forums/viewtopic.php?t=23010

3. How do I add subtotals (I have problem to add them)...

http://www.sapfans.com/forums/viewtopic.php?t=20386

http://www.sapfans.com/forums/viewtopic.php?t=85191

http://www.sapfans.com/forums/viewtopic.php?t=88401

http://www.sapfans.com/forums/viewtopic.php?t=17335

4. How to add list heading like top-of-page in ABAP lists?

http://www.sapfans.com/forums/viewtopic.php?t=58775

http://www.sapfans.com/forums/viewtopic.php?t=60550

http://www.sapfans.com/forums/viewtopic.php?t=16629

5. How to print page number / total number of pages X/XX in ALV?

http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)

6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.

http://www.sapfans.com/forums/viewtopic.php?t=64320

http://www.sapfans.com/forums/viewtopic.php?t=44477

7. How can I set the cell color in ALV?

http://www.sapfans.com/forums/viewtopic.php?t=52107

8. How do I print a logo/graphics in ALV?

http://www.sapfans.com/forums/viewtopic.php?t=81149

http://www.sapfans.com/forums/viewtopic.php?t=35498

http://www.sapfans.com/forums/viewtopic.php?t=5013

9. How do I create and use input-enabled fields in ALV?

http://www.sapfans.com/forums/viewtopic.php?t=84933

http://www.sapfans.com/forums/viewtopic.php?t=69878

10. How can I use ALV for reports that are going to be run in background?

http://www.sapfans.com/forums/viewtopic.php?t=83243

http://www.sapfans.com/forums/viewtopic.php?t=19224

11. How can I display an icon in ALV? (Common requirement is traffic light icon).

http://www.sapfans.com/forums/viewtopic.php?t=79424

http://www.sapfans.com/forums/viewtopic.php?t=24512

12. How can I display a checkbox in ALV?

http://www.sapfans.com/forums/viewtopic.php?t=88376

http://www.sapfans.com/forums/viewtopic.php?t=40968

http://www.sapfans.com/forums/viewtopic.php?t=6919

Go thru these programs they may help u to try on some hands on

ALV Demo program

BCALV_DEMO_HTML

BCALV_FULLSCREEN_DEMO ALV Demo: Fullscreen Mode

BCALV_FULLSCREEN_DEMO_CLASSIC ALV demo: Fullscreen mode

BCALV_GRID_DEMO Simple ALV Control Call Demo Program

BCALV_TREE_DEMO Demo for ALV tree control

BCALV_TREE_SIMPLE_DEMO

BC_ALV_DEMO_HTML_D0100

Regards

Anji

former_member183924
Active Participant
0 Kudos

Hi Sandeep,

I don't really understand your question. What makes the values to be changed? Maybe you have to develope it first if a value is changed, then you can refresh your ALV Grid?!

Look at here:

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e8a1d690-0201-0010-b7ad-d9719a41...

It is the SDN reference for the ALV object.

Regards, Steffen

0 Kudos

Hi,

My requirement is this :- I have all data in one final internal table.

Then i want to display the data in block display whenever the field changes.

All the display should be in one page.

Thanks.

0 Kudos

Hi Sandeep,

the itab is filled just once if you call your ALV Grid. But I have no idea how to trigger any events if a value has changed. Because a value change happens i a transparent table. So you have to rebuild constantly your itab to trigger if a value has changed?!

Regards,

Steffen

Former Member
0 Kudos

Hi Sandeep,

For your requirement your are supposed to create a sort table and pass that table to your alv calling function.

data: IT_U_SORT TYPE SLIS_T_SORTINFO_ALV,

WA_SORT TYPE SLIS_SORTINFO_ALV.

clear wa_sort.

wa_sort-spos = 1.

wa_sort-fieldname = 'GL ACCOUNT-FIELDNAME'.

wa_sort-up = 'X'. "THIS PARAMETER WILL SORT YOUR FIELD VALUES

wa_sort-group = '*'. "THIS PARAMETER WILL TRIGGER THE NEW VALUE AS A BLOCK

append wa_sort to it_u_sort.

wa_sort-spos = 2.

wa_sort-fieldname = 'COMPANY CODE-FIELDNAME'.

wa_sort-up = 'X'.

wa_sort-group = '*'.

append wa_sort to it_u_sort.

wa_sort-spos = 3.

wa_sort-fieldname = 'COST ELEMENT-FIELDNAME'.

wa_sort-up = 'X'.

wa_sort-group = '*'.

append wa_sort to it_u_sort.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_background_id = 'ALV_BACKGROUND'

i_callback_program = g_repid

is_layout = gs_layout

it_fieldcat = gt_fieldcat[] "FOR FIELDS<b>

it_sort = it_u_sort[]</b>

i_save = g_save

is_variant = g_variant

it_events = gt_events[]

TABLES

t_outtab = i_prd.

Thanks & Regards

Varalakshmi.K

Former Member
0 Kudos

Hi sandeep garg !

Walk through this link http://www.alvrobot.com.ar/SRG_1.php. They are 7 steps to easily finish ALV report.

Reward points if useful.

Thank you.