Sales order history table
Hello,
i m getting confused can any one tell me in which
table the changes made in sales order are stored.
Hi Gouri,
Changes to a lot of SAP documents are stored in table CDHDR and table CDPOS. This include changes such as: change data in Material Master, changes to Purchase Req (PR), Purch Orders, Contracts, Sales Orders.
CDHDR - Change Document Header.
CDPOS - Change Document Items.
Hope it helps u!
Regards,
Mamta
Similar Messages
-
Table name for sales order history
hi guys,
I want to know the name of table which contains sales order history.
regards
neeleshHi
Use this code it will get all the details
Sales Order Changed History Display
Sales Order Changed History Display
You can execute the report by :
1. Change Date
2. User Name
3. Sales Order Number
Submitted by : SAP Basis, ABAP Programming and Other IMG Stuff
http://www.sap-img.com
REPORT ZSDCHANGE LINE-SIZE 132 NO STANDARD PAGE HEADING
LINE-COUNT 065(001)
MESSAGE-ID VR.
TABLES: DD04T,
CDHDR,
CDPOS,
DD03L,
DD41V,
T685T,
VBPA,
TPART,
KONVC,
VBUK.
DATA: BEGIN OF ICDHDR OCCURS 50.
INCLUDE STRUCTURE CDHDR.
DATA: END OF ICDHDR.
SELECT-OPTIONS: XUDATE FOR ICDHDR-UDATE,
XNAME FOR ICDHDR-USERNAME,
XVBELN FOR VBUK-VBELN.
SELECTION-SCREEN SKIP.
SELECTION-SCREEN BEGIN OF BLOCK BLK1 WITH FRAME TITLE TEXT-001.
PARAMETERS: SUDATE RADIOBUTTON GROUP R1,
SNAME RADIOBUTTON GROUP R1,
SOBID RADIOBUTTON GROUP R1.
SELECTION-SCREEN END OF BLOCK BLK1.
DATA: WFLAG,
WCHANGENR LIKE CDHDR-CHANGENR,
WUDATE LIKE CDHDR-UDATE,
WNAME LIKE CDHDR-USERNAME,
WVBELN LIKE VBUK-VBELN,
WDEC1 TYPE P DECIMALS 3,
WDEC2 TYPE P DECIMALS 3,
WDEC3 TYPE P DECIMALS 3,
WDEC4 TYPE P DECIMALS 3.
DATA: UTEXT(16) VALUE 'has been changed',
ITEXT(16) VALUE 'has been created',
DTEXT(16) VALUE 'has been deleted'.
DATA: BEGIN OF ICDSHW OCCURS 50.
INCLUDE STRUCTURE CDSHW.
DATA: END OF ICDSHW.
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.
SELECT * FROM VBUK WHERE VBELN IN XVBELN.
CLEAR CDHDR.
CLEAR CDPOS.
CDHDR-OBJECTCLAS = 'VERKBELEG'.
CDHDR-OBJECTID = VBUK-VBELN.
PERFORM READHEADER.
PERFORM READPOS.
LOOP AT ITAB.
CASE ITAB-TABNAME.
WHEN 'VBPA'.
IF ITAB-FNAME = 'KUNNR' OR
ITAB-FNAME = 'LIFNR' OR
ITAB-FNAME = 'PARNR' OR
ITAB-FNAME = 'PERNR' OR
ITAB-FNAME IS INITIAL.
MOVE ITAB-TABKEY TO VBPA.
SELECT SINGLE * FROM TPART WHERE SPRAS = SY-LANGU
AND PARVW = VBPA-PARVW.
IF SY-SUBRC = 0.
REPLACE '&' WITH TPART-VTEXT INTO ITAB-INDTEXT.
ENDIF.
ENDIF.
WHEN 'VBAP'.
IF ITAB-FNAME IS INITIAL.
REPLACE '&' WITH 'Item' INTO ITAB-INDTEXT.
ENDIF.
WHEN 'KONVC'.
MOVE ITAB-TABKEY TO KONVC.
SELECT SINGLE * FROM T685T WHERE SPRAS = SY-LANGU
AND KVEWE = 'A'
AND KAPPL = 'V'
AND KSCHL = KONVC-KSCHL.
IF SY-SUBRC = 0.
REPLACE '&' WITH T685T-VTEXT INTO ITAB-INDTEXT.
ENDIF.
ENDCASE.
IF ITAB-INDTEXT(1) EQ '&'.
REPLACE '&' WITH ITAB-FTEXT(40) INTO ITAB-INDTEXT.
ENDIF.
IF ITAB-CHNGIND = 'I'.
REPLACE '%' WITH ITEXT INTO ITAB-INDTEXT.
ELSEIF ITAB-CHNGIND = 'U'.
REPLACE '%' WITH UTEXT INTO ITAB-INDTEXT.
ELSE.
REPLACE '%' WITH DTEXT INTO ITAB-INDTEXT.
ENDIF.
CONDENSE ITAB-INDTEXT.
MODIFY ITAB.
ENDLOOP.
ENDSELECT.
IF SUDATE = 'X'.
SORT ITAB BY UDATE VBELN POSNR ETENR.
ELSEIF SOBID = 'X'.
SORT ITAB BY VBELN POSNR ETENR UDATE.
ELSE.
SORT ITAB BY USERNAME VBELN POSNR ETENR UDATE.
ENDIF.
LOOP AT ITAB.
CLEAR WFLAG.
IF SUDATE = 'X'.
IF WUDATE NE ITAB-UDATE.
SKIP.
WRITE:/001 ITAB-UDATE,
023 ITAB-USERNAME,
037(10) ITAB-VBELN.
WFLAG = 'X'.
WUDATE = ITAB-UDATE.
WCHANGENR = ITAB-CHANGENR.
ENDIF.
ELSEIF SOBID NE 'X'.
IF WVBELN NE ITAB-VBELN.
SKIP.
WRITE:/001 ITAB-VBELN.
WVBELN = ITAB-VBELN.
ENDIF.
ELSE.
IF WNAME NE ITAB-USERNAME.
SKIP.
WRITE:/001 ITAB-USERNAME.
WNAME = ITAB-USERNAME.
ENDIF.
ENDIF.
IF WCHANGENR NE ITAB-CHANGENR.
WRITE:/023 ITAB-USERNAME,
037(10) ITAB-VBELN.
WFLAG = 'X'.
WCHANGENR = ITAB-CHANGENR.
ENDIF.
IF WFLAG = 'X'.
WRITE: 013 ITAB-CHNGIND,
049 ITAB-POSNR,
057 ITAB-ETENR,
065 ITAB-INDTEXT(60).
ELSE.
WRITE: /013 ITAB-CHNGIND,
049 ITAB-POSNR,
057 ITAB-ETENR,
065 ITAB-INDTEXT(60).
ENDIF.
WRITE:/065 ITAB-F_OLD.
WRITE:/065 ITAB-F_NEW.
ENDLOOP.
FORM READHEADER.
CALL FUNCTION 'CHANGEDOCUMENT_READ_HEADERS'
EXPORTING
DATE_OF_CHANGE = CDHDR-UDATE
OBJECTCLASS = CDHDR-OBJECTCLAS
OBJECTID = CDHDR-OBJECTID
TIME_OF_CHANGE = CDHDR-UTIME
USERNAME = CDHDR-USERNAME
TABLES
I_CDHDR = ICDHDR
EXCEPTIONS
NO_POSITION_FOUND = 1
OTHERS = 2.
CASE SY-SUBRC.
WHEN '0000'.
WHEN '0001'.
MESSAGE S311.
LEAVE.
WHEN '0002'.
MESSAGE S311.
LEAVE.
ENDCASE.
ENDFORM.
FORM READPOS.
LOOP AT ICDHDR.
CHECK ICDHDR-UDATE
IN XUDATE.
CHECK ICDHDR-USERNAME
IN XNAME.
CALL FUNCTION 'CHANGEDOCUMENT_READ_POSITIONS'
EXPORTING
CHANGENUMBER = ICDHDR-CHANGENR
TABLEKEY = CDPOS-TABKEY
TABLENAME = CDPOS-TABNAME
IMPORTING
HEADER = CDHDR
TABLES
EDITPOS = ICDSHW
EXCEPTIONS
NO_POSITION_FOUND = 1
OTHERS = 2.
CASE SY-SUBRC.
WHEN '0000'.
LOOP AT ICDSHW.
CHECK ICDSHW-CHNGIND NE 'E'.
CLEAR ITAB.
MOVE-CORRESPONDING ICDHDR TO ITAB.
MOVE-CORRESPONDING ICDSHW TO ITAB.
CASE ITAB-TABNAME.
WHEN 'KONVC'.
MOVE ICDHDR-OBJECTID TO ITAB-VBELN.
MOVE ICDSHW-TABKEY(6) TO ITAB-POSNR.
WHEN OTHERS.
MOVE ICDSHW-TABKEY+3(10) TO ITAB-VBELN.
MOVE ICDSHW-TABKEY+13(6) TO ITAB-POSNR.
MOVE ICDSHW-TABKEY+19(4) TO ITAB-ETENR.
ENDCASE.
MOVE '& %' TO ITAB-INDTEXT.
APPEND ITAB.
CLEAR ITAB.
ENDLOOP.
WHEN OTHERS.
MESSAGE S311.
LEAVE.
ENDCASE.
ENDLOOP.
ENDFORM.
TOP-OF-PAGE.
WRITE:/ SY-DATUM,SY-UZEIT,
50 'SALES ORDER CHANGE HISTORY',
120 'Page', SY-PAGNO.
WRITE: / SY-REPID,
60 'SALES ORDERS STATISTICS'.
SKIP.
ULINE.
IF SUDATE = 'X'.
WRITE:/001 'Change Date',
013 'Time',
023 'User Name',
037 'Sale Order',
049 'Line',
057 'Sch No',
065 'Changes'.
ELSEIF SOBID = 'X'.
WRITE:/001 'Sale Order',
013 'Line',
021 'Sch No',
029 'Change Date',
041 'Time',
051 'User Name',
065 'Comment'.
ELSE.
WRITE:/001 'User Name',
015 'Time',
025 'Change Date',
037 'Sale Order',
049 'Line',
057 'Sch No',
065 'Changes'.
ENDIF.
ULINE.
*--- End of Program
Regards
Shiva -
Question about table of Sales Order History?
Dear All,
In SAP B1 SP01, when I click "Tools" --> "Change log", it will display what is the different between previous version.
May I know which table is for sales order history?
From SamsonTable is ADOC, objtype is 17
select * from adoc where objtype = 17 and docentry = XX
where XX is docentry of sales order -
Help me on sales order history,
hi all,
i need to develop a report on sales order history,
please help me, what are the related tables to get sales order historythe SAPGUII cannot help you on this.
you should refer to the ERP-SD forum at SAP ERP Sales and Distribution (SAP SD) -
Hi all
I have report to show combination of current sales order quantity and previous order quantity,to get the that detail i want to get the sales order history data maintaining tabel,please help me i want to get the sales order history tablesHI,
There is one way to know the past documents. All the past docuemnts are completely processed. So, all you have to do is to check the status of the sales documents in VBUK table. Check the field RFSTK in VBUK. If this is set, then the sales document is completly processed.
Select all the sales documents with RFSTK = 'A" or 'B' or 'C". C- completly processed, B- partially processed, and A- Not yet processed.
I hope your problem is solved.
Regards,
Vara -
CIC Activity and Sales Order Link Tables?
Hello Experts,
Can somebody let me know the CRM Customer Interaction Center(CIC) activity and its leading Sales Order Link tables or the data model?
If somebody could point me to CRM CIC Data model it would be real helpful.
If you have any document please send it to [email protected]
Thank you
ArunArun,
You should be able to use the document flow function mod : 'CRM_DOC_FLOW_READ_OB' to get any leading documents
CALL FUNCTION 'CRM_DOC_FLOW_READ_OB'
EXPORTING
IV_HEADER_GUID = wa_activity_guid
IMPORTING
ET_DOC_FLOW_WRK = lt_doc_flow. -
How to add line item to sales order item table?
Kindly help me the with the below requirement .
Add line item to sales order(va01) dynamically on click of button. The button is also custom created push button.
In the above requirement I have added the pushbutton to va01 tcode. But when I click on that button I need to add line item to sales order item table.
I tried a lot but I am not successful. If possible can u please help on this.
Regards,
RachelHi!
It's quite easy even in the standard SAP to add a line item for a customer order, I don't think it worth to develop a new button for this.
However if you wanted to add a line automatically, the you can do the following in the program MV45AFZZ, FORM USEREXIT_SAVE_DOCUMENT.
You can use similar code, but with some modifications.
DATA: lv_posnr.
LOOP AT xvbap.
MOVE xvbap-posnr TO lv_posnr. "get the last posnr
ENDLOOP.
ADD 10 TO lv_posnr.
MOVE 'XYZ' TO xvbap-matnr. "enter your material number here
MOVE lv_posnr TO xvbap-posnr.
* fill additinal field data in XVBAP if necessary
MOVE 'I' TO xvbap-updkz. "Insert line
APPEND xvbap.
Regards
Tamá -
When MSKA (Sales Order Stock) table get updated?
Hi,
May I know when MSKA(Sales Order Stock) table get updated?
Regards,
thiyagusuppose a sales order has been created of 10 MTS and Production Person give me 5 MTS against the sales order by creating Planned Order& Production Order wrt Sales Order,then 5 MTS will be updated into Unrestricted - Use.
If suppose Material is Return Delivery ,then after MIGO , it goes to Quality Inspection,then this Quantity will Updated in to Stock in Quality Inspection .
Hope ,it will help you.
Best Regards,
Ankur -
How Demantra Sales Order history can be loaded to ASCP
Hi Experts
Please let me know the stpes to loade Sale order history (old data) into ASCP using Demantra module. As I want to make use of Demantra module to generate Forecast using previouse sales orders and then i want to put into EBS (ASCP module)
Thanks in advance
RSHYDhi sunaina
Use T.code OVAH
message no V4 ---083 change this from warning to error
System will throw error message if user try to change the quantity
Also I doubt after GRIN / Invoice, in va02, still quantity is in change mode, so ask your ABAPer for any userexit or enhancement
After billing is over if the user can change the quanity or able to add ne wline item in sales order in VA02 mode that too has to be controlled by user exit
Regards -
Sales order changes- table & field name
Hi gurus,
last week i created a sales order for 250 qty, and today i have changed the quantity from 250 to 200.
from which table i can find out the old qty,updated qty and the changed date.
cheers,
SumithHi
For Changes to sales order Check Table CDHDR & CDPO for Item Changes
goto SE16 , enter the table & Give the Object values as the Sales order number
you will get the change details
Thanks & Regards
Kishore -
Hi,
I have created a report for Sales History in which i need to display all records from inquiry to payment.
My problem is i cannot display those records which directly start from sales order not from inquiry.
I am displaying quotation based on inquiry and sales order based on quotation.
How to display directly sales order without quotation number??
Can u help me with the logic??
Thanks,
Mrudula
FORM DATA_RETRIEVAL.
*&----------------------CUSTOMER NO----------------------------------------------*
select KUNNR
" VBELN
into corresponding fields of table IT_SALES from
VBAK
where BUKRS_VF IN S_BUKRS AND ERDAT in S_ERDAT AND KUNNR IN S_KUNNR AND VKORG IN S_VKORG.
"AND VBTYP = 'A'.
*&----------------------INVOICE NO----------------------------------------------*
LOOP AT IT_SALES INTO IT_ITAB.
SELECT VBELN
FROM VBAK INTO
(IT_ITAB-VBELN)
WHERE
VBTYP = 'A' AND
KUNNR = IT_ITAB-KUNNR.
MODIFY IT_SALES INDEX sy-tabix FROM IT_ITAB
TRANSPORTING VBELN.
ENDSELECT.
ENDLOOP.
*&---------------------QUOTATION NO-----------------------------------------------*
LOOP AT IT_SALES INTO IT_ITAB.
SELECT VBELN
FROM VBAK INTO
(IT_ITAB-VBELN1)
WHERE
VGBEL = IT_ITAB-VBELN and
VBTYP = 'B' AND KUNNR = IT_ITAB-KUNNR.
MODIFY IT_SALES INDEX sy-tabix FROM IT_ITAB
TRANSPORTING VBELN1.
ENDSELECT.
ENDLOOP.
*&----------------------SALES ORDER NO----------------------------------------------*
LOOP AT it_SALES INTO IT_ITAB.
SELECT VBELN
FROM vbaK INTO
(iT_ITAB-VBELN2)
WHERE
VKORG IN S_VKORG and KUNNR = IT_ITAB-KUNNR AND VGBEL = IT_ITAB-VBELN1 AND
vBtyp = 'C'.
MODIFY it_SALES INDEX sy-tabix FROM IT_ITAB
TRANSPORTING VBELN2.
ENDSELECT.
ENDLOOP.I might consider starting with sales order documents, then retrieving any prior documents based upon the prior (originating and reference) document entries in VBAP (and NEVER by reading VBFA backward). But I would almost never start a sales report from VBAK; that's the wrong place. Read SAP NOTE 185530 on how to do efficient SD reporting.
-
Sales Orders Transparent Tables Needed
I am trying to create a report with SQV1 that shows
Sales Order
Sales Order Status
Material
Rev Level on Material
ECN Number on Material
ECN Description on Material
I need the transparancy tables for
Sales Order Detail; I tried VBAP and VBAK and both do not show me the
Sales Order Status VBSTT
Also I need to know the Rev Level and ECN Number and description. I
thought they would be in MARC because the rev level shows up in the
Material Master but it is not one of the items you can select. Any idea where
I can find it?
Thanks,
LindaHi
For the sales order status, you can refer to VBUK or VBUP.
I looked for ECN number, I think the table and the field are MARC-PRENO
Pls check whether the same is useful to you.
Reward point if it helps. -
Dynamic field value in Sales order item table control
Hi
I need to find the VBAP-VKAUS (Usage indicator) field value in run time of the creation of sale order ...these values stored in the table TVLV.
when i debug the program SAPMV45A in the screen 4900 this VBAP-VKAUS value gets empty in structure VBAP even though i can see other values like MATNR etc...
this field is configurable (dynamic) field and not appear for all the ordertypes.
i need to pass this VBAP-VKAUS value to KOMPD-VKAUS
Thru user-exit..so please let me know if somebody knows how to find this VBAP-VKAUS value.
Thanks in advance
Madihi,
Plz Check the struc KOMP/KOMK. Let me know, if this helped.
Rgds,
Raghu. -
hi friends,
is there any table for sales order stock in sap.
with regards
BhupiHIIII
Batch Stock - MCH1, MCHA, MCHB '
Valued Stock - MBEW
Sales order Stock - MSKA ,
Project Stock - MSPR
Storage Location stock - MARD,
Stock with vendor - MSLB,
Special Stocks from Vendor - MKOL
Special Stocks with Customer - MSKU
Reading View of Stock Transfer Reservations - MDUR
Reading View of Stock Transport Order for Release Order - MDUB
Sales Requirement Totals Record - VBBS
Data Base View of Production Order for MD - MDFA -
Sales order cost table...
hi all,
i am running costing for sales order. in which table i can see the result?Hi,
VBAK - Sales Document: Header Data
VBAP - Sales Document: Item Data
KONV - Conditions (Transaction Data)
KONP - Conditions (Item)
KONH - Conditions (Header)
KANZ - Assignment of Sales Order Items - Costing Objects
Regards,
Srilatha.
Maybe you are looking for
-
Hello everyone, Just recently (as in yesterday) my light on the Magsafe power charger for my Macbook decided to switch back and forth from the green light to the orange charging light all day. It is still doing it as I type and I am really getting fr
-
This one is breaking my brain! I have an horizontal spry menu bar in my website that renders correctly in all browsers except ie 8 and below where it appears like an unordered list - almost like no CSS had been applied at all. You can check out the s
-
How to import text from Word without any style?
Hi all. I'm working with a copy writer who has a tendency to apply a return on every line on the Word document. How can I over ride it so that I don't have to go back and eliminate every return in InDesign? Thanks!
-
Avoid internet connections when using ovi maps.
I own a E60 and have the latest version of Ovi Maps for Belgium on my cell phone. In my internet settings I mentioned: connection -> Offline. As such I expected not to connect to internet at all and only usethe local maps. But my last bill mentioned
-
Table to find posted goods issue of vl02n
Hi all, After perform the post good issue on vl02n, SAP suppose to update the posted goods issue into a table. So may i know which table to find the posted goods issue record ? Regards, Marcus