‎2009 Jun 16 7:04 PM
Hi all,
Where I work we are using BAPI_DOCUMENT_CREATENEWVRS2 to create new versions of a document (DMS module). The problem we have is that the BAPI copies all values from the original version. We are looking for a way to leave blank fields RES1, RES2 and RES3 from table DRAW. Debugging the code takes us to a user exit section, but apparently no user exit is active. The code takes you to source code of method IF_EX_DOCUMENT_MAIN01~BEFORE_SAVE, but a validation forces the program to exit the routine. See last statement of the ABAP code below. Does anyone know how to activate the user exit in a method?
Carlos
method IF_EX_DOCUMENT_MAIN01~BEFORE_SAVE.
CLASS CL_EXIT_MASTER DEFINITION LOAD.
DATA: EXIT_OBJ_TAB TYPE SEEX_EXIT_TAB,
EXIT_OBJ TYPE SEEX_EXIT_TAB_STRUCT.
DATA: EXITINTF TYPE REF TO IF_EX_DOCUMENT_MAIN01.
LOOP AT INSTANCE_BADI_TABLE INTO EXIT_OBJ WHERE
INTER_NAME = 'IF_EX_DOCUMENT_MAIN01' AND
FLT_VAL = SPACE.
APPEND EXIT_OBJ TO EXIT_OBJ_TAB.
ENDLOOP.
IF SY-SUBRC = 4.
CALL METHOD CL_EXIT_MASTER=>CREATE_OBJ_BY_INTERFACE_FILTER
EXPORTING
INTER_NAME = 'IF_EX_DOCUMENT_MAIN01'
FLT_VAL = SPACE
IMPORTING
EXIT_OBJ_TAB = EXIT_OBJ_TAB.
APPEND LINES OF EXIT_OBJ_TAB TO INSTANCE_BADI_TABLE.
ENDIF.
LOOP AT EXIT_OBJ_TAB INTO EXIT_OBJ.
CHECK NOT EXIT_OBJ-OBJ IS INITIAL.
‎2009 Jun 17 6:21 AM
hai coherna, u r not using any user exit
instead u r using the DOCUMENT_MAIN01 badi and it is implementated u can change the code also
as it is exiting so u change the code accordign to ur requirement and activate it and it will work fine
m.a
‎2012 Mar 21 3:19 PM
hi,
Can you please tell me what are the mandatory parameters for BAPI_DOCUMENT_CREATENEWVRS2 and what values to pass through it?
Shilpa