02-08-2011 3:02 PM
Hi All,
I have a output type for which Program,Form Routine and Script name are maintained in the NACE. This output type is used for sending email of script output as PDF file.Now the problem is when i am procesing this output type the values in the internal table are not getting printed in the script.
I found this by activating the debugger in both SAP Script and the Program.While debugging i can see the values in the program but the same is blank in the script.So the OTFDATA is not getting generated and hence the PDF contains no values.BUT the texts which are hardcoded in the SAP SCRIPT they appear in the PDF.
Can anyone please suggest any ideas.
Thanks in Advance.
02-08-2011 6:26 PM
Hi,
It is a typical issue in script. Here is the solution.
itcpo-tdprogram = sy-repid.
" It should be the program name where you declared your variables
CALL FUNCTION 'OPEN_FORM'
EXPORTING
...
OPTIONS = itcpo.
02-08-2011 3:31 PM
How are the variables declared? Locally or Globally? How did you reference them in the SAPScript?
02-08-2011 5:46 PM
What function are you using to print PDF documents? Have you passed the internal table in the function used? If possible please attach code here.
Good Luck.
02-08-2011 6:26 PM
Hi,
It is a typical issue in script. Here is the solution.
itcpo-tdprogram = sy-repid.
" It should be the program name where you declared your variables
CALL FUNCTION 'OPEN_FORM'
EXPORTING
...
OPTIONS = itcpo.
07-29-2015 2:15 PM
12-10-2015 4:31 PM
Thank you Asik, you are my savior. You should have a statue with a plaque saying: itcpo-tdprogram = sy-repid.
02-08-2011 8:18 PM
Seenu,
You need to declare the variable globally before the start of selection.
I believe your internal table is declared in a routine, which sapscript cannot take.
declare the same table before start of selection, you will the values in sapscript.
Syed
02-09-2011 6:05 AM
Hi all,
Thank u for your valuable suggestions.
@ Ashik Shameem
Thank u boss your suggestion resolved my problem.
Once again Thank u all.........