on 06-04-2014 10:41 AM
Hi All,
I am passing a deleted delivery into CDHDR table.
Normally if a document is deleted, CDHDR-CHANGE_IND field will be updated as "D". But it is appearing as "U" (Update).
But CDPOS-CHNGIND field correctly updated as "D" (Delete)
Is it a standard behaviour.
Regards,
Raja Durai
This seems to be standard behaviour. When you delete a delivery, the system will call function LIEFERUNG_WRITE_DOCUMENT in the update task to write the change documents. During the delete of the delivery, the function module is called here:
SAPMV50A FORM BELEG_CHANGE_DOCUMENTS
**************************************************
CALL FUNCTION 'LIEFERUNG_WRITE_DOCUMENT' IN UPDATE TASK
EXPORTING
objectid = lf_aenderungsobjekt
tcode = sy-tcode
utime = sy-uzeit
udate = sy-datum
username = sy-uname
* PLANNED_CHANGE_NUMBER = ' '
* OBJECT_CHANGE_INDICATOR = 'U'
* PLANNED_OR_REAL_CHANGES = ' '
* ICDTXT_LIEFERUNG = ' '
n_likp = ls_new_likp
o_likp = ls_old_likp
upd_likp = lf_upd_likp
upd_lips = lf_upd_lips
upd_vbpa = lf_upd_vbpa
n_vbuk = ls_new_vbuk
o_vbuk = ls_old_vbuk
upd_vbuk = lf_upd_vbuk
**************************************************
The data object " OBJECT_CHANGE_INDICATOR" is the one that holds the value that will eventually end up in field CDHDR-CHANGE_IND. At the above code, you can see the delivery deletion program does not pass anything to this data object (OBJECT_CHANGE_INDICATOR = 'U' is commented out). However, when nothing is passed to this data object by the calling program, the system will autmoatically fill the field with "U"; you can see this by displaying the import parameters of FM LIEFERUNG_WRITE_DOCUMENT in SE37.
For the system to write a value of "D", the delivery program would have to call function 'LIEFERUNG_WRITE_DOCUMENT' like this:
**************************************************
CALL FUNCTION 'LIEFERUNG_WRITE_DOCUMENT' IN UPDATE TASK
EXPORTING
objectid = lf_aenderungsobjekt
tcode = sy-tcode
utime = sy-uzeit
udate = sy-datum
username = sy-uname
* PLANNED_CHANGE_NUMBER = ' '
OBJECT_CHANGE_INDICATOR = 'D'
* PLANNED_OR_REAL_CHANGES = ' '
* ICDTXT_LIEFERUNG = ' '
n_likp = ls_new_likp
o_likp = ls_old_likp
upd_likp = lf_upd_likp
upd_lips = lf_upd_lips
upd_vbpa = lf_upd_vbpa
n_vbuk = ls_new_vbuk
o_vbuk = ls_old_vbuk
upd_vbuk = lf_upd_vbuk
**************************************************
I do not think this would be considered a bug however and believe the system behaviour you are seeing is probably considered standard behaviour.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
96 | |
10 | |
9 | |
6 | |
3 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.