‎2007 Apr 08 11:04 AM
I have this simple program. the program will display all fields of a table when the user chooses the CONTROLID number. I created a pop-up window so that I can test if my program can really get the CONTROLID number from the textbox (this is a dialog programming). the pop-up window can display my input (for example I put '123456', it can show that). problem is it cant get the record that im looking for.
I tested my program using abap debugger's breakpoint. it surprised me that the value im getting from the CONTROLID's textbox is always 0, eventhough im putting other number. But when you run the entire program without dedugger, it is showing my real-time input number, however, it cant show my record. In short, i am only getting value 0 during debugger run-time. why is that?
<b>PLS HELP.</b> im a newbie
-
other info:
-
TBCONTROLIDE textbox property: int4
TBFIRSTNAMEE textbox property: char
CONTROLID field on the table property: int4
-
my code:
-
DATA: TBCONTROLIDE_VALUE(20),
INT_GETRECORD type table of ZMY_ADDRESSBOOK with header line.
TBFIRSTNAMEE(20).
form FINDRECORD.
* FIND THE CHOSEN CONTROLID NUMBER
TBCONTROLIDE_VALUE = TBCONTROLIDE.
select CONTROLID FIRSTNAME MIDDLENAME LASTNAME LOCATION MOBILENUMBER LANDLINENUMBER
from ZMY_ADDRESSBOOK
into CORRESPONDING FIELDS OF TABLE INT_GETRECORD
where ZMY_ADDRESSBOOK~CONTROLID = TBCONTROLIDE.
* SHOW RECORD OF ONE FIELD
TBFIRSTNAMEE = INT_GETRECORD-FIRSTNAME.
* POP-UP WINDOW
message TBCONTROLIDE_VALUE type 'I'.
endform.
‎2007 Apr 08 1:08 PM
Hi,
i do not see in your code definition of TBCONTROLIDE.
something like
data : TBCONTROLIDE type i.
Usually putted in top include.
It should have the same name in your dynapro and in your program too.
hope this helps.
Ogi
‎2007 Apr 08 1:08 PM
Hi,
i do not see in your code definition of TBCONTROLIDE.
something like
data : TBCONTROLIDE type i.
Usually putted in top include.
It should have the same name in your dynapro and in your program too.
hope this helps.
Ogi
‎2007 Apr 08 1:21 PM
i do have. it is type P. I have also tried making it type "i" but still the same issue.
‎2007 Apr 08 2:38 PM
Second thing that I see that you use an internal table with header line.
How many record you do you have for this TBCONTROLIDE? If it's only one use select single into some structure. If is not you need to make loop on itab to show all your fields.
Ogi
‎2007 Apr 08 2:46 PM
after so many testing with a separate program and after many hours, i decided to recreate that TBCONTROLIDE textbox and it solved my issue.
I dont know why this is happening in ABAP programming. I cant understand. kinda frustrating.
‎2007 Apr 09 3:16 AM