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

Scripts

Former Member
0 Likes
449

Hi to All,

How We Test the Scripts

And

Smartforms

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
427

Hi,

1. Go with a transaction code : smartforms

2. Enter the form name like : ysmart_forms1

3. Create

4. Enter the Description for the form

5. From the left side window there will be a form interface to provide table .....

6. Go for tables option

7. ugyfel like ugyfel(ref.type)

8. Pages and window-> page1-> main window

9. Go to the form painter adjust the main window.

10. Select main window and right click --> go for create loop

11. Name: loop1, desc: display loop.

12. Internal table ktab into ktab.

13. select loop right click -> create a text

14. name : text1, desc: display text.

15. Go to change editor.

16. Write the mater what ever you want and if you want to display data from the table write the table fields as follows:

&ktab-<field1>& &ktab-<field2>&

save & activate then execute ,, scripts will generate a function module like : '/ibcdw/sf0000031' copy this function module and call in executable program...

For that

1. go with abap editor se38.

2. table: ugyfel.

3. parameters: test like ugyfel-<field1>.

4. data itab like ugyfel occurs 0 with header line.

5. select * from ugyfel into table itab where field1 = test1.

6. call function '/ibcdw/sf0000031'

7. tables

ktab = itab.

To test the scripts, go to SE71 then goto 'utilities' in menu bar..click on printing test.there in the field of 'output device' enter LP01 and press print preview. you can see the preview of the script you made. similarly for smartforms, goto the transaction Smartforms..then press F8..it displays the function module name..hit 'display' button...then press F8 twice..there in the field of 'output device' enter LP01 and press print preview.

Reward points if helpful..

3 REPLIES 3
Read only

Former Member
0 Likes
427

hi ,

1.sap scripts

This can done in two ways:

In the form Utilities->debugger / RSTXDBUG FM for debugging script

The Procedure for debugging SAP script is:

Generally SAP script contains the Layout and corresponding print program.

First go to SE71 and enter ur script name. In the same screen go to Utilities->click on activate debugger option.

Now go to SE 38 and enter ur Print Program name and execute the program.

Now you can debug the script Page wise and window wise.

2. sap smartforms

1.In the Smartform, create a Code Node and within the Code Node you can hardcode a normal abap

Break Point.

2.Smart debugging:--> Execute the smartform.It will open a FM in se37 screen.

--> Press Display.

--> Press find(CTRL+F).

--> Enter command here at which you want to put the break point.

--> Select the radio button 'in main program'.It will open the point at which you want to put the breakpoint.

--> Put the breakpoint here and execute the smartform again.It will stop at the point where you put the breakpoint.

On activating smartform it will generate one function moudle, take that name and go to SE37 , Put your generated FM name and display.. check the code where you want debug.. place the break point there .. come back and then execute your dirver program .. it will stop you at your break point.

3.

1.place SFTRACE inplace where we enter T_CODE and press ENTER.

after that press F8.

2 ./H

3 /SH

4.after generating the function module there is a button DEBUGGING

regards,

venkat.

Read only

kiran_k8
Active Contributor
0 Likes
427

Ekomkar,

Go to SE71

give the form name

go to utilities

activate the debugger.

now run the driver program which is calling this script.This will automatically take you to debugging screen of the script.As you will be populating the data only from the driver program you need to check how the internal tables in the driver program are getting populated and do the debugging.

If it is about alignment then you need to take the printout of the script and then check.

K.Kiran.

Read only

Former Member
0 Likes
428

Hi,

1. Go with a transaction code : smartforms

2. Enter the form name like : ysmart_forms1

3. Create

4. Enter the Description for the form

5. From the left side window there will be a form interface to provide table .....

6. Go for tables option

7. ugyfel like ugyfel(ref.type)

8. Pages and window-> page1-> main window

9. Go to the form painter adjust the main window.

10. Select main window and right click --> go for create loop

11. Name: loop1, desc: display loop.

12. Internal table ktab into ktab.

13. select loop right click -> create a text

14. name : text1, desc: display text.

15. Go to change editor.

16. Write the mater what ever you want and if you want to display data from the table write the table fields as follows:

&ktab-<field1>& &ktab-<field2>&

save & activate then execute ,, scripts will generate a function module like : '/ibcdw/sf0000031' copy this function module and call in executable program...

For that

1. go with abap editor se38.

2. table: ugyfel.

3. parameters: test like ugyfel-<field1>.

4. data itab like ugyfel occurs 0 with header line.

5. select * from ugyfel into table itab where field1 = test1.

6. call function '/ibcdw/sf0000031'

7. tables

ktab = itab.

To test the scripts, go to SE71 then goto 'utilities' in menu bar..click on printing test.there in the field of 'output device' enter LP01 and press print preview. you can see the preview of the script you made. similarly for smartforms, goto the transaction Smartforms..then press F8..it displays the function module name..hit 'display' button...then press F8 twice..there in the field of 'output device' enter LP01 and press print preview.

Reward points if helpful..