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 with bapi_objcl_create

Former Member
0 Likes
2,220

Hi everybody

I am trying to create a class for the line item using bapi_objcl_create. In my case, the line item is not getting saved by the time, the bapi FM was called. So this FM is not able to assign the class to the line item. Can anyone help me in solving this problem.

Thanks in advance

SG

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,710

Hi ,

U have to use the 'BAPI_CLASS_CREATE', which creates the Classes, if the classes does not exist yet.

u have to pass the class number, class type & table parameter for the Class Descriptions , & class basic data.

let me know , if u have any questions.

Thanks,

Manjunath MS

"Reward Points if it is useful"

10 REPLIES 10
Read only

Former Member
0 Likes
1,711

Hi ,

U have to use the 'BAPI_CLASS_CREATE', which creates the Classes, if the classes does not exist yet.

u have to pass the class number, class type & table parameter for the Class Descriptions , & class basic data.

let me know , if u have any questions.

Thanks,

Manjunath MS

"Reward Points if it is useful"

Read only

0 Likes
1,710

Hi Manjunath,

Actually I have to pass object no. (notification no.+ line item no.) into one of the parameters(objectkeynum) in this bapi_objcl_create. This will enable me to assign a class to the line item.

But the main problem is that the notification is not getting saved in the database by this time. So the Bapi FM is unable to recognize the object no.

Thanks in advance

SG

Read only

0 Likes
1,710

Hi Swathi,

Use BAPI_TRANSACTION_COMMIT before calling BAPI_OBJCL_CREATE. This will save the notification number in the database.

Regards,

Sandeep

Read only

0 Likes
1,710

Sandeep

Thanks for the reply. Actually I am developing this code in an include in the user exit. I just wonder whether I can use this BAPI (commit) in an user exit??

Thanks in advance

SG

Read only

Former Member
0 Likes
1,710

hi Swathi,

As u r telling , u r passsing quality Notification Number + line item to BAPI1003_KEY-OBJECT i.e.,,, object key

Can i know what parameter are u passing for OBJECTTABLENEW, i mean table name .

just a hint : u have to pass either QMEL or QMFE

after bapi_objcl_create , use transaction commit bapi.

try & let me know

Thanks,

Manjunath MS

"Reward Points if it is useful"

Read only

0 Likes
1,710

Manjunath

I am passing the table QMFE into OBJECTTABLENEW.

Will the 'commit' transaction work in an user exit??

Thanks in advance

SG

Read only

0 Likes
1,710

Manjunath

I was just trying to use bapi_transaction_create.

I wonder what should be the input for the export parameter "WAIT" in this BAPI.

In my case I want to save the notification number and line item number in the corresponding tables.

Thanks

SG

Read only

Former Member
0 Likes
1,710

swati,

U have set 'X' for the WAIT in BAPI_TRANSACTION_COMMIT.

Thanks,

Manju

"Reward Points if it is Useful"

Read only

0 Likes
1,710

Sandeep and Manjunath,

I really appreciate a lot for your responses. I got my problem solved finally.

I used BAPI_TRANSACTION_COMMIT in the include ZXQQMU20.

Thanks

SG

Read only

Former Member
0 Likes
1,710

Use BAPI_TRANSACTION_COMMIT in the include

zxqqmu20. You can set the wait time in this FM.