cancel
Showing results for 
Search instead for 
Did you mean: 

FI Validations

Former Member
0 Kudos

Hi Guru's

I am trying to Validate T-CODE F-43 /F-63

Line Item 1 : Posting key = '40' AND G/L = '950001' AND

Material >= 'BEAF01'

AND Material <= 'BEOH05'

It is Working Fine single Line Item validation

But I want to Check Both Line Items at a time

Posting key = '31' AND

G/L >= '200000' or (Range of Vendor Numbers )

LIke

Ex: 1

Posting Key 40 G/l Account 950001 and material xxxx to xxxx

Posting key 31 and Vendor Numbers Range 10000 to 20000

Ex: 2

40 950002 and material xxx to xxxx

31 vendor number range 20001 to 30000

like this ,

How to check 2 Line Items at a time in FI

I written this code in Line Item.

How to write code in complete Document.

Thanks & Regards

Raj

Accepted Solutions (1)

Accepted Solutions (1)

iklovski
Active Contributor
0 Kudos

Hi,

You can create a validation on document level with user-exit. In user-exit check your BSEG data according to the requirements you have mentioned.

Regards,

Eli

Former Member
0 Kudos

Thanks Eli

I tried to Write Code in Complete Document. But it is not working. Can you explain small example how to write code Complete Document level

thanks

Raj

iklovski
Active Contributor
0 Kudos

Hi Raj,

You can always debug your code; put a breakpoint and see what goes wrong. Ask your ABAPer to help you on this one; the code is very simple. You just have to put a loop on BSEG data an check the rows.

Something like this (I took my recent substituion):

LOOP AT BOOL_DATA-BSEG INTO BSEG

WHERE KOART = 'S'

AND HKONT = '0044450000'.

IF BSEG-PRCTR NE SPACE.

BKPF-XBLNR = BSEG-PRCTR.

ENDIF.

ENDLOOP.

Regards,

Eli

Former Member
0 Kudos

Hi Eli,

I've the problem. After I did the coding of the user exit I face below problems:

FORM VALCHCK_2FI_BELG002

USING

BOOL_DATA

CHANGING

RES000.

DATA: RES001 LIKE D_BOOL.

Exit-Evaluation :RES000 *

RES000 = B_TRUE.

PERFORM U516(ZGGBR000)

IF FOUND

CHANGING

RES000.

ENDFORM.

Within the call of sub routine U516 the parameter with the internal table is missing. As result I get allways a dump because of PERFORM_ARAMETER_MISSING. I deleted the step and tried to generate it again. Same result!!!

What can I do to pass the data to the exit????????

Regards

Norbert

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

As i understand you would like to check for a limited number of GL accounts and Material numbers, Vendor numbers.

Te best option as already suggested prepare a user exit. Otherwise you can try this out

Prepare three sets Set-1 for GL accounts, Set-2 for range of material accounts & Set-3 for Vendor acounts . next you can define your validation thus

(IF Transaction = F-43 AND posting key=40 BSEG-HKONt in SET-1 and Mat acct IN set-2) or (IF Transaction = F-43 AND posting key=40 BSEG-HKONt in SET-1 and vendor account IN set-3) or (IF Transaction = F-43 AND posting key=31 BSEG-HKONt in SET-1 and Mat acct IN set-2) or (IF Transaction = F-43 AND posting key=31 BSEG-HKONt in SET-1 and vendor account IN set-3)

I have used the field description, you would need to replace this with tech field names i.e for mat acct,vendor acct. I feel this should work eventho it's quite a long validation