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

Smart form not getting triggered

former_member207873
Participant
0 Likes
5,963

Hi Experts,

We have an update termination error and we found out that the issue is coming from a smart form. We have understood  what wrong code we have written in the smartform.But inorder to debug the issue we need to trigger the smartform at that point. The update issue is happening while processing the VF04 transaction. So we have put break point(tried with External, Internal and update debugging mode) in the function module generated from the smartform. But still it is not reaching the smartform and it ends up with update termination message. When we inspect ST22, the error is getting raised from the same smartform only. Why the smartform is not getting triggered even after putting the break point ?

B.R.

1 ACCEPTED SOLUTION
Read only

Jelena_Perfiljeva
Active Contributor
0 Likes
4,682

To clarify - it needs to be debugged in VF01-VF03 with a single document, not in VF04, which is mass processing. If you don't know which invoice is dumping specifically, you should be able to see some information in the variable section in ST22.

Hi Experts,

We have an update termination error and we found out that the issue is coming from a smart form. We have understood  what wrong code we have written in the smartform.But inorder to debug the issue we need to trigger the smartform at that point. The update issue is happening while processing the VF04 transaction. So we have put break point(tried with External, Internal and update debugging mode) in the function module generated from the smartform. But still it is not reaching the smartform and it ends up with update termination message. When we inspect ST22, the error is getting raised from the same smartform only. Why the smartform is not getting triggered even after putting the break point ?

B.R.

17 REPLIES 17
Read only

Jelena_Perfiljeva
Active Contributor
0 Likes
4,682

This question is too generic to answer intelligently, but just from reading it there seems to be some logic missing. E.g. it starts with 'we found out the issue is coming from a Smartform' but then ends with 'smartform is not getting triggered'. These statements kind of contradict each other, don't you agree? If it's not triggered how it could cause a termination?

I'm not really sure by what measure did you arrive to any of these conclusions and what answer is expected with such limited and confusing information...

Read only

0 Likes
4,682

Hi Jelena,

Thanks for your response. The 'contradiction' is the 'surprise element' for us.

Jelena Perfiljeva wrote 

'we found out the issue is coming from a Smartform'

This is our proof that the issue is coming from smartform. (Please have a look on to the ABAP Program). More over we found the code line also in the same smartform which causes the issue.


but then ends with 'smartform is not getting triggered'.

This is what confuses us ? We know the fix for the issue. But before we just need to go the debugger screen and have to show proof to the concerned people. For that the smartform debugger point has to be triggered. Our assumption is smartform is called while performing save action on VF04 transaction code since error is getting popped up at that instant.

B.R.

Read only

Former Member
0 Likes
4,682

PD,

When you add a break point in the FM, the debugger stops after the FM is called successfully and on the first executable statement in the FM.

I guess there is a problem in call to FM on the first place. This can happen due to a # of issues, a simple one being some mandatory parameter is missing in the FM call.

So instead on adding a break point on FM, add a break point on the call to the FM or on the include that calls your FM. Check if the call to FM is successful.

Ofcourse don't forget to turn on update debugging.

Thanks,

Vikram.M

Read only

0 Likes
4,682

Hi Vikram,

Thanks for your answer. A small correction, we have made use of the program of the smartform, i mean what we get by adding L in the middle and F01 to the end of the function module getting generated from the smartform. The error is getting clearly inside the coding of smartform. (analyzed in ST22) So there is no question about whether the smartform is getting called or not.

B.R.

Read only

0 Likes
4,682

Good point, vikram, although in this case wouldn't the short dump occur in the program calling the FM? I'm not sure, it doesn't happen to me frequently...

@OP - the standard billing output program uses FM LB_BIL_INV_OUTP_READ_PRTDATA to fill in the output interface structure. If you set a breakpoint there (or whereabouts), you should see the data that is sent to the form.

Read only

0 Likes
4,682

Try this.

Put breakpoint at dynamic call of smartform FM.

Launch system debugging using /hs and execute

Manually step into the smartform FM.

Execute till subroutine %GLOBAL_CLEAR and manually step in.

     In case the subroutine is not present, step into first subroutine whose name starts with %

Now you would likely be in *F01 include. Look for exact subroutine (say %CO3) and line where you want debugger to pause, set line breakpoint and continue.

I am able to step into any smartform specific abap code using above method.

You can also get the callstack from ST22 dump and try each step-in manually.

For people who are already modifying the smartform, writing break-point statement in coding block is easier.

Read only

0 Likes
4,682

Hi ,

Thanks for your input. Tried with the same. But still the debugging point is not getting triggered.

B.R.

Read only

0 Likes
4,682

Why don't you try as Jelena has already mentioned.

in VF02 do a repeat output of the failed Output type via the Output screen. In "further data" change it to Process via background program ( "1" ). Then save the Billing Doc.

Put a  breakpoint in your smartform or driver program

Run program RSNAST00 and the in the selection Object key enter your Billing Doc + * and enter the output type and execute .

Read only

Jelena_Perfiljeva
Active Contributor
0 Likes
4,682

Ok, yeah, I thought it'd be conversion related. The form is triggered but the output can't be completed because obviously you're trying to stuff an alpha character into a numeric field (or the field is too short - asterisk is usually the form's way to tell "hey, this stuff doesn't fit". In ST22 further down you should see where exactly the error occurs. The form subroutine should correspond to a node in the form. If you were smart enough and named the nodes properly (instead of leaving the generic CELL%10) then it should be a sufficient clue.

There is also a very simple way to debug forms. Open the form's FM in SE37 and put a breakpoint either before the error occurs (see code fragment in ST22) or at some other point triggered early where you put some ABAP code (e.g. Initialization). You can use Search, just make sure to select 'search in main program' since there are usually many includes.

After that go to VF03, on the first screen put document number and go to the menu (stay on the same screen) Billing Document -> Issue Output to. Then select the output type that's giving you trouble and click Print preview button. Unless it dumps before your breakpoint, it should start the debugger.

If you don't see any output there, just go to VF02 and add one. Make sure to set it not to be processed immediately, otherwise it'll dump right there.

Read only

Former Member
0 Likes
4,682

Hi

I suppose the breakpoint can't be reached because the print process works in background

If you want to try to debug the smartforms you need to use an online process

If the bill exists you can run the print by VF02  as Jelena suggest, else you can try to create the bill by VF01 instead of VF04


Max

Read only

Jelena_Perfiljeva
Active Contributor
0 Likes
4,683

To clarify - it needs to be debugged in VF01-VF03 with a single document, not in VF04, which is mass processing. If you don't know which invoice is dumping specifically, you should be able to see some information in the variable section in ST22.

Read only

0 Likes
4,682

We are doing it in VF04 for only one delivery. Even if we give the same in VF01, the same is happening.

The strangest thing is why the smart form is not getting triggered ?

B.R.

Read only

0 Likes
4,682

Hi

I believe VF01 runs the print process in background, so you can try to debug your print only after saving the document.

So you should create your bill by VF01, but before saving it you should change the event to print the message:

now I suppose it's 4 (Send immediately when saving the application), you should set 3

After saving the document, you can restore the message by VF02 and so here you can try to debug your smartform

Max

Read only

0 Likes
4,682

Please share a screenshot of ST22 that shows where error occurs (or better yet extract it as txt and attach to the post).

Also - what program is assigned to the output and have you tried a breakpoint in FM LB_BIL_INV_OUTP_READ_PRTDATA, as was suggested (assuming a standard program is used).

And, as was pointed out already, make sure that output is not set to immediate processing. You need to debug output separately from the invoice creation.

Read only

0 Likes
4,682

Thanks Jelena for your answer.

The smartform is called from a custom driver program. So i think i have to keep break point over there just before calling the smartform. We know what is going wrong through ST22. Our only issue is the smartform code is not getting triggered.


Jelena Perfiljeva wrote:

And, as was pointed out already, make sure that output is not set to immediate processing. You need to debug output separately from the invoice creation.

I will try with this and will get back to you.

B.R.

Read only

0 Likes
4,682

Hi

The print process is triggered after saving a document, that meams is always works in a update task process (so in background).

The print starts after calling the commit, so if it needs to debug it, it should run the debbuger with mode UPDATE DEBUGGING

but it's easier to create the document and after to try to print it

Max

Read only

Former Member
0 Likes
4,682

This message was moderated.