‎2011 Jul 25 10:47 AM
Hi Sap gurus,
I am struck up with the Bapi while working. Could any one help me out with the below logic.I have tried to use the below Bapi 'BAPI_OBJCL_CONCATENATEKEY' passing the Concatenated Object key to BAPI_OBJCL_CHANGE.
Here when i having a material number as numeric number the Bapi is working fine but when i am having the material number as Alpha numeric number I am getting problem . The Bapi is not proving the fields by concatenation. Can any one help me how could I get for Alplhanumeric Material Numbers.
it_object-key_field = 'MATNR'.
it_object-value_int = p_matnr.
APPEND it_object.
it_object-key_field = 'WERKS'.
it_object-value_int = p_werks.
APPEND it_object.
it_object-key_field = 'CHARG'.
it_object-value_int = p_charg.
APPEND it_object.
CALL FUNCTION 'BAPI_OBJCL_CONCATENATEKEY'
EXPORTING
objecttable = 'MCHA'
IMPORTING
objectkey_conc = w_object
TABLES
objectkeytable = it_object
return = rettab.
Thanks
Satish Raju
‎2011 Jul 25 11:12 AM
Hi,
use the function module BAPI_BATCH_SAVE_REPLICA .. No need for the two function modules you are working.
Regards,
Nagaraj
‎2011 Jul 25 12:38 PM
Hi Nagraj,
Could you please tell me if i go with my process how can i handle the Materials with Alphanumeric numbers. When i use Alphanumeric material I am not getting the concatenated Key.
Thanks
Satish Raju
‎2011 Jul 25 12:56 PM
Hi,
Have you passed the leading zero's for the alphanumeric material... ?? I have checked in my system i have passed like this from SE37.
MATERIAL NUMBER ->0000000000000BA901
WERKS->1000
CHARG->0000012345
and i got the OBJECTKEY_CONC correctly...
Please check the data you are passing.
also instead of using the FM ,as you know the material, batch and plant, inside the loop you can go for concatenation statement for the three fields.. for material and batch , you can use conversion_exit_alpha_input to have zero's .
Regards,
Nagaraj
‎2011 Jul 25 1:56 PM
Hi Nagaraj,
I donot have a material with out leading Zero's. I have a material ZF126 (with out leading zero's and Charg--B48. When i use BAPI_OBJCL_CONCATENATEKEY it is giving me OBJECTKEY_CONC --ZF126 B60 in an inproper way of concatenation.
This is my problem.
The solution of Using BAPI_BATCH_SAVE_REPLICA is not updating data base with the data provided. I need to update Batch Master Classification data Manufacturing Site /Plant, Country of Origin, Date of Manufacture.
By Using this Save BAPI I can update Country of Origin and Date of Manufacture but for Manufacturing Plant I need to use the Tables section in Save Bapi.
My target is to update three fields Manufacturing Site /Plant, Country of Origin, Date of Manufacture.
This save BAPI is helping me to update 2 fields but not Manufacturing Plant. Could you please help me.
Thanks
Satish Raju
‎2011 Jul 25 12:55 PM