01-15-2013 5:34 AM
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
01-16-2013 11:56 AM
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.
01-15-2013 5:39 AM
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
01-15-2013 8:14 AM
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
01-16-2013 11:56 AM
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.
01-17-2013 4:52 AM