cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Smartform Page Format

Former Member
0 Kudos

Hi,

I tried using the following code to create dynamic page format.

Im working on 4.6c and the following code seems to not work.

This code is written in the initialization tab of Global Definition Section.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

data: lx_sf_header(31) type c.

field-symbols : <fs_header> type SSFFORMHD.

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

assign (lx_sf_header) to <fs_header>.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The field symbol does not get assigned, can anyone throw some light on whats wrong.

regards,

Accepted Solutions (0)

Answers (1)

Answers (1)

valter_oliveira
Active Contributor
0 Kudos

Hi.

Place a break-point in statement CONCATENATE '(' sy-repid ')%HEADER' into lx_sf_header.

In that moment, verify if structure "(program)%HEADER" is initial. If it is, that's the reason. Are you sure it's "(program)%HEADER"? Try "(program)HEADER"

Regards.

Valter Oliveira.

Former Member
0 Kudos

Hi Valter,

Thanks for the reply,

I checked the structure "(sy-repid)%HEADER" and its not initial, it is populated as per the code.

i also tried it without the '%' but it still dosent work.

The field symbol does not get assigned.

assign (lx_sf_header) to <fs_header>.

regards,

valter_oliveira
Active Contributor
0 Kudos

Hi again.

The assign statement is correct. You are assigning the value of the text variable, and the value is the structure.

If the "(sy-repid)%HEADER" is populated, the only reason I can think of is the type. Is (sy-repid)%HEADER of the type of <fs_header>, i.e SSFFORMHD? If it is, try with:

FIELD-SYMBOLS: <fs_header> TYPE ANY.

Regards.

Valter Oliveira.

Former Member
0 Kudos

Hi,

I tried it with type any..but it still dosent work.

The code that i posted earlier works perfectly on ECC 6.

regards