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

using structures in reporting

If i given only structures for generating a reports how can i code SQL for the same as SQL cannot accept the structures for fetching the data.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    Posted on Dec 01, 2007 at 08:31 PM

    If you're only given structures, and your expected to code from them, tell your functional analyst he's not given you enough information. You have to have table names.

    If you're permitted to do some analysis yourself, then you need to understand first that the technicals names of fields on screens is the name given to the screen structure. Sometimes that maps directly to a table, but more often than not, it doesn't.

    In those cases, you can go through debug to find out which table is used to populate the structure, or you can run SQL trace or Run Time Analysis to find the same.

    matt

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 01, 2007 at 05:45 AM

    Hi,

    You have to use the structures in the following situations.\

    Ex 1. If you want to show the reports based on same characteristic and some other restricted char then u have to use structures. For ex you have posting period and fiscal year then you want to show quarterly reports then you have to create structures then using these chars you have to create quarters.

    Ex 2. If you want to use cell defination then you need two structures one in row and another in column.

    For more info see here:

    http://help.sap.com/saphelp_nw04/helpdata/en/4d/e2bebb41da1d42917100471b364efa/content.htm

    Regards

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 02, 2007 at 05:57 AM

    Hi

    The structure will only have data if it has been loaded elsewhere, such as if the structure was populated by a function call or BAPI.

    If not, you will have to load data into the structure using SQL Select or by calling the approriate function call/method/BAPI etc.

    If the structure already has data, you access that data by referencing the structure name and the component

    e.g.

    w_field = struct-field1.

    This will load the value of the component field "field1" in structure "struct" into a separate work field "w_field".

    This is how you refer to components of a structure.

    structure_name-component_name

    Consequently, you should not use a dash "-" in the name of a field or structure. If you need to separate words in the name use an underscore "_".

    If you do attempt to use the dash "-" in the name of a field or structure in a Unicode program, you will get a warning message.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 02, 2007 at 01:29 PM

    Hi,

    Structres contains data only at runtime. Hence SELECT query is not applicable to it as SELECT statment can be used to fetch data from Tables/Views only.

    Regards,

    Amit

    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.