cancel
Showing results for 
Search instead for 
Did you mean: 

Smartforms - Address Printing

Former Member
0 Kudos

Guyz,

I'm having a weird problem with smartforms....

Firstly I can't use Address node functionality of Smartforms as our address printing has got some custom functionality based on which i'll have to filter out few stuff in printing address.

Thus I created a structure and passed the same to smartforms thru program...but the thing is i'm not able to suppress the blank lines.....that is if Address line 4 is space I don't want to print it....I know Address node has got inbuilt functionaliyt...similar one i 'd like to simulate...

i'm using following code in smartforms inside a text element.....

/: IF &CONTACT-LINE4& NE &SPACE&

N8 &CONTACT-LINE4&

/: ENDIF

BUT when i'm printing the invoice i'm getting blank line for above LINE4 address aswell

kindly help me out....

thanks in advance

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Sreedhar,

Instead of the if statement in the text elements, use the alternative node of the smartform.

Regards

Aadarsh

Former Member
0 Kudos

guyz ,

Thanks for so many replies....

i can't use 'condition' tab for text node as i'm printing at around 9-15 lines of address details of the contact.....

worst thing I can think of is handling of that structure in driver program itself which will be messy code....

any other ideas pls ?

Former Member
0 Kudos

Hi sreedhar,

Use the FM 'ADDRESS_INTO_PRINTFORM' and delete the line which u dont need(blank line).

CALL function 'ADDRESS_INTO_PRINTFORM'

EXPORTING

ADDRESS_TYPE = '1'

ADDRESS_NUMBER = adrnr

SENDER_COUNTRY = 'TW'

NUMBER_OF_LINES = 6

IMPORTING

ADDRESS_PRINTFORM_TABLE = it_address.

Thanks,

Vamsi.

former_member181962
Active Contributor
0 Kudos

Hi Sreedhar,

Just checked this thread.

see if it is useful for you.

REgards,

Ravi

Former Member
0 Kudos

Hi Sreedhar,

Can you try specifying &CONTACT-LINE& # INITIAL in the output options for the text-element?

Regards,

Raj

former_member181962
Active Contributor
0 Kudos

Hi Sreedhar,

In SAP scripts, we have an option of not letting blanks lines to be printed in the paragraph format properties.

Check if such an option is available in smartforms also.

REgards,

Ravi

Former Member
0 Kudos

Hi Shreedhar,

First condense the variable then use if statement.

Thanks

Swagatika