PageSourceSearch

https://erpl.io/assets/js/811922cd.5b2cc714.js

js erpl.io collected 2026-10-03 23:20:32 UTC 4,692 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkerpl_docusaurus=self.webpackChunkerpl_docusaurus||[]).push([[257],{28453:(e,t,n)=>{n.d(t,{R:()=>l,x:()=>d});var a=n(96540);const s={},r=a.createContext(s);function l(e){const t=a.useContext(r);return a.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function d(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:l(e.components),a.createElement(r.Provider,{value:t},e.children)}},72316:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>i,contentTitle:()=>d,default:()=>u,frontMatter:()=>l,metadata:()=>a,toc:()=>o});const a=JSON.parse('{"id":"guides/simple/read-sap-table","title":"How to Read an SAP Table","description":"Learn how to extract data from SAP ERP tables into DuckDB","source":"@site/docs/guides/simple/read-sap-table.md","sourceDirName":"guides/simple","slug":"/guides/simple/read-sap-table","permalink":"/docs/guides/simple/read-sap-table","draft":false,"unlisted":false,"editUrl":"https://github.com/datazoode/erpl-landingpage/tree/main/docs/guides/simple/read-sap-table.md","tags":[],"version":"current","sidebarPosition":1,"frontMatter":{"sidebar_position":1,"title":"How to Read an SAP Table","description":"Learn how to extract data from SAP ERP tables into DuckDB","keywords":["erpl","sap","table","extract","rfc"]},"sidebar":"docs","previous":{"title":"Command Reference","permalink":"/docs/erpl-adt/reference"},"next":{"title":"run-bw-query","permalink":"/docs/guides/simple/run-bw-query"}}');var s=n(74848),r=n(28453);const l={sidebar_position:1,title:"How to Read an SAP Table",description:"Learn how to extract data from SAP ERP tables into DuckDB",keywords:["erpl","sap","table","extract","rfc"]},d="How to Read an SAP Table",i={},o=[{value:"Step 1: Connect to SAP",id:"step-1-connect-to-sap",level:2},{value:"Step 2: Read Your First Table",id:"step-2-read-your-first-table",level:2},{value:"Common SAP Tables",id:"common-sap-tables",level:2},{value:"Next Steps",id:"next-steps",level:2}];function c(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",header:"header",li:"li",p:"p",pre:"pre",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.header,{children:(0,s.jsx)(t.h1,{id:"how-to-read-an-sap-table",children:"How to Read an SAP Table"})}),"\n",(0,s.jsx)(t.p,{children:"In this guide, you'll learn how to extract data from SAP ERP tables.\nBy the end, you'll be able to query any SAP table directly from DuckDB."}),"\n",(0,s.jsx)(t.admonition,{title:"What You'll Need",type:"info",children:(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"ERPL extension installed"}),"\n",(0,s.jsx)(t.li,{children:"SAP connection credentials"}),"\n",(0,s.jsx)(t.li,{children:"5 minutes"}),"\n"]})}),"\n",(0,s.jsx)(t.h2,{id:"step-1-connect-to-sap",children:"Step 1: Connect to SAP"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-sql",children:"-- Install and load ERPL\nINSTALL 'erpl' FROM 'http://get.erpl.io';\nLOAD 'erpl';\n\n-- Store your SAP credentials in a secret\nCREATE SECRET sap_system (\n  TYPE   sap_rfc,\n  ASHOST 'hostname',\n  SYSNR  '00',\n  CLIENT '100',\n  USER   'your_username',\n  PASSWD 'your_password',\n  LANG   'EN'\n);\n"})}),"\n",(0,s.jsx)(t.h2,{id:"step-2-read-your-first-table",children:"Step 2: Read Your First Table"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-sql",children:"-- Read customer master data\nSELECT * FROM sap_read_table('KNA1', MAX_ROWS => 100);\n"})}),"\n",(0,s.jsx)(t.h2,{id:"common-sap-tables",children:"Common SAP Tables"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Table"}),(0,s.jsx)(t.th,{children:"Description"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"KNA1"}),(0,s.jsx)(t.td,{children:"Customer Master Data"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"VBAK"}),(0,s.jsx)(t.td,{children:"Sales Document Header"})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"MARA"}),(0,s.jsx)(t.td,{children:"Material Master Data"})]})]})]}),"\n",(0,s.jsx)(t.h2,{id:"next-steps",children:"Next Steps"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"/docs/guides/simple/run-bw-query",children:"Run a BW Query"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"/docs/guides/advanced/rfc-metadata",children:"Advanced: RFC Metadata"})}),"\n"]})]})}function u(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.