‎2006 Mar 06 2:00 PM
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
‎2006 Mar 06 2:14 PM
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
‎2006 Mar 06 2:54 PM