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

index value

Former Member
0 Likes
433

Hi all,

Please help me to solve this problem.I am using this code in my report i want to add as_output fields to the end of gs_output.Please tell me what value i have to use as the index in the below code.

data: gt_output type table of zztr_loan_property_guarantees,

af_output type table of zztr_loan_property_guarantees,

as_output type zztr_loan_property_guarantees,

gs_output type zztr_loan_property_guarantees.

*-Select Property Guarantees

select *

from ztgtee

into corresponding fields of table gt_output

where bukrs in s_bukrs

and ranl in s_ranl

and zpgtee in s_zpgtee

and zpgtee_legacy in s_legacy

and zpgtee_type in s_type

and zdate in s_zdate

and zpgtee_ie in s_ie.

*-Select Property Guarantees for Annex/Frontier Refno

loop at i_vdarl.

select *

from ztgtee

into corresponding fields of table af_output

where bukrs in s_bukrs

and ranl eq i_vdarl-refer

and zpgtee in s_zpgtee

and zpgtee_legacy in s_legacy

and zpgtee_type in s_type

and zdate in s_zdate

and zpgtee_ie in s_ie.

loop at af_output into as_output.

modify gt_output from as_output index .

endloop.

endloop.

WHERE zztr_loan_property_guarantees is the alv structure for the program.

Thanx in Advance.

Regards,

Mamatha

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
409

Hi Giri,

U don't need to use the index for that.

Use the select statement as

SELECT f1, f2,f3, ...from Table1 APPENDING CORRESPONDING FIELDS OF Table.

It will work...

Regards,

Jayaram...

2 REPLIES 2
Read only

Former Member
0 Likes
409

*-Select Property Guarantees for Annex/Frontier Refno

loop at i_vdarl.

select *

from ztgtee

into corresponding fields of table af_output

where bukrs in s_bukrs

and ranl eq i_vdarl-refer

and zpgtee in s_zpgtee

and zpgtee_legacy in s_legacy

and zpgtee_type in s_type

and zdate in s_zdate

and zpgtee_ie in s_ie.

loop at af_output into as_output.

modify gt_output from as_output index .

endloop.

endloop.

U need to use modify gt_output from as_output index sy-index....as ur within a loop of af_output the sy-index will be set to this loop and immediately ur modifying the interna tbale...

Read only

Former Member
0 Likes
410

Hi Giri,

U don't need to use the index for that.

Use the select statement as

SELECT f1, f2,f3, ...from Table1 APPENDING CORRESPONDING FIELDS OF Table.

It will work...

Regards,

Jayaram...