‎2007 May 04 9:52 PM
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.
‎2007 May 04 9:54 PM
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
‎2007 May 04 9:57 PM
What is Thread-tdspras....
I am getting activation error after inserting your code.
‎2007 May 04 10:01 PM
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
‎2007 May 04 10:04 PM
‎2007 May 04 10:07 PM
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
‎2007 May 04 10:12 PM
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
‎2007 May 04 10:38 PM
‎2007 May 04 10:18 PM
Hi,
GIve & at the end of the variable also
&kna1-name1&
&kna1-ort01&
&kna1-land1&
&kna1-pstlz&
THanks,
Naren
‎2007 May 04 10:21 PM
Now output displays
&kna1-name1&
&kna1-ort01&
&kna1-land1&
&kna1-pstlz&
How do i fix this.
‎2007 May 04 10:25 PM
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
‎2007 May 04 10:28 PM
Nope It's still not fetching the data.instead i am getting the P1 letter also
‎2007 May 04 10:38 PM
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
‎2007 May 04 10:53 PM
I went to SE71 -
> Utilities -
> Printing Test.
I see a blank screen.I am not able to figure what was missing.