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

Created class using BAPI_CLASS_CREATE. But unable to view in CL03

Former Member
0 Likes
4,339

Dear ABAP Experts,

I created a class for class type "001" using BAPI_CLASS_CREATE. But I cant find the class in CL03 for corresponding class type "001" also unable to view in MM Classification view with respective Class type "001".

Given Input to Function module is

Import Parameter :

CLASSNUMNEW = ZRCL01

CLASSTYPENEW = 001

Table Parameter :

CLASSDESCRIPTION = EN EN ZRCUSTOM_CLASS_01

EXECUTED!!!!

RETURN:

I got 2 messages

TYPE : I

ID : CL

MESSAGE : Start of Class processing : 001 ZRCL01

TYPE : I

ID : CL

MESSAGE : Class 001 ZRCL01 Created

But I cant find the class in CL03 transaction for corresponding class type "001" also unable to view in MM Classification view with respective Class type "001".

Please let me know where I am missing?

-Thanks in Advance.

-JANARAJA


1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
3,425

Hi,

Did you call 'BAPI_TRANSACTION_COMMIT' after the 'BAPI_CLASS_CREATE' 's Call?

BR,

Ankit.

17 REPLIES 17
Read only

Former Member
0 Likes
3,426

Hi,

Did you call 'BAPI_TRANSACTION_COMMIT' after the 'BAPI_CLASS_CREATE' 's Call?

BR,

Ankit.

Read only

0 Likes
3,425

Dear Ankit Maskara,

I didnt called commit bapi. Now I developed in report program with COMMIT. But throwing error for CLASSBASICDATA in import parameter. What should I want to pass in these fields.

Thanks.

-Janaraja

Read only

0 Likes
3,425

This message was moderated.

Read only

former_member188827
Active Contributor
0 Likes
3,425

Use statement

COMMIT WORK AND WAIT.

after bapi call.

Regards

Read only

0 Likes
3,425

Thank you netweaver developer.

I passed empty parameter and worked fine.

How can I create characteristics to that corresponding class and class type using BAPI?

Can u please give some idea?

-JANARAJA

Read only

0 Likes
3,425

How can I create characteristics to that corresponding class and class type using BAPI?

is it possible to done using BAPI_CHARACT_CREATE?

My complete process is have to create class and corresponding characteristics with value if not exist, If class and corresponding characteristics already exist means I want to pass only values to the corres. characteristics and then should commit.

Can u please give some idea?

-JANARAJA

Read only

0 Likes
3,425
Read only

rambabu_k3
Active Participant
0 Likes
3,425

Hi Janaraja,

As Ankit mentioned, Please use Transaction commit.

it is clearly mentioned ine the 'BAPI_CLASS_CREATE' FM.

Thanks

Rambabu

Read only

0 Likes
3,425

Ya Mr.Rambabu.. I done it.

  I passed empty parameter in CLASSBASICDATA and worked fine.

How can I create characteristics to that corresponding class and class type using BAPI?

Can u please give some idea?

-JANARAJA

Read only

0 Likes
3,425

Hi Janaraja,

You are correct,use 'BAPI_CHARACT_CREATE'. Do read its documentation.

BR,

Ankit.

Read only

0 Likes
3,425

Dear Ankit,

Thanks for your information.

But how can I assign the characteristics to that particular class?

else.

Is it possible to create class along with characteristics in BAPI_CLASS_CREATE?

Thanks in advance

-JANARAJA

Read only

0 Likes
3,425

Hi Janaraja,

Please see the how to http://wiki.sdn.sap.com/wiki/display/Snippets/BAPI_CHARACT_CREATE.

Yes, you can create characteristics also using BAPI_CLASS_CREATE, in tables parameter pass values to CLASSCHARACTERISTICS.

BR,

Ankit.

Read only

0 Likes
3,425

Hi Ankit,

Thanks alot for your valuable assistance. Have 1 more doubt. If we want to create characteristics means we need to declare its LENGTH and VALUES NUM or VALUES CHAR or VALUES CURR (hope you can understand).

Doubt is If we create characteristics using BAPI_CLASS_CREATE how can we declare the same using BAPI?

Thanks in Advance.

-Best Regards

-JANARAJA

Read only

0 Likes
3,425

Hi Janaraja,

Your two questions are separate so please do not jumble.

Using BAPI_CLASS_CREATE you can create characteristics in class and change their properties via CL02 once they are created. This BAPI allows characteristic creation with basic properties only.

If you want detailed characteristics properties like NUM,CHAR,CURR etc then use BAPI_CHARACT_CREATE and BAPI_TRANSACTION_COMMIT. You can see the characteristics in transaction CT04. Now you can assign these to class using regular CL02. For successful Assignmnet Characteristic Status should be Released (1).

BR,

Ankit.

Read only

0 Likes
3,425

Dear Ankit,

I agree with your suggestion. Let me explain what I am trying to do. Then give a list of required BAPI for that.

Step1: I want to Check the class is exist in SAP system or not let it be "ZSUPERCLS1".

Step2: If ZSUPERCLS1 not exist I want to create the class. If it exist I want to collect all corresponding characteristics with its corresponding class.

Step3: If not all the characteristics exist I want to create missing characteristics with detail desc and type and length for the same class and want to pass the values for all the characteristics. If all the characteristics exist, simply want to load the values.

Please suggest me the list of BAPI in order. It will be great help for me.

Thanks in advance.

-JANARAJA

Message was edited by: Janaraja Lakshmanan

Read only

0 Likes
3,425

Hi Janaraja,

Please open a new thread for this Question, its against the RoE to couple questions. Its also for your advantage because you will get more replies.

BR,

Ankit

Read only

Former Member
0 Likes
3,425

After BAPI Call ...

Use statement

COMMIT WORK AND WAIT.