Hello,
i am creating Purchase Orders (PO) from Purchase Requsitions (PR) in with Call Transaction, because there is no BAPI to create a PO with PR references.
Here my Code:
*Fill Options to start Transaction in Background clear bdc_opt. bdc_opt-racommit = ''. bdc_opt-dismode = 'N'. bdc_opt-updmode = 'L'. bdc_opt-cattmode = ' '. bdc_opt-defsize = ''. bdc_opt-nobinpt = ''. bdc_opt-nobiend = ''. *Fill BDC Data for Background automation of Transaction refresh it_bdcdata. clear it_bdcdata. it_bdcdata-fnam = 'S_BANFN-LOW'. it_bdcdata-fval = preq_no. append it_bdcdata. clear it_bdcdata. it_bdcdata-fnam = 'BDC_OKCODE'. it_bdcdata-fval = '=ONLI'. append it_bdcdata. clear it_bdcdata. it_bdcdata-program = 'SAPLSLVC_FULLSCREEN'. it_bdcdata-dynpro = '0500'. it_bdcdata-dynbegin = 'X'. append it_bdcdata. clear it_bdcdata. it_bdcdata-fnam = 'BDC_OKCODE'. it_bdcdata-fval = '=&F15'. append it_bdcdata. * Call transaction ME59N call transaction 'ME59N' using it_bdcdata messages into messtab options from bdc_opt.
Now my Problem:
The Table messtab with messages never has error messages because the messages are displayed in last Screen in an ALV table. You can see it in Transaction ME59N and check "TEST RUN"
Can someone tell me how to get the Messages of the last table?