08-13-2007 5:04 AM
i want to display the data of a structure resbd.
i know it does not have data.
but it contains data at runtime
plz help
thanx
08-13-2007 5:28 AM
08-13-2007 5:32 AM
Hi,
In case you have data in Resbd at run time, you can directly write the various fields of resbd on the report
write:/ resbd-field1, resbd-field2, resbd-field 3.
Regards,
Suruchi
08-13-2007 5:43 AM
but surichi
how can i find the one particular record for a particular aufnr
08-13-2007 5:46 AM
Hi,
in your select query you can put that aufnr in the where clause.
Thanks,
Gunjan
08-13-2007 5:51 AM
08-13-2007 5:44 AM
Hello,
try this i hope it solves your problem.
Types: begin of ty_tab.
include structure resbd.
types: end of ty_tab.
data: it_tab type standard table of ty_tab.
data: wa_tab like line of it_tab.
loop at it_tab into wa_tab.
write:/ wa_tab-rsnum, wa_tab-rspos.
endloop.
Reward points for useful answer.
Thanks,
Gunjan
08-13-2007 5:48 AM
Hi,
For displaying the data of a structure you can use the write statement.
WRITE : structurename - fieldname.
eg : write : resbd-rsnum.
Before that you need to declare the structure name inside the report.
Please refer the following code for your querry
REPORT ZSTRUCTDATA .
Table Declaration
--------------------
tables : resbd.
Assigning Values to Structure Fields
------------------------------------
resbd-rsnum = 1234.
resbd-rspos = 12.
Displaying Values
--------------------
write : / resbd-rsnum.
write : / resbd-rspos.
This report will give the output like this.
0000001234
0012
Regards,
LIJO JOHN.
08-13-2007 6:05 AM
Hello,
Hope that this code will help you
REPORT ZSTRUCTDATA .
Table Declaration
--------------------
tables : resbd.
data : gt_resbd type table of resbd.
Assigning Values to Structure Fields
------------------------------------
resbd-rsnum = 1234.
resbd-rspos = 12.
resbd-aufnr = 'A'.
append resbd to gt_resbd.
resbd-rsnum = 9999.
resbd-rspos = 99.
resbd-aufnr = 'B'.
append resbd to gt_resbd.
Displaying Values
--------------------
loop at gt_resbd into resbd where aufnr = 'B'.
write : / resbd-aufnr.
write : / resbd-rsnum.
write : / resbd-rspos.
endloop.
Regards,
LIJO JOHN
08-13-2007 6:11 AM
Hi
define a internal table of same structure
then read the data from that structure
it will get the data at runtime
no problem
reward if usefull