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_CREATE

former_member671009
Participant
0 Likes
2,607

Hi Experts,

Am creating an assignment as follows for WB66 transaction using this BAPI.

CALL FUNCTION 'BAPI_OBJCL_CREATE'

EXPORTING

objectkeynew = '000000001'

objecttablenew = 'KNA1'

classnumnew = 'TEST_SITE_GROUP'

classtypenew = '030'

The return table is giving the following return messages:

1.Assignment does not exist or is not valid on - I

2.Saving changes to assignments - S

3.Assignment created - S

After this I called'BAPI_TRANSACTION_COMMIT and checked the transaction WB66.

But WB66 shows the class has no assignments. Am I calling the right BAPI for creating an assignment for class.

Kinldy give your inputs.

Regards

Sridevi S

5 REPLIES 5
Read only

Former Member
0 Likes
1,311

Are you able to achieve it by online with same data?

Thank you

Read only

Former Member
0 Likes
1,311

Check the classtype is valid or not??

Read only

Former Member
0 Likes
1,311

Hi,

Try this way.....



*       Getting the reference tables and values----------------
      call function 'BAPI_OBJCL_GETDETAIL'
        exporting
          objectkey        = w_objectkey          "Old customer Number
          objecttable      = 'KNA1'
           classnumnew = 'TEST_SITE_GROUP'
            classtypenew = '030'
        tables
          allocvaluesnum   = t_allocvaluesnum
          allocvalueschar  = t_allocvalueschar
          allocvaluescurr  = t_allocvaluescurr
          return           = t_lreturn.


*     Create with reference-----------------------
      call function 'BAPI_OBJCL_CREATE'
        exporting
          objectkeynew    = w_objectkeynew            "new Customer Number
          objecttablenew  = 'KNA1'
          classnumnew     = w_classnum
          classtypenew    = w_classtype
        tables
          allocvaluesnum  = t_allocvaluesnum
          allocvalueschar = t_allocvalueschar
          allocvaluescurr = t_allocvaluescurr
          return          = t_lreturn.


Prabhudas

Read only

0 Likes
1,311

Thank you all. its working fine when i tested by calling the bapi in program followed by bapi_transaction_commit.

Read only

former_member671009
Participant
0 Likes
1,311

thanks..