The goal of the following code is to help to extract data of TCODE: TVARV (Table TVARVC). Used a class for extract data, function module for create the code automatic and display for copy the code.
Access to Tcode: TVARV and click en new code “Generation Code” and display a Source code for extract data of the table TVARVC
- Access centralized of TVARVC
- Automatic Code Generation for to extract data
- Can be used for generation range for multiple value.
- Centralized error messages (when the data in TVARVC not are found it).
- Modify the standar code of STVARV – Selection variable maint. (TVARV) , but only in DEV Server
The following video display “How do you do for extract data”
The following Nugget contains the objects :
- Group Function ZTVARV & Function Module Z_TVARV_GEN_CODE (Not necessary transport to Production)
- Class with statics methods ZCL_TVARV (This class must be transport to Producction)
- Test Program: ZTVARV_TEST (Not necessary transport to Production)
The following changes have to be done manually:
- Modify standar SAP program (Small modification 😛 ) (Not necessary transport to Production)
- Include MS38VI50 of SAPMS38V (Not necessary transport to Production)
WHEN 'ZZCODE'. DATA: lw_tvarvc TYPE tvarvc. CASE 'X'. WHEN rb_type_p. READ TABLE i_tvarvc_params WITH KEY mark = 'X'. MOVE-CORRESPONDING i_tvarvc_params TO lw_tvarvc. CALL FUNCTION 'Z_TVARV_GEN_CODE' EXPORTING ex_tvarvc = lw_tvarvc. WHEN rb_type_s. READ TABLE i_tvarvc_selops WITH KEY mark = 'X'. MOVE-CORRESPONDING i_tvarvc_selops TO lw_tvarvc. CALL FUNCTION 'Z_TVARV_GEN_CODE' EXPORTING ex_tvarvc = lw_tvarvc. ENDCASE.
- Status GUI: CATS of MS38VI50 (Not necessary transport to Production)
- Class Message ZTVARV (This class must be transport to Producction)
000 & & & & 001 Not found variable in the string & sperated by & 002 Not found variable in the string & sperated by & position & 003 Not found the variable in TVARVC & 004 Error en Field Symbol &, en method &. Contact to Developer. 005 & line(s) copy to clipboard
The application only work ith table TVARVC ” Table of Variant Variables (Client-Specific)”, pending for incorporate the table TVARV “Table of variables in selection criteria”.
About the author
If you have any questions report error or need an object, please write me by email.
My name is Salvador Nicolás Cervantes. I’m System Engineer, SAP ABAP Consultant and Project Manager. I’m from Argentina.
My personal Page: CERVANTES, Salvador Nicolás
My Linkedin Profile: https://ie.linkedin.com/in/nicolascervantes