2007 Jul 05 4:31 PM
Hi,
While using CALL TRANSACTION, if first record is not updated the screen fields or got some error, what will be the case? how to handle this?
Do i can handle sy-subrc for this?
thnx
2007 Jul 05 4:38 PM
Hi,
You can use FM WRITE_MESSAGES and FORMAT_MESSAGES to read the error messages in addition to BDCMSGCOLL.
Regards,
Ferry Lianto
Hi,
While using CALL TRANSACTION, if first record is not updated the screen fields or got some error, what will be the case? how to handle this?
Do i can handle sy-subrc for this?
thnx
2007 Jul 05 4:33 PM
Declare an internal table of TYPE BDCMSGCOLL structure. This would trap all the errors while using CALL TRANSACTION.
Thanks,
SKJ
2007 Jul 05 4:38 PM
Hi,
You can use FM WRITE_MESSAGES and FORMAT_MESSAGES to read the error messages in addition to BDCMSGCOLL.
Regards,
Ferry Lianto
2007 Jul 06 1:29 AM
Besides capturing the error message, you should also save the error out record to a BDC session so user has an option to fix the error records. This can be done by calling FM: <b>BDC_OPEN_GROUP</b>, <b>BCD_INSERT</b> and <b>BDC_CLOSE_GROUP.</b>
Hope this helps. Reward points if helpful.
Minami
2007 Jul 06 1:38 AM
1. Use the MESSAGES INTO <bdcmsgcoll type internal table> option of CALL TRANSACTION.
2. READ TABLE <bdcmsgcol type itab> WITH KEY msgtyp = 'E'. If sy-subrc = 0, then error occured in the transaction call.
3. If error occured, use CONVERT_BDCMSGCOLL_TO_BAPIRET2 to convert the BDCMSGCOL message into a BAPIRET2 type structure and MESSAGE field of this structure contains the error message.
4. If error occured, use the same BDC internal table and put it into a batch input session for someone to look at it and process. Use BDC_OPEN_GROUP, BDC_INSERT, and BDC_CLOSE_GROUP.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |