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 in Function while creating dependency not getting solved

Former Member
0 Likes
409

Hi All,

I am not getting any solution even after debuging it many times,

This is second time I am posting same problem , Please help me out if possible

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

Code -

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.

I have no problem in creating Class using Bapi ,

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

Regards

Preeti

2 REPLIES 2
Read only

franois_henrotte
Active Contributor
0 Likes
362

Try to call the BAPI_TRANSACTION_COMMIT after each step

in debug mode the commit is implicit...

Read only

athavanraja
Active Contributor
0 Likes
362

duplicate post locked