05-13-2013 7:54 AM
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')
'
05-13-2013 8:24 AM
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.
05-13-2013 8:42 AM
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