‎2007 Sep 27 9:29 AM
i have give a case to add a field to standard script.how can i acheive it.
‎2007 Sep 27 9:31 AM
in SE71 give name of standard script and click change.
It will ask you to save the copy of it, give a Z name and save it.
Now do the change in that script ant attach it to the driver program.
Regards,
Amit
Reward all helpful replies.
‎2007 Sep 27 9:33 AM
Hi
Below is the procedure to change a standard SAP script.
First step:
COPY std. form to Z-form.
Procedure: SE71 > utilities--> copy form client 000 to a Z-form (say ZF140_ACC_STAT01)and make changes according to your requirment.
Second step:
ATTACH Z-form to std. driver program
Procedure:
Go to transaction SPRO and do the following:
-> Financial Accounting
-> Global Settings
-> Correspondence
-> SAP Script based forms
-> Define Form names for correspondence for print.
-> Enter new entry with program name RFKORD10 and form name ZF140_ACC_STAT01. Press SAVE.
This is solve your complete requirement and even astonish your functional consultant.
PS: Reward points and close this question if you find this useful.
Regards.
‎2007 Sep 27 9:33 AM
Hi sai,
Goto tr SE71.
Enter a new screipt name.
Press create.
In the menu bar, there is a menu FORM.
Form --------> Copy from.
Enter the std script from which u want to copy.
THen ur new script will contains all the things preasent in Std one.
Then u can add or do ur modifications here.Pls reward if helpful.
‎2007 Sep 27 9:36 AM
hi
good
/: PERFORM GET_BARCODE IN PROGRAM QCJPERFO
/: USING &PAGE&
/: USING &NEXTPAGE&
/: CHANGING &BARCODE&
/: ENDPERFORM
/ &BARCODE&
In the textelement of sapscript i am calling subroutine GET_BARCODE present in program QCJPERFO and passing PAGE , NEXTPAGE as input parameters and Barcode as changing parameter (output)
REPORT QCJPERFO.
FORM GET_BARCODE TABLES IN_PAR STUCTURE ITCSY
OUT_PAR STRUCTURE ITCSY.
DATA: PAGNUM LIKE SY-TABIX, "page number
NEXTPAGE LIKE SY-TABIX. "number of next page
// Here in_par is table for input parameters is of type itcsy , so contains name and value as fields.
// 1st record of in_par in_par-name = PAGE in_par-value = the current page number
// (eq. 1 or 2 etc ... )
// 2nd record of in_par in_par-name = NEXTPAGE in_par-value = the Next page //number (eq. if page = 1 then next page = 2 etc ... )
// Here out_par is table for changing parameters ( output ) is of type itcsy .
// since i am passing only one changing parameter it contains only one record
// 1st record of out_par out_par-name = BARCODE out_par-value = ...(some value)
READ TABLE IN_PAR WITH KEY PAGE.
// reading the records from in_par where field name is PAGE , so first record is selected from our table
CHECK SY-SUBRC = 0.
PAGNUM = IN_PAR-VALUE.
// Page number is stored in variable PAGNUM
READ TABLE IN_PAR WITH KEY NEXTPAGE.
// reading the records from in_par where field name is NEXTPAGE , so second record is selected from our table
CHECK SY-SUBRC = 0.
NEXTPAGE = IN_PAR-VALUE.
// Next Page number is stored in variable NEXTPAGE
READ TABLE OUT_PAR WITH KEY BARCODE.
// reading the records from out_par where field name is BARCODE , so first record is selected from our table
CHECK SY-SUBRC = 0.
IF PAGNUM = 1.
OUT_PAR-VALUE = |. "First page
// if the variable PAGNUM value is one then i am storing | in OUT_PAR-VALUE ie, BARCODE
ELSE.
OUT_PAR-VALUE = ||. "Next page
// if the variable PAGNUM value is not one then i am storing || in OUT_PAR-VALUE ie, BARCODE
ENDIF.
IF NEXTPAGE = 0.
// if the variable NEXTPAGE value is Zero then i am storing L in OUT_PAR-VALUE ie, BARCODE
OUT_PAR-VALUE+2 = L. "Flag: last page
ENDIF.
MODIFY OUT_PAR INDEX SY-TABIX.
// After changing the field value of output table , i am modifying to reflect the changes.
// Now barcode contains the changed value ie, either | or || or L depending on the condition satified
ENDFORM.
thanks
mrutyun^