General presentation

Objective of the application

The objective of this requirement is to exclude Part/del/item at order line level in WP1 system.

This requested requirement aims to exclude from the “Open orders/Sales orders” with a remaining quantity to be delivered but where the “Part/Dlv/item” = ‘B’.


Dataflow overview

Steps in Source system/WP1:

Step 1) Enhance the data source DTS_BW_VBAK_ABAP with the field KZTLF in the Rhodia system and then populate the data from the VBAP table.

1.1 Enhance the extract structure 

1.2 Add/append  the KZTLF field

1.3 Apply the business logic to populate the data.

Below snapshot for reference

Once the Data source update is ready then replicate the data source from the Rhodia/WP1 system.


Steps in BW System

This is the requirement for the query BW_QRY_MVSDSO41_0011

Step 1)

Enhance the DSO DPSDSO56 with info object 'partialdlv' and map from the data source DTS_BW_VBAK_VBAP.

Load the data from field 'KZTLF' into the new info object 'partialdlv'.

DSO DPSDSO56 is used as look up DSO in the below transformation TRSF: DBSDSO41 -> DBSDSO57 (Rhodia) inside the start routine.

And logic has to be written between TRSF: DBSDSO41 -> DBSDSO57 (Rhodia).

Step 2)

We write the logic in the transformation between DSO DBSDSO41 and DBSDSO57 to get the 'sales document number', 'item number', 'partialdlv' from the corresponding look up DSO and fill records into the internal table for every document number/SO number in the source_package.

Step 3)  

  if SOURCE_PACKAGE[] is not INITIAL.
  sort SOURCE_PACKAGE by /bic/c_docnumb /bic/c_itm_sd.

 SELECT       logsys

             /bic/c_docnumb

             /bic/c_itm_sd

             partialdlv

      FROM /bic/adpsdso5600

      INTO TABLE itb_doc

      FOR ALL ENTRIES IN SOURCE_PACKAGE

      WHERE /bic/c_docnumb SOURCE_PACKAGE-/bic/c_docnumb.

SELECT        logsys
             /bic/c_docnumb
             /bic/c_itm_sd
             sched_line
             /bic/c_delnum2
             /bic/c_delitm2
             act_gi_dte
      FROM /bic/adpsdso4400
      INTO TABLE itb_sch
      FOR ALL ENTRIES IN SOURCE_PACKAGE
      WHERE /bic/c_docnumb SOURCE_PACKAGE-/bic/c_docnumb
        AND /bic/c_itm_sd  SOURCE_PACKAGE-/bic/c_itm_sd
        AND act_gi_dte NE '00000000'.
endif.
 


Step 4)

Now we need to check whether the Part/Dlv/item = ‘B’ is  available for every document/item number in the Source_package then next step is to find out the schedule line information from the itab(itab_shedule lines), if the entry found then filter the source_record/sales document , i.e delete the entry from the source_package.

The idea is to simply checking the whether the PArt/del/item  is  ‘B’   or not for every sales document/item from the source.

LOOP AT SOURCE_PACKAGE ASSIGNING <source_fields>.

        UNASSIGN <fs_doc>.
        READ TABLE itb_doc ASSIGNING <fs_doc>
        WITH KEY logsys    <source_fields>-logsys
                 c_docnumb <source_fields>-/bic/c_docnumb
                 c_itm_sd  <source_fields>-/bic/c_itm_sd .

        IF sy-subrc EQ AND <fs_doc> IS ASSIGNED AND
        <fs_doc>-partialdlv EQ 'B'.

          UNASSIGN <fs_sch>.
          READ TABLE itb_sch ASSIGNING <fs_sch>
          WITH KEY logsys    <source_fields>-logsys
                   c_docnumb <source_fields>-/bic/c_docnumb
                   c_itm_sd  <source_fields>-/bic/c_itm_sd .

          IF sy-subrc EQ AND <fs_sch> IS ASSIGNED.
            DELETE SOURCE_PACKAGE.
          ENDIF.

        ENDIF.
      ENDLOOP.
 


Google drive of MED - 



         

      

  • No labels