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 data not getting passing

Former Member
0 Likes
902

Hi all

I have dialog program to pass the data using bdc,but when I call the bdc data not passing to the my dialog program, only the screen get appear ,follows my code pls check if is are any error.

perform bdc_dynpro using 'ZSALES_UPDATE' '0100'.

perform bdc_field using 'BDC_CURSOR'

'ZSALE-VBELN'.

perform bdc_field using 'ZSALE-VBELN'

'fsdf'.

perform bdc_field using 'ZSALE-POSNR'

'10'.

perform bdc_field using 'ZSALE-MATNR'

'asd'.

call transaction 'ZSALE' using bdcdata mode 'A'.

ENDIF.

IF sy-subrc <> 0.

ENDIF.

endform.

*perform close_group.

form bdc_field using fnam fval.

clear bdcdata.

bdcdata-fnam = fnam.

bdcdata-fval = fval.

append bdcdata.

endform. " bdc_field

form bdc_dynpro using program dynpro.

clear bdcdata.

bdcdata-program = program.

bdcdata-dynpro = dynpro.

bdcdata-dynbegin = 'X'.

append bdcdata.

endform. " bdc_dynpro

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
668

where is the BDC_OKCODE.

or first do the Recording , then check.

Regards

Prabhu

5 REPLIES 5
Read only

Former Member
0 Likes
669

where is the BDC_OKCODE.

or first do the Recording , then check.

Regards

Prabhu

Read only

Former Member
0 Likes
668

Hi

Check the recording once again...

You missed the <b>BDC_OKCODE</b> population.

Regards,

Raj

Example:

PERFORM bdc_dynpro USING 'SAPMV45A' '4001'.

PERFORM bdc_field USING 'VBKD-BSTKD' it_data-bstkd.

PERFORM bdc_field USING 'VBKD-BSTDK' it_data-bstdk.

PERFORM bdc_field USING 'KUAGV-KUNNR' it_data-kunnr.

PERFORM bdc_field USING 'KUWEV-KUNNR' it_data-kunwe.

PERFORM bdc_field USING 'RV45A-KETDAT' it_data-ketdat.

PERFORM bdc_field USING 'RV45A-KPRGBZ' 'D'.

PERFORM bdc_field USING 'BDC_OKCODE'

'=SICH'.

Message was edited by: Rajasekhar Dinavahi

Read only

Former Member
0 Likes
668

Hello Kanish,

There are some problem with ur BDC program.

First do the recording and create a program with the recording, then make appriotate changes.

If useful reward.

Vasanth

Read only

Former Member
0 Likes
668

Hi,

On every screen there is an OKCODE which needs to be executed by means of a perform 'BDC_OKCODE'. This will act as there user is interacting. Until you have this and since an OKCODE is required to move from one screen to other and for that matter to SAVE also, so you need to have this perform on each screen where data is being filled by you using the BDC.

Hope this helps!

Regards

Nishant

Read only

Former Member
0 Likes
668

Hello kanish,

u r missing BDC_OKCODE. If u dont have this u wont be able to navigate to the next screen or pass the data. My suggestion is to first do a recording through SHDB then analyze how dat was done and then write the correct program.

Thanx & Regards,

Santosh