Application Development 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: 

BAPI - For Clearing Vendors by using Document Number in F-51.

Former Member
0 Kudos
3,744

Hi One and All,

As I have searched Forum before posting, I found few BAPI's and FM's which are not helpful for my requirement.

a. 'BAPI_PAYM_ITEM_POST_CLEARING'

b. 'POSTING_INTERFACE_CLEARING' and soon.

I am Posting the Vendor Invoice as in F-43 Using 'BAPI_ACC_DOCUMENT_POST' , Now I want to Clear these generated Document no.s in F-51.

By manually I can do it, But I need a BAPI / FM to do Clear a bunch of Vendor Document Numbers.

Welcome for all suggestions.

Regards,

Suneel G

1 ACCEPTED SOLUTION

Former Member
0 Kudos
932

Not sure if there is a BAPI that will serve your purpose; however, I have done the same using BDC (not terribly difficult).

Rob

16 REPLIES 16

Former Member
0 Kudos
932

Hi

U can try to use the standard program RFBIBL00.

Max

0 Kudos
932

Hi Max,

Thanks for the Reply, I am blank with program given by You 'RFBIBL00' (Seems to be a program for Direct Input Method).

Could be help if you can provide me any BAPI / FM.

Regards,

Suneel G

0 Kudos
932

Hello Suneel,

Please read the documentation for RFBIBL00, using "Data Transfer Type" you can generate a Batch I/P session or Direct post using CALL TRANSACTION.

I think RFBIBL00 will be fine as it supports 'Posting with Clearing'.

Br,

Suhas

0 Kudos
932

Hi Suhas Saha ,

I have a Two Document Numbers which has to get cleared, Could You please let me know how do I

use this Program to do so .

Any Sample piece code could be helpful.

Regards,

Suneel G

Former Member
0 Kudos
933

Not sure if there is a BAPI that will serve your purpose; however, I have done the same using BDC (not terribly difficult).

Rob

former_member194797
Active Contributor
0 Kudos
932

1) I think that 'POSTING_INTERFACE_CLEARING' is the right FM, but you said that this function is not helpful for your requirement; you don't say why.

2) RFBIBL00 is calling 'POSTING_INTERFACE_CLEARING' , so if this function is not helpful, the program RFBIBL00 will also not be helpful.

0 Kudos
932

Hello Henri,

I think that if you read the documentation for RFBIBL00 it supports the trxn FB05.

F-51 is a parameter trxn for FB05. So i feel that F-51 posting can be simulated using RFBIBL00.

Any comments are welcome.

BR,

Suhas

former_member194797
Active Contributor
0 Kudos
932

Yes, RFBIBL00 supports FB05, but by calling 'POSTING_INTERFACE_CLEARING' . I think also that it is the solution, but Suneel said that FM 'POSTING_INTERFACE_CLEARING' was not helpful for his requirement. I don't know why.

0 Kudos
932

Hi Henri LOISEAU,

What I have done using this 'POSTING_INTERFACE_CLEARING' is:

Let say I have two Document Numbers which I have clear are

1. 1900000091

2. 150000031

From SE37 I executed this FM and Passed values as follows:

EXPORTING Values like:

I_AUGLV = 'UMBUCHNG'

I_TCODE = 'F-51'

*I_SGFUNCT =

*I_NO_AUTH =

TABLES

These are the values passed to structure T_BLNTAB

BELNR BUKRS GJAHR

1900000091 1000 2009

150000031 1000 2009

This FM throughs me a Error Saying :

Transaction Code F-51 is invalid.

So, I thought this FM 'POSTING_INTERFACE_CLEARING' will not Work for F-51 T-code.

Could please is this the way to Use this FM, If not let me know. And Once If I am able to Use this FM then How do I commit this Work Process.

Regards,

Suneel G

0 Kudos
932

Hi Suneel,

This FM throughs me a Error Saying :

Transaction Code F-51 is invalid.

This is because in the FM 'POSTING_INTERFACE_CLEARING' the following line is available...!

  IF TCODE NE 'FB05'.
    MESSAGE E006 WITH TCODE RAISING TRANSACTION_CODE_INVALID.
  ENDIF.

-Dileep .C

0 Kudos
932

Hi Dileep Kumar Chinnaiah,

If I change the T-code to FB05

T-code = FB05

Nothing message is given by FM 'POSTING_INTERFACE_CLEARING'

Could You please let know how documents can be cleared by this FM 'POSTING_INTERFACE_CLEARING' or by this Program RFBIBL00.

Regards,

Suneel G

Former Member
0 Kudos
932

Hi Suneel,

The FM is the correct one,,,! But you have the Above Exception,,,

Read the RFBIBL00 Documentation,,, Look how to pass the data in a Batch I/P....

Now lets put a break there,,, The RFBIBL00 Still calls the FM 'POSTING_INTERFACE_CLEARING', By this, the error may(I am not sure, But there is a chance) trigger again...!

The Alternate Solution may be, The FM 'POSTING_INTERFACE_CLEARING' calls

Include LFIPIF00 And if yo utry to look into that include,


  FT-PROGRAM  = REP_NAME_A.
  FT-DYNPRO   = '0105'.
  FT-DYNBEGIN = 'X'.
  APPEND FT.
  IF NOT BELNS IS INITIAL.
    CLEAR FT.
    FT-FNAM     = 'RF05A-BELNS'.
    FT-FVAL     = BELNS.
    APPEND FT.
  ENDIF.
  IF NOT BUKRS IS INITIAL.
    CLEAR FT.
    FT-FNAM     = 'BKPF-BUKRS'.
    FT-FVAL     = BUKRS.
    APPEND FT.
  ENDIF.
  IF NOT GJAHS IS INITIAL.
    CLEAR FT.
    FT-FNAM     = 'RF05A-GJAHS'.
    FT-FVAL     = GJAHS.
    APPEND FT.
  ENDIF.
  IF NOT BUDAT IS INITIAL.
    CLEAR FT.
    FT-FNAM     = 'BSIS-BUDAT'.
    FT-FVAL     = BUDAT.
    APPEND FT.
  ENDIF.
  CLEAR FT.
  FT-FNAM     = 'BDC_OKCODE'.
  FT-FVAL     = '/11'.
  APPEND FT.

  PERFORM TRANSAKTION_BEENDEN USING P_NO_AUTH.

I have seen the 100's of lines like the above code...! Which means You can simple write a BDC for your requirement...(Its just an alternate when no other option)

Thanks & regards,

Dileep .C

0 Kudos
932

Hi Dileep Kumar Chinnaiah,

BDC Could be my last option, I am blank how to use, wht structure to Upload to this RFBIBL00 and How ???

And How this FM 'POSTING_INTERFACE_CLEARING' work.

I am trying to use prg RFBIBL00 as by following few threads. I do't where it will end up me.

Regards,

Suneel G

Former Member
0 Kudos
932

I have tried the program 'RFBIBL00' and it works well. Please try!

0 Kudos
932

Hi flylyh Allen,

I am Trying my level best Could you please let me know How did you approach and succed to do so.

A snippet of code could be really helpful.

Regards,

Suneel G

Former Member
0 Kudos
932

Hi all Thanks for valuable suggestions... I could't find any BAPI .. So, I have done through BDC's...

Regards,

Suneel G