Skip to Content
author's profile photo Former Member
Former Member

Problem in data printing in SAP Script

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Best Answer
    Posted on Feb 08, 2011 at 06: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.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 08, 2011 at 03:31 PM

    How are the variables declared? Locally or Globally? How did you reference them in the SAPScript?

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 08, 2011 at 05: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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 08, 2011 at 08: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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 09, 2011 at 06: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.........

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.