11-22-2004 11:19 AM
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.
*--
Anyone Please Help?
11-22-2004 11:32 AM
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
11-22-2004 11:44 AM
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.
11-22-2004 12:04 PM
Oh.
may be check table STXH for the existence of the text.
Regards
Raja
11-22-2004 1:49 PM
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.
11-22-2004 3:15 PM
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.
11-22-2004 8:00 PM
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.
11-23-2004 1:06 PM
Hi John,
Now i can Debug Smartforms.
Let me award you some points for that suggestion.
thanx.
11-23-2004 1:14 PM
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.
11-23-2004 1:19 PM