Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ADDRESS_INTO_PRINTFORM Error !!!

Former Member
0 Likes
812

Hi Friends ,

I am using this FM ADDRESS_INTO_PRINTFORM to get the address by passing the address number but not able to retrieve I am getting an error .

The code is as below .

DATA: z_adrs LIKE adrs

DATA:addrnumber LIKE ADDR1_SEL-addrnumber.

data: addr_type like SZAD_FIELD-ADDR_TYPE.

addr_type = 1.

Data: z_nation.

z_nation = 'C'.

CALL FUNCTION 'ADDRESS_INTO_PRINTFORM'

EXPORTING

address_type = addr_type

address_number = addrnumber

number_of_lines = 10

iv_nation = z_nation

IMPORTING

address_printform_table = z_adrs.

The error is as below .

The reason for the exception is:

The call to the function module "ADDRESS_INTO_PRINTFORM" is incorrect:

The function module interface allows you to specify only fields

of a particular type under "ADDRESS_PRINTFORM_TABLE". The field "Z_ADRS"

specified here

has a different field type.

Please advise .

Thanks

Message was edited by:

Teresa lytle

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
701

Declare the TYPE POOLS :SZADR in the TOP include . That should solve your problem .

Declare the TYPE POOLS :SZADR in the TOP include . That should solve your problem .

2 REPLIES 2
Read only

Former Member
0 Likes
701

Hi,

Change your code as

DATA: z_adrs LIKE adrs

to

<b>DATA: z_adrs LIKE SZADR_PRINTFORM_TABLE.</b>

Regards,

Atish

Read only

Former Member
0 Likes
702

Declare the TYPE POOLS :SZADR in the TOP include . That should solve your problem .