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: 

Reversal date problem "BAPI "BAPI_ACC_DOCUMENT_POST"

Former Member
0 Kudos
419

Hi,

Uisng BAPI "BAPI_ACC_DOCUMENT_POST"

1) how can a reversal date be updated

For some company codes it is populating and for some company code's it is not.

No where i am populating reversal date(BKPF-STODT) field in my code i am only populating reason_rev field in the Doc header field.

Thanks in advance

Edited by: sudhakar reddy on Feb 13, 2009 4:53 PM

2 REPLIES 2

Former Member
0 Kudos
65

HI Sudhakar,

Please Find Sample Code Below

..................

..................


     call function 'BAPI_ACC_DOCUMENT_POST'
      exporting
        documentheader    = gd_documentheader
        customercpd       = gd_customercpd
        contractheader    = gd_fica_hd
      importing
        obj_type          = l_type
        obj_key           = l_key
        obj_sys           = l_sys
      tables
        accountgl         = it_accountgl
        accountreceivable = it_accountreceivable
        accountpayable    = it_accountpayable
        accounttax        = it_accounttax
        currencyamount    = it_currencyamount
        criteria          = it_criteria
        valuefield        = it_valuefield
        extension1        = it_ext
        return            = it_return
        paymentcard       = it_paymentcard
        contractitem      = it_fica_it.
*        extension2        = it_ext2
*        realestate        = it_re.
 
    write: / 'Result of post:'.                             "#EC NOTEXT
    perform show_messages. 
--
data: rev like bapiacrev,
        rev_key like ref_key.
 
  rev_key       = ref_key.
  rev_key(1)    = 'R'.
  rev-obj_type  = gd_documentheader-obj_type.
  rev-obj_key   = rev_key.
  rev-obj_sys   = gd_documentheader-obj_sys.
  rev-obj_key_r = ref_key.
 
  if rev_c is initial.
    if dest = space or
       dest = gd_documentheader-obj_sys.
 
      call function 'BAPI_ACC_DOCUMENT_REV_POST'
        exporting
          reversal = rev
          bus_act  = gd_documentheader-bus_act
        tables
          return   = it_return.
    else.
      it_receivers-logsys = dest.
      append it_receivers.

Hope this will Get you a Idea Let me know if you need any more Help..

Thanks

Kalyan

Former Member
0 Kudos
65

pls. refer/debug the RFBIBL00 prog. (also pls. see its documentation), bcoz this prog, uses of 3 FMs. as a set, but, still, i did not get succeeded with these FMs, so, i went to BDC.

thanq

Edited by: SAP ABAPer on Feb 14, 2009 1:52 AM