Skip to Content
author's profile photo Former Member
Former Member

Text tab delimited file in application server

Hello,

I have a text tab delimited file in application server.I have used

OPEN DATASET ld_file FOR INPUT IN TEXT MODE MESSAGE gv_open_msg.

and i have got the data in an internal table itab using read data set. the data in itab shows as ....

115680#5267314#0121#12.00#07/29/2007#06/29/2007#status

115681#5267312#0121#12.00#07/29/2007#06/29/2007#status

i need to move this into one more table

DATA: BEGIN OF t_input OCCURS 0,

vkont(9) TYPE c,

vertrag(9) TYPE c,

bukrs(5) TYPE c,

betrw(8) TYPE c,

pos_dat(10) TYPE c,

doc_dat(10) TYPE c,

transctn(34) TYPE c,

END OF t_input.

1)my version is 4.6 c so cannot use CL_ABAP_CHAR_UTILITIES

2) I used

constants: value type x value '09'.

SPLIT itab AT value INTO TABLE t_input. '' not working

split itab at # not workin

but it didnt get splitted.

i have changed the value as 05 and cheked but not working...

pls advice......................thanks in advance

Edited by: Alvaro Tejada Galindo on Jan 2, 2008 2:59 PM

Add a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 02, 2008 at 07:42 PM

    From your post i believe that "#" is your delimiter in the file. If thats right, then

    Declare Value as below

    constants: value type C value '#'.

    Now try running the code.

    Vinodh Balakrishnan

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 02, 2008 at 07:45 PM

    hi try this

    DO.

    READ DATASET p_ufile INTO in_file.

    IF sy-subrc <> 0.

    EXIT.

    ENDIF.

    APPEND in_file.

    CLEAR in_file.

    ENDDO.

    CLOSE DATASET p_ufile.

    LOOP AT in_file.

    SPLIT in_file AT c_tab INTO

    wa_citm_b-type

    wa_citm_b-vbeln

    wa_citm_b-posnr

    wa_citm_b-uepos.

    • wa_citm_b-matnr

    • lv_menge

    • wa_citm_b-arktx

    • wa_citm_b-vbegdat

    • wa_citm_b-venddat

    • wa_citm_b-prctr

    • wa_citm_b-zterm

    • wa_citm_b-faksp

    • wa_citm_b-taxm1

    • wa_citm_b-vlaufz

    • wa_citm_b-vlauez

    • wa_citm_b-vlaufk

    • wa_citm_b-vkuegru

    • wa_citm_b-bstkd

    • wa_citm_b-bstdk

    • wa_citm_b-posex

    • wa_citm_b-bstkd_e

    • wa_citm_b-bstdk_e

    • wa_citm_b-period.

    IF NOT wa_citm_b-posnr CA sy-abcde.

    APPEND wa_citm_b TO lt_citm_b.

    ENDIF.

    ENDLOOP.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 02, 2008 at 08:40 PM

    You should do as follows.

    SPLIT itab AT value(please change this to some other name such as c_tab)

    INTO t_input-vkont t_input-vertrag t_input-bukrs t_input-betrw t_input-pos_dat t_input-doc_dat t_input-transctn.

    APPEND t_input. CLEAR t_input.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 31, 2008 at 11:09 AM

    Hi Jay,

    question: the c_tab you have in the code, is this a locally declared variable you used? How did you declare it?

    thanks!

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.