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

Doc flow linkage when adding a new line in a Billing order

Hi,

I am trying to add a new line in an existing billing order using CRM_ORDER_MAINTAIN function module.

This billing order was initially created from a preceding document and hence the pricing conditions flowed from that document to the line item created at that time.

In the doc flow for the line item did have reference to the previous document.

Now I need to create a new line item in the billing order. I am able to establish a linkage with the previous document for the new line item. The pricing conditions do get copied. But the problem is the linkage with the previous document does not appear in the document flow for the new item.

following is my code for the document flow for the new line item

Input fields

  • doc flow

ls_input_field-ref_kind = 'B'.

ls_input_field-ref_handle = '0000000001'.

ls_input_field-objectname = 'DOC_FLOW'.

ls_input_name-fieldname = 'QUANTITY'.

insert ls_input_name into table ls_input_field-field_names.

ls_input_name-fieldname = 'QUANTITY_UNIT'.

insert ls_input_name into table ls_input_field-field_names.

insert ls_input_field into table p_input_fields.

data

wa_doc_flow_extd-objkey_a = previous document line item guid

wa_doc_flow_extd-vona_kind = 'A'.

wa_doc_flow_extd-brel_kind = 'B'.

wa_doc_flow_extd-brel_mode = 'A'.

wa_doc_flow_extd-quantity = p_prevdoc-quantity.

wa_doc_flow_extd-quantity_unit = p_prevdoc-quantity_unit.

wa_doc_flow_extd-reltype = 'VONA'.

wa_doc_flow_extd-relation_handle = '0000000002'.

wa_doc_flow_extd-objtype_b = 'BUS2000131'.

wa_doc_flow_extd-objtype_a = 'BUS2000131'.

append wa_doc_flow_extd to wa_doc_flow-doc_link .

wa_doc_flow-ref_handle = '0000000001'.

wa_doc_flow-ref_kind = 'B'.

insert wa_doc_flow into table p_doc_flow.

Thanks,

Chamu

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2007 at 03:42 PM

    Hi,

    I was able to solve it.

    The relationid field in the document flow table had to be filled.

    I used the same relationid which was created for the previous item and it then worked.

    Regards,

    Chamu

    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.