Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

unable SPLIT at #

Former Member
0 Likes
693

Hi

Actually am reading data from application server so the data is in this format

10B1#M1055#ZADC#AC -  1 Ton Hi Wall split#AC -  1 Ton Hi Wall split#EA#AIR-CON##ACX#1#6000

Now am tyring to split at # and populate to internal table , for this am using

SPLIT WA_FILE (contains data) AT W_TAB_FIELD (#)  INTO: WA_MM01-WERKS WA_MM01-MATNR WA_MM01-MTART.

but only WERKS is populated and remaining it is showing blank.

unable to figure it out..Please do help..!

Regards

Vamshi

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
658

SPLIT WA_FILE AT CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB INTO: WA_MM01-WERKS WA_MM01-MATNR WA_MM01-MTART.

Try this.

Thanks,

Shambu

5 REPLIES 5
Read only

Kiran_Valluru
Active Contributor
0 Likes
658

Hi,

The syntax for split which you have written is correct. Please check whether the remaining fields are clearing somewhere else.

Keep a break point and check whether the values are populating or not.

Regards,

Kiran

Read only

0 Likes
658

Hi kiran

Am able to get wa_mm01-werks but not getting any values in the remaing fields.

no clear statement is used.

Read only

Amarpreet
Active Participant
0 Likes
658

did you upload the file(into app server )  in ASCI format or BINARY format ?

sometimes the space is repalced by a # in Binary format (which is the default value) .

hope this helps.

good luck .

Read only

Former Member
0 Likes
659

SPLIT WA_FILE AT CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB INTO: WA_MM01-WERKS WA_MM01-MATNR WA_MM01-MTART.

Try this.

Thanks,

Shambu

Read only

0 Likes
658

Thanks a lot......