2008 Jul 08 12:26 PM
hi dear
i want Create DB view to hold all header sales document data on the following tables:
VBAK, VBKD, VBUK, KNA1 as follow:
FROM VBAK:
Sales Document
Created on
Time
Created by
Doc. Currency
Division
Sales Group
Sales Office
FROM VBKD:
Price group
Customer group
Sales district
Price List
Incoterms
Payt Terms
FROM VBUK:
Overall status
Totals status
Pricing
Document cat.
Document object
FROM KNA1:
Name
Name 2
City
Postal Code
Govern.Code
Search term
Street
Telephone 1
Fax Number
One-time acct
Address
2. i want also Select and display all data from that view from program code, sales order will be the only parameter.
Any pointers in this regard are very much helpful.
Regards
Waseem Hesham
hi dear
i want Create DB view to hold all header sales document data on the following tables:
VBAK, VBKD, VBUK, KNA1 as follow:
FROM VBAK:
Sales Document
Created on
Time
Created by
Doc. Currency
Division
Sales Group
Sales Office
FROM VBKD:
Price group
Customer group
Sales district
Price List
Incoterms
Payt Terms
FROM VBUK:
Overall status
Totals status
Pricing
Document cat.
Document object
FROM KNA1:
Name
Name 2
City
Postal Code
Govern.Code
Search term
Street
Telephone 1
Fax Number
One-time acct
Address
2. i want also Select and display all data from that view from program code, sales order will be the only parameter.
Any pointers in this regard are very much helpful.
Regards
Waseem Hesham
2008 Jul 08 12:43 PM
Don't create a view, rather write an program that uses SELECT and INNER JOINS.
matt
2008 Jul 08 1:37 PM
Hello
SE11 -> View -> Create -> Database view
In column TABLES:
VBAK
VBKD
VBUK
KNA1
Join conditions:
VBUK-MANDT = VBAK-MANDT
VBUK-VBELN = VBAK-VBELN
VBAK-MANDT = VBKD-MANDT
VBAK-VBELN = VBKD-VBELN
KNA1-MANDT = VBAK-MANDT
KNA1-KUNNR = VBAK-KUNNR
View fields:
MANDT VBAK MANDT
VBELN VBAK VBELN
ERDAT VBAK ERDAT
ERZET VBAK ERZET
ERNAM VBAK ERNAM
... ENUMERATE HERE ALL FIELDS YOU NEED
Save and activate.
Then in programm:
tables: z_your_view.
data: itable like z_your_view occurs 0.
parameters: p_vbeln like vbak-vbeln.
select * from z_your_view into table itable where vbeln eq p_vbeln.
anything do with data .....