09-28-2006 8:04 PM
Hello All,
I never used field symbols before and I think this is where I should use field symbols in my program.
I have a selection parameter period (p_period) and based on the p_period value(XX), I need to display the HSLXX, KSLXX from table GLT0 using field symbols. Can anyboby help me?
Thanks,
Chandni Reddy
09-28-2006 8:10 PM
Right, you can use field-symbols, here is a example.
report zrich_0002.
data: xGLT0 type GLT0 .
data: field_name(20) type c.
field-symbols: <fs> .
parameters: p_per(2) type n.
* Read a line from table
select Single * from glt0 into xglt0.
* Build the field name that you want to access
concatenate 'XGLT0-HSL' p_per into field_name.
* Assign it
assign (field_name) to <fs>.
* Write it
write:/ <fs>.
Regards,
Rich Heilman
09-28-2006 8:10 PM
Right, you can use field-symbols, here is a example.
report zrich_0002.
data: xGLT0 type GLT0 .
data: field_name(20) type c.
field-symbols: <fs> .
parameters: p_per(2) type n.
* Read a line from table
select Single * from glt0 into xglt0.
* Build the field name that you want to access
concatenate 'XGLT0-HSL' p_per into field_name.
* Assign it
assign (field_name) to <fs>.
* Write it
write:/ <fs>.
Regards,
Rich Heilman
09-28-2006 8:12 PM
Hi,
data: var type string.
field-symbols: <fs>.
CONCATENATE 'GLT0-HSL' p_period into var.
ASSIGN (VAR) to <FS>.
WRITE: / <FS>.
Thanks,
Naren