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

transfer application server data to a data base table

hai all,

how to transfer application server data to a data base table, i am using this code

iF V_FILE = 'X'.

OPEN DATASET V_FILE2 FOR INPUT IN TEXT MODE ENCODING DEFAULT.

IF SY-SUBRC = 0.

DO.

READ DATASET V_FILE2 INTO DATA1.

SPLIT DATA1 AT C_COMMA INTO V_MATNR V_MTART V_WERKS V_LGORT.

IF SY-SUBRC = 0.

APPEND IT_MARA.

ELSE.

EXIT.

ENDIF.

ENDDO.

ENDIF.

CLOSE DATASET V_FILE2.

but the data is not splitting from data1 to the defined variables.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Posted on Sep 23, 2009 at 12:43 PM

    by debug, check that data1 contains commas

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 23, 2009 at 01:02 PM

    Hi Kpsgoutam,

    Check whether the data present in file in application server is comma delimited .It might be a tab separated one.check it in debugging mode whether its getting splitted or not

    regards,

    Lakshman.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 23, 2009 at 02:04 PM

    check whats the separator in al11 or in debug mode..

    it can be #, * , ',', or any other thing...

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 23, 2009 at 02:10 PM

    Where is your code to move V_MATNR etc. to IT_MARA?

    Also, SPLIT could change SY-SUBRC to 4, so it might exit your loop even before the file was processed completely.

    Thomas

    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.