Code: Alles auswählen.
...
select * into table it_tvko from tvko where vkorg in so_vkorg.
loop at it_tvko into wa_tvko.
authority-check object 'V_VBAK_VKO'
id 'VKORG' field wa_tvko-vkorg
id 'VTWEG' dummy
id 'SPART' field '00'
id 'ACTVT' field '03'.
if sy-subrc <> 0.
message id '38' type 'E' number '000'
with '...Stop bei der ersten auftretenden unzulässigen Vkorg...' wa_tvko-vkorg.
endif.
endloop.
...
Da gibt es auch keine wirklich bessere Alternative.zak hat geschrieben:Guten Abend.
Ich habe ein kurze Frage:
Ich würde gerne den Inhalt einer Selektionstabelle mit authority-check überprüfen lassen (z. B. Verkaufsorganisationen).
Da authority-check keine SO-Tabelle nimmt, habe ich mir wie folgt geholfen...
...dies ist auch ok. Trotzdem würde ich aber gerne wissen, ob jemand einen FuBa kennt, der mir eine komplette SO-Tabelle für ein Berechtigungsobjekt prüft (ich habe leider irgendwie nix brauchbares gefunden).Code: Alles auswählen.
select * into table it_tvko from tvko where vkorg in so_vkorg. loop at it_tvko into wa_tvko. authority-check object 'V_VBAK_VKO' id 'VKORG' field wa_tvko-vkorg id 'VTWEG' dummy id 'SPART' field '00' id 'ACTVT' field '03'. if sy-subrc <> 0. message id '38' type 'E' number '000' with '...Stop bei der ersten auftretenden unzulässigen Vkorg...' wa_tvko-vkorg. endif. endloop. ...
Code: Alles auswählen.
...
authority-check object 'V_VBAK_VKO'
id 'VKORG' dummy
id 'VTWEG' dummy
id 'SPART' field '00'
id 'ACTVT' field '03'.
if sy-subrc <> 0.
...
endif.