10-21-2008 3:50 PM
Hi all,
this is the first time i post, so If i'm not clear, please ask and i try to explain better.
this is the problem:
I'm generating a dynamic dynpro: I read the fields to be generated from a table like this:
FIELD_NAME FIELD_TYPE FIELD_SIZE
field1 c 20
field2 i 25
field3 c 30
then i use the following code to generate the dynamic dynpro (I find it in this forum):
types: BEGIN OF str_tabZCAMPI,
nome_campo(132) type c,
type_campo(4) type c,
size_campo(2) type c,
END OF str_tabZCAMPI.
DATA: itab type table of str_tabZCAMPI,
wa like line of itab.
wa-nome_campo = 'GIACOMO1'.
wa-type_campo = 'c'.
wa-size_campo = '20'.
append wa to itab.
clear wa.
wa-nome_campo = 'GIACOMO2'.
wa-type_campo = 'i'.
wa-size_campo = '25'.
append wa to itab.
clear wa.
wa-nome_campo = 'GIACOMO3'.
wa-type_campo = 'c'.
wa-size_campo = '30'.
append wa to itab.
clear wa.
data: h type table of d020s with header line,
f type table of d021s with header line,
e type table of d022s with header line,
m type table of d023s with header line.
data: mess(50) type c,
line(50) type c,
word(50) type c.
data: dynproid(44).
dynproid = sy-repid.
dynproid+40(4) = '0100'.
h-prog = sy-repid.
h-dnum = '0100'.
append h.
loop at itab into wa.
f-fnam = wa-nome_campo.
f-flg1 = '80'.
f-flg3 = '80'.
f-line = sy-tabix.
f-flg1 = '80'.
f-flg3 = '80'.
f-coln = '03'.
f-type = 'CHAR'.
f-ityp = wa-type_campo.
f-leng = wa-size_campo.
f-stxt = '____________________'.
append f.
endloop.
e-line = 'PROCESS BEFORE OUTPUT.'.
append e.
e-line = 'MODULE status_0100.'.
append e.
e-line = 'PROCESS AFTER INPUT.'.
append e.
e-line = 'MODULE esci_0100 AT EXIT-COMMAND.'.
append e.
generate dynpro h f e m id dynproid
message mess
line line
word word.
call screen 100.
the problem now is: how can I read the values from the dynamically generated input fields ?
Do I have to generete corresponding data dynamically to? how can I do it?
thanks to all,
Giacomo
10-21-2008 4:16 PM
10-22-2008 8:24 AM
thank you very much this was really helpfull
Edited by: Giacomo Cipriani on Oct 22, 2008 9:24 AM
10-22-2008 8:45 AM
just one more thing,
I create the dynamic dynpro,
I display it,
I fill the input fields
then I call the fm DYNP_VALUES_READ but
if I don't call another screen the program goes dump because the dynpro doesn't exist anymore!
so: when the dynamic dynpro end to process the PAI it doesn't exist anymore? I must call another time the screen or there is a way to make the dynamic screen exist even after PAI ended?