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

inconsistent value

Former Member
0 Likes
700

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
638

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

5 REPLIES 5
Read only

Former Member
0 Likes
639

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

Read only

0 Likes
638

i do have. it is type P. I have also tried making it type "i" but still the same issue.

Read only

0 Likes
638

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

Read only

Former Member
0 Likes
638

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.

Read only

Former Member
0 Likes
638

<b>Ognian</b>, thanks for the effort. I appreciate it.