Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Regarding spliting of the data in the internal table fields

TYPES :BEGIN OF X_flat_file,

banks LIKE lfbk-banks,

bankl LIKE lfbk-bankl,

bankn LIKE lfbk-bankn,

koinh LIKE lfbk-koinh,

bkont LIKE lfbk-bkont,

END OF X_flat_file.

DATA: t_itab TYPE STANDARD TABLE OF X_flat_file INITIAL SIZE 0,

wa_itab TYPE X_flat_file,

Now data in internal table is as follows:

t_itab-banks is AD,DE, AB

t_itab-bankl is 123456578,123456588,123456579

t_itab-bankn is 12345666,12345677,12345688

t_itab-koinh is vinod1,vinod2,vinod3

t_itab-bkont is 01,01,01

TYPES :BEGIN OF X_banks1,

banks LIKE lfbk-banks,

bankl LIKE lfbk-bankl,

bankn LIKE lfbk-bankn,

koinh LIKE lfbk-koinh,

bkont LIKE lfbk-bkont,

END OF X_banks1.

DATA: T_BANKS1 TYPE STANDARD TABLE OF X_BANKS1 INITIAL SIZE 0,

WA_BANKS1 TYPE X_BANKS1,

Now i want internal table t_itab data should split at commas and transfered to internal table t_banks1.

ex : t_itab-banks is AD,DE, AB should transfered to

t_banks: AD ( 1 record)

DE (2 record)

AB ( 3 record).

I used following coding ......

SPLIT wa_itab-BANKS AT ',' INTO T_BANKS1-BANKS.

SPLIT wa_itab-BANKL AT ',' INTO TABLE T_BANKS1-BANKL.

SPLIT wa_itab-BANKN AT ',' INTO TABLE T_BANKS1-BANKN.

SPLIT wa_itab-KOINH AT ',' INTO TABLE T_banks1-KOINH.

SPLIT wa_itab-BKONT AT ',' INTO TABLE T_BANKS1-BKONT.

SPLIT wa_itab-BANKA AT ',' INTO TABLE T_BANKA1-BANKA.

But its not working.

Former Member
Not what you were looking for? View more on this topic or Ask a question