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

Get data from structure another program.

jandrivay
Participant
0 Likes
3,246

Hi All,
Please help me , i want to get data from another program (SAPLSZA1) , but when i see in techincal information that

Field Data :
Table name : ADDR1_data
and Table Category : Structure.

how to select / get this data in street field to my second program ?

i need to select field street wich contain 'GEDUNG B&G TOWER' to my second program.

Thank you all.

1 ACCEPTED SOLUTION
Read only

ThangaPrakash
Active Contributor
2,981

@Hotman Jandri Vay Sianturi It seems you are looking into XD03 customer master data,

street field is being stored in KNA1 table, you can directly KNA1-STRAS read them in your program.

7 REPLIES 7
Read only

FredericGirod
Active Contributor
2,981

Your best friend will be SQL trace: transaction ST05

- Activate trace

- display the data in your transaction

- unactivate the trace

- display the result

it will show ~all the tables acceded by the program. And you could also display the corresponding code. (there is a button) And put a break point / you will stop in the debug dirrectly in the source code. In the call stack you will be able to see if there is a nice Function module or Class/method to retrieve the data

Read only

2,981

This answer is valid for all situations.

In the current case, you will probably find the tables ADR* in the trace, it's easy to deduce that they store the addresses. The key of these ADR tables is the company address number or person number or both, and that it's also defined in a table of your application (as I see SAPMF02D in your screen shot, it must be a customer table, maybe KNA1-ADRNR).

There's also the documentation of Business Address Services, especially:

  • Basics > BAS tables (ADRC, etc.) <=== what you're looking for
  • Data conversions > Data conversions for 4.0 > Tables affected (ADR6, etc.)
  • Working with the BAS (list of available function modules to read the tables and more)

EDIT: as I could see in Thanga answer, SAPMF02D is for customers, not vendors (SAPMF02K) -> answer adjusted

Read only

ThangaPrakash
Active Contributor
2,982

@Hotman Jandri Vay Sianturi It seems you are looking into XD03 customer master data,

street field is being stored in KNA1 table, you can directly KNA1-STRAS read them in your program.

Read only

0 Likes
2,981

yes, i think so too, but in my case LENGHT from KNA1 not enought.
i need lenght 60 char. so then I was ordered to retrieve data from the FD03 tcode, as I screenshoot. Can it ?

Read only

stanislaslemaire
Participant
2,981

Is really, for example, street value from Customer master you need ?
Because if it's from a sales document, the value can be changed manually and then will be differente as in Customer master. In this case, retrieve address number (Example from VBPA-ADRNR) and use of ADDR_GET function ensure you to use right data.
Otherwise as Thanga Prakash say, use of KNA1-STRAS is enought 😉

Read only

0 Likes
2,981

yes, i think so too, but in my case LENGTH from KNA1 not enough.
i need lenght 60 char. so then I was ordered to retrieve data from the FD03 tcode, as I screenshoot. Can it ?

Read only

0 Likes
2,981

Ok, street field of structure ADDR1_DATA have length of 60.
If you want use it, use KNA1-ADRNR address number and function ADDR_GET to retrieve data in exported structure ADDRESS_VALUE. Then read ADDRESS_VALUE-STREET.