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

Release to Accounting (VF02 tcode)

0 Likes
5,568

Hi to all,

I need to implement my own code in Release to Accounting (VF02 tcode) . I need to check GL Account Number(bkpf e bseg) in order to change some fields to i am changing  xaccit[] Structure.

I was trying to use Exit's . But I wasn't able to find it . Anyone can help?

I am Using Following Exit's.

EXIT_SAPLV60B_004

EXIT_SAPLV60B_005

EXIT_SAPLV60B_006

EXIT_SAPLV60B_007

EXIT_SAPLV60B_008

Thanks in advance.

Regards,

Naresh.

Hi to all,

I need to implement my own code in Release to Accounting (VF02 tcode) . I need to check GL Account Number(bkpf e bseg) in order to change some fields to i am changing  xaccit[] Structure.

I was trying to use Exit's . But I wasn't able to find it . Anyone can help?

I am Using Following Exit's.

EXIT_SAPLV60B_004

EXIT_SAPLV60B_005

EXIT_SAPLV60B_006

EXIT_SAPLV60B_007

EXIT_SAPLV60B_008

Thanks in advance.

Regards,

Naresh.

18 REPLIES 18
Read only

RaymondGiuseppi
Active Contributor
0 Likes
4,878

What did you actually try in those exits (User Exits For Billing)

  • EXIT_SAPLV60B_001: Change the header data in the structure acchd
  • EXIT_SAPLV60B_002: Change the customer line (accit and accccr)
  • EXIT_SAPLV60B_003: Change the customer line in costing
  • EXIT_SAPLV60B_004: Change a GL account item (accit and acccr)
  • EXIT_SAPLV60B_005: User exit for accruals
  • EXIT_SAPLV60B_006: Change the control line (accit and acccr)

which error did you get or which functionality wasn't effective?


Regards,

Raymond

Read only

0 Likes
4,878

Hi Raymond Giuseppi,

When I am click Release to Accounting option In VF02 I am Getting below error.

Account 41461198 requires an assignment to a CO object

Message No. KI235

Regards,

Naresh.

Read only

0 Likes
4,878

So provide an assignment (order, WBS, etc) Check on item detail tab for account assignment (or use an account with a default assignment, Customizing OKB9)

If nothing found on the invoice item -> Ask functional on the object to use (rule of determination).

Hint: You should also check the Field Status Group of the account number (display account with FS00, go to tab Create/bank/interest, double-click on field status group value and navigate to Additional account assignments for mandatory/available/forbidden fields)

Regards,

Raymond

Read only

0 Likes
4,878

Hi ,

All above condition's are maintained still i am getting same error, Please guide me if any other process is there.

We have G/L account which is expense recoverable with cost element mandatory. System is now able to flow cost center and wbs element till invoice but the same is not appearing while generating accounting document for specific tax line items against which the expense recoverable account has been maintained. System is throwing error "

Account 41461198 requires an assignment to a CO object"

" even if CO object is present till invoice. i.e vbrp.

Kindly help us to identify the specific tax line items wherein CO object to be filled while Releasing the document through VF02.

Regards,

Naresh.

Read only

0 Likes
4,878

If functionals are unable to answer this question, you could code it, sample for "is cost center required could be"


* Required fields of account Nr

CALL FUNCTION 'FI_GET_FIELD_SELECTION_STRING'

  EXPORTING

    i_bschl  = '40'

    i_bukrs  = lv_bukrs

    i_koart  = 'S'

    i_saknr  = lvs_sakto

  IMPORTING

    e_string1 = lv_faus1

    e_string2 = lv_faus2

  EXCEPTIONS

    OTHERS  = 1.

* Is my bseg complient?

CALL FUNCTION 'FI_CHECK_ACCOUNT_ASSIGNMENT'

  EXPORTING

    i_kon_group        = '010' " or find this value in table TCOBF

    i_screen_name      = 'KOSTL'

    i_string1          = lv_faus1

    i_string2          = lv_faus2

    s_bseg             = ls_bseg

  EXCEPTIONS

    err_field_missing   = 1

    err_field_unallowed = 0

    OTHERS              = 0.

Regards,

Raymond

Read only

0 Likes
4,878

Hi Raymond Giuseppi,

Where Exactly i am writing the above code,if any exit is there.Kindly help us on this.

Regards,

Naresh.

Read only

0 Likes
4,878

Put this code in same Exit/BAdI where you changed the account number, as SAP already prepared the acci* table with (I suppose) some account for which no assignment was required, you have in some case to change some other fields that are now required or clear some no longer required.

Regards,

Raymond

Read only

0 Likes
4,878

Hi,

I am writing the code in following Exit:EXIT_SAPLV60B_008

Here Total 11 Line Items are Coming in following table  XACCIT, but Gl account is coming from only one line item also Again i am using following F.M: FI_CHECK_ACCOUNT_ASSIGNMENT in that F.M Bseg Is coming Empty.

Please Help me How to use this.

Regards,

Naresh.

Read only

0 Likes
4,878

You have to map (corresponding) received data to local structure of type bseg to be able to call the FM, where you will EXPORT this data. (Only faus1/2 are calculated by the system)

Regards,

Raymond

Read only

0 Likes
4,878

Hi Raymond,

Thank you for your reply, i am apply the above logic still i am getting same error ''

Account 41461198 requires an assignment to a CO object

Message No. KI235

"

if any other way is there solve that error.

Please Guide me.

Regards,

Naresh.

Read only

0 Likes
4,878

Once the FM stated than a field (e.g. KOSTL) is required you MUST fill it from somewhere (ask functional)

Read only

0 Likes
4,878

Hi Raymond,

I am Passing the Cost Center (KOSTL) field  Also , still getting the same error.

Please Check the Below Code.

i am Using the following Exit:EXIT_SAPLV60B_008

LOOP AT XACCIT.

CALL FUNCTION 'FI_GET_FIELD_SELECTION_STRING'

     EXPORTING

       I_BSCHL   = '40'

       I_BUKRS   = XACCIT-BUKRS

       I_KOART   = 'S'

       I_SAKNR   = XACCIT-HKONT

*     S_SKB1    = ' '

*     S_T001    = ' '

*     S_TBSL    = ' '

     IMPORTING

       E_STRING1 = E_STRING1

       E_STRING2 = E_STRING2

  EXCEPTIONS

      ERR_BSCHL_UNKNOWN        = 1

      ERR_BUKRS_UNKNOWN        = 2

      ERR_FS_CONSISTENCY       = 3

      ERR_FS_GROUP             = 4

      ERR_SAKNR_UNKNOWN        = 5

      OTHERS    = 6

     .

   IF SY-SUBRC <> 0.

* Implement suitable error handling here

   ENDIF.

s_bseg-kostl = '9350110000'.

   CALL FUNCTION 'FI_CHECK_ACCOUNT_ASSIGNMENT'

     EXPORTING

       I_KON_GROUP         = '010'

       I_SCREEN_NAME       = XACCIT-BUKRS

       I_STRING1           = E_STRING1

       I_STRING2           = E_STRING2

       S_BSEG              = S_BSEG

*      I_BLART             = 'RV'

     EXCEPTIONS

       ERR_FIELD_MISSING   = 1

       ERR_FIELD_UNALLOWED = 2

       OTHERS              = 3.

   IF SY-SUBRC <> 0.

* Implement suitable error handling here

   ENDIF.

endloop.

The Above internal table  XACCIT i am not getting GL Account And Kostl fields, But I am Passing the run time Still it's shown same error message.

Regards,

Naresh.

Read only

0 Likes
4,878

You must use the check FM with same values that you put in ACCIT, if you add the missing value to the check, the check could be successful, but final chance of succes are ZERO, so you must actually fill XACCIT-KOKRS.

Read only

0 Likes
4,878

Hi Raymond ,

In My Case field XACCIT-KOKRS is filled, still getting the same error, please Guide me.

Please See the Full Error Description.

Account 41461198 requires an assignment to a CO object

Message No. KI235

Diagnosis

You have not defined a CO account assignment for an account that is relevant to cost accounting.

System Response

Account 41461198 is defined as a cost element.
This means that you must always specify a CO account assignment.

Procedure

Enter one of the following CO account assignments

The posting row affected is 0000001007, account 41461198.

Regards,

Naresh.

Read only

ThangaPrakash
Active Contributor
0 Likes
4,878

This seems to be a problem with configuration in SPRO for in Default account assignment or in any other customizing.

Refer to the below links for details.

https://scn.sap.com/thread/1550874

Account XXX requires an assignment to CO object | SCN

https://scn.sap.com/thread/737978

Read only

ThangaPrakash
Active Contributor
0 Likes
4,878

Hello Naresh,

I hope it can be solved by implementing the below changes in the substitution.

Refer to the below link on how to implement ZOKB9 for Default Account assignment.

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b0eb4e57-c78c-2d10-e0bd-eca8728e7...

Regards,

Thanga

Read only

0 Likes
4,878

Hi Prakash,

where I am writing ZOBK9 Code, Is there any UserExit,Please Guide Me On that.

Regards,

Naresh.

Read only

0 Likes
4,878

What is the substitution you are using? (RGGBS000) or any custom one?

If it is a custom one you can add the ZOKB9 code with the substitution number on your own.

Make sure to add titles of the substitution in the routine FORM GET_EXIT_TITLES like below.


*Default Account assignment

exits-name  = 'U109'.

exits-param = c_exit_param_none.

exits-title = 'Profit center wise default acct assignment'.

APPEND exits.

Routine for substitution.


*---------------------------------------------------------------------*

* Profit center wise default account assignment OKB9 based on ZOKB9   *

*---------------------------------------------------------------------*

FORM u109.

DATA: lwa_zokb9 TYPE zokb9.

*  Select cost center from ZOKB9 table based on

*  Company code, cost element and profit center 

SELECT SINGLE *  

FROM zokb9     

INTO lwa_zokb9     

WHERE bukrs = cobl-bukrs     

AND kstar = cobl-hkont     

AND ( prctr = cobl-pprctr OR prctr = cobl-prctr ). 

IF sy-subrc = 0.   

cobl-kostl = lwa_zokb9-kostl. 

ENDIF.

ENDFORM.

In case of standard add it using Explicit enhancements or find a suitable EXIT or BADI.

Regards,

Thanga