How to run an alvGrid in mb51 using BDC?

Hi, experts.

How to run an alvGrid using mb51 using BDC?
After pressing ‘Detailed List’ button it shows me an alv if i run it with mb51, and a simple list if i run it with BDC.
so left – mb51, right – bdc
photo.jpg

perform bdc_dynpro using ‘RM07DOCS’ ‘1000’.
perform bdc_field using ‘BDC_CURSOR’
‘BUDAT-HIGH’.
perform bdc_field using ‘MATNR-LOW’ gs_outtab1_alv-matnr_ext.
perform bdc_field using ‘WERKS-LOW’ gs_outtab1_alv-werks.
perform bdc_field using ‘LGORT-LOW’ gs_outtab1_alv-lgort.
perform bdc_field using ‘CHARG-LOW’ gs_outtab1_alv-charg.
perform bdc_field using ‘BUDAT-LOW’ low_budat.
perform bdc_field using ‘BUDAT-HIGH’ high_budat.
perform bdc_field using ‘ALV_DEF’ ‘/OSTATKI’.
perform bdc_field using ‘DATABASE’ ‘X’.
perform bdc_field using ‘PA_AISTR’ ‘SAP_MATBEL_MARI’.
perform bdc_field using ‘PA_DBSTD’ ‘X’.
perform bdc_field using ‘BDC_OKCODE’ ‘=ONLI’.
* perform BDC_DYNPRO using ‘SAPMSSY0’ ‘0120’.
* perform BDC_FIELD using ‘BDC_OKCODE’ ‘=DETAIL’.
* perform BDC_DYNPRO using ‘SAPMSSY0’ ‘0120’.
* perform BDC_FIELD using ‘BDC_OKCODE’ ‘=&F03’.
opt-dismode = ‘E’.
call transaction ‘MB51’ using lt_bdcdata options from opt.
Scroll to Top