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: 

Field COBL-RMVCT not updated in FB01 using BAPI 'BAPI_ACC_DOCUMENT_POST'

Former Member
0 Kudos

Hi Experts,

Hope all are doing greatu2026

I need you help to resolve the below issue.

We have on Z-Tcode to posting the document (FB01) using BAPI u2018BAPI_ACC_DOCUMENT_POST' and this program is successfully posted from the source file.

But the problem is, when we see the document (FB03) the field u2018TRANSACTION TYPEu2019 (COBL-RMVCT) not updated in second line item hence we are passing the value for u2018TRANSACTION TYPEu2019 (COBL-RMVCT) in source file.

I have checked the program in Debug mode and checked the BAPI structures before calling the BAPI and found that the field i_accountg-cs-trans_t is populated with value but it not updated in document.

Please help on this regards,

Thanks & Regards,

Amjad Hussain.

6 REPLIES 6

raymond_giuseppi
Active Contributor
0 Kudos

Did you check if the 'Transaction type' field in the 'consolidation' field status group was set to 'optional' or 'required' in the field status groups of the account. (Just call FB01 with your data to test.)

Regards,

Raymond

0 Kudos

Hi Raymond

Thanks for your responce..

I just run t-code FB01 using test data, it seems it option filed. Please advise what we need to da if this field is optional.

Thanks in advance.

Amjad.

eduardo_hinojosa
Active Contributor
0 Kudos

Hi

See SAP Note 487722 - Using EXTENSION1 for accounting BAPIs. You can use an extension for fields missing in the transfer structure. This note suggests you to use a BTE.

I hope this helps you

Regards

Eduardo

0 Kudos

Hi Eduardo

Thanks for your responce..

Could you please explain me step-by-step, how to proceed to enhance code.

Thanks & Regards,

Amjad Hussain

0 Kudos

Hi

The BAPI field should be BAPIACGL09-CS_TRANS_T, so you should set your value here (just as you'va said)

If thar value is not moved to accounting table you should check where that value is lost.

I don't think you need to use an enhancement, anyway if you want to try you can implement the BADI acc_document, methiod CHANGE in order to force a value in ACCIT-RMVCT

Max

0 Kudos

Hi

You can use the BTE or the BADI as Max suggests you. I explain you how to do it with note 487722. If you don't know how to works BTE, see this [article|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/207835fb-0a01-0010-34b4-fef1240ba9b7] by Lakshman Tandra.

I call the BAPI (with EXTENSIONIN) and I populate extensionin in a sample :



  data: w_extension type bapiextc,.
        
  w_extension(3) = '001'.
  w_extension+3(10) = itab-sold_to.
  append w_extension to t_extension.

after, create a project with enhancement ACBAPI01 and in EXIT_SAPLACC4_001 for the include ZXACCU15, write an ABAP code as this:


  data: wa_extension type bapiextc,
        lt_extencion type standard table of bapiextc.


  if  sy-cprog = 'Z*'
  and sy-ucomm = 'ZYXI'.                "set your filters

   read table extension with key field1(3) = '001'.
    if sy-subrc = 0.
       move-corresponding extension to wa_extension.
    endif.

   read table t_accit with key posnr = wa_extension(3).
   if sy-subrc = 0.
     t_accit-filkd = wa_extension+3(10).
     modify t_accit index sy-tabix.
   endif.

  endif.

In this case, I populate field FILKD because it isn't in the interface for the BAPI.

I hope this helps you

Regards

Eduardo