Skip to content

Instantly share code, notes, and snippets.

@hugo-dc
Last active September 29, 2015 05:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hugo-dc/1555506 to your computer and use it in GitHub Desktop.
Save hugo-dc/1555506 to your computer and use it in GitHub Desktop.
Messtsab messages
MESSAGE ID messtab1-msgid
TYPE messtab1-msgtyp
NUMBER messtab1-msgnr
WITH messtab1-msgv1 messtab1-msgv2 messtab1-msgv3
messtab1-msgv4.
LOOP AT MESSTAB.
select single * from t100 where sprsl = messtab-msgspra
and arbgb = messtab-msgid
and msgnr = messtab-msgnr.
if sy-subrc = 0.
l_mstring = t100-text.
if l_mstring cs '&1'.
replace '&1' with messtab-msgv1 into l_mstring.
replace '&2' with messtab-msgv2 into l_mstring.
replace '&3' with messtab-msgv3 into l_mstring.
replace '&4' with messtab-msgv4 into l_mstring.
else.
replace '&' with messtab-msgv1 into l_mstring.
replace '&' with messtab-msgv2 into l_mstring.
replace '&' with messtab-msgv3 into l_mstring.
replace '&' with messtab-msgv4 into l_mstring.
endif.
condense l_mstring.
write: / messtab-msgtyp, l_mstring(250).
else.
write: / messtab.
endif.
ENDLOOP.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment