Application Development 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: 

Problem in Function while creating dependency

Former Member
0 Kudos

Hi ,

I am working on a Program in which I have to create Class , local and global dependency -

For class createion i am using

- BAPI_CLASS_CREATE

For local dependency i m using

CAMA_CLASS_MAINTAIN_DEP

For Global dependency i am using

CAMA_CLASS_ALLOCAT_GLOB_DEP

Now my problem is that I am able to create Class and only 1 of the dependency either local or global whihever function I am calling first

But while debugging program I am able to create Class as well as both dependencies successfully

Please can any one tell while this is runing successfully only at the time of debugging

Please help me

Regards

Preeti

3 REPLIES 3

former_member181962
Active Contributor
0 Kudos

Use the bapi BAPI_TRANSACTION_COMMIT if the call to the original bapi is succesful.

Your class is getting created in debug mode, because the system does a commit when you press F5.

Regards,

Ravi

0 Kudos

Hi Ravi ,

Thanks for ur response

I have no problem in creating Class using Bapi

i have used -

CALL FUNCTION 'BAPI_CLASS_CREATE'

EXPORTING

CLASSNUMNEW = TCLASS-CLASS

CLASSTYPENEW = TEXP1-KLART

CLASSBASICDATA = CLASSBASICDATA

CHANGENUMBER = SAENNR

TABLES

CLASSDESCRIPTIONS = CLASSDESCRIPTIONS

CLASSLONGTEXTS = CLASSLONGTEXTS

CLASSCHARACTERISTICS = CLASSCHARACTERISTICS

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'

EXPORTING

WAIT = 'X'

IMPORTING

RETURN = TRET2.

CALL FUNCTION 'CAMA_CLASS_ALLOCAT_GLOB_DEP'

EXPORTING

CHANGE_NO = SAENNR

KEY_DATE = SY-DATUM

TABLES

CLASS_DEP_ASSIGN = T_GLBDEP

EXCEPTIONS

ERROR = 1

WARNING = 2

OTHERS = 3.

CALL FUNCTION 'CAMA_CLASS_MAINTAIN_DEP'

EXPORTING

CLASS = TCLASS-CLASS

CLASS_TYPE = SKLART

DEPENDENCY_DATA = T_DEPDATA

CHANGE_NO = SAENNR

KEY_DATE = SY-DATUM

TABLES

SOURCE = TSOURCE

EXCEPTIONS

ERROR = 1

WARNING = 2.

Problem I am facing here in creating Local and global dependency together which i am able to create in debugging mode only otherwise either Local or global whichever function i am using first

Preeti

Former Member
0 Kudos

Edit

Edited by: preeti sharma on Jun 30, 2008 12:12 PM