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

Logic needed for FI BDC

Former Member
0 Likes
618

Hi ,

I ned to write Bdc for the FI transaction f-53. In that BDC various entry is uploaded in trnsaction thr flat file . After Upload Document No is generted and it should stored in the excel file and at the last col of th flat file .

How to do this . I have no clue for thsi . How to capture valus of document no which is genrated ,

Thanks

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
578

Hi Kiro,

DATA : ist_msgtab          type standard table of bdcmsgcoll.

CALL TRANSACTION c_co02 USING ist_bdcdata
                                OPTIONS FROM opt
                                MESSAGES INTO ist_msgtab.

All the Messages are caught into the table ist_msgtab.

now use FORM_MESSAGE function Module to get the Created Document number.

You can also check this table in Debug mode and can be assured of the Created Document number.

Cheerz

Ram

Hi ,

I ned to write Bdc for the FI transaction f-53. In that BDC various entry is uploaded in trnsaction thr flat file . After Upload Document No is generted and it should stored in the excel file and at the last col of th flat file .

How to do this . I have no clue for thsi . How to capture valus of document no which is genrated ,

Thanks

3 REPLIES 3
Read only

Former Member
0 Likes
579

Hi Kiro,

DATA : ist_msgtab          type standard table of bdcmsgcoll.

CALL TRANSACTION c_co02 USING ist_bdcdata
                                OPTIONS FROM opt
                                MESSAGES INTO ist_msgtab.

All the Messages are caught into the table ist_msgtab.

now use FORM_MESSAGE function Module to get the Created Document number.

You can also check this table in Debug mode and can be assured of the Created Document number.

Cheerz

Ram

Read only

Former Member
0 Likes
578

Hi,

You have to first capture the meesages(error + success) in one internal table

in the call transaction statement itself.

DATA : it_messtab type standard table of bdcmsgcoll.

*CALL TRANSACTION F-53 USING it_bdcdata

MESSAGES INTO it_messtab*

Then after getting all the messages in internal table it_messtab.

you can use function Module Format_Message , in one of its

parameters the document number which is getting generated

will get captured.

Hope it helps

Regards

Mansi

Read only

brad_bohn
Active Contributor
0 Likes
578

You can also use parameter ID 'BLN' if you are calling individual transactions. Some variants of the FI transactions will use different success messages, so if you use a common routine for the call, you'll definitely want to use this approach instead of hardcoding message numbers and fields to read.

Before the call:


SET PARAMETER ID 'BLN' FIELD SPACE.
CLEAR GV_BELNR.

After the call, insert the proper error handling and for successful calls:


GET PARAMETER ID 'BLN' FIELD GV_BELNR.  " GV_BELNR defined as type BELNR_D