2005 Dec 05 6:28 AM
I need to reterieve the fields like BUILDING, CITY, REGION, NAME1, NAME2, NAME3 from the structure ADDR1_DATA, using a function module ADDR_GET with address number from the table AUFK(AUFK-ADRNRA).I would be helpful if u provide me with a sample coding.
2005 Dec 05 6:33 AM
Hi,
You can try out RFITEMAP.
This is a SAp standard report which uses the same function.Also you can put the function name in SE37 and then check the where-used List. This function is used quite often for the same.
Hope it may be of your use.
Regards
Amit
2005 Dec 05 6:33 AM
Hi,
You can try out RFITEMAP.
This is a SAp standard report which uses the same function.Also you can put the function name in SE37 and then check the where-used List. This function is used quite often for the same.
Hope it may be of your use.
Regards
Amit
2005 Dec 05 6:37 AM
Pass the parameters to ADDR_GET
DATA:
lf_addr1_sel TYPE addr1_sel,
lf_addr1_val TYPE addr1_val.
data: x_addr1_data type addr1_data.
lf_addr1_sel-addrnumber = id_addrnumber.
CALL FUNCTION 'ADDR_GET'
EXPORTING
address_selection = lf_addr1_sel
* ADDRESS_GROUP =
* READ_SADR_ONLY = ' '
* READ_TEXTS = ' '
IMPORTING
address_value = lf_addr1_val
* ADDRESS_ADDITIONAL_INFO =
* RETURNCODE =
* ADDRESS_TEXT =
* SADR =
* TABLES
* ADDRESS_GROUPS =
* ERROR_TABLE =
* VERSIONS =
EXCEPTIONS
* PARAMETER_ERROR = 1
* ADDRESS_NOT_EXIST = 2
* VERSION_NOT_EXIST = 3
* INTERNAL_ERROR = 4
OTHERS = 5.
IF sy-subrc = 0.
MOVE-CORRESPONDING lf_addr1_val TO x_addr1_data.
ENDIF.
from x_addr1_data retrieve the info.
2005 Dec 05 7:36 AM
Hi,
or try fm ADDR_GET_COMPLETE:
TYPE-POOLS: szadr.
DATA adr_kompl TYPE szadr_addr1_complete.
DATA adr1 TYPE szadr_addr1_line.
DATA adtel TYPE szadr_adtel_line.
DATA admail TYPE szadr_adsmtp_line.
DATA adfax TYPE szadr_adfax_line.
...
CALL FUNCTION 'ADDR_GET_COMPLETE'
EXPORTING
addrnumber = AUFK-ADRNRA
IMPORTING
addr1_complete = adr_kompl
EXCEPTIONS
parameter_error = 1
address_not_exist = 2
internal_error = 3
wrong_access_to_archive = 4
OTHERS = 5.
*read Adress
READ TABLE adr_kompl-addr1_tab INTO adr1
WITH KEY data-date_to = '99991231'.
Andreas
2005 Dec 10 10:33 AM
Can u provide the same addr_get function module using subroutine perform and form.
2005 Dec 10 10:40 AM
DATA:
lf_addr1_sel TYPE addr1_sel,
lf_addr1_val TYPE addr1_val.
data: x_addr1_data type addr1_data.
lf_addr1_sel-addrnumber = id_addrnumber.
perform addr_get using lf_addr1_sel.
form addr_get isong p_addr1_sel type addr1_sel.
CALL FUNCTION 'ADDR_GET'
EXPORTING
address_selection = p_addr1_sel
* ADDRESS_GROUP =
* READ_SADR_ONLY = ' '
* READ_TEXTS = ' '
IMPORTING
address_value = lf_addr1_val
* ADDRESS_ADDITIONAL_INFO =
* RETURNCODE =
* ADDRESS_TEXT =
* SADR =
* TABLES
* ADDRESS_GROUPS =
* ERROR_TABLE =
* VERSIONS =
EXCEPTIONS
* PARAMETER_ERROR = 1
* ADDRESS_NOT_EXIST = 2
* VERSION_NOT_EXIST = 3
* INTERNAL_ERROR = 4
OTHERS = 5.
IF sy-subrc = 0.
MOVE-CORRESPONDING lf_addr1_val TO x_addr1_data.
ENDIF.
endform.
2005 Dec 10 10:49 AM
I NEED MORE CLARIFICATION.
THIS IS OK BUT I NEED TO USE THE IF_ADDR1_VAL FOLLOWING THE PERFORM STATEMENT, I ORDER TO ACHIEVE IT THEN HOW SHOULD THE PARAMETERS OF THE SUBROUTINE PERFORM BE.
PERFORM ADDR_GET USING lf_addr1_sel.
MOVE-CORRESPONDING lf_addr1_val TO x_addr1_data.
FORM ADDR_GET USING lf_addr1_sel
.
.
.
ENDFORM.
2005 Dec 10 10:56 AM
perform addr_get using lf_addr1_sel
changing lf_addr1_val.
MOVE-CORRESPONDING lf_addr1_val TO x_addr1_data.
form addr_get using p_addr1_sel type addr1_sel
changing p_addr1_val type addr1_val.
endform.
see this...
2005 Dec 10 10:57 AM