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

THE WORK AREA itab IS NOT LONG ENOUGH ..

I am getting this issue.check the attachment for actual code and do reply me.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • Posted on Sep 07, 2012 at 04:49 AM

    Hi,

    You are trying to insert values into KNA1 table from I_KNA1 structure , So both the structures

    i.e KNA1 and I_KNA1 must be equal, In you report I_KNA1 is having only 6 fileds and kna1 will have many fields.

    So you need to change your declaration of I_KNA1 .

    For testing purpose change your code as shown below

    DATA : I_KNA1 TYPE standard TABLE OF KNA1 . " Change I_KNA1 to KNA1 sO BOTH THE STRUCTURES WILL BE SAME
    DATA : WA_KNA1 TYPE KNA1 .

    Regards,

    Madhumahesh.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 07, 2012 at 04:56 AM

    Hi,

    Try like this

    TYPES : BEGIN OF TY_KNA1 .
    include STRUCTURE kna1.
    * KUNNR TYPE KNA1-KUNNR , " CUSTOMER NUMBER
    * NAME1 TYPE KNA1-NAME1 , " NAME1
    * NAME2 TYPE KNA1-NAME2 , " NAME2
    * ORT01 TYPE KNA1-ORT01 , " CITY
    * PSTLZ TYPE KNA1-PSTLZ , " POSTAL CODE
    * REGIO TYPE KNA1-REGIO ,
    types END OF TY_KNA1 .

    Gourav.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 07, 2012 at 04:59 AM

    The work area or record of the internal table must meet the prerequisites for use in every Open SQL statements. Easiest way is to use the actual structure of the database table.

    Regards,

    Raymond

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 07, 2012 at 05:00 AM

    Dear,

    Declare I_KNA1 type structure of kna1 structure and try.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 07, 2012 at 05:21 AM

    Hi,

    You can declare the work area and Internal table as below...

    Data:

    wa_kna1 like kna1.

    DATA:

    i_kna1 LIKE TABLE OF wa_kna1.

    Now you can able to Insert the records into the database table as you required.

    Regards,

    Mallikarjuna

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 10, 2012 at 10:07 AM

    Hi,

    with the answers to your question, you will be technically able to insert records in KNA1 table, but you should know that using INSERT statements for saving data in SAP master data table is not a good solution and may lead to data inconsistencies. You should use standard interfaces for doing the same.

    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.