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: 

passing Value to BAPI_INCOMINGINVOICE_PARK (simulate MIR7)

Former Member
0 Kudos

Hi all,

I am using BAPI_INCOMINGINVOICE_PARK to simulate the transacation of MIR7. I pass in all the values that I input in MIR7 into the BAPI, but it needs me to input the payment terms which is null when I use MIR7 to creat the invoice.

Actually, I am not creating the "INVOICE" but the "SUBSEQUENCE CREDIT", however, I cannot find a parameter for me to select document type. I think this may afftect the input parament requirement of the function BAPI_INCOMINGINVOICE_PARK. Which means input requirement of INVOICE and SUBSEQUECE CREDIT may be different.

Here is the data that I input for the BAPI:

Header Data

BLINE_DATE : 14.08.2008

COMP_CODE : 1000

DOC_DATE : 10.05.2008

GROSS_AMOUNT : 20

HEADER_TXT : REMARKS

INVOICE_IND :

PSTING DATE : 14.06.2008

REF_DOC_NO : 5000005110

CURRENCY : EUR

Item Data

ITEM_AMOUNT : 20

PO_ITEM : 11

PO_NUMBER : 1200001269

QUANTITY : 2

REF_DOC_IT : 2

REF_DOC : 2100005110

REF_DOC_YEAR : 2008

INVOICE_DOC_ITEM : 1

GLAccountdata

COMP_CODE : 1000

COSTCENTER : 1000350000

INVOICE_DOC_ITEM : 1

ITEM_AMOUNT : 20

GL_ACCOUNT : 15906

DB_CR_IND : H

Hope you can help me on this issue, thanks a lot.

Regards,

Mandy

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Thanks, I have try that, but I still get the same error:

Message Type E, ID M8, Number 366, Message Payment terms are incorrect.

8 REPLIES 8

former_member182371
Active Contributor
0 Kudos

Hi,

for the payment terms there is:

BAPI_INCINV_CREATE_HEADER-PMNTTRMS

Bestb regards.

Former Member
0 Kudos

Thanks for you answer. I think you may not get my point of question. My problem is when I pass in the values to create the invoice(subsequence credit) using MIR7, I pass in no values in the "payment terms" and it works. Expects suggested me to use BAPI_INCOMINGINVOICE_PARK to simulate the whole process. However, when I use all the same parameters to create the invoice using BAPI_INCOMINGINVOICE_PARK, it required me to input the payment terms (which is not required in the MIR7), therefore, I want to know the following:

1. What is the value of blank payment terms that I can use to simulate the process? (where can I find that?)

2. where can I selec the type = subsequence credit rather than invoice

Regards,

Mandy

0 Kudos

Hi,

i think i´ve found it:

have a look at BAPI_INCINV_CREATE_ITEM-DE_CRE_IND

which stands for "Indicator: subsequent debit/credit"

Best regards.

former_member182371
Active Contributor
0 Kudos

Hi,

in the documetation of the bapi it says:

Checks:

If you do not enter any data in the following fields, then the system determines the required data according to the given priorities. If the system cannot determine any data, you receive corresponding confirmations from the method call. These are listed in the return parameter.

Terms of payment

1. The system determines the terms of payment from the field PMNTTRMS or the fields DSCT_DAYS1, DSCT_DAYS2, DSCT_PCT1, or DSCT_PCT2.

2. The system determines the terms of payment from the first purchase order.

So i guess that the po used in the bapi call needs to have the corresponding payment terms.

also in the documentation of field invfo-zterm of MIR7 it says:

Terms of payment key

Key for defining payment terms composed of cash discount percentages and payment periods.

Use

It is used in sales orders, purchase orders, and invoices. Terms of payment provide information for:

Cash management

Dunning procedures

Payment transactions

Procedure

Data can be entered in the field for the terms of payment key in various ways as you enter a business transaction:

In most business transactions, the system defaults the key specified in the master record of the customer/vendor in question.

In some transactions (for example, credit memos), however, the system does not default the key from the master record . Despite this, you can use the key from the customer/vendor master record by entering "*" in the field.

Regardless of whether or not a key is defaulted from the master record, you can manually enter a key during document entry at:

item level in sales orders

header level in purchase orders and invoices

Note

Master records have separate areas for Financial Accounting, Sales, and Purchasing. You can specify different terms of payment keys in each of these areas. When you then enter a business transaction, the application in question will use the key specified in its area of the master record.

Best regards.

Edited by: pablo casamayor on Jun 16, 2008 10:53 AM

Former Member
0 Kudos

Mandy Au,

Fill the field ITEMDATA-DE_CRE_IND with 'X' for all line items to create the Subsequent credit note.

*****Reward points if useful

Regards,

Kiran Bobbala

Former Member
0 Kudos

Thanks, I have try that, but I still get the same error:

Message Type E, ID M8, Number 366, Message Payment terms are incorrect.

0 Kudos

Hi,

please have a look at OSS note 849867

Best regards.

Former Member
0 Kudos

Thanks, I think that is the problem, that is the program error which need packages. Not my own problem, thanks for all you help.

Regards,

Mandy