Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

conversion???

Former Member
0 Kudos

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.

5 REPLIES 5

Former Member
0 Kudos

Try using FM: "CONVERSION_EXIT_MATN1_INPUT"

Regards

Eswar

Former Member
0 Kudos

Use CONVERSION_EXIT_ALPHA_INPUT

or

CONVERSION_EXIT_MATN1_INPUT

Former Member
0 Kudos

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.

Former Member
0 Kudos

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.

0 Kudos

Come on.... make my day...