Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

BDC code for VA03

Former Member
0 Likes
817

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.

1 ACCEPTED SOLUTION
Read only

former_member199637
Participant
0 Likes
659

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

3 REPLIES 3
Read only

Former Member
0 Likes
659

Try this using interactive report.

Read only

former_member199637
Participant
0 Likes
660

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

Read only

0 Likes
659

Many Thanks Puneet

That works a treat