‎2007 May 21 9:12 PM
Hi,
I am trying to update condition values of a shipment cost document (VI02) through BDC by clicking on the '+' button and update the values there..
PERFORM bdc_dynpro USING 'SAPLV69A' '9000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=V69A_KOAN'.
PERFORM bdc_dynpro USING 'SAPLV69A' '9000'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=BACK'.
*Updating the condition line
PERFORM bdc_field USING 'BDC_CURSOR'
'KOMV-KBETR(02)'.
PERFORM bdc_field USING 'KOMV-KSCHL(02)' var_kschl.
PERFORM bdc_field USING 'KOMV-KBETR(02)' var_num.
I am stuck with how to determine the value of '02'(because it came up as '02' in the sample recording I used as I was updating the 2nd condition) in the last two statements above. I can code but its getting ugly. Is there anyway to determine this value dynamically?
Please let me know your input.
Thanks.
‎2007 May 21 9:34 PM
Hi Krishen,
You can use Concatenate statement to do this:
DATA: kbetr(14) type c.
concatenate 'KOMV-KBETR(' sy-tabix ')' into kbetr.
In this case, Sy-tabix is example to show how to do this dynamically...I hope you will know the number of record to update from Internal table and you can use it...
Hope this will help you.
Regards,
Vivek