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

Re:ALV

Former Member
0 Likes
482

*

************************************************************************

TYPES: BEGIN OF output,

ZDATEIN type Zemp-zdatein,

ZTIMEIN type Zemp-ztimein

amt type i,

END OF output.

TYPES: output1 TYPE STANDARD TABLE OF output.

DATA: i_output1 TYPE output1,

i_output2 TYPE output1 WITH HEADER LINE.

PERFORM get_data.

FORM get_data .

select ZDATIN ZTIMIN into

table output2

from Zemp.

loop at output2.

output2-amt = 123.

modify output2 from output2 transporting amt

endloop.

output1[] = output2[].

eNDFORM. " get_data

i should get output1-amt=123 in the ALV DISPLAY UNDER AMT COL ,can any one help me

*

************************************************************************

TYPES: BEGIN OF output,

ZDATEIN type Zemp-zdatein,

ZTIMEIN type Zemp-ztimein

amt type i,

END OF output.

TYPES: output1 TYPE STANDARD TABLE OF output.

DATA: i_output1 TYPE output1,

i_output2 TYPE output1 WITH HEADER LINE.

PERFORM get_data.

FORM get_data .

select ZDATIN ZTIMIN into

table output2

from Zemp.

loop at output2.

output2-amt = 123.

modify output2 from output2 transporting amt

endloop.

output1[] = output2[].

eNDFORM. " get_data

i should get output1-amt=123 in the ALV DISPLAY UNDER AMT COL ,can any one help me

2 REPLIES 2
Read only

Former Member
0 Likes
443

did u check the data after the modify command? Place a breakpoint at MODIFY command and check what is the sy-subrc value. Check the data in the internal table before displaying in the ALV.

Cheers

VJ

Read only

Former Member
0 Likes
443

Use sy-tabix in your modify statement

loop at output2.

output2-amt = 123.

modify output2 index sy-tabix.

endloop.