Retrieving data without modifying
the original called program
* * Retrieving data without modifying the original called program * * Put this script code in your sapscripts * /: PERFORM GET_BARCODE IN PROGRAM ZSCRIPTPERFORM * /: USING &PAGE& * /: USING &NEXTPAGE& * /: CHANGING &BARCODE& * /: ENDPERFORM * / &BARCODE& * * Submitted by : SAP Basis, ABAP Programming and Other IMG Stuff * http://www.erpgreat.com * REPORT ZSCRIPTPERFORM. FORM GET_BARCODE TABLES IN_PAR STRUCTURE ITCSY OUT_PAR STRUCTURE ITCSY. DATA: PAGNUM LIKE SY-TABIX, "page number NEXTPAGE LIKE SY-TABIX. "number of next page READ TABLE IN_PAR WITH KEY 'PAGE'. CHECK SY-SUBRC = 0. PAGNUM = IN_PAR-VALUE. READ TABLE IN_PAR WITH KEY 'NEXTPAGE'. CHECK SY-SUBRC = 0. NEXTPAGE = IN_PAR-VALUE. READ TABLE OUT_PAR WITH KEY 'BARCODE'. CHECK SY-SUBRC = 0. IF PAGNUM = 1. OUT_PAR-VALUE = '|'. "First page ELSE. OUT_PAR-VALUE = '||'. "Next page ENDIF. IF NEXTPAGE = 0. OUT_PAR-VALUE+2 = 'L'. "Flag: last page ENDIF. MODIFY OUT_PAR INDEX SY-TABIX. ENDFORM. *-- End of Program
SAP Books
SAP Scripts Tips
ABAP Tips
Best regards,
All the site contents are Copyright © www.erpgreat.com
and the content authors. All rights reserved.
|