Skip to Content

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

Interface

Hiii...

I want to upload comma sepratd file which contains data of three record that is

1) header record contain some field

2_detail record contains some field.

3)last is trailer record contain 3 filelds,

I made three internal table for these of the record and upload the file.but now problem is that while splitting this records with comma getting problem.

I made code like this, data : f_line type i.

describe table i_text lines f_line.

LOOP AT i_text.

if sy-tabix = 1.

SPLIT i_text AT ',' INTO wa_record-rec_id

wa_record-sys_id

wa_record-sys_date

wa_record-sys_time

wa_record-ctrl_rec.

elseif sy-tabix = f_line.

SPLIT i_text AT ',' INTO wa_trailer-rec_id

wa_trailer-tot_rec

wa_trailer-sum_amt.

else.

SPLIT i_text AT ',' INTO wa_details-rec_id

wa_details-pernr

wa_details-citem

wa_details-cpamt

wa_details-bssal

wa_details-curre.

endif.

while reading the file , detail record fiels r not getting read.Let me know logic splitting correct or not.

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