2008 May 14 10:47 AM
hi
how to get the success message after BDC CALL TRANSACTION PROCESS.
PLEASE TELL ME.
2008 May 14 10:51 AM
Hi Mahesh,
Use CALL TRANSACTION USING.... MESSAGES INTO.... statement.
Regards,
John.
Untill you dont want to share, which solution is helpfull to your query than please don't close by updating them by saying just Thanks.it will create JUNK.
2008 May 14 10:51 AM
Hi Mahesh,
Use CALL TRANSACTION USING.... MESSAGES INTO.... statement.
Regards,
John.
2008 May 14 10:54 AM
Hi,
Based on Message type u capture the messages.
Chech that message type 'S'.
Passsed into internal table.
LOOP AT IT_BDC_MESSAGES.
IF IT_BDC_MESSAGES-msgtyp = 'E'.
SELECT single * FROM t100 WHERE
sprsl = it_BDC_MESSAGES-msgspra
AND arbgb = IT_BDC_MESSAGES-msgid
AND msgnr = IT_BDC_MESSAGES-msgnr.
IF sy-subrc = 0.
l_mstring = t100-text.
.
Reward if useful.
Regards,
Narasimha
Edited by: narasimha marella on May 14, 2008 11:56 AM
2008 May 14 10:54 AM
hi,
In the call transaction command, use the addtion
" Messages into (internal table)".
Example:
CALL TRANSACTION wf_tcode
USING tb_bdcdata
MODE wf_mode
UPDATE co_s
MESSAGES INTO tb_messtab.
Then read the internal table tb_messtab to check if any of the entries have the value 'E" for the field msgtyp.
If there are no entries with msgtyp=E, it means that CALL TRNSACTION is successful.
2008 May 14 10:56 AM
Hi,
Download all the messages into BDCMSGCOLL table.
if there is no error messages in this table you can give a success message.
Check the syntax below,
*****
call transaction t-code using bdcdata messages into bdcmsgcoll.
read bdcmsgcoll where msgtyp = 'E'.
if sy-subrc <> 0.
message s001(zmsg).
endif.
********
Regards,
2008 May 14 11:05 AM
Hi Mahesh,
once the call transaction is successfull, all the messages comes in to the internal table I_MESSAGES,
for success full entry u will find a messaged id ( MSGID) and message number (MSGNR) and message type ( MSGTYP )as 'S'.
Read the internal table I_MESSAGES with message id , type and number,
Ex:
read table i_messages into l_messages
with key MSGTYP = 'S'
MSGID = 'IW'
MSGNR = 123
BINARY SEARCH
if sy-subrc = 0.
CALL FUNCTION 'BAPI_MESSAGE_GETDETAIL'
EXPORTING
id = msgid
number = msgnr
language = sy-langu
textformat = 'ASC'
IMPORTING
message = message.
endif.
2008 May 14 11:07 AM
Hi,
DATA: MESSTAB TYPE TABLE OF BDCMSGCOLL.
DATA : BEGIN OF ERROR_ITAB OCCURS 0,
ERROR(50),
MSGTYP,
END OF ERROR_ITAB.
CALL TRANSACTION 'SE38' USING BDCDATA MODE 'N'
MESSAGES INTO MESSTAB
LOOP AT MESSTAB.
if messtab-msgtyp eq 'S'.
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.
MOVE L_MSTRING TO ERROR_ITAB-ERROR.
MOVE MESSTAB-MSGTYP TO ERROR_ITAB-MSGTYP.
APPEND ERROR_ITAB.
delete error_itab where msgtyp = 'E'.
ELSE.
MOVE MESSTAB TO ERROR_ITAB-ERROR.
APPEND ERROR_ITAB.
ENDIF.
Regards,
Raj.
2008 Sep 30 1:46 PM
2008 Sep 30 1:55 PM
Untill you dont want to share, which solution is helpfull to your query than please don't close by updating them by saying just Thanks.it will create JUNK.
2008 Sep 30 2:05 PM
Hi..,
Yes I agree with Amit.
It very good practice to close thread with solution of that problem, It will take maximum 2 to 5 minutes time.
You can do this in your free time. Because it very helpful for your future refrence and also for others..
Thanks,
Naveen.I
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |