cancel
Showing results for 
Search instead for 
Did you mean: 

Style error in smartform

Sevin
Participant
0 Kudos

Hi all,

I am getting a "style does not exist" error in my smartform. I checked every node in the smartform, as well as the default style in the form attributes, but I can't figure out where the style is defined.

Besides in nodes and the form attributes, is there somewhere else where a style can be defined?

Any help on this would be greatly appreciated.

Thanks,

Alas84

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Alas84,

Were you able to find out the solution for this ? I am facing the exact same problem as yours.

Can you please let me know solution, if you have found it.

Thank you.

Visu

Former Member
0 Kudos

Vish,

here is what we did to solved this problem with style /SMB40/SF. Here are the steps which I followed to resolve the error.

Step. 1: From SMARTFORMS transaction, Execute the form with Error you will get a FM name, Now display the form and Click on Find Button, Select mainprogram Radio button and search the style /SMB40/SF. Note down all the nodes where this style is used.

Step 2: Remove the style from the nodes and activate. If you still find the style in form then note down the nodes above and below the style.

Step 3: Download the form for Backup first. Now remove both the nodes which were noted in step 2. Activate the form and now add the two nodes again back to form which were removed earlier.

Step 4: Activate the form and the Issue is Resolved.

Thanks,

Rajnesh Dharmat

Sevin
Participant
0 Kudos

You misunderstood the issue.

The styles maintained the Output attributes of my nodes DO NOT match the style referenced in the error message.

My question was- where, besides the output attributes of nodes and the form attributes, can a style be entered on a smartform?

After debugging my smartform, it appears that the missing style is linked to a Program Lines node, which doesn't make any sense. So I am just trying to understand where styles are specified in a smartform, to make sure I remove the reference to the missing style.

I hope this is clearer. Thanks.

aidan_black
Active Contributor
0 Kudos

Hi,

Check the output options tab on the node that is a level higher than the referenced program lines node. i.e. the fiolder, table, event... node that contains the program lines node.

Regards,

Aidan

Sevin
Participant
0 Kudos

HI Aiden,

I tried that but no luck.

The odd thing is that there are two Program lines nodes back to back (within the same upper node). When I'm debugging, the style changes between the two program line nodes. This is why I can't understand what is going on. This is a copy of a standard smartform so the smartform was actually created by SAP. I can't make sense of it.

This is the code:

PERFORM %CO20.

IF %WEXIT <> SPACE. EXIT. ENDIF.

CLEAR %SECTION.

%SECTION-NAME = '%OUTATTRIB61'.

%SECTION-STYLE = '/SMB40/SF'. <-- this is the style that doesn't exist.

%SECTION-LANGU = %LANGUAGES-LANGU1.

CALL FUNCTION 'SSFCOMP_BEGIN_SECTION'

EXPORTING SECTION = %SECTION

EXCEPTIONS OTHERS = 1.

IF SY-SUBRC <> 0. RAISE ERROR. ENDIF.

PERFORM %CO19.

%CO20 and %CO19 correspond to the two Program Lines nodes that I have back to back.

Thanks,

Alas84

Former Member
0 Kudos
This is a copy of a standard smartform so the smartform was actually created by SAP

As you metioned that this smartform is copy of standard form. I think somewhere in your Z FORM this style is left to remove which might be used in standard form.

You need to check all the nodes in your ZFORM for this style and remove this.

Second option.

Search this style '/SMB40/SF' inside the FM which is created when you execute your smartform from that you get an idea exactly at what place this style is used in your z smartform.

Hope you got my point.

Thanks,

Vijay

former_member186055
Active Participant
0 Kudos

Hi Alas,

Open your Smartform, identify the Function Module ( Menubar -> Enviornment -> Function Module) then execute SE37 open your identified function module in display mode, Then find (Menubar -> EDIT -> Find/Replace) for /SMB40/SF select radio button in main program. Now it will display the style '/SMB40/SF' whereever it is used.

Regards,

Surya

Sevin
Participant
0 Kudos

I have already checked all the nodes in my ZFORM and the style isn't there. I also checked the code and I know exactly where in the code that style is referenced. The only problem is that in the code, it is referenced inside a Program Lines node which doesn't make any sense.

former_member186055
Active Participant
0 Kudos

How it is possible Style inside Program Lines. I think style is given in Folder or Text. I can able to point out the style where it is used if the code is available. Code you have already posted which is not enfough. If you write code in side Text or Folder anyting in Smartform it will be converted into subroutines. Actually those you observed or not program lines.

Regards,

Surya

aidan_black
Active Contributor
0 Kudos

Hi,

Is there any style defined in any node or in the Output Options of the Form Attributes? If not then, you will get this error. You need to create a style and assign it to the form in Output Options of the Form Attributes. If there is a default style assigned in the form attributes, can yuo display this style from transaction SMARTFORMS?

Regards,

Aidan

former_member186052
Active Participant
0 Kudos

Hi,

A style is defined in transaction SMARTSTYLES

Regards,

-Sandeep

former_member186052
Active Participant
0 Kudos

And also you have to specify the style you are using in the output options tab of text element you are using in smartform.