2007 Dec 03 5:58 AM
Hi experts,
After Successfully uploading data in given Transaction i want to show at-last.
" This ...material has been Uploaded".
or
if its Fail... then
" This ....Not loaded ".
Who to do that..?
**********Point is assured********
2007 Dec 03 6:00 AM
Hi,
DAta : l_mstring(2000).
CALL TRANSACTION 'VA01' USING bdcdata
MODE mode
UPDATE 'A'
MESSAGES INTO message.
LOOP AT message INTO wa_message.
SELECT SINGLE * FROM t100 WHERE sprsl = wa_message-msgspra
AND arbgb = wa_message-msgid
AND msgnr = wa_message-msgnr.
IF sy-subrc = 0.
l_mstring = t100-text.
IF l_mstring CS '&1'.
REPLACE '&1' WITH wa_message-msgv1 INTO l_mstring.
REPLACE '&2' WITH wa_message-msgv2 INTO l_mstring.
REPLACE '&3' WITH wa_message-msgv3 INTO l_mstring.
REPLACE '&4' WITH wa_message-msgv4 INTO l_mstring.
ELSE.
REPLACE '&' WITH wa_message-msgv1 INTO l_mstring.
REPLACE '&' WITH wa_message-msgv2 INTO l_mstring.
REPLACE '&' WITH wa_message-msgv3 INTO l_mstring.
REPLACE '&' WITH wa_message-msgv4 INTO l_mstring.
ENDIF.
CONDENSE l_mstring.
WRITE: / wa_message-msgtyp, l_mstring(250).
ELSE.
WRITE: / wa_message.
ENDIF.
ENDLOOP.
regards,
Santosh Thorat
2007 Dec 03 6:00 AM
Hi,
DAta : l_mstring(2000).
CALL TRANSACTION 'VA01' USING bdcdata
MODE mode
UPDATE 'A'
MESSAGES INTO message.
LOOP AT message INTO wa_message.
SELECT SINGLE * FROM t100 WHERE sprsl = wa_message-msgspra
AND arbgb = wa_message-msgid
AND msgnr = wa_message-msgnr.
IF sy-subrc = 0.
l_mstring = t100-text.
IF l_mstring CS '&1'.
REPLACE '&1' WITH wa_message-msgv1 INTO l_mstring.
REPLACE '&2' WITH wa_message-msgv2 INTO l_mstring.
REPLACE '&3' WITH wa_message-msgv3 INTO l_mstring.
REPLACE '&4' WITH wa_message-msgv4 INTO l_mstring.
ELSE.
REPLACE '&' WITH wa_message-msgv1 INTO l_mstring.
REPLACE '&' WITH wa_message-msgv2 INTO l_mstring.
REPLACE '&' WITH wa_message-msgv3 INTO l_mstring.
REPLACE '&' WITH wa_message-msgv4 INTO l_mstring.
ENDIF.
CONDENSE l_mstring.
WRITE: / wa_message-msgtyp, l_mstring(250).
ELSE.
WRITE: / wa_message.
ENDIF.
ENDLOOP.
regards,
Santosh Thorat
2007 Dec 03 6:05 AM
hI
AFTER CLOSING THE BDC_CLOSE CHECK THE SY-SUBRC VALUE IF ITS 0 THEN YOUR SESSION CREATED SUCCESSFULL
http://allaboutsap.blogspot.com/2007/03/bdc-explained-part-2-sample-program-for.html
rEWARD IF USEFULL
2007 Dec 03 11:22 AM