743361 Enhanced Nota Fiscal Printing Configuration

9
743361 Enhanced Nota Fiscal Printing Configuration Symptom Several features have been introduced to the nota fiscal printing configuration, which enable you to configure and print notas fiscaís more flexibly, including: The printer determination is enhanced by an additional optional key field (beside company code, business place and NF form). This allows users to assign more than one form to the same nota fiscal type. You can now directly assign an output device to the combination of company code, business place, NF form, and fourth key field. If an external number range interval is assigned, it is now possible to enter a NF number manually. For further details, see the document attached to this note. CORRECTION OF THIS NOTE (24.03.05): At release 4.70, the screen field for entering the printer number is only 7 characters long (instead of 30 characters). For correction of this error, run the screen painter (transaction SE54) for program SAPLJ1BV and screen 281 and mark the readiobutton for the element list. Goto J_1BB2V-PRNTER and enhance the visible length from 7 to 30. CORRECTION OF THIS NOTE (23.03.05): The solution is wroking incompletely for release 46.C. Please apply the corrections you find below. CORRECTION OF THIS NOTE (22.11.04): The description of the BADI creation is wrong. This error was corrected now. CORRECTION OF THIS NOTE (18.01.05): The name of the fixed values of the domain J_1BPRFIELDS as described below is wrong (the solution delivered through SPs is correct). The correct fixed values are SHPPT and DUEDATE (instead of VSTEL and DATE). Other terms Brazil, nota fiscal, print, printing, printer, NF number, nota fiscal number, J1B1N, J1B2N, J1B3N, J1B1, J1B2, J1B3 Reason and Prerequisites Development Request This note is only relevant for companies with Brazilian company codes. Solution Please apply the relevant support package. You can also implement the note manually. However, before implementing source code corrections, the following steps have to be performed manually (as not others stated, create all DDIC elements in the development class J1BA). a) Creation of domain J_1BPRFIELDS

description

743361

Transcript of 743361 Enhanced Nota Fiscal Printing Configuration

Page 1: 743361 Enhanced Nota Fiscal Printing Configuration

743361 Enhanced Nota Fiscal Printing Configuration

Symptom

Several features have been introduced to the nota fiscal printing configuration, which enable you to configure and print notas fiscaís more flexibly, including:

The printer determination is enhanced by an additional optional key field (beside company code, business place and NF form). This allows users to assign more than one form to the same nota fiscal type.

You can now directly assign an output device to the combination of company code, business place, NF form, and fourth key field.

If an external number range interval is assigned, it is now possible to enter a NF number manually.

For further details, see the document attached to this note.

CORRECTION OF THIS NOTE (24.03.05): At release 4.70, the screen field for entering the printer number is only 7 characters long (instead of 30 characters). For correction of this error, run the screen painter (transaction SE54) for program SAPLJ1BV and screen 281 and mark the readiobutton for the element list. Goto J_1BB2V-PRNTER and enhance the visible length from 7 to 30.

CORRECTION OF THIS NOTE (23.03.05): The solution is wroking incompletely for release 46.C. Please apply the corrections you find below.

CORRECTION OF THIS NOTE (22.11.04): The description of the BADI creation is wrong. This error was corrected now.

CORRECTION OF THIS NOTE (18.01.05):The name of the fixed values of the domain J_1BPRFIELDS as described below is wrong (the solution delivered through SPs is correct). The correct fixed values are SHPPT and DUEDATE (instead of VSTEL and DATE).

Other terms

Brazil, nota fiscal, print, printing, printer, NF number, nota fiscal number, J1B1N, J1B2N, J1B3N, J1B1, J1B2, J1B3

Reason and Prerequisites

Development RequestThis note is only relevant for companies with Brazilian company codes.

Solution

Please apply the relevant support package.You can also implement the note manually. However, before implementing source code corrections, the following steps have to be performed manually (as not others stated, create all DDIC elements in the development class J1BA).

a) Creation of domain J_1BPRFIELDS

  Short text: Grouping fields  Data type: CHAR  No.characters: 10  Value Range:    fixed values    short text    SHPPT           shipping point    DUEDATE         duedate (from)

b) Creation of data element J_1BPRFIELDS

Page 2: 743361 Enhanced Nota Fiscal Printing Configuration

  Short text: Dynamic key for printing configuration  Data type: J_1BPRFIELDS  Field label:    length     field label    8          Dyn. key    11         Dynamic key    29         Dynamic key for print config.    11         Dynamic key

c) Creation of function module J_1BNF_GET_PRINT_CONF

  Short text: Determination of the print configuration  Function group: J1BC  Import Parameter  : HEADERDATA         TYPE  J_1BNFDOC  Export Parameter  : PRINT_CONF         TYPE  J_1BB2  Changing Parameter: CV_NUMBERING_BLOCK TYPE  C  (optional)  Pass value for none of the parameters flagged.  Exception: ERROR (Error in the Nota Fiscal Printing configuration)

d) Creation of function module J_1B_NF_NUMBER_CHECK

  Short text: Check NF number consistency  Function group: J1BC  Import Parameter  : IS_HEADER_DATA     TYPE  J_1BNFDOC  Export Parameter  : EV_WRONG_NFNUM_ID  TYPE  XFELD  Pass value for both, import and export parameter flagged.  Exception: NUMBER_CHECK_ERROR (Error raised from Number Check)

e) Modification of function module J_1B_NF_NUMBER_GET_NEXT

  Import parameter added:    Parameter name      Type     Assoc.type    Opt..    Pa...    HEADERDATA          TYPE    J_1BNFDOC      X        X

f) Modification of function module J_1B_FORM_DETERMINE

  Import parameter added:    Parameter name      Type     Assoc.type    Opt..    Pa...    HEADERDATA          TYPE    J_1BNFDOC      X        X

g) Enhancement of table J_1BB2

  Fields:    field        key  init  data elem.   check tab.    NUMBERRANGE            NRNR         NRIV (*, see below)    FIELDNAME              J_1BPRFIELDS    PRNTER                  RSPOPNAME    TSP03 (key field/cand. - 1:CN)  (*):  press 'generate proposal' and accept; for NRIV-OBJECT unmark        flag 'generic' and enter 'J_1BNFNUMB' for constant; for        NRIV-SUBOBJECT unmark also flag 'generic' and enter        J_1BB2DYNAMIC-SUBOBJ; non-key-field/candidates - 1:CN

h) Creation of table J_1BB2DYNAMIC

  Short text: NF Print Configuration dependent on dynamic key  Development class: J1BA  Delivery class: C  Display/Maintenance allowed  Fields:    field        key  init  data elem.   check tab.    MANDT        X          MANDT        T000  (key field/cand. - 1:CN)    BUKRS        X          BUKRS        J_1BB2 (*, see below)    BRANCH      X          J_1BBRANC_   J_1BB2 (*, see below)    FORM        X          J_1BFORM     J_1BB2 (*, see below)    VALUE        X          J_1BVALUE    SUBOBJ                  J_1BSUBOBJ  J_1BAR (key field/cand. - 1:CN)

Page 3: 743361 Enhanced Nota Fiscal Printing Configuration

    NUMBERRANGE            NRNR         NRIV   (**, see below)    TOTLIH                  J_1BTOTLIH    TOTLIL                  J_1BTOTLIL    FATURA                  J_1BFATURA    SERIES                  J_1BSERIES    SUBSER                  J_1BSUBSER    PRNTER                  RSPOPNAME    TSP03 (key field/cand. - 1:CN)  Technical Settings:    Data class: APPL2    Size category: 0    Buffering switched on; fully buffered    Log data changes  Enhancement category: Can be enhanced, char-type or numeric-type  (*) : press 'generate proposal' and accept; key field/cand. - 1:CN  (**): press 'generate proposal' and accept; for NRIV-OBJECT unmark        flag 'generic' and enter 'J_1BNFNUMB' for constant; for        NRIV-SUBOBJECT unmark also flag 'generic' and enter        J_1BB2DYNAMIC-SUBOBJ; not specified - 1:CN

i) Enhancement of structure KOMB (enter new component)

  Components:    component        RT  component type    OUTPUT_DEV           RSPOPNAME

j) Change the view J_1BB2V

  Add the fields:    view field    table    field    NUMBERRANGE   J_1BB2   NUMBERRANGE    FIELDNAME     J_1BB2   FIELDNAME    PRNTER        J_1BB2   PRNTER  Create the overview view 280 and the single screen 281 again.  Goto the flow logic of screen 280 and delete the following lines:.......   MODULE LISTE_INIT_WORKAREA.   CHAIN.    FIELD J_1BB2V-BUKRS .    FIELD J_1BB2V-BRANCH .    FIELD J_1BB2V-FORM .    FIELD J_1BB2V-SUBOBJ .        <-- DELETE THIS LINE    FIELD J_1BB2V-TOTLIH .        <-- DELETE THIS LINE    FIELD J_1BB2V-TOTLIL .        <-- DELETE THIS LINE    FIELD J_1BB2V-FATURA .        <-- DELETE THIS LINE    FIELD J_1BB2V-FORMTX .        <-- DELETE THIS LINE    FIELD J_1BB2V-SUBOTX .        <-- DELETE THIS LINE    FIELD J_1BB2V-SERIES .        <-- DELETE THIS LINE    FIELD J_1BB2V-SUBSER .        <-- DELETE THIS LINE    FIELD J_1BB2V-BUTXT .         <-- DELETE THIS LINE    FIELD J_1BB2V-NAME .          <-- DELETE THIS LINE    FIELD J_1BB2V-NUMBERRANGE .   <-- DELETE THIS LINE    FIELD J_1BB2V-FIELDNAME .    FIELD J_1BB2V-PRNTER .        <-- DELETE THIS LINE  Adjust the screen 280 and 281 according the screenshots in the  Adobe document "View.PDF" attached to this note.

k) Create the maintenance view J_1BB2DYNAMICV.

  Short text: Maintanance view J_1bb2dynamic  Enter table J_1BB2DYNAMIC. Click on 'Relationships' and mark  J_1BB2, NRIV and TSP03 on the popup.  Fields:  View field   Table name      Field name    Maint.attribute  MANDT        J_1BB2DYNAMIC   MANDT  BUKRS        J_1BB2DYNAMIC  BUKRS         S  BRANCH      J_1BB2DYNAMIC   BRANCH        S  FORM        J_1BB2DYNAMIC   FORM          S  VALUE        J_1BB2DYNAMIC   VALUE

Page 4: 743361 Enhanced Nota Fiscal Printing Configuration

  SUBOBJ       J_1BB2DYNAMIC   SUBOBJ  NUMBERRANGE  J_1BB2DYNAMIC   NUMBERRANGE  TOTLIH      J_1BB2          TOTLIH        S  TOTLIL      J_1BB2          TOTLIL        S  FATURA      J_1BB2          FATURA        S  SERIES       J_1BB2DYNAMIC   SERIES  SUBSER       J_1BB2DYNAMIC   SUBSER  PRNTER       J_1BB2DYNAMIC   PRNTER  FIELDNAME    J_1BB2          FIELDNAME     S

  Use table maintenance generator for creating the dialogs:  Authorisation group: JC  Function group J1BV  Maintenance type: 2 steps  Overview screen: 282; single screen 283  Goto the flow logic of screen 282 and delete the following lines:......   MODULE LISTE_INIT_WORKAREA.   CHAIN.    FIELD J_1BB2DYNAMICV-VALUE .    FIELD J_1BB2DYNAMICV-SUBOBJ .          <-- DELETE THIS LINE    FIELD J_1BB2DYNAMICV-NUMBERRANGE .     <-- DELETE THIS LINE    FIELD J_1BB2DYNAMICV-TOTLIH .          <-- DELETE THIS LINE    FIELD J_1BB2DYNAMICV-TOTLIL .          <-- DELETE THIS LINE    FIELD J_1BB2DYNAMICV-FATURA .          <-- DELETE THIS LINE    FIELD J_1BB2DYNAMICV-SERIES .          <-- DELETE THIS LINE    FIELD J_1BB2DYNAMICV-SUBSER .          <-- DELETE THIS LINE    FIELD J_1BB2DYNAMICV-PRNTER .    FIELD J_1BB2DYNAMICV-FIELDNAME .       <-- DELETE THIS LINE   Adjust screen 282 and 283 according the screenshots in the   Adobe document "Views note 743361.PDF" attached to this note.   Flag the attributes (under 'Program') of J_1BB2DYNAMICV-VALUE,   J_1BB2DYNAMICV-SUBOBJ, J_1BB2DYNAMICV-NUMBERRANGE and   J_1BB2DYNAMICV-PRNTER as Input field (with obligatory input).

l) Create view cluster J_1BB2CL

  Use transaction SE54 and press pushbutton 'Edit view cluster'.  Enter J_1BB2CL and press 'Create'. As short text enter 'J_1bb2 table  maintenance (print config. Nota Fiscal)'  Doubleclick on Object structure and afterwards press pushbutton  'New Entries'. Enter    View/Table      Short text                      Predecess.  D.. P..    J_1BB2V         print conf general              J_1BB2V     R   1    J_1BB2DYNAMICV  specific entries dep. on J_1bb2  J_1BB2V     S   2    For the view J_1BB2V mark the radiobutton 'Start'.  Doubleclick on Object structure and afterwards mark 'J_1BB2DYNAMICV'  and press 'Field dependence'. Here take care on following settings:    View/Table        Field    Predecess.    Pred.field     TYPE    J_1BB2DYNAMICV    BRANCH    J_1BB2V      BRANCH    J_1BB2DYNAMICV    BUKRS    J_1BB2V       BUKRS    J_1BB2DYNAMICV    FATURA    J_1BB2V      FATURA         S    J_1BB2DYNAMICV    FIELDNAME J_1BB2V       FIELDNAME      S    J_1BB2DYNAMICV    FORM      J_1BB2V      FORM    J_1BB2DYNAMICV    TOTLIH    J_1BB2V      TOTLIH         S    J_1BB2DYNAMICV    TOTLIL    J_1BB2V      TOTLIL         S  Doubleclick on Events:  and afterwards press pushbutton  'New Entries'. For Event enter 04 and for FORM routine enter  CHECK_CHANGES. On the popup enter J_1BPR_VIEWCLUSTER for the program  name. Confirm the message 'Create program' and on the next popup  unmark 'With TOP Incl.' On the program attributes popup enter  Type 'Executable program', for status 'SAP standard production  program' and as application 'Financial Accounting'. Copy the coding  you find below.  Afterwards enter again new entries and enter event 10 with FORM  routine CHECK_FIELDNAME (the coding should be already there if you  previously copied the complete coding for J_1BPR_VIEWCLUSTER).  Go back and activate the view cluster J_1BB2CL.

m) Create the BADI J_1B_RANGE_NUMBER

Page 5: 743361 Enhanced Nota Fiscal Printing Configuration

  Use Transaction SE18. Definition Name: J_1B_RANGE_NUMBER  Short Description:    "Numbering and Printing Parameters for Nota Fiscal (Brazil)"  Unflag all options (Multiple Use, Filter Dependent)  Choose from Menu Goto -> Interface (saving)  In the table control, enter the method PRINT_CONFIGURATION (Level:  Instance) with description: "Change Nota Fiscal Print Configuration"  Parameters (via Button -> new Table Control appears):    Parameter          Type         Pa. O..  Typing   Reference Type    HEADERDATA          Importing            Type     J_1BNFDOC    PRINT_CONF          Changing              Type    J_1BB2    CV_NUMBERING_BLOCK  Changing              Type     C  Exception:    ERROR - Error in the Nota Fiscal Printing configuration  Activate, then go back (2xF3) to the BAPI-Definition.

  Create an implementation for sample code  Use transaction SE18  Enter definition name: J_1B_RANGE_NUMBER  -> Change   In the menu bar goto->Sample Code->Create  -> Popup "Business add-in def was changed - Change data ?" click yes   Save and activate

  Apply the sample coding given in the source code corrections below  (by using the menu path: Goto -> Sample Coding -> Display).  With the sample coding provided, it is possible to print on a local  printer without Nota Fiscal Numbering (prerequisite is that the  default output device is maintained for user 'TESTER'). Be aware,  that this is only an example. For further options of using the  BADI see the attachted document.

n) Enhancement of structure KOMKBNF

  Use transaction SE11 to add the following field to the structure  KOMKBNF:    component     component type    OUTPUT_DEV    RSPOPNAME

o) Adding OUTPUT_DEV at the view VV_T681F_NF

  Use transaction SM30 to add the field  OUTPUT_DEV into this view.

p) Creation of Messages

Use transaction SE91 to create the message class ICC_NF_WRITER and create the following messages within this message class:  690   You have to enter a value for the dynamic key  691   Before you can change/delete the dynamic key you must delete        all dependent entries on the following screen  101   Range &1 for object &2 not found  102   Range &1 for object &2 not internal  298   Print parameter have changed: NF serie/subserie redetermined  299   NF number out of number range  568   Invalid Output Device  692   External number range intervall: nota fiscal number deleted

q) Customizing Changes on J_1BAMV

Use transaction SM30 and change the screen J_1BAMV. Goto screen control reference 4 and 9. Set the field 4 (NF number) to optional.

r) IMG Changes for NF printing

Use the customizing path Cross-Application Components -> General Application Functions -> Nota Fiscal -> Output Determination.1) Navigate into "Condition Tables" and press 'Field Catalog' (view VV_T681F_NF) and add the field

Page 6: 743361 Enhanced Nota Fiscal Printing Configuration

OUTPUT_DEV into this view.2) Navigate into "Condition Tables" and press 'Create' and create a new condition table (e.g. B621) by typing '621' in the table field and enter the name 'OutputDev.' as description. Put the field 'Output Device' to the left.3) Navigate into "Access sequences". Create a new access sequence and press 'Accesses'. Maintain following settings:  Ac. Tab. Description                              Req.    Exclusive  10  621  OutputDev.                                           X  20  120  Condition tables for Output Nota Fiscal4) Navigate into "condition types" and assign this new acess sequence to the output type which you are using to print the Nota Fiscal.

s) Further IMG changes

Following steps are required to replace the view J_1BB2V in the IMG by the view cluster J_1BB2CLUse transaction SPRO. Goto path Cross-Application Components -> General Application Functions -> Nota Fiscal -> Output -> Define Nota Fiscal Numbers and Form Sizes. Put cursor on 'Define Nota Fiscal Numbers and Form Sizes' and press in the menu EDIT->Display IMG Activity. At section 'Assigned Document' goto tab 'Maint.Objects' and change the assigned object:  Customizing Object    Type     Transaction  J_1BB2CL              C        SM34

CORRECTION for rel. 46C from 23.03.05: Please modifiy for program LJ1BIU11 in the following way:....  REFRESH: litax.  CLEAR: sum_tax, litax.  e_header = i_header.*    form and series for outgoing movements  IF NOT j_1baa-form IS INITIAL.           "NF is printet    CLEAR: e_header-nfnum, e_header-series, e_header-subser.*    SELECT SINGLE * FROM J_1BB2*     WHERE BUKRS = NFHEADER-BUKRS*     AND BRANCH  = NFHEADER-BRANCH*     AND FORM    = NFHEADER-FORM.    IF NOT sy-subrc IS INITIAL.                  <-- DELETE THIS LINE    DATA: print_conf TYPE j_1bb2.                      " BOI note743361

      CALL FUNCTION 'J_1BNF_GET_PRINT_CONF'           EXPORTING                headerdata = nfheader           IMPORTING                print_conf = print_conf           EXCEPTIONS                error      = 1                OTHERS    = 2. " EOI note743361

    IF NOT sy-subrc IS INITIAL.                    <-- INSERT THIS LINE      MESSAGE e233 WITH i_header-form i_header-bukrs branch.    ENDIF.*    MOVE j_1bb2-series TO e_header-series.               " note 743361*    MOVE j_1bb2-subser TO e_header-subser.               " note 743361    MOVE print_conf-series TO e_header-series.            " note 743361    MOVE print_conf-subser TO e_header-subser.            " note 743361  ENDIF.

Header Data

Release Status: Released for CustomerReleased on: 08.04.2005  13:14:16Priority: Correction with medium priorityProcessor: Jochen SchlatterResponsible: Daniel MaringCategory: Legal changePrimary Component: XX-CSC-BR Brazil

Page 7: 743361 Enhanced Nota Fiscal Printing Configuration

Secondary Components:FI-GL-GL-D Reporting/Analysis/Display

Releases

SoftwareComponent

ReleaseFrom

ReleaseTo

ReleaseAnd

subsequentSAP_APPL 46C 46C 46C  SAP_APPL 470 470 470  SAP_APPL 500 500 500  

Highest Implemented Support Package

SupportPackages

ReleasePackage

NameSAP_APPL 46C SAPKH46C48

SAP_APPL 470 SAPKH47022

SAP_APPL 470 SAPKH47025

SAP_APPL 500 SAPKH50002

SAP_APPL 500 SAPKH50003

SAP_APPL 500 SAPKH50004

SAP_APPL 500 SAPKH50008

Related Notes

918792   -   Wrong determination of the series in the Nota Fiscal 907130   -   J_1BB2V: the field J_1BB2V-FORM is closed for input 858197   -   J1B1: Influence of shipping point on NF serie

Corrections Instructions

CorrectionInstruction

Validfrom

Validto

SoftwareComponent

Type *)Ref.

CorrectionLast

Modifcation326203 500 500 SAP_APPL C P6DK002499 16.08.2004  13:27:05326205 500 500 SAP_APPL C P6DK008783 16.08.2004  11:54:42326529 470 470 SAP_APPL C P6BK147745 01.03.2005  09:21:05326530 470 470 SAP_APPL C P6BK153217 23.03.2005  16:36:11326531 470 470 SAP_APPL C P6BK157522 23.03.2005  16:36:39326532 470 470 SAP_APPL C P6BK158037 23.03.2005  16:37:32377180 46C 46C SAP_APPL C P9CK408103 01.03.2005  08:23:17

*) C Korrektur, B Vorarbeit, A Nacharbeit, M noch nicht bestimmte Arbeit

Attributes

Attribute Valueweitere Komponenten FI-GL-GL-D

Attachments