Application Development 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: 

Handling pop up in bdc

Former Member
0 Kudos
1,153

Hi All,

I am writing a BDC program where i am getting a pop up for the company code. the problem is, i am getting this pop up when i execute tcode first time and after that it is being continue from second step that mean not asking company code. i have done the recording with company code and and with change company code and its not working fine my question is i just wanted to know that how i can handle pop up is there any way to manage it.

Tcode is ABUMN.

Regard's

alam

2 REPLIES 2

former_member1050074
Participant
0 Kudos
305

Hi..

Add a check for that particular screen

if sy-index eq 1.

**Execute popup code

Endif.

Starting from second record , if there is a change in company code you have to call another window

"Change company code"

Hope it will help you, if you need more info, please let me know.

Thanks

Gowrishankar

paul_bakker2
Active Contributor
0 Kudos
305

Hi,

This is a common problem in BDC. The SAP transaction expects to fetch (say) the company code from a PID, but on the very first item the PID is still empty. So it produces a popup.

One way to fix this is to explicitly set the PID in the initialization event of your program. Here's an example for controlling area:

constants:
* Controlling Area
  gc_kokrs like tka01-kokrs value '1000'.

initialization.

* Set the controlling area so that CJ40 and CJR2 don't produce a popup.
set parameter id 'CAC' field gc_kokrs.

cheers

Paul