Skip to Content
0

How to abort Smartform generation during it's execution?

May 07 at 09:52 AM

34

avatar image

Hi All, I have one requirement in which it is required to abort the smartform layout generation if some criteria don't meet. Like we have EXIT keyword in Reports, do we have anything like that in Smartforms? Please help.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Rajkumar Narasimman May 07 at 11:43 AM
1

Hi Atul Mittal.

"Like we have EXIT keyword in Reports, do we have anything like that in Smartforms?

Before calling smartform, we can handle all the conditions, I don't know why you want to exit after Smartform is called.

Anyhow we do have option to exit from smartform. Smartform is nothing but calling Function module which is unique for each FM. Use LEAVE PROGRAM command to comeout from Smartform.

Regards

Rajkumar Narasimman

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Thanks, it's working as expected.

1
Hedvig Rohonyi
May 07 at 10:16 AM
2

Dear Atul,

maybe the simplest solution: create a text node with type include_text and the system issues an error message, if the text key of the include text is incorrect. For this node you can set a codition also.


The exception formatting_error (sy-subrc = 1) will delivered by the generated smartform function modul.

Best regards,
Hedvig

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Thanks Hedvig for sharing this solution, but for now I think Rajkumar's Solution will do good.

0