Sunteți pe pagina 1din 2

Additional Tab / Z-fields in Tc.

VT01N

Hi All.
I found in the internet's Depth the solution of this question.
My explain - how todo :

1. Create Z/Y customer Program ( NOT INCLUDE ) 4 example : 'ZPW_CID'


with form 4 example : 'PW_CID' ( witch will called from main Prog )
In form call F.M. that will display in window the Additional Data
2. Copy Original GUI Status "TRA_MAIN" from SAPMV56A to
customer Program 4 example : 'ZPW_CID'
3. Modify / Add new functionality
4. Add following code in User Exit : EXIT_SAPMV56A_004 ( INCLUDE ZXV56U40 )

*--------------------------------------------------------------------*
* Change the original GUI Status to Customer ( modified )
*--------------------------------------------------------------------*
DATA: ls_ta_control LIKE LINE OF c_ta_control.
*--------------------------------------------------------------------*
FIELD-SYMBOLS <cua> LIKE LINE OF c_cua_control.
*--------------------------------------------------------------------*
* Set a custom status which includes the button required to navigate
* to the Extra data screen. This status will dynamically be called
* from the program control and is a copy of the standard status of the
* screen 1020
*--------------------------------------------------------------------*
READ TABLE c_cua_control ASSIGNING <cua>
WITH KEY progname = 'SAPMV56A'
dynpro = '1020'
trtyp = '*'.
IF sy-subrc = 0.
" Customer program , that will call F.M. with additional Data ( CID )
<cua>-statprog = 'ZPW_CID'.
" Copied from original prog of VT01 - SAPMV56A
<cua>-status = 'TRA_MAIN'.
ENDIF.
*--------------------------------------------------------------------*
* Set the form to perform when the user selects the new button using
* the custom status above. Move the appropriate settings to the
* C_TA_CONTROL table.
* Extra data screen
*--------------------------------------------------------------------*
CLEAR ls_ta_control.

MOVE: 'SAPMV56A' TO ls_ta_control-progname, " Main Program of VT01N/VT02N/VT03N


'1020' TO ls_ta_control-dynpro, " Current Dynpro
'*' TO ls_ta_control-trtyp, " Current Trans. Type
'T' TO ls_ta_control-kopgr, " Screen seq. hdr. grp
'MM_CID_DAT' TO ls_ta_control-fcode, " Fcode from modified GUI status of Customer Program
'G' TO ls_ta_control-call_mode, " Call Mode
'ZPW_CID' TO ls_ta_control-next_progname, " Costomer Prog for Additional DATA
'PW_CID' TO ls_ta_control-next_form. " Form witch will called from main Prog

INSERT ls_ta_control INTO TABLE c_ta_control.


*--------------------------------------------------------------------*

S-ar putea să vă placă și