CDPOS table problem
HI Friends,
we have one report usnig the table CDHDR and CDPOS. if we cahnge anything in VA42 that field isreflects in the zreport .
if we add any material in va42, that field is not reflecting in CDPOS. how we get the detail
Thanks & Regards,
Vallamuthu.M
Edited by: vallamuthu madheswaran on Mar 24, 2010 5:35 PM
Check this : http://wiki.sdn.sap.com/wiki/display/ABAP/ABAP-DataChangeTrackerforCustom+Tables
Use FM : 'CHANGEDOCUMENT_READ_HEADERS', 'CHANGEDOCUMENT_READ_POSITIONS'
Similar Messages
-
Unable to proceed in change document are not updating in CDHD, CDPOS tables
Hi all,
This is a question related to Change document.
I created one custom Change document object ZBUDGETS.
As I am trying to place a trigger on FMIT (Total Funds Management) table I created a Change document object ZBUDGETS.
I included some of the authorized fields from FMIT table on which we placed the trigger.
And of course all those fields are change document enabled in the data element level. I generation of the update program was completed. And I got the function module zbudgets_write_document along with some include programs and structure.
Everything is fine, But i am unable to get this change document generated information to these tables are CDHDR and CDPOS.
the problem is when I make any expenditure like PO Posting, it will be logging in the FMIT table and the respective fields also updating. With this the Change document object should trigger and it should send the record in CDHDR and CDPOS tables. This is not happening. If the records are getting updated in the CDHDR and CDPOS tables I can use those include programs and function modules in my program to retrieve the changes in FMIT table.
Since I am unable to proceed further since the documents are not updating in CDHDR and CDPOS tables.
PrabhakarCDHDR and CDPOS will not be populated with entries only by creating the change document object.Change documents will be written to CDHDR and CDPOS tables only if the function zbudgets_write_document is called in the transaction which updates FMIT.
You need to find an use exit in the transaction updating FMIT and call the function zbudgets_write_document in that exit.
Refer the below link http://help.sap.com/saphelp_47x200/helpdata/en/2a/fa01b6493111d182b70000e829fbfe/content.htm
-Kiran
*Please reward useful answers -
Hi experts,
I don't know too much about table CDPOS. Could you tell me something in detail about this SAP table?
I had performance problem according to cdpos table. It has a size category 3, which means that it is planned for 50.000 records. Now it has more than 50 million records.
How can I solve the performance problem or reduce the execution time of a selection applied on this table?Hi,
CDPOS table is change documents item table.
It will store all the changes done to the transactions.
eg: If u change the delivery quantity a change document will be created with the old and new data for that field. This will be done for the fields whose data element has is applicable for change document(i.e When u open this data element u can see one check box Change document)
If it is checked then change document will be created.
eg: LIPS-LFIMG has data element LFIMG. Open this data element in SE11. U can see that Change document check box is checked.
So when ever u change this table field a change document will be created.
Coming to performance usually it is slow. We can't help it out.
Only thing we can do is archiving old data so that table contents will be less. Ask ur basis people for more info
Why thosemany entries is because when ever u change any thing in SAP a change document will be created.
eg: sales orders, deliveries etc
Master data like customer data, material data etc
Instead of selects u can try FMs
CHANGEDOCUMENT_READ_HEADERS
CHANGEDOCUMENT_READ_POSITIONS
which are slightly faster than direct select.
Hope it is clear.
Thanks,
Vinod.
Edited by: Vinod Reddy Vemuru on Jul 2, 2008 8:34 PM -
Hi
could any one pls let me know about the use of CDHDR and CDPOS Tables
and what role they can play in capturing Deltas
Regards
DCDHDR has header information for changes in objects.
CDPOS has the information for the positions of the object.
<a href="http://www.sap123.com/showthread.php?t=47">Example with Screenshots</a>
Also Look at :
https://forums.sdn.sap.com/click.jspa?searchID=5749799&messageID=1456945
Re: Delta - Records changed directly in table
Generic delta queue for CDHDR
LBWE, delta extraction without BW -
Reg: Object class stored in CDHDR , CDPOS tables
Hi Guys,
we have released blocked Invoice document using transaction MRBR, it is released. we have developed manually zprogram all the invoices which are released manually. but when execute we were unable to get details manually released documents. Here we observed data is fetching from CDHDR, CDPOS tables. Upon observation the Object class we found after released the invoice is getting saved with object class " BELEG". but in zprogram objcet class checking with " INCOMINGINVOICE".
can you explain the which scenario object class is saved with "BELEG", object class is saved with " INCOMINGINVOICE".
Thanks!
Mahendar Patha.Hi Steve,
(If I understood your question correctly then) Under the Object Value Column 0350035419 is the Customer number. Also under Table key column 1st three characters are your client i.e. 050 followed by customer number 0350035419.
-ruby -
CDHDR and CDPOS tables are not updated
Hi,
When I am trying to change (or delete) Project definitions or WBS elements (changed all its related data which have change document ticked in its data element) those changes are not captured in CDHDR and CDPOS tables.
Here in our system PROJ object class exists in SCDO t-code and has all its generated programs, but still not able to find changes in CDHDR and CDPOS tables.
Can anybody plz let me know if I am missing anything or PROJ is not the appropriate object class or does BASIS team need to do any configuration to capture change documents in CDHDR or CDPOS tables because I do not see not even one record with PROJ object class in those tables.
Appriciated for quick response.
Regards,
M, ManoharHi Manohar,
Even we have project system in my project.We are able to see the changes and we did not done any settings for that.Just check with your basis people else raise an oss note.I did not see any sap notes also related to that.
Regards,
Madhu. -
How to use CDHDR and CDPOS tables
Hello Gurus,
How can the data be extracted from CDHDR and CDPOS tables ?
For example, I want to find the changes for the material master, what is the object need to be given in the OBJECT value etc..
I tried to use restricting the transaction MM02 and the date valid from and to, but it is taking longer time.
Appreciate, if you can provide the objects which can be used to track the changed data like Production orders etc..
Thanks
AadhyaHi Aadhya,
For the Change Document Object (OBJECTCLAS), you can use the following item:
MATERIAL = material master
ORDER = production order/maintenance order
EINKBELEG = purchasing document
VERKBELEG = sales document
The Object Value (OBJECTID) is usually the object's number, such as material number, production order number, etc.
Get the Document Number (CHANGENR) and go to CDPOS to see the changes detail.
Regards,
Julian -
Autonomous Trigger / Mutating Table Problem
We have a specific problem in one of our applications being developed where by the database needs to enforce a specific business requirement.
We need to use a database trigger to enforce some data integrity which involves more than one table as such cannot use standard constraint. The integrity has to be maintained in the database as the DML statements may be coming from a Java application or PL/SQL code as such we need the logic all in one place.
The problem being that within the trigger we need to examine the state of the table the trigger is associated with as well as one other table. Obviously using a trigger on a table that is being affected by DML statements causes the dreaded mutating table problem.
One suggested solution to this was to make the trigger or the code the trigger called autonomous. This allows the trigger to execute by only showing the trigger the original state of the table before any of the DML statements have affected it.
The problem is this seems to work for single row DML statements but not for multi row DML statements. In multi row the trigger only sees the original state of the table, not the state of the table plus the changes made by any other actions in the same DML statement.
Below I have shown an example of what I'm seeing.
I have grossly simplified the example code below to only refer to a single table and use stupidly simple logic
I do realise i appear to be implementing uniqueness in my own PL/SQL code, this is purely for the example.
CREATE TABLE mutate_test
id INTEGER NOT NULL,
value VARCHAR2(255) NOT NULL
ALTER TABLE mutate_test ADD CONSTRAINT pk_mutate_test PRIMARY KEY(id);
ALTER TABLE mutate_test ADD CONSTRAINT ck_mutate_test CHECK (value = UPPER(value));
CREATE OR REPLACE FUNCTION duplicate_found(in_value IN mutate_test.value%TYPE) RETURN BOOLEAN IS
PRAGMA AUTONOMOUS_TRANSACTION;
v_value_found INTEGER;
BEGIN
SELECT COUNT(*)
INTO v_value_found
FROM mutate_test
WHERE value = in_value;
IF v_value_found > 0 THEN
RETURN TRUE;
ELSE
RETURN FALSE;
END IF;
END;
CREATE OR REPLACE TRIGGER tr_mutate_test BEFORE INSERT OR UPDATE ON mutate_test
FOR EACH ROW
BEGIN
IF duplicate_found(:new.value) = TRUE THEN
RAISE_APPLICATION_ERROR(-20000,'Duplicate value found');
END IF;
END;
INSERT INTO mutate_test (id,value) VALUES (1,'CLIFF');
INSERT INTO mutate_test (id,value) VALUES (2,'SULA');
COMMIT;
SELECT * FROM mutate_test;
-- Should fail as row 1 already has a value of CLIFF
INSERT INTO mutate_test (id,value) VALUES (3,'CLIFF');
COMMIT;
SELECT * FROM mutate_test;
-- Should fail as row 1 is already set to CLIFF
UPDATE mutate_test SET value = 'CLIFF' WHERE id = 2;
COMMIT;
SELECT * FROM mutate_test;
UPDATE mutate_test SET value = 'CLIFFORD' WHERE id = 1;
COMMIT;
SELECT * FROM mutate_test;
INSERT INTO mutate_test (id,value) VALUES (3,'RONNY');
INSERT INTO mutate_test (id,value) VALUES (4,'TIM');
INSERT INTO mutate_test (id,value) VALUES (5,'MONIQUE');
COMMIT;
SELECT * FROM mutate_test;
-- Wanted result would be row 1 would be updated from CLIFFORD to CLIFF
-- and the others raise errors, or all of them raise errors.
UPDATE mutate_test SET value = 'CLIFF' WHERE id IN (1,3,4);
COMMIT;
SELECT * FROM mutate_test;This is all from a University application that deals with eLearning.
Shell = Mapping from the system to an external eLearning application, ie: unique id of the Blackboard course shell, or WebBoard board.
Term = Academic term
Sector = University sector, ie: Higher Education, TAFE, etc..
Resource = eLearning tool, ie: Blackboard, WebBoard, etc..
Resource Level = Whether the resource is being offered at a Course or Program level
Resource Mapping = Association of a resource to shell
What we are trying to achieve is that shells cannot be used across sector boundaries.
The real table structure is (grossly simplified again)
CREATE TABLE sector (sector_pk INTEGER PRIMARY KEY);
CREATE TABLE sector_pattern (sector_pk INTEGER REFERENCES sector(sector_pk), pattern CHAR(2) NOT NULL UNIQUE CHECK (pattern = UPPER(pattern)));
CREATE TABLE term (term_pk INTEGER PRIMARY KEY, term CHAR(4) NOT NULL UNIQUE CHECK (term = UPPER(term)));
CREATE TABLE resource_level (resource_level_pk INTEGER PRIMARY KEY, term_pk INTEGER REFERENCES term(term_pk));
CREATE TABLE shell_detail (shell_detail_pk INTEGER PRIMARY KEY);
CREATE TABLE resource_mapping (resource_mapping INTEGER PRIMARY KEY, resource_level_pk INTEGER REFERENCES resource_level(resource_level_pk), shell_detail_pk INTEGER REFERENCES shell_detail(shell_detail_pk));
Based on the Ask Tom article linked I'd liked to use a MATERIALIZED VIEW on the following query
SELECT DISTINCT rm.shell_detail_pk,sp.sector_pk
FROM resource_mapping rm, resource_level rl, term t, sector_pattern sp
WHERE rm.resource_level_pk = rl.resource_level_pk
AND rl.term_pk = t.term_pk
AND SUBSTR(t.term,3,2) = sp.pattern;
Then apply a UNIQUE constraint on that VIEW.
But I'm receiving a
SQL Error: ORA-12054: cannot set the ON COMMIT refresh attribute for the materialized view
I'm not sure how to create the MATERIALIZED VIEW LOG entries for the above VIEW.
Any ideas anyone? ;)
Need to do some more reading and research but as Tom says
"I'm asking around about the future of "SQL" as far as enhancments go like that
(will update when I get some feedback), but -- you are not limited to triggers
(in fact, I would avoid triggers as it is virtually IMPOSSIBLE to implement
cross row/cross object constraints with them!!!! at least correctly)"
So I think i'll give up on the TRIGGER approach as it doesn't meet our requirements. -
How to get deleted project definitions information from CDHDR CDPOS tables
Hi,
I want to get project definitions or WBS ELmenets that got deleted from CJ02 or CJ12. We can get this information from CDHDR or CDPOS table by passing PROJ object class but in this table changes (change or deletion) are not captured. so can anybody please let me know how to activate object class PROJ or how to track changes in CDHDR or CDPOS table?
Regards,
M, Manohar
<Contact information removed by moderator>
Edited by: Vinod Kumar on Sep 19, 2011 3:37 PMHi,
If the requirement is to identify when the project / WBS was deleted, then alternate oprion is to pass the WBS OBJNR to JCDS. JCDS will give you the status updates happened on a project and also when and who made the changes.
Regards
Sreekanth -
Hello All,
When i am trying to see the values in CDPOS table i ahve found a structure name in the field CDPOS - TABNAME .
fro eg: to see BOM change docs,,,,,, i.e. for TCODE CS02, i have seen a structure CSBOM in the CDPOS - TABNAME entry.
can anyone explain the meaning of 'having structure name in that field'.
Thanks in advance
Best Regards,
Amarender Reddy BHi,
CDPOS table Cluster Table of Change document items
Several cluster tables can be combined to form a table cluster. In order to combine tables in clusters, Several cluster tables are stored in one corresponding table on the database.
So it contain many structures like this....
Edited by: Upender Verma on Feb 3, 2009 11:32 AM -
Is modifying CDPOS table is advisable???
Hi ,
For PWC audit as per the rules no credit card details should be stored in SAP system. For that we have written a Zprogram which will modify the Documents via FB02 trasaction but now the Changes are captured in CDHDR and CDPOS table. Now please suggest a way to remove that. Currently I'm Changing those credit card values in CDPOS to '*' using modify statement is that advisable ? if not please give me some suggestions.
Thanks and Regards,
Arun.I would not do that in a program executed in productive system. I would (your zprogram should run only once ?)
create a first worjbench transport request with deactivation of the check,
import and execute program
create a second request with reactivation of flag
If auditors disagree, to change flag either
Look at FM like DDIF_DTEL_GET, _PUT and _ACTIVATE (read, update, activate data element). (*)
Code the import of the request in a program (little oversized solution...) with FM like
TMS_MGR_GREP_TRANSPORT_QUEUE Check request in import queue
TMS_MGR_FORWARD_TR_REQUEST Add missing request to import queue
TMS_MGR_IMPORT_TR_REQUEST Execute import
Regards,
Raymond
(*) Those FM are released for use, but are we allowed to change standard element is another matter... -
Mutating table problem help required
Hi. I am rather hoping someone will be able to help me with this problem.
I have two tables, sa and mv. Create script below:
create table mv (
moduleId Char(2) CONSTRAINT ck_moduleId CHECK(moduleId in ('M1', 'M2', 'M3', 'M4', 'M5', 'M6', 'M7', 'M8')),
credits Number(2) CONSTRAINT ck_credits CHECK(credits in (10, 20, 40)),
constraint pk_mv primary key(moduleId)
create table sa (
stuId Char(2) CONSTRAINT ck_stuId CHECK(stuId in ('S1', 'S2', 'S3', 'S4', 'S5')),
moduleId Char(2),
constraint pk_sa primary key(stuId, moduleId),
constraint fk_moduleid foreign key(moduleId) references mv(moduleId)
And the scripts below is to insert data into both:
insert into mv VALUES('M1', 20)
insert into mv VALUES('M2', 20)
insert into mv VALUES('M3', 20)
insert into mv VALUES('M4', 20)
insert into mv VALUES('M5', 40)
insert into mv VALUES('M6', 10)
insert into mv VALUES('M7', 10)
insert into mv VALUES('M8', 20)
insert into sa VALUES('S1', 'M1')
insert into sa VALUES('S1', 'M2')
insert into sa VALUES('S1', 'M3')
insert into sa VALUES('S2', 'M2')
insert into sa VALUES('S2', 'M4')
insert into sa VALUES('S2', 'M5')
insert into sa VALUES('S3', 'M1')
insert into sa VALUES('S3', 'M6')
Now for the actual problems.
Firstly I need to try and overcome the mutating table problem by ensure that stuid = S1 in table sa can not take both moduleId M5 and M6.
Just one or the other. I have created a single trigger, but if fails because of the mutating table problem.
The second problem I need to overcome is that none of the stuids can have moduleIds where total credit value of more than 120 credits. Credit value is stored in the mv table.
Many thanks in advance for any assistance.Use a statement level trigger:
Firstly I need to try and overcome the mutating table problem by ensure that stuid = S1 in table sa can not take both moduleId M5 and M6.
SQL> create or replace trigger sa_trg
2 after insert or update on sa
3 declare
4 c number;
5 begin
6 select count(distinct moduleId) into c
7 from sa
8 where stuid = 'S1'
9 and moduleId in ('M5','M6');
10 if c > 1 then
11 raise_application_error(-20001,'S1 on both M5 and M6!!');
12 end if;
13 end;
14 /
Trigger created.
SQL> select * from sa;
ST MO
S1 M1
S1 M2
S1 M3
S2 M2
S2 M4
S2 M5
S3 M1
S3 M6
8 rows selected.
SQL> insert into sa values ('S1','M5');
1 row created.
SQL> insert into sa values ('S1','M6');
insert into sa values ('S1','M6')
ERROR at line 1:
ORA-20001: S1 on both M5 and M6!!
ORA-06512: at "SCOTT.SA_TRG", line 9
ORA-04088: error during execution of trigger 'SCOTT.SA_TRG'
The second problem I need to overcome is that none of the stuids can have moduleIds where total credit value of more than 120 credits. Credit value is stored in the mv table
SQL> create or replace trigger sa_trg
2 after insert or update on sa
3 declare
4 c number;
5 begin
6 select count(distinct moduleId) into c
7 from sa
8 where stuid = 'S1'
9 and moduleId in ('M5','M6');
10 if c > 1 then
11 raise_application_error(-20001,'S1 on both M5 and M6!!');
12 end if;
13
14 select count(*) into c from (
15 select stuid
16 from mv, sa
17 where sa.moduleid=mv.moduleid
18 group by stuid
19 having sum(credits)>120);
20
21 if c > 0 then
22 raise_application_error(-20002,'A student cannot have more than 120 credits!!');
23 end if;
24
25 end;
26 /
Trigger created.
SQL> select stuid, sum(credits)
2 from mv, sa
3 where sa.moduleid=mv.moduleid
4 group by stuid;
ST SUM(CREDITS)
S3 30
S2 80
S1 100
SQL> insert into sa
2 values ('S1','M4');
1 row created.
SQL> select stuid, sum(credits)
2 from mv, sa
3 where sa.moduleid=mv.moduleid
4 group by stuid;
ST SUM(CREDITS)
S3 30
S2 80
S1 120
SQL> insert into sa
2 values ('S1','M7');
insert into sa
ERROR at line 1:
ORA-20002: A student cannot have more than 120 credits!!
ORA-06512: at "SCOTT.SA_TRG", line 20
ORA-04088: error during execution of trigger 'SCOTT.SA_TRG'Max
http://oracleitalia.wordpress.com -
Data source to be created on CDPOS table in CRM.
Hi
I have to create a data source on CDPOS table in CRM. I would like to know is it necessary
for me to include or join it in infoset query with CDHDR table.
In my case I do not want to extract all the records from CDPOS , only the ones with the
date fields changed and which has tab_key as *zdtcvn(say). The valid records matching this criteria
won't be too much. So still do i need to take into consideration the CDHDR table to improve the
index thing...
Please advise.
Thanks in advance
Regards,
kate.Hi Kate,
This will be depend upon your requirement , if u need to extract header level info also like who changed this document what is the time...e.t.c..THEN u need to add CDHDR also..Otherwise CDPOS is enough....
Assign points , If useful... -
FOR ALL ENTRIES - CDHDR / CDPOS Tables
Hi,
I know there have been a lot of threads concerning the "for all entries" statement. Nevertheless I got a problem downloading the change document tables CDHDR/CDPOS with this statement and I haven't found anything in this forum regarding this special issue.
While trying the for all entries statement in the below manner for downloading first CDHDR and then the CDPOS for all entries of the selected CDHDR it took 3 days and didn't finish, so we aborted the ABAP. The JOIN statement doesn't work in a 4.6c environment for the Cluster tables, hence this isn't an option.
Can you give me some advise of how to improve downloading those tables in this way:
1. Download CDHDR with limitation of fields OBJECTCLAS and UDATE
2. Then Download CDPOS for all CHANGENR out of the first selection of CDHDR
This was the way I tried it:
SELECT
ACT_CHNGNO CHANGE_IND CHANGENR MANDANT OBJECTCLAS OBJECTID PLANCHNGNR TCODE UDATE USERNAME UTIME WAS_PLANND APPENDING CORRESPONDING FIELDS OF TABLE T_CDHDR FROM CDHDR WHERE UDATE IN s_UDAT1 AND OBJECTCLAS IN s_OBJE0.
ENDSELECT.
SELECT
CHANGENR CHNGIND CUKY_NEW CUKY_OLD FNAME MANDANT OBJECTCLAS OBJECTID TABKEY TABNAME UNIT_NEW UNIT_OLD VALUE_NEW VALUE_OLD INTO gs_CDPOS FROM CDPOS CLIENT SPECIFIED for all entries in T_CDHDR WHERE OBJECTCLAS IN s_OBJE2 AND MANDANT EQ T_CDHDR-MANDANT AND OBJECTCLAS EQ T_CDHDR-OBJECTCLAS AND CHANGENR EQ T_CDHDR-CHANGENR.
ENDSELECT.THis prg might b usefull to u
* Mass display or print Purchase Order History
* You can request report by :
* 1. Change date
* 2. User Name
* 3. Purchase Order Number
* 4. Vendor Code
* Written by : SAP Basis, ABAP Programming and Other IMG Stuff
* http://www.sap-img.com
REPORT ZPOCHANGE LINE-SIZE 132 NO STANDARD PAGE HEADING
LINE-COUNT 065(001)
MESSAGE-ID VR.
TABLES: DD04T,
CDHDR,
CDPOS,
DD03L,
DD41V,
T685T,
VBPA,
TPART,
KONVC,
EKKO.
SELECT-OPTIONS: XUDATE FOR CDHDR-UDATE,
XNAME FOR CDHDR-USERNAME,
XEBELN FOR EKKO-EBELN,
XLIFNR FOR EKKO-LIFNR.
SELECTION-SCREEN SKIP.
* TEXT-001 - Sorting Sequence
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.
DATA: INDTEXT(60) TYPE C.
DATA: BEGIN OF ICDHDR OCCURS 50.
INCLUDE STRUCTURE CDHDR.
DATA: END OF ICDHDR.
DATA: BEGIN OF ICDSHW OCCURS 50.
INCLUDE STRUCTURE CDSHW.
DATA: END OF ICDSHW.
DATA: BEGIN OF EKKEY,
EBELN LIKE EKET-EBELN,
EBELP LIKE EKET-EBELP,
ETENR LIKE EKET-ETENR,
END OF EKKEY.
DATA: BEGIN OF ITAB OCCURS 50,
BEGIN OF EKKEY,
EBELN LIKE EKET-EBELN,
EBELP LIKE EKET-EBELP,
ETENR LIKE EKET-ETENR,
END OF EKKEY,
CHANGENR LIKE CDHDR-CHANGENR,
UDATE LIKE CDHDR-UDATE,
UTIME LIKE CDHDR-UTIME,
USERNAME LIKE CDHDR-USERNAME,
CHNGIND LIKE CDSHW-CHNGIND,
FTEXT LIKE CDSHW-FTEXT,
OUTLEN LIKE CDSHW-OUTLEN,
F_OLD LIKE CDSHW-F_OLD,
F_NEW LIKE CDSHW-F_NEW,
END OF ITAB.
DATA: OLD_OBJECTID LIKE CDHDR-OBJECTID.
FIELD-SYMBOLS: <F_OLD>, <F_NEW>.
SELECT * FROM EKKO WHERE EBELN IN XEBELN AND
LIFNR IN XLIFNR.
CLEAR CDHDR.
CLEAR CDPOS.
CDHDR-OBJECTCLAS = 'EINKBELEG'.
CDHDR-OBJECTID = EKKO-EBELN.
PERFORM GETCHGDOCS.
ENDSELECT.
IF SUDATE = 'X'.
SORT ITAB BY UDATE EKKEY-EBELN CHANGENR EKKEY-EBELP
EKKEY-ETENR.
ELSEIF SNAME = 'X'.
SORT ITAB BY USERNAME EKKEY-EBELN CHANGENR EKKEY-EBELP
EKKEY-ETENR.
ELSE.
SORT ITAB BY EKKEY-EBELN CHANGENR EKKEY-EBELP EKKEY-ETENR.
ENDIF.
LOOP AT ITAB.
CLEAR: INDTEXT, EKKEY.
CASE ITAB-CHNGIND.
WHEN 'U'.
INDTEXT(50) = ITAB-FTEXT.
INDTEXT+51 = TEXT-020.
CONDENSE INDTEXT.
WHEN 'D'.
INDTEXT = TEXT-021.
WHEN 'E'.
INDTEXT(5) = ITAB-FTEXT.
INDTEXT+51 = TEXT-021.
CONDENSE INDTEXT.
WHEN 'I'.
INDTEXT = TEXT-022.
ENDCASE.
RESERVE 4 LINES.
IF WCHANGENR NE ITAB-CHANGENR.
WCHANGENR = ITAB-CHANGENR.
EKKEY = ITAB-EKKEY.
WRITE:/ ITAB-UDATE UNDER 'Change Date',
ITAB-UTIME UNDER 'Time',
ITAB-USERNAME UNDER 'User Name',
ITAB-EKKEY-EBELN UNDER 'PO No',
ITAB-EKKEY-EBELP UNDER 'Item',
ITAB-EKKEY-ETENR UNDER 'Sch No',
INDTEXT UNDER 'Changes'.
ELSEIF ITAB-EKKEY NE EKKEY.
WRITE:/ ITAB-EKKEY-EBELP UNDER 'Item',
ITAB-EKKEY-ETENR UNDER 'Sch No',
INDTEXT UNDER 'Changes'.
ENDIF.
CASE ITAB-CHNGIND.
WHEN 'U'.
ASSIGN ITAB-F_OLD(ITAB-OUTLEN) TO <F_OLD>.
ASSIGN ITAB-F_NEW(ITAB-OUTLEN) TO <F_NEW>.
WRITE: / TEXT-023 UNDER 'Changes',
<F_OLD>.
WRITE: / TEXT-024 UNDER 'Changes',
<F_NEW>.
WHEN 'E'.
ASSIGN ITAB-F_OLD(ITAB-OUTLEN) TO <F_OLD>.
WRITE: TEXT-023 UNDER 'Changes',
<F_OLD>.
ENDCASE.
SKIP.
ENDLOOP.
TOP-OF-PAGE.
WRITE:/ SY-DATUM,SY-UZEIT,
50 'P U R C H A S E O R D E R H I S T O R Y',
120 'Page', SY-PAGNO.
WRITE: / SY-REPID,
60 'Purchase Orders Changes'.
SKIP.
ULINE.
IF SUDATE = 'X'.
WRITE:/001 'Change Date',
014 'Time',
024 'User Name',
038 'PO No',
050 'Item',
057 'Sch No',
065 'Changes'.
ELSEIF SOBID = 'X'.
WRITE:/001 'PO No',
013 'Item',
020 'Sch No',
028 'Change Date',
041 'Time',
051 'User Name',
065 'Changes'.
ELSE.
WRITE:/001 'User Name',
015 'Change Date',
028 'Time',
038 'PO No',
050 'Item',
057 'Sch No',
065 'Changes'.
ENDIF.
ULINE.
FORM GETCHGDOCS.
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.
CHECK SY-SUBRC EQ 0.
DELETE ICDHDR WHERE CHANGE_IND EQ 'I'.
CHECK NOT ICDHDR[] IS INITIAL.
LOOP AT ICDHDR.
CHECK ICDHDR-UDATE IN XUDATE.
CHECK ICDHDR-USERNAME IN XNAME.
CALL FUNCTION 'CHANGEDOCUMENT_READ_POSITIONS'
EXPORTING CHANGENUMBER = ICDHDR-CHANGENR
IMPORTING HEADER = CDHDR
TABLES EDITPOS = ICDSHW
EXCEPTIONS NO_POSITION_FOUND = 1
OTHERS = 2.
CHECK SY-SUBRC EQ 0.
LOOP AT ICDSHW.
CHECK ICDSHW-TEXT_CASE EQ SPACE.
MOVE-CORRESPONDING ICDSHW TO ITAB.
MOVE-CORRESPONDING ICDHDR TO ITAB.
MOVE ICDSHW-TABKEY+3 TO ITAB-EKKEY.
APPEND ITAB.
ENDLOOP.
ENDLOOP.
ENDFORM.
* END OF PROGRAM -
I have been producing a VI that loads a set of data and displays it in a table: A table control is initialised with an empty variable, the loaded data takes the place of the variable and fills the table, while some headers are added. That table feeds an intensity graph to give a pictorial impression of the data.
With this scheme, a user can change any value of the table, and the changes are interactively reflected on the graph.
Problem: after few saving of the VI, the access to the table doesn't work anymore. It is the same with all my numerical controls in the VI where it should be possible to enter a value.
If anybody has an idea on the potential
causes of these problem, I would be really grateful as it is very useful...when it works !
Regards,
Elie AllouisI can not image what is causing the error. Would you be willing to post some code to see if we can reproduce the problem?
Jeremy7
Maybe you are looking for
-
XL H1 24F with FCP 5.1.4
hallo dear FCP users, I will be shooting a dokumentary in Berlin in the next couple weeks using 2 Canon XL h1 and will be editing the material on my Macpro 2,6 with FCP 5.1.4. I do not have an Aja Kona or anything like that and would like to edit the
-
Unable to connect Forms and Report with Oracle 9i database
Dear All Please help I have received the following message when i connect Developer 10G Report builder with oracle 9i database. scott/tiger@z REP-0501:Unable to connect to the specified database ORA-12154:TNS could not resolve service name. I have wr
-
Howto deploy custom data types
I have created a custom data type and added this to my type palette in a new .ini file. When I distribute my application is it necessary to distribute this .ini file? If so, where does it need to be copied to? Also, what (if any) TestStand API call
-
Which spec is best value between these 2 please?
HI everyone, IM looking at purchasing a MBP over the weekend,and would appreciate some opinions into which of the 2 specs below would be the best value? Basically,I've been given a budget of £1600 to spend and have been considering the following: Ent
-
Seeded Report Ouput error in Request Set
All, i have run a seeded oracle report multiple times in a request set , with 5 different parameters. The report runs to completion but output for report comes only for first or sometime first two reports. Rest all pdf output gives error "No Lob foun