How to display the name of a distribution channel in the SAP

All QuestionsCategory: TutorialsHow to display the name of a distribution channel in the SAP
Profile photo of SAP guruSAP guru Staff asked 7 months ago

During development, or writing spetsifkatsy you may need to pull the name of a distribution channel to SAP. These data are stored in the table TVTWT as text values for different languages. Name of distribution channel stored in the field TVTWT-VTEXT, sales channel number stored in the field TVTWT-VTWEG.
Below is a sample code on ABAP how to pull the name of a distribution channel for SAP SD:
CLEAR gv_VTWEG_VTXTK.
SELECT SINGLE VTEXT FROM TVTWT
INTO gv_VTWEG_VTXTK
WHERE spras = sy-langu
AND vtweg = gs_knvv-vtweg.
Name of the distribution channel will be displayed in the language of user’s authorization. If you want your distribution channel is constantly eliminated, only in Russian, just in the 4 line, replace the variable sy-langu to “RU”.