09-19-2008 7:30 AM
Is there a conversion routine to convert mara-matnr to cdhdr-OBJECTID.??
I have to use a FM u201CCHANGEDOCUMENT_READu201D for which require CDHDR-OBJECTID , to get the changes done to a material.
09-19-2008 7:33 AM
09-19-2008 8:02 AM
09-19-2008 8:26 AM
Hi,
Use the conversion exit and below example piece of code may help you:
data: lo_matnr type CDHDR-OBJECTID,
lv_matnr type matnr.
CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
EXPORTING
input = lv_matnr
IMPORTING
OUTPUT = lo_matnr
EXCEPTIONS
LENGTH_ERROR = 1
OTHERS = 2
.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
else.
CALL FUNCTION 'CHANGEDOCUMENT_READ'
EXPORTING
ARCHIVE_HANDLE = 0
CHANGENUMBER = ' '
DATE_OF_CHANGE = '00000000'
objectclass = 'ADRESSE'
OBJECTID = lo_matnr...
Regards
Salini.
09-19-2008 8:39 AM
You can use the conversion routine,
CONVERSION_EXIT_MATN1_INPUT
Import parameters Value
INPUT 9500014
Export parameters Value
OUTPUT 000000000009500014
000000000009500014 can be used in CDHDR-OBJECTID.
09-19-2008 11:00 AM