2005 Dec 28 4:39 PM
Hi Friends,
I am trying to find the user exit for tcode VB22, so that I could get hold of some pricing info for the Change document. The SAP program for the tcode is SAPMV13A.
Can anyone help me out with this?
Thanx,
Raj
Hi Friends,
I am trying to find the user exit for tcode VB22, so that I could get hold of some pricing info for the Change document. The SAP program for the tcode is SAPMV13A.
Can anyone help me out with this?
Thanx,
Raj
2006 Apr 17 6:39 PM
Another approach would be to go to SPRO and look at the enchancements tied to the pricing configuration. Usually, there are detailed enchancements documentation related to a business process. If you don't have access to SPRO, get with a functional consultant on the project.
BR,
Phong Hoang
2006 Apr 18 1:58 PM
Use this report to find Userexit (Don´t forget reward points):
REPORT zuserexit NO STANDARD PAGE HEADING.
************************************************************************
************************************************************************
TABLES : tstc, tadir, modsapt, modact, trdir, tfdir, enlfdir, tstct,
tdevct, doktl, modattr, help_info.
INCLUDE .
CONSTANTS: true(1) TYPE c VALUE 'X',
false(1) TYPE c VALUE ' ',
active LIKE modattr-status VALUE 'A'.
TYPE-POOLS: slis.
DATA: gt_fieldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE,
gs_layout TYPE slis_layout_alv,
g_repid LIKE sy-repid,
i_list_comments TYPE slis_t_listheader,
w_list_comments LIKE LINE OF i_list_comments,
pt_events TYPE slis_t_event.
DATA : BEGIN OF jtab OCCURS 0.
INCLUDE STRUCTURE tadir.
DATA : nombre_proj LIKE modact-name,
estado_proj LIKE modattr-status,
document(1) TYPE c,
modtext LIKE modsapt-modtext,
END OF jtab.
TYPES: BEGIN OF type_salida,
obj_name LIKE tadir-obj_name,
nombre_proj LIKE modact-name,
estado_proj(4),
document(4),
modtext LIKE modsapt-modtext,
END OF type_salida.
DATA: t_salida TYPE STANDARD TABLE OF type_salida WITH HEADER LINE.
DATA : field1(30).
DATA : v_devclass LIKE tadir-devclass,
tab_projects LIKE modact OCCURS 0 WITH HEADER LINE.
DATA: g_exists(1) TYPE c.
PARAMETERS : p_tcode LIKE tstc-tcode OBLIGATORY.
INITIALIZATION.
g_repid = sy-repid.
START-OF-SELECTION.
SELECT *
FROM modact INTO TABLE tab_projects.
SORT tab_projects.
SELECT SINGLE * FROM tstc WHERE tcode EQ p_tcode.
IF sy-subrc EQ 0.
SELECT SINGLE * FROM tadir WHERE pgmid = 'R3TR'
AND object = 'PROG'
AND obj_name = tstc-pgmna.
MOVE : tadir-devclass TO v_devclass.
IF sy-subrc NE 0.
SELECT SINGLE * FROM trdir WHERE name = tstc-pgmna.
IF trdir-subc EQ 'F'.
SELECT SINGLE * FROM tfdir WHERE pname = tstc-pgmna.
SELECT SINGLE * FROM enlfdir WHERE funcname =
tfdir-funcname.
SELECT SINGLE * FROM tadir WHERE pgmid = 'R3TR'
AND object = 'FUGR'
AND obj_name EQ enlfdir-area.
MOVE : tadir-devclass TO v_devclass.
ENDIF.
ENDIF.
SELECT * FROM tadir INTO TABLE jtab
WHERE pgmid = 'R3TR'
AND object = 'SMOD'
AND devclass = v_devclass.
SELECT SINGLE * FROM tstct WHERE sprsl EQ sy-langu AND
tcode EQ p_tcode.
LOOP AT jtab.
CLEAR tab_projects.
READ TABLE tab_projects WITH KEY member = jtab-obj_name.
IF NOT tab_projects-name IS INITIAL.
jtab-nombre_proj = tab_projects-name.
SELECT SINGLE *
FROM modattr
WHERE name = tab_projects-name.
jtab-estado_proj = modattr-status.
ENDIF.
SELECT SINGLE *
FROM tdevct
WHERE spras EQ 'EN'
AND devclass EQ jtab-devclass.
doktl-object = jtab-obj_name.
PERFORM check_documentation USING doktl-object
CHANGING g_exists.
SELECT SINGLE * FROM modsapt
WHERE sprsl = sy-langu AND
name = jtab-obj_name.
jtab-modtext = modsapt-modtext.
jtab-document = g_exists.
MODIFY jtab.
ENDLOOP.
IF NOT jtab[] IS INITIAL.
PERFORM mostrar_reporte_alv TABLES jtab.
ELSE.
FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
WRITE:/(95) 'No existe ninguna user exit'.
ENDIF.
ELSE.
FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
WRITE:/(95) 'El código de transacción no existe'.
ENDIF.
*----
*
FORM CHECK_DOCUMENTATION *
*----
*
--> P_DOKTL_OBJECT *
--> P_EXISTS *
*----
*
FORM check_documentation USING p_doktl_object
CHANGING p_exists.
SELECT *
FROM doktl
WHERE id = 'MO'
AND object = p_doktl_object
AND langu = 'EN'.
ENDSELECT.
IF sy-subrc = 0.
p_exists = true.
ELSE.
p_exists = false.
ENDIF.
ENDFORM. " GET_DOCUMENTATION
*&----
*
*& Form mostrar_reporte_alv
*&----
*
text
*----
*
-->P_JTAB text
*----
*
FORM mostrar_reporte_alv TABLES jtab STRUCTURE jtab.
LOOP AT jtab.
MOVE-CORRESPONDING jtab TO t_salida.
IF jtab-estado_proj EQ 'A'.
t_salida-estado_proj = '@BF@'.
ELSE.
t_salida-estado_proj = '@BG@'.
ENDIF.
IF jtab-document EQ 'X'.
t_salida-document = '@96@'.
ELSE.
t_salida-document = ''.
ENDIF.
APPEND t_salida.
ENDLOOP.
Estructura y formato de salida
PERFORM init_fieldcat.
PERFORM init_layout.
PERFORM seteo_eventos TABLES pt_events.
Mostrar listado
PERFORM listado.
ENDFORM. " mostrar_reporte_alv
*&----
*
*& Form init_fieldcat
*&----
*
text
*----
*
--> p1 text
<-- p2 text
*----
*
FORM init_fieldcat.
gt_fieldcat-seltext_l = 'Ampliación'.
gt_fieldcat-fieldname = 'OBJ_NAME'.
gt_fieldcat-fix_column = 'X'.
gt_fieldcat-outputlen = '10'.
gt_fieldcat-just = 'C'.
gt_fieldcat-hotspot = 'X'.
gt_fieldcat-tabname = 'T_SALIDA'.
APPEND gt_fieldcat. CLEAR gt_fieldcat.
gt_fieldcat-seltext_l = 'Proyecto'.
gt_fieldcat-fieldname = 'NOMBRE_PROJ'.
gt_fieldcat-outputlen = '10'.
gt_fieldcat-just = 'C'.
gt_fieldcat-hotspot = 'X'.
gt_fieldcat-tabname = 'T_SALIDA'.
APPEND gt_fieldcat. CLEAR gt_fieldcat.
gt_fieldcat-seltext_l = 'Estado Proyecto'.
gt_fieldcat-fieldname = 'ESTADO_PROJ'.
gt_fieldcat-outputlen = '15'.
gt_fieldcat-just = 'C'.
gt_fieldcat-tabname = 'T_SALIDA'.
APPEND gt_fieldcat. CLEAR gt_fieldcat.
gt_fieldcat-seltext_l = 'Documentación'.
gt_fieldcat-fieldname = 'DOCUMENT'.
gt_fieldcat-outputlen = '13'.
gt_fieldcat-just = 'C'.
gt_fieldcat-hotspot = 'X'.
gt_fieldcat-tabname = 'T_SALIDA'.
APPEND gt_fieldcat. CLEAR gt_fieldcat.
gt_fieldcat-seltext_l = 'Descripción'.
gt_fieldcat-fieldname = 'MODTEXT'.
gt_fieldcat-outputlen = '60'.
gt_fieldcat-just = 'L'.
gt_fieldcat-tabname = 'T_SALIDA'.
APPEND gt_fieldcat. CLEAR gt_fieldcat.
ENDFORM.
*&----
*
*& Form init_layout
*&----
*
text
*----
*
--> p1 text
<-- p2 text
*----
*
FORM init_layout.
gs_layout-f2code = 'VER_DOC'.
ENDFORM. " init_layout
*&----
*
*& Form seteo_eventos
*&----
*
text
*----
*
-->P_PT_EVENTS text
*----
*
FORM seteo_eventos TABLES pt_events.
Para que utilice el encabezado.
DATA: lt_events TYPE slis_alv_event.
*
CLEAR lt_events.
lt_events-name = 'TOP_OF_PAGE'.
lt_events-form = 'TOP_OF_PAGE'.
APPEND lt_events TO pt_events.
lt_events-name = 'USER_COMMAND'.
lt_events-form = 'USER_COMMAND'.
APPEND lt_events TO pt_events.
ENDFORM. " seteo eventos
*&----
*
*& Form listado
*&----
*
text
*----
*
--> p1 text
<-- p2 text
*----
*
FORM listado.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = g_repid
i_callback_user_command = 'USER_COMMAND'
is_layout = gs_layout
it_fieldcat = gt_fieldcat[]
i_save = 'A'
it_events = pt_events
TABLES
t_outtab = t_salida
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " listado
*----
*
FORM TOP_OF_PAGE *
*----
*
FORM top_of_page.
DATA: lc_texto LIKE w_list_comments-info.
CLEAR: i_list_comments[].
w_list_comments-typ = 'H'. "H=Header, S=Selection, A=Action
w_list_comments-key = ''.
w_list_comments-info = p_tcode.
APPEND w_list_comments TO i_list_comments.
CONCATENATE 'Transaction Code -' p_tcode tstct-ttext
INTO lc_texto SEPARATED BY space.
w_list_comments-typ = 'S'. " H = Header, S = Selection, A = Action
w_list_comments-key = ''.
w_list_comments-info = lc_texto.
APPEND w_list_comments TO i_list_comments.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
i_logo = 'ENJOYSAP_LOGO'
it_list_commentary = i_list_comments.
ENDFORM. " seteo_eventos
*----
*
FORM user_command *
*----
*
........ *
*----
*
--> L_UCOMM *
--> LS_SELFIELD *
*----
*
FORM user_command USING l_ucomm ls_selfield TYPE slis_selfield.
Nos aseguramos que no haya pinchado sobre una linea sin nada
CHECK NOT ls_selfield-tabname IS INITIAL.
CHECK NOT ls_selfield-fieldname IS INITIAL.
READ TABLE t_salida INDEX ls_selfield-tabindex.
CASE ls_selfield-fieldname.
WHEN 'OBJ_NAME'.
SET PARAMETER ID 'MON' FIELD t_salida-obj_name.
CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.
WHEN 'NOMBRE_PROJ'.
IF NOT t_salida-nombre_proj IS INITIAL.
SET PARAMETER ID 'MON_KUN' FIELD t_salida-nombre_proj.
CALL TRANSACTION 'CMOD' AND SKIP FIRST SCREEN.
ENDIF.
WHEN 'DOCUMENT'.
IF NOT t_salida-document IS INITIAL.
doktl-object = t_salida-obj_name.
PERFORM get_documentation USING doktl-object.
ENDIF.
ENDCASE.
ENDFORM.
*----
*
FORM GET_DOCUMENTATION *
*----
*
--> P_DOKTL_OBJECT *
*----
*
FORM get_documentation USING p_doktl_object.
DATA: lt_line LIKE tline OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF lt_exclude OCCURS 10,
func(4),
END OF lt_exclude.
DATA: overlay_header LIKE thead,
l_lines LIKE sy-tabix.
REFRESH lt_line.
CALL FUNCTION 'DOCU_GET_FOR_F1HELP'
EXPORTING
id = 'MO'
langu = 'E'
object = p_doktl_object
IMPORTING
head = overlay_header
TABLES
line = lt_line
EXCEPTIONS
ret_code = 1
OTHERS = 2.
IF sy-subrc EQ 0.
DESCRIBE TABLE lt_line LINES l_lines.
IF l_lines = 0.
EXIT.
ENDIF.
help_info-title = p_doktl_object.
help_info-docuid = p_doktl_object.
help_info-docuobject = p_doktl_object.
help_info-spras = overlay_header-tdspras.
CALL FUNCTION 'HELP_DOCULINES_SHOW'
EXPORTING
help_infos = help_info
overlay_header = overlay_header
TABLES
excludefun = lt_exclude
helplines = lt_line
EXCEPTIONS
OTHERS = 1.
ENDIF.
ENDFORM.
2007 Mar 28 3:34 PM
Hi,
Goto vb22 tcode , goto system----- satus and find the progam name , doulble click on the progam u can go to includes , double click on the includes. search for custum exit.
http://www.erpgenie.com/sap/abap/code/abap26.htm
which gives the list of exits for a tcode
http://help.sap.com/saphelp_nw04/helpdata/en/bf/ec079f5db911d295ae0000e82de14a/frameset.htm
For information on Exits, check these links
http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
http://www.sapgenie.com/abap/code/abap26.htm
http://www.sap-img.com/abap/what-is-user-exits.htm
http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
http://www.easymarketplace.de/userexit.php
http://www.sappoint.com/abap/userexit.pdfUser-Exit
http://www.planetsap.com/userexit_main_page.htm
I hope it helps.
Best Regards,
Ankitha.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |