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

Needed smartform to determine page format automatically.

Former Member
0 Likes
322

Hi

I have a reqirement to print the smartform output in Letter format paper for one company code and it should print it in A4 size paper for rest of the company codes.

I am using R/3 4.6c

I tried with this code

data: lx_sf_header(31) type c,

field-symbols: <fs_header> type SSFFORMHD.

if company_code = 'XXXX'.

CONCATENATE '(' sy-repid ')%HEADER' into lx_sf_header.

assign (lx_sf_header) to <fs_header>.

<fs_header>-PAGEFORMAT = 'LETTER'.

endif.

but I am getting short dump & this logic is working fine in ECC.

Please help me regarding this.......

Thanks in advance

Kiran.

1 REPLY 1
Read only

Jelena_Perfiljeva
Active Contributor
0 Likes
280

I don't think it's feasible. The page format must be specified in the form, therefore one form can have only one page format. You can try some kind of custom format (which is neither A4 nor Letter), but this might cause an issue while printing, because the printer usually looks for a specific page format and all funky formats require pressing a button on the printer.

This would be possible though with Adobe forms, so you might want to explore that option.