Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

BDC msg

Former Member
0 Kudos
97

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********

1 ACCEPTED SOLUTION

Former Member
0 Kudos
61

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

3 REPLIES 3

Former Member
0 Kudos
62

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

0 Kudos
61

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

Former Member
0 Kudos
61

thanks to all ,

point has been given Thorat.