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

Error in BAPI_ACC_DOCUMENT_POST

Former Member
0 Likes
3,877

Hi Everyone,

We are using exit EXIT_SAPLV60B_008 to pass some information to Accounting document. Also, in the same user exit, we are creating an AP document by using the BAPI BAPI_ACC_DOCUMENT_POST. When the billing run is executed in foreground, the whole process is working fine. However, when run in background, there are times when the BAPI is failling, and it is giving an RW612 error.

What could be the possible reasons why the BAPI is failing when run in background?

Any inputs?

Thanks,

Louisse

7 REPLIES 7
Read only

Former Member
0 Likes
2,144

Hi,

RW612 seems to be an error caused by missing entries of table CURRENCYAMOUNT of BAPI_ACC_DOCUMENT_POST.

Regards,

Klaus

Read only

0 Likes
2,144

Yes, you are correct. But I am passing the value for currency.

And what makes it harder to pinpoint is that the issue is not always happening.

Thanks,

Louisse

Read only

0 Likes
2,144

Hi Louisse,

Can you Paste your code.I think there is a some fields are missing with input data.

Regards,

Madhu.

Read only

0 Likes
2,144

Hi Loisse,

may this be an initialization error, if EXIT_SAPLV60B_008 is calles a 2nd time? Maybe some tables (which are passed to the BAPI) are not cleared before 2nd call or something like that?

Regards,

Klaus

Read only

madhu_vadlamani
Active Contributor
0 Likes
2,144

Hi Louisse,

Better you can post entire message.Check the currency field.

Regards,

Madhu.

Read only

eduardo_hinojosa
Active Contributor
0 Likes
2,144

Hi

Call the BAPI with a job, ie, call a customer report with a job in a function module called IN UPDATE TASK. Split both (invoice and additional FI document).

Regards

Eduardo

Read only

former_member182371
Active Contributor
0 Likes
2,144

Hi,

message RW 612 (No currency line exists for line item &1) is raised in include LACC9F20, precisely in form fill_acccr:


  READ TABLE it_bapi_acccr WITH KEY itemno_acc = r_posnr
       BINARY SEARCH TRANSPORTING NO FIELDS.
  IF sy-subrc IS INITIAL.
....

  ELSE.
    PERFORM append_msg_to_return
            USING 'E'             "TYPE
                  'RW'            "ID
                  '612'           "NUMBER
                  r_posnr         "MESSAGE_ONE
                  ' '             "MESSAGE_TWO
                  r_parameter     "PARAMETER
                  r_tabix         "ROW
                  ' '.        "FIELD
  ENDIF.

and this is because the first condition is not met. That is there is something wrong with

it_bapi_acccr (Accounting Interface: Currency Information).

From this i just can imagine these causes:

1.- EXIT_SAPLV60B_008 is clearing XACCCR

2.- There is another badi or exit clearing the values of ACCCR e.g. badi ACC_DOCUMENT.

Best regards.