on 12-27-2007 8:12 AM
hello abapers,
I have the next code:
TABLES: BSEG, LFA1.
Selection criteria
PARAMETERS S_LIFNR LIKE bseg-LIFNR.
DATA: BEGIN OF T_DATA1 OCCURS 0,
T_NAME1 LIKE LFA1-NAME1,
T_STRAS LIKE LFA1-STRAS,
T_ORT01 LIKE LFA1-ORT01,
T_PSTLZ LIKE LFA1-PSTLZ,
T_LIFNR1 LIKE LFA1-LIFNR,
T_LIFNR2 LIKE BSEG-LIFNR,
T_GJAHR LIKE BSEG-GJAHR,
END OF T_DATA1.
select name1 stras ort01 pstlz lifnr
from LFA1
into corresponding fields of table T_DATA1
where lifnr = S_LIFNR.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
form = 'ZNOVALE_OST_PRU1'
device = 'PRINTER'
dialog = 'X'
language = SY-LANGU
EXCEPTIONS
canceled = 1
device = 2
form = 3
options = 4
unclosed = 5.
loop at T_DATA1.
CALL FUNCTION 'START_FORM'
EXPORTING
startpage = 'FIRST'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
window = 'CABECERA'.
CALL FUNCTION 'END_FORM'.
endloop.
CALL FUNCTION 'CLOSE_FORM'.
Then, to get data in the form, I have the next code:
PN &T_DATA1-T_NAME1&
PN &T_DATA1-T_ORT01&
PN &T_DATA1-T_PSTLZ&
But it no obtain.
¿Can you help me, please?
sir jee
u have define fields in ur internal table as T_NAME1, T_STRAS,....................
but in select query ur writing INTO CORRESPONDING FIELDS this works only when ur Intenal table fields name
is same as SAP table fields name.
there is no problem in SAP Script, but data is not there in ur Internal table , check this by writing
WRITE : / I_DATA1-T_NAME1
and commenting Script FORM's
reward if helpful
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.