Status overview of sales order
Hi,
I need to make a report for sales order and quntity at different status
Status Quatity
Delivery status 10
Outbound delivery 10
Goods issue status 10
GD goods issue:de 10
Billing status 10
Invoice 10
Similar to what we see in Document flow > Status overview.
Is there any fn module for the same.
on debugging i have noticed that it is calling <b>SD_ORDER_STATUS</b> but this will be very bulky and least efficient.
If there is a select statement (with two or three column in the select list ) can be written (can hav as many joins as long as i issue one SQL) then plz suggest
then it is some thing like this..
*-Get VBAP data for the sales orders based on the
* values entered in selection screen
select p~vbeln " Preceding SD document
p~posnr " Preceding item of an SD document
p~kwmeng " Sales Order Quantity
e~lfrel " Item is relevant for delivery
p~uepos " Higher-level item in BOM structures
into table it_vbap
from vbap as p inner join vbep as e
on p~vbeln = e~vbeln and p~posnr = e~posnr
where p~vbeln in r_vbeln
and p~posnr in r_posnr
and p~abgru = ' '.
from the above you will get sales order quantities...
* Select all the DATA from VBFA
if not it_vbap[] is initial.
select vbelv " Preceding SD document
posnv " Preceding item of an SD document
vbtyp_n " Doc category of subsequent Document
vbeln " Subsequent SD document
posnn " Subsequent item of an SD document
rfmng " Ref. qty in base unit of measure
fktyp
into table it_vbfa
from vbfa
for all entries in it_vbap
where vbelv = it_vbap-vbeln
and posnv = it_vbap-posnr
and rfmng > 0
and ( ( vbtyp_n = 'J' and stufe = 0 )
or ( vbtyp_n = 'M' and stufe = 0 )
or ( vbtyp_n = 'M' and stufe = 1 )
or ( vbtyp_n = 'N' and stufe = 0 )
or ( vbtyp_n = 'N' and stufe = 1 )
or ( vbtyp_n = 'V' and stufe = 0 )
or ( vbtyp_n = 'R' and stufe = 0 ) ).
endif.
this is PO----
loop at it_vbfa where vbtyp_n = c_v.
it_po-vbeln = it_vbfa-vbeln.
it_po-posnn = it_vbfa-posnn.
append it_po.
clear it_po.
endloop.
this is deliveries
* Get all the relevent Deliveries
loop at it_vbfa where vbtyp_n = c_j.
it_del-vbelv = it_vbfa-vbelv.
it_del-posnv = it_vbfa-posnv.
it_del-vbeln = it_vbfa-vbeln.
append it_del.
clear it_del.
endloop.
vijay
Similar Messages
-
Hi Experts
In which tabe we will get the status of the sale order.But in the screen it shows VBSTT-GBSTA_BEZ.
VBSTT is astructure
Regards
ManoHI
For header status VBUK
ITem status VBUP
in these 2 fileds u can billing status , delivery status confirmation status .... -
User status transfer for sales orders from ECC to CRM
Hi,
We use business process with CRM sales orders that are transfer to ERP.
Users can change user status in the sales orders in ERP.
How we can replicate custom user status from ECC Sales Order to CRM Sales Order?
What is the steps to do this for CRM 7.0?
DenisHi,
We are creating quotation ZPQT in CRM which is then get replicated to ECC on saving it on “Accepted” status. In ECC we then create sales order of type ZPOR. Sales order gets replicated in CRM and also updates document flow. This sales order is called as “Project Sales Order”. PS team assigns WBS element to this order and does billing later on. Upon billing document is created sales order status in ECC changes to “Completed”. This is system status. But the issue is status of order ZPOR is CRM remains in status “Inprocess”. We want it to change to “Completed”.
We have similar scenario with order type ZOR. In this order after delivery and billing ECC assigns status “Completed” to sale order and same gets replicated to CRM.
In CRM for user status Completed we have assigned system status as FINI. Both ZPOR and ZOR has same status profile assigned at header and item level.
Our concern is if status is changing back in CRM for ZOR then why not for ZPOR. What is stopping system to do so? -
Complete MRP status according to Sales order schedule line data
Dear All,
Please help me to get technical configuration releted to
"complete MRP status according to Sales order schedule line data"
or MRP w.r.t. Schedule line
Please send fields and table and logic specification .
Thanks & Regards,
Ashish GautamYou can use following Fm for change sales order
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
salesdocument = p_vbeln
order_header_in = s_order_header_in
order_header_inx = s_order_header_inx
behave_when_error = 'P'
TABLES
return = it_return
order_item_in = i_order_item_in
order_item_inx = i_order_item_inx
schedule_lines = i_sched
schedule_linesx = i_schedx. -
Find status of a sales order created using EDI IDOC
Hello everyone,
I have IDOC created for incoming sales order using FM 'IDOC_INPUT_ORDERS'.
When a sales order is created manually iva VA01, it prevents the order from being saved when a specific error is hit unless user resolved it first. However, when the order is created via EDI IDOC, the error is hit and it cannot be created. In the sapmv45a program, i will to say that if it is an EDI IDoc transacion for the order, let it bypass the error and create the order.
Can anyone pls tell me how to check the status of a sales order being created using EDI IDOC ?
Sy-batch does not work.
Thank you in advance.
JoyceJoyce,
If you pay attention the code in FM it is exporting value of da_edi_sign to memory id "SD_EDI_ACTIVE" stored in constant "da_memory_id". ('CONSTANTS: da_memory_id(13) VALUE 'SD_EDI_ACTIVE'.)
In your program you have two you have two options.
1. Declare a constant as in the FM and use that as mentioned below:
CONSTANTS: da_memory_id(13) VALUE 'SD_EDI_ACTIVE'.
IMPORT v_memid FROM MEMORY ID da_memory_id.
2. Hardcode memory id as below:
IMPORT v_memid FROM MEMORY ID 'SD_EDI_ACTIVE'.
Hope this resolves your problem.
Gajendra -
Dear All,
I have a requirement as below
In status profile maintained 5 statuses in the sales order when the user releases 4th status system should not allow to change the sales order .Hi
Your requirement can be fulfilled through a User exit.
You write the logic as below, All the data related to statuses are stored in JCDS and JEST tables.
So you can pass the OBJNR from VBAK to JCDS table there you have to get the status for the fourth profile and look for the fields
INACT and CHIND, if for the fouth status if the CHIND is U then there should not be nay modifications
regards
Prashanth -
Changing the status of the sales order item based on reason for rejection
Hi All,
When a Sales order item is rejected then the status at the item level is changed as 'TECO'.When the reason for rejection is removed the status 'Teco' is reset.This status change can be achieved using the user exit 'MV45AFZZ'.But the exit does not allow re-atp calculation whenver a blocked item is release.I have use the exit 'MV45AFZB' ,through this the status change as well as re-atp calculation takes place.But the status changed(Based on reason of rejection) does not appear in the same screen.The change gets reflected only when the sakes order is saved and i open it again.
I want the status change to appear in the same screen.I am doing my code in the form 'userexit_check_vbap' of the exit 'MV45AFZB'. Please let me know if there are any user exits or BADI's available for the same(Changing the status of the sales order item based on reason for rejection ).
Regards,
S.SubasreeHi subburamaiah
If you want the report you can create a separate SIS report . In that take the input field as a Reason for rejection.. and ask for the output the list of sales orders .Now when you check this user defined report you will give the reason for rejection and check what all orders got rejected on that reason for rejection.
Regards
Srinath -
Change User Status in the sales Order
Hello Experts,
I hope that somebody can help me.
I search to change the field User Status in the sales Order in the transaction VA02 before that the order be displayed.
I have searched in the UE MV45AFZZ, but i didn't found any form that i can use for my issue.
I found one form 'USEREXIT_FIELD_MODIFICATION ' by what the program pass when i press enter in the transaction VA02. but the problem that the status is changed in the data base only and not in the screen. In the screen i have always the same status as what was before, to have the new statut i must leave the transaction and execute it another time.
I don't want use forms for saving. What I want is the new status will be set when i press enter in the transaction VA02.
If doesn't exit one form that can resolve my problem, Can i use the Profile Parameters? In this case How use them?
Thank you very much.Hi,
U can choose ur status in change status profile. Go to IMG-CRMTransactionsBasic SettingsStatus ManagementChange Status Profile for User Status.
Here u hv to define ur new status for the transacxtion and assign it to ur transactio. If u r not clear tell.
Reward points.
Thanx
Chinmaya -
Revenue Recognition based on User Status of assigned Sales Order line item
Dear Community members,
We have requirement to recognize / de-recognize revenue posted to WBS for calculation of RA, based on the 'User status' of the assigned Sales Order line item.
To elaborate requirement further -
1) WBS Element - XXX - 10 ( with operative indicator - Plan/Bill/Account Assign)
2) Sales Order(SO) Line Items assigned to the above WBS -
- SO No - 123 Line Item 10 - Actual Rev - $ 300 - User Status - EXE (Meaning this work is in progress , partial payment received thus actual revenue for RA at WBS is 'Zero'
- SO No - 124 Line Item 20 - Actual Rev - $ 400 - User Status - COMPL(Meaning this work is Complete , all payment received thus actual revenue for RA at WBS is $400
- SO No - 125 Line Item 10 - Actual Rev - $ 800 - User Status - EXE (Meaning this work is in progress , partial payment received thus actual revenue for RA at WBS is 'Zero'
As per WBS reports Actual Revenue posted to WBS XXX-10 is $ 1500 ( $300$400$800) , however since two SO line items ( SO 123 /line item 10 and SO 125 / line Item 10 ) are NOT having User status 'COMPLETE', the actual revenue posted by those line items $ 1100/- ($300 + 800) should not be included as Actual Revenue for RA at WBS level.
Thus Actual Revenue for RA at WBS XXX-10 should be $ 400 /- ( the revenue posted by SO 124/line item 20 which has user status as 'COMPLETE')
How do above can be achieved?? Is there any standard solution for this?? Is any SAP Note available for this (I too am looking for one but not found any ) ?? do we need any enhancement , Customer exit etc
Thanks in advance
with regardsHi,
Thanks. You are right that the 'Completed Contract Method' would defer revenue recognition. However, the status checked would be of the RA object (WBS Element in this case, as RA key is on WBS and RA is being calculated on the WBS).
However, our requirement is to check the user status of the Sales Order Line items assigned to the WBS element and filter the revenues posted based on the active user status of individual Sales Order Line item.
Please give you inputs.
Thanks in advance
With regards -
How to make the status of a sales order complete of which PART DELIVERY
How to make the status of a sales order complete of which PARTIAL DELIVERY has already done. <b>(Assigning rejection status not accepted)</b>
Hi Gyana
There is no document with me. But I can confidently say that because I am using this functionality.
In my case I have created a Order Reason as "Short Closed". once you short close this order only the balance quantity gets rejected (provided you have already made previous delivery and PGI).
Try it in one of your test clients if you have. Once it is short Closed it wont also show in the orders due for processing in Production.
Also you can generate reports based on this if your customer wants to know how many order he has short closed, qty of item short closed etc.
Try it.
Rgds
Sunil -
Delivery status of a sales order
Hi,
I have a requirement wherein I need to extract the delivery status from a sales order.
VA03 --> Header Info --> Status
In this screen you have the various processing status. From that I need to pick up the delivery status.The corresponding field data is VBSTT-LFSTA_BEZ.
Since this points to a structure, I am not able to find out a way to get this value.
Kindly help.
Thanks,
Raj.give the vbeln number in table VBUK
check
the status for delivery as
A / B / C
A not processed
B Partially processed
C completely processed
GBSTK ne C will be overall processing status
LFSTK ne C will be for delivery open
regards,
vijay -
Problem after change item status procedure in sales orders.
Hello experts,
I have changed item status procedure for sales orders. But now all BDoc with queue name CSA_ORDER_xxxxx remain in state 'Written to qRFC Queue (intermediate state)' and needs to be reprocessed manually.
No problem reprocessing.
Have somebody any idea ?
Best regards
Juan SalomHi,
Is your inbound queue un-registered(type U)? Look at trx.
SMQR
and see if it is in un-registered. If yes, select the CSA_ORDER_*** queue and click on
Registration
button.
If this does not help, re-generate your Bdoc services (for Bdoc BUS_TRANS_MSG) using
SMOGGEN
or
using the generation workbench.
Then try the delta once again and observe for queue and Bdoc status in the
SMW01
Hope it helps! Reward if helpful.
Regards,
Sudipta -
Overall processing status issue for sales order regarding services
Hello,
I have the following issue. I am billing a standard service (service without delivery) to a customer. The process goes ok, I issue an invoice, post it and generate an accounting document. Then I create a cancellation invoice. Now I want to reject my sales order. I assign reason for rejection to the item. The header and item status says it is u2018fully rejectedu2019, but the overall processing status says the sales order is u2018openu2019 and therefore appears in reports regarding open orders. I gave also a billing block, deleted the schedule line for the service so that the ordered quantity for the item equals to u20180u2019, but still the overall processing status of the order is u2018openu2019. This is standard SAP functionality (as I checked it). So can anyone explain me how to change this status to exclude this order from open order list? Or maybe someone may want to explain me why this is standard SAP process and what is the reason for the system to want to keep my order u2018openu2019?
Thanks in advance,
BR,|Place the reason for rejection in the status tab at item level, we are doing same, and the order lines does not show in open lines .
Regards
Chandrasekhar -
hi
can any one tell me any function to read the lowest to highest status in a sales order corresponding to a given profile.
for reference you can refer to transaction BS02 and table tj30.
thanks in advance.Hi,
Use table TJ30 or TJ30T(with text) which contains all the status relevant to the status profile.
Cheers,
Sasi -
Credit status and overall blocked status of a sales order
Is there a sap delivered business object that has a method to get credit status and overall blocked status of a sales order?
Hi,
Thanks for the suggestion. I have been looking at BUS2032. It does not give me a method that has the values of credit status and overall blocked status of a sales order. I now am kind of convinced that I will have to extend this object. Can anyone please tell me the steps that I will have to go through to do this. I would like to know if I should write a new function module that gets the required data from tables like VBAK and VBSTT. Should I then call the function module in a method.
Or should I use the getStatus method that BUS2032 provides and get my values from there. A little more detail to this is greatly appreciated.
Regards,
Gayathri
Maybe you are looking for
-
Change CSV device information in subscription?
We have: SQL Server Reporting Services 2008 R2 SP2. We have a report subscription that renders in CSV. The ReportServer.config file has UTF-8 for the Encoding for the CSV rendering. We want to leave that alone. We want to change the encoding to UT
-
On my MacBook Pro "recently added" folder is missing from my itunes. What can i do for this? Plz help me
-
About PL/SQL usage!!!
Where do I use PL/SQL procedures for example? Do I put the calls to them in java methods?
-
SQL 2005 and Database Restores
We have 2 NW2004S systems both with ABAP+Java. When we copy one database over from one system (A) to another (B), we've noticed that the schema attached to all of the tables in on the B system are now A. Using the SQL Tools application from SAP, we w
-
If I set the implementation of an interactivie activity to external, there is checkbox in the dialogue named configuration. Is it for OSB?