2009 Nov 25 10:44 AM
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
2009 Nov 25 10:50 AM
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 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
2009 Nov 25 10:50 AM
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
2009 Nov 25 12:08 PM
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
2009 Nov 25 2:56 PM
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
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |