Skip to Content
0
Former Member
Jan 08, 2007 at 10:12 AM

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

70 Views

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