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: 

Table Control - Code

Former Member
0 Kudos

All,

I have used SHDB to record transaction CJ02 . The code works fine until i try to load more than 14 lines then the 15 line is ovewritten. I am passing a next page statement but it is still ovewriting after 14 lines. Can someone please look at the code and advise.

The following is the code that i am using :

perform open_group.

loop at i_mat into wa_mat.

perform bdc_dynpro using 'SAPLCJWB' '0100'.

perform bdc_field using 'BDC_CURSOR'

'*PROJ-PSPID'.

perform bdc_field using 'BDC_OKCODE'

'=LETB'.

perform bdc_field using '*PROJ-PSPID'

wa_mat-proj_pspid.

perform bdc_dynpro using 'SAPLCJWB' '0901'.

perform bdc_field using 'BDC_CURSOR'

'PROJ-POST1'.

perform bdc_field using 'BDC_OKCODE'

'=P+'.

perform bdc_dynpro using 'SAPLCJWB' '0901'.

perform bdc_field using 'BDC_OKCODE'

'=BU'.

perform bdc_field using 'BDC_CURSOR'

'PRPS-POST1(02)'.

perform bdc_field using 'PRPS-STUFE(02)'

wa_mat-proj_hr_level.

perform bdc_field using 'RCWBS-IDENT(02)'

wa_mat-proj_element.

perform bdc_field using 'PRPS-POST1(02)'

wa_mat-proj_description.

perform bdc_transaction using 'CJ02'.

endloop.

perform close_group.

3 REPLIES 3

Former Member
0 Kudos

Hi,

Your Next page code is correct, but after that you are entering into the Second line in the table control, that is also fine, but after pressing the Next page it will enter the new record into the 15 the line item, but for 16th it will write it in the same line, you need to increase the number which is there with in the closed brackets () to the next number

regards

Sudheer

0 Kudos

sudheer

thanks for the reply, but can you provide code that would do this?

cheers

andy