cancel
Showing results for 
Search instead for 
Did you mean: 

Dump while executing SAP Script

aasim_khan
Participant
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

aasim_khan
Participant
0 Kudos

Hey Shiba,

Thanks a TON, the second option worked out

I really appreciate it .

Answers (2)

Answers (2)

former_member585060
Active Contributor
0 Kudos

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

aasim_khan
Participant
0 Kudos

Changed from MAIN to MAIN_DATA, but it's still throwing the dump

Former Member
0 Kudos

Can you post what error it is showing exactly...If possible copy and pate the full dump error.

aasim_khan
Participant
0 Kudos

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.

Former Member
0 Kudos

Better you debug the driver program and check in which statement it is throwing the error. If you are getting the perticular statement or fn module then post a thread with that.

aasim_khan
Participant
0 Kudos

It is throwing error only in PERFORM write_layout_set USING 'MAIN' 'SET' 'BODY' 'MAIN'. statement. I have checked it by changing the sequence of the perform statement in my driver program. Rest all other statements are working fine.

Former Member
0 Kudos

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