Application Development and Automation 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: 
Read only

BDC PROBLEM

Former Member
0 Likes
422

HI ALL,

WHEN WE CREATE ME21N PO ORDER SYSTEM WILL GENERATE PO NUMBER.

HOW TO GET TAT NO WHEN WE UPLOAD ME21N IN BDC.

TAT NO HAS TO BE DISPLAYED .

REGARDS,

SRI.

3 REPLIES 3
Read only

Former Member
0 Likes
400

use the message clause of call transaction to capture the messages given by SAP during PO creation...

e.g. CALL TRANSACTION c_me21 USING i_bdcdata

MODE w_mode

UPDATE w_update

MESSAGES INTO i_bdcmessg.

(check in debugging in which field of i_bdcmessg, PO Number will be captured....)

Read only

Former Member
0 Likes
400

Hi,

Id you are getting the number in the BDCMSGCOLL internal table then you can get from it,

if not after getting the PO number goto the tables, then get the TAT number

Regards

Sudheer

Read only

Former Member
0 Likes
400

CALL TRANSACTION TCODE USING BDCDATA

MODE P_MODE "CTUMODE

UPDATE P_UPDATE "CUPDATE

MESSAGES INTO IT_MSGTAB.

LOOP AT IT_MSGTAB. "WHERE msgtyp ='E'.

IF IT_MSGTAB-MSGTYP = 'E'.

IF V_COUNTER = 1.

V_COUNTER = V_COUNTER + 1.

MOVE W_BKPF TO T_ERRORS.

  • move I_bseg1 to t_errors1.

MOVE IT_MSGTAB TO IT_MSGTAB2.

APPEND T_ERRORS.

  • APPEND T_ERRORS1.

APPEND IT_MSGTAB2.

CLEAR W_BKPF.

CLEAR W_BSEG.

CLEAR T_ERRORS.

CLEAR IT_MSGTAB.

ENDIF.

ELSEIF IT_MSGTAB-MSGTYP = 'S'.

  • move I_BSEG1 to t_SUCCESS1.

if it_msgtab-msgv1 CA '0123456789'.

MOVE W_BKPF TO T_SUCCESS.

t_success-newdoc = it_msgtab-msgv1.

MOVE IT_MSGTAB TO IT_MSGTAB1.

APPEND IT_MSGTAB1.

APPEND T_SUCCESS.

endif.