© 2014 sapficoconsultant.com. All rights reserved. No part of … Validation.pdf ·  ·...

47

Transcript of © 2014 sapficoconsultant.com. All rights reserved. No part of … Validation.pdf ·  ·...

Page 1: © 2014 sapficoconsultant.com. All rights reserved. No part of … Validation.pdf ·  · 2014-08-26SAP Customizing Implementation Guide Financial Accounting Financial ... Update
Page 2: © 2014 sapficoconsultant.com. All rights reserved. No part of … Validation.pdf ·  · 2014-08-26SAP Customizing Implementation Guide Financial Accounting Financial ... Update

www.sapficoconsultant.com Page 2 SAP Validation Configuration

© 2014 sapficoconsultant.com. All rights reserved. No part of this material should be reproduced or transmitted in any form, or by any means, electronic or mechanical including photocopying, recording or by any information storage retrieval system without permission in writing from www.sapficoconsultant.com

“SAP” is a trademark of SAP AG, Neurottstrasse 16, 69190 Walldorf, Germany. SAP AG is not the publisher of this material and is not responsible for it under any aspect.

Page 3: © 2014 sapficoconsultant.com. All rights reserved. No part of … Validation.pdf ·  · 2014-08-26SAP Customizing Implementation Guide Financial Accounting Financial ... Update

www.sapficoconsultant.com Page 3 SAP Validation Configuration

Table of Contents

1. Validation Configuration ........................................................................................................................... 4

2. Transporting Validation .......................................................................................................................... 36

3. User Exits in Validation ........................................................................................................................... 40

4. Assign the custom validation program to application area .................................................................... 45

Page 4: © 2014 sapficoconsultant.com. All rights reserved. No part of … Validation.pdf ·  · 2014-08-26SAP Customizing Implementation Guide Financial Accounting Financial ... Update

www.sapficoconsultant.com Page 4 SAP Validation Configuration

1. Validation Configuration

Let us understand how Validation is set up in SAP FI component.

Scenario:-

You are an SAP FICO Consultant on a project. The project client requires you to configure a validation in transaction code FB60, so that the text field is mandatory on the basic screen.

Let us check in detail below:-

In transaction code FB60

Your project client wants the text field as mandatory (Circled below):-

Page 5: © 2014 sapficoconsultant.com. All rights reserved. No part of … Validation.pdf ·  · 2014-08-26SAP Customizing Implementation Guide Financial Accounting Financial ... Update

www.sapficoconsultant.com Page 5 SAP Validation Configuration

This field is not the same a header text.

Let us check that….

Position the cursor on the field text

Click on function key F1

Page 6: © 2014 sapficoconsultant.com. All rights reserved. No part of … Validation.pdf ·  · 2014-08-26SAP Customizing Implementation Guide Financial Accounting Financial ... Update

www.sapficoconsultant.com Page 6 SAP Validation Configuration

Click on

The field name is SGTXT as can be seen below:-

Page 7: © 2014 sapficoconsultant.com. All rights reserved. No part of … Validation.pdf ·  · 2014-08-26SAP Customizing Implementation Guide Financial Accounting Financial ... Update

www.sapficoconsultant.com Page 7 SAP Validation Configuration

This field is not the same as the header text.

Let us verify the same

The header text is in the Tab Details

Click on Tab Details

Page 8: © 2014 sapficoconsultant.com. All rights reserved. No part of … Validation.pdf ·  · 2014-08-26SAP Customizing Implementation Guide Financial Accounting Financial ... Update

www.sapficoconsultant.com Page 8 SAP Validation Configuration

Check the technical details of this field

Page 9: © 2014 sapficoconsultant.com. All rights reserved. No part of … Validation.pdf ·  · 2014-08-26SAP Customizing Implementation Guide Financial Accounting Financial ... Update

www.sapficoconsultant.com Page 9 SAP Validation Configuration

The BXTXT field – if to be mandatory can be controlled through FI customizing:-

SAP Customizing Implementation Guide Financial Accounting (New) Financial Accounting Global Settings (New) Document Document Types Define Document Types for Entry View

The header text can be made mandatory by clicking on the Document header text.

Page 10: © 2014 sapficoconsultant.com. All rights reserved. No part of … Validation.pdf ·  · 2014-08-26SAP Customizing Implementation Guide Financial Accounting Financial ... Update

www.sapficoconsultant.com Page 10 SAP Validation Configuration

But the requirement given here is a different field. Interesting isn’t it?

How do we configure this? Will It require validation? Whether it will be at header level or line item level or complete document level ?

Think.

Think………..

Page 11: © 2014 sapficoconsultant.com. All rights reserved. No part of … Validation.pdf ·  · 2014-08-26SAP Customizing Implementation Guide Financial Accounting Financial ... Update

www.sapficoconsultant.com Page 11 SAP Validation Configuration

Solution :-

Validation is definitely required.

The SGTXT is a field available in line item, and to make vendor text mandatory we have to set it at the vendor line item.

How do we determine which is the vendor line item?

For vendor invoice posting, posting key 31 is called in the background, so let us use that.

SAP Customizing Implementation Guide Financial Accounting Financial Accounting Global Settings Document Document Header Validation in Accounting Documents

Click on

Update the following:-

Page 12: © 2014 sapficoconsultant.com. All rights reserved. No part of … Validation.pdf ·  · 2014-08-26SAP Customizing Implementation Guide Financial Accounting Financial ... Update

www.sapficoconsultant.com Page 12 SAP Validation Configuration

Click Environment Validation

Page 13: © 2014 sapficoconsultant.com. All rights reserved. No part of … Validation.pdf ·  · 2014-08-26SAP Customizing Implementation Guide Financial Accounting Financial ... Update

www.sapficoconsultant.com Page 13 SAP Validation Configuration

Page 14: © 2014 sapficoconsultant.com. All rights reserved. No part of … Validation.pdf ·  · 2014-08-26SAP Customizing Implementation Guide Financial Accounting Financial ... Update

www.sapficoconsultant.com Page 14 SAP Validation Configuration

Click

Update the following:-

Double click

Page 15: © 2014 sapficoconsultant.com. All rights reserved. No part of … Validation.pdf ·  · 2014-08-26SAP Customizing Implementation Guide Financial Accounting Financial ... Update

www.sapficoconsultant.com Page 15 SAP Validation Configuration

Double click

Page 16: © 2014 sapficoconsultant.com. All rights reserved. No part of … Validation.pdf ·  · 2014-08-26SAP Customizing Implementation Guide Financial Accounting Financial ... Update

www.sapficoconsultant.com Page 16 SAP Validation Configuration

Double click

Page 17: © 2014 sapficoconsultant.com. All rights reserved. No part of … Validation.pdf ·  · 2014-08-26SAP Customizing Implementation Guide Financial Accounting Financial ... Update

www.sapficoconsultant.com Page 17 SAP Validation Configuration

Click

Page 18: © 2014 sapficoconsultant.com. All rights reserved. No part of … Validation.pdf ·  · 2014-08-26SAP Customizing Implementation Guide Financial Accounting Financial ... Update

www.sapficoconsultant.com Page 18 SAP Validation Configuration

Click

Page 19: © 2014 sapficoconsultant.com. All rights reserved. No part of … Validation.pdf ·  · 2014-08-26SAP Customizing Implementation Guide Financial Accounting Financial ... Update

www.sapficoconsultant.com Page 19 SAP Validation Configuration

Update the following:-

Page 20: © 2014 sapficoconsultant.com. All rights reserved. No part of … Validation.pdf ·  · 2014-08-26SAP Customizing Implementation Guide Financial Accounting Financial ... Update

www.sapficoconsultant.com Page 20 SAP Validation Configuration

Click

Page 21: © 2014 sapficoconsultant.com. All rights reserved. No part of … Validation.pdf ·  · 2014-08-26SAP Customizing Implementation Guide Financial Accounting Financial ... Update

www.sapficoconsultant.com Page 21 SAP Validation Configuration

Click back as shown below:-

Page 22: © 2014 sapficoconsultant.com. All rights reserved. No part of … Validation.pdf ·  · 2014-08-26SAP Customizing Implementation Guide Financial Accounting Financial ... Update

www.sapficoconsultant.com Page 22 SAP Validation Configuration

Double click

Page 23: © 2014 sapficoconsultant.com. All rights reserved. No part of … Validation.pdf ·  · 2014-08-26SAP Customizing Implementation Guide Financial Accounting Financial ... Update

www.sapficoconsultant.com Page 23 SAP Validation Configuration

Click and update posting key

Page 24: © 2014 sapficoconsultant.com. All rights reserved. No part of … Validation.pdf ·  · 2014-08-26SAP Customizing Implementation Guide Financial Accounting Financial ... Update

www.sapficoconsultant.com Page 24 SAP Validation Configuration

Page 25: © 2014 sapficoconsultant.com. All rights reserved. No part of … Validation.pdf ·  · 2014-08-26SAP Customizing Implementation Guide Financial Accounting Financial ... Update

www.sapficoconsultant.com Page 25 SAP Validation Configuration

Double click

Page 26: © 2014 sapficoconsultant.com. All rights reserved. No part of … Validation.pdf ·  · 2014-08-26SAP Customizing Implementation Guide Financial Accounting Financial ... Update

www.sapficoconsultant.com Page 26 SAP Validation Configuration

Click

Click

Page 27: © 2014 sapficoconsultant.com. All rights reserved. No part of … Validation.pdf ·  · 2014-08-26SAP Customizing Implementation Guide Financial Accounting Financial ... Update

www.sapficoconsultant.com Page 27 SAP Validation Configuration

Update the following:-

Page 28: © 2014 sapficoconsultant.com. All rights reserved. No part of … Validation.pdf ·  · 2014-08-26SAP Customizing Implementation Guide Financial Accounting Financial ... Update

www.sapficoconsultant.com Page 28 SAP Validation Configuration

Click

Double click

And search for the field SGTXT

Page 29: © 2014 sapficoconsultant.com. All rights reserved. No part of … Validation.pdf ·  · 2014-08-26SAP Customizing Implementation Guide Financial Accounting Financial ... Update

www.sapficoconsultant.com Page 29 SAP Validation Configuration

Double click BSEG-SGTXT

Click

Click

Update the following:-

Page 30: © 2014 sapficoconsultant.com. All rights reserved. No part of … Validation.pdf ·  · 2014-08-26SAP Customizing Implementation Guide Financial Accounting Financial ... Update

www.sapficoconsultant.com Page 30 SAP Validation Configuration

Keep it blank

Page 31: © 2014 sapficoconsultant.com. All rights reserved. No part of … Validation.pdf ·  · 2014-08-26SAP Customizing Implementation Guide Financial Accounting Financial ... Update

www.sapficoconsultant.com Page 31 SAP Validation Configuration

Click

Page 32: © 2014 sapficoconsultant.com. All rights reserved. No part of … Validation.pdf ·  · 2014-08-26SAP Customizing Implementation Guide Financial Accounting Financial ... Update

www.sapficoconsultant.com Page 32 SAP Validation Configuration

Click on

Page 33: © 2014 sapficoconsultant.com. All rights reserved. No part of … Validation.pdf ·  · 2014-08-26SAP Customizing Implementation Guide Financial Accounting Financial ... Update

www.sapficoconsultant.com Page 33 SAP Validation Configuration

Click on Save

Update the message number 900 in the validation message step

Page 34: © 2014 sapficoconsultant.com. All rights reserved. No part of … Validation.pdf ·  · 2014-08-26SAP Customizing Implementation Guide Financial Accounting Financial ... Update

www.sapficoconsultant.com Page 34 SAP Validation Configuration

Click on Save

Come back to the main validation window

Page 35: © 2014 sapficoconsultant.com. All rights reserved. No part of … Validation.pdf ·  · 2014-08-26SAP Customizing Implementation Guide Financial Accounting Financial ... Update

www.sapficoconsultant.com Page 35 SAP Validation Configuration

Update as active

Click on Save

Page 36: © 2014 sapficoconsultant.com. All rights reserved. No part of … Validation.pdf ·  · 2014-08-26SAP Customizing Implementation Guide Financial Accounting Financial ... Update

www.sapficoconsultant.com Page 36 SAP Validation Configuration

2. Transporting Validation

Validation objects are workbench object and have to be included manually in transport request.

Proceed as follows:-

Position the cursor on

Click

Page 37: © 2014 sapficoconsultant.com. All rights reserved. No part of … Validation.pdf ·  · 2014-08-26SAP Customizing Implementation Guide Financial Accounting Financial ... Update

www.sapficoconsultant.com Page 37 SAP Validation Configuration

Click Execute to include validation objects in transport.

So in effect there will be 2 transport requests:-

1) For the customizing entry

Page 38: © 2014 sapficoconsultant.com. All rights reserved. No part of … Validation.pdf ·  · 2014-08-26SAP Customizing Implementation Guide Financial Accounting Financial ... Update

www.sapficoconsultant.com Page 38 SAP Validation Configuration

2) For the validation objects

You are now done with validation customizing.

Page 39: © 2014 sapficoconsultant.com. All rights reserved. No part of … Validation.pdf ·  · 2014-08-26SAP Customizing Implementation Guide Financial Accounting Financial ... Update

www.sapficoconsultant.com Page 39 SAP Validation Configuration

Let us now test the validation in transaction code FB60

Update the following and press enter

So there goes you r validation message.

Page 40: © 2014 sapficoconsultant.com. All rights reserved. No part of … Validation.pdf ·  · 2014-08-26SAP Customizing Implementation Guide Financial Accounting Financial ... Update

www.sapficoconsultant.com Page 40 SAP Validation Configuration

3. User Exits in Validation

Sometimes the validation requirements are quite complex and cannot be done using the standard validation configuration.

Example: Your project had a requirement that in transaction F-28 (Incoming payment from customer) the reference field must be of length 7 characters and should be prefixed with the letter C or L.

In this case we definitely need to use a user exit.

User exit steps:-

RGGBR000 is an example form pool provided by SAP for validation exits.

RGGBS000 is an example form pool provided by SAP for substitution exits

Page 41: © 2014 sapficoconsultant.com. All rights reserved. No part of … Validation.pdf ·  · 2014-08-26SAP Customizing Implementation Guide Financial Accounting Financial ... Update

www.sapficoconsultant.com Page 41 SAP Validation Configuration

Transaction code: SE38

Click on

Page 42: © 2014 sapficoconsultant.com. All rights reserved. No part of … Validation.pdf ·  · 2014-08-26SAP Customizing Implementation Guide Financial Accounting Financial ... Update

www.sapficoconsultant.com Page 42 SAP Validation Configuration

Copy the standard RGGBR000 into your custom program ZRGGB

Define the user exit in the FORM “GET_EXIT_TITLES”

This form GET_EXIT_TITLES contains name and titles of all available standard exits. Every new exit need to be added to this form.

Page 43: © 2014 sapficoconsultant.com. All rights reserved. No part of … Validation.pdf ·  · 2014-08-26SAP Customizing Implementation Guide Financial Accounting Financial ... Update

www.sapficoconsultant.com Page 43 SAP Validation Configuration

We show below an example coding

Exit name = UZ001

Create a form

&---------------------------------------------------------------------*

*& Form UZ001

*&---------------------------------------------------------------------*

* text

*----------------------------------------------------------------------*

* <-- B_RESULT T = True F = False

*----------------------------------------------------------------------*

FORM uz001 USING b_result.

DATA: len TYPE i.

* DATA: SCREEN LIKE DYNPREAD OCCURS 0 WITH HEADER LINE.

* DATA: LEN TYPE I.

len = STRLEN( bkpf-xblnr ).

IF sy-tcode = 'F-28'

OR sy-tcode = 'F-29'

Page 44: © 2014 sapficoconsultant.com. All rights reserved. No part of … Validation.pdf ·  · 2014-08-26SAP Customizing Implementation Guide Financial Accounting Financial ... Update

www.sapficoconsultant.com Page 44 SAP Validation Configuration

IF bkpf-xblnr IS INITIAL .

b_result = b_false.

EXIT .

ELSEIF len > 7.

b_result = b_false.

EXIT .

ELSEIF bkpf-xblnr(1) <> 'C' AND bkpf-xblnr(1) <> 'L'.

b_result = b_false.

EXIT .

ELSE .

b_result = b_true.

EXIT .

ENDIF .

ELSE.

b_result = b_true.

ENDIF.

ENDFORM. " UZ001

Page 45: © 2014 sapficoconsultant.com. All rights reserved. No part of … Validation.pdf ·  · 2014-08-26SAP Customizing Implementation Guide Financial Accounting Financial ... Update

www.sapficoconsultant.com Page 45 SAP Validation Configuration

4. Assign the custom validation program to application area

Transaction code: GGX2

Or

Path:

SAP Customizing Implementation Guide Financial Accounting Special Purpose Ledger Basic Settings User Exits Maintain Client-Specific User Exits

Page 46: © 2014 sapficoconsultant.com. All rights reserved. No part of … Validation.pdf ·  · 2014-08-26SAP Customizing Implementation Guide Financial Accounting Financial ... Update

www.sapficoconsultant.com Page 46 SAP Validation Configuration

Remove the existing assignment from GBLR and update your new program ZRGGB

Update the user exit UZ001 in the validation transaction in check

Page 47: © 2014 sapficoconsultant.com. All rights reserved. No part of … Validation.pdf ·  · 2014-08-26SAP Customizing Implementation Guide Financial Accounting Financial ... Update

www.sapficoconsultant.com Page 47 SAP Validation Configuration

If you have liked this document, please share it with your friends, colleagues, class mates.

For many more such documents, visit our website www.sapficoconsultant.com