Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

validation on Purchasing document field in FB70

Former Member
0 Likes
2,194

Hi All, 

In FB70 transaction at item level, i have added PO field that field is not having validation it is accepting any value.

i want to restrict this and it should accept only values from seach help attached.

How can i validate on PO field is there any implicit enhancement possible.  

RegardsMSR

10 REPLIES 10
Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,800

Did you try to create a FI validation via OB28 or SPRO.?

Regards,

Raymond

Read only

0 Likes
1,800

Hi Raymond,

U mean  FI consultant can validate field at the backend.

i want to validate the field through abap code because even if i give value as 1, 222222222,etc

and if po is not existed also it is accepting that value .

Regards

MSR

Read only

0 Likes
1,800

No, check transaction OB28, you can define check in document header/items (*) and if the Customizing doesn't allow your test you can write some code in an exit (**)

Regards,

Raymond

(*) What Are Validations?

(**) User Exits in Validations/Substitutions/Rules

Read only

0 Likes
1,800

Hi,

Can you explain me one by one validation steps.

Regards

MSR

Read only

0 Likes
1,800

Create a FI validation (Transaction OB28) there create and use an exit in which you will check your control table

(Read User Exits in Validations/Substitutions/Rules in Validations, Substitutions, and Rules)

Steps (read the documentation in links provided)

- Create a validation at item level (callup point = 0002)

- Create a step

  - prerequisite : your zz-field is not initial (you could also check transaction code)

  - Check : create a form in a Z-copy of RGGBR000 (add the include name in T80D, GBLR record) in the get_exit_titles form add a record in internal table for your exit, then add a form for your exit at end of include, there check the value exists in control table

  - Add a message for raising error

- Activate validation

Regards,

Read only

0 Likes
1,800

Hi,

In order to add user_exit breakpoint should be triggered at a particular point but here the bresk point i snot triggered at any point .

As you said to copy RGGBR000 what is the use of this one and where can i attach that custom one.

I think what you said is not concerned to my requirement i want to just validate po field in fb70 by not accepting values which are not existed.

Regards

MSR

Read only

0 Likes
1,800

"FI Validation" OB28 is the usual point to add validation in FI....

Actually read the document provided via links.

Regards,

Raymond

Read only

Former Member
0 Likes
1,800

Hi Srinivas,

You can check the PO number entered in line item in 3 ways,

1. Via Validations (This is more or less end point validations entered by Functional people), use Tcode GGB0 for this, Go to Financial accounting and your respective company code and line item validations there you can enter conditions and some code to validate the PO number entered. Note that this will only work when document is getting posted.

2. Via Customer enhancement, or BTE 00001030 to validate the XBSEG-EBELN field.

3. Go to SAPMF05A program and search for 'PERFORM

validation_beleg TABLES xbseg xbkpf', in this form subroutine go for implicit enhancement at the end of routine to check the PO number in XBSEG-EBELN field and throw the error to stop the program.

Best way would be to put a breakpoint in the perform as told above, and debug the program for your scenario and simulate it before implementing the enhancement.

Hope this is helpful.

Regards,

Manjesh.

Read only

0 Likes
1,800

Hi

As per your suggesstion i have tried for implicit enhancement for 'PERFORM validation_beleg TABLES xbseg xbkpf', but the breakpoint is not getting triggered.

1)how to Do the in BTE..?

Regards

MSR

Read only

0 Likes
1,800

Hi Srinivas,

Are you trying to post the document in FB70 or trying to park?

If your trying to park, then Validations in OB28 doesn't work.

If your trying to post, then Validations in OB28 is the best option to validate the data.

As far as BTE is concerned, Follow the below link.

http://wiki.sdn.sap.com/wiki/display/ABAP/Business+Transaction+Events+-+Process+Interface+-+Event+00...

<Above link is for explaining what is P&S events and PS process>. To determine whether to use it or not, you need to put break point as below.

In program SAPMF05A, put break point in 'PERFORM open_fi_feldsubstitution', and see whether control will come there for your problem. If it comes then you can try implicit enhancement in this routine or you can see the BTEs 1130 and 1120 (Note here that the above should only be used for Subsitution of some fields, So this can be your last option if nothing works out! )

I would recommend you to debug the program above and below the 'PERFORM open_fi_feldsubstitution' subroutine.

Hope this is useful.

Regards,

Manjesh.