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

Smartforms Debug

Former Member
0 Likes
1,427

Hi,

How can i <b>DEBUG</b> into Smartforms.

I was actually not able to print a header text in print output(using Read_text FM)

Here's the code i wrote in smartform:--

DATA : BEGIN OF TABLE_LINES OCCURS 0.

INCLUDE STRUCTURE TLINE.

DATA : END OF TABLE_LINES.

DATA : VBELN1 LIKE THEAD-TDNAME.

VBELN1 = GS_HD_REF-ORDER_NUMB.

CALL FUNCTION 'READ_TEXT'

EXPORTING

  • CLIENT = SY-MANDT

ID = '0001'

LANGUAGE = 'E'

NAME = VBELN1

OBJECT = 'VBBK'

  • ARCHIVE_HANDLE = 0

  • LOCAL_CAT = ' '

  • IMPORTING

  • HEADER =

TABLES

LINES = TABLE_LINES

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

**

LOOP AT TABLE_LINES.

load_date = table_lines-TDLINE.

ENDLOOP.

*--


End--


Anyone Please Help?

9 REPLIES 9
Read only

athavanraja
Active Contributor
0 Likes
1,348

I dont know about debuggin smartforms, but i see some error in passing parameter to the function module read_text which can fix your issue.

change the language parameter value to 'EN' or sy-langu

its not 'E'

Hope this helps.

Regards

Raja

Read only

0 Likes
1,348

Hi Raja,

Its giving me a short dump if i put it as "EN".

I know it works with just "E" also..Coz i used it in some other forms.

Read only

0 Likes
1,348

Oh.

may be check table STXH for the existence of the text.

Regards

Raja

Read only

Former Member
0 Likes
1,348

I thing there is problem with the Name parameter declaration.

ID = E1EDKT1-TDID.

NAME = THEAD-TDNAME.

CALL FUNCTION 'READ_TEXT'

EXPORTING

ID = ID

LANGUAGE = 'E'

NAME = NAME

OBJECT = 'VBBK'

Have a look at the include LV55EF03 for (FORM GET_TEXT).

for further help.

Prabhu Rajesh.

Read only

Former Member
0 Likes
1,348

Hi Suzane,

In transaction SMARTFORMS look up the name of the generated function module for your smartform. Copy the name and go to transaction SE37. Get into the source code of the function module; via menu Goto -> Main Program and then find your piece of code by SEARCH 'VBELN1 = GS_HD_REF-ORDER_NUMB'. Put a breakpoint there and print your smartform. It will stop at the breakpoint.

Regards,

John.

Read only

0 Likes
1,348

If you are in 4.7 you can use smart break point in the source code fragments. See online help on BREAK-POINT statement, there is a form BREAK-POINT ID group. You can activate and deactivate such a break-point externally and they will stop the program only you are running the program.

Read only

0 Likes
1,348

Hi John,

Now i can Debug Smartforms.

Let me award you some points for that suggestion.

thanx.

Read only

0 Likes
1,348

Hi Sergei,

yes we are on Version 4.7.

But i did not understand which break-point are you talking about.If u dunt mind ,can u plz eloborate.

Offcourse my issue was solved.

Thanx.

Read only

0 Likes
1,348

Hi Suzane,

Haven't got any points though....

Regards,

John.