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

Declare structure

Hi,

I'm developing a report that display all the fields in LAGP and LQUA. Then, i tried to to declare the following structure:

TYPES: BEGIN OF TY_REPORT.

INCLUDE STRUCTURE LAGP.

INCLUDE STRUCTURE LQUA.

TYPES: MFRPN LIKE MARA-MFRPN,

END OF TY_REPORT.

It returns error that the MANDT field is existed in LAGP and LQUA. Besides, the LGNUM, ..., etc are also exist in LAGP and LQUA. Is there any way that can declare this kind of structure without enter each field??

Regards,

Kit

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Jan 18, 2008 at 09:39 AM

    Dear Kit,

    Because these two tables (LAGP and LQUA) contains keys that is both used in two tables thus if you declare it like your way, surely, the ABAP editor will give you those errors...

    For neatness in your program.. why don't you go to se11 and create a structure for the fields you wanted from both tables (LAGP and LQUA)...

    thus after create a new structure in SE11 incorporating LAGP and LQUA then you can use your way of declaring your structure in ABAP.

    For example, you create a structure called LAQUAP in se11.

    Then in your coding...

    TYPES: BEGIN OF TY_REPORT.

    INCLUDE STRUCTURE LAQUAP.

    TYPES: MFRPN LIKE MARA-MFRPN,

    END OF TY_REPORT.

    This is one of my options. AND EVEN , with this way you still have to enter each of the field into your structure.

    Hope it helps you.

    Thanks

    William Wilstroth.

    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.