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

OPEN DATASET PROBLEM

HI

i m having one file on application server the file has records which has 900 characters in one line .

there can be more than one line.

when i use


OPEN DATASET TO_FILE FOR INPUT IN TEXT MODE ENCODING DEFAULT.

IF SY-SUBRC <> 0.
  WRITE: SY-SUBRC, ' LIKE ', TO_FILE.
ELSE.
  WHILE SY-SUBRC = 0.
    READ DATASET TO_FILE INTO WA_UPD.

    IF SY-SUBRC <> 0.
      EXIT.
    ENDIF.
    APPEND WA_UPD TO IT_UPD.
    CLEAR WA_UPD.
  ENDWHILE.

it read up to 255 characters only so i m getting the data in my internal table wrong.

pls help me on this...

Thanxs & Regards

Rajan

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

7 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 02, 2008 at 09:40 AM

    HI,

    Check this code...

    OPEN DATASET dsn FOR INPUT IN TEXT MODE ENCODING DEFAULT.

    IF SY-SUBRC EQ 0.

    CLEAR : it_upd_dt.

    DO.

    READ DATASET dsn INTO rec.

    IF sy-subrc = 0.

    wa_upd_dt-msg = rec.

    APPEND wa_upd_dt TO it_upd_dt.

    CLEAR wa_upd_dt.

    ELSE.

    EXIT.

    ENDIF.

    ENDDO.

    CLOSE DATASET dsn.}

    ELSE.

    error message..

    ENDIF.

    Edited by: avinash kodarapu on Dec 2, 2008 3:11 PM

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 02, 2008 at 09:42 AM

    Hi There,

    Can I see the declaration Part? May be you restricted to 255 characters.

    Hope this helps.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 02, 2008 at 09:37 AM

    Hi.... rajan

    wat abt that KKE1 Issue, Solved or wat.....

    Thanks

    Saurabh

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 02, 2008 at 09:38 AM

    Hi Rajan,

    How have you declared WA_UPD ?

    Regards

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 02, 2008 at 09:41 AM

    declare like this

    data: wa_upd(1500) type c.

    Regards,

    Ajay

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 02, 2008 at 09:48 AM

    Hi..

    In the application server .. only 255 chars can be displayed.. the rest gets truncated....

    Use CG3Y transaction..to download the exact data available in the application server.....

    Cheers

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 22, 2008 at 06:56 AM

    its been solved

    if u want to pass more than 255 charc

    u have to make a workarea as per yopu required

    that is the same i did

    and it works

    thnxs to u all

    rajan

    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.