on 10-23-2008 6:49 AM
Hello,
My program is throwing a dump while executing this script. Request you all to please help me in removing this.
/E MAIN_DATA
/: BOX FRAME 10 TW
PA To, ,,Invoice No. & Date,, &JVBRK-VBELN& &JVBRK-FKDAT&
PA M/s &JKNA1-NAME1(35)&,,Your P.O. No.,, &JVBAK-BSTNK&
/* &JKNA1-NAME2(35)&,,Truck No.,, &JLIKP-TRAID&
PA &JKNA1-NAME2(35)&,,Truck No.,, &WRK_VEHNO&
PA &JKNA1-ORT01(20)&,,LR No.& Date,, &WRK_LRNO& &JJ_1IEXCDTL-EXDAT&
/* &JKNA1-REGIO(20)&,,Net Qty.in kgs.,, &JLIPS-NTGEW(10.3L)&
PA &JKNA1-REGIO(20)&,,Net Qty.in kgs.,, &W_NETWT(12.3L)& KG
PA ,,Material,, &JVBRP-ARKTX(30)&
My Report has the following code:
FORM write_to_layout_set.
PERFORM write_layout_set USING 'MAIN' 'SET' 'BODY' 'MAIN'.
PERFORM write_layout_set USING '' 'SET' 'BODY' 'LOGO'.
PERFORM write_layout_set USING '' 'SET' 'BODY' 'HEADER2'.
PERFORM write_layout_set USING 'HEADER' 'SET' 'BODY' 'TEST2'.
PERFORM write_layout_set USING 'FOOTER' 'SET' 'BODY' 'FOOTER2'.
PERFORM write_layout_set USING '' 'SET' 'BODY' 'SIGN'.
ENDFORM. " WRITE_TO_LAYOUT_SET
FORM write_layout_set USING wrk_element
wrk_function
wrk_type
wrk_window.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = wrk_element
function = wrk_function
type = wrk_type
window = wrk_window
IMPORTING
PENDING_LINES =
EXCEPTIONS
element = 1
function = 2
type = 3
unopened = 4
unstarted = 5
window = 6
OTHERS = 7.
*----
+
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
*----
+
ENDFORM. " WRITE_LAYOUT_SET
As per my first reply you have to change the perform
PERFORM write_layout_set USING 'MAIN' 'SET' 'BODY' 'MAIN'.
to
PERFORM write_layout_set USING 'MAIN_DATA' 'SET' 'BODY' 'MAIN'.
and now check and one more thing whether this main_data element is in main window or not just check.
if it does not work then just change &W_NETWT(12.3L)& to
&W_NETWT& and check
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
What Shiba said is correct change the TEXT ELEMENT name, Further you can activate Debugger for the SAPScript and check for the values for the variables under Text element MAIN_DATA.
Regards
Bala Krishna
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am not able to send you the screenshot, will send you the error msg.
Short text
The current statement is only defined for character-type data objects.
What happened?
Error in the ABAP Application Program
The current ABAP program "SAPLSTXV" had to be terminated because it has come across a statement that unfortunately cannot be executed.
As per your posting I can only see one text element named MAIN_DATA. But in perform statement you are passing the element which is not matching with this name.
e.g.
PERFORM write_layout_set USING 'MAIN' 'SET' 'BODY' 'MAIN'.
Here it should be MAIN_DATA instead of MAIN.
It seems to me the remaining performs are commented. If not just create the proper text element and use in perform.
Regards
Shiba Prasad Dutta
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.