Application Development 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: 

Address in the Invoice

Former Member
0 Kudos
205

Hi all,

I'm running into a very weird problem with the printout of the address in the invoice. the command is as follows:

/: ADDRESS PARAGRAPH AS

/: NAME NAME &VBDKR-NAME1&, &VBDKR-NAME2&, &VBDKR-NAME3&, &VBDKR-NAME4&

/: STREET &VBDKR-STRAS&

/: POBOX &VBDKR-PFACH& CODE &VBDKR-PSTL2&

/: CITY &VBDKR-ORT01&, &VBDKR-ORT02&

/: POSTCODE &VBDKR-PSTFACH&

/: COUNTRY &VBDKR-LAND1&

/: FROMCOUNTRY &VBDKR-SLAND&

/: ENDADDRESS

what happend is that when the customer's country &VBDKR-LAND1& is equal to the &VBDKR-SLAND& the address is not printed, but if the customer's country is different than &VBDKR-SLAND& then the address is printed.

Can anyone explain what's happening?

Regards,

Oli

2 REPLIES 2

jack_graus2
Active Contributor
0 Kudos
62

That is how it is supposed to work. The receiving country is only required when it is different from the sending country.

When you do not want this you can ommit the FROMCOUNTRY

regards Jack

90070279
Participant
0 Kudos
62

Hello Oli,

not to get off topic but I wonder why all the additional code. Your code is how we coded addresses in pre-4.6c environment. This example is how we code in SAP release 4.6c and 4.7 to avoid any problems between SADR, ADRC, ADRP, etc and OY01 Address format layout considerations. Also, in 4.6c or higher, we found all records create an address record whether or not you double click in on a partner to change a value or not making this an attractive and simpler approach.

One more note is that there are user-exits available for the Address_get functions should you need to format an address specific to a particular country relation, etc but this is rarely done and should be avoided. It is a good idea to try and keep OY01 settings standard to those provided by SAP.

/: ADDRESS PARAGRAPH AS

/: ADDRESSNUMBER &VBDKR-ADRNR(K)&

/: FROMCOUNTRY &VBDKR-SLAND&

/: ENDADDRESS

Tim

Menasha Corporation