cancel
Showing results for 
Search instead for 
Did you mean: 

scripts

Former Member
0 Kudos

hi guru's,

if uwe want to add fields to standard script , how can we add without distrubibg driver program. where we can code this . is it in another program or we have to code in driver program. explane me the process. and it can add in detaile

thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

In SAPscript, you can use the PERFORM command in a window to

call an ABAP subroutine to:

- Obtain data from the database that is needed at print time

- Carry out complex ABAP calculations

- Format data

Syntax of the PERFORM statement in a form window <SCRIPT>

PERFORM GET_NAME IN PROGRAM ZREADCUSTOMER

USING &CUST&

CHANGING &NAME&

ENDFORM

-


-


&NAME&

Syntax for ABAP Sub Routine <ZREADCUSTOMER>

REPORT ZREADCUSTOMER.

TABLES:KNA1.

FORM GET_NAME TABLES INTTAB STRUCTURE ITCSY

OUTTAB STRUCTURE ITCSY.

READ TABLE INTTAB INDEX 1.

SELECT * FROM KNA1 WHERE KUNNR = INTTAB-VALUE.

IF SYSUBRC = 0.

READ TABLE OUTTAB INDEX 1.

MOVE KUNNR-NAME1 TO OUTTAB-VALUE.

MODIFY OUTTAB INDEX SY-TABIX.

ELSE.

-


ENDIF.

ENDFORM.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Surendra,

There are two possibilities :

1. Without driver program : As per SAP Standard print program,they get everything to the internal table,you need to display,when you see layout they are not using that field name in form,so you can simply use the field name in form painter.

2. if you have custom table,you need to display custom table data into form,then you can write perform command in layout ,do remember that ITCSY Strucrute.

final thing is - if it is major change then we will copy print program to custom program,then we will do changes.

Thanks

Seshu