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

Type I_LISTADO is unknown

Hi Experts,

When I give TYPE instead of LIKE in this statement. It give an error message.

What is the way I can give TYPE in the below staement.

data: begin of i_listado OCCURS 10,

KUNNR like kna1-KUNNR,

LAND1 like kna1-LAND1,

TELFX like kna1-TELFX,

end of i_listado.
DATA LS_LISTADO TYPE i_listado."Work area

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 07, 2014 at 03:21 AM

    this will be the code

    types: BEGIN OF i_listado,

    KUNNR LIKE kna1-KUNNR,

    LAND1 LIKE kna1-LAND1,

    TELFX LIKE kna1-TELFX,

    END OF i_listado.

    DATA LS_LISTADO TYPE i_listado."

    Thanks

    Bala

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 07, 2014 at 03:43 AM

    Hi Toby,

    When you declare BEGIN OF XYZ... ENDOF XYZ. that will be considered as an internal table. Then if you want to declare a structure/workarea with respect to that internal table you can declare it as

    DATA : LS_LISTADO LIKE LINE OF I_LISTADO.

    Otherwise you should declare a structure with

    TYPES : BEGIN OF XYZ... END OF XYZ.

    Then declare an internal table as

    DATA : ITAB TYPE STANDARD TABLE OF XYZ.

    DATA : L_WA TYPE XYZ.

    Thank you,

    -Vijay

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 07, 2014 at 03:48 AM

    Hi,

    The main difference between 'data' and 'types' is when we are using 'data' it provide some space in memory that means the statement creates data object.

    when we are using the 'types' it just gives the reference not create any space in the memory.

    That's you are getting 'unknown' syntax error.

    Please follow the 'bala' reply .it's good.

    types: BEGIN OF i_listado,

    KUNNR LIKE kna1-KUNNR,

    LAND1 LIKE kna1-LAND1,

    TELFX LIKE kna1-TELFX,

    END OF i_listado.

    DATA LS_LISTADO TYPE i_listado."

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 07, 2014 at 03:49 AM

    hiii,,

    types: begin of ty_listado ,

    KUNNR like kna1-KUNNR,

    LAND1 like kna1-LAND1,

    TELFX like kna1-TELFX,

    end of ty_listado.

    data: i_listado type TABLE OF ty_listado WITH HEADER LINE, " both internal table and work area
    LS_LISTADO type ty_LISTADO. " Now it is work area

    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.