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

BDC using VA02

Former Member
0 Likes
753

Hello Experts...

i have done a BDC to update data for VA02 ..... but.... after everything is updated it stops at a screen which propmts " Do u wish to continu" ( when i run it in 'E' mode)

the program executes fine in 'A' mode. the following is the log but in "N" it doesen't work

S NO Batch Input for screen SAPLSP01 0500.

if i click on yes then the code executes fine and prompts again for the next record at end.

i can also use Bapi Function Module but the requirement is to do in BDC

Please give me some idea how to handle this ..

Below is the code:( only recording)

LOOP AT t_vbak into wa_vbak.

CLEAR bdcdata1.

REFRESH bdcdata1.

perform bdc_dynpro using 'SAPMV45A' '0102'.

perform bdc_field using 'BDC_CURSOR'

'VBAK-VBELN'.

perform bdc_field using 'BDC_OKCODE'

'=UER1'.

perform bdc_field using 'VBAK-VBELN'

wa_vbak-VBELN.

perform bdc_dynpro using 'SAPLSPO1' '0500'.

perform bdc_field using 'BDC_OKCODE'

'=OPT1'.

perform bdc_dynpro using 'SAPMV45A' '4001'.

perform bdc_field using 'BDC_OKCODE'

'=SICH'.

perform bdc_field using 'BDC_CURSOR'

'VBKD-BSTDK'.

perform bdc_field using 'VBKD-BSTKD'

wa_vbak-BSTKD.

perform bdc_field using 'VBKD-BSTDK'

''.

perform bdc_field using 'KUWEV-KUNNR'

wa_vbak-KUNNR.

perform bdc_field using 'RV45A-KETDAT'

wa_vbak-KETDAT.

perform bdc_field using 'RV45A-KPRGBZ'

'D'.

perform bdc_field using 'VBKD-PRSDT'

wa_vbak-PRSDT.

perform bdc_field using 'VBKD-ZTERM'

'ZB02'.

perform bdc_field using 'VBKD-INCO1'

'CIP'.

perform bdc_field using 'VBKD-INCO2'

'Düsseldorf'.

perform bdc_field using 'VBAK-AUGRU'

wa_vbak-AUGRU.

perform bdc_dynpro using 'SAPLSPO2' '0101'.

perform bdc_field using 'BDC_OKCODE'

'=OPT1'.

perform bdc_dynpro using 'SAPLSPO1' '0500'.

perform bdc_field using 'BDC_OKCODE'

'=OPT1'.

CALL TRANSACTION 'VA02' USING bdcdata1

MODE 'N'

UPDATE 'A'

MESSAGES INTO messtab1.

ENDLOOP.

Thanks in Advance

srinivas

3 REPLIES 3
Read only

Former Member
0 Likes
547

Hi srinivas,

Why are thes etwo steps needed?

<i>perform bdc_dynpro using 'SAPLSPO2' '0101'.

perform bdc_field using 'BDC_OKCODE'

'=OPT1'.

perform bdc_dynpro using 'SAPLSPO1' '0500'.

perform bdc_field using 'BDC_OKCODE'

'=OPT1'.</i>

remove that part of the code and try.

Regards,

Ravi

Read only

0 Likes
547

Hi Ravi,

Actually the screen 'SAPLSPO1' '0500' doesn't have any BAtch Input Screen Number ... I ahve tried as u suggested but its not working..

This Screen Prompts " Do u Wish to Continue". This is not Handled during the recording

if u have any alternative do suggest.

Thanxs & Regards

Srinivas

Read only

0 Likes
547

Hi Srinivas,

Just retain what ever screen that you come across in the recording and see.

Regards,

Ravi