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
Praveen
Dear 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
Similar Messages
-
Report for Sales Order changes
We are searching for a report which can list the changes of sales order items for a selected group of materials.
Thanks for the help.Please search the forum before posting. This has been discussed many times and being an old member, you should be aware of forum rules. Please try to adhere to forum rules. Answer to your query is execute AUT10.
G. Lakshmipathi -
Sales order changes history table
hi.........
i wann field for user name from sales order change history table. i hv tried CDHDR and CDPOS, but i cound't get the exact link in those tables.
will u tel me any other table, so that i can get this field by passing sales order ?Hi subharao,
Go though this program.
REPORT zmm_rep_poh NO STANDARD PAGE HEADING LINE-SIZE 250 LINE-COUNT 65.
TABLES: cdhdr,cdpos,ekko,ekpo.
TYPE-POOLS : slis.
DATA : t_fieldalv TYPE slis_t_fieldcat_alv.
DATA : import_variant LIKE disvariant.
DATA : xrepid LIKE sy-repid.
DATA : layout TYPE slis_layout_alv.
DATA: BEGIN OF itab OCCURS 0,
fname(40) ,
objectid(10),
changenr(10) ,
value_new(10),
value_old(10),
unit_old(10),
unit_new(10),
cuky_old(10),
cuky_new(10),
key(5),
username(10),
udate LIKE cdhdr-udate,
utime LIKE cdhdr-utime,
END OF itab.
DATA iebeln(15).
DATA: BEGIN OF itab1 OCCURS 0,
username(10),
udate LIKE cdhdr-udate,
changenr(10),
utime LIKE cdhdr-utime,
END OF itab1.
DATA: BEGIN OF itab3 OCCURS 0.
INCLUDE STRUCTURE itab.
DATA: END OF itab3.
DATA iekko LIKE ekko OCCURS 0 WITH HEADER LINE.
*Select Option
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS : s_ebeln FOR ekpo-ebeln OBLIGATORY,
s_ekorg FOR ekko-ekorg NO INTERVALS DEFAULT '77IN',
s_bukrs FOR ekko-bukrs NO INTERVALS DEFAULT '77IN'.
SELECTION-SCREEN END OF BLOCK b1.
*INITIALIZATION.
for alv field catalog definition.
PERFORM initial_alv_fieldcat CHANGING t_fieldalv[].
START-OF-SELECTION.
SELECT * INTO iekko
FROM ekko
WHERE ebeln IN s_ebeln AND ekorg IN s_ekorg AND bukrs IN s_bukrs.
APPEND iekko.
ENDSELECT.
LOOP AT iekko.
SELECT username udate changenr utime
INTO (itab1-username,itab1-udate,
itab1-changenr,itab1-utime)
FROM cdhdr
WHERE objectid EQ iekko-ebeln.
APPEND itab1.
ENDSELECT.
ENDLOOP.
LOOP AT itab1.
SELECT objectid changenr fname value_old value_new unit_old unit_new
cuky_old cuky_new
INTO (itab-objectid, itab-changenr, itab-fname,
itab-value_old,itab-value_new ,itab-unit_old, itab-unit_new,
itab-cuky_old,itab-cuky_new)
FROM cdpos
WHERE changenr = itab1-changenr.
IF sy-subrc = 0.
itab-username = itab1-username.
itab-udate = itab1-udate.
itab-utime = itab1-utime.
APPEND itab.
ENDIF.
ENDSELECT.
ENDLOOP.
delete itab where fname eq 'KEY'.
sort itab by fname.
delete ADJACENT DUPLICATES FROM itab comparing all fields.
LOOP AT itab.
IF itab-fname = 'ZTERM'.
itab-fname = 'Payment Terms'.
MODIFY itab.
ELSEIF itab-fname = 'AEDAT'.
itab-fname = 'Date'.
MODIFY itab.
ELSEIF itab-fname = 'EFFWR'.
itab-fname = 'Effective Value'.
MODIFY itab.
ELSEIF itab-fname = 'MENGE'.
itab-fname = 'PO Quantity'.
MODIFY itab.
ELSEIF itab-fname = 'BRTWR'.
itab-fname = 'Gross Order Value'.
MODIFY itab.
ELSEIF itab-fname = 'NETWR'.
itab-fname = 'Net Order Value'.
MODIFY itab.
ELSEIF itab-fname = 'PROCSTAT'.
itab-fname = 'Purchasing Doc processing state'.
MODIFY itab.
ELSEIF itab-fname = 'FRGSX'.
itab-fname = 'Release Strategy'.
MODIFY itab.
ELSEIF itab-fname = 'FRGKE'.
itab-fname = 'Release Ind. Pur. Doc'.
MODIFY itab.
ELSEIF itab-fname = 'ZBD1P'.
itab-fname = 'Cash Discount Perc 1'.
MODIFY itab.
ELSEIF itab-fname = 'ZBD1T'.
itab-fname = 'Cash Discount Days'.
MODIFY itab.
ELSEIF itab-fname = 'ZBD2T'.
itab-fname = 'Cash Discount Days'.
MODIFY itab.
ELSEIF itab-fname = 'KEY'.
itab-fname = 'Item Entered'.
MODIFY itab.
ENDIF.
ENDLOOP.
PERFORM alv_grid_display.
*& Form alv_grid_display
text
--> p1 text
<-- p2 text
FORM alv_grid_display .
DATA : gt_event TYPE slis_t_event.
DATA : dbcnt TYPE i.
DATA : dbcntr(10) TYPE c.
DATA : title(100) TYPE c.
CLEAR : dbcnt,dbcntr,title.
DESCRIBE TABLE itab LINES dbcnt.
dbcntr = dbcnt.
CONCATENATE 'NO.OF ENTRIES : ' dbcntr INTO title SEPARATED BY space.
sy-title = title.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
is_layout = layout
it_fieldcat = t_fieldalv[]
i_save = 'A'
i_grid_title = 'Purchase Order Amendment Details'
TABLES
t_outtab = itab
EXCEPTIONS
program_error = 1
OTHERS = 2.
ENDFORM. " alv_grid_display
*& Form initial_alv_fieldcat
text
<--RT_FIELDCAT text
FORM initial_alv_fieldcat CHANGING rt_fieldcat TYPE slis_t_fieldcat_alv.
DATA : ls_fieldcat TYPE slis_fieldcat_alv .
DATA : cntr TYPE i VALUE 1.
CLEAR ls_fieldcat.
cntr = cntr + 1.
ls_fieldcat-col_pos = 1.
ls_fieldcat-fieldname = 'USERNAME'.
ls_fieldcat-seltext_l = 'UNAME'.
ls_fieldcat-do_sum = 'X'.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
cntr = cntr + 1.
ls_fieldcat-col_pos = 2.
ls_fieldcat-fieldname = 'UDATE'.
ls_fieldcat-seltext_l = 'UDATE'.
ls_fieldcat-do_sum = 'X'.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
cntr = cntr + 1.
ls_fieldcat-col_pos = 3.
ls_fieldcat-fieldname = 'UTIME'.
ls_fieldcat-seltext_l = 'UTIME'.
ls_fieldcat-do_sum = 'X'.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
cntr = cntr + 1.
ls_fieldcat-col_pos = 4.
ls_fieldcat-fieldname = 'OBJECTID'.
ls_fieldcat-seltext_l = 'PO Number'.
ls_fieldcat-do_sum = 'X'.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
cntr = cntr + 1.
ls_fieldcat-col_pos = 5.
ls_fieldcat-fieldname = 'FNAME'.
ls_fieldcat-seltext_l = 'Field Name'.
ls_fieldcat-do_sum = 'X'.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
cntr = cntr + 1.
ls_fieldcat-col_pos = 6.
ls_fieldcat-fieldname = 'VALUE_OLD'.
ls_fieldcat-seltext_l = 'Old Value'.
ls_fieldcat-do_sum = 'X'.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
cntr = cntr + 1.
ls_fieldcat-col_pos = 7.
ls_fieldcat-fieldname = 'VALUE_NEW'.
ls_fieldcat-seltext_l = 'New Value '.
ls_fieldcat-do_sum = 'X'.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
cntr = cntr + 1.
ls_fieldcat-col_pos = 8.
ls_fieldcat-fieldname = 'UNIT_OLD'.
ls_fieldcat-seltext_l = 'Old Unit'.
ls_fieldcat-do_sum = 'X'.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
cntr = cntr + 1.
ls_fieldcat-col_pos = 9.
ls_fieldcat-fieldname = 'UNIT_NEW'.
ls_fieldcat-seltext_l = 'New Unit'.
ls_fieldcat-do_sum = 'X'.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
cntr = cntr + 1.
ls_fieldcat-col_pos = 10.
ls_fieldcat-fieldname = 'CUKY_OLD'.
ls_fieldcat-seltext_l = 'Old Cuky'.
ls_fieldcat-do_sum = 'X'.
APPEND ls_fieldcat TO rt_fieldcat.
CLEAR ls_fieldcat.
cntr = cntr + 1.
ls_fieldcat-col_pos = 11.
ls_fieldcat-fieldname = 'CUKY_NEW'.
ls_fieldcat-seltext_l = 'New Cuky'.
ls_fieldcat-do_sum = 'X'.
APPEND ls_fieldcat TO rt_fieldcat.
layout-zebra = 'X'.
layout-colwidth_optimize = 'X'.
ENDFORM. " initial_alv_fieldcat
*********Rewards some points.
Rgds,
P.Naganjana Reddy -
Table for sales order change by field
Dear Friends,
I want to get the data @ table level for the list of sales orders with changed by field. Can you please tell which table/s for sales order change by field can be used?
Thanks,
pinkyHi
You can get the changes for SALES ORDER item in CDPOS table
Goto SE16 and find the changes.
hope it will serve your purpose.
thanks,
santosh -
How to create a daily report for sales order
hi
how to create a daily report for sales order. what fields it must consists of. what are the tables it need?Hi
You have to use the sales order tables VBAK,VBAP and VBEP
So keep date field on selection screen
and treat this date as Order creation data audat field in VBAK.
based on this fetch the data from VBAK and VBAP with the following fields like
VBELN, KUNNR,NETWR,POSNR, MATNR,ARKTX,KWMENG,WAERS etc and display in the report
<b>Reward points for useful Answers</b>
Regards
Anji -
Interactive report for sales order
how to create an Interactive Report which displays all the sales orders for one particular customer, the materials ordered, quantity ordered, goods issue date of that particular order and contact information about that particular customer.
http://www.sap-img.com/abap/program-for-sales-order-by-customer-date-sales.htm
https://forums.sdn.sap.com/click.jspa?searchID=2651341&messageID=1671145.
Have a look at the demo programs,
DEMO_LIST_INTERACTIVE_1
DEMO_LIST_INTERACTIVE_2
DEMO_LIST_INTERACTIVE_3
DEMO_LIST_INTERACTIVE_4
DEMO_LIST_HIDE
Please give me reward points.
Regards,
Murali Poli -
Report for Sales orders with the consumed credit limit value
Dear Gurus,
In my company, the credit check is at sales order level. We want a report which shows up the credit value consumed from the credit master by Sales order.
Going into the details, Say Credit limt is setup for a customer at Credit master for 10000 $.
I want a report showing Sales order 59235 has consumed 500 $, Sales order 59277 has consumed 1500 $, Sales order 59333 has consumed 2500 $.
Is their a report in standard SAP for the above functionality. If not, any ideas of how to achieve it?
Thank you for your responses.
Regards,Hi,
Try the following transaction codes
S_ALR_87012218
FDK43
F.31
But if you want to a report like what you explained in thread i think in standard not available we need to develop a customized one.
Regards -
Sales Order Change history report
Hi all,
Can someone help me let me know of any standard SAP transaction to list all Sales orders with all the change history.
Appreciate your help on this.
Thanks and Regards,
Saleem> Hi Saleem,
>
> I am not aware any standard SAP transaction/report
> but you can check this link for custom development
> report.
>
> http://www.sap-img.com/ab024.htm
>
>
> Hope this will help.
>
> Regards,
> Ferry Lianto
>
>
> Please reward points if helpful.
Ferry Lianto
I have implemented that program, but it does not compile due to errors in the code!
Program *
"KONVC" and "ITAB-TABKEY" are not mutually convertible in a Unicode program. -
Report for Purchase Order Changes
Hi all,
Is there any report that record changes in purchase order?
Please respond.
Best Regards,
AI.Hi
Go to ME23N or ME22N.. Choose Environment - Header Changes or Item changes(for item changes select the item first). You can see all the changes made.
OR
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, and many more.
Put the PO number in CDHDR table OBJECTID table and get the change numbers.
Put the change numbers in CDPOS and get the details.
You can get the ABAPer to write a simple report.....
Cheers
JOJI -
Hi All,
Here is the standard procedure to view the changes made to any Sales order by using transaction VA01 or VA02--
Go to Environment and Select --> Changes
This will list out how many changes has been done for that particular SO with the user name and other details till date.
Now what i am currenctly doing is while creation or change of sales order (in user exit MV45AFZZ) I am checking for the customer for some criteria . If the customer satisfies the criteria then block that particular SO.
My Question is if i want to check the history after blocking particular SO, will it show me the history with blocking part?
If not then how can i maintain the log history if i block the sales order by using code in that User exit?
Is there any FM that will show the blocking changes in Environment --> Changes
Edited by: Kuldeep Mane on Sep 18, 2008 5:26 PMgenerally what ever changes are done to SO, it gets reflected in change history. So, if the user exit gets triggered it does something to SO which is a change and it should trigger this change in change history..
-
Report for sales orders with abnormal discounts
Hi
We have a discount condition type say ZDIS with 10% which is not changeable manually in sales order..But incase if the user has changed the condition master to 12% and created the sales order with 12%disc...Hence i need a report, the list of sales orders with the abnormal discounts..(the sales orders with the discount value more or less than 10%)..
How do i get this report..Kindly provide me the table names&logic ...
Reg
JJWe have a discount condition type say ZDIS with 10% which is not changeable manually in sales order..But incase if the user has changed the condition master to 12% and created the sales order with 12%disc...Hence i need a report, the list of sales orders with the abnormal discounts..(the sales orders with the discount value more or less than 10%)..
How do i get this report..Kindly provide me the table names&logic ...
Select KNUMH where KONP-KSCHL EQ ZDIS ( Condition record number)
Select KONV-KNUMV Where KONV-KNUMH EQ KONP-KNUMH
Select VBAK-KNUMV where VBAK-KNUMV EQ KONV-KNUMV
Then with the help of ABAPER hard code the condition amount (KBERT>10%)
Regards
Rohit -
ECC report for sales order status from order entry to Invoice (OTC rpt)
Dear All.
Looking to see if there's a standard report or transaction that we can use to review sales order line item status.
VA05 provides a good view from sales, and VL06O provides a good view from LE, and VF05 provides a good view from billing.
But there is there something that would list sales orders and show related quantity, open, delivered, billed all in one report?
Many thanks!Thank you Shiva.
That's what we were thinking as well. Just wanted to make sure we didn't miss something in case SAP provided a template or customizable program for this.
Thanks -
Purchase items report for sales orders - very important
Hi Folks,
Could you please guide me on how to create a report of "items purchased" for a particular "sales order". if i am able to include various fields of items purchased, like....quantity, item description, vendor name, item price, etc., it will be very useful.
This report is required for a client, who assembles machines in a "make to order" scenario, and most of the BOM child items are "purchase items".Hello Krishna,
Few things to note:
Is the PO created from the SO. Is YES, then you could use the base document ref at the POR1 table.
OR
Are the BOM components defined with a default vendor in the Item Master and if YES are the components always purchased from the same vendor.
I am trying to see how to establish the relationship of the items between the PO and SO.
Please give me the details and I could guide you further
Thanks
Suda -
I need to create a report for all sales order that have line items with a Material Tax Class '2' - One time exemption. Tax will require a report that identifies/displays all line items with Tax Classification = '2'.
Report layout specifics:
Bill-To
Ship-To
Order No.
Tax classification
Internal Item Notice Text.
For bill-to, ship-to, order no are all fields of structure KOMK, but I need to know which table it comes from so I retrieve the data by a select statement to display this. Can anyone guide me on this ? Thanks in advance !!!
NimeshI dont know where that tab is either. I will have to find out and let you know. For now I just left it out and I have written the following code - please let me know if this looks right according to the requirement.
REPORT ZMAT_TAX_REPORT .
TABLES: VBAK, VBPA, VBAP, MLAN, KOMK.
DATA: begin of jtab occurs 0,
kunnr like vbak-kunnr,
vbeln like vbak-vbeln,
parvw like vbpa-parvw,
end of jtab,
wa_vbak like vbak occurs 0 with header line,
wa_vbpa like vbpa occurs 0 with header line,
wa_vbap like vbap occurs 0 with header line.
PARAMETERS: TAXM1 like MLAN-TAXM1 default '2'.
select single taxm1 from vbap into vbap-taxm1 where TAXM1 = MLAN-TAXM1.
if sy-subrc eq 0.
if vbap-taxm1 = '2'.
select single * from vbak into wa_vbak
where kunnr = komk-kunre.
select single * from vbpa into wa_vbpa
where parvw = komk-kunwe.
select single * from vbap into wa_vbap
where taxm1 = mlan-taxm1.
move wa_vbak-kunnr to jtab-kunnr.
move wa_vbak-vbeln to jtab-vbeln.
move wa_vbpa-parvw to jtab-parvw.
endif.
if sy-subrc eq 0.
if not jtab[] is initial.
write:/(95) sy-uline.
format color col_heading intensified on.
write:/1 sy-vline,
2 'Bill-To',
21 sy-vline,
3 'Ship-To',
21 sy-vline,
4 'Order No.',
21 sy-vline.
write:/(95) sy-uline.
loop at jtab.
write:/1 sy-vline,
2 jtab-kunnr,
21 sy-vline,
3 jtab-parvw,
21 sy-vline,
4 jtab-vbeln,
21 sy-vline,
95 sy-vline.
endloop.
endif.
endif.
endif. -
Material Availability Report for Sales Order
Hi,
Is there any report which gives me for a sale order line item which is either pending or not yet picked in delivery, but for which stock is not available. If such report is not available then what to we do for getting the same?
Regards,
AjitHi ajit
In VA05 itself you can see Ordered qty, Open order qty and confirmed quantity , Delivered qty , Delivered date .Even Laxmipathi also said same thing and i also agree with his words.
Regards
Srinath
Maybe you are looking for
-
Problem in changing follow up document Transaction type using CRM_COPY_BADI
Hi, I am creating follow up document ( Service Contract ) to another service contract. Now Based on a condition, in CRM_COPY_BADI, I have to change the follow up document type forcefully to Service Contract Quotation. Menas, eventhough I select ZSC,
-
Trouble with Frame Size of AE Composition in Premiere CS6
I'm trying to add a name-bar (name-tag) from After Effects to my sequence in Premiere Pro. I built the name-tag in Illustrator according to the frame size in Premiere. All of my name tags for a 640x480 frame fit perfectly. However, the tags I built f
-
Problem with substring or println
Hi, I have the following code, and it basically is looking for text between <title></title> tags. I use substring to grab the code between the two tags, and debugging shows it is correct. However, when I output it, my code stops and I just have white
-
Exporting podcast results in a 40k file and 0:00 length
Hi all, I've been using GB for two years now. I upgraded to GB '08 the day it came out and put out two podcasts with no problems with it so far. Today, I'm editing the third podcast I created with GB '08 and I get a 40k file with a length of 0:00 if
-
Documentation links and METADATA
Hello All, Our user want to upload some document related to transactional data in BW and display them in BW reports. We do the upload from SEM BPS layout and it works fine. Point 1: Unfortunately, when the same user wants to display the document in B