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

BDC program for KB31N

Former Member
0 Likes
1,265

Hi,

I want to develop a BDC programto enter statistical key figure values using KB31N, i do not find the correct screens to pass the values. Can any one help me solving this?

Thanks,

Sravanthi

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,057

Hi Sravanthi,

You can use this BAPI for Posting Statistical Key Figures.

FU BAPI_ACC_STAT_KEY_FIG_POST

____________________________________________________

Short Text

Accounting: Post Statistical Key Figures

Functionality

This method posts a document with statistical key figures.

The DOC_HEADER structure contains the document header data. The CO_AREA field must contain the controlling area in which you are to post. For an external number range, the DOC_NO field is specified for the document number.

The fields DOCDATE (document date) and POSTGDATE (posting date) are optional. For empty fields, the system enters the current date. The OBJ_KEY enables you to specify the number and organization of a reference document (each with 10 characters ). The OBJ_TYPE type field is defined for the object type of the reference document of the sending system.

You should only fill the LOGSYSTEM field if this document belongs to an external system. You can enter a document header text in the DOC_HDR_TX field. If a suitable screen variant exists, you can archive it in the VARIANT field. It only makes sense to fill the VERSION field if you are posting to a business process. This is because if Activity-Based Costing is active as a parallel accounting system, you must specify a delta version. Otherwise you may only post in version 0, which is also set as the default.

The USERNAME field is a required field.

The document item data is transferred to the DOC_ITEMS table. This consists of:

Field name Description Optional

-


STATKEYFIG Statistical key figure

STAT_QTY Statistical quantity

PERS_NO Personnel number X

SEG_TEXT Segment text X

REC_CCTR Receiver cost center

ACTVTYTYPE Activity type

RECEIV_ORD Receiver order

REC_WBS_EL Work breakdown structure element (WBS element)

RECSALEORD Receiver sales order

RECITEM Item number in the receiver sales order

RECCOSTOBJ Receiver cost object

RECBUSPROC Receiver business process

REC_NETWRK Receiver network

RECOPERATN Receiver network activity

RRE_COMP_CODE Company code of the receiving real estate object

RRE_BUS_ENT Receiver business entity - Real Estate

RRE_PROPERTY Receiver property - Real Estate

RRE_BUILDING Receiver building - Real Estate

RRE_RENT_UNIT Receiver rental unit - Real Estate

RRE_LEAS Receiver lease - Real Estate

RRE_MGMT_CON Receiver management contract

RRE_INC_EXP Receiver service charge key - Real Estate

RRE_SETT_UNIT Receiver settlement unit - Real Estate

RRE_REF_DATE Receiver reference date for settlement - Real Estate

RRE_CON_NO Receiver contract - Real Estate

REC_FUND Receiver fund

REC_FUNCTION Receiver functional area

REC_GRANT Receiver grant

The SRE_* fields are for sender real estate objects are obsolete and are not used.

The system displays the collected messages in the MESSAGES structure. With a successful posting, the system archives the document number in the DOC_NO parameter.

Parameters

DOC_HEADER

IGNORE_WARNINGS

DOC_NO

DOC_ITEMS

RETURN

CUSTOMER_FIELDS

Regards,

Raja.

Reward point if it helps

4 REPLIES 4
Read only

Former Member
0 Likes
1,058

Hi Sravanthi,

You can use this BAPI for Posting Statistical Key Figures.

FU BAPI_ACC_STAT_KEY_FIG_POST

____________________________________________________

Short Text

Accounting: Post Statistical Key Figures

Functionality

This method posts a document with statistical key figures.

The DOC_HEADER structure contains the document header data. The CO_AREA field must contain the controlling area in which you are to post. For an external number range, the DOC_NO field is specified for the document number.

The fields DOCDATE (document date) and POSTGDATE (posting date) are optional. For empty fields, the system enters the current date. The OBJ_KEY enables you to specify the number and organization of a reference document (each with 10 characters ). The OBJ_TYPE type field is defined for the object type of the reference document of the sending system.

You should only fill the LOGSYSTEM field if this document belongs to an external system. You can enter a document header text in the DOC_HDR_TX field. If a suitable screen variant exists, you can archive it in the VARIANT field. It only makes sense to fill the VERSION field if you are posting to a business process. This is because if Activity-Based Costing is active as a parallel accounting system, you must specify a delta version. Otherwise you may only post in version 0, which is also set as the default.

The USERNAME field is a required field.

The document item data is transferred to the DOC_ITEMS table. This consists of:

Field name Description Optional

-


STATKEYFIG Statistical key figure

STAT_QTY Statistical quantity

PERS_NO Personnel number X

SEG_TEXT Segment text X

REC_CCTR Receiver cost center

ACTVTYTYPE Activity type

RECEIV_ORD Receiver order

REC_WBS_EL Work breakdown structure element (WBS element)

RECSALEORD Receiver sales order

RECITEM Item number in the receiver sales order

RECCOSTOBJ Receiver cost object

RECBUSPROC Receiver business process

REC_NETWRK Receiver network

RECOPERATN Receiver network activity

RRE_COMP_CODE Company code of the receiving real estate object

RRE_BUS_ENT Receiver business entity - Real Estate

RRE_PROPERTY Receiver property - Real Estate

RRE_BUILDING Receiver building - Real Estate

RRE_RENT_UNIT Receiver rental unit - Real Estate

RRE_LEAS Receiver lease - Real Estate

RRE_MGMT_CON Receiver management contract

RRE_INC_EXP Receiver service charge key - Real Estate

RRE_SETT_UNIT Receiver settlement unit - Real Estate

RRE_REF_DATE Receiver reference date for settlement - Real Estate

RRE_CON_NO Receiver contract - Real Estate

REC_FUND Receiver fund

REC_FUNCTION Receiver functional area

REC_GRANT Receiver grant

The SRE_* fields are for sender real estate objects are obsolete and are not used.

The system displays the collected messages in the MESSAGES structure. With a successful posting, the system archives the document number in the DOC_NO parameter.

Parameters

DOC_HEADER

IGNORE_WARNINGS

DOC_NO

DOC_ITEMS

RETURN

CUSTOMER_FIELDS

Regards,

Raja.

Reward point if it helps

Read only

0 Likes
1,057

hi

BAPI_ACC_STAT_KEY_FIG_POST

how can i call this bapi in abap prog to upload kb31 data..

can u send me the sample code?

regds,

jp

Read only

Former Member
0 Likes
1,057

Hi,

Thanks for your reply, how to get the OBJ_KEY and OBJ_TYPE. For normal accounting document it is combination of document number,company code and year. For CO documnet it is combination of 'KS' or 'FS' followed by controlling area and costcenter. In this how to give the values?

Thanks

Read only

Former Member
0 Likes
1,057

Hi

u can either use KB31...dont use KB31N.

try this u will get ur desire result

regds,

jigar p