cancel
Showing results for 
Search instead for 
Did you mean: 

Format for a driver program in a new output type.

Former Member
0 Kudos

Hello,

I have created a SD invoice in sapscript and its driver program. The program has a sales invoice number parameter and contains a selection of data part, open form, write header and items, close form.

My requirement is to attach this program to a new output type. I have read the forum and I entered NACE, and created a new output type based on the standard RD00. In the processing routines I inserted my program, but in the Form routine I do no know what to insert. I think I have to modify the program format,no? I have entered the standard program and I see it has a specific format. Second, I have to make a connection between the output type and the sales invoice number parameter in my program.

Can you help me?

Thank you,

Efren

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello,

I find it hard to believe that no one has ever created a driver program for a new output type. I need at least some suggestions.

I noticed now that in the sapscript debugger, the elements are not filled, although in the driver program they are.

Efren

Former Member
0 Kudos

The solution was to insert:

itcpo-tdprogram = sy-repid.

CALL FUNCTION 'OPEN_FORM'

EXPORTING

...

  OPTIONS = itcpo.

Efren

Former Member
0 Kudos

Hello,

I tried to adapt my program in this way:

- create a form entry:

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.

- create a form processing:

FORM processing USING proc_screen.

gv_vbeln = nast-objky.

perform sapscript.

ENDFORM.

I also inserted include RLB_INVOICE_DATA_DECLARE.

In form sapscript i have my initial program that reads data based on gv_vbeln and performs open_form,start_form, write_form, end_form and close_form.

In Nace, I attached my program and form entry. When i enter VF02 and try to print preview a billing document, I do not see any data in my form, only the windows and the texts. I have put a breakpoint in my program and the data is populated but it does not appear in the issue output.

I need help.

Thank you,

Efren