Skip to Content

BADI or Exit for MFBF Tcode

Hi Experts,

I need to do difference calculation in posting date and document date. I have made the code but not able to find exact BADI or exit for MFBF tcode.

BADI i searched - RM_BFLUSH_GOODSMVT

EXIT ???

Please suggest, where I have to put below code so that when user put dates into this, then it will not allow him to get more than 7 days.

data:  d_days like po347-scrdd,
	budat like mkpf-budat,
	bldat like mkpf-bldat.

budat = rm61b-budat.
bldat = rm61b-bldat.

CALL FUNCTION 'DAYS_BETWEEN_TWO_DATES'
  EXPORTING
    I_DATUM_BIS                   = budat
    I_DATUM_VON                   = bldat
   I_STGMETH                     = '2'
 IMPORTING
   E_TAGE                        = d_days
          .

if d_days > 7 .
  message 'date exceeds' type 'E'.
  elseif d_days < 0.
  message 'document date should be greater than posting date' type 'I'.
endif.

Please suggest experts,

Thanks.

Deepanshu

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Dec 10, 2011 at 10:48 AM

    Please advice experts.

    Thanks.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 11, 2011 at 03:17 PM

    Hi,

    Include - LBARMFS1

    FORM - FORM get_hr_data .

    Create a implicit enhancement in the beginning of above mentioned form FORM get_hr_data and put below code inside that.

    FORM get_hr_data.
    ENHANCEMENT 1 ZTEST_TEST.
    data:  d_days like po347-scrdd,
    	budat like mkpf-budat,
    	bldat like mkpf-bldat.
     
    budat = rm61b-budat.
    bldat = rm61b-bldat.
     
    CALL FUNCTION 'DAYS_BETWEEN_TWO_DATES'
      EXPORTING
        I_DATUM_BIS                   = budat
        I_DATUM_VON                   = bldat
       I_STGMETH                     = '2'
     IMPORTING
       E_TAGE                        = d_days
              .
     
    if d_days > 7 .
      message 'date exceeds' type 'E'.
      elseif d_days < 0.
      message 'document date should be greater than posting date' type 'I'.
    endif.
    ENDENHANCEMENT.

    BR,

    Vijay

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.