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

Problem while using Alphanumeric Material No for BAPI_OBJCL_CONCATENATEKEY

Former Member
0 Likes
1,101

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

5 REPLIES 5
Read only

former_member404244
Active Contributor
0 Likes
902

Hi,

use the function module BAPI_BATCH_SAVE_REPLICA .. No need for the two function modules you are working.

Regards,

Nagaraj

Read only

0 Likes
902

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

Read only

0 Likes
902

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

Read only

0 Likes
902

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

Read only

RaymondGiuseppi
Active Contributor
0 Likes
902

You code is correct (it's almost a copy of FORM get_batch_classification_keys in standard include OEM_ROUTINE ) so check your data, are they actually in internal format ?

Regards,

Raymond