cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with SAP standard GR smartform

Former Member
0 Kudos

Hi, I hope someone can help.

I am trying to change over to using smartforms for goods receipt slips. I have found package /SMB40/ which contains the SAP smartforms and printing programs for goods receipts and have made changes to the config via M706 as below:

Program /SMB40/M07DR

Form Routine ENTRY_WE03

Form

PDF/Smartform Form /SMB40/MMGR1_A Form Type 1 SmartForm

The problem I am having is when I MIGO a PO line I get the usual message telling me that a material document has been created but when I move to my next screen I get an error message

Express document "Update was terminated" ...

When I check the PO, the GR has not been completed. I expect that this is due to there being an error and everything being rolled back.

I have checked through the logs in ST22 and it does look like in the print program there is an error being added to the error log and the problem arises when it tries to display the log. I haven't managed to get the debug screen for the print program to come up in order to find the error so if anyone could help with this it would be appreciated. Getting back to the problems with the print program itself, I am surprised I am having a problem as it and the smartform are provided by SAP. Are my setting in M706 correct and if so, any ideas on what else could be wrong.

Thanks,

John

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Thanks to the detailed instruction from Florian I could see that what I was missing with debugging was the enabling of update debugging. All sorted out now and points awarded.

Thanks,

John

Former Member
0 Kudos

Hi John,

well i dont wonder too much that you couldnt debug it in first try.

When you do MIGO, you GR is beeing posted. This is beeing done in "update task", so unless you switched on update task debugging, it would not stop at your breakpoint.

So in MIGO type /h and hit enter. Now you are in debug mode. Use the menu now to go to: Debugging ->update task debugging. I dont work with the english logon so yeah it may be called something similar.

If you set a breakpoint in your print program, it should now stop.

If you want to debug your smartforms, then you need to either set the breakpoints in the generated FM, or hardcode them into the form. When you have a smartform and look at a piece of coding you can set a brealkpoint like in SE38, but this wont work, it just looks like it would.

chaouki_akir
Contributor
0 Kudos

Hello

what do you mean by saying:

"I haven't managed to get the debug screen for the print program to come up in order to find the error so if anyone could help with this it would be appreciated."

?

--> you do not know how to debug ?

As Brad says, you can debug to know, exactly, what happens. And debugging action will give you explanation about your problem.

Cordialement,

Chaouki

Former Member
0 Kudos

Thank you for your replies so far.

I have now managed to get past my initial problem and have my currently very basic smartform being output. The problem with the SAP standard form seems to be a graphic file that is missing on the system.

Regarding debugging, I am happy with debugging programs but when I try to debug smartforms the debug screen doesn't open up. This is the case with coded breakpoints within the program and also with breakpoint set against lines of code in SE38. I think I must be missing something but can't see what. I have tried searching the web for instructions on debugging smartforms and followed what was written on a number of web pages but still I cannot get the debug screen to open up part way through processing. Any indication as to what I may have missed with debuuging would be appreciated.

Many thanks,

John

Former Member
0 Kudos

Hi John,

For debugging, In smartform if u click Environment -> Function Module , You will get the Function module name. Copy that FM name.

Start the application in debugging mode. From toolbar select Create breakpoint at Function module and give the name which u have copied. After the success message breakpoint set press F8. It will automatically stop at the smartform.

Best Regards,

Nithya

brad_bohn
Active Contributor
0 Kudos

Turn on your update debugger in order to hit a breakpoint in the program. You will find that it's a dynamic call in the code based on the entry found in TNAPR. If it's all SAP standard, then I would check for notes on the print program or form before bothering to debug the thing. So the short dump and the update logs don't give you any indication as to the issue?