Page 1 of 1

Additional Tab / Z-fields in Tc. VT01N [ Resolved ]

PostPosted: Thu Jun 15, 2017 2:32 am
by AdonAlex
Hi SD Experts,

I need to add customer fields to Transactions VT01N / VT02N / VT03N.
It can be added addition (Customer) Tab or as enhancement of existed screen.

Is anybody have any idea?

A lot of thank's,
Alex.

Re: Additional Tab / Z-fields in Tc. VT01N

PostPosted: Wed Jul 05, 2017 1:58 am
by AdonAlex
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.
*--------------------------------------------------------------------*

Hope it was clear to understand.