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

DB View on MSEG , AFPO and AFKO

I want to create a view based on the following conditions between tables - MKPF , MSEG , AFPO , AFKO

CONDITION -

1. Get the date based on the movement types ( tables mkpf and mseg )

2.I NEED TO LINK SALES ORDER AND SALES ORDER LINE ITEM field FROM MSEG and AFPO.

3. THEN AFTER DETERMINING THE PO FROM THE ABOVE CONDITION , LINK THE Production Order (AFPO) TO AFKO TABLE.

HOW CAN THIS BE DONE. PLZ HELP MATTER URGENT.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 18, 2007 at 04:56 AM

    Hi

    Take the EBELN and EBLP fields from MSEG table

    which are PO no and Item

    pass them to EKKN table and take the VBELN and POSNR fields from it which are SALES ORDER and ITEM number

    and pass this VBELN to AFPO and take the AUFNR field

    Regards

    Anji

    Add a comment
    10|10000 characters needed characters exceeded

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

    Hi

    <b>Importance/Use of Views</b>

    Data for an application object is often distributed on several database tables. Database systems therefore provide you with a way of defining application-specific views on the data contained in several tables. These are called views.

    Data from several tables can be combined in a meaningful way using a view (join). You can also hide information that is of no interest to you (projection) or only display those data records that satisfy certain conditions (selection).

    A view is a logical view on one or more tables, that is, a view is not actually physically stored, instead being derived from one or more other tables.

    The data of a view can be displayed exactly like the data of a table in the extended table maintenance.

    <b>Join, Projection and Selection</b>

    CROSS PRODUCT

    Given two tables TABA and TABB. Table TABA has 2 entries and table TABB has 4 entries

    Each record of TABA is first combined with each record of TABB. If a join condition is not defined, the cross product of tables TABA and TABB is displayed with the view.

    <b>Join condition</b>

    A join condition describes how the records of the two tables are connected.

    <b>Inner Join and Outer Join</b>

    The data that can be selected with a view depends primarily on whether the view implements an inner join or an outer join.

    With an inner join, you only get the records of the cross-product for which there is an entry in all tables used in the view.

    With an outer join, records are also selected for which there is no entry in some of the tables used in the view. (ABAP allows left outer join.)

    The data that can be selected with a view depends primarily on whether the view implements an inner join or an outer join.

    <b>Projection</b>

    Sometimes some of the fields of the tables involved in a view are not of interest. The set of fields used in the view can be defined explicitly (projection). In our example, Field 4 is of no interest and can be hidden.

    We specify the fields which we need to show in our view by including them under the view flds tab when creating a view in the dictionary.

    <b>Selection Conditions</b>

    Selection conditions that are used as a filter can be defined for a view.

    Specifying these conditions under the Selection conditions tab when creating a view in the dictionary would have an effect which is similar to specifying a where clause when writing a select query to restrict data.

    <b>

    Reward if usefull</b>

    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.