Change indicator for sales orders
Hi All,
I would like to know when a change is done to a sales order (in VA02), in order to automatically change its status to the default.
Does SAP stores a flag that indicates whether the order was changed?
Thanks!
Amit
Hi Amit,
Whenever any changes done to any object(eg. Sales Order, Material Master, Customer Master,etc.) in SAP, it is recorded in change document table CDHDR. This table records following important fields,
Object Value
Old Value
New Value
Change date
Time
Transaction(By which changes are done)
So you can find all the changes done to your sales order in this table.
Just Run SE16 >> Table CDHDR >> put your sales order no in field OBJECT VALUE and execute.
I hope this answers your question.
Regards,
Mohit
Similar Messages
-
New/Change Indicator for Sales Order IDoc
Hi Gurus,
Does anyone knows if there's a field in the IDoc Segment for ORDERS that shows or indicate if it's a new or changed order.
We are sending IDocs to our freight company for sales order, but we are trying to see if there's a way we can let them know if its a new or changed IDoc for sales order.
Is there any field for this or any work around on this?
Thanks for your help.Segment Field ACTION is not been changed. I've just tested it and made changes to the Sales Order, the ACTION field is still carrying "000".
Like thomas said, can this be because I'm using message type ORDRSP instead of ORDCHG?
Does this make any difference?
Edited by: Basil Balogun on May 10, 2011 4:54 PM
Edited by: Basil Balogun on May 10, 2011 9:43 PM -
Change pointer for Sales Order
Hi,
Using change pointers I want to create an IDOC when ever a specific field in the sales order line item is changed. I have activated the change pointer for message type ORDRSP. Also maintained the following entries in BD52
VERKBELEG(Object) VBAP(Table) ABGRU(field).
After this when I change this field at the sales order line item, it inserts entries into change pointer table.
But my problem is creating IDOC's from those change pointer entries. I am not sure which function module (MASTERIDOC_CREATE_XXXXX) works for this.
Anyhelp on this highly appreciated.
Thanks
RamHi Ram,
I don't think so you can use change pointer for sales order changes. Usually, it is done through transaction code<b> NACE</b> - configuring condition for output type.
You can setup requeirement in procedure control to trigger IDoc ORDRSP for any changes in item level.
Hope this will help you and give an idea.
Regards,
Ferry Lianto -
Create and Change functionality for Sales order
Hii All,
Can any one please suggest me any Standard program or BAPI or IDOC for Sales order, it should cover create as well as change fuctionality of Sales order.
this is very urgent to me.
Suitable Answer will be Rewarded.
Thankyou,
Shobha.For change you can use:
BAPI_SALESORDER_CHANGE Sales order: Change Sales Order
For create you have the following choices:
BAPI_SALESORDER_CREATEFROMDAT1 Sales order: Create Sales Order
BAPI_SALESORDER_CREATEFROMDAT2 Sales order: Create Sales Order
BAPI_SALESORDER_CREATEFROMDATA Create Sales Order, No More Maintenance
BAPI_SALESDOCU_CREATEFROMDATA with business object 'BUS2032'
The difference between the create ones is the functionality you get e.g. create_from_data2 is the 'most powerful' but you also have to provide the most data. It just depends on what you want it to do.
In terms of IDOCS:
message type:
SALESORDER_CREATEFROMDAT201 or
SALESORDER_CREATEFROMDAT202 or
ORDERS05
Hope that helps,
Michael
Here is an example we use, you might want to populate additional fields or leave fields out in case you want different data to be transferred to the IDOC - however some fields are mandatory.
create the order header structure
ls_header-doc_type = ls_screen-order_type.
ls_header-sales_org = gc_vkorg_aa01.
ls_header-distr_chan = gc_distr_aa.
ls_header-division = gc_divis_aa.
ls_header-purch_no = ls_screen-po_num.
ls_header-po_method = ls_screen-po_source.
ls_header-ship_cond = ls_screen-ship_cond.
create partner input table (sold to)
ls_partner-partn_role = gc_role_sold.
ls_partner-partn_numb = ls_screen-sold_to.
APPEND ls_partner TO lt_partner.
create partner input table (ship to)
ls_partner-partn_role = gc_role_ship.
ls_partner-partn_numb = ls_screen-ship_to.
APPEND ls_partner TO lt_partner.
items are added by looping at a table
ls_item-material = <fs_upload>-matnr.
ls_item-req_qty = <fs_upload>-quantity.
process the quantity, it needs to be three decimals, because it
will be moved into a string in the BAPI and divided by 1000 before
it is moved back into a number field (1.500 => 001500 => 1.5)
ls_item-req_qty = ls_item-req_qty * 1000.
truncate remaining decimal places if exist (1.2525 => 1252.5 => 1252 => 1.252)
ls_item-req_qty = trunc( ls_item-req_qty ).
price is taken from the file
ls_item-cond_type = gc_cond_so_upld_price.
ls_item-cond_val1 = <fs_upload>-price.
condition one (price) is multiplied by 10 in the BAPI
ls_item-cond_val1 = ls_item-cond_val1 / 10.
no discount
ls_item-cd_type2 = gc_cond_so_upld_disc.
ls_item-cd_value2 = 0.
ls_item-item_categ = ls_screen-item_cat.
APPEND ls_item TO lt_item.
then BAPI is called
CALL FUNCTION 'BAPI_SALESDOCU_CREATEFROMDATA'
EXPORTING
order_header_in = ls_header
business_object = gc_bus_obj
IMPORTING
SALESDOCUMENT = lv_vbeln
RETURN = ls_return
tables
order_items_in = lt_item
order_partners = lt_partner.
IF ls_return-type NE gc_msgty_error AND
ls_return-type NE gc_msgty_abend.
No errors where found
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
ELSE.
There was an error or abend
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
ENDIF. -
Change status for sales order in crmd_order
Hi,
I am creating a report which has to change for all sales order with status "Open" to status "Processed". Is there any function or bapi to do this ?? Supposing, there is no function, which tables do i have to change ???
thanks in advance!!!
MariaMmmm it doesn't work... I have tried this:
CALL FUNCTION 'CRM_STATUS_CHANGE_EXTERN_OW'
EXPORTING
CHECK_ONLY = ' '
OBJNR = i_crmd_orderadm_h-guid
USER_STATUS = 'I1003'
SET_INACT = ' '
IV_REF_KIND =
IV_OBJECT_TYPE =
IV_NO_1O_MAINTAIN =
IMPORTING
STONR =
EXCEPTIONS
OBJECT_NOT_FOUND = 1
STATUS_INCONSISTENT = 2
STATUS_NOT_ALLOWED = 3
OTHERS = 4.
If sy-subrc = 0.
endif.
But noting has change in tag Status in tx. CRMD_ORDER.. still have in "system status": In process and in "User status": Order Rep Processed.
Thanks in advance !!! -
Change Documents for Sales Order (VA03)
Hello,
Is it possible to track changes to the text (VA03 - Header Detail - Text Tab) from a Sales Order by using change documents?
Thanks in advance for your help,
CLI don't think that is possible. These are getting stored in Longtext (ie STXH & STXL) by retrieving this also we need to use fm READ_TEXT.
and also in change document table CDPOS fields VALUE_NEW & VALUE_OLD have length limit of 254.
a® -
Triggering event through Change Management for Sales order
I am working on three different scenarios of workflow which is triggered on change of sales order. I am trying to put conditions in SWEC for the workflows to start but not sure how to go about it. I created change doc object VERKBELEG and assigned bus2032 and changed as my event. I inserted a value in condition editor like vbap_(fieldname)_new etc. Nothing seem to be working.
I would like to know once we assign event here in SWEC, should we also assign and activate it in the triggering tab of workflow or just create an entry in the linkage table.
Please guide me as to how I need to work on the sales order change. I am basically want to trigger a sales order only when a field value is updated or inserted which pertains to my requirement.
Thank you very much.Karthik,
My problem is still not resolved. I am trying to put something like this. Let me know if you have were able to do this in any other way.
DATA : i_cdhdr LIKE cdhdr OCCURS 0 WITH HEADER LINE.
DATA : lt_editpos LIKE cdshw OCCURS 0 WITH HEADER LINE.
DATA : it_vbap LIKE vbap OCCURS 0 WITH HEADER LINE.
DATA : flag(1) TYPE c.
DATA : text LIKE message-msgtx.
DATA: BEGIN OF ITAB OCCURS 10.
INCLUDE STRUCTURE cdshw.
DATA: UDATE LIKE CDHDR-UDATE,
USERNAME LIKE CDHDR-USERNAME,
CHANGENR LIKE CDHDR-CHANGENR,
VBELN(10),
POSNR(6),
ETENR(4),
INDTEXT(200),
END OF ITAB.
data : lv_vbeln like vbap-vbeln.
data : lv_posnr like vbap-posnr.
SELECT vbeln posnr FROM vbap INTO TABLE it_vbap WHERE
vbeln = ' ' AND
posnr = .
i_cdhdr-objectclas = 'VERKBELEG'.
i_cdhdr-objectid = ' '.
CALL FUNCTION 'CHANGEDOCUMENT_READ_HEADERS'
EXPORTING
objectclass = 'VERKBELEG'
objectid = ' '
username = space
time_of_change = i_cdhdr-utime
TABLES
i_cdhdr = i_cdhdr
EXCEPTIONS
no_position_found = 1
OTHERS = 2.
IF sy-subrc EQ 0 AND NOT i_cdhdr[] IS INITIAL.
sort i_cdhdr by CHANGENR UDATE UTIME descending.
LOOP AT i_cdhdr.
CALL FUNCTION 'CHANGEDOCUMENT_READ_POSITIONS'
EXPORTING
changenumber = i_cdhdr-changenr
TABLES
editpos = lt_editpos
EXCEPTIONS
no_position_found = 1
OTHERS = 2.
ENDLOOP.
**change in fname is eq lprio delete the records.
loop at lt_editpos.
if lt_editpos-fname = 'LPRIO' and
lt_editpos-CHNGIND = 'U' and
lt_editpos-F_NEW = '03' and
lt_editpos-tabname = 'VBAP'.
flag = 'X'.
concatenate lt_editpos-fname lt_editpos-f_new into text.
exit.
elseif lt_editpos-fname = 'KEY' and
lt_editpos-CHNGIND = 'I' and
lt_editpos-tabname = 'VBAP'.
lv_vbeln = lt_editpos-tabkey+3(10).
lv_posnr = lt_editpos-tabkey+13(6).
select single * from vbap into it_vbap where
vbeln eq lv_vbeln and
posnr eq lv_posnr.
if sy-subrc = 0 and it_vbap-lprio = '03'.
flag = 'X'.
concatenate lv_vbeln lv_posnr it_vbap-lprio into text.
exit.
endif.
endif.
endloop.
endif. -
Creating change log for sales order
hi all,
i want to create change log for any given sales order if it exists.
can any one tell me how to do that??Hi Gouri,
CDHDR and CDPOS are the tables for all change history.
CDHDR contains the details such as who made the change, when, using what tcode and the change type ie. update, delete.
CDPOS contains the field name which was changed, its old value and its new value.
The change document object is VERKBELEG for sales documents.
The object value is the SD document number with leading zeros.
The following link will be also useful.
http://www.sap-img.com/ab024.htm
Regards,
Nitin. -
Hi All,
When the Route changes in the Sales Order, I want to add the Forwarding agent to the Partfner function atutomatically. So I written the code in the User-Exist "userexit_check_vbap" with the following logic.
IF sales order is creating with VA01, Add an entry
and Changing the Sales order with VA02, modifiy an exisiting entry as follow.
But at the time of Creating with VA01, it is sucessfully adding an entry, but
whenever you the change Route for sales order with va02, Modify statement is working fine and showing the correct Partner function in the Partner Tab.
If you save the document and open it again then Changed Route is sucessfully saved but not the partner function. It always having the partner function which you given at the time of creation.
Can we write the modify statement in the "Userexist_check_vbap"
READ TABLE xvbpa WITH KEY parvw = 'ZR'
posnr = xvbap-posnr.
IF sy-subrc NE 0.
SELECT SINGLE * FROM lfa1 INTO CORRESPONDING FIELDS OF xvbpa
WHERE lifnr = tdlnr.
xvbpa-mandt = xvbap-mandt.
xvbpa-vbeln = xvbap-vbeln.
xvbpa-posnr = xvbap-posnr.
xvbpa-fehgr = '08'.
xvbpa-nrart = 'LI'.
xvbpa-lifnr = tdlnr.
xvbpa-updkz = 'I'.
CLEAR: xvbpa-kunnr, xvbpa-stceg.
xvbpa-parvw = 'ZR'.
APPEND xvbpa.
ELSE.
xvbpa-lifnr = tdlnr.
MODIFY xvbpa TRANSPORTING lifnr WHERE parvw = 'ZR'
AND posnr = xvbap-posnr.
ENDIF.
Please suggest me , how can i solve this problem.
Thanks and Warm Regards,
VijayI solved the problem by pass the following value
xvbpa-updkz = 'U'.
It solved my problem. -
Hi All
If I am not mistaken, one cannot do a STO for special stock using 2 step transfer, however it is possible in a one step process.
I have made the setting in config to use a one step process, and it have been set up to use movement type 647.
I am trying to move Sales order stock from one plant to another plant, and want to maintain it as special stock.
I can get the process to create the delivery, however, when I try and post goods issue the delivery document, I get the following message.
MSSA-SABWE exceeded by 2 EA: CISCO1402 ZA30 1000 SALEABLE E
Cisco1402 is the material
ZA30 is the plant
1000 is the storage location
Saleable is the split valuation we using
E is the special stock indicator for sales order stock.
If anyone could please give me some direction.
ThanksHi
We are not using blocked stock at all in any of our processes.
My understanding is that movement type 647 will not look or put stock into blocked stock.
If I look at table MSSA, for that Sales order number and material number, it comes up with one entry. It has a quantity of 2 in unrestricted, Val. GR Blocked Stck is 0.
Should the quantity of 2 be appearing in there?
So the process followed thus far is:
Sales order raised
Preq auto created from SO
Preq converted to PO
GR for PO
STO created to move sales order stock from one plant to another
Delivery created,
cannot post goods issue.
Thanks -
Report for Sales Order Change History CDPOS and CDHDR
How to take a report of the data for the Sales Order Change history for a particular period of time. It is required to take a report of all the Sales Orders for which the basic price has been changed. Please let me know the procedure. I could not get the data from the table CDPOS and CDHDR
Helpful answer would be rewarded.
Regards
PraveenDear Praveen Kumar
Have you tried with VBAP where sale order details at item level would be stored.
Moreover, to my knowledge, there won't be any changes as for as pricing is concerned at sale order level but there is at billing level. Normally, any price increase / decrease would reflect in billing. So why dont you to table join through SQVI VBAP (for sale order details) and VBRP (for billing details) so that you can compare the selling price in sale order with billing.
Thanks
G. Lakshmipathi -
Program for mass change in the sales order.
Hi,
I have a requirement where If we make changes in the availability check rule of the material master(for e.g. 02 to 01),then the same rule should be changed in the sales order as well.
Though this will be changed for the new orders but is there any program which we can run manually or in the background in order to make changes in the old sales orders.
Regards
KaranHi,
U cannot change checking group or checking rule for availabillity check at sales order level, u can change requirements type.
If u want to change requirements type determined into sales orders, which r already created go to t.code MASS and select the object type sales orders and press execute, select sales order item data on tables tab,and select requirements type on fields tab and press execute.specify sales documents number from and to and item numbers, and press execute and specify the new value and press carryout mass change button and then save.
with regards,
kirankumar vemula -
Impact Analysis: Business Area, Profit Center changed for Sales Order type
Hi All,
Can you please let me know the impact of changing the Business Area and Profit Center for Sales Order Document types.
Scenario:
Let's say that sales document type ZOR has been used for sometime. On this document x number of sales orders have been raised, delivered and invoiced over the years.
Now, if you change the Business Area and Profit Center what would be the business impact.
thanks,Hi,
First of all itu2019s not a good business practice to change the Business area and Profit Centre.
However if at all l you change the Business area and Profit centre the following is the impact::
Business Area: effects the sales order in accounts assignment at Header level.
Profit centre: effects the accounting part at Item level
Overall in MIS reporting w.r.t Profit and Business Analysis in Finance will be affected.
Thanks and regards
DSR -
Detecting change on header and item texts for sales order in user exit
Hi,
In the user exit of VA02, I need to identify/detect if header or item texts for sales order is changed or not.
Please advise on this.
Regards,
ShreyasNormally system stores the old values in XTables and new values in YTables. Check if you have access to these in your user exit. If you give the user exit name, someone will be able to guide you.
hith
Sunil Achyut -
Authorization for Change Conditions in Sale order or Billing document
Good Morning
In my scenario we have same pricing procedure for sale order and billing document. My requirement is to enter one condition manually in sales order.
I want a specific user to enter this discount condition for a specific distribution channel only manually only in Sales order, not in billing document.
Now here are some problems i am facing now.
We have to make this for one user and for one distribution channel only.
I can't use transaction variant to make condition tab in display because all users are allowed to enter freight condition manually at the time of invoicing.
I have tried authorization object V_KONH_VKS but its not working. This is for maintain condition record not for entering in sales or billing document manually.
Please suggest me is there any standard way to do this or should I go for ABAP?
I prefer to do this with authorizations control. ABAP will be the last solution.I have a feeling that via PFCG, this can be controlled and of course, with the object what you had indicated and Activity type.
Create two roles one for maintaining manually in sale order and the other one for display.
In one role, the activity can be 01 with TCode VA01 and VA02 and in the second role, the activity can be 03 with transaction VF01. Your basis guy should be able to do this so that the requirement can be achieved.
thanks
G. Lakshmipathi
Maybe you are looking for
-
ITouch does not appear in iTunes - file processes missing
I recently updated to 9.2 about three weeks ago. When I plug in my iTouch, it is recognized by Windows and charges; however, it never appears in iTunes. I have a classic iPod. iTunes will recognize it and sync it. When I looked into the file processe
-
When ı try to set up my project to other computer , my project takes error on build. I m using eclipse Juno .I looked my weblogic.jar i didn't find weblogic.jws.jaxws.client.async.AsyncTransportProvider class in it. What should i do ? Stacktrace : <
-
When I get ios 6 will my current ios (ios 5) be taken off the device
I would like to know that when a new iOS is put On to a device that the old one is removed and The new one takes it's spot ?
-
Having trouble with music apps shutting down, even after I swipe them off the screen. They go off then come back on in a few minutes. This happens in my car either ubs plugged in, or bluetooth. ANy one else have that issue?
-
Hi I am exporting a spreadsheet from ALV. There are about 126 columns and all columns are getting exported to the file but the record is not coming in single row. The last column filled was CT and then the next column filled is column A for the same