12-21-2007 12:16 PM
12-21-2007 12:19 PM
just like u declare in other places..
data: begin of itab,
..........
.........
end of itab
12-21-2007 12:21 PM
You could only declare TABLES statement once in a program for a particular db table. You should declare in the TOP include.
If you want to you use a select statement in a subroutine and you dont want that this information is global you coud use this:
form.....
data: lw type vbak.
select single *
from vbak
into lw
where
.....
endform
Edited by: alejo arrighi on Dec 21, 2007 1:22 PM
12-21-2007 12:26 PM
Dear Krishna,
Syntax goes like this,
PERFORM subroutine_name TABLES itab1 USING field1 changing field2.
In this the TABLES should always preceed the USING and CHANGING addition.
then in the definition of subroutine, the code goes like this :
FORM subroutine_name TABLES itab1 structure <Structure same as that of itab> USINg field1 CHANGING field2.
Best Regards,
Rajesh.
Please reward points if found helpful.
12-21-2007 12:27 PM
Dear Krishna,
Syntax goes like this,
PERFORM subroutine_name TABLES itab1 USING field1 changing field2.
In this the TABLES should always preceed the USING and CHANGING addition.
then in the definition of subroutine, the code goes like this :
FORM subroutine_name TABLES itab1 structure <Structure same as that of itab> USINg field1 CHANGING field2.
Best Regards,
Rajesh.
Please reward points if found helpful.
12-21-2007 12:36 PM
hi
good
go through this link,this would help you to solve your problem.
http://help.sap.com/saphelp_nw70/helpdata/en/9f/db982c35c111d1829f0000e829fbfe/content.htm
thanks
mrutyun^
12-21-2007 1:03 PM
Hi,
REport ztemp.
data : tb_konv LIKE konv OCCURS 0 WITH HEADER LINE.
select * from konv
into table tb_konv
up to 100 rows.
perform test tables tb_konv .
.
.
.
form test tables p_tb_konv structure konv.
data : wa_konv type konv .
read table p_tb_konv in to wa_konv with key kschl = 'ZOCD'.
if sy-subrc = 0 .
write p_tb_konv-kschl.
endif.
endform.
++++++++++++++++++++++++
We pass tables to subroutine with the concept TABLES ,STRUCTURE keywords to form definition.
Regds
Sivaparvathi
Please reward points if helpful...