2006 May 18 7:40 PM
Hello,
Im working on a field exit, Im trying to get the value that is into a table control. I already know the table control´s name, but I havent been able to get its values.
I tryed with FM DYNP_VALUES_READ, but it throws exception saying that the field doesnt exist.
I wonder if there is a FM to get the TC´s values if if give the program´s name, dynpro´s number and TC´s name,
does any body know it?
The tx Im working on is BP, and the TC´s name is TCTRL_BUT0IF,
Thanks
Gabriel P.
Hello,
Im working on a field exit, Im trying to get the value that is into a table control. I already know the table control´s name, but I havent been able to get its values.
I tryed with FM DYNP_VALUES_READ, but it throws exception saying that the field doesnt exist.
I wonder if there is a FM to get the TC´s values if if give the program´s name, dynpro´s number and TC´s name,
does any body know it?
The tx Im working on is BP, and the TC´s name is TCTRL_BUT0IF,
Thanks
Gabriel P.
2006 May 18 7:45 PM
Hi,
are you talking about the fm to show F4 help.
if so check this FM <b>F4IF_INT_TABLE_VALUE_REQUEST</b>
regards
vijay
2006 May 18 7:46 PM
2006 May 18 8:17 PM
Hello Rich,
Do you know a FM that given the program id and dynpro number returns the dynpro´s field names?
Thanks,
Gabriel P.
2006 May 18 8:30 PM
Check this sample program.
report zrich_0001 .
data: dynname(44) type c.
data: begin of h. "Header
include structure d020s.
data: end of h.
data: begin of f occurs 250. "Dynpro Fields
include structure d021s.
data: end of f.
data: begin of m occurs 3. "Match codes (if any)
include structure d023s.
data: end of m.
data: begin of e occurs 0. "Dynpro Logic
include structure d022s.
data: end of e.
parameters: p_pgmnm(30) type c,
p_dynnr(4) type n.
move p_pgmnm to dynname(40).
move p_dynnr to dynname+40(4).
import dynpro h f e m id dynname.
loop at f.
write:/ f-fnam(30), f-stxt(60).
endloop.
Regards,
Rich Heilman
2006 May 18 8:23 PM
Are you passing the index value when you are specifying the field in the table control? I don't think you can simply refer to tabcontrol-fieldname. You may have to also specify which line like tabcontrol-fieldname(01) for the first line's field value.
Srinivas
2006 May 18 8:33 PM
Hello Srinivas,
Yes, I wrote the field exit code like this:
DATA: pantalla LIKE dynpread OCCURS 0 WITH HEADER LINE.
pantalla-fieldname = 'GT_BUT0ID-IDNUMBER(01)'.
APPEND pantalla.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = 'SAPLBUS_LOCATOR'
dynumb = '3000'
TABLES
dynpfields = pantalla.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
DATA: linea(255) TYPE c.
READ TABLE pantalla INDEX '1'.
linea = pantalla-fieldvalue.
But it throws the exception I said before (Exception condition "INVALID_DYNPROFIELD" raised), as you see I indexed the table control with (01), I did it with out it also, but it raised the same exception.
What I see is that the value I need to get is into a table control, and I´m not sure how can I get that value.
Thanks a lot for your help,
Gabriel
2006 May 18 10:19 PM
Hi Gabriel,
Can't you try with
GET CURSOR LINE <lin>
or
GET CURSOR FIELD <f> LINE <lin>
and then read the table control values for that line.
Regards,
Vicky
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |