This website is not affiliated with, sponsored by, or approved by SAP AG.

New driver program for output type

Development SAPscript/ Smartforms

Moderators: Snowy, thx4allthefish, YuriT, Gothmog

New driver program for output type

Postby efren23 » Thu Mar 15, 2012 4:52 pm

Hello,

I have created a SD invoice form in sapscript and its driver program. The program contains a selection of data part, open form, write header and items, close form. I also created form entry and form processing( I looked in a standard driver program).

My requirement is to attach this program to a new output type. I entered NACE, and created a new output type based on the standard RD00. In the processing routines I inserted my program, and in the form routine I inserted form entry.
I am pasting the code for form entry and form processing:

Code: Select all
FORM ENTRY USING return_code us_screen.
   CLEAR retcode.
   xscreen = us_screen.
   PERFORM processing USING us_screen.
   CASE retcode.
     WHEN 0.
       return_code = 0.
     WHEN 3.
       return_code = 3.
     WHEN OTHERS.
       return_code = 1.
   ENDCASE.
ENDFORM.

FORM processing USING proc_screen.
gv_vbeln = nast-objky.
perform sapscript.
ENDFORM.


In form sapscript I am selecting data based on gv_vbeln and perform open form, write header and items, close form.
I also inserted include RLB_INVOICE_DATA_DECLARE, that contains declaration for return code and others.

My problem is when I enter VF02(for example) and select my new output type and click on issue output to.
The form is printed, but without any data. I can only see the columns and the texts.
I inserted a breakpoint in my program and the structures that should appear in the form are filled.The program started in se38 prints the data.
So it is a problem with the output type and probably with the format of my driver program. Maybe I have to adapt something.

Can you help me?

Thank you,
Efren
efren23
 
Posts: 5
Joined: Fri Apr 15, 2011 12:58 am

Re: New driver program for output type

Postby efren23 » Fri Mar 16, 2012 3:07 pm

Hello,

There is no one who can help me?I will rephrase the question. I created a driver program and its corresponding sapscript form and attached them to a new output type. When I print or print preview a billing document, the form is printed without any data(which is filled in the program, cause I saw it in the debugger). Only the column texts and lines are printed.


Thank you,
Efren
efren23
 
Posts: 5
Joined: Fri Apr 15, 2011 12:58 am

Re: New driver program for output type

Postby Gothmog » Mon Mar 19, 2012 5:33 am

efren23 wrote:I inserted a breakpoint in my program and the structures that should appear in the form are filled.The program started in se38 prints the data.

When running it in SE38, I guess you're filling gv_vbeln and calling form sapscript in a START-OF-SELECTION event? And the form prints correctly?
Your breakpoint with all data filled, is it for an actual output, or when calling the program in SE38?
68 74 74 70 3a 2f 2f 74 69 6e 79 75 72 6c 2e 63 6f 6d 2f 62 64 6f 37 6d 77 67
Gothmog
 
Posts: 1941
Joined: Wed Sep 12, 2007 4:46 am
Location: Probably not home


Return to SAPscript/Smartforms

Who is online

Users browsing this forum: No registered users and 4 guests





loading...


This website is not affiliated with, sponsored by, or approved by SAP AG.