2008 Jul 09 10:17 AM
Dear all,
I want to know how to code a write statement with dynamic positioning like below:
Data: V_POS type i.
V_POS = 10.
Write:/V_POS 'Testing'.I'm getting syntax error for the above. Please comment.
2008 Jul 09 10:20 AM
REPORT ZTESTTT.
Data: V_POS type i.
V_POS = 10.
Write: at V_POS 'Testing'.
Dear all,
I want to know how to code a write statement with dynamic positioning like below:
Data: V_POS type i.
V_POS = 10.
Write:/V_POS 'Testing'.I'm getting syntax error for the above. Please comment.
2008 Jul 09 10:19 AM
Hi,
It should work fine.
Nothing wrong in this.
you can write like this.
Try one more time and check.
Regards,
Rajitha.
2008 Jul 09 10:20 AM
REPORT ZTESTTT.
Data: V_POS type i.
V_POS = 10.
Write: at V_POS 'Testing'.
2008 Jul 09 10:22 AM
2008 Jul 09 10:23 AM
try this
Data: V_POS type i.
V_POS = 10.
Write at v_pos 'Testing'.
2008 Jul 09 10:24 AM
hiii
you can use PATTERN for write statement there you will get pattern for AT POS also or use like below
Data: wa_pos type i.
wa_pos = 2.
Write: at wa_pos 'program'.
regards
twinkal
2008 Jul 09 10:25 AM
Hi,
Data: V_POS type i.
V_POS = 10.
Write:/ v_POS. " give space after the "/"
Now it works fine
Thanks & Regards.
Y.R.Prem Kumar
2008 Jul 09 10:26 AM
The following is the information from SAP Help.
You can position the output of a WRITE statement on the list by making a format specification before the field name as follows:
Syntax
WRITE AT [/][<pos>][(<len>)] <f>.
where
the slash '/' denotes a new line,
<pos> is a number or variable up to three digits long denoting the position on the screen,
<len> is a number or variable up to three digits long denoting the output length.
If the format specification contains only direct values (that is, no variables), you can omit the keyword AT.
WRITE 'First line.'.
WRITE 'Still first line.'
WRITE / 'Second line.'
WRITE /13 'Third line.'
For more info, see link:
[http://help.sap.com/saphelp_nw04/helpdata/en/9f/db9e3035c111d1829f0000e829fbfe/content.htm]
Regards,
Lakshmi.
2008 Jul 09 10:28 AM
Hi,
I think there should a space between : and / that could be oneof the problem....
Data: V_POS type i.
V_POS = 10.
Write: /V_POS 'Testing'.
2008 Jul 09 10:33 AM
Hi efc,
i guess the best way for this is as many other has also told...
Data:
v_pos type i.
v_pos = 10.
write at v_pos 'testing'.regards.
pritam
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |