*check whether an error occurred
IF ls_return-type = gc_e.
APPEND ls_return TO et_return.
EXIT.
ENDIF.
*transfer old characteristics
LOOP AT lt_charact INTO ls_charact.
ls_characteristics_old-name_char = ls_charact-name_char.
ls_characteristics_old-code_letter = ls_charact-name_char.
ls_characteristics_old-charact_origin = ls_charact-charact_origin.
ls_characteristics_old-department_view = ls_charact-department_view.
APPEND ls_characteristics_old TO lt_characteristics_old.
ENDLOOP.
*transfer new characteristics
REFRESH lt_classcharacteristics.
CLEAR ls_classcharacteristics.
LOOP AT it_charactname INTO ls_charactname.
ls_classcharacteristics-name_char = ls_charactname-charact_name.
APPEND ls_classcharacteristics TO lt_classcharacteristics.
ENDLOOP.
*transfer template description
REFRESH lt_classdescriptions.
CLEAR ls_classdescriptions.
IF it_classdescriptions[] IS INITIAL.
ls_classdescriptions-langu = sy-langu.
ls_classdescriptions-catchword = iv_profile_template_descr.
INSERT ls_classdescriptions INTO TABLE lt_classdescriptions.
ELSE.
lt_classdescriptions = it_classdescriptions.
ENDIF.
REFRESH lt_classlongtexts.
READ TABLE lt_classlongtexts_old INTO ls_classlongtexts INDEX 1.
ls_classlongtexts-text_descr = is_classbasicdata-katalog.
CLEAR is_classbasicdata-katalog.
IF sy-subrc NE 0.
IF is_classbasicdata-local_class = 'X'.
ls_classlongtexts-text_type = '01'.
ELSEIF is_classbasicdata-local_class = 'N'.
ls_classlongtexts-text_type = '02'.
ELSE.
ls_classlongtexts-text_type = '00'.
ENDIF.
ls_classlongtexts-langu = sy-langu.
ENDIF.
APPEND ls_classlongtexts TO lt_classlongtexts.
*check whether an error occurred
READ TABLE et_return TRANSPORTING NO FIELDS WITH KEY
type = gc_e.
CHECK sy-subrc 0.
*commit if necessary
CHECK iv_xcommit space.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
Now see the table klah ur class will be created.
Run this program
Code:
TABLES: klah.
DATA : WA_BAPICLASSKEY TYPE BAPI_CLASS_KEY,
WA_BAPI1003BASIC TYPE BAPI1003_BASIC,
WA_BAPI1003BASICNEW TYPE BAPI1003_BASIC_NEW,
WA_BAPICATCH TYPE BAPI1003_CATCH,
IT_BAPICATCH LIKE TABLE OF BAPI1003_CATCH,
WA_BAPICHARACT TYPE BAPI1003_CHARACT,
IT_BAPICHARACT LIKE TABLE OF BAPI1003_CHARACT,
WA_BAPICATCHNEW TYPE BAPI1003_CATCH_NEW,
IT_BAPICATCHNEW LIKE TABLE OF BAPI1003_CATCH_NEW,
WA_BAPICHARACTOVR TYPE BAPI1003_CHARACT_OVERWR,
IT_BAPICHARACTOVR LIKE TABLE OF BAPI1003_CHARACT_OVERWR,
WA_BAPICHARACTOVRVALUE TYPE BAPI1003_CHARACT_VALUE_OVR,
IT_BAPICHARACTOVRVALUE LIKE TABLE OF BAPI1003_CHARACT_VALUE_OVR,
WA_BAPICHARVALTEXT TYPE BAPI1003_CHARVALTEXT,
IT_BAPICHARVALTEXT LIKE TABLE OF BAPI1003_CHARVALTEXT.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG. SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG. Every effort is made to ensure content integrity. Use information on this site at your own risk.