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

BDC DATASET syntax

Hi friends,

I have 5 structures in a flat file. The data from flat file needs to move into an internal table through work area. When i am using open dataset in my code the total data is not moving from flat file to work area.Only structure 1 is getting moved into internal table.

Here for every new structure in the flat file the cursor moves to the new line feed i.e. if structure 1 data stop at the middle of the line.The next structure of the data in the flat file starts in the new line.Can any one tell me how we should write the open data set .

This program is just to read the file from application server to the internal table .

Please help me .Its very Urgent.

Thanks

Satish Raju

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 18, 2007 at 04:24 PM

    Do you have any flag in the file which says the associated record belongs to which structure?

    You can first move all data to a string and based upon the flag value you can move this string to respective file structures and likewise populate respective internal tables.

    ashish

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 18, 2007 at 04:33 PM

    I hope your flow is as follows. Also, your file should be a text file, otherwise is you are opening it in binary mode, you will have all of it in one line.

    OPEN DATASET dsn IN TEXT MODE....

    DO.

    READ DATASET dsn INTO something....

    IF sy-subrc <> 0.

    EXIT.

    ENDIF.

    move 'something' to itab.

    ENDDO.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 21, 2011 at 07:51 AM

    Resolved myself

    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.