Application Development 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: 

FB60 - Profit Center check for GL A/C

former_member355168
Participant
0 Kudos

Dear Experts,

I need to check profit center for particular GL a/c. it entered profited center does not belong to entered gl a/c. it system should throw error message.

I am using EXIT_SAPLF048_001 exit. And this is working fine but after display of msg all the fields on screen getting cleared and user does not with to re-enter the all fields again. I hv used following msg type.

{code}

LOOP AT doc_item_tab INTO wa_doc_item_tab WHERE hkont EQ '0034135122'.

   IF wa_doc_item_tab-prctr NE '0000010000'.

       MESSAGE 'Invalid Profit Center for GL' TYPE 'I' DISPLAY LIKE 'E'.

*    MESSAGE e005(zfi005).      "'Invalid Profit Center for GL' TYPE 'S'.   

     LEAVE TO CURRENT TRANSACTION.

   ENDIF.

ENDLOOP.

{code}

The message i hv used is of status message. but it is getting displayed as pop up. after pressing ok, everything getting lost.

can any one suggest some modification in above code OR should i go for other enhancements  (Validations, substitutions, BTES or BAdi.)

Thanks in advance.

Jaspal

1 ACCEPTED SOLUTION

Former Member
0 Kudos

here is the perfect solution regarding where to write code.

i dont have any idea for the table which contains profit center and gl account.

in program goto screen 0100.

navigate to this form as shown in screenshot.

create implicit enhancement in the starting of the form.

look this screenshot carefuuly i have explained everything u need.

there is a structure that contains the value of G/L account and

profit center.

u can create your check and validations accordingly.

revert back if problem still not solved.

4 REPLIES 4

Former Member
0 Kudos

Hi,

I would request you to use validation functionality for this using sets (line item level), so that i will be easy to maintain as well.

(substitution and validation - FICO functional topic)

Thanks,

Kiran Yelamarthi

eduardo_hinojosa
Active Contributor
0 Kudos

Hi Jaspal,

Please, see SAP Note 826357 - Profit Center Accounting and New General Ledger in SAP ERP. It recommends BADIs or substitutions under some conditions.

I hope this helps you

Regards

Eduardo

Former Member
0 Kudos

here is the perfect solution regarding where to write code.

i dont have any idea for the table which contains profit center and gl account.

in program goto screen 0100.

navigate to this form as shown in screenshot.

create implicit enhancement in the starting of the form.

look this screenshot carefuuly i have explained everything u need.

there is a structure that contains the value of G/L account and

profit center.

u can create your check and validations accordingly.

revert back if problem still not solved.

0 Kudos

Thanks a lot abhishek. excellent answer.  .