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

BAPI for the tcode FB60

Former Member
0 Likes
5,064

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
Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
4,686

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
Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
4,687

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

Read only

0 Likes
4,686


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??

Read only

0 Likes
4,686

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

Read only

0 Likes
4,686

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

Read only

0 Likes
4,686

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).

Read only

0 Likes
4,686

why dont you use BAPI_ACC_DOCUMENT_POST with BADI stuff?

Read only

0 Likes
4,686

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

Read only

0 Likes
4,686

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

Nabheet

Read only

0 Likes
4,686

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

Regards,

Raymond

Read only

0 Likes
4,686

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

Read only

0 Likes
4,686

Hi Reymond,

Thanks for your reply.

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

Read only

0 Likes
4,686

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

Read only

0 Likes
4,686


Hi nabheet ,


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

Read only

0 Likes
4,686

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

Read only

0 Likes
4,686

, wrap those in customer RFC enabled FM.

Regards,

Raymond

Read only

0 Likes
4,686

Hi Raymond,

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

Read only

0 Likes
4,686

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

Read only

0 Likes
4,686

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.

Read only

0 Likes
4,686

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

Read only

0 Likes
4,686

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

Regards,

Raymond

Read only

0 Likes
4,686

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 ??

Read only

0 Likes
4,686

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

Nabheet

Read only

0 Likes
4,686

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).

Read only

0 Likes
4,686

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

Read only

0 Likes
4,686

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.

Read only

0 Likes
4,686

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

Nabheet

Read only

0 Likes
4,686

Hi nabheet ,

Is it possiable to do tcode fb60 through BDC method ?

Read only

Former Member
0 Likes
4,686

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.