Application Development and Automation 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: 
Read only

conversion???

Former Member
0 Likes
648

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
Read only

Former Member
0 Likes
580

Try using FM: "CONVERSION_EXIT_MATN1_INPUT"

Regards

Eswar

Read only

Former Member
0 Likes
580

Use CONVERSION_EXIT_ALPHA_INPUT

or

CONVERSION_EXIT_MATN1_INPUT

Read only

Former Member
0 Likes
580

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.

Read only

Former Member
0 Likes
580

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.

Read only

0 Likes
580

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