2012 Aug 16 2:20 PM
I have a report displayed using the function REUSE_ALV_GRID_DISPLAY where one on the columns is the sales order number and another is the line number of the material within the order. When I click on the relevant line in the report I would like the Item Overview tab of VA03 to appear with the relevant item either highlighted or at the top of the list. I have BDC code written as below and all works except I cant get the relevant item to appear at the top of the list. Anyone know of a solution?
DEFINE load_bdc_field.
clear ls_bdcdata.
ls_bdcdata-program = &1.
ls_bdcdata-dynpro = &2.
ls_bdcdata-dynbegin = &3.
ls_bdcdata-fnam = &4.
ls_bdcdata-fval = &5.
append ls_bdcdata to lt_bdcdata.
END-OF-DEFINITION.
load_bdc_field '' '' 'T' 'VA03' ''.
load_bdc_field 'SAPMV45A' '0102' 'X' '' ''.
load_bdc_field '' '' '' 'BDC_CURSOR' 'VBAK-VBELN'.
load_bdc_field '' '' '' 'BDC_OKCODE' '/00'.
load_bdc_field '' '' '' 'VBAK-VBELN' ls_report-vbeln.
load_bdc_field 'SAPMV45A' '4001' 'X' '' ''.
load_bdc_field '' '' '' 'BDC_CURSOR' 'VBAP-POSNR'.
load_bdc_field '' '' '' 'VBAP-POSNR' ls_report-posnr.
CALL TRANSACTION 'VA03' USING lt_bdcdata MODE 'E'.
Brian.
2012 Aug 16 3:46 PM
Hi Brain,
To highlight a particular line item in SO, add the following screen sequence after
load_bdc_field 'SAPMV45A' '0102' 'X' '' ''.
load_bdc_field '' '' '' 'BDC_CURSOR' 'VBAK-VBELN'.
load_bdc_field '' '' '' 'BDC_OKCODE' '/00'.
load_bdc_field '' '' '' 'VBAK-VBELN' ls_report-vbeln.
SAPMV45A 4001 X
BDC_CURSOR RV45A-MABNR(01)
BDC_OKCODE =POPO
SAPMV45A 0251 X
BDC_CURSOR RV45A-POSNR
RV45A-POSNR item_number
BDC_OKCODE =POSI
2012 Aug 16 3:22 PM
2012 Aug 16 3:46 PM
Hi Brain,
To highlight a particular line item in SO, add the following screen sequence after
load_bdc_field 'SAPMV45A' '0102' 'X' '' ''.
load_bdc_field '' '' '' 'BDC_CURSOR' 'VBAK-VBELN'.
load_bdc_field '' '' '' 'BDC_OKCODE' '/00'.
load_bdc_field '' '' '' 'VBAK-VBELN' ls_report-vbeln.
SAPMV45A 4001 X
BDC_CURSOR RV45A-MABNR(01)
BDC_OKCODE =POPO
SAPMV45A 0251 X
BDC_CURSOR RV45A-POSNR
RV45A-POSNR item_number
BDC_OKCODE =POSI
2012 Aug 16 4:28 PM