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

smartform debugging

Former Member
0 Likes
1,173

After searching existing discussions i think i should post this query now.

 

How can i debug a smartform without function module?

I know that  its easy and widely used, to dubug smartform with FM.

but how to debug smartform without function module?

I understand that smartform is client independent, but what about the FM (i understand it is also independent, Can anyone confirm)

Please help me to clarify this? 

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,113

Hi,

Whenever the smartform is activated, the functional module is generated, which have all the code of that smartform.

So whenever you run the smartform, the coding of Function module runs in background. So, if you don't want to use FM, you have to put a hard coded Break-point in the INITIALIZATION event of the smartforms or at any particular section by creating "Program Lines" and using hard break-point there.

Cheers,

Sumit

9 REPLIES 9
Read only

rosenberg_eitan
Active Contributor
0 Likes
1,113

Hi ,

The function module IS the smart form .

See:

http://help.sap.com/saphelp_nw70/helpdata/en/9b/e3b0e0c2a711d3b558006094192fe3/content.htm

Regards.

Eitan.

Read only

Former Member
0 Likes
1,113

function module associated with smart form is not a stand alone object but back end code for it. as you already know every single change done in form will reflect in function module as well irrespective of client. debugging smart form without function module is very much possible by using hard code break point statement. pls share what else you want to achieve.

Rgds

Read only

Former Member
0 Likes
1,113

Hi,

When we create a smart form a function module is automatically created. We can debug this function module. For that execute the function module we will get a screen like this.

Press the debugging button to start debugging.

Regards,

Alenlee.

Read only

Former Member
0 Likes
1,113

Hi,

i think you can create program line in smartform (create->flow logic->program line) .In program line you can set break-point (use keyword break-point)

Read only

Former Member
0 Likes
1,113

You can also set automatic debugger to start in case of an error/warning in the smart form. For this goto transaction SFTRACE and activate the debugger.

As you said the FM generated for the smartforms are client independent and so as the smartforms.

https://scn.sap.com/thread/1752641

Read only

Former Member
0 Likes
1,114

Hi,

Whenever the smartform is activated, the functional module is generated, which have all the code of that smartform.

So whenever you run the smartform, the coding of Function module runs in background. So, if you don't want to use FM, you have to put a hard coded Break-point in the INITIALIZATION event of the smartforms or at any particular section by creating "Program Lines" and using hard break-point there.

Cheers,

Sumit

Read only

Former Member
0 Likes
1,113

Hi,

Use "BREAK-POINT." in any program lines or at initializations.

it will stop there, but in actual all the code of ur smartform is converted into FM.

But dont forget to remove this hardcoding while moving the smart form from development to further.

Read only

Taha_j
Participant
0 Likes
1,113

at any area of your smartform insert lines of code or program lines like in a window or template table etc wherever its required and in the code area you can insert BREAK <your user name> so that it will break only for you and not for others example : break tech  ( tech is my login/username)

Read only

Former Member
0 Likes
1,113

Hi shilpa,

create program line in smartform where ever you want to debug.... create - flow logic - program line .

   in program line write like below...

    break (your user name).

   eg: mine is uday..

      so::::::::   break uday.

    some times break-point leads you problem.....

   so use above...

  cheers,

uday bhaskar....