Skip to Content
0
Former Member
May 27, 2008 at 12:06 PM

Database View is not appearing in the ABAP Coding

60 Views

Dear Friends,

I am very much new in the ABAP. Actually I worked last 8 years in the Oracle PL/SQL. Recently, my company implements SAP. The database is Oracle 10g. I would like to use my oracle experience in the project. But in everywhere I faced some problem.

I have created one Database view by the Native sql. Here I am giving you the code.

-


Create OR REPLACE view ZVMVSL_ALLTPORT

AS

SELECT T1.MVESSEL_NO, T1.MVESSEL_NAME, T1.SHIPPINGLINE, T2.MVOYAGENUMBER,

T2.TRANSHIPMENTA AS TPORT, T2.ETDTSHIPMENTA AS ETD_TPORT,

T3.MVESSEL_SRL_NO,

T3.PORTOFDISCHARGE POD, T3.ETAPORT

FROM ZSD_MOTHER_MST T1, ZSD_MOTHER_DTL T2, ZSD_MOTHER_VIA T3

WHERE T1.MANDT = T2.MANDT

AND T1.MVESSEL_NO = T2.MVESSEL_NO

AND T1.MVESSEL_NO = T3.MVESSEL_NO

AND T2.MVOYAGENUMBER = T3.MVOYAGENUMBER

AND T2.TRANSHIPMENTA <>' '

UNION

SELECT T1.MVESSEL_NO, T1.MVESSEL_NAME, T1.SHIPPINGLINE, T2.MVOYAGENUMBER,

T2.TRANSHIPMENTB AS TPORT, T2.ETDTSHIPMENTB AS ETD_TPORT,

T3.MVESSEL_SRL_NO,

T3.PORTOFDISCHARGE POD, T3.ETAPORT

FROM ZSD_MOTHER_MST T1, ZSD_MOTHER_DTL T2, ZSD_MOTHER_VIA T3

WHERE T1.MANDT = T2.MANDT

AND T1.MVESSEL_NO = T2.MVESSEL_NO

AND T1.MVESSEL_NO = T3.MVESSEL_NO

AND T2.MVOYAGENUMBER = T3.MVOYAGENUMBER

AND T2.TRANSHIPMENTB <>' '

-


This view i could not use from ABAP codes, ABAP/4 only identified by views which we would create from T-code se11. Now tell me how could I solve this issue. Because in this query i did some UNION which is not directly available in teh se11.

Please help me how to handle this situation. Because if I can use this sort of native sql views, I could solve lot of things in the development.

rgds

Farhad