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 Posting Vendor Down Payment (F-48)!

Former Member
0 Likes
13,143

Hi,

Is there any BAPI available for Posting Vendor down payment entry(F-48)?

FYI, I tried BAPI_ACC_DOCUMENT_POST. But i'm sure this won't work for down payment.

The search engine couldn't give the appropriate results, So i'm posting here. Please suggest me if you know any.

1 ACCEPTED SOLUTION
Read only

RaymondGiuseppi
Active Contributor
0 Likes
9,949

But i'm sure this won't work for down payment.

Should work after implementation of 2274732 - Incorrect document status when posting noted items with BAPI_ACC_DOCUMENT_POST .

Regards,

Raymond

23 REPLIES 23
Read only

Ashg1402
Contributor
0 Likes
9,949

Hi,

Have a look at this link, I think it might be helpful.

Regards

Read only

Former Member
0 Likes
9,949

Thank you for your kind reply.

I tried that too. But it  is not considering the values I'm passing. It all remains as a deadcode.

Read only

RaymondGiuseppi
Active Contributor
0 Likes
9,950

But i'm sure this won't work for down payment.

Should work after implementation of 2274732 - Incorrect document status when posting noted items with BAPI_ACC_DOCUMENT_POST .

Regards,

Raymond

Read only

0 Likes
9,949

Thank you Raymond.

The description is well explained and satisfies my needs.

But while implementing it is throwing syntax error(e.g., GD_EXIT is not avail, But there is one variable called G_EXIT). But somehow it got implemented and now when executing the program it is going dump when it reaches the BAPI call. So, my functional consultant told me to revert the changes since it is impacting the custom code.

Thanks,

Priya

Read only

0 Likes
9,949

Feel free to raise an incident to OSS if the SNOTE raised an error (missing pre-requisite or bug unexpected feature)

Regards,

Raymond

Read only

0 Likes
9,949

Thank you for your reply again.

No. It is not raising that kind of error messages. Moreover the problem is with the version in the system and the corresponding note. I should've mentioned in my previous message itself. Sorry for that.

I am really eager to know if it can be attained via BADI. i.e., "BADI_ACC_DOCUMENT".

Read only

0 Likes
9,949

Hi,

  Do you want to use a BADI or a BAPI? You don't normally use BADIs for posting documents; they are typically used for making adjustments during the posting process.

cheers

Paul


Read only

0 Likes
9,949

Thank you for the reply.

ya I understand the difference. I raised a query in BADI because in return parameters in normal posting(BAPI_ACC_DOCUMENT_POST) it is capturing error like 'Withholding tax amount exceeds total bank line item amounts'(attached screen shot for your kind reference). So I thought If I maintain 'Special G/L Indicator(UMSKZ)' or 'Document Status(BSTAT)' the downpayment vendor document would get posted.

Thanks,

Priya

Read only

0 Likes
9,949

Hi Priya,

You can change the values in the BADI for Special GL indicator and BSTAT in the method CHANGE of the BADI ACC_DOCUMENT. Also check class CL_EXM_IM_ACC_DOCUMENT for Sample implementation of the method.

Hope this helps.

Read only

0 Likes
9,949

Thank you.

I tried that too with the below piece of code.


IF wa_extension-structure = 'BASE_AMOUNT'.

    READ TABLE c_accit INTO wa_accit

                         WITH KEY posnr = wa_extension-valuepart1.

    IF wa_accit-umskz = 'A'.

      wa_accit-bstat = 'S'.

      IF sy-subrc eq 0.

         MODIFY c_accit FROM wa_accit INDEX sy-tabix TRANSPORTING bstat. " umskz.

      ENDIF.

    ENDIF.

ENDIF.



But in return it is capturing "Posting key 50 does not permit specification of a special G/L indicator".

Read only

subhadeep_das
Contributor
0 Likes
9,949

Hi,

pls check if you can maintain the special GL indicator in any field at the line item level of BAPI. Also use posting key 29 (Special GL Debit).

best regds

Subha

Read only

0 Likes
9,949

Thank you for the reply.

Yes. I'm maintaining the special gl indicator. i.e., If the posting key is 29 then corresponding special gl indicator will be passed.

Thanks,

Priya

Read only

0 Likes
9,949

Hi Priya,

try to understand the accounting entries of vendor downpayment. It should be

Vendor a/c Dr.....50,000

     To Bank A/c Cr.....50,000

Vendor Acount Debit (with Posting key as 29). Also you have to indicate the advance payment type.

Bank Account Credit ( with posting key as 50).

best regds

Subha

Read only

0 Likes
9,949

Thank you.

Ya. I have clear view in different set of posting keys and also the relevancy in down payment.

But Can you please suggest me how to write the logic with advance payment type ?

Thanks,

Priya

Read only

0 Likes
9,949

Hi,

can you pls specify what is your exact requirement ? All advance payments can be dealt with Special GL indicator configuration. Once you are clear on that you can check the BAPI you had mentioned in your first post. You will be able to see the field to be used . Pls refer the screen shot of BAPI_ACC_DOCUMENT_POST, I have marked the filed you need to create advance payment down payment transaction.

best regds

Subha

Read only

Former Member
0 Likes
9,949

Thank you.

My requirement is to post the document in two scenarios..

1.) Invoice Scenario(Usual one) 2.Payment Scenario(i.e., Vendor DownPayment)

While I pass special GL Indicator, it is showing like "No accts maintained for company code clearing between comp.cds 'X1' and 'X2' ". I checked in FS00. It shows like the account has been maintained for corresponding company code.

Thanks,

Priya

Read only

0 Likes
9,949

What did you check with FS00, execute OBYA for Cross-Company Accounting Customizing, or (better) ask functional (this is Customizing not Abap related)

Regards,

Raymond

Read only

0 Likes
9,949

Since it is capturing like "No accts maintained for company code clearing between comp.cds 'X1' and 'X2' "  in BAPI I check FS00 to know that whether that GL Account exists for that company code or not. 


Ya. I am aware of the tcode that it is a functional customization.  I didn't raise any functional question. Subhadeep Das was suggesting me some good amount of information and while I'm passing those input I'm getting that error. Before posting in SCN i surf in search engine and ended up in this tcode FS00. So I posted along with that. And Before all I asked my functional too. He says everything is configured properly as per the requirement.



Thanks,

Priya

Read only

0 Likes
9,949

So I hope you checked in FS00 the existence of accounts defined in OBYA.

Regards,

Raymond

Read only

0 Likes
9,949

did you check the inter company code transaction configuration ? It is done through OBYA. The error message you highlighted suggests the issue is with intercompany code transaction and not your special gl transaction.

best regds

Subha

Read only

0 Likes
9,949

Thanks @ Raymond, Subha..

I asked my functional. He said Intercompany code settings are not required in this case.

I'm really confused and Now I'm thinking like I can use BDC for this down payment posting.

Thanks,

Priya

Read only

0 Likes
9,949

Check in your test data if you didn't inadvertently use objects of two different companies as a cost-center or any other object?

Regards,

Raymond

Read only

Former Member
0 Likes
9,949

Hey, does anybody own a full example for posting a vendor down payment via BAPI_ACC_DOCUMENT_POST ?!

Normal posting is okay, also parking but I struggl with down paymant.

KR

Simon