2020 Nov 01 9:33 AM
Hi I the file records are read into string table .
loop at stringtable into <fs_wa>.
Here when sytabix is '10'
the record in field symbol is like below
Publish Date,22-jul-2020,24-jul-2020,21-jul-2020,22-jul-2020,22-jul-2020...etc(dynamic)
Here when sytabix is '12'
he record in field symbol is like below
places,USA,CAN,MAL,IND,SRIL,UKR,BRT...etc(dynamic)
endloop
i want to move these 2 rows to columns of an internal table like below
any suggestions
Kind Regards
2020 Nov 01 10:14 AM
Hi,
Try below with below code...
DATA: BEGIN OF it_table OCCURS 0,
string1(15),
string2(15),
string3(15),
END OF it_table.
data: date1 type table of string with header line.
data: country type table of string with header line.
DATA string11(100) VALUE '*********,****,****'. "* Represents
DATA string12(100) VALUE '*********,****,****'. "* Represents
SPLIT string11 AT ',' INTO TABLE date1 .
SPLIT string12 AT ',' INTO TABLE country .
loop date1,
Read country with tab index..
assign fields and append it_table.
endloop.
Hi I the file records are read into string table .
loop at stringtable into <fs_wa>.
Here when sytabix is '10'
the record in field symbol is like below
Publish Date,22-jul-2020,24-jul-2020,21-jul-2020,22-jul-2020,22-jul-2020...etc(dynamic)
Here when sytabix is '12'
he record in field symbol is like below
places,USA,CAN,MAL,IND,SRIL,UKR,BRT...etc(dynamic)
endloop
i want to move these 2 rows to columns of an internal table like below
any suggestions
Kind Regards
2020 Nov 01 10:14 AM
Hi,
Try below with below code...
DATA: BEGIN OF it_table OCCURS 0,
string1(15),
string2(15),
string3(15),
END OF it_table.
data: date1 type table of string with header line.
data: country type table of string with header line.
DATA string11(100) VALUE '*********,****,****'. "* Represents
DATA string12(100) VALUE '*********,****,****'. "* Represents
SPLIT string11 AT ',' INTO TABLE date1 .
SPLIT string12 AT ',' INTO TABLE country .
loop date1,
Read country with tab index..
assign fields and append it_table.
endloop.
2020 Nov 01 11:14 AM
OCCURS 0and
WITH HEADER LINEReally? SAP made them both obsolete 15 years ago for a very good reason.
2020 Nov 01 2:23 PM
2020 Nov 01 11:10 AM
Your question will be more attractive if you embed the image, not the hyperlink:

2020 Nov 01 11:16 AM
As suggested by abishankar, did you use SPLIT to get the values between commas? (into an internal table, each line is one of these values)
SPLIT <fs_wa> AT ',' INTO TABLE @DATA(segments).
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |