08-23-2010 5:42 PM
Dear Gurus,
I struggled hard to find the fm or bapi to do parking of FI documents and after going through multiple threads at SDN i found that the function module PRELIMINARY_POSTING_FB01 can be used for the purpose. I tested and it seems to work except for the problem the it is aborting the process when it should through warning.
This FM call another FM FI_POSTING_KEY_CHECK which throws the warning message
IF NOT SY-SUBRC IS INITIAL.
MESSAGE W832 WITH I_BSCHL I_UMSKZ I_LANGU RAISING POSTING_KEY_TEXT.
ELSE.
LM_TBSLT = TBSLT.
APPEND LM_TBSLT.
ENDIF.
but the processing stops ther and the FM returns the same as error (Message type E). The same function module is called in the transaction FB01 and there it shows warning which can be ignored by pressing enter. Any clue how to overcome it.
Any Help will be appreciated .
Thanks and Regards,
Kumar Gaurav
08-23-2010 6:02 PM
F5 is one of those message classes that can be configured to behave differently by user - do you have this configured? (FI Global Settings - Documents)
09-10-2013 9:57 PM
Catch error message by adding exception to function module call and checking sy-subrc:
* Park document
CALL FUNCTION 'PRELIMINARY_POSTING_FB01'
EXPORTING
i_tcode = 'FV60'
TABLES
t_bkpf = t_bkpf
t_bseg = t_bseg
t_bsec = t_bsec
t_bset = t_bset
t_bsez = t_bsez
t_bkorm = t_bkorm
t_thead = t_thead
EXCEPTIONS
error_message = 1.