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 the tcode FB60

Former Member
0 Kudos

Hi  Experts,

I need to park and vendor invoice through a bapi (tcode fb60) .And i found a solution  to this problem in the thread http://scn.sap.com/message/13463601#13463601 . But I am not able to  solve the issue please provide your valuable suggestion to solve this problem???

1 ACCEPTED SOLUTION

nabheetscn
Active Contributor
0 Kudos

There are two steps one is use BAPI PI_ACC_DOCUMENT_POST and second is implement BADI AC_DOCUMENT and set the status their as park?

Nabheet

28 REPLIES 28

nabheetscn
Active Contributor
0 Kudos

There are two steps one is use BAPI PI_ACC_DOCUMENT_POST and second is implement BADI AC_DOCUMENT and set the status their as park?

Nabheet

0 Kudos


Hi nabheet ,

Thank you for u r reply .

Would you please explain how to implement BADi_AC_DOCUMENT.

I would also like to know any bapi available for reject and release the parked vendor invoice??

0 Kudos

HI

BAPI_INCOMINGINVOICE_PARK, This replicate MIR7 functionality. TCode FV60 for parking FI docs however doesn;t have an associated BAPI.

SAP does have a BAPI for Parking Documents under MM. At least it does for Invoices and related documents, Check out BAPI_INCOMINGINVOICE_PARK and the entire list of BAPIs under:

Material Management > Purchase Order > Incoming Invoice

It does not, however provide any BAPIs (as I know) under FI (corresponding to transactions FV60 etc).

However, The Fv60 calls POST_DOCUMENT function module to post the document.Take a look at the FM

0 Kudos

Go to se18 create implementation for aCC_DOCUMENT badi in method change assign hdr-status_new value 3.

check in debugging when you execute your bapi code will stop here

Nabheet

0 Kudos

Hi,

BAPI_INCOMINGINVOICE_PARK is to park  a document pased on the po number.But i need to park the vendor invoice.Can i use the same bapi to park vendor invoice ?(please provide some example).

0 Kudos

why dont you use BAPI_ACC_DOCUMENT_POST with BADI stuff?

0 Kudos

Hi nabheet ,

I got error while using the   BAPI_ACC_DOCUMENT_POST

I follow this document to implement

Vendor Invoice Posting using BAPI - Code Gallery - SCN Wiki

Error Like this

Error in document: REACI $ T90CLNT090

G/L account 82570 is not defined in chart of accounts CAJP

0 Kudos

This is master data error either GL account does not exist or it does exist please add leading zeros

Nabheet

0 Kudos

Always use internal format (leading zeroes) when using BAPI.

Regards,

Raymond

0 Kudos

In the BAdI set the status of the document :


the status of the document to "parked" (the field T_ACCHD-STATUS_NEW is changed to 2 or 3) using an implementation of the Business Transaction Event (BTE) RWBAPI01 or of the BAdI AC_DOCUMENT

Regards,

Raymond

0 Kudos

Hi Reymond,

Thanks for your reply.

I would like to know there is any bapi available to Release or Reject a parked vendor invoice ?

0 Kudos

For Rejecting you can use PRELIMINARY_POSTING_REL_RESET and for releasing you can use PRELIMINARY_POSTING_RELEASE. Please check FIPP business object in SWO1. check various metthods what code they use

Nabheet

0 Kudos


Hi nabheet ,


I need the result in the mobile screen so  I dont think it is working fine for me

0 Kudos

Hi Karthik

SAP standard uses these FM for the same.. In case you want them to be called via RFC or something if they are not rfc enabled then you can create a wrapper rfc enabled fm call thses inside it..

What is the issue if its mobile?

Nabheet

0 Kudos

, wrap those in customer RFC enabled FM.

Regards,

Raymond

0 Kudos

Hi Raymond,

would pls tell me  how can i pass my result to mobile screen if i use Fm suggested by nabheet??

0 Kudos

From mobile screen you can call the RFC enalbled function module...and return the results in tables parameters

0 Kudos

Hi nabheet,

The fm suggested by you doesn't contain any table or changing parameter it call the standarad sap screen based on the company code and document number.

0 Kudos

If you check both the function module they have exceptions getting raised. Based on the exception you can fill return table in your ZRFC function module

For release you can use PRELIMINARY_POSTING_REL_SET.

Go to SWO1--enter FIPP ->Display-->Check methods of release they are calling these fm only

Nabheet

0 Kudos

You don't need any more parameter, just analyze raised exception (NOT_RELEASED, RELEASED or CANCELLED)

Regards,

Raymond

0 Kudos

Hi,

By using this FM ' PRELIMINARY_POSTING_REL_SET'  I am not able to trigger workflow in fb60.

Could you please help me to solve this ??

0 Kudos

Do you want to trigger workflow or what exactly is the requirement..?

Nabheet

0 Kudos

Hi nabheeet ,

I need to do fb60(vendor invoice)  through mobile for that i created RFC for doing that ,

then i use  the Fm PRELIMINARY_POSTING_REL_SET  for release vendor invoice ,then it doesn't get update in the workflow (fb60).

0 Kudos

So does the FB60 release is set but worklfow does not get updated for the same...? First please confrim if the release indicator gets set or not?

Nabheet

0 Kudos

Hi,

Now  I am trying to release the vendor invoice which is created through fb60,

but now I am getting update error when excuting the RFC.

0 Kudos

Please switch on RFC debugging to checck what is the issue...

Nabheet

0 Kudos

Hi nabheet ,

Is it possiable to do tcode fb60 through BDC method ?

Former Member
0 Kudos

Hi,

How can i pass sap screen into mobile ?.

  • Mobile user select Release or Reject Button from the mobile screen.so based on that i need to call the bapi.