View previous topic :: View next topic
|
Author |
Message |
mvmadhavi
New User
Joined: 09 Nov 2006 Posts: 21
|
|
|
|
I have a table..with ten elements in it. i need to string all of them and
put it in a record
i am trying but no much progress
can any body helpa |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
Can you show us what have you tried so far?
O. |
|
Back to top |
|
|
mvmadhavi
New User
Joined: 09 Nov 2006 Posts: 21
|
|
|
|
PERFORM VARYING X1 FROM 1 BY 1 UNTIL X1 > W-COUNT
STRING W-XML-REC
',AKSJON=' W-TJKD-READ (X1)
';'
DELIMITED BY SIZE
INTO W-XML-REC
END-STRING
end-perform |
|
Back to top |
|
|
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 2358 Location: Israel
|
|
|
|
...and the problem is....?
O. |
|
Back to top |
|
|
mvmadhavi
New User
Joined: 09 Nov 2006 Posts: 21
|
|
|
|
The problem is i am not able get all 10 elements in table in the record.
only the last one is written.
each time in the loop the previous is overwritten |
|
Back to top |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
Hi mvmadhavi !
I think you have to use String-Command with the Pointer-Option for stringing them one after the other into a line.
Regards, UmeySan
Example:
Move 01 to Li-Pos ...output position
Set Fi-Ind to 1 ....input index
Loop-Start
STRING Field-01(Fi-Ind) DELIMITED BY SIZE
INTO WRK-TEXT-LINE(Li-Ind)
WITH POINTER Li-Pos
END-STRING
COMPUTE Li-Pos = (Li-Pos+ 1) END-COMPUTE
Set Fi-ind up by 1
Loop-Stopp |
|
Back to top |
|
|
mvmadhavi
New User
Joined: 09 Nov 2006 Posts: 21
|
|
|
|
Thanks! it works : |
|
Back to top |
|
|
mmwife
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
If I'm reading you correctly, the easy way is to move the 01 level (or the level directly above the level w/the 1st occurs clause), assocaited w/the table, to your O/P field. |
|
Back to top |
|
|
the_gautam
Active User
Joined: 05 Jun 2005 Posts: 165 Location: Bangalore
|
|
|
|
as far as i understand your situation, i don't think there is any need of stringing the dataitems of the table into some other dataitem. you can directly use the table defining item which is having the OCCURS clause for the table to get the data of all the dataitems together. |
|
Back to top |
|
|
|