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

BAPI_OBJCL_CONCATENATEKEY

Former Member
0 Likes
3,062

Hi,

I am trying to use BAPI_OBJCL_CONCATENATEKEY to get the vakey(lifnr + matnr + ekorg +ekosz) but i am getting no output. Can anyone please tell me how to use this BAPI. I am providing the 4 field names  with their respestive values in the BAPI but getting no output.

Thanks in advance.

10 REPLIES 10
Read only

RaymondGiuseppi
Active Contributor
0 Likes
2,220

Can you post your code for filling of parameter, as in following sample


ls_objectkeytable-key_field = 'MATNR'.

ls_objectkeytable-value_int = lv_matnr.

APPEND ls_objectkeytable TO lt_objectkeytable.

ls_objectkeytable-key_field = 'CHARG'.

ls_objectkeytable-value_int = lv_charg.

APPEND ls_objectkeytable TO lt_objectkeytable.

ls_objectkeytable-key_field = 'WERKS'.

ls_objectkeytable-value_int = lv_werk.

APPEND ls_objectkeytable TO lt_objectkeytable.

CALL FUNCTION 'BAPI_OBJCL_CONCATENATEKEY'

  EXPORTING

    objecttable   = 'MCH1'

  IMPORTING

    objectkey_conc = lv-objectkey_conc

  TABLES

    objectkeytable = lt_objectkeytable

    return        = lt_return.

Regards,

Raymond

Read only

0 Likes
2,220

I have  used EINE as object table and

KEY_FIELD                      VALUE_INT

INFNR                            XxxxxxxxxX

MATNR                           XxxxxxxxX

EKORG                           XxxX

EKOSZ                           X

Read only

0 Likes
2,220

EINE doesn't have a MATNR field, so FM is unable to identify conversion exit associated to MATNR field (program looks into structure EINE)

Hint: Try table EINA, or insure your list of key is correct?

Regards,

Raymond

Read only

0 Likes
2,220

Actually if you see the table a018/Kong, they have a field vakey which is actually concatenation of the fields I have mentioned above. I require this field for info record condition creation. So how do I get this concatenated field

Read only

0 Likes
2,220

Just find a table which contains every required field.

(In my system A018 doesn't carry INFNR, A028 doesn't carry MATNR, etc. so look on your)

Regards,

Raymond

Read only

Former Member
0 Likes
2,220

Hi tanushree,

Please check the data you are passing , are they actually in internal format or not ?

You can use for matnr conversion_exit_alpha_input to have zero's .

Regards.

Ɩzgün

Read only

0 Likes
2,220

Can you please specify like what internal format.

Read only

0 Likes
2,220

Many systems have ALPHA conversion for MATNR, but not all, many have MATN1, MATN2 andother conversion exit, there ia also an available BAdI BADI_MATN1, and there was an exit in old times too...

Regards,

Raymond

Read only

Flavio
Active Contributor
0 Likes
2,220

Hi Tanushree,

Could you please share what is returned in the RETURN structure, after having run the BAPI?

it may help in understanding where the issue is.

Thanks and regards

Flavio

Read only

Former Member
0 Likes
2,220

In the tables, the external fields get the values same as internal fields. And the return table is blank.