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 Problem

Former Member
0 Likes
954

Hello,

I have a requirement, to delete the operation in CA02, I have done the program as per my requirement, but I stuck in one pointu2026.

In CA02 transaction, after I deleting the records, I mean after pressing the delete button, one pop up screen is coming in that pop up two options are there, one for u2018YESu2019 and other for u2018NOu2019, in this pop up default is u2018NOu2019,

Here my BDC_OKCODE is u2018=YESu2019.

It means, system taking as a u2018NOu2019.

Here I want to press, u2018YESu2019 button in pop up screen, in recording I have pressed u2018YESu2019 button only, but still because of the default u2018NOu2019, system taking as u2018NOu2019.

Please give me some suggestions to do thisu2026u2026u2026u2026u2026u2026u2026u2026.

Regards,

Sreenu.

1 ACCEPTED SOLUTION
Read only

MarcinPciak
Active Contributor
0 Likes
895

Hi Sreenu,

I don't think that default setting has something to do here. In your case value '=YES' must not be a description of pushbutton, but a function code of it. To check if it really is go to SHDB, record your entry deletion and check value of BDC_OKCODE for that pop up screen. Use that value to trigger pressing YES button in your BDC program.

Please note, that each operation which requires providing a function code (i.e BACK, pressing pushbutton etc) in BDC program must be introduced with program name and dynpro number:


data: begin of it_bdc occurs 0.
   include structure bdcdata.
data end of it_bdc.

...
it_bdc-program = 'PROGRAM_NAME'.
it_bdc-dynpro = 'NUMBER_OF_POPUP_DYNPRO'.
it_bdc-fnam = 'BDC_OKCODE'.
it_bdc-fval = '=FUNCTION CODE OF PUSHBUTTON'.
append it_bdc.

"use same structure here if next function code triggered

Regards

Marcin

7 REPLIES 7
Read only

MarcinPciak
Active Contributor
0 Likes
896

Hi Sreenu,

I don't think that default setting has something to do here. In your case value '=YES' must not be a description of pushbutton, but a function code of it. To check if it really is go to SHDB, record your entry deletion and check value of BDC_OKCODE for that pop up screen. Use that value to trigger pressing YES button in your BDC program.

Please note, that each operation which requires providing a function code (i.e BACK, pressing pushbutton etc) in BDC program must be introduced with program name and dynpro number:


data: begin of it_bdc occurs 0.
   include structure bdcdata.
data end of it_bdc.

...
it_bdc-program = 'PROGRAM_NAME'.
it_bdc-dynpro = 'NUMBER_OF_POPUP_DYNPRO'.
it_bdc-fnam = 'BDC_OKCODE'.
it_bdc-fval = '=FUNCTION CODE OF PUSHBUTTON'.
append it_bdc.

"use same structure here if next function code triggered

Regards

Marcin

Read only

0 Likes
895

Marcin Pciak

Thanks for your reply.

Here my BDC_OKCODE is u2018=YESu2019, but my problem is in SHDB recording, if I press POP UP yes or no, its giving BDC_OKCODE IS u2018=YESu2019 only. I want to press the yes in pop up screen,

Here I press the u2018=YESu2019 its taking as a POP UP no, because in the pop up window the default cursor is in no push button.

Here I want to press yesu2026..

Regards,

Sreenu.

Read only

0 Likes
895

Try giving the BDC_OKCODE as '=NO' hope it should work.

Regards

Deepak

Read only

0 Likes
895

It seems that fcode is somehow wrong recognized or mixed for those two pushbuttons . Try this way:

- check the program name and screen for this pop up dialog

- go to se80 type this program and go to this screen

- in Layout go to attributes and check fcode of these 'YES' and 'NO' pushbuttons (each of them separately)

- pass fcode of YES button to your BDC recording/program (check if it really is =YES and if NO button has different fcode assigned - it should)

It may be something wrong with the recording itself, that's why only default NO pushbutton is triggered, although you pass fcode (=YES).

Regards

Marcin

Read only

0 Likes
895

Thanks Marcin Pciak,

Your correct, but here the two push buttons are having different OK-CODE like u2018YESu2019 and u2018NOu2019.

But there is small problem, like default value for this popup is u2018NOu2019.

I have changed the default value for this screen, its working fine,

Once again Thanks for your reply.

Regards,

Sreenu.

Read only

0 Likes
895

Hi sreenu,

I also suffered from the same problem...how did u change the default option as 'yes'...help me please........

Read only

0 Likes
895

Hi srinu,

I am also facing the same problem .how to change th default value of the screen.Please its very imp to me.can you please helpme.

Thanks & regards,

Manoj