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

Batch input: delete

Former Member
0 Likes
867

Hey all,

Currently I'm addapting a batch input program from 4.5 to 4.7. In the specific transaction FN5V there is a condition grid that should be modified.

First there is a deletion of a certain row in the grid, afterwards the remaining rows are modified.

Deleting nor modifying aren't the problem when you do this separated. When doing it together, there is a problem, SAP doesn'st put the cursor on the right position to modify the rows.

We did everything to make this work... Can anyone help us?

This is the code:

...

PERFORM BDC_DYNPRO USING 'SAPMF67A' '1000'.

PERFORM BDC_FIELD USING 'BDC_CURSOR'

'VZZKOPO-DGUEL_KP(01)'.

PERFORM BDC_FIELD USING 'BDC_OKCODE'

'/00'.

PERFORM BDC_FIELD USING 'BDC_OKCODE'

'=DELE'.

PERFORM BDC_DYNPRO USING 'SAPLSPO1' '0100'.

PERFORM BDC_FIELD USING 'BDC_OKCODE'

'=YES'.

... and than afterwards

  • To the right position in the grid

CONCATENATE '=KL' regel_cursor_afl INTO tmp_regel.

CONDENSE tmp_regel NO-GAPS.

PERFORM bdc_dynpro USING 'SAPMF67A' '1000'.

PERFORM bdc_field USING 'BDC_OKCODE' tmp_regel.

He finds the first row, and than ...

Thanks in advance for your suggestions!

Jan Roovers

2 REPLIES 2
Read only

vinod_gunaware2
Active Contributor
0 Likes
599

Hi

U have defined n no of rows has to be deleted

and after that n nos have to modify then

PERFORM BDC_FIELD USING 'BDC_CURSOR'

'VZZKOPO-DGUEL_KP(01)'.

PERFORM BDC_FIELD USING 'BDC_OKCODE'

'/00'.

PERFORM BDC_FIELD USING 'BDC_OKCODE'

'=DELE'.

use 'VZZKOPO-DGUEL_KP(01)' variable instead of string

w_var = CONCATENATE 'VZZKOPO-DGUEL_KP(' counter ')'.

do counter

w_var = CONCATENATE 'VZZKOPO-DGUEL_KP(' counter ')'.

if counter > 3.

PERFORM BDC_FIELD USING 'BDC_CURSOR'

w_var.

PERFORM BDC_FIELD USING 'BDC_OKCODE'

'/00'.

PERFORM BDC_FIELD USING 'BDC_OKCODE'

'=DELE'.

esle.

PERFORM BDC_FIELD USING 'BDC_CURSOR'

w_var.

PERFORM BDC_FIELD USING 'BDC_OKCODE'

'/00'.

PERFORM BDC_FIELD USING 'BDC_OKCODE'

'=EDIT'.

endif.

enddo.

modify value in between.

Hope this will be useful.

regards

vinod

Read only

andreas_mann3
Active Contributor
0 Likes
599

hi,

i don't think you can modify a grid in bdc

sorry

Andreas