Sunteți pe pagina 1din 18

Pasted from

<http://help.sap.com/SAPHELP_nwmobile71/helpdata/EN/2a/fa01c3493111d182b70000e829fbfe/co
ntent.htm?
frameset=/EN/2a/fa01b6493111d182b70000e829fbfe/frameset.htm&current_toc=/en/2a/fa0b1a49
3111d182b70000e829fbfe/plain.htm&node_id=44

Change Document Configuration

1) Decide the database table that you want to include in the change
document object. You usually would not need to log changes for all fields of the
table - decide which fields' changes need to be logged for.

2) For each of the above fields, go to the data-element and check the "further
characteristics" tab. Here there is a checkbox called "change document". Ensure
that this checkbox is checked for all data-elements of the fields that need to be
logged.

3) Create and complete the definition of the change document object through
transaction SCDO.

a. Click on the "Create" button on the toolbar.

b. Enter the name (object class) of the new change document object. Namespace
can be entered if you have created a namespace for yourself in the system.
Otherwise you can leave the "Namespace" field blank and continue.

c. Enter a short description for the change document object and also give the
names of the DB tables for which changes need to be logged.

Copy as internal tab. - If the data is to be passed multiple rows at a time then this
should be checked. This would normally happen when item level details are to be
captured. In this case data would be passed in an internal table rather than in a
work area.

Doc. for individual fields at delete - If you want separate log entries for each field when
data is deleted, mark this field. If it is not marked, the deletion of all relevant
fields is entered in one document item.

This needs to be specified if currency and unit fields are defined


Name of ref tab. -
in a reference table rather than in the table being passed.

Name of the old-field string - We can specify the name of the structure through which
the "old data" will be passed. However, we can leave this blank as the *work area
is taken as default. Now click on the " Insert Entries" button and then click on "Save" to
save your data.

d. Once the above data is saved, we need to generate the update programs
that will later be included into our main program for logging changes. To do this,

click on "generate update program" through the "utilities" menu. After


entering required information, click on the

"Generate" button. This will display a list of all the ABAP or DB objects that
will be created and generated.
Pasted from
<http://help.sap.com/SAPHELP_nwmobile71/helpdata/EN/2a/fa01c3493111d182b70000e829fbfe/co
ntent.htm?
frameset=/EN/2a/fa01b6493111d182b70000e829fbfe/frameset.htm&current_toc=/en/2a/fa0b1a49
3111d182b70000e829fbfe/plain.htm&node_id=44
e. The list of objects that "will be created" is displayed along with the input
parameters that were entered on the previous screen. If it is okay, click on the

"Save" icon. This will actually create and generate the required ABAP and
DDIC objects.

f. The final screen will show you that all the required objects were generated
successfully. The objects generated will always consist of four includes and one
function module. If the "pass as internal table" checkbox was checked, then
additional DB structures are created to enable passing the data to the FM in an
internal table.

4) Integrate the objects generated in above step into the program(s) through
which you want changes to be logged. The change document will log only those
changes to the table, which had been made through the program(s) into which
this functionality is integrated.

5) You can display the changes that had been logged in change documents
using the standard report RSSCD200.

Pasted from
<http://wiki.scn.sap.com/wiki/display/Snippets/Steps+to+enable+logging+of+changes+in+change
+documents>

RSCDOK95 -> Abap program for deleting

CDHDR (header table) and CDPOS (detail table).

SALE ilem kodunda, Ana Veri Datmn Konfigre Et uyarlama adamnn yardm
tuundaki "Distributable Master Data." ksm aaya kopyalanmtr.

This section contains the following topics:

1. Distributable Master Data

2. Customizing Data to Be Distributed

3. Standard Tasks in Error Handling

4. Further Notes

1. Distributable Master Data


Pasted from
<http://help.sap.com/SAPHELP_nwmobile71/helpdata/EN/2a/fa01c3493111d182b70000e829fbfe/co
ntent.htm?
frameset=/EN/2a/fa01b6493111d182b70000e829fbfe/frameset.htm&current_toc=/en/2a/fa0b1a49
3111d182b70000e829fbfe/plain.htm&node_id=44

Master Data Reducible Message Business Object Request


message

User User

Material X MATMAS Material

Article ARTMAS RetailMaterial ARTFET

Customer * X DEBMAS Customer

Vendor X CREMAS Creditor

G/L account* X GLMAST GeneralLedgerAccount GLFET

Cost center CostCenter

-Master data X COSMAS

-Group COGRP1

-Unit quantity COCOKA

-Plan activity price COACTV

Cost Type CostType

-Master data COELEM


Pasted from
<http://help.sap.com/SAPHELP_nwmobile71/helpdata/EN/2a/fa01c3493111d182b70000e829fbfe/co
ntent.htm?
frameset=/EN/2a/fa01b6493111d182b70000e829fbfe/frameset.htm&current_toc=/en/2a/fa0b1a49
3111d182b70000e829fbfe/plain.htm&node_id=44

-Group COGRP2

Activity Type ActivityType

-Master data X COAMAS

-Group COGRP5

Profit Center ProfitCenter

-Master data PRCMAS

-Hierarchy COGRP6

-Account group COGRP9

CO Resource RESOURCECO ResourceCO

Internal order

INTERNAL_ORDER InternalOrder

Business process COABCM BusinessProcessCO

Work breakdown structure WorkBreakdownStruct


Pasted from
<http://help.sap.com/SAPHELP_nwmobile71/helpdata/EN/2a/fa01c3493111d182b70000e829fbfe/co
ntent.htm?
frameset=/EN/2a/fa01b6493111d182b70000e829fbfe/frameset.htm&current_toc=/en/2a/fa0b1a49
3111d182b70000e829fbfe/plain.htm&node_id=44

Classification System Class

-Characteristic CHRMAS

-Class CLSMAS

-Classification. CLFMAS

Bill of Material *

-Material X BOMMAT

-Document X BOMDOC

Purchasing Info Record *

X INFREC PurchasingInfo -

Source List* X SRCLST SourcOfSupplyList -

Conditions * X COND_A

Activity X SRVMAS Service

Variant Configuration
Pasted from
<http://help.sap.com/SAPHELP_nwmobile71/helpdata/EN/2a/fa01c3493111d182b70000e829fbfe/co
ntent.htm?
frameset=/EN/2a/fa01b6493111d182b70000e829fbfe/frameset.htm&current_toc=/en/2a/fa0b1a49
3111d182b70000e829fbfe/plain.htm&node_id=44

-Conf.profile mat. CNPMAS

-glob. obj.dependencies KNOMAS

-Var.table structure VTAMAS

-Var.table contents VTMMAS

Personnel Administration and Payroll


Accounting (PA)

-Person HRMD_A

Personnel Planning and Development


(PD)

-all object types HRMD_A

* see "Further Notes" below

2. Customizing to Be Distributed
To distribute master data some Customizing data must be synchronized between the distributed
systems. Refer to section:

Modelling and Implementing Business Processes

Synchronization of Customizing Data.

3. Standard Tasks in Error Handling


Pasted from
<http://help.sap.com/SAPHELP_nwmobile71/helpdata/EN/2a/fa01c3493111d182b70000e829fbfe/co
ntent.htm?
frameset=/EN/2a/fa01b6493111d182b70000e829fbfe/frameset.htm&current_toc=/en/2a/fa0b1a49
3111d182b70000e829fbfe/plain.htm&node_id=44
Standard tasks are provided for the various message types to send master data. These standard tasks
must be assigned to organizational units. This procedure is described in the IMG section Error
Handling.

The identification code of the standard task associated with the message type <MESTYP> provided in
the standard system is usually<MESTYP>_Error'.

You can use the standard task of the reference message for message types generated through
reduction.

The message type 'HRMD_A' uses the standard task 'HRMD_Error'.

Further notes
Below is further information on the individual master data items:

General Ledger

The field 'external accounting information' in the company code segment is only relevant if new
general ledgers are created. Changes made to this field are not posted. For security purposes you
must make these changes manually.

Customer

The addresses of contact persons are not distributed.

Long texts are not included in the change document system.

Bills of Material

Bills of material are only distributed with all the items valid on the key date together with any existing
local object dependencies. Long texts, object items (for example, materials, documents, classes) as
well as the history of bills of material are not distributed. Only the status of the bill of material on the
key date is distributed.

Purchasing Info Record

Customs tariff preference data and the order price history are not distributed.

Vendors and materials must be distributed before the purchasing info records.

Conditions concerning purchasing info records are determined by the general distribution conditions,
not by the info record IDoc.

Source List

The vendors, materials and contracts, if applicable, must be distributed before the source book.

The distribution of source list records in connection with scheduling agreements is not supported.

If the filter objects 'purchasing organization' or 'vendor' are used for modelling the distribution of the
source list, SPACE must be entered in the relevant field for source list records that extend across
purchasing organization boundaries or that are vendor-independent.
Pasted from
<http://help.sap.com/SAPHELP_nwmobile71/helpdata/EN/2a/fa01c3493111d182b70000e829fbfe/co
ntent.htm?
frameset=/EN/2a/fa01b6493111d182b70000e829fbfe/frameset.htm&current_toc=/en/2a/fa0b1a49
3111d182b70000e829fbfe/plain.htm&node_id=44
Conditions

Fields that have been reduced are set/changed to inital in the receiver system. If you reduce whole
segments, these are deleted in the target system.

Conditions with use = E (=Bonus, conditions for supplementary calculations) can only be sent
manually, not via the change document system.

HR Master Data

For information about distributing HR master data see section

Human Resources

Master Data Distribution

http://scn.sap.com/people/vikas.aggarwal/blog/2010/01/05/sending-idocs-
automatically-using-change-pointers

Change Pointers in SAP


Change pointers are R/3 objects that mark changes to SAP master data. Change pointers are managed by mechanisms in a Shared
Master Data (SMD) tool and are based on Change Document (CD) objects. CD objects record the changes occurring to master data at a
field level. These changes are stored in tables CDHDR (header table) and CDPOS (detail table).
Pasted from
<http://help.sap.com/SAPHELP_nwmobile71/helpdata/EN/2a/fa01c3493111d182b70000e829fbfe/co
ntent.htm?
frameset=/EN/2a/fa01b6493111d182b70000e829fbfe/frameset.htm&current_toc=/en/2a/fa0b1a49
3111d182b70000e829fbfe/plain.htm&node_id=44
ALE configuration provides a link between CD objects and change pointers. Internal mechanisms update tables BDCP and BDCPS,
which host the change pointers. While CD objects are application-data-specific, the processing status of change pointers is message-
type-specific. Also, the ALE change pointers are activated first at a general level and then at the message-type level.

ALE provides powerful capabilities to capture changes occurring to master data and to distribute them via the IDOC interface. This
feature can be used to keep two or more systems synchronized with respect to master data.

Steps to configure change Pointers:

1. BD61 - Activate the change pointers globally

2. BD50 - Activate the change pointers for individual message types(BD50)

3. RBDMIDOC - Schedule the program RBDMIDOC to run periodically on the sending system.

For Delete Change pointers Tcode BD22 and the standard program is RBDCPCLR

Reduction tool(reduced message types) using Tcode BD53

See the check box in Further characteristics tab of the data element for change document.SE11-->enter data element-->Further
characteristics tabThe check box is to be checked to trigger change pointers.

The change pointer tables (BDCP & BDCPS) should be as small as possible. Use as few change pointers as possible and delete change
pointers which you no longer need.

Activities - Keep it limited

1. Do you really need change pointers?You need change pointers to distribute changes with the ALE SMD tool. If you do not use this
tool, you do not need to write change pointers.You can deactivate change pointers and activate them again with the
transaction BD61.

2. Do you really need to activate change pointers for this messages type?

If some messages types are no longer to be distributed by change pointers, you can deactivate change pointers for this messages
type.You can deactivate change pointers for the message type and reactivate them again.For reduced message types, deactivate the
change pointer with the Reduction tool (Tcode BD53).

3. Are there still too many change pointers to be processed?

The change pointers are analyzed with the transaction BD21 or the report RBDMIDOC in ALE and flagged as processed. If the change
pointers are created periodically, this report should also run periodically.

4. Are no longer required change pointers reorganized in time?


Pasted from
<http://help.sap.com/SAPHELP_nwmobile71/helpdata/EN/2a/fa01c3493111d182b70000e829fbfe/co
ntent.htm?
frameset=/EN/2a/fa01b6493111d182b70000e829fbfe/frameset.htm&current_toc=/en/2a/fa0b1a49
3111d182b70000e829fbfe/plain.htm&node_id=44
The report RBDCPCLR (transaction BD22) to reorganize the change pointer should run periodically. Depending on how many change
pointers are created or processed, you can schedule the background job hourly, daily or weekly. You should delete all obsolete and
processed change pointers. You can also use this report for specified message types

Pasted from <http://sap-info-tips.blogspot.com.tr/2007/06/change-pointers-in-sap.html>

For Delete Change pointers Tcode BD22 and the standard program is RBDCPCLR

BDCP -> Change pointer tablosu ve CPIDENT:Change pointer ID key alan

BDCPS -> Change pointer: Status ve CPIDENT:Change pointer ID ile MESTYPE:leti


tipi key alan

BDCP2 -> Aggregated Change Pointers (BDCP, BDCPS) ve CPIDENT:Change


pointer ID ile MESTYPE:leti tipi key alan

TBDA2 tablosu spro daki yeri Application Server->IDoc Interface / Application Link
Enabling (ALE)->Master Data Distribution->Replication of Modified Data-
>Activate Change Pointers for Message Types

Uyarlamada gzkmeyen ama TBDA2 tablosunda olan BDCP2_ACT alan iin F1


yardmnda yazan metin aadadr.

Information on Whether Change Pointers are Written to


BDCP2
ALE change pointers are stored in the database tables BDCP/BDCPS and BDCP2. If message types
support the use of BDCP2, you should make use of this option, since it considerably improves the
speed at which change pointers are accessed both in read and write mode. The message types are
characterized by the indicator BDCP2_SUP = 'X' in table TBDME.

If you already have change pointers stored in BDCP/BDCPS for a message type that you want to use
with new change pointers, you must migrate the change pointers. Proceed as follows to do this:

During the migration process, change pointers of the message types to migrated must not be
processed. From an organizational point of view, ensure that they cannot be processed, and then
proceed as follows for migration:
Pasted from
<http://help.sap.com/SAPHELP_nwmobile71/helpdata/EN/2a/fa01c3493111d182b70000e829fbfe/co
ntent.htm?
frameset=/EN/2a/fa01b6493111d182b70000e829fbfe/frameset.htm&current_toc=/en/2a/fa0b1a49
3111d182b70000e829fbfe/plain.htm&node_id=44
Process the open change pointers, if possible.
Delete processed and old change pointers.
Set the change pointer destination for the message types to be migrated to 'M', i.e. migration
from BDCP/BDCPS to BDCP2.
Migrate the stored change pointers using report RBDCPMIG.
Set the change pointer destination for the message types to be migrated to 'X', i.e. BDCP2.

In productive operation, do not switch from BDCP2 storage back to BDCP/BDCPS storage. Back-
migration is not supported. The change pointers in table BDCP2 are then not visible for the
application, and data may be inconsistent as a result.

TBDME tablosu spro daki yeri Application Server->IDoc Interface / Application


Link Enabling (ALE)->Master Data Distribution->Scope of Data for Distribution-
>Create Reduced Message Type

BD21: Idoclar deiiklik gstergelerinden ret.

You need to configure an entry (to create change pointers) for creation event for
the message type, change document object and table with field name 'KEY' (in
transaction BD52).

Pasted from <http://scn.sap.com/thread/3251471>

RSEOUT00 program ile 30 statsnde olan IDOC lar gnderilir. Outbound

RBDAPP01 probram ile inbound yaplr

BD87 ile idoclar yeniden yrtlr.


Pasted from
<http://help.sap.com/SAPHELP_nwmobile71/helpdata/EN/2a/fa01c3493111d182b70000e829fbfe/co
ntent.htm?
frameset=/EN/2a/fa01b6493111d182b70000e829fbfe/frameset.htm&current_toc=/en/2a/fa0b1a49
3111d182b70000e829fbfe/plain.htm&node_id=44

RSSCD100 program ile nesne baznda deiiklik raporu alnabiliyor.

Refer below for the configuration steps fro change pointers.

1.BD61 - Activate change pointers generally.

2.BD50 - Activate change pointers for message type.

3.SCDO- Chnage document objects.

4.BD52 - Maintain table views.

5.BD60 - Additional data for message types.

6.WE20 - Partner profile.

7.BD64 - Distribution model.

8.Create a material by using req T.code.

9. Run the program RBDMIDOC by passing message type.

10.WE02 - IDOC list.

Pasted from <http://scn.sap.com/thread/793969>

CHANGE POINTER CDHDR ve CDPOS tablosu doldururken aadakiler yapler

Filling the Fields in the Program


Fill the fields and tables relevant to the change documents in accordance with the
following specifications.
Pasted from
<http://help.sap.com/SAPHELP_nwmobile71/helpdata/EN/2a/fa01c3493111d182b70000e829fbfe/co
ntent.htm?
frameset=/EN/2a/fa01b6493111d182b70000e829fbfe/frameset.htm&current_toc=/en/2a/fa0b1a49
3111d182b70000e829fbfe/plain.htm&node_id=44
General Data

These are the fields that are defined in the INCLUDE program section F<K4>CDF.

OBJECTID

Object value (key) of the object characteristic

TCODE

Transaction with which the change process is performed

UTIME

Time changed

UDATE

Change date

USERNAME

Name of the person who made the change

Object-Specific Data

These are the fields that are defined in the INCLUDE program section F<K4>CDV .

Single Case Tables

Table *<Name of Table>or structure <Name of Old Structure> (with the structure
that matches the table)

The table header line or the structure must contain the original data.

Table <Name of Table>

The table header line must contain the changed, new data.

Table *<Name of Ref. Table> (only if the Name of the Ref. Table was specified in the
definition of the change document object)

The table header line must contain the original currencies and units.

<Name of Ref. Table> (only if the Name of the Ref. Table was specified in the
definition of the change document object)

The table header line must contain the current currencies and units.
Pasted from
<http://help.sap.com/SAPHELP_nwmobile71/helpdata/EN/2a/fa01c3493111d182b70000e829fbfe/co
ntent.htm?
frameset=/EN/2a/fa01b6493111d182b70000e829fbfe/frameset.htm&current_toc=/en/2a/fa0b1a49
3111d182b70000e829fbfe/plain.htm&node_id=44
UPD_<Name of Table>

You use this indicator to specify the processing logic.

The following values are permitted:

"D" (DELETE)

For the row in *<Name of Table> or <Name of Old Structure>, a change document
item must be created that is to be marked as deleted. <Name of Table> is not
processed.

"I" (INSERT)

For the row in *<Name of Table>, a change document item must be created that is
to be marked as entered/recorded. *<Name of Table> or <Name of Old Structure>
are not processed.

"U" (UPDATE)

*<Name of Table> or <Name of Old Structure> and <Name of Table> are


compared and a change document item is created for each changed field. The key
of *<Name of Table> or <Name of Old Structure> and <Name of Table> must be
identical.

" " (Space, no processing)

*<Name of Table> or <Name of Old Structure> and <Name of Table> are not
processed in the update task. If there are no changes, processing can be skipped to
save time.

Multiple Case Tables

These tables must be sorted according to key before they are passed. No double key may
be present in the table.

End of Warning

Y<Name of Table>

The table must contain the original version of the changed or deleted records. The
structure is made up of the table, as specified in the definition of the change
document object under the Name of Table, a processing indicator (TYPE C, Length
1), and if necessary the structure of the referenced current and unit table, as
Pasted from
<http://help.sap.com/SAPHELP_nwmobile71/helpdata/EN/2a/fa01c3493111d182b70000e829fbfe/co
ntent.htm?
frameset=/EN/2a/fa01b6493111d182b70000e829fbfe/frameset.htm&current_toc=/en/2a/fa0b1a49
3111d182b70000e829fbfe/plain.htm&node_id=44
specified in the definition of the change document object under Name of Ref. Table.
It is created during the generation of the INCLUDE objects for the change document
object and stored under the name V<Name of Table> in the Dictionary.

The processing indicator can be changed from Space to "D" if it is to be processed in


the application. Otherwise it has no effect.

X<Name of Table>

The table must contain the original version of the changed or entered records. The
structure is composed in the same way as Y<Name of Table> (see above).

You can use the following values for the processing indicator:

"I" (INSERT)

Line was newly created or table row was deleted; afterwards, a line with the same
key was entered in the same transaction and this is to be documented as Change,
but as Delete and Enter (special case).

"U" or " " (Space) (UPDATE)

The parameter UPD_<Name of Table> (see below) is used to determine whether the
line is a newly entered one or a changed one.. Only when in the parameter value "U"
and the following key comparison of the two tables TABLE_OLD and TABLE_NEW two
lines with the same key are found will there be a query of the processing indicator.

The processing indicators of the internal tables in the multiple case can always be filled
with space, with the exception of the special case (in X<Name of Table>). The option of
filling the processing indicators also with "D", "I", or "U" was set up so that the tables can
also be used in the application programs for other purposes where such processing
indicators can be helpful.

UPD_<Name of Table>

You use this indicator to specify the processing logic.

The following values are permitted:

"D" (DELETE)

For each row in Y<Name of Table>, a change document item must be created that is
to be marked as deleted. X<Name of Table> is not processed.

"I" (INSERT)
Pasted from
<http://help.sap.com/SAPHELP_nwmobile71/helpdata/EN/2a/fa01c3493111d182b70000e829fbfe/co
ntent.htm?
frameset=/EN/2a/fa01b6493111d182b70000e829fbfe/frameset.htm&current_toc=/en/2a/fa0b1a49
3111d182b70000e829fbfe/plain.htm&node_id=44
For each row in X<Name of Table>, a change document item must be created that is
to be marked as inserted. Y<Name of Table> is not processed.

"U" (UPDATE)

The keys of TABLE_OLD and TABLE_NEW are compared. The following cases exist:

1. Rows exist in TABLE_OLD but not in TABLE_NEW: Change document items


need to be created for rows in TABLE_OLD that are to be identified as deleted.

2. Rows exist in TABLE_NEW but not in TABLE_OLD: For the row in TABLE_NEW, a
change document item must be created that is to be marked as entered/recorded.

3. Rows exist in TABLE_OLD as well as in TABLE_NEW: A change document item


is created for every changed field that is defined in the dictionary as change-document-
relevant.

" " (Space, no processing)

Y<Name of Table> and X<Name of Table> are not processed in the update task. If
there are no changes, processing can be skipped to save time.

Text Changes:

If text changes are to be logged (according to definition of the change document object),
the following fields need to be filled:

ICDTXT_<Object>

In this structure, the change document-relevant texts are collected with the
corresponding specifications:

TEILOBJID

Key of changed table row

TEXTART

Text type of changed text

TEXTSPR

Language key

UPDKZ

Change indicator for table row: D(elete), I(nsert) oder U(pdate)


Pasted from
<http://help.sap.com/SAPHELP_nwmobile71/helpdata/EN/2a/fa01c3493111d182b70000e829fbfe/co
ntent.htm?
frameset=/EN/2a/fa01b6493111d182b70000e829fbfe/frameset.htm&current_toc=/en/2a/fa0b1a49
3111d182b70000e829fbfe/plain.htm&node_id=44
UPD_ICDTXT_<Object>

Change indicator for text table.

" " (Space)

Table is not considered in update task.

"U"

Table is not considered in update task.

Optional Parameters

You can also use the following parameters of the INCLUDE program part F<K4>CDF:

CDOC_PLANNED_OR_REAL

With this parameter you control whether the changes to be logged are real or
planned changes.

Possible values:

R Real change

P Planned change

If no plan number Real change


(space) exists

If a plan number Planned change


exists

CDOC_UPD_OBJECT

If it is relevant for the evaluation of the change documents which action was
performed during the change for the respective object, you can pass the executed
action using this parameter.

Possible values:

I The object was inserted.


Pasted from
<http://help.sap.com/SAPHELP_nwmobile71/helpdata/EN/2a/fa01c3493111d182b70000e829fbfe/co
ntent.htm?
frameset=/EN/2a/fa01b6493111d182b70000e829fbfe/frameset.htm&current_toc=/en/2a/fa0b1a49
3111d182b70000e829fbfe/plain.htm&node_id=44
U The object was changed.

D: The object was deleted