0% found this document useful (0 votes)
202 views1 page

SAp Query

The document selects and joins data from multiple tables including VBRK, VBRP, VBAP, ZVBRP_HIER, VBKD, and VBAK to retrieve over 100 fields related to sales documents and items.

Uploaded by

mfaizanzia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
202 views1 page

SAp Query

The document selects and joins data from multiple tables including VBRK, VBRP, VBAP, ZVBRP_HIER, VBKD, and VBAK to retrieve over 100 fields related to sales documents and items.

Uploaded by

mfaizanzia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

SELECT VBRK.KUNRG a, VBRK.KUNAG b, VBRK.FKDAT c, VBRK.VTWEG d, VBRK.

VKORG e, VBR
K.FKART f, VBRK.WAERK g, VBRK.KDGRP h, VBRK.LCNUM i, VBRK.FKSTO j, VBRK.ZTERM k,
VBRK.RFBSK l, VBRK.MAN_ORD m, VBRK.ERDAT n, VBRK.KNUMV o, VBRP.LGORT p, VBRP.WE
RKS q, VBRP.VSTEL r, VBRP.VGBEL s, VBRP.NETWR t, VBRP.VRKME u, VBRP.MWSBP v, VBR
P.AUBEL w, VBRP.FKLMG x, VBRP.MEINS x, VBRP.FKIMG y, VBRP.VBELN z,
VBRP.SPART aa, VBRP.MATNR ab, VBRP.MVGR1 ac, VBRP.MVGR2 ad, VBRP.POSNR ae, VBAP.
ROUTE af, VBAP.KWMENG ag, VBAP.VRKME ah,
VBAP.MWSBP ai, VBAP.NETWR aj, VBAP.VBELN ak, VBAP.POSNR al, ZVBRP_HIER.ZPRD am,
ZVBRP_HIER.WAERK an, ZVBRP_HIER.ZSRP ao,
ZVBRP_HIER.ZGCS ap, ZVBRP_HIER.PR00 aq, ZVBRP_HIER.ZFRT ar, ZVBRP_HIER.ZFEP ass,
ZVBRP_HIER.ZCOM at, ZVBRP_HIER.ZEXC au,
ZVBRP_HIER.ZMAR av, ZVBRP_HIER.ZFRA aw, ZVBRP_HIER.ZRHA ax, ZVBRP_HIER.ZAFA ay,
ZVBRP_HIER.ZSMA az, ZVBRP_HIER.ZOAL ba,
ZVBRP_HIER.ZFXR bb, ZVBRP_HIER.MWST bc, ZVBRP_HIER.ZMWS bd, ZVBRP_HIER.SALES_DEP
T be, ZVBRP_HIER.SALES_ZONE bf,
ZVBRP_HIER.SALES_AREA bg, ZVBRP_HIER.SALES_TERR bh, ZVBRP_HIER.SALES_POINT bi, Z
VBRP_HIER.SALES_PROVINCE bj,
ZVBRP_HIER.SALES_DISTRICT bk, ZVBRP_HIER.SALES_TEHSIL bl, ZVBRP_HIER.ZAIT bm, ZV
BRP_HIER.POSNR bn, ZVBRP_HIER.VBELN bo,
VBKD.BSTKD bp1, VBKD.BSTDK bp, VBKD.BSTKD_M bq, VBKD.BSARK br1, VBKD.KDKG1 br, V
BKD.POSNR bs, VBKD.VBELN bt, VBAK.VDATU bu,
VBAK.NETWR bv, VBAK.WAERK bw, VBAK.BSTNK bx, VBAK.AUDAT by, VBAK.BSTDK bz, VBAK.
BSTZD ca, VBAK.AUART cb, VBAK.VBELN cc
from VBRK inner join VBRP on VBRP.VBELN = VBRK.VBELN
inner join VBAP on VBAP.VBELN = VBRP.AUBEL and VBAP.POSNR = VBRP.AUPOS
inner join ZVBRP_HIER on ZVBRP_HIER.POSNR = VBRP.POSNR and ZVBRP_HIER.
VBELN = VBRP.VBELN
left outer join VBKD on VBKD.POSNR = VBAP.POSNR and VBKD.VBELN = VBAP.
VBELN
inner join VBAK on VBAK.VBELN = VBAP.VBELN.

You might also like