10-18-2014 11:46 AM
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
10-21-2014 9:06 PM
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
10-22-2014 2:09 AM
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