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: 

how to add the leading 0 by calling CONVERSION_EXIT_MATN1_INPUT

Former Member
0 Kudos

hi experts,

i've to pass object key to bapi_getdetail by doing the following

a) Add the leading 0 to matnr by calling the conversion routine 'CONVERSION_EXIT_MATN1_INPUT and the return will be an 18 digit value . (CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT)


b) Concatenate the converted matnr with batch. (CALL FUNCTION 'BAPI_OBJCL_CONCATENATEKEY')


c) Pass this value to the object key.(CALL FUNCTION 'BAPI_OBJCL_GETDETAIL')

'


2 REPLIES 2

gouravkumar64
Active Contributor
0 Kudos

Hi SUHAS,

Generally I do like this.

check this

a)Within one form

FORM create_material USING pv_input type ty_input.

data lwa_HEADDATA type  BAPIMATHEAD,


CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'

   EXPORTING

     input              = pv_input-matnr

  IMPORTING

    OUTPUT             = lwa_HEADDATA-material

  EXCEPTIONS

    LENGTH_ERROR       = 1

    OTHERS             = 2.

For b) &  c)  check in scn like this thread https://scn.sap.com/thread/351573

there are many examples.

Thanks

Gourav.


raymond_giuseppi
Active Contributor
0 Kudos

That what you have to do, but you did not write what problem you encountered ?

So I can not advise you anything other than reading carefully some notes like Note 1083984 - BAPI_OBJCL_CONCATENATEKEY and BAPI_OBJCL_SPLITKEY: Condition and other notes attached to master Note 1083986 - BAPIs for classification - Overview.

Regards,

Raymond