Skip to Content
author's profile photo Former Member
Former Member

Regarding Bapi "'BAPI_BILLINGDOC_CREATEMULTIPLE'"

Hi,

When i execute this below code, Billing document is not created in the table t_success,instead in table t_returns i am getting the message "Delivery type LR cannot be invoiced with billing type F8".

code is

TABLES: vbak,vbap,likp, lips.

DATA: t_billing TYPE STANDARD TABLE OF bapivbrk WITH HEADER LINE.

DATA: t_conditions TYPE STANDARD TABLE OF bapikomv WITH HEADER LINE.

DATA: t_return TYPE STANDARD TABLE OF bapireturn1 WITH HEADER LINE.

DATA: t_ccard TYPE STANDARD TABLE OF bapiccard_vf WITH HEADER LINE.

DATA: t_errors TYPE STANDARD TABLE OF bapivbrkerrors WITH HEADER LINE.

DATA: t_success TYPE STANDARD TABLE OF bapivbrksuccess WITH HEADER LINE

.

PARAMETERS: p_vbeln TYPE vbeln.

select single * from likp

where vbeln = p_vbeln.

SELECT SINGLE * from lips where

vbeln = likp-vbeln.

t_billing-salesorg = likp-vkorg.

t_billing-ref_doc = likp-vbeln.

t_billing-ref_item = lips-posnr.

t_billing-doc_number = p_vbeln.

t_billing-itm_number = lips-posnr.

t_billing-ordbilltyp = 'F8'.

t_billing-price_date = sy-datum.

t_billing-ref_doc_ca = likp-vbtyp.

t_billing-material = lips-matnr.

t_billing-plant = lips-werks.

APPEND t_billing.

CALL FUNCTION 'BAPI_BILLINGDOC_CREATEMULTIPLE'

TABLES

billingdatain = t_billing

return = t_return

success = t_success

.

Regards,

Shasiraj.C

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Apr 01, 2008 at 10:44 AM

    Hi,

    DATA: it_atg_billing LIKE bapivbrk OCCURS 1 WITH HEADER LINE,

    it_atg_return LIKE bapiret1 OCCURS 1 WITH HEADER LINE,

    it_atg_success LIKE bapivbrksuccess OCCURS 1 WITH HEADER LINE,

    git_likp type table of likp with header line.

    LOOP AT git_likp.

    it_atg_billing-ref_doc = git_likp-vbeln.

    it_atg_billing-ref_doc_ca = 'J'.

    APPEND it_atg_billing.

    CALL FUNCTION 'BAPI_BILLINGDOC_CREATEMULTIPLE'

    TABLES

    billingdatain = it_atg_billing

    return = it_atg_return

    success = it_atg_success.

    IF sy-subrc = 0.

    CLEAR: it_atg_billing, it_atg_billing[].

    ENDIF.

    ENDLOOP.

    The above code creates the invoice number for respective delivery number.

    If this was helpful rewards points

    Regards

    Pratap.M

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 01, 2008 at 07:50 AM

    Hi,

    "Delivery type LR cannot be invoiced with billing type F8".

    Look in to tcode VTFL,better tho sit with functional guy.He might be able to solve this problem.This problem seems to be a functional.

    Regards

    Kiran Sure

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 01, 2008 at 07:52 AM

    Hi,

    But when i create billing document using VF01, its creating.

    Can you give an example which works fine.

    Regards,

    Shasiraj.C

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.