Application Development 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: 

BDC question - in relation to transaction MB50

Former Member
0 Kudos

Hello friends,

I am trying to run a BDC which is supposed to fill the screen of trx MB50.

The screen for this transaction has a header part and a detail part. 10 lines max.

I used SHDB, entered some bogus data and generated a BDC program.

I've tried to simulate a situation where there is a need to page twice in order to input data in the detail section.

However here is what happens when I try to run the program with some real data of 12 lines:

1) The first screen fills properly. i.e. 10 lines.

2) On the second screen, the remaining 2 line are inserted BUT here is the catch, the other lines are not empty! even if I set other rows to blank via the program. That is to say, the information from first screen remains on the second screen!

Any idea as to how clear subsequent screens via BDC before attempting any data creation?

Your help is greatly appreciated.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

To fill the values after line item 10 you have to start the fields again from 01.

Please check the below code and fill the BDC data table accordingly.

perform bdc_dynpro using 'SAPML04I' '1001'.

perform bdc_field using 'BDC_CURSOR'

'LINK-LGNUM'.

perform bdc_field using 'BDC_OKCODE'

'/00'.

perform bdc_field using 'LINK-LGNUM'

'201'.

perform bdc_field using 'LINK-LGTYP'

'001'.

perform bdc_field using 'LINK-PDATU'

'12/05/2008'.

perform bdc_dynpro using 'SAPML04I' '1021'.

perform bdc_field using 'BDC_CURSOR'

'LINP-LGPLA(01)'.

perform bdc_field using 'BDC_OKCODE'

'=P+'.

perform bdc_field using 'LINP-LGPLA(01)'

'2BN151231C'.

perform bdc_field using 'LINP-LGPLA(02)'

'2BN151231D'.

perform bdc_field using 'LINP-LGPLA(03)'

'2BN151231E'.

perform bdc_field using 'LINP-LGPLA(04)'

'2BN151240A'.

perform bdc_field using 'LINP-LGPLA(05)'

'2BN151240B'.

perform bdc_field using 'LINP-LGPLA(06)'

'2BN151240C'.

perform bdc_field using 'LINP-LGPLA(07)'

'2BN151240D'.

perform bdc_field using 'LINP-LGPLA(08)'

'2BN151240E'.

perform bdc_field using 'LINP-LGPLA(09)'

'2BN151248A'.

perform bdc_field using 'LINP-LGPLA(10)'

'2BN151248B'.

perform bdc_dynpro using 'SAPML04I' '1021'.

perform bdc_field using 'BDC_CURSOR'

'LINP-LGPLA(01)'.

perform bdc_field using 'BDC_OKCODE'

'=P+'.

perform bdc_dynpro using 'SAPML04I' '1021'.

perform bdc_field using 'BDC_CURSOR'

'LINP-LGPLA(01)'.

perform bdc_field using 'BDC_OKCODE'

'/00'.

perform bdc_field using 'LINP-LGPLA(01)'

'2BN151256C'.

perform bdc_field using 'LINP-LGPLA(02)'

'2BN151256D'.

perform bdc_field using 'LINP-LGPLA(03)'

'2BN151256E'.

perform bdc_field using 'LINP-LGPLA(04)'

'2BN151264A'.

perform bdc_dynpro using 'SAPML04I' '1021'.

perform bdc_field using 'BDC_CURSOR'

'LINP-LGPLA(01)'.

perform bdc_field using 'BDC_OKCODE'

'=BU'.

1 REPLY 1

Former Member
0 Kudos

Hi,

To fill the values after line item 10 you have to start the fields again from 01.

Please check the below code and fill the BDC data table accordingly.

perform bdc_dynpro using 'SAPML04I' '1001'.

perform bdc_field using 'BDC_CURSOR'

'LINK-LGNUM'.

perform bdc_field using 'BDC_OKCODE'

'/00'.

perform bdc_field using 'LINK-LGNUM'

'201'.

perform bdc_field using 'LINK-LGTYP'

'001'.

perform bdc_field using 'LINK-PDATU'

'12/05/2008'.

perform bdc_dynpro using 'SAPML04I' '1021'.

perform bdc_field using 'BDC_CURSOR'

'LINP-LGPLA(01)'.

perform bdc_field using 'BDC_OKCODE'

'=P+'.

perform bdc_field using 'LINP-LGPLA(01)'

'2BN151231C'.

perform bdc_field using 'LINP-LGPLA(02)'

'2BN151231D'.

perform bdc_field using 'LINP-LGPLA(03)'

'2BN151231E'.

perform bdc_field using 'LINP-LGPLA(04)'

'2BN151240A'.

perform bdc_field using 'LINP-LGPLA(05)'

'2BN151240B'.

perform bdc_field using 'LINP-LGPLA(06)'

'2BN151240C'.

perform bdc_field using 'LINP-LGPLA(07)'

'2BN151240D'.

perform bdc_field using 'LINP-LGPLA(08)'

'2BN151240E'.

perform bdc_field using 'LINP-LGPLA(09)'

'2BN151248A'.

perform bdc_field using 'LINP-LGPLA(10)'

'2BN151248B'.

perform bdc_dynpro using 'SAPML04I' '1021'.

perform bdc_field using 'BDC_CURSOR'

'LINP-LGPLA(01)'.

perform bdc_field using 'BDC_OKCODE'

'=P+'.

perform bdc_dynpro using 'SAPML04I' '1021'.

perform bdc_field using 'BDC_CURSOR'

'LINP-LGPLA(01)'.

perform bdc_field using 'BDC_OKCODE'

'/00'.

perform bdc_field using 'LINP-LGPLA(01)'

'2BN151256C'.

perform bdc_field using 'LINP-LGPLA(02)'

'2BN151256D'.

perform bdc_field using 'LINP-LGPLA(03)'

'2BN151256E'.

perform bdc_field using 'LINP-LGPLA(04)'

'2BN151264A'.

perform bdc_dynpro using 'SAPML04I' '1021'.

perform bdc_field using 'BDC_CURSOR'

'LINP-LGPLA(01)'.

perform bdc_field using 'BDC_OKCODE'

'=BU'.