Skip to Content
0

How to get Object for create customer master's classification?

Apr 05, 2017 at 11:15 AM

136

avatar image

Hi All,

I am a fresher and just started working on BAPI. I am using BAPI_OBJCL_CREATE to create classification for customer master. here in this BAPI there is import parameter OBJECTKEYNEW type of BAPI1003_KEY-OBJECT. please let me know from where I can get value of this parameter or please suggest me what should I pass in this parameter.

Thanks and Regards,

Sunil

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Evgeny Gubenko Apr 17, 2017 at 12:15 PM
-1

Hi

For customer master you can put KUNNR field with leading zeros, as it's done by standard processing

E. Gubenko

Show 1 Share
10 |10000 characters needed characters left characters exceeded

I've checked BAPI_OBJCL_CREATE documentation and it's confirming my words regarding direct mapping. Also I've created working example, so you can use it:

DATA:
  lv_objkey TYPE bapi1003_key-object,
  lt_return TYPE bapiret2_t.


lv_objkey = lv_kunnr. "customer number in internal format (with leading zeros)
CALL FUNCTION 'BAPI_OBJCL_CREATE'
  EXPORTING
    objectkeynew   = lv_objkey 
    objecttablenew = lv_table "KNA1
    classnumnew    = lv_class "class number
    classtypenew   = lv_klart "011
  TABLES
    return         = lt_return.


CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
  EXPORTING
    wait = abap_true.<br>

capture.png (27.4 kB)
0
Raymond Giuseppi
Apr 18, 2017 at 09:56 AM
0

Did you look for documentation provided for individual BAPI like BAPI_OBJCL_CREATE_KEY and BAPI_OBJCL_CREATE or the FAQ 1083986 - BAPIs for classification - Overview.

Share
10 |10000 characters needed characters left characters exceeded