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

script to smartform

Former Member
0 Likes
959

Hi

suppose if the script is converted into the smartform then how to convert a script driver prog to smartform driverprog is it automatically converted or we have to code for smartform?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
924

Hi

We have to code separately for samrtform driver program.

7 REPLIES 7
Read only

Former Member
0 Likes
925

Hi

We have to code separately for samrtform driver program.

Read only

0 Likes
924

Step 1. Access the initial screen. Choose Tools>Forms printout>Smart Forms (transaction SMARTFORMS) from the SAP Easy Access Menu. The dialog window SAP Smart Forms: Initial Screen appears.

Step 2. Name the form. In the Form Field, enter field name you want to give, for example ZTF_GR_## (based on your company standard starting with Z to identify this as a customized form, where “##” is the group number).

Step 3. Access the migrate function. Go to Utilities>Migrate SAPscript Form. In the dialogue window enter the SAPscript form name, for example Y_SAPSCRIPT_STD. Choose the Check button.

Step 4. View the migrated layout. On the screen that appears, the SAPscript form is migrated into a rough Smart Form . Click on Form Painter to see an overview of the form layout.

Use the following steps for mass migration or simultaneous migration of multiple SAPscript forms: Step 1. Run the mass migration program. In Reporting (transaction SE38), select the program SF_MIGRATE and execute it (Figure 3). Select the names and the language of the SAPscript forms and click the execute icon. The system creates the Smart Forms named for the SAPscript forms plus the extension SF. It displays a list of the migrated forms.

Step 2. Make changes (if necessary). To change and adapt a form, go to transaction SMARTFORMS. Then activate the changed Smart Form.

Once the SAPscripts are converted, whether in Smart Forms or Smart Styles, you should clean up any errors made during the conversion process, in terms of attributes, window alignment, or syntax errors. Cleaning up errors during conversion is often standard procedure, as SAPscript might have used local logic. Errors may occur when a field displayed is extracted or manipulated to display and doesn’t exist, or fields exist but appear with no values. Errors may also arise in ABAP syntax.

Step 1. Define the Import Parameter. Double-click on the Global Settings> Form Interface from the navigation menu

Step 2. On the Import Tab, enter the import structure information. For example, enter Parameter Name (table name, such as LIKP), Type Assignment: Type, Reference Type (table name), Optional (or Mandatory); Pass Val: (Passing value indicator). This must be done for all the data retrieved from the SAP tables.

Step 3. Remove irrelevant or unnecessary windows. To delete a navigational menu node, right-click on the node, and select Delete. Since you start with windows in SAPscript, there might be redundant windows created for text.

Step 4. Set the first page. Delete the NEXT page node on the menu tree. Double-click on the first page node. In the General Attributes tab, change the Next Page value to FIRST.

Step 5. Delete the DETAIL frame window. Expand the MAIN window and delete all its text nodes.

Step 6. Adjust the text nodes. Click on the text nodes and let the system fit the text.

Step 7. Save and check the syntax.

Read only

0 Likes
924

when we execute the smartform we get a function module. You will have to call this function module from your abap program seperately.

regards

Read only

Former Member
0 Likes
924

u will have to write the driver program.

Read only

Former Member
0 Likes
924

Hi Mohan,

You can all the function module,tht is once you execute your smartform you will get the function module name so call this module in you print program.

Reward Points if helpful.

Regards,

Harini

Read only

Former Member
0 Likes
924

Hi Mohan,

There are some steps that you need to foloow while writing the print program for the smartform.

Step 1.

In the print program select all the records that you have to display,in the internal table form the database table.

Step 2.

Call the smartform and pass those internal tables to the Table parameter of the smartform.

In the smartform Loop at the internal table and display the records.

Read only

Former Member
0 Likes
924

Hello Mohan,

It is not possible to convert the script print program into smartform print program automatically.

You have to comment the FM used in script and use the FM used for the SMARTFORMS.

It is better to crate the new smartform instead to migrate from the script. Since while conversion only Layout will be copied nothing else.

Note:Set the point if think it is useful.

Regards

Vikas