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

Reg. BDC

Former Member
0 Likes
498

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.

1 REPLY 1
Read only

Former Member
0 Likes
404

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