VA03 Partners tables
Hello everyone
I was wondering if anyone could help me solve another SAP riddle.
In transaction VA03 you enter an order number and press enter.
There's a field "Ship-to party" with a customer-number next to it. And the name of the customer, address, etc. next to that number.
Normally, I check the VBPA table for partner-functions on PARVW = "WE" to get the asociated Ship-To customers.
However, when I look in the VBPA table for this particular order, I find the same number as in VA03, but when I check the KNA1 table with that customer number, I find another customer name than the one that is printed in VA03.
It seems SAP merges 2 tables to get these customer names, and yields the other table (other than KNA1) to print the name in VA03.
Can anyone point me in a general direction where I could find this other table?
Or possibly just give me the name of the other table?
Thanks in advance
Tim.
Tim,
When a user creates or changes an sales order, he or she can override the address details of a partner. By double clicking on one of the partners, the address details can be changed for that order only. These changes are not saved to the customer master data.
Instead a new address is created for the customer. In table VBPA you can see the new address number for that order+customer. This number typically starts with 90000...
With the standard function modules for address management you can retieve the data for this locally changed customer.
Regards,
Arjan Aalbers
Similar Messages
-
VA03 - Base tables & Logic for structures
Hi,
In a data archiving project, I have to identify the tables & fields which are to be archived based on customers reports. When we try to find out tables & fields for the reports, there are lot of fields with structures. How to find out the base tables for these structures? In VA03 report, I need to find out the base tables & logic for the below structure-fields
CCDATA-CCINS
CCDATA-CCNUM
RV45A-DWERK
RV45A-BTGEW
RV45A-GEWEI
RV45A-VOLUM
RV45A-VOLEH
CCDATA-DATBI
VBAPD-EPMEH
RV45A-PRGBZ
KOMV-KSCHL
KOMV-KBETR
RV45A-KOEIN
RV45A-KFREL
RV45A-ABGESP
RV45A-DWERK
VBAPD-EPMEH
RV45A-PRGBZ
RV45A-KFREL
RV45A-KWMENG
RV45A-PRGBZ
RV45A-ETDAT
RV45A-EPMEH
RV45A-KFREL
RV45A-PSTYP
RV45A-KNTTP
VBEPD-RSETD
VBAPD-EPMEH
RV45A-GRETD
Could you please tell me the base tables & the logic for these fields.
Thanks,
VenkatHi
Venkat Rao
Just check the field in the tables given by Jhon and also check the some of the tables below
VEPVG - Open Sals Order QTY.
VBUK - Open Sales Order
Use the transaction SE16 / SE11 and try to serach the field and find out base tables and logic.
RV45A-DWERK --- Plant u will find this in VBAP
RV45A-PSTYP --- Document type and so on.....
Thx. -
Create return with reference to original sales order - partners
Hi all
I'm using the function SD_SALESDOCUMENT_CREATE to create a return order with reference to the original sales order. (Partially return works fine too).
All the informationen from the original sales order (including partners). I'm reading with the function BAPISORDER_GETDETAILEDLIST. This works fine. I get all the correct datas from the sales order.
The problem: when I create a return order with the SD_SALESDOCUMENT_CREATE it takes the partners from the standard defined partners table and not from the original sales order.
For example, standard defined partners for Customer: 10101010:
200010 Dealer 1
300101 Subdealer 2
501001 Salesman
When I have in the sales order only this partner:
200010 Dealer 1
it takes into the Return still all the 3 partners. Also then, when I explicity delete these other partners in the partnertable (return_partners) before I leave to the Function: BAPI_CUSTOMERRETURN_CREATE.
Can anyone help me?
Thank you so much!!
PetraHi Petra
Can you check how itz behaving when you create using
VA01 with reference document for the same case.
Kind Regards
Eswar -
Copy partners in agreement contract
Hi !
I am trying to copy partners from a purchasing organization to another one in agreement (ME32K).
I manage to do it quite easily using transaction, but I can't find any FM that works ...
I have tried BAPI_CONTRACT_CHANGE, but I cannot find purchase organization level in the partners table.
I have tried MM_PDATE_PARTNERS & MM_COPY_PARTNERS. Those FM do not send back any error, but nothing is done in the DB and my agreement is not modified.
Any help would be welcome !
Tanks,
YannAs I got no answer, I finally decided to do a call transaction on ME32K.
-
hai
This is Raghu can any body send SD Flow in functional how it will works
we can understood the flow of datasources....
with regards
[email protected]
nullHi,
The DataFlow Of MM:
1) Purchasing Requsition -> sent by inventory dept to purcharsing dept
2) Request for Quotation(RFQ)-> Purchasing Dept shall ask the vendors to give the quotation for the requested materials by inventory.
3) Quotation -> Quotation is sent by vendors to the company
4) Purchase order-> Based on all paramers of a quotation sent by vendors. Vendors are selected from whom the material has to be obtained. The company gives purchase order to the vendor.
5) Good's receipt -> vendors sends the goods to the company with goods receipt
6) Invoice verification -> this done based on good's receipt. this means that the ordered goods have reached or not.
7) Payment -> payment is done based on invoice verification. this is (FI/CO)
SD FLOW
SD Flow Cycle:
INQUIRY ( VA11)
|
QUOTATION (VA21)
|
PURCHASE ORDER (ME21)
|
ORDER CONFIRMATION (VA01)
|
PICKING LIST (VL36)
|
PACKING LIST - (VL02, VL01)
|
SHIPPING (VT01)
|
INVOICE (VF21, VF01)
MM Cycle:
Purchase Requisition-> STaff in an orgn places Pur requisition for want of some goods/products - ME51
Request for Quotation(RFQ)-> The Purchase dept in the orgn calls/requests for the quotation for the products against which PR was raised. - ME41
Vendor Evaluation->After receving the RFQ's, after comparison a Vendor is finalised based on the terms and conditions.
Purchase Order(PO)-> Pur order was issued to that vendor asking him to supply the goods/products -ME21N
Goods Receipt Note(GRN)->Vendor supplies the material/Products to the orgn-
MB01
Goods Issue (GI) -> People receives their respective itesm for which they have placed the Requisitions
Invoice Verification-> ALong with the Material Vendor submits a Invoice for which the Company Pays the amount - .MIRO
Data to FI -> data will be posted to FI as per the vendor invoices
Enquiry - Customer enquires about the Products services that were sold by a company - VA11
Quotation - Company Gives a Quotation for the products and Services to a Customer
Sales Order - Customer gives a Purchase order to the company agaionst which a Sales order will be raised to Customer in SAP.
VBAK: Sales Document(Header Data) (VBELN)
VBAP: Sales Document(Item Data) (VBELN,POSNR,MATNR,ARKTX,CHARG)
Enquiry, Quotation, Sales Order are differentiated based on Doc.
Type(VBTYP field) in VBAK,VBAP Tables( for Enquiry VBTYP = A,
for Quotation 'B' & for Order it is 'C'.)
Delivery(Picking, Packing, Post Goods Issue and Shipment)->
Company sends the material after picking it from Godown and Packing it in a Handling Unit(box) and Issues the goods
LIKP: Delivery Table (Header Data)(VBELN,LFART,KUNNR,WADAT,INCO1)
LIPS: Delivery Table (Item Data)(VBELN,POSNR,WERKS,LGORT,MATNR,VGBEL)
(LIPS-VGBEL = VBAK-VBELN, LIPS-VGPOS = VBAP-POSNR)
Billing - Also company bills to the customer for those deliveries
And in FI against this billing Accounting doc is created.
VBRK: Billing Table(Header Data)(VBELN,FKART,BELNR)
VBRP: Billing Table(Item Data)(VBELN,POSNR,FKIMG,NETWR,VGBEL,VGPOS)
(VBRP-AUBEL = VBAK-VBELN, VBRP-VGBEL = LIKP-VBELN)
Apart from these tables there are lot of other tables which starts with
V, but we use the following tables frequently.
MM Process flow:
The typical procurement cycle for a service or material consists of the following phases:
1. Determination of Requirements
Materials requirements are identified either in the user departments or via materials planning and control. (This can cover both MRP proper and the demand-based approach to inventory control. The regular checking of stock levels of materials defined by master records, use of the order-point method, and forecasting on the basis of past usage are important aspects of the latter.) You can enter purchase requisitions yourself, or they can be generated automatically by the materials planning and control system.
2. Source Determination
The Purchasing component helps you identify potential sources of supply based on past orders and existing longer-term purchase agreements. This speeds the process of creating requests for quotation (RFQs), which can be sent to vendors electronically via SAP EDI, if desired.
3. Vendor Selection and Comparison of Quotations
The system is capable of simulating pricing scenarios, allowing you to compare a number of different quotations. Rejection letters can be sent automatically.
4. Purchase Order Processing
The Purchasing system adopts information from the requisition and the quotation to help you create a purchase order. As with purchase requisitions, you can generate Pos yourself or have the system generate them automatically. Vendor scheduling agreements and contracts (in the SAP System, types of longer-term purchase agreement) are also supported.
5. Purchase Order Follow-Up
The system checks the reminder periods you have specified and - if necessary - automatically prints reminders or expediters at the predefined intervals. It also provides you with an up-to-date status of all purchase requisitions, quotations, and purchase orders.
6. Goods Receiving and Inventory Management
Goods Receiving personnel can confirm the receipt of goods simply by entering the Po number. By specifying permissible tolerances, buyers can limit over- and underdeliveries of ordered goods.
7. Invoice Verification
The system supports the checking and matching of invoices. The accounts payable clerk is notified of quantity and price variances because the system has access to PO and goods receipt data. This speeds the process of auditing and clearing invoices for payment.
Order to cash flow in sd
It is basically an entire sales cycle.
A customer orders some items from your company by creating a sales order(Tcodes: VA01, VA02, VA03, Tables:VBAK, VBAP etc).
Your company decides to deliver the items ordered by the customer. This is recorded by creating a outbound delivery document (TCodes:VL01N, VL02N, VL03N, Tables: LIKP, LIPS etc).
Once the items are available for sending to the customer, you post goods issue which reduces your inventory and puts the delivery in transit. This will create a material document. You will post goods issue using VL02N but the material document created will be stored in tables MKPF, MSEG.
You will then create shipment document to actually ship the items.(Tcodes: VT01N, VT02N, VT03N, Tables: VTTK, VTTP etc).
You finally create a sales billing document. (TCodes: VF01, VF02, VF03, Tables: VBRK, VBRP etc). This will have a corresponding accounting document created that will be in BKPF, BSEG tables.
When customer pays to your invoice, it will directly hit your AR account in FI.
You will have to remember that these are not a required sequence. Some times, you may configure your system to create a SD invoice as soon as you create a sales order or you may not create a shipping document at all. This is where your functional consultant will come into picture to study your order-to-cash process and design/configure the system to do so.
Flow :
Sales Order Creation : VA01,VA02,VA03
Tables : VBAK,VBAP,VBEP,VBUK,VBUP
Delivery : two types
1 .outbound delivery - VL01n,VL02n
2. inbound delivery - VL31n,VL32n
Tables : LIKP,LIPS
Transfer order : LT01,LT02,LT03
Tables : LTAK,LTAP
Post Goods issue : VL01n,VL02N
if you want to reverse good issue : VL09
Creation Billing : VF01,VF02,VF03
Tables : VBRK,VBRP
Cancel Billing : VF11
Once you done billing and it creates Account document number
Main Tables SD :
VBFA - Sales Document flow table
VBPA - Sales Partners table
Thanks,
Sankar M -
Hi
i'm ABAP consultant.i want to know the flow of SD and integration of SD with other modules.help me to know about SD.Hi Michael,
INTERGRATION BETWEEN SD AND MM AND SD & FICO
The link between SD and MM: -
1. When you create sales order in SD, all the details of the items are copied from Material master of MM.
2. MRP and availability check related data is also taken from MM although you control this data in SD also.
3. While you create inbound/outbound delivery with reference to a sales order, the shipping point determination takes place with the help of the loading group, plant data, shipping conditions etc. This also refers to Material Master.
4. The material which you are entering in a sales order must be extended to the sales area of your sales order/customer otherwise you cannot transact with this material.
There are many such links between SD and MM.
SD AND MM INTGRATON
1a. Looking at MM and SD interaction first, take the scenario of a third party order process. This process uses a purchase order (which is sent to your vendor). Also invoice verification is used further along the process to check that the invoice you send to your customer is the same material and quantity as that which the vendor sends to you (but obviously shipped
directly to your customer).
1b. Billing is an SD function. But SAP needs to know, when processing a customer's payment, to which GL account the payment has to be processed. For instance payment of a UK based material would be placed in a different GL account to that of a non-UK based material. Furthermore, a UK based customer may have a different GL account to that of an Export customer. This is configured in Account Determination.
2. ABAPers are there to essential do some bespoke development. Your integration, or interaction, with them would be when specifying the tables, fields, input fields, a simple process explanation, data mapping (if doing an interface from one system to another) etc. *-- Shahee
The link between SD and MM :-
1. When you create sales order in SD, all the details of the items are copied from Material master of MM.
2. MRP and availability check related data is also taken from MM although you control this data in SD also.
3. While you create inbound/outbound delivery with reference to a sales order, the shipping point determination takes place with the help of the loading group, plant data, shipping conditions etc. This also refers to Material Master.
4. The material which you are entering in a sales order must be extended to the sales area of your sales order/customer otherwise you cannot transact with this material.
There are many such links between SD and MM
In Pricing we would want to determine the cost of the product
thru VPRS Condition Type. This cost of the material is
picked from the Material Master. How this happens is, if
we would want to determine this cost VPRS in the Sales Order
for Profitability purpose then , all those Item categories
that can appear in a sales order must be activated for
Determine Cost Check box in customizing. Thats one of the SD
MM Integration.
Now the link between SD and FI: -
1. Whenever you create a delivery with reference to a sales order, goods movement takes place in the background. E.g. In case of standard sales order, you create an outbound goods delivery to the customer.
Here movement 601 takes place. This movement is configured in MM. Also, this movement hits some G/L account in FI. Every such movement of good s hits some G/L account.
2. The accounts posting in FI is done with reference to the billing documents (invoice, debit note, credit note etc) created in SD. Thus this is a link between SD and FI
3. Tax determination: In case of a tax determination also, there is a direct link between SD and MM
SD Integration points with other modules
SD module is highly integrated with the other modules in SAP.
Sales Order
Integration Points Module
Availability Check - MM
Credit Check - FI
Costing - CO/ MM
Tax Determination - FI
Transfer of Requirements - PP/ MM
Delivery & Goods Issue
Integration Points Module
Availability Check - MM
Credit Check - FI
Reduces stock - MM
Reduces Inventory $ - FI/ CO
Requirement Eliminated - PP/ MM
Billing -
Integration Points Module
Debit A/R - FI/ CO
Credit Revenue - FI/ CO
Updates G/ L - FI/ CO
(Tax, discounts, surcharges, etc.)
Milestone Billing - PS
Return Delivery & Credit Memo -
Integration Points Module
Increases Inventory - MM
Updates G/ L - FI
Credit Memo - FI
Adjustment to A/R - FI
Reduces Revenue - FI
SD Transaction Code Flow:
Inquiry / Document type IN
Tcode for creation VA11, VA12, VA13. Tables VBAK, VBAP
Quotation / QT
Tcode for creation VA21, VA22, VA23. Tables VBAK, VBAP
Purchase Order PO
Tcode for creation ME21, ME22, and ME23. Tables EKKO, EKPO.
Sales Order OR
Tcode for creation VA01, VA02, VA03. Tables VBAK, VBAP
Delivery LF
Tcode for creation VL01, VL02, and VL03. Tables LIKP, LIPS
Billing MN
Tcode for creation VF01, VF02, and VF03. Tables VBRK, VBRP
To create a sales order we need purchase order number and customer number. Before that, to create a purchase order we need to have material no, vendor no.
To create vendor tcode is
xk01 (create), xk02 (change), xk03 (display)
Tables are lfa1.
To create customer tcode is xd01, xd02, xd03.
Table is kna1.
SD Module is integrated with various modules during transaction processing ...
Sales Order Integration Points Module
Availability Check MM Credit Check FI Costing CO/ MM Tax Determination FI Transfer of Requirements PP/ MM
Delivery & Goods Issue Integration Points Module
Availability Check MM Credit Check FI Reduces stock MM Reduces Inventory $ FI/ CO Requirement Eliminated PP/ MM
Billing - Integration Points Module
Debit A/R FI/ CO Credit Revenue FI/ CO Updates G/ L FI/ CO (Tax, discounts, surcharges, etc.) Milestone Billing PS
Return Delivery & Credit Memo - Integration Points Module
Increases Inventory MM Updates G/ L
FI Credit Memo FI Adjustment to A/R FI Reduces Revenue FI
check following link also
http://sap-img.com/sap-sd/link-between-sap-sd-mm-and-fi.htm
If you work in SD area, then the most important process where you really need to know MM area is the third-party process. In this case from SD sales order automatically the purchase requisition will be created on MM side. From this purchase requisition on MM side you create the purchase order on MM side. This purchase order updates the sales order on SD side, if you create the confirmation of the purchase order. This process takes place for the pure third-party as well as for individual purchase order process. Later the invoice will be sent from MM to SD (transaction MIRO) and will update the status of the SD order. If you work with this process then you need really know MM transactions quite well, because it is the same SD and MM system.
Another area where you have SD of one system integrated with MM of another system is the EDI process. Here several remarks concerning EDI concept of SD:
EDI concept is intended to realize the sales and distribution process completely automatically with the help of electronically documents. These documents are sent from one customer to another, are processed mostly on the background and give a possibility to realize the sales process extremely efficiently.
If MM-customer would like to purchase the goods then he creates the IDOC of type ORDERS and send it to SD-customer. On the SD-side the IDOC is processed via the function module IDOC_INPUT_ORDERS and creates the sales order. As confirmation the SD-side can send to MM-side the Order-Response IDOC (function IDOC_OUTPUT_ORDERS). The MM-customer can every time send a change to the existing order, then on SD side the ORDCHG IDOC will be processed. It can change the order like in VA02. The creation of the invoice can be made via IDOC of message type INVOIC (function IDOC_OUTPUT_INVOIC).
So, the process can be realized completely automatically between SD and MM partners with the help of IDOCs: ORDERS, ORDCHG, ORDRSP, INVOICE.
Additional processes in SD, where EDI are used in communication with MM are:
1) sending (from MM side) and application (on SD side) of delivery schedules to the scheduling agreement: IDOC of type DELINS. In this case we have practically automatically communication between SD and MM scheduling agreements via IDOCs;
2) creation of credit advice / credit memo in the frames of self-billing: IDOCs of type GSVERF, SBWAP and for external invoice creation SBINV are sent from MM customer to SD customer. So, the output function module belongs to MM area and the inbound function module - to SD area.
Please Reward If Really Helpful,
Thanks and Regards,
Sateesh.Kandula -
Can anyone give me ABAP scenarios?
Can anyone give me ABAP scenarios supporting MM/SD module and also for HR module(ABAP-HR).Thanks in advance.
HI,
The Dataflow Of MM:
1) Purchasing Requisition -> sent by inventory dept to purchasing dept
2) Request for Quotation(RFQ)-> Purchasing Dept shall ask the vendors to give the quotation for the requested materials by inventory.
3) Quotation -> Quotation is sent by vendors to the company
4) Purchase order-> Based on all parameters of a quotation sent by vendors. Vendors are selected from whom the material has to be obtained. The company gives purchase order to the vendor.
5) Good's receipt -> vendors sends the goods to the company with goods receipt
6) Invoice verification -> this receipt. done based on good's this means that the ordered goods have reached or not.
7) Payment -> payment is done based on invoice verification. this is (FI/CO)
SD FLOW
SD Flow Cycle:
INQUIRY ( VA11)
QUOTATION (VA21)
PURCHASE ORDER (ME21)
ORDER CONFIRMATION (VA01)
PICKING LIST (VL36)
PACKING LIST - (VL02, VL01)
SHIPPING (VT01)
INVOICE (VF21, VF01)
MM Cycle:
Purchase Requisition-> Staff in an orgn places Pur requisition for want of some goods/products - ME51
Request for Quotation (RFQ)-> The Purchase dept in the organ calls/requests for the quotation for the products against which PR was raised. - ME41
Vendor Evaluation->After receiving the RFQ's, after comparison a Vendor is finalized based on the terms and conditions.
Purchase Order (PO) -> Pur order was issued to that vendor asking him to supply the goods/products -ME21N
Goods Receipt Note (GRN) ->Vendor supplies the material/Products to the orgn-
MB01
Goods Issue (GI) -> People receives their respective items for which they have placed the Requisitions
Invoice Verification-> Along with the Material Vendor submits a Invoice for which the Company Pays the amount - .MIRO
Data to FI -> data will be posted to FI as per the vendor invoices
Enquiry - Customer enquires about the Products services that were sold by a company - VA11
Quotation - Company Gives a Quotation for the products and Services to a Customer
Sales Order - Customer gives a Purchase order to the company against which a Sales order will be raised to Customer in SAP.
VBAK: Sales Document(Header Data) (VBELN)
VBAP: Sales Document(Item Data) (VBELN,POSNR,MATNR,ARKTX,CHARG)
Enquiry, Quotation, Sales Order are differentiated based on Doc.
Type(VBTYP field) in VBAK,VBAP Tables( for Enquiry VBTYP = A,
for Quotation 'B' & for Order it is 'C'.)
Delivery(Picking, Packing, Post Goods Issue and Shipment)->
Company sends the material after picking it from Godown and Packing it in a Handling Unit(box) and Issues the goods
LIKP: Delivery Table (Header Data)(VBELN,LFART,KUNNR,WADAT,INCO1)
LIPS: Delivery Table (Item Data)(VBELN,POSNR,WERKS,LGORT,MATNR,VGBEL)
(LIPS-VGBEL = VBAK-VBELN, LIPS-VGPOS = VBAP-POSNR)
Billing - Also company bills to the customer for those deliveries
And in FI against this billing Accounting doc is created.
VBRK: Billing Table(Header Data)(VBELN,FKART,BELNR)
VBRP: Billing Table(Item Data)(VBELN,POSNR,FKIMG,NETWR,VGBEL,VGPOS)
(VBRP-AUBEL = VBAK-VBELN, VBRP-VGBEL = LIKP-VBELN)
Apart from these tables there are lot of other tables which starts with
V, but we use the following tables frequently.
MM Process flow:
The typical procurement cycle for a service or material consists of the following phases:
1. Determination of Requirements
Materials requirements are identified either in the user departments or via materials planning and control. (This can cover both MRP proper and the demand-based approach to inventory control. The regular checking of stock levels of materials defined by master records, use of the order-point method, and forecasting on the basis of past usage are important aspects of the latter.) You can enter purchase requisitions yourself, or they can be generated automatically by the materials planning and control system.
2. Source Determination
the Purchasing component helps you identify potential sources of supply based on past orders and existing longer-term purchase agreements. This speeds the process of creating requests for quotation (RFQs), which can be sent to vendors electronically via SAP EDI, if desired.
3. Vendor Selection and Comparison of Quotations
The system is capable of simulating pricing scenarios, allowing you to compare a number of different quotations. Rejection letters can be sent automatically.
4. Purchase Order Processing
the Purchasing system adopts information from the requisition and the quotation to help you create a purchase order. As with purchase requisitions, you can generate Pos yourself or have the system generate them automatically. Vendor scheduling agreements and contracts (in the SAP System, types of longer-term purchase agreement) are also supported.
5. Purchase Order Follow-Up
the system checks the reminder periods you have specified and - if necessary - automatically prints reminders or expediters at the predefined intervals. It also provides you with an up-to-date status of all purchase requisitions, quotations, and purchase orders.
6. Goods receiving and Inventory Management
Goods Receiving personnel can confirm the receipt of goods simply by entering the Po number. By specifying permissible tolerances, buyers can limit over- and under deliveries of ordered goods.
7. Invoice Verification
The system supports the checking and matching of invoices. The accounts payable clerk is notified of quantity and price variances because the system has access to PO and goods receipt data. This speeds the process of auditing and clearing invoices for payment.
Order to cash flow in sd
It is basically an entire sales cycle.
A customer orders some items from your company by creating a sales order (Tcodes: VA01, VA02, VA03, Tables:VBAK, VBAP etc).
Your company decides to deliver the items ordered by the customer. This is recorded by creating an outbound delivery document (TCodes:VL01N, VL02N, VL03N, Tables: LIKP, LIPS etc).
Once the items are available for sending to the customer, you post goods issue which reduces your inventory and puts the delivery in transit. This will create a material document. You will post goods issue using VL02N but the material document created will be stored in tables MKPF, MSEG.
You will then create shipment document to actually ship the items.(Tcodes: VT01N, VT02N, VT03N, Tables: VTTK, VTTP etc).
You finally create a sales billing document. (TCodes: VF01, VF02, VF03, Tables: VBRK, VBRP etc). This will have a corresponding accounting document created that will be in BKPF, BSEG tables.
When customer pays to your invoice, it will directly hit your AR account in FI.
You will have to remember that these are not a required sequence. Some times, you may configure your system to create a SD invoice as soon as you create a sales order or you may not create a shipping document at all. This is where your functional consultant will come into picture to study your order-to-cash process and design/configure the system to do so.
Flow :
Sales Order Creation : VA01,VA02,VA03
Tables : VBAK,VBAP,VBEP,VBUK,VBUP
Delivery : two types
1 .outbound delivery - VL01n,VL02n
2. inbound delivery - VL31n,VL32n
Tables : LIKP,LIPS
Transfer order : LT01,LT02,LT03
Tables : LTAK,LTAP
Post Goods issue : VL01n,VL02N
if you want to reverse good issue : VL09
Creation Billing : VF01,VF02,VF03
Tables : VBRK,VBRP
Cancel Billing : VF11
Once you done billing and it creates Account document number
Main Tables SD :
VBFA - Sales Document flow table
VBPA - Sales Partners table
For HR check this link
http://www.audit-net.com/docs/SAP_HR_Audit_Program.doc -
Help to read TKPROF file in correct way
Hi,
I need help to understand what is going wrong.
I have one query executed with different bind variables values.
Case 1: Execution time is about 7.5 hours when :v6=:v3=:v4 (these are date bind variables values)
Case 2: Execution time is about 2 minuteswhen :v6 differs from :v3 and :v4, but :v3=:v4 (these are date bind variables values)
You can see TKPROF files below
Case1
SELECT EK.SECIK AS EK_SECIK,S.SECIK AS S_SECIK,EK.EQKEY1 AS EK_EQKEY1,EK.FROMDATE AS EK_FROMDATE,S.SECSHORT AS S_SECSHORT,S.SECNAME AS S_SECNAME,C.CDY AS C_CDY,C.CSTD AS C_CSTD,P.PAR AS P_PAR,P.PARIK AS P_PARIK,PH.ACCOUNTING_FRAMEWORK AS PH_ACC_FW,NVL(PH.BAL_NOMINAL_NUMBER,0) AS PH_BAL_NOM_NUM,PH.FROM_DATE AS PH_FROM_DATE,PH.POR AS PH_POR,PH.SEC_SHORT_NAME AS PH_SEC_SHORT_NAME,PH.TO_DATE AS PH_TO_DATE,PH.CUSTODY_SHORT_NAME AS PH_CUST_SHORT_NAME,T.TC_CSTD AS T_CSTD,SUM(T.TH_BAL_NOM_NUM) AS T_BAL_NOM_NUM,T.TH_SEC_SHORT_NAME AS T_SEC_SHORT_NAME,PH.POR_REF AS PH_POR_REF,PORT.PORIK AS PORT_PORIK,PORT.PORGRPIK AS PORT_PORGRPIK,PG.PORGRPIK AS PG_PORGRPIK,PG.PORGRPTYPEIK AS PG_PORGRPTYPEIK,PGT.PORGRPTYPEIK AS PGT_PORGRPTYPEIK FROM SCDAT.CUSTODIES C,SCDAT.EQUITYKEYS EK,SCDAT.PARTNERS P,SCDAT.PORTGROUPS PG,SCDAT.PORTGROUPTYPES PGT,(
SELECT HOLKEYS.PORIK As POR_REF,
ACCDEF.ACC As ACCOUNTING_FRAMEWORK,
NVL(HOLDINGS.BALNOMVAL,0) As BAL_NOMINAL_NUMBER,
CUSTODIES.CDY As CUSTODY_SHORT_NAME,
DECODE(HOLDINGS.FINBOOKED,0,'No',1,'Yes',' ') As FINALLY_BOOKED,
HOLDINGS.FROMDATE As FROM_DATE,
PORTFOLIOS.POR As POR,
SECURITIES.SECSHORT As SEC_SHORT_NAME,
HOLDINGS.TODATE As TO_DATE,
HOLDINGS.FINBOOKED As X_FINALLY_BOOKED
FROM HOLDINGS,HOLKEYS,ACCDEF,CUSTODIES,PORTFOLIOS,SECURITIES WHERE HOLDINGS.HOLKEYIK = HOLKEYS.HOLKEYIK AND HOLDINGS.ACCIK = ACCDEF.ACCIK AND HOLKEYS.CDYIK = CUSTODIES.CDYIK AND HOLKEYS.PORIK = PORTFOLIOS.PORIK AND HOLKEYS.SECIK = SECURITIES.SECIK) PH,SCDAT.PORTFOLIOS PORT,SCDAT.SECURITIES S,(SELECT TC.CDY AS TC_CDY,TC.CSTD AS TC_CSTD,SUM(NVL(TH.BAL_NOMINAL_NUMBER,0)) AS TH_BAL_NOM_NUM,TH.FROM_DATE AS TH_FROM_DATE,TH.TO_DATE AS TH_TO_DATE,TH.SEC_SHORT_NAME AS TH_SEC_SHORT_NAME,TH.CUSTODY_SHORT_NAME AS TH_CUST_SHORT_NAME,TP.PAR AS TP_PAR,TP.PARIK AS TP_PARIK FROM SCDAT.CUSTODIES TC,(
SELECT ACCDEF.ACC As ACCOUNTING_FRAMEWORK,
NVL(HOLDINGS.BALNOMVAL,0) As BAL_NOMINAL_NUMBER,
CUSTODIES.CDY As CUSTODY_SHORT_NAME,
DECODE(HOLDINGS.FINBOOKED,0,'No',1,'Yes',' ') As FINALLY_BOOKED,
HOLDINGS.FROMDATE As FROM_DATE,
SECURITIES.SECSHORT As SEC_SHORT_NAME,
HOLDINGS.TODATE As TO_DATE,
HOLDINGS.FINBOOKED As X_FINALLY_BOOKED
FROM HOLDINGS,HOLKEYS,ACCDEF,CUSTODIES,SECURITIES WHERE HOLDINGS.ACCIK = ACCDEF.ACCIK AND HOLDINGS.HOLKEYIK = HOLKEYS.HOLKEYIK AND HOLKEYS.CDYIK = CUSTODIES.CDYIK AND HOLKEYS.SECIK = SECURITIES.SECIK) TH,SCDAT.PARTNERS TP WHERE TH.CUSTODY_SHORT_NAME = TC.CDY AND TC.CSTD = TP.PARIK AND TH.ACCOUNTING_FRAMEWORK = :v1 AND NOT (NVL(TH.BAL_NOMINAL_NUMBER,0) = :v2 ) AND TH.FROM_DATE <= :v3 AND TH.TO_DATE >= :v4 AND TH.FINALLY_BOOKED = :v5 GROUP BY TC.CDY,TC.CSTD,TH.FROM_DATE,TH.TO_DATE,TH.SEC_SHORT_NAME,TH.CUSTODY_SHORT_NAME,TP.PAR,TP.PARIK) T WHERE EK.SECIK = S.SECIK AND PORT.PORGRPIK = PG.PORGRPIK AND PG.PORGRPTYPEIK = PGT.PORGRPTYPEIK AND S.SECSHORT = PH.SEC_SHORT_NAME AND PH.SEC_SHORT_NAME = T.TH_SEC_SHORT_NAME AND PH.POR_REF = PORT.PORIK AND PH.CUSTODY_SHORT_NAME = C.CDY AND EK.FROMDATE = :v6 AND NOT (EK.EQKEY1 = :v7 ) AND P.PAR = :v8 AND NOT (PGT.PORGRPTYPE IN (:v9 ,:v10 )) AND PH.ACCOUNTING_FRAMEWORK = :v11 AND NOT (NVL(PH.BAL_NOMINAL_NUMBER,0) = :v12 ) AND PH.FINALLY_BOOKED = :v13 AND EK.FROMDATE >= PH.FROM_DATE AND EK.FROMDATE <= PH.TO_DATE AND C.CSTD = P.PARIK AND C.CSTD = T.TC_CSTD GROUP BY EK.SECIK,S.SECIK,EK.EQKEY1,EK.FROMDATE,S.SECSHORT,S.SECNAME,C.CDY,C.CSTD,P.PAR,P.PARIK,PH.ACCOUNTING_FRAMEWORK,NVL(PH.BAL_NOMINAL_NUMBER,0),PH.FROM_DATE,PH.POR,PH.SEC_SHORT_NAME,PH.TO_DATE,PH.CUSTODY_SHORT_NAME,T.TC_CSTD,T.TH_SEC_SHORT_NAME,PH.POR_REF,PORT.PORIK,PORT.PORGRPIK,PG.PORGRPIK,PG.PORGRPTYPEIK,PGT.PORGRPTYPEIK
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 2.31 2.31 0 0 0 0
Fetch 1 27398.48 27473.33 11124 250891597 0 0
total 3 27400.79 27475.65 11124 250891597 0 0
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: 171 (SCDAT)
Number of plan statistics captured: 1
Rows (1st) Rows (avg) Rows (max) Row Source Operation
0 0 0 HASH GROUP BY (cr=0 pr=0 pw=0 time=55 us cost=1976 size=251 card=1)
123 123 123 NESTED LOOPS (cr=250890161 pr=11086 pw=0 time=35602462 us)
38622 38622 38622 NESTED LOOPS (cr=250858945 pr=8664 pw=0 time=4221237335 us cost=1975 size=251 card=1)
3945 3945 3945 NESTED LOOPS (cr=250850948 pr=7835 pw=0 time=1967017649 us cost=1937 size=199 card=1)
3833 3833 3833 HASH JOIN (cr=42840 pr=6196 pw=0 time=4910380 us cost=1559 size=1956 card=12)
8667 8667 8667 NESTED LOOPS (cr=42834 pr=6192 pw=0 time=4254867 us)
8667 8667 8667 NESTED LOOPS (cr=34167 pr=6192 pw=0 time=4232686 us cost=1556 size=2156 card=14)
8667 8667 8667 NESTED LOOPS (cr=26520 pr=6192 pw=0 time=4206426 us cost=1542 size=2058 card=14)
8667 8667 8667 NESTED LOOPS (cr=16041 pr=6192 pw=0 time=4161555 us cost=1528 size=1806 card=14)
18060 18060 18060 NESTED LOOPS (cr=16037 pr=6191 pw=0 time=4575478 us cost=1527 size=36504 card=312)
177 177 177 NESTED LOOPS (cr=6846 pr=6091 pw=0 time=3909468 us cost=1350 size=1500 card=15)
177 177 177 NESTED LOOPS (cr=6490 pr=6091 pw=0 time=3907157 us cost=1320 size=1245 card=15)
177 177 177 NESTED LOOPS (cr=6133 pr=6091 pw=0 time=3905733 us cost=1305 size=585 card=15)
1 1 1 NESTED LOOPS (cr=5 pr=2 pw=0 time=17096 us cost=2 size=23 card=1)
1 1 1 TABLE ACCESS BY INDEX ROWID ACCDEF (cr=2 pr=2 pw=0 time=17079 us cost=1 size=12 card=1)
1 1 1 INDEX UNIQUE SCAN ACCDEF_IX1 (cr=1 pr=1 pw=0 time=6675 us cost=0 size=0 card=1)(object id 103661)
1 1 1 TABLE ACCESS BY INDEX ROWID PARTNERS (cr=3 pr=0 pw=0 time=14 us cost=1 size=11 card=1)
1 1 1 INDEX UNIQUE SCAN PARTNERS_IX1 (cr=2 pr=0 pw=0 time=9 us cost=0 size=0 card=1)(object id 91563)
177 177 177 TABLE ACCESS FULL EQUITYKEYS (cr=6128 pr=6089 pw=0 time=3888376 us cost=1303 size=240 card=15)
177 177 177 TABLE ACCESS BY INDEX ROWID SECURITIES (cr=357 pr=0 pw=0 time=1127 us cost=1 size=44 card=1)
177 177 177 INDEX UNIQUE SCAN P_SECURITIES (cr=180 pr=0 pw=0 time=563 us cost=0 size=0 card=1)(object id 93819)
177 177 177 TABLE ACCESS BY INDEX ROWID SECURITIES (cr=356 pr=0 pw=0 time=2027 us cost=2 size=17 card=1)
177 177 177 INDEX RANGE SCAN SECURITIES_IX2 (cr=180 pr=0 pw=0 time=1166 us cost=1 size=0 card=1)(object id 93809)
18060 18060 18060 TABLE ACCESS BY INDEX ROWID HOLKEYS (cr=9191 pr=100 pw=0 time=716100 us cost=13 size=340 card=20)
18060 18060 18060 INDEX RANGE SCAN I_HOLKEYS_SECPOR (cr=421 pr=100 pw=0 time=689634 us cost=2 size=0 card=23)(object id 98864)
8667 8667 8667 TABLE ACCESS BY INDEX ROWID CUSTODIES (cr=4 pr=1 pw=0 time=131716 us cost=1 size=12 card=1)
36120 36120 36120 INDEX RANGE SCAN R_CUSTODIES_CSTD (cr=3 pr=1 pw=0 time=53659 us cost=0 size=0 card=3)(object id 101437)
8667 8667 8667 TABLE ACCESS BY INDEX ROWID PORTFOLIOS (cr=10479 pr=0 pw=0 time=36782 us cost=1 size=18 card=1)
8667 8667 8667 INDEX UNIQUE SCAN P_PORTFOLIOS (cr=1812 pr=0 pw=0 time=14722 us cost=0 size=0 card=1)(object id 91399)
8667 8667 8667 INDEX UNIQUE SCAN P_PORTGROUPS (cr=7647 pr=0 pw=0 time=20935 us cost=0 size=0 card=1)(object id 95885)
8667 8667 8667 TABLE ACCESS BY INDEX ROWID PORTGROUPS (cr=8667 pr=0 pw=0 time=15075 us cost=1 size=7 card=1)
3 3 3 VIEW index$_join$_005 (cr=6 pr=4 pw=0 time=17822 us cost=3 size=45 card=5)
3 3 3 HASH JOIN (cr=6 pr=4 pw=0 time=17816 us)
5 5 5 INDEX FAST FULL SCAN PORTGROUPTYPES_IX1 (cr=3 pr=2 pw=0 time=10731 us cost=1 size=45 card=5)(object id 95857)
3 3 3 INDEX FAST FULL SCAN P_PORTGROUPTYPES (cr=3 pr=2 pw=0 time=6182 us cost=1 size=45 card=5)(object id 95858)
3945 3945 3945 VIEW PUSHED PREDICATE (cr=250808108 pr=1639 pw=0 time=1615801762 us cost=32 size=36 card=1)
3945 3945 3945 SORT GROUP BY (cr=250808108 pr=1639 pw=0 time=1615792437 us cost=32 size=86 card=1)
8052 8052 8052 NESTED LOOPS (cr=250808108 pr=1639 pw=0 time=3245096176 us cost=31 size=86 card=1)
6879822 6879822 6879822 NESTED LOOPS (cr=14142041 pr=0 pw=0 time=93287445 us cost=18 size=53 card=1)
7665 7665 7665 MERGE JOIN CARTESIAN (cr=3980 pr=0 pw=0 time=214689 us cost=5 size=40 card=1)
7665 7665 7665 NESTED LOOPS (cr=3846 pr=0 pw=0 time=75334 us cost=3 size=23 card=1)
3833 3833 3833 TABLE ACCESS BY INDEX ROWID PARTNERS (cr=3842 pr=0 pw=0 time=38447 us cost=2 size=11 card=1)
3833 3833 3833 INDEX UNIQUE SCAN P_PARTNERS (cr=9 pr=0 pw=0 time=13355 us cost=1 size=0 card=1)(object id 91507)
7665 7665 7665 TABLE ACCESS BY INDEX ROWID CUSTODIES (cr=4 pr=0 pw=0 time=34661 us cost=1 size=12 card=1)
7665 7665 7665 INDEX RANGE SCAN R_CUSTODIES_CSTD (cr=3 pr=0 pw=0 time=23093 us cost=0 size=0 card=1)(object id 101437)
7665 7665 7665 BUFFER SORT (cr=134 pr=0 pw=0 time=128191 us cost=4 size=17 card=1)
7665 7665 7665 TABLE ACCESS BY INDEX ROWID SECURITIES (cr=134 pr=0 pw=0 time=44771 us cost=2 size=17 card=1)
7665 7665 7665 INDEX RANGE SCAN SECURITIES_IX2 (cr=109 pr=0 pw=0 time=32098 us cost=1 size=0 card=1)(object id 93809)
6879822 6879822 6879822 TABLE ACCESS BY INDEX ROWID HOLKEYS (cr=14138061 pr=0 pw=0 time=99798296 us cost=13 size=13 card=1)
27845684 27845684 27845684 INDEX RANGE SCAN I_HOLKEYS_SECPOR (cr=92999 pr=0 pw=0 time=21161648 us cost=2 size=0 card=23)(object id 98864)
8052 8052 8052 VIEW PUSHED PREDICATE VW_GBC_22 (cr=236667503 pr=1677 pw=0 time=1559090990 us cost=13 size=33 card=1)
8052 8052 8052 SORT GROUP BY (cr=236667503 pr=1677 pw=0 time=1552356479 us cost=13 size=64 card=1)
8052 8052 8052 HASH JOIN (cr=236667503 pr=1677 pw=0 time=1518269306 us cost=12 size=64 card=1)
6879822 6879822 6879822 TABLE ACCESS BY INDEX ROWID ACCDEF (cr=13759644 pr=0 pw=0 time=58085525 us cost=1 size=12 card=1)
6879822 6879822 6879822 INDEX UNIQUE SCAN ACCDEF_IX1 (cr=6879822 pr=0 pw=0 time=37383556 us cost=0 size=0 card=1)(object id 103661)
16077 16077 16077 TABLE ACCESS BY INDEX ROWID HOLDINGS (cr=222907859 pr=1677 pw=0 time=1109306657 us cost=10 size=52 card=1)
13212301 13212301 13212301 INDEX SKIP SCAN P_HOLDINGS (cr=211196455 pr=431 pw=0 time=734718877 us cost=6 size=0 card=3)(object id 2173392)
38622 38622 38622 INDEX RANGE SCAN R_HOLDINGS_HOLKEYIK (cr=7997 pr=829 pw=0 time=9653175 us cost=2 size=0 card=42)(object id 2173885)
123 123 123 TABLE ACCESS BY INDEX ROWID HOLDINGS (cr=31216 pr=2422 pw=0 time=40223697 us cost=38 size=52 card=1)
Case2
SELECT EK.SECIK AS EK_SECIK,S.SECIK AS S_SECIK,EK.EQKEY1 AS EK_EQKEY1,EK.FROMDATE AS EK_FROMDATE,S.SECSHORT AS S_SECSHORT,S.SECNAME AS S_SECNAME,C.CDY AS C_CDY,C.CSTD AS C_CSTD,P.PAR AS P_PAR,P.PARIK AS P_PARIK,PH.ACCOUNTING_FRAMEWORK AS PH_ACC_FW,NVL(PH.BAL_NOMINAL_NUMBER,0) AS PH_BAL_NOM_NUM,PH.FROM_DATE AS PH_FROM_DATE,PH.POR AS PH_POR,PH.SEC_SHORT_NAME AS PH_SEC_SHORT_NAME,PH.TO_DATE AS PH_TO_DATE,PH.CUSTODY_SHORT_NAME AS PH_CUST_SHORT_NAME,T.TC_CSTD AS T_CSTD,SUM(T.TH_BAL_NOM_NUM) AS T_BAL_NOM_NUM,T.TH_SEC_SHORT_NAME AS T_SEC_SHORT_NAME,PH.POR_REF AS PH_POR_REF,PORT.PORIK AS PORT_PORIK,PORT.PORGRPIK AS PORT_PORGRPIK,PG.PORGRPIK AS PG_PORGRPIK,PG.PORGRPTYPEIK AS PG_PORGRPTYPEIK,PGT.PORGRPTYPEIK AS PGT_PORGRPTYPEIK FROM SCDAT.CUSTODIES C,SCDAT.EQUITYKEYS EK,SCDAT.PARTNERS P,SCDAT.PORTGROUPS PG,SCDAT.PORTGROUPTYPES PGT,(
SELECT HOLKEYS.PORIK As POR_REF,
ACCDEF.ACC As ACCOUNTING_FRAMEWORK,
NVL(HOLDINGS.BALNOMVAL,0) As BAL_NOMINAL_NUMBER,
CUSTODIES.CDY As CUSTODY_SHORT_NAME,
DECODE(HOLDINGS.FINBOOKED,0,'No',1,'Yes',' ') As FINALLY_BOOKED,
HOLDINGS.FROMDATE As FROM_DATE,
PORTFOLIOS.POR As POR,
SECURITIES.SECSHORT As SEC_SHORT_NAME,
HOLDINGS.TODATE As TO_DATE,
HOLDINGS.FINBOOKED As X_FINALLY_BOOKED
FROM HOLDINGS,HOLKEYS,ACCDEF,CUSTODIES,PORTFOLIOS,SECURITIES WHERE HOLDINGS.HOLKEYIK = HOLKEYS.HOLKEYIK AND HOLDINGS.ACCIK = ACCDEF.ACCIK AND HOLKEYS.CDYIK = CUSTODIES.CDYIK AND HOLKEYS.PORIK = PORTFOLIOS.PORIK AND HOLKEYS.SECIK = SECURITIES.SECIK) PH,SCDAT.PORTFOLIOS PORT,SCDAT.SECURITIES S,(SELECT TC.CDY AS TC_CDY,TC.CSTD AS TC_CSTD,SUM(NVL(TH.BAL_NOMINAL_NUMBER,0)) AS TH_BAL_NOM_NUM,TH.FROM_DATE AS TH_FROM_DATE,TH.TO_DATE AS TH_TO_DATE,TH.SEC_SHORT_NAME AS TH_SEC_SHORT_NAME,TH.CUSTODY_SHORT_NAME AS TH_CUST_SHORT_NAME,TP.PAR AS TP_PAR,TP.PARIK AS TP_PARIK FROM SCDAT.CUSTODIES TC,(
SELECT ACCDEF.ACC As ACCOUNTING_FRAMEWORK,
NVL(HOLDINGS.BALNOMVAL,0) As BAL_NOMINAL_NUMBER,
CUSTODIES.CDY As CUSTODY_SHORT_NAME,
DECODE(HOLDINGS.FINBOOKED,0,'No',1,'Yes',' ') As FINALLY_BOOKED,
HOLDINGS.FROMDATE As FROM_DATE,
SECURITIES.SECSHORT As SEC_SHORT_NAME,
HOLDINGS.TODATE As TO_DATE,
HOLDINGS.FINBOOKED As X_FINALLY_BOOKED
FROM HOLDINGS,HOLKEYS,ACCDEF,CUSTODIES,SECURITIES WHERE HOLDINGS.ACCIK = ACCDEF.ACCIK AND HOLDINGS.HOLKEYIK = HOLKEYS.HOLKEYIK AND HOLKEYS.CDYIK = CUSTODIES.CDYIK AND HOLKEYS.SECIK = SECURITIES.SECIK) TH,SCDAT.PARTNERS TP WHERE TH.CUSTODY_SHORT_NAME = TC.CDY AND TC.CSTD = TP.PARIK AND TH.ACCOUNTING_FRAMEWORK = :v1 AND NOT (NVL(TH.BAL_NOMINAL_NUMBER,0) = :v2 ) AND TH.FROM_DATE <= :v3 AND TH.TO_DATE >= :v4 AND TH.FINALLY_BOOKED = :v5 GROUP BY TC.CDY,TC.CSTD,TH.FROM_DATE,TH.TO_DATE,TH.SEC_SHORT_NAME,TH.CUSTODY_SHORT_NAME,TP.PAR,TP.PARIK) T WHERE EK.SECIK = S.SECIK AND PORT.PORGRPIK = PG.PORGRPIK AND PG.PORGRPTYPEIK = PGT.PORGRPTYPEIK AND S.SECSHORT = PH.SEC_SHORT_NAME AND PH.SEC_SHORT_NAME = T.TH_SEC_SHORT_NAME AND PH.POR_REF = PORT.PORIK AND PH.CUSTODY_SHORT_NAME = C.CDY AND EK.FROMDATE = :v6 AND NOT (EK.EQKEY1 = :v7 ) AND P.PAR = :v8 AND NOT (PGT.PORGRPTYPE IN (:v9 ,:v10 )) AND PH.ACCOUNTING_FRAMEWORK = :v11 AND NOT (NVL(PH.BAL_NOMINAL_NUMBER,0) = :v12 ) AND PH.FINALLY_BOOKED = :v13 AND EK.FROMDATE >= PH.FROM_DATE AND EK.FROMDATE <= PH.TO_DATE AND C.CSTD = P.PARIK AND C.CSTD = T.TC_CSTD GROUP BY EK.SECIK,S.SECIK,EK.EQKEY1,EK.FROMDATE,S.SECSHORT,S.SECNAME,C.CDY,C.CSTD,P.PAR,P.PARIK,PH.ACCOUNTING_FRAMEWORK,NVL(PH.BAL_NOMINAL_NUMBER,0),PH.FROM_DATE,PH.POR,PH.SEC_SHORT_NAME,PH.TO_DATE,PH.CUSTODY_SHORT_NAME,T.TC_CSTD,T.TH_SEC_SHORT_NAME,PH.POR_REF,PORT.PORIK,PORT.PORGRPIK,PG.PORGRPIK,PG.PORGRPTYPEIK,PGT.PORGRPTYPEIK
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 2.34 2.34 0 0 0 0
Fetch 2 39.31 131.53 17885 17489238 0 2039
total 4 41.66 133.88 17885 17489238 0 2039
Misses in library cache during parse: 1
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: 171 (SCDAT)
Number of plan statistics captured: 1
Rows (1st) Rows (avg) Rows (max) Row Source Operation
2039 2039 2039 HASH GROUP BY (cr=17489238 pr=17885 pw=0 time=131529969 us cost=2062 size=251 card=1)
166827 166827 166827 NESTED LOOPS (cr=17489238 pr=17885 pw=0 time=157379020 us cost=2061 size=251 card=1)
2043 2043 2043 NESTED LOOPS (cr=143626 pr=5419 pw=0 time=19393083 us cost=2003 size=215 card=1)
11156 11156 11156 HASH JOIN (cr=53391 pr=2600 pw=0 time=4865614 us cost=1559 size=1956 card=12)
11156 11156 11156 NESTED LOOPS (cr=53385 pr=2600 pw=0 time=4585085 us)
11156 11156 11156 NESTED LOOPS (cr=42229 pr=2600 pw=0 time=4563404 us cost=1555 size=2156 card=14)
11156 11156 11156 NESTED LOOPS (cr=32467 pr=2600 pw=0 time=4543117 us cost=1541 size=2058 card=14)
11156 11156 11156 NESTED LOOPS (cr=19234 pr=2600 pw=0 time=4506220 us cost=1527 size=1806 card=14)
24211 24211 24211 NESTED LOOPS (cr=19230 pr=2600 pw=0 time=4417211 us cost=1526 size=36504 card=312)
193 193 193 NESTED LOOPS (cr=6926 pr=2556 pw=0 time=4371848 us cost=1350 size=1500 card=15)
193 193 193 NESTED LOOPS (cr=6537 pr=2556 pw=0 time=4370289 us cost=1320 size=1245 card=15)
193 193 193 NESTED LOOPS (cr=6148 pr=2556 pw=0 time=4369122 us cost=1305 size=585 card=15)
1 1 1 NESTED LOOPS (cr=5 pr=1 pw=0 time=6568 us cost=2 size=23 card=1)
1 1 1 TABLE ACCESS BY INDEX ROWID ACCDEF (cr=2 pr=1 pw=0 time=6556 us cost=1 size=12 card=1)
1 1 1 INDEX UNIQUE SCAN ACCDEF_IX1 (cr=1 pr=1 pw=0 time=6551 us cost=0 size=0 card=1)(object id 103661)
1 1 1 TABLE ACCESS BY INDEX ROWID PARTNERS (cr=3 pr=0 pw=0 time=10 us cost=1 size=11 card=1)
1 1 1 INDEX UNIQUE SCAN PARTNERS_IX1 (cr=2 pr=0 pw=0 time=6 us cost=0 size=0 card=1)(object id 91563)
193 193 193 TABLE ACCESS FULL EQUITYKEYS (cr=6143 pr=2555 pw=0 time=4362460 us cost=1303 size=240 card=15)
193 193 193 TABLE ACCESS BY INDEX ROWID SECURITIES (cr=389 pr=0 pw=0 time=1000 us cost=1 size=44 card=1)
193 193 193 INDEX UNIQUE SCAN P_SECURITIES (cr=196 pr=0 pw=0 time=498 us cost=0 size=0 card=1)(object id 93819)
193 193 193 TABLE ACCESS BY INDEX ROWID SECURITIES (cr=389 pr=0 pw=0 time=1486 us cost=2 size=17 card=1)
193 193 193 INDEX RANGE SCAN SECURITIES_IX2 (cr=197 pr=0 pw=0 time=899 us cost=1 size=0 card=1)(object id 93809)
24211 24211 24211 TABLE ACCESS BY INDEX ROWID HOLKEYS (cr=12304 pr=44 pw=0 time=38145 us cost=13 size=340 card=20)
24211 24211 24211 INDEX RANGE SCAN I_HOLKEYS_SECPOR (cr=475 pr=44 pw=0 time=13253 us cost=2 size=0 card=23)(object id 98864)
11156 11156 11156 TABLE ACCESS BY INDEX ROWID CUSTODIES (cr=4 pr=0 pw=0 time=93056 us cost=1 size=12 card=1)
48422 48422 48422 INDEX RANGE SCAN R_CUSTODIES_CSTD (cr=3 pr=0 pw=0 time=35831 us cost=0 size=0 card=3)(object id 101437)
11156 11156 11156 TABLE ACCESS BY INDEX ROWID PORTFOLIOS (cr=13233 pr=0 pw=0 time=31391 us cost=1 size=18 card=1)
11156 11156 11156 INDEX UNIQUE SCAN P_PORTFOLIOS (cr=2077 pr=0 pw=0 time=12494 us cost=0 size=0 card=1)(object id 91399)
11156 11156 11156 INDEX UNIQUE SCAN P_PORTGROUPS (cr=9762 pr=0 pw=0 time=15817 us cost=0 size=0 card=1)(object id 95885)
11156 11156 11156 TABLE ACCESS BY INDEX ROWID PORTGROUPS (cr=11156 pr=0 pw=0 time=15160 us cost=1 size=7 card=1)
5 5 5 VIEW index$_join$_005 (cr=6 pr=0 pw=0 time=656 us cost=3 size=45 card=5)
5 5 5 HASH JOIN (cr=6 pr=0 pw=0 time=648 us)
5 5 5 INDEX FAST FULL SCAN PORTGROUPTYPES_IX1 (cr=3 pr=0 pw=0 time=26 us cost=1 size=45 card=5)(object id 95857)
7 7 7 INDEX FAST FULL SCAN P_PORTGROUPTYPES (cr=3 pr=0 pw=0 time=15 us cost=1 size=45 card=5)(object id 95858)
2043 2043 2043 TABLE ACCESS BY INDEX ROWID HOLDINGS (cr=90235 pr=2819 pw=0 time=19041512 us cost=38 size=52 card=1)
92362 92362 92362 INDEX RANGE SCAN R_HOLDINGS_HOLKEYIK (cr=22368 pr=436 pw=0 time=2663719 us cost=2 size=0 card=42)(object id 2173885)
166827 166827 166827 VIEW PUSHED PREDICATE (cr=17345612 pr=12466 pw=0 time=107441684 us cost=58 size=36 card=1)
166827 166827 166827 SORT GROUP BY (cr=17345612 pr=12466 pw=0 time=107408172 us cost=58 size=117 card=1)
1911217 1911217 1911217 NESTED LOOPS (cr=17345612 pr=12466 pw=0 time=1296620056 us)
10575944 10575944 10575944 NESTED LOOPS (cr=9800492 pr=1140 pw=0 time=22104782 us cost=57 size=117 card=1)
2292837 2292837 2292837 NESTED LOOPS (cr=5195338 pr=0 pw=0 time=9516177 us cost=19 size=65 card=1)
4086 4086 4086 MERGE JOIN CARTESIAN (cr=4885 pr=0 pw=0 time=93451 us cost=6 size=52 card=1)
4086 4086 4086 NESTED LOOPS (cr=4103 pr=0 pw=0 time=29074 us cost=4 size=35 card=1)
2043 2043 2043 NESTED LOOPS (cr=4099 pr=0 pw=0 time=20146 us cost=3 size=23 card=1)
2043 2043 2043 TABLE ACCESS BY INDEX ROWID PARTNERS (cr=2052 pr=0 pw=0 time=10371 us cost=2 size=11 card=1)
2043 2043 2043 INDEX UNIQUE SCAN P_PARTNERS (cr=9 pr=0 pw=0 time=4583 us cost=1 size=0 card=1)(object id 91507)
2043 2043 2043 TABLE ACCESS BY INDEX ROWID ACCDEF (cr=2047 pr=0 pw=0 time=7133 us cost=1 size=12 card=1)
2043 2043 2043 INDEX UNIQUE SCAN ACCDEF_IX1 (cr=4 pr=0 pw=0 time=3680 us cost=0 size=0 card=1)(object id 103661)
4086 4086 4086 TABLE ACCESS BY INDEX ROWID CUSTODIES (cr=4 pr=0 pw=0 time=10204 us cost=1 size=12 card=1)
4086 4086 4086 INDEX RANGE SCAN R_CUSTODIES_CSTD (cr=3 pr=0 pw=0 time=6320 us cost=0 size=0 card=1)(object id 101437)
4086 4086 4086 BUFFER SORT (cr=782 pr=0 pw=0 time=60735 us cost=5 size=17 card=1)
4086 4086 4086 TABLE ACCESS BY INDEX ROWID SECURITIES (cr=782 pr=0 pw=0 time=27892 us cost=2 size=17 card=1)
4086 4086 4086 INDEX RANGE SCAN SECURITIES_IX2 (cr=590 pr=0 pw=0 time=13746 us cost=1 size=0 card=1)(object id 93809)
2292837 2292837 2292837 TABLE ACCESS BY INDEX ROWID HOLKEYS (cr=5190453 pr=0 pw=0 time=12329304 us cost=13 size=13 card=1)
10116948 10116948 10116948 INDEX RANGE SCAN I_HOLKEYS_SECPOR (cr=41387 pr=0 pw=0 time=2136775 us cost=2 size=0 card=23)(object id 98864)
10575944 10575944 10575944 INDEX RANGE SCAN R_HOLDINGS_HOLKEYIK (cr=4605154 pr=1140 pw=0 time=14152971 us cost=2 size=0 card=42)(object id 2173885)
1911217 1911217 1911217 TABLE ACCESS BY INDEX ROWID HOLDINGS (cr=7545120 pr=11326 pw=0 time=78999228 us cost=38 size=52 card=1)
Rows Execution Plan
0 SELECT STATEMENT MODE: ALL_ROWS
2039 HASH (GROUP BY)
166827 NESTED LOOPS
2043 NESTED LOOPS
11156 HASH JOIN
11156 VIEW OF 'index$_join$_005' (VIEW)
11156 HASH JOIN
11156 INDEX MODE: ANALYZED (FAST FULL SCAN) OF
'PORTGROUPTYPES_IX1' (INDEX (UNIQUE))
11156 INDEX MODE: ANALYZED (FAST FULL SCAN) OF
'P_PORTGROUPTYPES' (INDEX (UNIQUE))
24211 HASH JOIN
193 VIEW OF 'index$_join$_004' (VIEW)
193 HASH JOIN
193 INDEX MODE: ANALYZED (FAST FULL SCAN) OF
'P_PORTGROUPS' (INDEX (UNIQUE))
1 INDEX MODE: ANALYZED (FAST FULL SCAN) OF
'R_PORTGROUPS_PORGRPTYPEIK' (INDEX)
1 HASH JOIN
1 HASH JOIN
1 TABLE ACCESS MODE: ANALYZED (FULL) OF
'EQUITYKEYS' (TABLE)
1 HASH JOIN
193 TABLE ACCESS MODE: ANALYZED (FULL) OF
'SECURITIES' (TABLE)
193 HASH JOIN
193 VIEW OF 'index$_join$_012' (VIEW)
193 HASH JOIN
193 INDEX MODE: ANALYZED (FAST FULL SCAN) OF
'P_SECURITIES' (INDEX (UNIQUE))
24211 INDEX MODE: ANALYZED (FAST FULL SCAN) OF
'SECURITIES_IX2' (INDEX (UNIQUE))
24211 NESTED LOOPS
11156 NESTED LOOPS
48422 NESTED LOOPS
11156 NESTED LOOPS
11156 TABLE ACCESS MODE: ANALYZED (BY
INDEX ROWID) OF 'ACCDEF' (TABLE)
11156 INDEX MODE: ANALYZED (UNIQUE SCAN)
OF 'ACCDEF_IX1' (INDEX (UNIQUE))
11156 TABLE ACCESS MODE: ANALYZED (BY
INDEX ROWID) OF 'PARTNERS' (TABLE)
5 INDEX MODE: ANALYZED (UNIQUE SCAN)
OF 'PARTNERS_IX1' (INDEX (UNIQUE))
5 TABLE ACCESS MODE: ANALYZED (BY INDEX
ROWID) OF 'CUSTODIES' (TABLE)
5 INDEX MODE: ANALYZED (RANGE SCAN) OF
'R_CUSTODIES_CSTD' (INDEX)
7 INDEX MODE: ANALYZED (RANGE SCAN) OF
'R_HOLKEYS_CDYIK' (INDEX)
2043 TABLE ACCESS MODE: ANALYZED (BY INDEX
ROWID) OF 'HOLKEYS' (TABLE)
92362 VIEW OF 'index$_join$_013' (VIEW)
166827 HASH JOIN
166827 INDEX MODE: ANALYZED (FAST FULL SCAN) OF
'P_PORTFOLIOS' (INDEX (UNIQUE))
1911217 INDEX MODE: ANALYZED (FAST FULL SCAN) OF
'PORTFOLIOS_IX1' (INDEX (UNIQUE))
10575944 TABLE ACCESS MODE: ANALYZED (BY INDEX ROWID) OF
'HOLDINGS' (TABLE)
2292837 INDEX MODE: ANALYZED (RANGE SCAN) OF
'R_HOLDINGS_HOLKEYIK' (INDEX)
4086 VIEW PUSHED PREDICATE
4086 SORT (GROUP BY)
2043 NESTED LOOPS
2043 NESTED LOOPS
2043 MERGE JOIN (CARTESIAN)
2043 NESTED LOOPS
2043 TABLE ACCESS MODE: ANALYZED (BY INDEX ROWID)
OF 'PARTNERS' (TABLE)
4086 INDEX MODE: ANALYZED (UNIQUE SCAN) OF
'P_PARTNERS' (INDEX (UNIQUE))
4086 TABLE ACCESS MODE: ANALYZED (BY INDEX ROWID)
OF 'CUSTODIES' (TABLE)
4086 INDEX MODE: ANALYZED (RANGE SCAN) OF
'R_CUSTODIES_CSTD' (INDEX)
4086 BUFFER (SORT)
4086 TABLE ACCESS MODE: ANALYZED (BY INDEX ROWID)
OF 'SECURITIES' (TABLE)
2292837 INDEX MODE: ANALYZED (RANGE SCAN) OF
'SECURITIES_IX2' (INDEX (UNIQUE))
10116948 TABLE ACCESS MODE: ANALYZED (BY INDEX ROWID) OF
'HOLKEYS' (TABLE)
10575944 INDEX MODE: ANALYZED (RANGE SCAN) OF
'I_HOLKEYS_SECPOR' (INDEX)
1911217 VIEW PUSHED PREDICATE OF 'VW_GBC_22' (VIEW)
0 SORT (GROUP BY)
0 NESTED LOOPS
0 TABLE ACCESS MODE: ANALYZED (BY INDEX ROWID)
OF 'ACCDEF' (TABLE)
0 INDEX MODE: ANALYZED (UNIQUE SCAN) OF
'ACCDEF_IX1' (INDEX (UNIQUE))
0 TABLE ACCESS MODE: ANALYZED (BY INDEX ROWID)
OF 'HOLDINGS' (TABLE)
0 INDEX MODE: ANALYZED (RANGE SCAN) OF
'R_HOLDINGS_HOLKEYIK' (INDEX)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 2 0.00 0.00
db file sequential read 16176 0.17 90.98
db file scattered read 590 0.01 1.94
Disk file operations I/O 15 0.00 0.00
SQL*Net message from client 2 0.04 0.04
SQL*Net more data to client 33 0.00 0.00the plans show that your first query has to do much more work than the second query (250M vs. 17M consistent gets). The queries use different plans and the second plan seems to be the better choice - since the first query does not return any rows. The plans also tell us where the time is spent - and there are some nested loops with extreme execution counts and a lot of expansive index access operations (especially the skip scan on P_HOLDINGS), but I would prefer to use a a plan with rowsource statistics to find the errors in the optimizers cardinality estimations.
-
How to find the original net value for a cancelled sales order
Hi experts,
From VA03 or table VBAP, net value for those cancelled items is always zero. Where to find those cancelled items' original net value?
Thanks a lot.
YuThanks Seshu,
I just tried it as per your suggestion but I found for non-cancelled items konv-kbert is not equal to the net value taken from vbap-netwr. So I wonder if knov-kbert is the right original net value for those cancelled items.
Yu -
How to get the Useru2019s position when the user doesnu2019t have CP relation
We have a custom program which will add / delete attributes (In transaction PPOSA_BBP). It is working fine for users which were assigned with CP relation But it fails for users which doesnu2019t have CP relation (since we are getting the position of users form HRP1001 then we are retrieving the existing attributes based on the position after that updating the attributes) as we are getting the position from HRP1001 it fails for users were no CP relation.
Help us how to get the Useru2019s position when the user doesnu2019t have CP relation. Suggest us any function module or how to query the HRP1001 or some other table if exists
Regards
PaulHi Paul,
Have a look at these tables.
Using table BUT000 the central business partner data are stored, f.e. partner type, partner names, partner number, partner guid, person number, etc. In table BUTBKK the bank data to a business partner are stored.
Central business partner address data
The table ADRC is used for the address of a business partner. Table BUT020 links the business partner number with the address number. Using table BUT021 several addresses to a business partner with different usages (modes), f.e. correspondence or delivery address, can be stored. The personal data of a business partner person are stored with key person number in table ADRP. The person number is assignd to a business partner person in table BUT000. Communication data of business partners as e-mail, telephone, fax, etc. are stored in the tables ADDR1 u2013 ADDR12. The business address of a contact person or an employee consists of the organization address (company resp. org.-unit) and of an address addition, which describes f.e. a building, a room number, etc. The address addition is stored in table ADCP and is identified by the keys address number of the organization address and person number.
Relationships between business partners
Table BUT050 contains the relationships between a business partner organization and a business partner person using relation types. The relation types are defined in table TBZ9, f.e. the relation type u2018has employeeu2019 corresponds to identifier u2018BUR010u2019, the relation type u2018has contact personu2019 corresponds to identifier u2018BUR001u2019. Table BUT051 stores communication data of a contact person relationship (compare to table ADCP). Table BUT052 stores several address numbers to one business partner relationship (including a standard flag).
Hope this helps,
Kind Regards,
Matthew -
Hello,
after upgrading from CRM5 to CRM7 (Service for Employee), our Interaction Centre users started getting intermittent SAPSQL_ARRAY_INSERT_DUPREC screen dumps when clicking on the 'Save' button after having changed a partner number in the Partners Table of a Service Ticket.
On encountering one of these screen dumps, the user then has to close their IC session and then restart it - after which it is then possible to successfully 'Save' the same change to the same business partner on the same Service Ticket.
I have not been able to reproduce this error due to its intermittent nature.
Details of the source code extract from the ST22 dump is given below.
Has anyone else encountered such an issue themselves?
thanks,
Martin
Category ABAP Programming Error
Runtime Errors SAPSQL_ARRAY_INSERT_DUPREC
Except. CX_SY_OPEN_SQL_DB
ABAP Program SAPLCOM_PARTNER_DU
Application Component CRM-BF-PD
Date and Time 20.08.2014 11:15:25
Line SourceCde
41 * data definitions
42 DATA: BEGIN OF ls_attribute_record_to_use,
43 partner_guid TYPE crmt_partner_guid,
44 values TYPE text255. "has to be as long as the longest
45 "attribute structure
46 DATA: END OF ls_attribute_record_to_use.
47
48 DATA: lt_attribute_records_to_use LIKE SORTED TABLE OF
49 ls_attribute_record_to_use WITH UNIQUE KEY partner_guid,
50
51 lv_tablename TYPE tabname,
52 ls_attribute_record TYPE crmt_partner_attr_du,
53 lv_name TYPE char64.
54
55 FIELD-SYMBOLS: <values> TYPE ANY,
56 <address> TYPE crmt_partner_address,
57 <fs_insert_record> TYPE crmd_partner,
58 <fs_addr_ref_data> TYPE crmt_partner_address_reference.
59
60 FIELD-SYMBOLS: <wa_to_proceed> TYPE ANY,
61 <table_to_proceed> TYPE ANY TABLE.
62
63 DATA: wa_to_proceed TYPE REF TO data.
64 DATA: lt_wa_table TYPE REF TO data.
65
66 *** MAINTAIN PARTNER RECORDS *******************************************
67
68 *** records to insert
69 IF NOT it_partner_records_to_insert IS INITIAL.
70
>>>>> INSERT crmd_partner FROM TABLE it_partner_records_to_insert.
72 IF sy-subrc NE 0.
73 MESSAGE a002(com_partner) WITH gc_object_name_partner.
74 ENDIF.
75
76 ENDIF.
77
78 *** records to delete
79 IF NOT it_partner_records_to_delete IS INITIAL.
80 DELETE crmd_partner FROM TABLE it_partner_records_to_delete.
81 IF sy-subrc NE 0.
82 MESSAGE a002(com_partner) WITH gc_object_name_partner.
83 ENDIF.Hello Atul,
thanks for your message. I have had a look at the SAP notes that you have pointed me to, however they unfortunately do not relate to the functionality where we are encountering this problem:
1914117 - Relates to Sales (not Service {Employee})
1823316 - This error occurs in the wrong FM (BUR_BUPR_UPDATE) rather than FM COM_PARTNER_UPDATE_DU.
1809361 - Relevant for the SAP GUI transaction, 'BP', not the Interaction Centre which iswhere this error is occuring.
SAP have not been able to help because of its intermittent nature, it is not possible to create this error on demand, and as I am working on a secure site SAP cannot open a remote connection.
thanks,
Martin -
How can i send an error message at EXIT_SAPMM06E_013 ?
Hi
I'm making some validations to Vendor and Partner Functions (table control in 'Partners' Strip) in Creting/Changing Purchase Orders (ME21N/ME22N).
I know the suitable user exit is EXIT_SAPMM06E_012 for making validation before saving, but this exit does not has (receive) the table with Partner Functions so i could validate them.
Then I use the Exit _013, wich executes when saving the PO, because this exit has the captured Partners table (XEKPA).
But, when i make the validations and try to send a error mesage, the system shows other message type info (window) like 'The requested object is locked by another transaction' and then another like 'System error (error in method PO_POST)'.
I think this it's because the exit _013 is better suitable to make customer updates and not validations, that it's because just passing by MESSAGE Ennn(cc) command makes the methods catch my error and send other errors and close the transaction.
Does somebody can help me ??
How can i send error messages in exit _013 ??
Or is this incorrect ??
Or in wich User Exit can i validate the Partner Functions ??
I really will aprettiate if somebody can help me, because i'm delayed with my development !!
RegardsHi Frank,
The eror message you are getting seems to be coming from somewgere else and may be due to the same PO being cahnged in another transaction or have you put some code in BADI ME_PROCESS_PO ( Method POST) .
You can try by commenting out the code in EXIT 13 .
If this does not work then use EXIT 12 only and below is the code you can use to access XEKPA in exit 12.
DATA IT_EKPA LIKE EKPA OCCURS 0 WITH HEADER LINE.
DATA NAME(50) VALUE '(SAPLMEPO)XEKPA[]'.
DATA NAME1(50) VALUE '(SAPMM06E)XEKPA[]'.
FIELD-SYMBOLS <F1> TYPE ANY .
IF SY-TCODE+4(1) = 'N'.
ASSIGN (NAME) TO <F1>.
ELSE.
ASSIGN (NAME1) TO <F1>.
ENDIF.
IT_EKPA[] = <F1>.
( Now you have the data in IT_EKPA table which you can use to validate )
Cheers -
CRM 7.0 Contact person in order not replicated to R/3
Hello all,
I am currently facing issue with contact persons in CRM orders. There are several partners in the CRM order. Standard ones like ship-to party is replicated to R/3; employee roles are also replicated into R/3 within an order; contact persons (no matter if standard or Z) are not replicated from CRM order to R/3. There is neither no error message in BDOC nor in order.
Partners are set correctly for mapping between R/3 and CRM (including Z partners) -
tables CRMPARNR (R/3) and table CRMM_BUT_CONTNO (CRM) checked; GUIDs are there
Users do change these contact persons manually sometimes.
If order changed in ERP - including contact persons adding/changing - all partner roles are transfered to CRM for an order correctly.
Any ideas??
Thanks for your help
RadimHello,
there is an important GUID that need to be determine, the contact persons in my case need to selected via partner determination otherwise the partner gets deleted in R/3. The determination is creating the relation to the partner which is transfered to R/3 and can be checked in the BDoc. This has solved the issue -
Dump while creating sales order using BAPI
Hi Experts,
I am trying to create a sales order in my alv report using BAPI_SALESORDER_CREATEFROMDAT2. I get a dump while executing the program. Please suggest me where I am going wrong.
|Source Code Extract |
|Line |SourceCde |
| 1|FORM FRM_KOND_BASIS_604. |
| 2|*{ INSERT DEVK910738 1 |
| 3| |
| 4|data: zuomqtyo LIKE ekpo-menge, |
| 5| zuomqtyn LIKE ekpo-menge, |
| 6| zqty1 type i, |
| 7| zqty2(11) type n. |
| 8| |
| 9|** Round up billing qty |
| 10| if komp-zzLTKZA ne 'VAR'. |
| 11| |
|>>>>>| zqty1 = xkwert. |
| 13| compute zqty2 = zqty1 / 1000. |
| 14| xkwert = zqty2 * 1000. |
| 15| |
| 16| exit. |
| 17| endif. |
| 18| |
| 19| |
| 20|** Samples |
| 21| |
| 22| if komp-MATKL = '5400'. |
| 23| |
| 24| check not xkomv-kmein is initial. |
| 25| check not komp-vrkme is initial. |
| 26| |
| 27|** Make sure base is correct when sales unit and pricing unit differ |
| 28| if komp-vrkme ne xkomv-kmein. |
| 29| |
| 30| zuomqtyo = komp-MGAME. |
| 31| |
Thanks.John,
Here is what I am doing.
*Assign Header Data And Move To Header Data Final Table
GS_ORDERHEADERIN-DOC_TYPE = GC_AUART.
GS_ORDERHEADERIN-SALES_ORG = GC_SORG.
GS_ORDERHEADERIN-DISTR_CHAN = GC_DISTC.
GS_ORDERHEADERIN-DIVISION = GC_DIVI.
GS_ORDERHEADERIN-ORD_REASON = GC_AUGRU.
GS_ORDERHEADERIN-REQ_DATE_H = WA-USAGE_DATE.
GS_ORDERHEADERIN-PURCH_DATE = WA-USAGE_DATE.
GS_ORDERHEADERIN-PURCH_NO_C = WA-USAGE_DOC.
*Assign Header Data And Move To Header Data Final Table
GS_ORDERHEADERINX-DOC_TYPE = GC_FLAG.
GS_ORDERHEADERINX-SALES_ORG = GC_FLAG.
GS_ORDERHEADERINX-DISTR_CHAN = GC_FLAG.
GS_ORDERHEADERINX-DIVISION = GC_FLAG.
GS_ORDERHEADERINX-ORD_REASON = GC_FLAG.
GS_ORDERHEADERINX-REQ_DATE_H = GC_FLAG.
GS_ORDERHEADERINX-PURCH_DATE = GC_FLAG.
GS_ORDERHEADERINX-PURCH_NO_C = GC_FLAG.
*ASSIGN ITEMS DATA AND MOVE TO ITEMS DATA FINAL TABLE
GS_ORDERITEMSIN-ITM_NUMBER = WA-POSNR.
GS_ORDERITEMSIN-MATERIAL = WA-MATERIAL.
GS_ORDERITEMSIN-TARGET_QTY = WA-EXT_QTY. "EXT_QTY is of type LFIMG
GS_ORDERITEMSIN-TARGET_QU = WA-EXT_UOM. "EXT_UOM is of type VRKME
APPEND GS_ORDERITEMSIN TO GT_ORDERITEMSIN.
CLEAR GS_ORDERITEMSIN.
*Assign Items Data And Move To Items Data Final Table
GS_ORDERITEMSINX-ITM_NUMBER = WA-POSNR.
GS_ORDERITEMSINX-MATERIAL = GC_FLAG.
GS_ORDERITEMSINX-TARGET_QTY = GC_FLAG.
GS_ORDERITEMSINX-TARGET_QU = GC_FLAG.
APPEND GS_ORDERITEMSINX TO GT_ORDERITEMSINX.
CLEAR GS_ORDERITEMSINX.
*Assign Schedule Lines Data And Move To Schedule Lines Final Table
GS_ORDER_SCHEDULES_IN-ITM_NUMBER = WA-POSNR.
GS_ORDER_SCHEDULES_IN-REQ_DATE = WA-USAGE_DATE.
GS_ORDER_SCHEDULES_IN-REQ_QTY = WA-EXT_QTY. "EXT_QTY is of type LFIMG
APPEND GS_ORDER_SCHEDULES_IN TO GT_ORDER_SCHEDULES_IN.
CLEAR GS_ORDER_SCHEDULES_IN.
*Assign Schedule Lines Data And Move To Schedule Lines Final Table
GS_ORDER_SCHEDULES_INX-ITM_NUMBER = WA-POSNR.
GS_ORDER_SCHEDULES_INX-REQ_DATE = GC_FLAG.
GS_ORDER_SCHEDULES_INX-REQ_QTY = GC_FLAG.
APPEND GS_ORDER_SCHEDULES_INX TO GT_ORDER_SCHEDULES_INX.
CLEAR GS_ORDER_SCHEDULES_INX.
*Assign Sold-To-Partner Data And Move To Final Partners Table
GS_ORDERPARTNERS-PARTN_ROLE = GC_SP.
GS_ORDERPARTNERS-PARTN_NUMB = GV_SOLD.
APPEND GS_ORDERPARTNERS TO GT_ORDERPARTNERS.
CLEAR GS_ORDERPARTNERS.
*Assign Ship-To-Partner Data And Move To Partners Table
GS_ORDERPARTNERS-PARTN_ROLE = GC_SH.
GS_ORDERPARTNERS-PARTN_NUMB = GV_SHIP.
APPEND GS_ORDERPARTNERS TO GT_ORDERPARTNERS.
CLEAR GS_ORDERPARTNERS.
*Clear Global Variable Field Of Sales Document
CLEAR:GV_SALESDOCUMENT.
"Right after pressing F6 button after this. It gives me dump.
*Call Function Module To Create Sales Order
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
EXPORTING
ORDER_HEADER_IN = GS_ORDERHEADERIN
ORDER_HEADER_INX = GS_ORDERHEADERINX
IMPORTING
SALESDOCUMENT = GV_SALESDOCUMENT
TABLES
ORDER_ITEMS_IN = GT_ORDERITEMSIN
ORDER_ITEMS_INX = GT_ORDERITEMSINX
ORDER_SCHEDULES_IN = GT_ORDER_SCHEDULES_IN
ORDER_SCHEDULES_INX = GT_ORDER_SCHEDULES_INX
ORDER_PARTNERS = GT_ORDERPARTNERS
RETURN = GT_BAPIRETURN.
IF SY-SUBRC = 0.
*Call Function Module For BAPI Commit
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = GC_FLAG.
ENDIF.
All my BAPI tables have been filled with required data in them. But, still it is giving me a dump.
I would really appreciate if some one could suggest me where I am going wrong.
Thanks. -
Error in Creating Sales Order Using BAPI_SALESORDER_CREATEFROMDAT2
Hi Everyone,
We have a requirement to create sales order from flat file using BAPI. Everything was working well until we encounter a customer with credit control limit setup.
Using the partners table for BAPi, the sold to customer is enter at header level, and we have this requirement to add the payer at item level. This is where the error is occuring. Upon debugging, I found out that the customer has a credit limit setup at FD33, and has a record found in KNKK, which is giving the error "Credit limit customer differs from credit limit customer in header".
However, duting manual creation of sales order via VA01, this error is not encountered.
Any ideas or suggesstions on how we can move forward with SO creation using BAPI with customers where credit management is setup?
Thanks,
LouisseIf thats not working..
try BAPI_SALESORDER_CREATEFROMDAT2
If BAPI is not working. try creating a bdc for the same if there's not error on trying from VA01
Maybe you are looking for
-
My office purchased 20 ipads - and 20 gift cards, I'm setting up all the software on my computer using 1 itunes library.. I need to purchase 20 of the same apps to put on each of the ipads... how can that be done when you purchase the same app..itune
-
How to sync Q10 with outlook calendar through the cloud on a remote laptop
Hello all, I took delivery of a new work mobile today (BB Q10). All set up with my work email installed. Told I can set up to have my work calendar on it as well - great. Got home, installed latest version of BB Link on my laptop (C Drive), connected
-
Mac Mini (2007 model) Ethernet and 802.11N dead
Wow, talk about frustrating...my 13 month old 2007-model Mac Mini just crapped out with a couple of issues. The Ethernet networking reports the cable is unplugged, even though it's not, and the 802.11 wireless networking won't connect at N speeds. Of
-
Install iLife 08 AND iLife 06 ?
I like all of the features in 08 except the some features in iPhoto are not supported by other applications yet (Shutterfly.com exports). Is it possible to install the 08 version and keep a working copy of 06 ?
-
Dock / OSX Freezes After Right-Click
When I right-click anything in my dock, the dock and finder freezes (no pinwheel) until I click something in the top taskbar like my wireless icon or the display icon. If I right-click an application then say I push show desktop or all windows or any