‎2006 Dec 04 5:44 AM
can any one send me the subroutine program ie passing internal table Using the key words using and changing.
‎2006 Dec 04 5:54 AM
Check sample programs: demo_mod_tech_example_1
demo_mod_tech_example_2
demo_mod_tech_example_3
demo_mod_tech_example_4
demo_mod_tech_example_5
demo_mod_tech_example_6
‎2006 Dec 04 5:51 AM
To pass internal table, we need to use TABLES statement. If we need to pass WORK AREA we can use USING AND CHANGING.
Below example can give you some idea:
PERFORM save_text_tn TABLES it_tline
USING thead 'X'
CHANGING sy-subrc.
FORM save_text_tn TABLES p_tline STRUCTURE tline
USING p_thead STRUCTURE thead
p_flag TYPE c
CHANGING p_subrc LIKE sy-subrc.
ENDFORM
‎2006 Dec 04 5:54 AM
Hi,
please fing the sample subroutine which reads the TVARVC entries in to ranges.
data: r_kunnr for mseg-kunnr.
perform u1000_get_tvarvc tables r_kunnr
using 'XYZ.
*subroutine
*______________
form u1000_get_tvarvc tables range_table
using variable.
data: u1000_layout type ref to data.
field-symbols: <fs_table> type any,
<fs_comp> type any.
select low as low high as high opti
as option sign as sign from tvarvc
into corresponding fields of table range_table
where name = variable.
if sy-subrc eq 0.
*Check that the data is consistent for a RANGE table
create data u1000_layout like range_table.
assign u1000_layout->* to <fs_table>.
loop at range_table assigning <fs_table>.
do.
assign component sy-index of structure <fs_table> to <fs_comp>.
if sy-subrc ne 0.
exit.
else.
case sy-index.
when 1.
if <fs_comp> is initial.
move 'I' to <fs_comp>.
endif.
when 2.
if <fs_comp> is initial.
move 'EQ' to <fs_comp>.
endif.
endcase.
endif.
enddo.
endloop.
endif.
endform."u1000_get_tvarv
‎2006 Dec 04 5:54 AM
Check sample programs: demo_mod_tech_example_1
demo_mod_tech_example_2
demo_mod_tech_example_3
demo_mod_tech_example_4
demo_mod_tech_example_5
demo_mod_tech_example_6