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

How to get ADDRNUMBER after using function ADDR_INSERT

Former Member
0 Likes
1,595

Hi every body,

I create a address using FM addr_insert. But after create I don't know how to get the ADDRNUMBER?

PLS help me.

4 REPLIES 4
Read only

Former Member
0 Likes
897

Try using the FM - 'ADDR_NUMBER_GET'.

Pass the address_handle & address_reference.

address_handle = Fetched from 'ADDR_INSERT'

address_reference-appl_table = 'KNA1'

address_reference-field = 'ADRNR'

address_reference-appl_key = MANDT+KUNNR

address_reference-addr_group = "AG"

It worked for me

Edited by: Raj on Jul 5, 2010 5:51 PM

Read only

Former Member
0 Likes
897

Hi,

I run the program but have a error it's "Address handle invalid:" I Think this problem because the address handle it's worng but I don't know the right address can you help me pls?

Read only

0 Likes
897

Hope you have declared as below.

DATA: address_data LIKE addr1_data,

address_group LIKE adrg-addr_group,

address_handle LIKE szad_field-handle,

returncode LIKE szad_field-returncode,

address_reference LIKE addr_ref.

Data : v_c(4) TYPE n.

v_c = v_c + 1.

CONCATENATE sy-sysid sy-mandt sy-uname v_c INTO address_handle.

Read only

0 Likes
897

I have done it but it don't repair the error.

Address handle invalid: D01200IBMDEV10001

Client 200

user IBMDEV1