cancel
Showing results for 
Search instead for 
Did you mean: 

Driver program in SAP Script

Former Member
0 Kudos

Dear all

I want to make a driver program in sapscripts for Delivery note...since i am new to this topic then also i am done with the layout . please help me the program. i want the example code which is easy to read and understand.

thanks in advance...

Mohit

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

RLE_DELNOTE is Print program

Regards,

Nageswar

Former Member
0 Kudos

RLE_DELNOTE is for SMARTFORMS

Answers (3)

Answers (3)

Former Member
0 Kudos

thanks sdn

Former Member
0 Kudos

Standard print program is:

SDPACKLI

Standard SAPscript form is:

SD_PACKING_LIST

IMG config:

Logistics Execution | Shipping | Basic Shipping Functions | Output Control | Output Determination | Maintain Output Determination for Outbound Deliveries | Maintain Output Types

Former Member
0 Kudos

Hi Mohit,

Go through the following code.

START-OF-SELECTION.

PERFORM GET_DATA CHANGING WA_MARC

I_MARC.

PERFORM GET_DATA1 CHANGING I_MARC

I_VBAP.

CALL FUNCTION 'OPEN_FORM'

EXPORTING

  • APPLICATION = 'TX'

  • ARCHIVE_INDEX =

  • ARCHIVE_PARAMS =

  • DEVICE = 'PRINTER'

  • DIALOG = 'X'

FORM = 'ZPAVSCRIPT1'

LANGUAGE = SY-LANGU .

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

LOOP AT I_VBAP INTO WA_VBAP.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

ELEMENT = 'MAIN'

FUNCTION = 'APPEND'

TYPE = 'BODY'

WINDOW = 'MAIN’.

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDLOOP.

CALL FUNCTION 'CLOSE_FORM' .

IF sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

In the script layout,create a MAIN window,in that create a Text element (i named it MAIN in my program).

call these functions using button "Pattern" in toolbar.

In the above forms Get_data & get_data1,write the required code.....

This is the example code to b written in driver program...

Dont forget to reward points if helpful....

Pavan.