Skip to Content
avatar image
Former Member

Change Controller for FWSD Split / Consolidation

Hi all

I have a customer requierement regarding FWSD Split/ Consolidation. We want to modify the standard split criteria. For example the standard split criteria consideres the following data:

Bill-to party
Ordering party
Payment term
Credit segment
Document currency
Source location
Destination location
Calculation level
Settlement Group

I want to add one more field: Additional Party. Based on the combination of Payer, Additional Party and Consolidation Group (we have a custom table with this combinations) we can group FWO with this data:

1) Group using Additional Party, Payer, Source, Destination (in the stadard code, table lt_inv_map has Source Country and Destination Country)
2) Additional Party / Payer
3) One FWSD per FWO (like the individual)

We have modifed structure invmap to add fields
ship_from_party_id TYPE /bofu/bupa_internal_id
ship_to_party_id TYPE /bofu/bupa_internal_id
add_party TYPE /scmtms/bupa_internal_id

I have several questions

1) it is OK to change table lt_inv_map? We think this table is the header of the FWSD, is it correct?
2) In order to "aviod" split based on src_country/des_country we have decided to fill this values in table ls_inv_map with blanks. Is this correct?
3) Where is the "link" between this header and its detail (that is used to calculate charges)
4) The system executes our ZClass and then executes the Standard Class.
5) Do you have any recommedation on this development ¿which is the point where we should put our code?


Please find attached the piece of code in which we are feeding table ls_inv_map

"generates 1 FWSD per combination Source / Destination / Payer
READ TABLE lt_inv_map INTO ls_inv_map WITH KEY payer = lv_payer_uuid
add_party = ls_add_p-add_party
ship_from_party_id = <ls_trq_data>-shipper_id
ship_to_party_id = <ls_trq_data>-consignee_id.

IF sy-subrc = 0.
<ls_comm_str>-inv_no = ls_ruta-inv_no.
lv_new = abap_true.
ls_inv_map-bill_to_party_uuid = <ls_comm_str>-bill_to_party_uuid.
ls_inv_map-cd_inv_no = <ls_comm_str>-inv_no.

IF lv_new = abap_true.
CLEAR lv_new.
ls_inv_map-zterm = lv_pterm.
ls_inv_map-credit_seg_id = <ls_comm_str>-credit_seg_id.
ls_inv_map-ordering_party_uuid = <ls_comm_str>-ordering_party__uuid.
ls_inv_map-doc_currency = <ls_comm_str>-currency_code.
ls_inv_map-payer = lv_payer_uuid.
ls_inv_map-ship_from_party_id = <ls_comm_str>-ship_from_party_id.
ls_inv_map-ship_to_party_id = <ls_comm_str>-ship_to_party_id.
ls_inv_map-add_party = ls_add_p-add_party.
ls_inv_map-calculation_level = <ls_comm_str>-calculation_level.
ls_inv_map-document_type = ' '.
ls_inv_map-src_country = ' '.
ls_inv_map-des_country = ' '.
ls_inv_map-inv_no = lv_inv.
<ls_comm_str>-inv_no = lv_inv.
APPEND ls_inv_map TO lt_inv_map.
lv_inv = lv_inv + 1.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers