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

Function for geting the company code address

Former Member
0 Likes
5,041

Hi all. Is there a function to get the company code address in sap script ?

Regards,

Cristian.

3 REPLIES 3
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
2,623

Hello,

How about trying BAPI_COMPANYCODE_GETDETAIL.

You have to create an subroutine & retrieve the data. I donot think there is any shortcut to this

BR,

Suhas

Read only

Former Member
0 Likes
2,623

Hello Christian,

The better way to solve is :

Create an include program and fetch the company code related address number (adrnr) field from the master table for company codes i.e,

T001 and populate this adrnr normally in the script to fetch the address details.

Thanks,

M.Naveen Kumar

Read only

0 Likes
2,623

Hi Cristian,

As Naveen had rightly said, you need to pass BUKRS to TOO1 table, and get ADRNR.

Call function module ADDR_GET

Importing parameters

Pass address_selection:

Pass ADDRNUMBER & NATIO

If you pass NATIO = I , you will get international version of address.

If you pass NATIO as blank, you will get local address details.

Exporting parameter

ADDRESS_VALUE structure will have company code address.

Regards,

Nisha Vengal.