2008 Jun 19 8:03 AM
Hi all,
My requiremet is change normal report dispalay to ALV grid display.In this normal report display data if conditions their,This conditions how to put internal table display data.
Eample:
loop.
write:/ mara-matnr,
marc-werks,
IF NOT CLASS IS INITIAL.
WRITE:/ KLAH-CLASS.
ENDIF.
write:/ mard-lgort.
endloop.
Above write data how to copy the internal tabe(with condition).
Thanks&Regards,
subbareddy.
Hi all,
My requiremet is change normal report dispalay to ALV grid display.In this normal report display data if conditions their,This conditions how to put internal table display data.
Eample:
loop.
write:/ mara-matnr,
marc-werks,
IF NOT CLASS IS INITIAL.
WRITE:/ KLAH-CLASS.
ENDIF.
write:/ mard-lgort.
endloop.
Above write data how to copy the internal tabe(with condition).
Thanks&Regards,
subbareddy.
2008 Jun 19 8:22 AM
Hi,
loop.
itab1-matnr = mara-matnr,
itab1-werks = marc-werks,
IF NOT CLASS IS INITIAL.
itab1-class = KLAH-CLASS.
ENDIF.
itab1-lgort = mard-lgort.
endloop.
Now use this internal table in ALV.
Regars,
SUbramanian
2008 Jun 19 8:37 AM
HI subramaian,
Thanks,
Your ans ok,one question this internal table how to print data with conditions.
Thanks
Sreddy.
2008 Jun 19 8:24 AM
Hi,
Take the filtered data(wanted records) to the separate internal table and at last use the ALV to display the data with this final internal table.
2008 Jun 19 8:35 AM
Just like this:
data: ls_sel_mara type mara.
data: ls_variant type disvariant.
data: lt_mara type table of mara.
select-options: s_matnr for ls_sel_mara-matnr.
select * from mara into table lt_mara where matnr in s_matnr.
ls_variant-REPORT = sy-repid.
ls_variant-handle = 1.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_BYPASSING_BUFFER = 'X'
I_STRUCTURE_NAME = 'MARA'
I_SAVE = 'A'
IS_VARIANT = ls_variant
TABLES
T_OUTTAB = lt_mara
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |