on 07-12-2007 8:48 AM
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.