Application Development and Automation 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: 
Read only

FM POSTING_INTERFACE_CLEARING - Difference too large - Cannot distribute Difference

former_member317781
Active Participant
0 Likes
3,628

Hi Good day,

I have searched before asking this question, i dint get any answer am looking for hence am posting.

Am using FM : POSTING_INTERFACE_CLEARING for TCODE - FB05.

Its posting when balance = 0. it does not post if there is difference

ex : 2000 - 1000 = 1000 - does not post - Error is : The difference is too large for clearing

1000 - 1000 = 0 - Posts.

if there is a difference in i want it to Distribute the Difference and make to ZERO and should post.

Did anyone work on it?

Any input is highly appreciated.

Thanks,

Kata.

3 REPLIES 3
Read only

Former Member
0 Likes
2,660

Hi

Can you please let us know how to fill values in FM POSTING_INTERFACE_CLEARING funntion module.

Read only

0 Likes
2,660

Hi
Did you find the solution to this problem?

Thanks,

Haroldo.

Read only

zfq0218
Discoverer
0 Likes
2,660

U can fill ftpost parameter with a clearing item of remaining sum. Such as below.

  DEFINE populate_ftpost.

    it_ftpost-stype = &1.

    it_ftpost-count = &2.

    it_ftpost-fnam  = &3.

    it_ftpost-fval  = &4.

    IF it_ftpost-fnam = 'BSEG-GSBER'.
      IF it_ftpost-fval IS INITIAL.
      ELSE.
        APPEND it_ftpost.
      ENDIF.
    ELSE.
      APPEND it_ftpost.
    ENDIF.

  END-OF-DEFINITION.

       CASE gt_clear-koart.
            WHEN 'S'.
              IF l_hsl > 0.
                gt_resi_items-bschl  = '40'.
              ELSE.
                gt_resi_items-bschl  = '50'.
              ENDIF.
              gt_resi_items-newko = gs_itab-hkont.


            WHEN 'K'.
              gt_resi_items-gsber = gs_itab-gsber.
*                gt_resi_items-zuonr = ''.
              gt_resi_items-zfbdt = sy-datum.
              IF l_hsl > 0.
                IF  gt_clear-umskz IS NOT INITIAL.
                  gt_resi_items-bschl  = '29'.
                ELSE.
                  gt_resi_items-bschl  = '21'.
                ENDIF.

              ELSE.
                IF  gt_clear-umskz IS NOT INITIAL.
                  gt_resi_items-bschl  = '39'.
                ELSE.
                  gt_resi_items-bschl  = '31'.
                ENDIF.

              ENDIF.
               gt_resi_items-newko = gt_itab-lifnr.
            WHEN 'D'.
              gt_resi_items-gsber = gs_itab-gsber.
*                gt_resi_items-zuonr = ''.
              gt_resi_items-zfbdt = sy-datum.
              IF l_hsl > 0.
                IF  gt_clear-umskz IS NOT INITIAL.
                  gt_resi_items-bschl  = '09'.
                ELSE.
                  gt_resi_items-bschl  = '01'.
                ENDIF.
              ELSE.
                IF  gt_clear-umskz IS NOT INITIAL.
                  gt_resi_items-bschl  = '19'.
                ELSE.
                  gt_resi_items-bschl  = '11'.
                ENDIF.

              ENDIF.
              gt_resi_items-newko = gt_itab-kunnr.
            WHEN OTHERS.
          ENDCASE.

          populate_ftpost:  'P' 1 'RF05A-NEWKO' gt_resi_items-newko,
          'P' 1 'RF05A-NEWBS' gt_resi_items-bschl,
          'P' 1 'RF05A-NEWUM' gt_resi_items-umskz,
          'P' 1 'BSEG-SGTXT'  'RESIDUAL CLEARING ITEMS',
          'P' 1 'BSEG-WRBTR'  l_wrbtr, "the residual wrbtr
          'P' 1 'BSEG-GSBER'  gt_resi_items-gsber,
          'P' 1 'BSEG-ZUONR'  gt_resi_items-zuonr,
          'P' 1 'COBL-PRCTR'  gt_resi_items-prctr.
          IF gt_resi_items-zfbdt IS NOT INITIAL.
            populate_ftpost:   'P' 1 'BSEG-ZFBDT'  gt_resi_items-zfbdt.
          ENDIF.