2006 Oct 04 12:13 PM
Hi.
I wont generate dinamically some variables type ref Data Dictionary type.
And I wont move values in these variables.
In what way can I do it?
Regards
Angela
2006 Oct 04 12:17 PM
Check this out:
REPORT ZNRW_DYN_TAB_TEST.
PARAMETERS : P_TAB(30) DEFAULT 'VBAK'.
parameters p_recs(3) type n default 20.
data : QUERY_TABLE(30).
QUERY_TABLE = P_TAB.
DATA DREF TYPE REF TO DATA.
DATA tabDREF TYPE REF TO DATA.
FIELD-SYMBOLS <struc> TYPE ANY.
FIELD-SYMBOLS <tab> TYPE table.
CREATE DATA DREF TYPE (QUERY_TABLE).
ASSIGN DREF->* TO <struc>.
CREATE DATA tabdref TYPE table OF (QUERY_TABLE).
ASSIGN tabDREF->* TO <tab>.
SELECT single * UP TO p_recs ROWS FROM (QUERY_TABLE) INTO <struc> .
append <struc> to <tab>.
Hi.
I wont generate dinamically some variables type ref Data Dictionary type.
And I wont move values in these variables.
In what way can I do it?
Regards
Angela
2006 Oct 04 12:17 PM
Are you looking for something like Field symbols?
DATA LETTER TYPE C.
FIELD-SYMBOLS <F> TYPE ANY.
ASSIGN LETTER TO <F>.
The field symbol has the type C and output length 1.
ASSIGN LETTER TO <F> TYPE 'X'.
Regards,
ravi
2006 Oct 04 12:17 PM
Check this out:
REPORT ZNRW_DYN_TAB_TEST.
PARAMETERS : P_TAB(30) DEFAULT 'VBAK'.
parameters p_recs(3) type n default 20.
data : QUERY_TABLE(30).
QUERY_TABLE = P_TAB.
DATA DREF TYPE REF TO DATA.
DATA tabDREF TYPE REF TO DATA.
FIELD-SYMBOLS <struc> TYPE ANY.
FIELD-SYMBOLS <tab> TYPE table.
CREATE DATA DREF TYPE (QUERY_TABLE).
ASSIGN DREF->* TO <struc>.
CREATE DATA tabdref TYPE table OF (QUERY_TABLE).
ASSIGN tabDREF->* TO <tab>.
SELECT single * UP TO p_recs ROWS FROM (QUERY_TABLE) INTO <struc> .
append <struc> to <tab>.
2006 Oct 04 2:13 PM
Thank you.
But at the initialization of <struc> I want that also the corresponding dynpro fields are initialized.
I have the text field defined as P0000-BEGDA (it is a structure in Data Dictionary ) on the dynpro and I write the follow code:
lv_campo = 'P0000-BEGDA'.
create data dref type (lv_campo).
assign dref->* to <struc>.
move '20060801' to <struc>.
this <struc> should update text field P0000-BEGDA on the dynpro.
In what way I can do?
Regards
Angela
2006 Oct 05 12:12 AM
in a pbo module have the following:
field-symbols: <screen_field>,<work>.
lv_campo = 'P0000-BEGDA'.
create data dref type (lv_campo).
assign dref->* to <work>.
move '20060801' to <work>.
loop at screen.
if screen-name = lv_campo.
assign (lv_campo) to <screen_field>.
<screen_field> = <work>.
endif.
endloop.
2006 Oct 04 2:41 PM
2006 Oct 04 3:36 PM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |