Skip to Content
author's profile photo Former Member
Former Member

How to generate new address number using ADDR_NUMBER_GET

Can you please help me in finding the import parameters for the FM 'ADDR_NUMBER_GET'.

The addres handle which is supposed to be a temporary key is throwing an error

INVALID ADDRESS HANDLE. wat sort of data shud be passed to this address handle

Anil

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on May 31, 2012 at 08:28 AM

    Solution:

    CONCATENATE sy-sysid sy-mandt sy-uname gv_handle INTO gv_handle.

    CALL FUNCTION 'ADDR_INSERT'

    EXPORTING

    address_data = gs_addr_data

    address_group = 'ZANP'

    address_handle = gv_handle

    * DATE_FROM = '00010101'

    * LANGUAGE = SY-LANGU

    check_empty_address = ' '

    * CHECK_ADDRESS = 'X'

    IMPORTING

    address_data = gs_addr_data

    returncode = gv_rc

    * TABLES

    * ERROR_TABLE =

    EXCEPTIONS

    address_exists = 1

    parameter_error = 2

    internal_error = 3

    OTHERS = 4

    .

    IF sy-subrc <> 0.

    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

    ENDIF.

    gs_ref-addr_group = 'ZANP'.

    gs_ref-appl_table = 'ADRC'.

    gs_ref-appl_field = 'ADDRNUMBER'.

    CALL FUNCTION 'ADDR_NUMBER_GET'

    EXPORTING

    address_handle = gv_handle

    address_reference = gs_ref

    * PERSONAL_ADDRESS = ' '

    * NUMBERRANGE_NUMBER = '01'

    * E071K_WA =

    * GENERATE_TRANSPORT_ENTRIES =

    * OWNER = 'X'

    * TABLE_NAME =

    * FIELD_NAME =

    * OBJKEY =

    IMPORTING

    address_number = p_addr

    * RETURNCODE_NUMBERRANGE =

    * TABLES

    * E071K_TAB =

    EXCEPTIONS

    address_handle_not_exist = 1

    internal_error = 2

    parameter_error = 3

    OTHERS = 4

    .

    IF sy-subrc <> 0.

    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

    ENDIF.

    ADDR_GROUP must exist in TSAD7 table!!!!

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello,

      I did as you described but now I got another error in function module ADDR_INSERT. With the EXCEPTIONS interface SY-SUBRC 2 came up and internal the error had been triggered by below coding.

      FUNCTION addr_aesref_get .

      *"----------------------------------------------------------------------

      *"*"Lokale Schnittstelle:

      *" EXPORTING

      *" VALUE(AESREF) TYPE REF TO CL_ADDRESS_ENHANCER

      *" EXCEPTIONS

      *" AESREF_NOT_EXIST

      *"----------------------------------------------------------------------



      IF NOT ( gref_address_enhancer IS INITIAL ).

      aesref = gref_address_enhancer.

      ELSE.

      MESSAGE e521 RAISING aesref_not_exist.

      ENDIF.



      ENDFUNCTION.

      I have no idea to handle this. I check the parameter supply of ADDR_INSERT in different places it will be used but I can not find any significant difference to my coding.

      May you have an idea.

      Thank you

      Regards

      Norbert

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.