11
Manual Steps for SAP Note 1566913 NF-e: Cancel NF-e prior to Authorization

Manual Activities

Embed Size (px)

Citation preview

Page 1: Manual Activities

Manual Steps for SAP Note 1566913

NF-e: Cancel NF-e prior to Authorization

Page 2: Manual Activities

Copyright/Trademark

CREATION OF NEW OBJECTS Data Element J_1BNFE_CANCEL_PA

1. Go to transaction SE11.

2. Select the Data type radio button and enter J_1BNFE_CANCEL_PA.

3. Choose the Create push button.

4. Select the Data element radio button and confirm.

5. Enter NF-e: Cancel Prior to Authorization as the short description.

6. Go to the Data Type tab page.

7. Select the Elementary Type radio button and then the Domain radio button.

8. Enter XFELD as the domain.

9. Press ENTER.

10. Select the Field label tab page. Enter the following field labels:

Length Field Label

Short 10 Cncl Prior

Medium 16 Cncl Prior Auth.

Long 21 Cancel Prior to Auth.

Heading 10 Cncl Prior

11. Press the Documentation push button.

12. Enter the following long text:

&DEFINITION&

Indicates that you canceled this NF-e before you received authorization from the government.

&USE&

The system marks this field for an NF-e after you cancel it prior to authorization by choosing NF-e -> Cancel Prior to Author.

&DEPENDENCIES&

After you have canceled an NF-e prior to authorization, you can create a new NF-e for the source document in the usual way, that is, using the integration with Materials Management or Sales and Distribution or the NF-e Writer.

&EXAMPLE&

You request authorization for an NF-e from SEFAZ. After you send the authorization request, the government switches from the SEFAZ server to the SCAN server. You cancel the NF-e prior to authorization and the system marks this field in the NF-e Monitor for this NF-e. You then cancel the source document and create a new document/NF-e. Since SCAN is active, the new NF-e is then sent to SCAN.

When you receive a response from SEFAZ for the NF-e that was canceled prior to authorization, the system sets its required process step to 7 (Req. Authorization from the Authorities to cancel/skip NF-e). You must then cancel or skip the NF-e. Once this action is authorized by the government, the system sets the process step to C (completed). In contrast to a normal cancellation, the system does not try to cancel the source document.

13. Save your changes in the J1BA package.

14. Activate your changes.

Data Element J_1BNFE_CANCEL_AUTOMATE 1. Go to transaction SE11.

2. Select the Data type radio button and enter J_1BNFE_CANCEL_AUTOMATE.

3. Choose the Create push button.

4. Select the Data element radio button and confirm.

Page 3: Manual Activities

Copyright/Trademark

5. Enter Automatic Cancellation After Conting./Cancel Prior to Auth. as the short description.

6. Go to the Data Type tab page.

7. Select the Elementary Type radio button and then the Domain radio button.

8. Enter XFELD as the domain.

9. Press ENTER.

10. Select the Field label tab page. Enter the following field labels:

Length Field Label

Short 9 Auto Cncl

Medium 13 Auto. Cancel.

Long 18 Auto. Cancellation

Heading 13 Auto. Cancel.

11. Press the Documentation push button.

12. Enter the following long text:

&DEFINITION&

Indicates that the system automatically cancels the source document (for example, the material document or invoice) for an NF-e when one of the following occurs:

The NF-e is canceled prior to being authorized by the tax authorities.

The NF-e that was created under normal processing is switched to contingency.

&USE&

Select this checkbox to automate this step in the cancellation/contingency process.

If you do not use this automatic function, after you cancel an NF-e prior to authorization or you switch to contingency, you must manually trigger the cancellation of the source document in one of the following ways:

Use the corresponding cancellation transaction in Materials Management or Sales and Distribution

Choose, in the NF-e Monitor, NF-e -> Cancel Source Doc.

13. Save your changes in the J1BA package.

14. Activate your changes.

Message J1B_NFE129

1. Go to transaction SE91.

2. Enter J1B_NFE as the message class.

3. In the Subobjects group box, select the Messages radio button.

4. Enter 129 as the message number.

5. Choose the Change push button.

6. Enter Cannot cancel documents; NF-e &1 switched to contingency as the message short text.

7. Select the Self-explanatory check box.

8. Save your changes in the J1BA package.

Message J1B_NFE130

1. Go to transaction SE91.

2. Enter J1B_NFE as the message class.

3. In the Subobjects group box, select the Messages radio button.

4. Enter 130 as the message number.

5. Choose the Change push button.

Page 4: Manual Activities

Copyright/Trademark

6. Enter Cannot switch to contingency; NF-e &1 canceled prior to authorization as the message

short text.

7. Select the Self-explanatory check box.

8. Save your changes in the J1BA package.

Message J1B_NFE131

1. Go to transaction SE91.

2. Enter J1B_NFE as the message class.

3. In the Subobjects group box, select the Messages radio button.

4. Enter 131 as the message number.

5. Choose the Change push button.

6. Enter System cannot cancel NF-e &1 prior to auth.; other action required as the message short

text.

7. Deselect the Self-explanatory check box.

8. Choose the Long Text push button.

9. Enter the following long text:

&CAUSE&

You tried to cancel an NF-e prior to authorization. However, the current process step of the NF-e does not allow this. Cancellation prior to authorization is not allowed, if one of the following is true:

The NF-e has not been numbered.

You have sent the NF-e to the tax authorities, and your SAP ERP system has received a response.

The NF-e has a validation error.

&SYSTEM_RESPONSE&

The system does not allow cancellation prior to authorization for this NF-e.

&WHAT_TO_DO&

If you still want to cancel the selected NF-e, you proceed as follows, depending on the current status of the NF-e:

If the NF-e has not been numbered, you can cancel the source document by choosing NF-e -> Cancel Source Doc.

If the NF-e has been sent to the tax authorities and the ERP system has received a response, you have to send a request for cancellation / skipping by choosing NF-e -> Request Cancellation.

If the NF-e has a validation error, you have to send a request for skipping, because the NF-e has already been numbered. You do so by choosing NF-e -> Request Cancellation.

10. Save your changes in the J1BA package.

Message J1B_NFE132

1. Go to transaction SE91.

2. Enter J1B_NFE as the message class.

3. In the Subobjects group box, select the Messages radio button.

4. Enter 132 as the message number.

5. Choose the Change push button.

Page 5: Manual Activities

Copyright/Trademark

6. Enter NF-e &1 canceled prior to auth.; &2 received from authorities' system as the message

short text.

7. Deselect the Self-explanatory check box.

8. Choose the Long text push button.

9. Enter the following long text:

&CAUSE&

You received the response from the authorities for NF-e * that was canceled prior to authorization.

&WHAT_TO_DO&

Depending on the response from the authorities (authorizied, rejected, or denied), proceed as follows:

Authorized - Send the request for authorization to cancel the NF-e.

Rejected - Send the request for authorization to skip the NF-e number.

Denied - You do not need authorization to cancel the NF-e.

10. Position your cursor in the long text at the position that is marked with *.

11. Choose from the menu Edit -> Command -> Insert Command.

12. In the next dialog box, select the Symbols radio button and enter &V1&.

13. Confirm.

14. Save your changes in the J1BA package.

Message J1B_NFE133

1. Go to transaction SE91.

2. Enter J1B_NFE as the message class.

3. In the Subobjects group box, select the Messages radio button.

4. Enter 133 as the message number.

5. Choose the Change push button.

6. Enter Reset functionality not allowed for NF-e canceled prior to authorization as the message

short text.

7. Select the Self-explanatory check box.

8. Save your changes in the J1BA package.

Message J1B_NFE134 1. Go to transaction SE91.

2. Enter J1B_NFE as the message class.

3. In the Subobjects group box, select the Messages radio button.

4. Enter 134 as the message number.

5. Choose the Change push button.

6. Enter Switching an NF-e without form to contingency is not allowed as the message short text.

7. Select the Self-explanatory check box.

8. Save your changes in the J1BA package.

Page 6: Manual Activities

Copyright/Trademark

NOTE: The creation of the following four function modules is only needed for releases based on SAP_BASIS 4.6C, SAP NetWeaver 2004 up to Basis Support Package 12, SAP Web AS 6.20 up to Support Package 54. Function Module J_1B_NFE_CHECK_CANCEL_PR_AUTH

1. Call transaction SE37.

2. Enter J_1B_NFE_CHECK_CANCEL_PR_AUTH as the name of the function module.

3. Choose the Create pushbutton and confirm your entry.

4. Enter J_1B_NFE as the function group.

5. Enter Checks if Cancellation Prior to Authorization is allowed as the short text.

6. On the Import tab page, enter the following values (columns Parameter Name / Typing / Associated Type):

o IV_DOCNUM / TYPE / J_1BDOCNUM 7. On the Export tab page, enter the following values (columns Parameter Name / Typing / Associated

Type): o ES_ACTTAB_MOD / TYPE / J_1BNFE_ACTIVE

8. On the Exceptions tab page, enter the following values (columns Exception / Short Text): o STATUS_NOT_ALLOWED / The current status of the document does not allow to

cancel prior to auth. o NO_ENTRY / There is no document with the specified document number in the

database Function Module J_1B_NFE_CANCEL_PRIOR_AUTH

1. Call transaction SE37.

2. Enter J_1B_NFE_CANCEL_PRIOR_AUTH as the name of the function module.

3. Choose the Create push button and confirm your entry.

4. Enter J_1B_NFE as the function group.

5. Enter Cancel NF-e prior to Authorization as the short text.

6. On the Import tab page, enter the following values (columns Parameter Name / Typing / Associated Type):

o IS_ACTTAB / TYPE / J_1BNFE_ACTIVE 7. On the Export tab page, enter the following values (columns Parameter Name / Typing / Associated

Type): o ES_ACTTAB_MOD / TYPE / J_1BNFE_ACTIVE

8. On the Exceptions tab page, enter the following values (columns Exception / Short Text): o PROCESS_ERRORS / Error when updating database table

Function Module J_1B_NFE_UPDATE_ACTIVE_W_LOCK

1. Call transaction SE37.

2. Enter J_1B_NFE_UPDATE_ACTIVE_W_LOCK as the name of the function module.

3. Choose the Create push button and confirm your entry.

4. Enter J_1B_NFE as the function group.

5. Enter Update active table with lock as the short text.

6. On the Import tab page, enter the following values (columns Parameter Name / Typing / Associated Type):

o IS_ACTTAB / TYPE / J_1BNFE_ACTIVE o IV_UPDMODE / TYPE / CHAR1 o IV_WAIT_AFTER_COMMIT / TYPE / XFELD

7. On the Exceptions tab page, enter the following values columns (columns Exception / Short Text): o UPDATE_ERROR / Update Error o LOCK_ERROR / Locking Error

Function Module J_1B_NFE_CANCEL_W_UPDATE

1. Call transaction SE37.

2. Enter J_1B_NFE_CANCEL_W_UPDATE as the name of the function module.

3. Choose the Create push button and confirm your entry.

4. Enter J_1B_NFE as the function group.

Page 7: Manual Activities

Copyright/Trademark

5. Enter Cancel NF-e source document and update ACTIVE table as the short text.

6. On the Import tab page, enter the following values (columns Parameter Name / Typing / Associated Type):

o IS_ACTTAB / TYPE / J_1BNFE_ACTIVE 7. On the Export tab page, enter the following values (columns Parameter Name / Typing / Associated

Type): o ES_ACTTAB_MOD / TYPE / J_1BNFE_ACTIVE

8. On the Exceptions tab page, enter the following values (columns Exception / Short Text): o CANCEL_NOT_POSSIBLE / Cancel of source document failed o UPDATE_ERROR / Update of active table failed

Page 8: Manual Activities

Copyright/Trademark

CHANGE OF EXISTING OBJECTS

Domain J_1BNFESCSSTATUS 1. Go to transaction SE11.

2. Select Domain and enter J_1BNFESCSSTATUS.

3. Choose the Change push button.

4. Select the Value Range tab page.

5. Go to the line with fixed value 5.

6. Change the short description to Switched to Contingency/Canceled Prior to Author..

7. Save your changes in the J1BA package.

8. Activate your changes. Database Table J_1BNFE_ACTIVE

1. Go to transaction SE11.

2. Select Database Table and enter J_1BNFE_ACTIVE.

3. Choose the Change push button.

4. Select the Fields tab page.

5. At the end of the table, insert a new field with the following values (columns Field / Data element):

o CANCEL_PA / J_1BNFE_CANCEL_PA

6. Press ENTER.

7. Save your changes in the J1BA package and activate them.

Database Table J_1BNFE_HISTORY

1. Go to transaction SE11.

2. Select Database Table and enter J_1BNFE_HISTORY.

3. Choose the Change push button.

4. Select the Fields tab page.

5. At the end of the table, insert a new field with the following values (columns Field / Data element):

o CANCEL_PA / J_1BNFE_CANCEL_PA

6. Press ENTER.

7. Save your changes in the J1BA package and activate them.

Database Table J_1BNFE_CUST3

1. Go to transaction SE11.

2. Select Database Table and enter J_1BNFE_CUST3.

3. Choose the Change push button.

4. Select the Fields tab page.

5. At the end of the table, insert a new field with the following values (columns Field / Data element):

o CANCEL_AUTOMATE / J_1BNFE_CANCEL_AUTOMATE

6. Press ENTER.

7. Save your changes in the J1BA package and activate them.

View J_1BNFE_CUST3_4V

1. Go to transaction SE11.

2. Select View and enter J_1BNFE_CUST3_4V.

3. Choose the Change push button.

4. Select the View Fields tab page.

5. Choose the Table fields push button.

6. Double-click on the J_1BNFE_CUST3 line.

7. Select the check box of the CANCEL_AUTOMATE field.

8. Choose the Copy push button.

9. Save your changes in the J1BA package and activate them.

Page 9: Manual Activities

Copyright/Trademark

Table Maintenance Dialog for View J_1BNFE_CUST3_4V 1. Go to transaction SE54.

2. Enter J_1BNFE_CUST3_4V as the name of the view.

3. In the Edit Table/View group box, select the Generated objects radio button.

4. Choose the Create/Change push button.

5. Choose the Change push button or, alternatively, press F7.

6. In the new dialog, mark the following check boxes and confirm:

o Create modules

o New field/sec.table in structure

7. In the new dialog, in the Field type/sec.tab. group box, mark the Normal field check box and confirm.

8. After the Table Maintenance Dialog is generated successfully, your changes are applied.

NOTE: Select only the described options; otherwise you might destroy the screens!

Screen 0004 of Program SAPLJ_1BNFE_CUST02 NOTE: The manual change of this screen is only needed for releases based on SAP_BASIS 4.6C, SAP NetWeaver 2004 up to Basis Support Package 12, SAP Web AS 6.20 up to Support Package 54. In higher releases, these changes are delivered with the automatic correction instruction. In this case, do not apply these changes manually! Otherwise you might destroy the screens!

1. Go to transaction SE51.

2. Enter SAPLJ_1BNFE_CUST02 as the Program.

3. Enter 0004 as the Screen number.

4. In the Subobjects group box, select the Layout Editor radio button.

5. Choose the Change push button.

6. In the Screen Painter, choose the Dictionary/Program Fields Window push button or, alternatively,

press F6.

7. In the Table/Field name field, enter J_1BNFE_CUST3_4V.

8. Select the line of the CANCEL_AUTOMATE field.

9. In the Copy as column, select the ChkB radio button.

10. Choose the Copy push button.

11. Insert the new column after the ServerDet column:

Page 10: Manual Activities

Copyright/Trademark

12. Double-click on the new column (not the header).

13. In the Screen Painter Attributes window, set the Vis. Length field to 10.

14. Save your changes in the J1BA package.

15. Activate your changes.

Screen 0005 of Program SAPLJ_1BNFE_CUST02 NOTE: The manual change of this screen is only needed for releases based on SAP_BASIS 4.6C, SAP NetWeaver 2004 up to Basis Support Package 12, SAP Web AS 6.20 up to Support Package 54. In higher releases, these changes are delivered with the automatic correction instruction. In this case, do not apply these changes manually! Otherwise you might destroy the screens!

1. Go to transaction SE51.

2. Enter SAPLJ_1BNFE_CUST02 as the Program.

3. Enter 0005 as the Screen number.

4. In the Subobjects group box, select the Layout Editor radio button.

5. Choose the Change push button.

6. In the Screen Painter, choose the Dictionary/Program Fields Window push button or, alternatively,

press F6.

7. In the Table/Field name field, enter J_1BNFE_CUST3_4V.

8. Mark the line of the CANCEL_AUTOMATE field.

9. In the Copy as column, select the ChkB radio button.

10. Choose the Copy push button.

11. Insert the new line below the Auto. Server Det. line:

12. Save your changes in the J1BA package.

13. Activate your changes.

Page 11: Manual Activities

Copyright/Trademark

GUI Status J_1BNFE_MONITOR 1. Go to transaction SE41. 2. Enter J_1BNFE_MONITOR as the program. 3. In the Subobjects group box, select the Status radio button and enter SCREEN_100. 4. Choose the Change push button. 5. Expand the Menu Bar entry. 6. Double-click on the NF-e entry. 7. Position the cursor in the Code column of the line with the second horizontal bar. 8. Choose the Delete entry push button. 9. Position the cursor in the line with the EXIT function code in the Code column. 10. Choose the Insert entry push button. 11. In the new line, enter CANCEL_PA as the function code. 12. Press ENTER. 13. In the next dialog box, in the Choose Text Type group box, select the Static text radio button and

confirm. 14. In the next dialog box, enter Cancel Prior to Auth as the Function Text and confirm. 15. Save your changes in the J1BA package.

16. Activate your changes.

© 2011 by SAP AG. All rights reserved. SAP and the SAP logo are registered trademarks of SAP AG in Germany and other countries. Business Objects and the Business Objects logo are trademarks or registered trademarks of Business Objects Software Ltd. Business Objects is an SAP company. Sybase and the Sybase logo are registered trademarks of Sybase Inc. Sybase is an SAP company.