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

Getting error rw 602 in BAPI_ACC_GL_POSTING_POST

Former Member
0 Likes
6,672

Hi,

I am trying to implement this bapi in BADI of MIGO according to requirement. This BAPI is giving error like

Error in document: BKPFF $ STDCLNT600

Required field PSTNG_DATE was not transferred in parameter ACCOUNTGL

Required field PSTNG_DATE was not transferred in parameter ACCOUNTGL

I have already entered posting date in header table & acc_gl table. But still it is giving this error.

Plz help as I have to deliver this object ASAP.

Thanks,

Sachin Singhal

Hi,

I am trying to implement this bapi in BADI of MIGO according to requirement. This BAPI is giving error like

Error in document: BKPFF $ STDCLNT600

Required field PSTNG_DATE was not transferred in parameter ACCOUNTGL

Required field PSTNG_DATE was not transferred in parameter ACCOUNTGL

I have already entered posting date in header table & acc_gl table. But still it is giving this error.

Plz help as I have to deliver this object ASAP.

Thanks,

Sachin Singhal

7 REPLIES 7
Read only

deependra_shekhawat3
Contributor
0 Likes
3,788

How you are preparing bapi data??

Could you  debug by putiing breakpoint on message ID ?

Read only

0 Likes
3,788

Hi Deependra,

I am preparing bapi data in BADI & Yes I am debugging this code but when I debug this BAPI there is condition which shouldn't get skipped, but it is skipping that condition. Now I think there is some problem with this BAPI.

Read only

Former Member
0 Likes
3,788

Hi Sachin,

Refer below link

http://scn.sap.com/thread/1395082

may be usefull.

Regards,

Mordhwaj

Read only

0 Likes
3,788

Hi Sachin,

According to the error message

there is an issue with the date you send

it doesnt expect that date

check the table gt_accgl table you pass to the function module!!

You can debug by changing the date or creating that document via parking fb01 and seeing the error

Before you post the document

you can check the document is valid

and if valid you can post as well

code snippet:

method check_accounting_document.

   field-symbols: <lfs_return> like line of et_return.

*set the  username

   ev_return_code = 0.

*Main BAPİ to check

   call function 'BAPI_ACC_DOCUMENT_CHECK'

     exporting

       documentheader    = is_document_header

     tables

       accountgl         = it_accountgl

       accountreceivable = it_receivable

       accountpayable    = it_payable

       accounttax        = it_accounttax

       currencyamount    = it_amount

       criteria          = it_criteria

*      valuefield        = it_valuefield

       extension1        = it_extension1

       return            = et_return

       .

   read table et_return assigning <lfs_return>

   with key type = 'E'.

   if sy-subrc eq 0."NO ERROR IN DOCUMENT

     ev_return_code = 4.

   endif.

endmethod.

Read only

0 Likes
3,788

Hi Solen,

The posting date which I am passing is fine but I dont understand why It is giving error. Can you plz let me know that how to park a document with the help of BAPI.

Read only

0 Likes
3,788

Hi sachin

Do you want to post the acct. document or park it.

You can park the accounting document and then post it

either with the BAPİ you are using or fb02 by saving it it will post manually.

For parking there is a BAPİ: this post like in FB01 check below

Code snippet:

try .

       call function 'PRELIMINARY_POSTING_FB01'

         exporting

           i_tcode = 'FB01'

         importing

           xepbbp  = lv_xepbbp

         tables

           t_bkpf  = it_bkpf

           t_bseg  = it_bseg

           t_bsec  = it_bsec

           t_bset  = it_bset

           t_bsez  = it_bsez.

     catch cx_sy_conversion_no_number.

       append initial line to et_return assigning <lfs_return>.

       <lfs_return>-type   = 'E'.

       <lfs_return>-number = sy-msgno.

       concatenate 'Satır no : '  sy-msgv1 'Yıl :' sy-msgv2

       've' sy-msgv4 'nolu Hesap numarasında sorun var' into <lfs_return>-message

       separated by space in character mode.

     catch cx_sy_zerodivide.

       append initial line to et_return assigning <lfs_return>.

       <lfs_return>-type   = 'E'.

       <lfs_return>-number = sy-msgno.

       concatenate 'Satır no : '  sy-msgv1 'Yıl :' sy-msgv2

       've' sy-msgv4 'nolu Hesap numarasında sorun var' into <lfs_return>-message

       separated by space in character mode.

     catch  cx_sy_dyn_call_illegal_type.

       append initial line to et_return assigning <lfs_return>.

       <lfs_return>-type   = 'E'.

       <lfs_return>-number = sy-msgno.

       <lfs_return>-message = 'Başlık verilerinde uyumsuzluk var.'.

   endtry.

Read only

RaymondGiuseppi
Active Contributor
0 Likes
3,788

There is a posting date (BUDAT) field in DOCUMENTHEADER (PSTNG_DATE) but also in ACCOUNTGL too (same name) usually header values are copied to initial item fields.

Are you posting a cross-company code document ?

Regards,

Raymond