BAPI_ACC_DOCUMENT_POST Enter rate / GBP rate type M for Error SG105

Folks,

 

I was wondering if I could get a bit of help here as I've been racking my brains on it for ages.

 

I am using BAPI_ACC_DOCUMENT_POST to post an FI Document. When I run the FM with the below parameters I get the message back:

SG105 Enter rate  / GBP rate type M for 23.06.2011 in the system settings

 

When I debug the BAPI I can see that the blank value is coming from the localcurrency field in the BAPI which is not getting populated. My questions is why is it trying to do a currency conversion at all when the document currency is GBP and the company code currency is GBP (and I am passing 10 into the currency type)?

 

Our controlling area currency in our system is EUR, could that be an issue?

 

Parameters:

 

Document Header:

USERNAME                                             CGAVIN

HEADER_TXT                                             Rmaterials Manual Ac

COMP_CODE                                             GB01

DOC_DATE                                             20110623

PSTNG_DATE                                             20110623

TRANS_DATE                                             00000000

FISC_YEAR                                             2011

DOC_TYPE                                             SA

REF_DOC_NO                                             Rmaterials Manua

 

ACCOUNTGL[1]

ITEMNO_ACC                                             0000000001

GL_ACCOUNT                                             0002022700

ITEM_TEXT                                             Test

PSTNG_DATE                                             20110623

COSTCENTER                                             GB0101004

 

ACCOUNTGL[2]

ITEMNO_ACC                                             0000000002

GL_ACCOUNT                                             0004000000

ITEM_TEXT                                             Test

TAX_CODE                                             UB

 

ACCOUNTTAX[1]

ITEMNO_ACC                                             0000000003

GL_ACCOUNT                                             0001610001

COND_KEY                                             MWVS

ACCT_KEY                                             VST

TAX_CODE                                             UB

TAX_RATE                                             20.000

 

CURRENCYAMOUNT[1]

ITEMNO_ACC                                             0000000001

CURR_TYPE                                             10

CURRENCY                                             GBP

AMT_DOCCUR                                             1000.0000

 

CURRENCYAMOUNT[2]

ITEMNO_ACC                                             0000000002

CURR_TYPE                                             10

CURRENCY                                             GBP

AMT_DOCCUR                                             833.3300-

 

CURRENCYAMOUNT[3]

ITEMNO_ACC                                             0000000003

CURR_TYPE                                             10

CURRENCY                                             GBP

AMT_DOCCUR                                             166.6700-

AMT_BASE                                             833.3300-

 

And after that I changed my parameters to the below, which solved the problem.

 

Parameters:

 

Document Header:

USERNAME CGAVIN

HEADER_TXT Rmaterials Manual Ac

COMP_CODE GB01

DOC_DATE 20110623

PSTNG_DATE 20110623

TRANS_DATE 00000000

FISC_YEAR 2011

DOC_TYPE SA

REF_DOC_NO Rmaterials Manua

 

ACCOUNTGL[1]

ITEMNO_ACC 0000000001

GL_ACCOUNT 0002022700

ITEM_TEXT Test

PSTNG_DATE 20110623

COSTCENTER GB0101004

 

ACCOUNTGL[2]

ITEMNO_ACC 0000000002

GL_ACCOUNT 0004000000

ITEM_TEXT Test

TAX_CODE UB

 

ACCOUNTTAX[1]

ITEMNO_ACC 0000000003

GL_ACCOUNT 0001610001

COND_KEY MWVS

ACCT_KEY VST

TAX_CODE UB

TAX_RATE 20.000

 

CURRENCYAMOUNT[1]

ITEMNO_ACC 0000000001

CURR_TYPE 00

CURRENCY GBP

AMT_DOCCUR 1000.0000

 

CURRENCYAMOUNT[2]

ITEMNO_ACC 0000000001

CURR_TYPE 10

CURRENCY GBP

AMT_DOCCUR 1000.0000

 

CURRENCYAMOUNT[3]

ITEMNO_ACC 0000000002

CURR_TYPE 00

CURRENCY GBP

AMT_DOCCUR 833.3300-

 

CURRENCYAMOUNT[4]

ITEMNO_ACC 0000000002

CURR_TYPE 10

CURRENCY GBP

AMT_DOCCUR 833.3300-

 

CURRENCYAMOUNT[5]

ITEMNO_ACC 0000000003

CURR_TYPE 00

CURRENCY GBP

AMT_DOCCUR 166.6700-

AMT_BASE 833.3300-

 

CURRENCYAMOUNT[6]

ITEMNO_ACC 0000000003

CURR_TYPE 10

CURRENCY GBP

AMT_DOCCUR 166.6700-

AMT_BASE 833.3300-

你可能感兴趣的:(document)