Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
prabunakil
Contributor III
Contributor III

How to Mapping Load with KONV, VBRP, VBRK

Hi All, how to mapping load between KONV, VBRP, VBRK with different type of condition in KONV to display in a straight table.

3 Replies
marcus_malinow
Partner - Specialist III
Partner - Specialist III

shraddha_g
Partner - Master III
Partner - Master III

Give some details about fields & Data present in these tables

prabunakil
Contributor III
Contributor III
Author

// MANDT,

KNUMV as [Condition No],

Right (KPOSN,3) as [KONV_KPOSN],

STUNNR,

// ZAEHK,

KSCHL,

KINAK as [KONV_KINAK],

// KMXWR,

if(Right(KWERT,1) = '-',

    Num(Num#(Mid(KWERT, 1, Len(KWERT)-1),'#.##,000')) * -1,  // Negativ values

    Num(Num#(KWERT,'#.##,000'))) as [KONV_KWERT]; 

// KDATU;

SQL SELECT *

FROM "SAP Sales".dbo.KONV

Where KSCHL IN ('Z1PR','ZRBP','ZPR0','HA00','ZRBA','ZHB2','ZHB0','VPRS','Z3PR','ZPR1','ZHB1');

LOAD

MANDT,

VBELN as Invoice,

POSNR,

UEPOS,

FKIMG as [Billed Quantity],

VRKME as SU,

UMVKZ,

UMVKN,

MEINS,

SMENG,

    FKLMG,

    LMENG,

//    NTGEW as [Net Weight],

    BRGEW as [Gross Weight],

    GEWEI as Wun,

    VOLUM as Volume,

    VOLEH as Vun,

    GSBER as [Billing Date],

    PRSDT as [Pricing Date],

    FBUDA,

    Left(FBUDA,4) as [Billing Date Year],

    Right(FBUDA,2) as [Billing Date Day],

    Mid(FBUDA,5,2) as [Billing Date Month],

    KURSK as [Exch. Rate],

    NETWR as [Net value],

    VBELV as [OriginDoc],

    POSNV,

    VGBEL as [Ref.doc.],

    VGPOS,

    VGTYP,

    AUBEL as [SalesDoc],    //salesdoc

    AUPOS,

    AUREF,

    MATNR,

    RIGHT(MATNR,8) as [Material],

    ARKTX as [Material Description],

    PMATN,

    CHARG as Batch,

    MATKL as [Matl Group],

    PSTYV as [Item Cat],

    POSAR,

    PRODH,

    VSTEL,

    ATPKZ,

    SPART as Division,

    POSPA,

    WERKS,

//    ALAND as Country,

    WKREG,

    WKCOU,

    WKCTY,

    TAXM1 as [Tax Amount 1],

    TAXM2 as [Tax Amount 2],

    TAXM3 as [Tax Amount 3],

    TAXM4 as [Tax Amount 4],

    TAXM5 as [Tax Amount 5],

    TAXM6 as [Tax Amount 6],

    TAXM7 as [Tax Amount 7],

    TAXM8 as [Tax Amount 8],

    TAXM9 as [Tax Amount 9],

    KOWRR,

    PRSFD,

    SKTOF,

    SKFBP,

    KONDM,

    KTGRM,

    KOSTL,

    BONUS,

    PROVG,

    EANNR,

    VKGRP as SGrp,

    VKBUR,

    SPARA as Di,

    SHKZG,

    ERNAM as [Created By],

    ERDAT as [Created On],

//   ERZET,

    BWTAR,

    LGORT as [Sloc],

   // STAFO,

    WAVWR as Cost,

    KZWI1 as [Subtotal 1],

    KZWI2 as [Subtotal 2],

    KZWI3 as [Subtotal 3],

    KZWI4 as [Subtotal 4],

    KZWI5 as [Subtotal 5],

    KZWI6 as [Subtotal 6],

    STCUR as [ExchRate],

    UVPRS as Price,

    UVALL,

    EAN11 as [EAN/UPC],

    PRCTR as [Profit Centre],

    KVGR1,

    KVGR2,

    KVGR3,

    KVGR4,

    KVGR5,

    MVGR1 as [MGr1],

    MVGR2 as [MGr2],

    MVGR3 as [MGr3],

    MVGR4 as [MGr4];

SQL SELECT *

FROM "SAP Sales".dbo.VBRP;

LOAD

// MANDT,

VBELN as Invoice,

FKART as [Bill Type],

FKTYP,

VBTYP,

WAERK as Currency,

VKORG,

VTWEG as Channel,

KALSM,

KNUMV as [Condition No],

    VSBD,

    FKDAT,

    Right(FKDAT,2) as TransactionDay,

    Mid(FKDAT,5,2) as TransactionMonth,

    Left(FKDAT,4) as TransactionYear, 

    BELNR,

    GJAHR,

    POPER,

    KONDA,

    KDGRP,

    BZIRK as [Customer Class],

    PLTYP,

    INCO1,

    INCO2,

    EXPKZ,

    RFBSK,

    MRNKZ,

    KURRF as [Exch.Rate],

    CPKUR,

    VALTG,

    VALDT,

    ZTERM as [Payment Terms],

    ZLSCH,

    KTGRD,

    LAND1,

    REGIO,

    COUNC,

    CITYC,

    BUKRS,

    TAXK1,

    TAXK2,

    TAXK3,

    TAXK4,

    TAXK5,

    TAXK6,

    TAXK7,

    TAXK8,

    TAXK9,

    NETWR,

    ZUKRI,

    ERNAM,

//    ERZET,

    ERDAT,

//   STAFO,

    KUNRG,

    KUNAG as [Sold to Party],

    MABER,

    STWAE,

    EXNUM,

    STCEG,

    AEDAT,

    SFAKN,

    KNUMA,

    "FKART_RL",

    "FKDAT_RL",

    KURST,

    MSCHL,

    MANSP,

    SPART,

    KKBER,

    KNKLI,

    CMWAE,

    CMKUF,

    HITYP,

    BSTNK as [PO Number],

    VBUND,

    "FKART_AB",

    KAPPL,

    LANDTX,

    "STCEG_L",

    XBLNR,

    ZUONR,

    MWSBK,

    LOGSYS,

    FKSTO,

    XEGDR,

    RPLNR,

    LCNUM,

    "J_1AFITP",

    "KURRF_DAT",

    AKWAE,

    AKKUR,

    KIDNO,

    BVTYP,

    NUMPG,

    BUPLA,

    VKONT,

    "FKK_DOCSTAT",

    NRZAS;

SQL SELECT *

FROM "SAP Sales".dbo.VBRK;