March 27, 2009
IDOC Scenario
I have tried to IDOC SAP..but i tried from another source..you can try this at home...please download from this link
March 15, 2009
Table BSID and BSAD
Table BSID and BSAD
the both of tables are FI tables and have a relation within Customer.
Document Header table : BKPF -> Accounting Document Header
Fields : BUKRS ->Company Code
BELNR->Accounting Document Header
GJAHR->Fiscal Year
These fields is important. Because Document Header can be repeated every year or other Company Code.
Document Segment : BSEG -> Accounting Document Segment
Fields : BUKRS-> Company Code
BELNR->Accounting Document Header
GJAHR->Fiscal Year
BUZEI->Number of Line Item Within Accounting Document
HKONT->General Ledger Account
SHKZG->Debit/Credit Indicator
S -> Debit
H -> Credit
This table is detail table. It would be very big records, because every posting accounting document will update this table. I can say it is Journal GL Table.
Allocation Table : BSID ->Accounting: Secondary Index for Customers -> Open Items
Fields : KUNNR -> Customer Number 1
I call this table as Allocation Table, because :
1. We can know total amount of every payment to allocate invoice.
2. Or Credit Memo can allocate to invoice
This table fill open invoice (It hasn't been paid yet) or Payment of invoice hasn't been fully (belum Lunas)
example :
Invoice 1000
Payment1 200
Payment2 400
Allocation Table : BSAD ->Accounting: Secondary Index for Customers -> Closed Items
It is the same as BSID, but it only fills invoice has been paid fully (Lunas)
example :
Invoice 1000
Payment1 200
Payment2 400
Payment3 400
the both of tables are FI tables and have a relation within Customer.
Document Header table : BKPF -> Accounting Document Header
Fields : BUKRS ->Company Code
BELNR->Accounting Document Header
GJAHR->Fiscal Year
These fields is important. Because Document Header can be repeated every year or other Company Code.
Document Segment : BSEG -> Accounting Document Segment
Fields : BUKRS-> Company Code
BELNR->Accounting Document Header
GJAHR->Fiscal Year
BUZEI->Number of Line Item Within Accounting Document
HKONT->General Ledger Account
SHKZG->Debit/Credit Indicator
S -> Debit
H -> Credit
This table is detail table. It would be very big records, because every posting accounting document will update this table. I can say it is Journal GL Table.
Allocation Table : BSID ->Accounting: Secondary Index for Customers -> Open Items
Fields : KUNNR -> Customer Number 1
I call this table as Allocation Table, because :
1. We can know total amount of every payment to allocate invoice.
2. Or Credit Memo can allocate to invoice
This table fill open invoice (It hasn't been paid yet) or Payment of invoice hasn't been fully (belum Lunas)
example :
Invoice 1000
Payment1 200
Payment2 400
Allocation Table : BSAD ->Accounting: Secondary Index for Customers -> Closed Items
It is the same as BSID, but it only fills invoice has been paid fully (Lunas)
example :
Invoice 1000
Payment1 200
Payment2 400
Payment3 400
March 10, 2009
Function modules: Amount and Currency
- CURRENCY_AMOUNT_SAP_TO_IDOC - Convert currency to IDOC format
- CONVERT_TO_LOCAL_CURRENCY - Conversion of currency
- CLOI_PUT_SIGN_IN_FRONT Move the negative sign from the left hand side of a number, to the right hand side of the number. Note that The result will be left justified (like all
character fields), not right justified as numbers normally are. - CONVERT_TO_FOREIGN_CURRENCY Convert local currency to foreign currency.
- CONVERT_TO_LOCAL_CURRENCY Convert from foreign currency to local currency
Example 1: Convert amount to/from string
Amount to string:
CALL FUNCTION 'HRCM_AMOUNT_TO_STRING_CONVERT'
EXPORTING
betrg = 3000
WAERS = 'DKK'
* NEW_DECIMAL_SEPARATOR =
* NEW_THOUSANDS_SEPARATOR =
IMPORTING
STRING = slam.
String to amount:
CALL FUNCTION 'HRCM_STRING_TO_AMOUNT_CONVERT'
EXPORTING
string = slam2
DECIMAL_SEPARATOR = '.'
* THOUSANDS_SEPARATOR =
WAERS = 'HUF'
IMPORTING
BETRG = b2
* EXCEPTIONS
* CONVERT_ERROR = 1
* OTHERS = 2.
source :http://erpgenie.com/utilities/1155-function-modules-amount-and-currency
March 05, 2009
TABLE VBUK VBUP VBFA
TABLE VBUK VBUP VBFA
* VBUK is Status Header table. It could be from Sales Order table (VBAK), Delivery Order table (LIKP), and Billing table (VBRK).
VBELN = Sales and Distribution Document Number
LFSTK = Delivery status
LFGSK = Overall delivery status for all items
FKSTK = Billing status
FKSAK = Billing status (order-related billing document)
BUCHK = Posting Status of Billing Document
etc
*VBUP is Status Detail table. It could be from Sales Order detail table (VBAP), Delivery Order detail table (LIPS), and Billing detail table (VBRP).
VBELN = Sales and Distribution Document Number
LFSTA = Delivery status
LFGSA = Overall delivery status of the item
FKSTA = Billing status of delivery-related billing documents
FKSAA = Billing status for order-related billing documents
etc
*VBFA is Sales Document Flow. It is a detail table. You can see relation between Sales Order and Delivery Order and Post Good Issue and Sales Invoice OR relation between Delivery Order and Sales Invoice
VBELV = Preceding sales and distribution document
POSNV = Preceding item of an SD document
VBELN = Subsequent sales and distribution document
POSNN = Subsequent item of an SD document
RFMNG = Referenced quantity in base unit of measure
MEINS = Base Unit of Measure
RFWRT = Reference value
WAERS = Statistics currency
Be Careful When you report Sales Invoice Amount from this table. If you need to collect subsequent document (Sales Invoice), because it can fill Sales Invoice Cancellation.
?? Be careful for Delivery order, for RFWRT field never fills value (0).
* VBUK is Status Header table. It could be from Sales Order table (VBAK), Delivery Order table (LIKP), and Billing table (VBRK).
VBELN = Sales and Distribution Document Number
LFSTK = Delivery status
LFGSK = Overall delivery status for all items
FKSTK = Billing status
FKSAK = Billing status (order-related billing document)
BUCHK = Posting Status of Billing Document
etc
*VBUP is Status Detail table. It could be from Sales Order detail table (VBAP), Delivery Order detail table (LIPS), and Billing detail table (VBRP).
VBELN = Sales and Distribution Document Number
LFSTA = Delivery status
LFGSA = Overall delivery status of the item
FKSTA = Billing status of delivery-related billing documents
FKSAA = Billing status for order-related billing documents
etc
*VBFA is Sales Document Flow. It is a detail table. You can see relation between Sales Order and Delivery Order and Post Good Issue and Sales Invoice OR relation between Delivery Order and Sales Invoice
VBELV = Preceding sales and distribution document
POSNV = Preceding item of an SD document
VBELN = Subsequent sales and distribution document
POSNN = Subsequent item of an SD document
RFMNG = Referenced quantity in base unit of measure
MEINS = Base Unit of Measure
RFWRT = Reference value
WAERS = Statistics currency
Be Careful When you report Sales Invoice Amount from this table. If you need to collect subsequent document (Sales Invoice), because it can fill Sales Invoice Cancellation.
?? Be careful for Delivery order, for RFWRT field never fills value (0).
Table2 Billing
Table VBRK
*VBRK is Sales Invoice table.
VBRK is used for saving Sales Invoice Header data, Credit Memo Header data, etc.
Some fields which i will explain, have special attention for me.
VBELN = Billing Document
FKART = Billing Type
FKTYP = Billing category
VBTYP = SD document category
M = Invoice
N = Invoice Cancellation
O = Credit Memo
P = Debit Memo
S = Credit Memo cancellation
etc
KURRF = Exchange rate for FI postings
WAERK = SD document currency
VKORG = Sales Organization
VTWEG = Distribution Channel
BZIRK = Sales district
KNUMV = Number of the document condition
FKDAT = Billing date for billing index and printout
ZTERM = Terms of payment key
NETWR = Net value in document currency
KUNRG = Payer
KUNAG = Sold-to party
SFAKN = Cancelled billing document number
It is only filled if the document is the document cancel and SFAKN is the document billing reference
FKSTO = Billing document is cancelled.
FKSTO, it explain that the document has been cancelled.
so, if you want to know which document has cancelled the billing,
you have to search VBRK table again which field is VBRK.SFAKN = VBRK.VBELN
*VBRP is sales invoice detail table.
VBELN = Billing Document
POSNR = Billing item
FKIMG = Actual Invoiced Quantity
VRKME = Sales unit
MEINS = Base Unit of Measure
NETWR = Net value of the billing item in document currency
VGBEL = Document number of the reference document (Related with table LIPS)
VGPOS = Item number of the reference item (Related with table LIPS)
AUBEL = Sales Document
AUPOS = Sales Document Item
MATNR = Material Number
SPART = Division
VKGRP = Sales group
VKBUR = Sales office
*VBRK is Sales Invoice table.
VBRK is used for saving Sales Invoice Header data, Credit Memo Header data, etc.
Some fields which i will explain, have special attention for me.
VBELN = Billing Document
FKART = Billing Type
FKTYP = Billing category
VBTYP = SD document category
M = Invoice
N = Invoice Cancellation
O = Credit Memo
P = Debit Memo
S = Credit Memo cancellation
etc
KURRF = Exchange rate for FI postings
WAERK = SD document currency
VKORG = Sales Organization
VTWEG = Distribution Channel
BZIRK = Sales district
KNUMV = Number of the document condition
FKDAT = Billing date for billing index and printout
ZTERM = Terms of payment key
NETWR = Net value in document currency
KUNRG = Payer
KUNAG = Sold-to party
SFAKN = Cancelled billing document number
It is only filled if the document is the document cancel and SFAKN is the document billing reference
FKSTO = Billing document is cancelled.
FKSTO, it explain that the document has been cancelled.
so, if you want to know which document has cancelled the billing,
you have to search VBRK table again which field is VBRK.SFAKN = VBRK.VBELN
*VBRP is sales invoice detail table.
VBELN = Billing Document
POSNR = Billing item
FKIMG = Actual Invoiced Quantity
VRKME = Sales unit
MEINS = Base Unit of Measure
NETWR = Net value of the billing item in document currency
VGBEL = Document number of the reference document (Related with table LIPS)
VGPOS = Item number of the reference item (Related with table LIPS)
AUBEL = Sales Document
AUPOS = Sales Document Item
MATNR = Material Number
SPART = Division
VKGRP = Sales group
VKBUR = Sales office
Table KNC1
It is a good table because fills summary AR Customer per month/year.
I have to thank to Mr. Popo (one of the KOMTEK member).
So, if you want to create a Summary AR customer report using this table.
I have to thank to Mr. Popo (one of the KOMTEK member).
So, if you want to create a Summary AR customer report using this table.
Table2 SalesOrder
Table VBAK
* VBAK is Sales Order Header table. But I don't explain for relation with other table,
you can download sap-table.exe in www.sap-interface.com or you can search it in google.
VBAK is used for saving Sales Order Header data, Sales Inquiry Header, Sales Quotation Header and Return Order Header data.
Some fields which i will explain, have special attention for me.
Vbeln = Sales Document
Audat = document date
Vbtyp = SD Document Category
A = Inquiry
B = Quotation
C = Order
I = Order w/o charge
H = Returns
etc
Auart = Sales Document type
This is for specific document. It depends on customizing from the functional.
Netwr = Net Value of the Sales Order in Document Currency
This value don't include Tax Amount. So, if you want to get Pricing condition, you can search on KONV table (Please read my blog about table KONV& KONP)
Waerk = SD document currency
Vkorg = Sales Organization
Vtweg = Distribution Channel
SPart = Division
Vkgrp = Sales group
Vkbur = Sales office
BSTnk = Customer purchase order number
Kunnr = Sold to Party (Customer)
VGBel = Document number of the reference document. Reference Document from Quotation
KNUMV = Number of the document condition (Relation for table KONV)
* VBAP is Sales Order Detail table.It is nothing special for me, so i just copy paste fields which are almost used every creating report
VBELN = Sales Document (Related with VBAK.VBELN)
POSNR = Sales Document Item
MATNR = Material Number
KWMENG = Cumulative order quantity in sales units
VRKME = Sales unit
MEINS = Base Unit of Measure
SPART = Division
NETWR = Net value of the order item in document currency
WAERK = SD document currency
Plant = Plant (Own or External)
LGORT = Storage Location
VSTEL = Shipping Point/Receiving Point
KNUMH = Number of condition record from batch determination (Relation for table KONP)
*VBPA is Partner table of Sales Document. You can get Sales Employee field from this table.
VBELN = Sales and Distribution Document Number (Related with VBAK.VBELN)
POSNR = Item number of the SD document
PARVW = Partner function
AG = Sold to party
RE = Bill to party
RG = Payer
WE = Ship to Party
VE = Sales Employee
KUNNR = Customer Number 1
PERNR = Personnel Number
*VBKD is Business data table of Sales Document. You can get Exchange Rate amount and Sales District fields.
VBELN = Sales and Distribution Document Number (Related with VBAK.VBELN)
POSNR = Item number of the SD document (Related with VBAP.POSNR)
Be Careful..untuk exchange rate amount sebenarnya berdasarkan item number,
jika customizing bisa menyatakan satu document hanya berlaku satu currency maka POSNR berisi '000000'
BZIRK = Sales district
KURSK = Exchange Rate for Price Determination
ZTERM = Terms of payment key
* VBAK is Sales Order Header table. But I don't explain for relation with other table,
you can download sap-table.exe in www.sap-interface.com or you can search it in google.
VBAK is used for saving Sales Order Header data, Sales Inquiry Header, Sales Quotation Header and Return Order Header data.
Some fields which i will explain, have special attention for me.
Vbeln = Sales Document
Audat = document date
Vbtyp = SD Document Category
A = Inquiry
B = Quotation
C = Order
I = Order w/o charge
H = Returns
etc
Auart = Sales Document type
This is for specific document. It depends on customizing from the functional.
Netwr = Net Value of the Sales Order in Document Currency
This value don't include Tax Amount. So, if you want to get Pricing condition, you can search on KONV table (Please read my blog about table KONV& KONP)
Waerk = SD document currency
Vkorg = Sales Organization
Vtweg = Distribution Channel
SPart = Division
Vkgrp = Sales group
Vkbur = Sales office
BSTnk = Customer purchase order number
Kunnr = Sold to Party (Customer)
VGBel = Document number of the reference document. Reference Document from Quotation
KNUMV = Number of the document condition (Relation for table KONV)
* VBAP is Sales Order Detail table.It is nothing special for me, so i just copy paste fields which are almost used every creating report
VBELN = Sales Document (Related with VBAK.VBELN)
POSNR = Sales Document Item
MATNR = Material Number
KWMENG = Cumulative order quantity in sales units
VRKME = Sales unit
MEINS = Base Unit of Measure
SPART = Division
NETWR = Net value of the order item in document currency
WAERK = SD document currency
Plant = Plant (Own or External)
LGORT = Storage Location
VSTEL = Shipping Point/Receiving Point
KNUMH = Number of condition record from batch determination (Relation for table KONP)
*VBPA is Partner table of Sales Document. You can get Sales Employee field from this table.
VBELN = Sales and Distribution Document Number (Related with VBAK.VBELN)
POSNR = Item number of the SD document
PARVW = Partner function
AG = Sold to party
RE = Bill to party
RG = Payer
WE = Ship to Party
VE = Sales Employee
KUNNR = Customer Number 1
PERNR = Personnel Number
*VBKD is Business data table of Sales Document. You can get Exchange Rate amount and Sales District fields.
VBELN = Sales and Distribution Document Number (Related with VBAK.VBELN)
POSNR = Item number of the SD document (Related with VBAP.POSNR)
Be Careful..untuk exchange rate amount sebenarnya berdasarkan item number,
jika customizing bisa menyatakan satu document hanya berlaku satu currency maka POSNR berisi '000000'
BZIRK = Sales district
KURSK = Exchange Rate for Price Determination
ZTERM = Terms of payment key
March 01, 2009
Dialog Transaction Execution dari kutipan BC402

- First, the LOAD-OF-PROGRAM event is triggered. Once this event block has been executed, the ABAP processor passes control to the screen processor. For an example of how to use this new event, refer to the example in the Function Groups and Function Modules unit.
- The screen processor processes the intial screen specified in the transaction definition. The initial screen can be a selection screen (regardless of the program type). The PROCESS BEFORE OUTPUT event is triggered and control passes to the ABAP processor, which processes the first PBO module.
- The ABAP processor executes the processing block and returns control to the screen processor. Once all PBO modules have been processed, the contents of any ABAP fields with identically-named corresponding fields on the screen are transported to the relevant screen fields. Then the screen is displayed (screen contents, active title, active status).
- Once the user has chosen a dialog function (such as ENTER), the contents of the screen fields are transported back to the corresponding identically-named fields in the ABAP program, and the processing blocks that belong to the PROCESS AFTER INPUT event are processed. The system then continues by processing the next screen
However, you can also use the statement LEAVE TO LIST-PROCESSING. This makes all of the list processing events available to you.
Table KONV & KONP
Table KONV dan KONP merupakan table condition price pada SD (Sales & Distribution).
Keduanya ada hubungan dengan Sales Order dan Sales Invoice.
u/ table KONV punya relation table VBAK (Sales Order) dengan field KONV.KNUMV= VBAK.KNUMV
dan juga punya relation dengan table VBRK (Sales Invoice) yaitu atau KONV.KNUMV= VBRK.KNUMV
Tapi yg jadi catatan khusus adalah isi table KONV bukan berisi satu baris aja tapi tergantung dari detail table VBAP atau detail table VBRP. Misal 1 Sales Order (VBAK) ada 3 Order Detail (VBAP) maka di table KONV akan memiliki 3 detail juga(+Detail Kondisi). Oleh karena itu salah dua primary key KONV adalah KNUMV dan KPOSN.
Keduanya ada hubungan dengan Sales Order dan Sales Invoice.
u/ table KONV punya relation table VBAK (Sales Order) dengan field KONV.KNUMV= VBAK.KNUMV
dan juga punya relation dengan table VBRK (Sales Invoice) yaitu atau KONV.KNUMV= VBRK.KNUMV
Tapi yg jadi catatan khusus adalah isi table KONV bukan berisi satu baris aja tapi tergantung dari detail table VBAP atau detail table VBRP. Misal 1 Sales Order (VBAK) ada 3 Order Detail (VBAP) maka di table KONV akan memiliki 3 detail juga(+Detail Kondisi). Oleh karena itu salah dua primary key KONV adalah KNUMV dan KPOSN.
Subscribe to:
Posts (Atom)