Sales Order Report Showing Cost on the Sales Order & total invoice dollars
I am looking for a report in SAP that shows you the Sales Order number, the cost on the sales order (NOT the average cost) the actual cost on the sales order detail line and then the total invoice dollars in month to date and year to date?
Thanks,
Linda
You can use <b>T.code: COOIS </b> if Product Costing has been configured for MTO scenario whcih gives the costing details.
You can also use To.code: <b>KE30</b> if CO-PA implemented.
but if you want to link with billing, Please search for any reports in Sales information system.
One more you can create a ABAP Query Report using T.code: <b>SQVI</b>
Regards,
Anbu
Similar Messages
-
Production Order and Internal Order for each item of the sales order
Hi
I am developing Make To Order Report where I have to display the MTO Line Items and non MTO Line Items. For non MTO Line Items I have to display Internal order with Planned and Actual Costs and also Production Order with Planned and Actual Costs. Could anybody tell how to get the Internal order no and production order with Planned and Actual costs for each line item for a sales order.
Thanks
NagaHi,
You can get the Production orders, Planned orders, Internal orders generated for Sales order item from AFPO table (use fields KDAUF-Sales order number & KDPOS-Sales order item). Then to identify the order type use order category (AUTYP) from table AUFK.
Once you have the Production/internal order, you can ge the cost from COSS and COSP table. Use the object number from AUFK to get the cost entries from COSS & COSP.
You can use the following sample code as reference.
Hope this is helps.. (Don't forget to mark it... )
Form GET_COSTS *
Get the material cost, labour hours and the labour cost for the *
sales order material. *
There are no interface parameters to be passed to this subroutine. *
FORM GET_COSTS.
DATA V_OBJNR LIKE AUFK-OBJNR.
DATA v_menge LIKE vbap-kwmeng.
SELECT SINGLE OBJNR
INTO V_OBJNR
FROM AUFK
WHERE AUFNR EQ AFPO-AUFNR.
SELECT * FROM COSS
WHERE OBJNR EQ V_OBJNR
AND WRTTP IN ('01', '04'). " p_wrttp. "Labour Cost ( Plan, Actual)
PERFORM GET_VALUES_FROM_COSS.
ENDSELECT.
SELECT * FROM COSP
WHERE OBJNR EQ V_OBJNR
AND WRTTP IN ('01', '04') " p_wrttp
AND KSTAR NE '0000510033'. " EQ p_kstar2. "Material Cost
PERFORM GET_VALUE_FROM_COSP.
ENDSELECT.
Get the unit cost of the production order by dividing the production
cost by the order quantity. The result will be multiplied by the
GL posting qunatity (Delivery quantity) to get the production cost
for the quantity being deluivered.
IF NOT AFPO-PSMNG IS INITIAL.
OUT_REC-LABOUR_HOURS_ACT = OUT_REC-LABOUR_HOURS_ACT / AFPO-PSMNG.
OUT_REC-ADDNL_LABOUR_HOURS_ACT =
OUT_REC-ADDNL_LABOUR_HOURS_ACT / AFPO-PSMNG.
OUT_REC-LABOUR_HOURS_PLN = OUT_REC-LABOUR_HOURS_PLN / AFPO-PSMNG.
OUT_REC-ADDNL_LABOUR_HOURS_PLN =
OUT_REC-ADDNL_LABOUR_HOURS_PLN / AFPO-PSMNG.
OUT_REC-LABOUR_COST_ACT = OUT_REC-LABOUR_COST_ACT / AFPO-PSMNG.
OUT_REC-ADDNL_LABOUR_COST_ACT =
OUT_REC-ADDNL_LABOUR_COST_ACT / AFPO-PSMNG.
OUT_REC-LABOUR_COST_PLN = OUT_REC-LABOUR_COST_PLN / AFPO-PSMNG.
OUT_REC-ADDNL_LABOUR_COST_PLN =
OUT_REC-ADDNL_LABOUR_COST_PLN / AFPO-PSMNG.
OUT_REC-MATERIAL_COST_ACT = OUT_REC-MATERIAL_COST_ACT / AFPO-PSMNG.
OUT_REC-ADDNL_MATERIAL_COST_ACT =
OUT_REC-ADDNL_MATERIAL_COST_ACT / AFPO-PSMNG.
OUT_REC-MATERIAL_COST_PLN = OUT_REC-MATERIAL_COST_PLN / AFPO-PSMNG.
OUT_REC-ADDNL_MATERIAL_COST_PLN =
OUT_REC-ADDNL_MATERIAL_COST_PLN / AFPO-PSMNG.
ENDIF.
Multiply the calculated Unit Production costs with the GL quantity to
get the actual production cost of the quantity delivered.
Calculation for Labour Hours
OUT_REC-LABOUR_HOURS_ACT = OUT_REC-LABOUR_HOURS_ACT *
OUT_REC-QUANTITY.
OUT_REC-ADDNL_LABOUR_HOURS_ACT = OUT_REC-ADDNL_LABOUR_HOURS_ACT *
OUT_REC-QUANTITY.
OUT_REC-LABOUR_HOURS_PLN = OUT_REC-LABOUR_HOURS_PLN *
OUT_REC-QUANTITY.
OUT_REC-ADDNL_LABOUR_HOURS_PLN = OUT_REC-ADDNL_LABOUR_HOURS_PLN *
OUT_REC-QUANTITY.
Calculation for Material Cost
OUT_REC-MATERIAL_COST_ACT = OUT_REC-MATERIAL_COST_ACT *
OUT_REC-QUANTITY.
OUT_REC-ADDNL_MATERIAL_COST_ACT =
OUT_REC-ADDNL_MATERIAL_COST_ACT * OUT_REC-QUANTITY.
OUT_REC-MATERIAL_COST_PLN = OUT_REC-MATERIAL_COST_PLN *
OUT_REC-QUANTITY.
OUT_REC-ADDNL_MATERIAL_COST_PLN =
OUT_REC-ADDNL_MATERIAL_COST_PLN * OUT_REC-QUANTITY.
Calculation for Labour cost
OUT_REC-LABOUR_COST_ACT = OUT_REC-LABOUR_COST_ACT *
OUT_REC-QUANTITY.
OUT_REC-ADDNL_LABOUR_COST_ACT = OUT_REC-ADDNL_LABOUR_COST_ACT *
OUT_REC-QUANTITY.
OUT_REC-LABOUR_COST_PLN = OUT_REC-LABOUR_COST_PLN *
OUT_REC-QUANTITY.
OUT_REC-ADDNL_LABOUR_COST_PLN = OUT_REC-ADDNL_LABOUR_COST_PLN *
OUT_REC-QUANTITY.
Get the planned material cost from the total of the planned cost of
the component materials in the production order confirmations.
SELECT BWART MENGE MATNR SHKZG FROM AUFM
INTO (AUFM-BWART, AUFM-MENGE, AUFM-MATNR, AUFM-SHKZG)
WHERE AUFNR EQ AFPO-AUFNR.
CHECK AUFM-BWART NE '101'.
READ TABLE I_MBEW WITH KEY MATNR = AUFM-MATNR
BWKEY = AFPO-DWERK.
IF SY-SUBRC NE 0.
SELECT MATNR BWKEY ZPLPR LPLPR PEINH
FROM MBEW
INTO I_MBEW
WHERE MATNR EQ AUFM-MATNR
AND BWKEY EQ AFPO-DWERK.
APPEND I_MBEW.
ENDSELECT.
ENDIF.
IF SY-SUBRC EQ 0.
IF I_MBEW-ZPLPR NE 0.
IF AUFM-SHKZG EQ 'H'.
OUT_REC-PLANNED_MATERIAL_COST =
OUT_REC-PLANNED_MATERIAL_COST +
( I_MBEW-ZPLPR * AUFM-MENGE / I_MBEW-PEINH ).
ELSE.
OUT_REC-PLANNED_MATERIAL_COST =
OUT_REC-PLANNED_MATERIAL_COST -
( I_MBEW-ZPLPR * AUFM-MENGE / I_MBEW-PEINH ).
ENDIF.
ELSEIF I_MBEW-LPLPR NE 0.
IF AUFM-SHKZG EQ 'H'.
OUT_REC-CURRENT_MATERIAL_COST =
OUT_REC-CURRENT_MATERIAL_COST +
( I_MBEW-LPLPR * AUFM-MENGE / I_MBEW-PEINH ).
ELSE.
OUT_REC-CURRENT_MATERIAL_COST =
OUT_REC-CURRENT_MATERIAL_COST -
( I_MBEW-LPLPR * AUFM-MENGE / I_MBEW-PEINH ).
ENDIF.
ENDIF.
ENDIF.
ENDSELECT.
Get the Future material cost per Unit by deviding the calculated
Future material cost above with the goods reciept quantity to, then
multiply the unit cost with the GL quantity to get the Future material
Cost for the Quantity delivered. (Quantity in the entery from GLPCA
Table).
IF NOT AFPO-WEMNG IS INITIAL.
OUT_REC-PLANNED_MATERIAL_COST =
OUT_REC-PLANNED_MATERIAL_COST / AFPO-WEMNG * OUT_REC-QUANTITY.
OUT_REC-CURRENT_MATERIAL_COST =
OUT_REC-CURRENT_MATERIAL_COST / AFPO-WEMNG * OUT_REC-QUANTITY.
ENDIF.
ENDFORM. " GET_COSTS
Form GET_VALUE_FROM_COSP *
Get the Material cost from COSP table. *
There are no interface parameters to be passed to this subroutine. *
FORM GET_VALUE_FROM_COSP.
FIELD-SYMBOLS: <FS> TYPE ANY.
DATA: V_COMPONENT TYPE I.
Cummulate the posting values of all the 16 period buckets as to get
total production order cost. This is to handle the aprtial posting of
prodction order values in diffrent periods.
V_COMPONENT = 15.
DO 16 TIMES.
ADD 1 TO V_COMPONENT.
ASSIGN COMPONENT V_COMPONENT OF STRUCTURE COSP TO <FS>.
IF COSP-WRTTP EQ '04' AND COSP-KSTAR EQ P_KSTAR2.
ADD <FS> TO OUT_REC-MATERIAL_COST_ACT.
ELSEIF COSP-WRTTP EQ '04'.
ADD <FS> TO OUT_REC-ADDNL_MATERIAL_COST_ACT.
ELSEIF COSP-WRTTP EQ '01' AND COSP-KSTAR EQ P_KSTAR2.
ADD <FS> TO OUT_REC-MATERIAL_COST_PLN.
ELSEIF COSP-WRTTP EQ '01'.
ADD <FS> TO OUT_REC-ADDNL_MATERIAL_COST_PLN.
ENDIF.
ENDDO.
ENDFORM. " GET_VALUE_FROM_COSP
Form GET_VALUES_FROM_COSS *
Get the Labour cost and Labour hours from the COSS table. *
There are no interface parameters to be passed to this subroutine. *
FORM GET_VALUES_FROM_COSS.
FIELD-SYMBOLS: <FS1> TYPE ANY,
<FS2> TYPE ANY.
DATA: V_COMPONENT1 TYPE I,
V_COMPONENT2 TYPE I.
Cummulate the posting values of all the 16 period buckets as to get
total production order cost. This is to handle the aprtial posting of
prodction order values in diffrent periods.
V_COMPONENT1 = 15.
V_COMPONENT2 = 111.
DO 16 TIMES.
ADD 1 TO: V_COMPONENT1, V_COMPONENT2.
ASSIGN COMPONENT V_COMPONENT1 OF STRUCTURE COSS TO <FS1>.
ASSIGN COMPONENT V_COMPONENT2 OF STRUCTURE COSS TO <FS2>.
IF COSS-WRTTP EQ '04' AND COSS-KSTAR EQ P_KSTAR1.
ADD <FS1> TO OUT_REC-LABOUR_COST_ACT.
ADD <FS2> TO OUT_REC-LABOUR_HOURS_ACT.
ELSEIF COSS-WRTTP EQ '04'.
ADD <FS1> TO OUT_REC-ADDNL_LABOUR_COST_ACT.
ADD <FS2> TO OUT_REC-ADDNL_LABOUR_HOURS_ACT.
ELSEIF COSS-WRTTP EQ '01' AND COSS-KSTAR EQ P_KSTAR1.
ADD <FS1> TO OUT_REC-LABOUR_COST_PLN.
ADD <FS2> TO OUT_REC-LABOUR_HOURS_PLN.
ELSEIF COSS-WRTTP EQ '01'.
ADD <FS1> TO OUT_REC-ADDNL_LABOUR_COST_PLN.
ADD <FS2> TO OUT_REC-ADDNL_LABOUR_HOURS_PLN.
ENDIF.
ENDDO.
ENDFORM. " GET_VALUES_FROM_COSS -
Sales analysis report- showing & totaling both Invoices & Credit memos on o
I have written a Several sales analysis reports based on INV1 tables and RIN1 tables, (Invoice lines and Credit memo lines) for SAP B1 using crystal. I would like the data from both the invoices & the credit memo to list & total on the same report. But have had no luck doing this.
Is it possible?
How would I go about doing it?Solved my problem, I used the "Show SQL Query" window on my existing reports copied and pasted them to SQL Management Studio as a View, used keyword Union All to join the two queries (Invoices and Credit memos) and used the view as the data link to create a new report in Crystal Report writer.
This got me both of the data files into the report detail line and allow for summing.
Problem solved.
Thanks for the input. -
'Order type not defined in the sales area'.
Hi,
I am creating a sales order, in order type I am taking standard order 'OR' but it is giving error message -'Order type not defined in the sales area'.
Pls where to tweak..
regards,Hi,
In the transaction code OVAZ you can assign the SALES ORDER type to your SALES AREA
and also check the below transaction code
OVAM--- Reference distribution channel
OVAN---- Reference Division
OVAO ---Reference sales organisation
revert back if you need any more
thanks
santosh -
Report on " commission of the sales department with sales representative"
Hi,
Can any one help me out in developing a basic report on " commission for the sales department sorted by sales representative"
Tell me which field Holds the commission value, and how sales department and sales representative are related.
Kindly help me in giveing tables and condition for the above.Kiran,
For these details there will be standard reports given by SAP. For some reasons if you are looking at a custom report, the same will be available in VBAK, VBAP, LIKP tables.
If you are looking for more details, please explain.
Regards,
Ravi
Note : Please mark the helpful answers -
Purchase order to Asset non imposed the Internal Order.
I'm entering a purchase order of an asset tied to an internal order of investment. The order has a budget X. If I enter a purchase order with value greater than the amount budgeted in the internal order, the system allows me to create the request and not imposed the internal order. In the report S_ALR_87013019, the order has no value released.
How can the system do not allow the purchase of assets with values greater than estimated and how to make that encumbers the purchase order and appear in the report S_ALR_87013019?
This only happens in the purchases of assets!
Thanks in advanced!
GLMacedoMy friend, see my answer to witch point.
1. Your Asset APC account should be Category 90 (Statistical) Cost element
The Internal Order is Statistical (I see in KO03). Should I verify in another place?
2. your Internal Order must be of category "Investment" and not "Overhead"
OK
3. Assign this Internal order in your Asset Master in the field "Investment Order"and not "Internal Order"....
OK
if Investment Order is not visible in Asset Master, change your screen layout of the asset and plug it in (IMG > AA > Master Data > Screen layouts)
4. Do settings in T code ACSET - Allow EAUFN for Trn Type = *, Acct Assign Type = APC Postings, and check the Acct Assgn check box
I don´t know how can I do this. How Can I Do?
Allow commitment management in your contr area OKKP and in your Internal order type (KOT2_OPA)
My type Order (investment) in KOT2_OPA is OK (commitment management was allowed). But in OKKP it is not! It is a critical setting. Should I flag this field?
6. Feield Status Group of Asset must allow CO/PP Order in OBC4
OK
Thank you very much! -
How can we transfer the waste/rejection cost to the Sales order?
< MODERATOR: Message locked. Please post this message in the [Asset Accounting forum|SAP ERP Financials - Asset Accounting;. >
We are working in a make-to-order environment. (A Mill industry that manufactures BOPP films)
Scenario: There are 4 different Sales orders and for each of them we have a production orders as shown below:
SlsOrd Slordqty Prdord Prdordqty FSG wasteqty
1000000010 1000kg 200001 1000kg 1000kg 0 kg
1000000020 1500kg 200002 1500kg 1500kg 0 kg
1000000030 2000kg 200003 2000kg 1900kg 100kg
1000000040 1500kg 200004 1500kg 1350kg 150kg
Now the question is that how we can divide this 250 kg waste cost on above mentioned 4 different sales order in month end propotionally? We can not move the wastematerial cost on productionorder neither can we confirm the waste material cost via activity type on production order because we have to move this waste material to Waste stock on Zero value.
Solution required: Some how I have to move the waste material to waste stock on zero value with the waste cost still being charged on the sales orders.Hi,
have you set up CO-PA? Then define the sales order as a characteristic, and when posting the waste cost in FI, use the sales order as a cost receiver. The sales order related profitability will follow from CO-PA standard reporting.
Kind regards,
Rudolf -
Calling VA01 from Report,how to get the Sales Order No when Back.
Hi all,
I have a requirement of calling va01 from the report and have done that using
did recording ...&
call transaction va01 using bdcdata.
but my problem is when back from that trasaction i have to get the sales order that is created . Is it possible to retrieve that value from va01 .i am unable to get . anyone pls shareUse the addition MESSAGES INTO itab with call transaction va01 using bdcdata.
Effect of MESSAGES INTO itab:
Using this addition, all the messages sent during batch input processing are stored in an internal table itab of the type BDCMSGCOLL from the ABAP Dictionary.
If the call transaction is successful then retrieve the last message from itab and then in any field among MSGV1,MSGV2,MSGV3,MSGV4 of itab u will get the document no.
And when doing the call transaction pl. choose update mode as 'S' or 'L'.
Regards,
Joy. -
Which field shows me that, the Sales Order is under CREDIT BLOCK?
Hi Experts,
I know that, I can see weather the Sales Order is under Delivery block, by looking VBAK-LIFSK.
So, pls. let me know that, weather the Sales Order is under CREDIT BLOCK? which field, table telle me?
thanqHi,
Look for field CMGST in VBUK or
CRBLB check box in KNKK table.
thanks
Dan -
Sales BOM distribute header cost to the subitems in the invoice
Hi all,
I have next BOM scenario in the invoice:
Header Item Sales Price: 0 Cost: 20
Subitem 1 Sales Price: 20 Cost: 0
Subitem 2 Sales Price: 20 Cost: 0
I can't move up the Sales Price of the subitems, because they are relevant for the pricing and the invoice.
I'd like to distribute the cost of the header item to their subitems.
It's possible? Perhaps with a routine in the copy control or an alternative calculation type in the Princing Procedure?
What I'd like to get is:
Header Item Sales Price: 0 Cost: 0
Subitem 1 Sales Price: 20 Cost: 10
Subitem 2 Sales Price: 20 Cost: 10
Thanks in advanceYou can use <b>T.code: COOIS </b> if Product Costing has been configured for MTO scenario whcih gives the costing details.
You can also use To.code: <b>KE30</b> if CO-PA implemented.
but if you want to link with billing, Please search for any reports in Sales information system.
One more you can create a ABAP Query Report using T.code: <b>SQVI</b>
Regards,
Anbu -
Incorrect Sales order line item assignment to the Planned order
Hi,
I am creating a sales order & then MRP run to get planned orders.
The sales order has one assembly line item, which is a configurable material. Inside the configuration of the assembly, I maintain some components. After saving it explodes and the same components reflect below line items of the assebly in sales order.
Now if I run MRP there is a requirement for the component and so the planned order is created for the component. But If I open the planned order & see inside its Assignment view, there is correct sales order number, but the line item its showing is that of Assembly and not of the component. Why ? Is there any wrong in configuration or any wrong in planning type ?
I checked correct Item category is used.
MRP Type - PD
Correct requirement type is used in procurement view.
I think what ever is comming is standard SAP functionality. But I am not sure.
The client is saying, thie is wrong and because of this the warehouse guy is picking the wrong material (As the line number is wrong).
Please suggest here.Hi Sambit,
We assign the Ordet type(Production order/ Planned order/ Network) to the requirment class to let the system know that for the material which has this requirment class , system chould create a Planned/ Procustion order. When you assign this normally system should create it automatically based on the settings. Requirment class comes from the requirment type which comes from the Item category and MRP type(*Genarally). Also check if there is any startegy Group assigned to the material in the material master and also the MRP group. Check the strtegy group defualts in the transaction "OPPS"(rEQUIRMENT TYPE /class FOR CUstome requirments). The best thing you could do is make the screen shots of the assembly header and the component's requirment classes and tell the business that based on this sytem is creating the planned order.And also check the plant parameters and the MRP group parameters in "OPPQ" and "OPPR" respectively. Kindly please let me know if you need any more infromation on this.
Regards,
Ram Pedarla -
Material list not showing after saving the sales document
Hi
any body can give the answer for this question : AFTER SAVING THE SALES ORDER MATERIAL LIST IS NOT SHOWING . Thanks in advanceHi,
Go to Menu EDIT >> DISPLAY RANGE >> ALL ITEMS
Also set it on sales order document type in VOV8
Display Range - UALL
Kapil -
Sales Commission poting to Cost Centers Through Sales Order
Dear All
I have a situation. My Client want to post commission on different Cost Centers for different materials on the processing of Sales Order.
I mean when a sale order is processed the Commission will be expended in One GL but it should be posted to different Cost Centers for Different Materials
Can any one please help me how i can configure this
Regards
Bilal AtharHi,
You can try to create a substitution in CO (OKC9) and to substitute cost centre based on material number - COBL-MATNR (grouped in sets).
Regards,
Eli -
Purchase Order missing for some of the Sales Order for few customers
Hi All,
There are few sales orders for which corresponding PO is missing.
But most of other Sales orders for the same set of customers, PO is coming.
Could you please enlighten me how this PO is assigned to the Sales order or it is updated with the Inbound Idoc ..
In any case what may be the reason for PO missing for these sales order...How I can explore this...?
Thanks,
SanjeetHi sanjeet,
If your IDOC is ORDERS05, Check if you are getting the PO Number in : E1EDK01-BELNR
Regards,
Ravi -
How to drive sales order Organizational Unit to equal the Sales Office
CRM 7.0, sales order is using org rule ORGMAN_23 which has FM CRM_ORGMAN_ORGOBJECTS_FIND_11
The sales order finds the sales org, dist channel, division, sales office, and sales group but the Organizational Unit always matches the sales group.
Will any of the delivered FM's used in PFAC
CRM_ORGMAN_ORGOBJECTS_FIND_1
CRM_ORGMAN_ORGOBJECTS_FIND_2
CRM_ORGMAN_ORGOBJECTS_FIND_3 ......
return the results I desire? or will we need to copy and modify one of these FM's.Hello,
You need to adjust your org structure in ppoma_crm.
Currently the org unit which is mapped to an ECC sales group holds the attributes that mapped to the BP's sales area data.
(If you are using rule ORGMAN_23).
Please create an org unit, which is not mapped to the sales group, with the desired attributes, then assign the BP to this org unit.
Best regards,
Maggie
Maybe you are looking for
-
Hi Trying to build a labview program, which just reads AIO on the pxi-7854R board that is installed in a PXIe=1062Q Can you help? below is the error message: Error Code: -63040 NI-RIO: (Hex 0xFFFF09C0) A connection could not be established to the s
-
I tried to restore my ipod touch 2nd generation and now it won't sync to itunes. On the screen is the USB end of the cord and the iTunes logo over it. I have turned it off and on, held the off button down and the select button down but it still
-
How to handle multiple sessions in Script recorder
Hi, I have a requirement to update certain records from a program. For that I have to put a breakpoint the program (which I did manually). Now when I use the scripting tool to record the events, only events related to the original session gets record
-
How to upload a photo editor onto a website?
I am building a website freepicedit.com on godaddy website builder and I want to upload a photo editor onto the site in JavaScript or PHP? Do you have any products that I can do that with ? Photoshop ?
-
How to Rename the Dashboard name
Hi, How to change/rename the dashboard name. Thanks, Malli