‎2009 Apr 21 9:32 AM
Hi All below is the sample code where it is not fetching the data into itab. Please check where i am doing wrong...
REPORT YP_TEST1.
tables: pernr , pa0001.
select-options:pernr1 for pa0001-pernr.
data: begin of itab occurs 1.
include structure pa0001.
data:end of itab.
start-of-selection.
select * from pa0001 into table itab where pernr in pernr1
when i am inputting pernr into the selection-screen it is not getting the itab to be populated please let me knwo where i am doing wrong....
Regards
sas
‎2009 Apr 21 9:45 AM
YOu code is !00% correct.. iam getting values for ur code.. please check once weather u contain the data in ur table.
regards
sivaram
‎2009 Apr 21 9:35 AM
Hello,
Code looks OK to me. May be that data doesnot exist in the table PA0001.
BR,
Suhas
‎2009 Apr 21 9:36 AM
could you please copy the code into your system and check please....it is ok definetl y..data is also there i dont know where i am doing wrong!
Regards
sas
‎2009 Apr 21 9:37 AM
Hi,
I copied your code in my system . And it is working fine.
‎2009 Apr 21 9:42 AM
Hello Dude,
Works very well for me. Did you check in debug mode the data?
Since ITAB is an internal table with "header line", you need to check as ITAB[] else you will end up viewong the "header line" only.
BR,
Suhas
‎2009 Apr 21 9:38 AM
‎2009 Apr 21 9:39 AM
I'm getting the values with your code,, pl. check the data
tables: pernr , pa0001.
data: begin of itab occurs 1.
include structure pa0001.
data:end of itab.
select-options:pernr1 for pa0001-pernr.
start-of-selection.
select * from pa0001 into table itab where pernr in pernr1.
loop at itab.
write:/ itab-pernr.
endloop.
‎2009 Apr 21 9:40 AM
‎2009 Apr 21 9:41 AM
‎2009 Apr 21 9:43 AM
Sas,
Are you sure that the data exists in the system ?
Try to remove pernr in the declaration part of tables.
And activate the code once and try running it.
‎2009 Apr 21 9:45 AM
YOu code is !00% correct.. iam getting values for ur code.. please check once weather u contain the data in ur table.
regards
sivaram
‎2009 Apr 21 10:03 AM
i am so sorry i got confused in different way..
i am just checking in the debug mode it is showing all zeros in header it made confuse.....at the end it is having data....
generally it need to handle the last record in header why is it showing as all zeros in header?any idea?
Regards
sas
‎2009 Apr 21 3:11 PM
>
> generally it need to handle the last record in header why is it showing as all zeros in header?any idea?
it is only true after a LOOP or after a SELECT ... APPEND itab ... ENDSELECT, but not after a SELECT ... INTO TABLE
‎2009 Apr 21 6:52 PM