2009 Aug 08 11:40 AM
Hello,
I am using call transaction method for ME21N tcode for uploading data.Here in messtab i am not getting any error message of type E.i tried using 'N' and 'E' but still i am not able to capture message of type 'E' .i debug and checked in messtab table but there too there is no message of type 'E'.but i have faulty data in transaction.Suggest me.
regards
Soniya s.
Hello,
I am using call transaction method for ME21N tcode for uploading data.Here in messtab i am not getting any error message of type E.i tried using 'N' and 'E' but still i am not able to capture message of type 'E' .i debug and checked in messtab table but there too there is no message of type 'E'.but i have faulty data in transaction.Suggest me.
regards
Soniya s.
2009 Aug 08 12:05 PM
Hi,
ME21N makes use of OOPs functionality and the error messages in the transaction are shown as a pop up and not as messages in normal transactions.
So it would be difficult to obtain the same in the messages table when you do CALL TRANSACTION.
Why not use a BAPI instead?
regards,
Ankur Parab
2009 Aug 08 12:32 PM
hi ankur,
no in me21n error messages are not shown in box its normal as its in other transactions.
2009 Aug 08 9:20 PM
Hi,
Error handling is always not good in Call Transaction.Use Session Methods for Upload as Error handling is much more better than Call Transaction.
use:BAPI_PO_CREATE or BAPI_PO_CREATE1 for creation because data validation is much better here.
Regards,
Gurpreet
2009 Aug 08 9:32 PM
Does Faulty data means error?
While Directly passing such data in ME21N ,giving error??
If not than Call Transaction Message will also not give..please check once.
Regards,
Mayank
2009 Aug 10 6:21 AM
hello,
Even if i directly enter data in me21n then also i get an error there if data is wrong.but while debuging my bdc program in messtab i dont get that error message.suggest me how to solve this issue.
regards
soniya s.
2009 Aug 10 6:26 AM
Hi,
Did u check if the transaction is stopping with the faulty data when the BDC is run in the mode 'A'?
Regards,
Vik
2009 Aug 10 6:26 AM
Avoid BDC with Enjoy transactons and go for BAPI as Ankur said ...
or do it with ME21.
2009 Aug 10 6:34 AM
Hello Soniya,
I agree with Ankur & Keshu, it is not advisable to do BDC with e N joy trxns. I will prefer use of BAPIs instead.
BR,
Suhas
2009 Aug 10 6:33 AM
Hi Soniya
here is the piece of code for capturing the error messages... i hope u will get some help..
*Calling Transaction FB50 .
call transaction 'FB50' using BDCDATA mode 'N' messages into MESSTAB.
*Reading Internal Table MESSTAB.
read table MESSTAB.
if SY-SUBRC = 0.
*Selecting TEXT From Table T100 Into Variable V_TEXT.
select single TEXT into V_TEXT from T100 where SPRSL = MESSTAB-MSGSPRA
and ARBGB = MESSTAB-MSGID
and MSGNR = MESSTAB-MSGNR.
if SY-SUBRC = 0.
V_LMSTRING = V_TEXT.
if V_LMSTRING cs '&1'.
replace '&1' with MESSTAB-MSGV1 into V_LMSTRING.
replace '&2' with MESSTAB-MSGV2 into V_LMSTRING.
replace '&3' with MESSTAB-MSGV3 into V_LMSTRING.
replace '&4' with MESSTAB-MSGV4 into V_LMSTRING.
else.
replace '&' with MESSTAB-MSGV1 into V_LMSTRING.
replace '&' with MESSTAB-MSGV2 into V_LMSTRING.
replace '&' with MESSTAB-MSGV3 into V_LMSTRING.
replace '&' with MESSTAB-MSGV4 into V_LMSTRING.
endif.
condense V_LMSTRING.
*Checking The Message Type and Display The Message Accordingly.
if MESSTAB-MSGTYP = 'E'.
V_ERROR = V_ERROR + C_INCREMENT.
IT_RESULT-MEGTYPE = 'Error'.
IT_RESULT-MESSAGE = V_LMSTRING.
endif.
if MESSTAB-MSGTYP = 'S'.
V_SUCCESS = V_SUCCESS + C_INCREMENT.
IT_RESULT-MEGTYPE = 'Successful'.
IT_RESULT-MESSAGE = V_LMSTRING.
endif.
else.
write: / MESSTAB.
endif.
endif.
*Appending Table IT_RESULT.
append IT_RESULT.
*Delete Rows of Internal Table MESSTAB.
refresh MESSTAB.
*Clear Header of MESSTAB.
clear MESSTAB.
endloop.
Regards
Ashu Singh
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |