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 Code for Business area

sridhar_muthekepalli3
Active Contributor
0 Likes
437

Dear Friends,

I have written the Validation Like this,However it is working in Miro and not considering cenvat clearing accounts and able to post miro, but it is taking wrong business area and not working in another t.codes like f-02,f-53,f-28, thereby taking wrong business area.

Prerequisite: BSEG-BUKRS = 'JSL'

Check : BSEG-GSBER = 'HRD' OR

BSEG-GSBER = 'CRD' OR

BSEG-GSBER = 'COR' OR

BSEG-GSBER = 'JPB' OR

BSEG-GSBER = '' OR

SYST-TCODE <> 'MIRO'

Message : E : 023 :Please Check the Business Area

Also, The user is posting wrong business area ;Ex: in the first line item he should post Business area ABC and second line item ABC, instead he is posting EFG, which is wrong.

Another condtion is if Document type is ZA and ZB, There can be two different business areas in two line items.In first line item business area is ABC and second line item is BCD.

Please suggest how to write correct the validation.

Regards

Sridhar

1 ACCEPTED SOLUTION
Read only

nirajgadre
Active Contributor
0 Likes
396

Hi,

1. I guess in order to trigger the validation for f-02,f-53,f-28 as well you need to add these codes into the prerequisite and in check you can use the user exit.

2. in order to validate the business area you can add the user-exit in the validation which need to be written in the program by coping the program RGGBR000 into Z program and same is need to configured in the T80D table.

3. check the different condition in the exit and pass the return value as abap_true and abap_false.

2 REPLIES 2
Read only

nirajgadre
Active Contributor
0 Likes
397

Hi,

1. I guess in order to trigger the validation for f-02,f-53,f-28 as well you need to add these codes into the prerequisite and in check you can use the user exit.

2. in order to validate the business area you can add the user-exit in the validation which need to be written in the program by coping the program RGGBR000 into Z program and same is need to configured in the T80D table.

3. check the different condition in the exit and pass the return value as abap_true and abap_false.

Read only

sridhar_muthekepalli3
Active Contributor
0 Likes
396

thanks for the answers