Skip to Content
avatar image
-1
Former Member

DOCHEADER_PERIOD_FIND_CHECK behaving differently in FB60 and standalon or custom program

Hi All,

I am posting document via FB60 and we are getting warning when posting date and invoice date are in different fiscal year.

But when i use the FM DOCHEADER_PERIOD_FIND_CHECK standalone in custom program, it is throwing error for the above case.

FB60 also calls the same FM.

What could be the reason for this FM to behave differently in FB60 and custom program.

The passing parameters are same in both the cases. i also checked if there is any global variable being used in case of FB60 which makes it as warning instead of error. but there is none.

Thanks

Seema

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Apr 11, 2017 at 05:17 PM

    Debug it ...

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 12, 2017 at 04:10 PM

    Now it is clear.

    The function module sends a message and the system behavior after sending a message is context sensitive.

    https://help.sap.com/http.svc/rc/abapdocu_751_index_htm/7.51/en-US/index.htm?file=abenabap_messages_types.htm

    I bet, you call the FM in a context, where a warning is sent as an error.

    Add comment
    10|10000 characters needed characters exceeded

    • You cannot execute an FM alone. Of course it is always called from a program. What else is the function builder but an ABAP program? As I said, set a breakpoint in any FM, execute it "standalone", and look at the callstack.