EHP4 for SAP ERP 6.0 April 2010 2010 English
Historical Description Building Block 102 – Manual Step
SAP AG Dietmar-Hopp-Allee 16 69190 Walldorf Germany
SAP Best Practices
NF-e Smart Forms: Configuration Guide
Copyright © Copyright 2009 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors. Microsoft, Windows, Excel, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x, System z, System z10, System z9, z10, z9, iSeries, pSeries, xSeries, zSeries, eServer, z/VM, z/OS, i5/OS, S/390, OS/390, OS/390, OS/400, OS/400, AS/400, AS/400, S/390 S/390 Parallel Parallel Enterprise Enterprise Server, PowerVM, PowerVM, Power Power Architect Architecture, ure, POWER6+, POWER6+, POWER6, POWER6, POWER5+, POWER5+, POWER5, POWER5, POWER, POWER, OpenPowe OpenPower, r, PowerPC, PowerPC, BatchPipe BatchPipes, s, BladeCente BladeCenter, r, System System Storage, GPFS, HACMP, RETAIN, DB2 Connect, RACF, Redbooks, OS/2, Parallel Sysplex, MVS/ESA, AIX, Intelligent Miner, WebSphere, Netfinity, Tivoli and Informix are trademarks or registered trademarks of IBM Corporation. Linux is the registered trademark of Linus Torvalds in the U.S. and other countries. Adobe, the Adobe logo, Acrobat, PostScript, and Reader are either trademarks or registered trademarks of Adobe Systems Incorporated Incorporated in the United States States and/or other countries. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, HTML, XML, XHTML XHTML and W3C are trademarks trademarks or registered registered trademarks trademarks of W3C®, World Wide Web Consortium, Massachusetts Institute of Technology.Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. SAP, R/3, SAP NetWeaver, NetWeaver, Duet, PartnerEdge PartnerEdge,, ByDesign, ByDesign, SAP Business Business ByDesign, ByDesign, and other other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries. Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius, and other Business Objects products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Business Objects S.A. in the United States and in other countries. Business Objects is an SAP company. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties warranties for SAP Group products products and services services are those that are set forth in the express warranty statements statements accompanying accompanying such products products and services, services, if any. Nothing herein should be construed construed as constituting an additional warranty.
© SAP AG
Page 2 of 10
NF-e Smart Forms: Configuration Guide
SAP Best Practices
Icons Icon
Meaning Caution Example Note Recommendation Syntax External Process Business Process Alternative/Decision Choice
Typographic Conventions Type Style
Description
Example text
Words Words or charac characters ters that appear appear on the screen. screen. These include include field field names, screen titles, pushbuttons as well as menu names, paths and options. Cross-references to other documentation.
Example text
Emphasized words or phrases in body text, titles of graphics and tables.
EXAMPLE PLE TEXT
Names ames of elem elemen ents ts in the the sys syste tem m. The These se inc include lude rep repor ortt nam names es,, pr progra ogram m names, transaction codes, table names, and individual key words of a program programmin ming g languag language, e, when when surrou surrounde nded d by body body text, text, for example, example, SELECT and INCLUDE.
Example text
Screen output. This includes file and directory names and their paths, messages, source code, names of variables and parameters as well as names of installation, upgrade and database tools.
EXAMPLE TEXT
Keys on the keyboard, for example, function keys (such as F2) or the ENTER key.
Example text
Exact user entry. These are words or characters that you enter in the system exactly as they appear in the documentation.
© SAP AG
Variable user entry. Pointed brackets indicate that you replace these words and characters with appropriate entries.
Page 3 of 10
SAP Best Practices
NF-e Smart Forms: Configuration Guide
Content Historical Description........ .................. ................... ................... ................... ................... ................... ................... ................... ................... ................... ............... .......... ......... .......5 1 Configuration: Historical Description......... ................... ................... ................... ................... ................... ................... .................. .................. .............. .......5 .1.1 Create Function Group ZLIVRO_DIARIO ZLIVRO_DIARIO......... .................. ................... ................... ................... ................... ................... ................ ......... ... 5 .1.2 Create Function Z_1B_HISTORICAL_DESCRIPTION Z_1B_HISTORICAL_DESCRIPTION......... ................... ................... ................... .................. ............. ......... .... 5 .1.3 Copy Program RGGBS000 RGGBS000......... .................. ................... ................... ................... ................... ................... ................... ................... .............. ......... ....... ..7 .1.4 Change the client-specific user exits in FI-SL.......... ................... ................... ................... ................... ................... .................. ............ ... 9
© SAP AG
Page 4 of 10
NF-e Smart Forms: Configuration Guide
SAP Best Practices
Historical Description 1 Con Configur figuration ation:: Histor Historical ical Desc Descriptio ription n .1.1 Cre Create ate Fun Functio ction n Group Group ZLIVR ZLIVRO_ O_DIA DIARIO RIO Procedure 1. Access the activity activity using one of the following following navigation navigation options: options: Transaction Code 2.
SE80
On the Object Navigator s Navigator screen, click on
button.
3. In the combo combo box, select select presented:
. A blank blank field field under under this combo combo box is
4. In the the blank blank field field,, enter enter ZLIV ZLIVRO_ RO_DIA DIARIO RIO.. 5. Click Click on
> butto button. n.
6. Confirm Confirm the the pop-up pop-up scree screen n to create create the functi function on group. group. 7.
In the Package Builder: Create Package pop-up window, make the following entries: Field name
Description
Short Description
8. Pres Press s
User action and values
Comment
Livro Diário
> butt button on..
9. Choo Choose se pack packag age e Z00 Z001 1 10. A change request request is required required to save the function function module into into the system.
.1.2 .1 .2 Crea Create te Fu Func ncti tion on Z_1B_HISTORICAL_DESCRIPTION Procedure 1. Access the activity activity using one of the following following navigation navigation options: options: Transaction Code
SE37
2. Enter the function function module: Z_1B_HISTO Z_1B_HISTORICA RICAL_DES L_DESCRIP CRIPTION TION
© SAP AG
Page 5 of 10
NF-e Smart Forms: Configuration Guide
SAP Best Practices
3.
Click on
4. In the the pop-up pop-up wind window, ow, ente enterr the func function tion group group ZLIVRO_DIARIO and short text HISTORICAL DESCRIPTION . The new function will be created. 5.
Choose the Source-code tab page and insert the following source-code tables: vbrp, vbak, tvakt, kna1, lfa1, skat, t001, mseg, t156t, t003t. data: hlp_text(100) type c, account_name(20) type c. e_sgtxt = line_bseg-sgtxt.
* Text empty ? check line_bseg-sgtxt = space. clear e_sgtxt. * Document type select single * from t003t where spras = sy-langu and blart = line_bkpf-blart. e_sgtxt(20) = t003t-ltext. case line_bseg-koart. when 'D'. select single * from kna1 where kunnr = line_bseg-kunnr. account_name = kna1-sortl. when 'K'. select single * from lfa1 where lifnr = line_bseg-lifnr. account_name = lfa1-sortl. when others. select single * from t001 where bukrs = line_bseg-bukrs. select single * from skat where spras = sy-langu and ktopl = t001-ktopl and saknr = line_bseg-hkont. account_name = skat-txt20. endcase. hlp_text = e_sgtxt. concatenate hlp_text account_name into e_sgtxt separated by ' '. hlp_text = e_sgtxt. * text-001 = free choice, but should be no longer than 10 *
concatenate hlp_text text-001 into e_sgtxt separated by ' '. concatenate hlp_text line_bkpf-xblnr into e_sgtxt separated by ' '.
6.
Then, en, choose Goto > Text Elements > Text Symbol
7. In the Text Text symb symbols ols tab page, page, make make the the followin following g entry: entry: Field name
User action and values
Symbol
001
Text
e.g. 'como ref.'
8. Click Click on 9.
Description
Comment
ate> then click click on back back button button
In the Import tab Import tab page, make the following entries:
© SAP AG
Page 6 of 10
NF-e Smart Forms: Configuration Guide
SAP Best Practices
PARAMETER NAME
TYPING
ASSOCIATED TYPE
LINE_BSEG
TYPE
BSEG
LINE_BKPF
TYPE
BKPF
10. 10. In the the Export tab Export tab page, make the following entries: PARAMETER NAME
TYPING
ASSOCIATED TYPE
E_SGTXT
TYPE
CHAR50
11. Click Click on
ate>
.1.3 .1. 3 Co Copy py Pr Prog ogra ram m RGG RGGBS BS00 000 0 Procedure 1. Access the activity activity using one of the following following navigation navigation options: options: Transaction Code
SE38
2.
In the Program field, enter RGGBS000 enter RGGBS000 and click on
3.
In the Target Program field, enter ZRGGBS000 enter ZRGGBS000 and choose COPY
4. In the the nex nextt poppop-up up wind window ow,, mark mark ALL flags and click on COPY button. 5. In the next next pop-up pop-up windo window, w, enter enter the follow following ing targets targets::
© SAP AG
Page 7 of 10
NF-e Smart Forms: Configuration Guide
SAP Best Practices
6.
Incl Includ udee-Na Name me Sou Sourc rce e
Incl Includ udee-Na Name me Tar Targe gett
FGBBGD00
FGBBGD001
RGGBS_PS_TITLES
RGGBS_PS_TITLES1
In the ABAP ABAP Editor: Editor: Initial Initial Screen screen, choose the on
radio button and click
.
7. In the source source-cod -code, e, search search for the follow following ing progra program m lines: lines: * begin of insertion of insertion
exits-name = 'U200' 'U200'. . exits-param = c_exit_param_field. exits-title exits-title = text text-200 200. . APPEND exits. * end of end of insertion insertion
"Cons. transaction type "from xref1/2
8. After “end of of insertion” insertion”of of exits exits name name U200, U200, enter enter the code below: * >>>>> BEGIN INSERT exits-name = 'HISTO'. exits-param = c_exit_param_none. exits-title = text-103. "Historical description append exits. * >>>>> END INSERT
9. In the sourc source-co e-code, de, search search for for the follow following ing progra program m line: line: FORM u200 USING e_rmvct TYPE bseg-bewar. PERFORM xref_to_rmvct USING bkpf bseg 1 CHANGING e_rmvct. ENDFORM. ENDFORM . 10. After ENDF ENDFORM, ORM, enter enter the code below: below: * >>>>> BEGIN INSERT FORM HISTO. CALL FUNCTION 'Z_1B_HISTORICAL_DESCRIPTION'
© SAP AG
Page 8 of 10
NF-e Smart Forms: Configuration Guide
SAP Best Practices
EXPORTING LINE_BSEG = BSEG LINE_BKPF = BKPF IMPORTING E_SGTXT = BSEG-SGTXT EXCEPTIONS OTHERS = 1. ENDFORM. * >>>>> END INSERT
11. Click Click on
te>
.1.4 Chang Change e the client client-spec -specific ific user exits in FI-SL FI-SL Procedure 1. Access the activity activity using one of the following following navigation navigation options: options: Transaction Code
GCX2
2. Dele Delete te the the curr curren entt program exit assigned to Application Area GBLS 3. And And ass assign ign the the new new progr program am ZRGGBS000
© SAP AG
Page 9 of 10
SAP Best Practices
NF-e Smart Forms: Configuration Guide
4. Save Save your your entr entrie ies. s.
© SAP AG
Page 10 of 10