Skip to Content
author's profile photo
Former Member

How to suppress a blank line within an address block

We have this ongoing situation that has bubbled its way to the top and I need to find a way to solve it. Any suggestions would be appreciated.

Some of our customer's addresses require a 2nd street address line, but most require only 1 line for the street address. We have set up our USA address format so that we use the "block" field as the 2nd address line. The problem is that when the "block" field is blank, it leaves a blank line in the Address Block. Is there a way to collaspe the address when one of the fields is blank?

I am using SBO 8.81 PL 10. Most of my printed documents were built using Crystal Reports.

Randy Davis

Denver, CO

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Posted on May 22, 2012 at 11:16 PM

    Hi Randy,

    We had the same issue with our recently implemented 8.82. We also use ‘Block’ as the second address line.

    Our consultant just added the following formula to the address boxes in the Crystal reports:

    REPLACE({OINV.Address}, ChrW(13)+ChrW(13), ChrW(13))

    It’ll still display a blank line if there is no Block field within SAP however will not print as long as you replace the two line breaks with just the
    one as per above code.

    Kind regards,

    Greg

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo
    Former Member
    Posted on May 22, 2012 at 08:40 PM

    Hi

    You can create a formula like :

    stringvar Address :="";

    if (Not(ISNULL({tablename.field1})) AND {tablename.field1} <>"")

    THEN Address : = {tablename.field1} + " " + CHRW(13);

    if (Not(ISNULL({tablename.field2})) AND {tablename.field2} <>"")

    THEN Address : = Address + {tablename.field2} + " " + CHRW(13);

    if (Not(ISNULL({tablename.field3})) AND {tablename.field3} <>"")

    THEN Address : = Address + {tablename.field3} + " " + CHRW(13);

    if (Not(ISNULL({tablename.field4})) AND {tablename.field4} <>"")

    THEN Address : = Address + {tablename.field4}

    Address;

    Regards

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Pari, thank you for your reply.

      I thought about writing a similar formula. However, we have several country formats and the resulting formula would be unmanageable.

      I was hoping that SAP would have figured this out by now. Anyone else know of any other solution?