06-30-2008 11:01 AM
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
06-30-2008 11:03 AM
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
06-30-2008 11:10 AM
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
06-30-2008 11:11 AM