cancel
Showing results for 
Search instead for 
Did you mean: 

Function Module

Former Member
0 Kudos

How to get the document number from table bkpf into i_messtab while doing BDC for posting through F-63.plzz reply.

VERY URGENT..

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member196280
Active Contributor
0 Kudos

Apply below code to fetch your docuemnt number

CALL TRANSACTION tcode USING bdcdata

MODE 'N'

UPDATE 'S'

MESSAGES INTO bdcmsgcoll.

LOOP AT bdcmsgcoll.

IF bdcmsgcoll-tcode = 'F-63'

AND bdcmsgcoll-msgtyp = 'S'

AND bdcmsgcoll-msgspra = 'E'.

WRITE bdcmsgcoll-msgv1. "Document number

ENDIF.

Close the thread once your question is answered.

Regards,

SaiRam

Former Member
0 Kudos

Hi,

Can u try in the following way declaring the message structure with BELNR and proceed with the normal logic.

data: begin of i_messtab,

belnr like bkpf-belnr.

include structure bdcmsgcoll.

data: end of i_messtab.

Reward if helpful.

Chandrasekhar