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

SAP-Script Error

Former Member
0 Likes
1,217

I was trying to develop a sample form. Initially I created Pages, Windows, Paragraph formats in SE71. Written a Print program in SE38.Upon execution I am getting runtime error.How do I fix the problem.

Print Program

Tables: kna1.

select-options: custno for kna1-kunnr.

CALL FUNCTION 'OPEN_FORM'.

EXPORTED FORM AND LANGUAGE.

SELECT * FROM KNA1 WHERE KUNNR IN CUSTNO.

CALL FUNCTION 'START_FORM'

CALL FUNCTION 'WRITE_FORM'

CALL FUNCTION 'END_FORM'

ENDSELECT.

CALL FUNCTION 'CLOSE_FORM'

RUN TIME ERROR ANALYSIS:

THE REASON FOR THIS EXCEPTION IS THE CALL TO THE FUNCTION MODULE 'START_FORM' IS INCORRECT.

THE FUNCTION MODULE INTERFACE ALLOWS YOU TO SPECIFY ONLY FIELDS OF A PARTICULAR TYPE UNDER 'LANGUAGE'. THE FIELD 'SY-LANGU' SPECIFIED HERE HAS A DIFFERENT FIELD TYPE.

13 REPLIES 13
Read only

Former Member
0 Likes
1,188

Hi,

Looks like the data type that you are passing to the FM START_FORM is not matching the interface definition..

Try this..

DATA: V_LANG LIKE THEAD-TDSPRAS.

  • Assign the language..

V_LANG = SY-LANGU.

CALL FUNCTION 'START_FORM'

EXPORTING

LANGUAGE = V_LANG

..........

Thanks,

Naren

Read only

0 Likes
1,188

What is Thread-tdspras....

I am getting activation error after inserting your code.

Read only

Former Member
0 Likes
1,188

Hi,

THEAD-TDSPRAS is the data type used for language in the FM interface for START_FORM FM..

Check the FM for details..

Thanks,

Naren

Read only

0 Likes
1,188

Narendran.

Still getting the same run time error.

Read only

Former Member
0 Likes
1,188

Hi,

Hmm...The run time error is because of this FM..

ALso the language is an optional parameter..Don't pass this parameter to the FM.

Thanks,

Naren

Read only

0 Likes
1,188

My Scripts has 5 windows. In the address

I ve given

&kna1-name1,

&kna1-ort01,

&kna1-land1,

&kna1-pstlz.

In the output instead of getting the details I am getting the same text..How to fix this

Read only

0 Likes
1,188

How can I fix this problem

Read only

Former Member
0 Likes
1,188

Hi,

GIve & at the end of the variable also

&kna1-name1&

&kna1-ort01&

&kna1-land1&

&kna1-pstlz&

THanks,

Naren

Read only

0 Likes
1,188

Now output displays

&kna1-name1&

&kna1-ort01&

&kna1-land1&

&kna1-pstlz&

How do i fix this.

Read only

Former Member
0 Likes
1,188

Hi,

Are you giving the paragraph format also??In the left hand side column..

Let's say if you have a paragraph format P1..

P1 &KNA1-NAME1&

Thanks,

Naren

Read only

0 Likes
1,188

Nope It's still not fetching the data.instead i am getting the P1 letter also

Read only

Former Member
0 Likes
1,188

Hi,

Not sure what you are missing in the sapscript..

Check an existing sap script like MEDRUCK or the invoice form RVINVOICE01

of how they are displaying...

Thanks,

Naren

Read only

0 Likes
1,188

I went to SE71 -


> Utilities -


> Printing Test.

I see a blank screen.I am not able to figure what was missing.