‎2011 Jan 24 11:46 AM
In T-code FBBCX,
After save, BELNRs are displayed with popup screen.
But when in BDC mode, popup screen is not displayed and
then I can't get result(ie. BELNRs).
Is there any solution to get BELNRs?
Thank you for reading.
‎2011 Jan 24 8:17 PM
in BDC, collect your messages into a table....read the table for the new document number....standard BDC processing approach.
data: bdc_msg TYPE TABLE OF bdcmsgcoll.
CALL TRANSACTION transact
USING bdc_tab
OPTIONS FROM bdc_opts
MESSAGES INTO bdc_msg.
loop at bdc_msg into ls_msg.
.....check your table content for new document number
endloop.in rare instances, data might not be written to BDC_MSG, so grab sy-uzeit into variable....to get doc read your document header table for SY-UNAME (user), date = sy-datum.... time = >= minute or two before your sy-uzeit....also check for values that were in your input....last doc created is LIKELY (not 100% fool-proof) to be the doc your BDC created. In some cases, I've obtained list of all relevant docs with a BAPI GET, stored that, then after BDC/BAPI update, get the docs again into another internal table....the doc in the "after" table that doesn't exist in the "before" table is the doc you just created (again, the caveat....may not be 100% reliable)... but try via BDC_MSG or BAPI return table first.