on 02-09-2005 1:55 PM
Dear all
In print prog i have something like this
TYPES:BEGIN OF TYP_ADRS ,
NAME1 LIKE ADRC-NAME1,
STREET LIKE ADRC-STREET,
CITY1 LIKE ADRC-CITY1,
POST_CODE1 LIKE ADRC-POST_CODE1,
COUNTRY LIKE T005T-LANDX,
END OF TYP_ADRS.
DATA:T_ADRS TYPE TYP_ADRS OCCURS 0 WITH HEADER LINE.
AT SELECTION-SCREEN.
SELECT SINGLE BUKRS INTO VBRK-BUKRS FROM VBRK WHERE VBELN = P_INVNO.
SELECT SINGLE ADRNR
INTO T001-ADRNR
FROM T001
WHERE BUKRS = VBRK-BUKRS.
SELECT SINGLE NAME1 STREET CITY1 POST_CODE1 COUNTRY
INTO (T_ADRS-NAME1,T_ADRS-STREET,T_ADRS-CITY1,
T_ADRS-POST_CODE1, ADRC-COUNTRY)
FROM ADRC
WHERE ADDRNUMBER EQ T001-ADRNR.
SELECT SINGLE LANDX
INTO T_ADRS-COUNTRY
FROM T005T
WHERE SPRAS = 'EN'
AND LAND1 = ADRC-COUNTRY.
APPEND T_ADRS.
Now through Form Interface ,i want 2 pass this 2 my layout
How do i declare this under Table(TAB)in Form Interface
If i declare like this
T_ADRS LIKE TYP_ADRS. it throws error
"type TYP_ADRS desnt exist".
(even i used TYPE REF TO it throws "feature under developement by placing the following under TYPE in Global definition
TYPES:BEGIN OF TYP_ADRS ,
NAME1 LIKE ADRC-NAME1,
STREET LIKE ADRC-STREET,
CITY1 LIKE ADRC-CITY1,
POST_CODE1 LIKE ADRC-POST_CODE1,
COUNTRY LIKE T005T-LANDX,
END OF TYP_ADRS.
)
How do i proceed . plz help.
Any light on this will be rewarded .
Thnx
Moni
Hi,
What I do is create a structure in the data dictionary and then define the table like the new structure on the tables tab.
Hope this helps,
Becky
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The term LIKE should be followed by a data object. The term TYPE should be followed by a type definition which could be a data object that also can serve as a type definition.
The use of the TABLES keyword is considered obsolete since you can now pass tables via the USING.. CHANGING.. keywords. Once you get into OO programming you will see that there is no TABLES option so I suggest you start using the latest techniques.
Let us know how it goes.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Moni,
I agree with Rebecca. If you want to use it in form interface it has to be a DDIC type or an ABAP type. You wont be able to use the type declared inside the form in Global defenition in the form interface.
So please declare the type in the DDIC and try using that type in your table decleration in the form interface
Regards,
Vani
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Declare this same TYP_ADDRESS, in global interface - Types tab.
Do not use <b>LIKE</b>, use <b>TYPE</b>.
If still doesn't work, create a structure in DDIC of ZTYP_ADDRESS and use it.
Regards,
Subramanian V.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Moni,
you were on the right track:
replace
T_ADRS LIKE TYP_ADRS.
with
T_ADRS <b>TYPE</b> TYP_ADRS.
and you can use t_adrs in form definition.
form work using lt_adrs type t_adrs.
...
Regards,
Christian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thnx for sharing ur ideas
i hav solved some part by creating a structure .
Now i need to pass a Internal Table(few selected fields form table LIPS ) with multiple records , How do i do ? i cant use structure for the same since it can hold only one record .
I have given points 2 u people .
Plz help .
Moni
User | Count |
---|---|
100 | |
11 | |
11 | |
6 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.