07-05-2006 10:33 AM
Hi Friends,
I am using the FM EU_TAX_NUMBER_CHECK.
CALL FUNCTION 'EU_TAX_NUMBER_CHECK'
EXPORTING
COUNTRY = WA_FILE_DATA-LAND1
EU_TAX_NUMBER = WA_FILE_DATA-STCEG
EXCEPTIONS
NOT_VALID = 1
OTHERS = 2.
<b>IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF</b>
it checks for SY-SUBRC after calling
i want all the error messages to be passed to one internal table , i dont want them to be displayed at runtime
any suggestions
07-05-2006 10:48 AM
hi,
use an error-log-table:
DATA: BEGIN OF prot OCCURS 1000,
msgtyp LIKE bdcmsgcoll-msgtyp,
kunnr(10),
bukrs LIKE knb1-bukrs,
msgid(2),
msgnr LIKE sy-msgno ,
msgv1 LIKE sy-msgv1 ,
msgv2 LIKE sy-msgv2 ,
msgv3 LIKE sy-msgv3 ,
msgv4 LIKE sy-msgv4 ,
feld(30),
text(100),
END OF prot.
when sy-subrc <> 0 move all information from your business-partner to that table and append it.
at end of programm you can evaluate that table:
per list or per ALV
A.
Message was edited by: Andreas Mann
07-05-2006 10:48 AM
hi,
use an error-log-table:
DATA: BEGIN OF prot OCCURS 1000,
msgtyp LIKE bdcmsgcoll-msgtyp,
kunnr(10),
bukrs LIKE knb1-bukrs,
msgid(2),
msgnr LIKE sy-msgno ,
msgv1 LIKE sy-msgv1 ,
msgv2 LIKE sy-msgv2 ,
msgv3 LIKE sy-msgv3 ,
msgv4 LIKE sy-msgv4 ,
feld(30),
text(100),
END OF prot.
when sy-subrc <> 0 move all information from your business-partner to that table and append it.
at end of programm you can evaluate that table:
per list or per ALV
A.
Message was edited by: Andreas Mann
07-05-2006 10:52 AM
though we declare the internal table we will be getting only the msgid and all other details , but i want the complete error message but not the msgid
say for eg we get SY-MSGID as AR and SY-MSGTY as E and SY-MSGNO as 183 , i want the whole message that is there in that message number
Message was edited by: Chandrasekhar Jagarlamudi
07-05-2006 11:01 AM
hi,
i get the complete msg in my example:
CALL FUNCTION 'EU_TAX_NUMBER_CHECK'
EXPORTING
country = land
eu_tax_number = taxno
EXCEPTIONS
not_valid = 1
OTHERS = 2.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
MOVE-CORRESPONDING sy TO prot.
APPEND prot.
ENDIF.
fo complete message use fm <b>TB_MESSAGE_BUILD_TEXT</b>
A.
Message was edited by: Andreas Mann