Skip to Content
0
Former Member
Sep 09, 2006 at 04:10 AM

How to Increment the Page in transaction using BDC program

84 Views

Hi Friends,

I am facing Page up problem in BDC program,

In CT02 transaction, we have to upload mass data for the characterisitic, in the screen we can able to upload 7 rows (actually 7 rows ar there in the transaction) even after doing the Page up (P+) in the BDC, still that overwirtes in the existing rows. How to solve this issue.

Thanks in advance.

Here i have attached the Program, For you reference.

LOOP AT ITAB.

ATNAME = ITAB-ATNAM.

perform bdc_dynpro using 'SAPMCTAV' '0100'.

perform bdc_field using 'BDC_CURSOR'

'CABN-ATNAM'.

perform bdc_field using 'BDC_OKCODE'

'=WERT'.

perform bdc_field using 'CABN-ATNAM'

ITAB-ATNAM.

rows = counter MOD 7.

IF rows EQ 0.

PERFORM bdc_dynpro using 'SAPLCTMV' '0200'.

PERFORM bdc_field USING 'BDC_OKCODE' 'P+'.

counter = '02'.

PERFORM bdc_dynpro using 'SAPLCTMV' '0200'.

ENDIF.

CONCATENATE 'CAWNT-ATWTB(' COUNTER ')' INTO var.

CONCATENATE 'CAWN-ATWRT(' COUNTER ')' INTO var1.

perform bdc_dynpro using 'SAPLCTMV' '0200'.

perform bdc_field using 'BDC_CURSOR'

var.

perform bdc_field using 'BDC_OKCODE'

'=SICH'.

perform bdc_field using var

ITAB-ATWTB.

perform bdc_field using var1

ITAB-ATWRT.

COUNTER = COUNTER + '01'.

opt-defsize = 'X'.

opt-dismode = 'A'.

opt-updmode = 'S'.

CALL TRANSACTION 'CT02' USING

bdcdata OPTIONS FROM opt MESSAGES

INTO it_mess.

REFRESH bdcdata.

ENDLOOP.

Regards

Shankar