‎2008 Jul 23 2:38 PM
Hello All,
How to check the strcuture of the table " yrdb_tp10_map:
got changed in the following FM.
As its not working properly.
function yrdb_tp10_get_mapping.
*"----
-
""Lokale Schnittstelle:
*" IMPORTING
*" REFERENCE(VARIANTE) TYPE YDOMAENE
*" REFERENCE(DOMAENE) TYPE YDOMAENE OPTIONAL
*" REFERENCE(OLD_VALUE) TYPE YOVALUE OPTIONAL
*" EXPORTING
*" REFERENCE(NEUER_WERT) TYPE YNVALUE
*" TABLES
*" YRDB_TP10_MAP TYPE YRDB_TP10_MAP_TYPE
*" EXCEPTIONS
*" NOT_FOUND
*" WRONG_IMPORT
*"----
-
tp10_map Feld über Zustand der globalen internen Tabelle
g_yrdbtp10_map
Wert X Tabelle gefüllt
data: import(1) type c,
tab_in type i.
if tp10_map eq space. "interne Tabelle leer.
select * from yrdb_tp10_map into table g_yrdbtp10_map.
sort g_yrdbtp10_map.
tp10_map = 'X'.
endif.
prüfen der importparameter.
wenn import = 'initial' beide Importparameter sind leer
wenn import = 1 domaene gefüllt
wenn import = 2 domaene und old value gefüllt
wenn import = 3 nur old value gefüllt --> raise Exception wrong_import
if domaene(1) ne space.
import = '1'.
endif.
if old_value(1) ne space.
if import = 1.
import = 2.
else.
raise wrong_import.
endif.
endif.
Vorbereitung der Rückgabe
wenn import = 'initial' Rückgabetabelle vorbereiten Ebene VARIANTE
wenn import = 1 Rückgabetabelle vorbereiten Ebene Domaene
wenn import = 2 Einzelwert zurückgeben new_value
case import.
when space.
loop at g_yrdbtp10_map into yrdb_tp10_map
where variante = variante.
append yrdb_tp10_map to yrdb_tp10_map.
endloop.
describe table yrdb_tp10_map lines tab_in.
if tab_in le 0.
raise not_found.
endif.
when '1'.
loop at g_yrdbtp10_map into yrdb_tp10_map
where VARIANTE = VARIANTE
and domaene = domaene.
append yrdb_tp10_map to yrdb_tp10_map.
endloop.
if tab_in le 0.
raise not_found.
endif.
when '2'.
read table g_yrdbtp10_map into yrdb_tp10_map
with key VARIANTE = VARIANTE
domaene = domaene
old_value = old_value.
if sy-subrc eq space.
neuer_wert = yrdb_tp10_map-new_value.
else.
raise not_found.
endif.
endcase.
endfunction.
‎2008 Jul 23 2:44 PM
go to tables statements -
> double click on the structure----> it will takes you to that structure