cancel
Showing results for 
Search instead for 
Did you mean: 

Customizing delivery extract structures

Former Member
0 Kudos

Hi all.

I have a customized 0SD_C03 cube set up with the following IS:

2LIS_11_VAITM

-


"----


SCL

-


"----


HDR

-


"----


V_ITM

-


"----


V_SCL

2LIS_12_VCITM

-


"----


SCL

-


"----


HDR

2LIS_13_VDHDR

-


"----


ITM

In R3 we have some custom fields with some dates in VBAP which are matched with the schedule line in the TransferRules, so no problem here. As these fields are only in VBAP I am only able to "fetch" them in 2LIS_11-structures.

I need to compare these dates to the actual goods issue date, which I don't see on the sales orders but on the deliveries (2LIS_12_xxxxx).

So what I need is the date fields (ZZDATE1-10) from VBAP in the 2LIS_12-structures.

How is this possible?

BR

Stefan

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Stefan,

you can enhance, from RSA6 and RSO2, your 2LIS_12-structures with the related date field and then write in CMOD code to select this field from VBAP during extraction.

Ciao.

Riccardo.

Former Member
0 Kudos

Thanks Riccardo.

I already tried with an append structure, but I'm not quite sure in how to do this correct. I went to RSA6 and edited the DS -> the double clicked on the extract structure -> choose append structure -> typed in ZZDATE1 in component and ZZDATE in component type. I thought this looked quite promising as it showed the right short text etc. Then I went back to the DS and removed the hide field option for ZZDATE1. Then I tested the extractor but all values looks empty to me.

Is the above correct?

I have absolutely no idea in what to do in CMOD, but I guess some work has to be done here too in order to get this to work.

Can you please explain that in details for me?

BR

Stefan

Former Member
0 Kudos

Hi Stefan,

Go into Tcode CMOD, select your project for BW and then select component EXIT_SAPLRSAP_001 with a double click, in the next screen double click on the last row with Include (before ENDFUNCTION) and in the next screen write your code.

Here an example of CMOD code for 2lis_03_bf:

EXIT_SAPLRSAP_001

&----


*& Include ZXRSAU01 *

&----


TABLES: mc03bf0.

DATA: l_biw_mc03bf0 LIKE mc03bf0,

l_tabix LIKE sy-tabix,

v_zzbsart LIKE ekko-bsart,

v_zzreswk LIKE ekko-reswk.

CASE i_datasource.

----


  • Start 2LIS_03_BF *

----


WHEN '2LIS_03_BF'.

LOOP AT c_t_data INTO l_biw_mc03bf0.

l_tabix = sy-tabix.

  • ORDER TYPE AND VENDOR

SELECT SINGLE bsart reswk INTO (v_zzbsart, v_zzreswk) FROM ekko WHERE ebeln = l_biw_mc03bf0-ebeln.

IF sy-subrc = 0.

l_biw_mc03bf0-zzbsart = v_zzbsart.

l_biw_mc03bf0-zzreswk = v_zzreswk.

ENDIF.

MODIFY c_t_data FROM l_biw_mc03bf0 INDEX l_tabix.

ENDLOOP.

----


  • End 2LIS_03_BF *

----


Ciao.

Riccardo.

Former Member
0 Kudos

Thank you again Riccardo.

I will take a look at this with someone that knows a bit more about ABAP than I do.

BR

Stefan

Answers (2)

Answers (2)

christian_geyer
Explorer
0 Kudos

Hi Stefan!

In general, I would not enhance order data with delivery data in the extractors. If you cannot use those two standard extractors, I would see this as a consolidation scenario in BW.

The sales process works in a way that deliveries normally come after sales orders. So enhancing order data with delivery data at the time of order extraction has a few risks:

- When creating the order, the delivery does not yet exist. So your solution must be prepared to receive orders without the actual delivery dates.

- You cannot guarantee that all delivery changes also trigger changes to you order items or schedule lines. So it might happen that the delivery date changes but your order data does not get re-extracted.

So I see the solution to your problem in a way that after you updated your order and delivery data into single ODS objects, you consolidate them into a third ODS. From there you would update your cube. The comparisons would happen in the update into the cube.

When updating the consolidation ODS, be aware that deliveries may be deleted! Make sure to catch any deletion records in the start routine between the delivery ODS and the consolidation ODS.

Kind regards,

Christian!

Former Member
0 Kudos

Hi Christian

What I need is order data in the delivery, not delivery data in an order.

I guess that makes it a bit more simple, as when I have a delivery I will always have a corresponding order.

I do think you are right about the solution with ODS' instead of customizing the extractors.

BR

Stefan

Former Member
0 Kudos

Hi,

we're talkin about the logistics datasources.

So keep in mind that the cmod enhancement for RSAP001 is only performed during runtime of the extraktor.

If you need the valid value in the DeltaRecords, you must enhance the MC-Structures the Datasource is based on and for Deliveries use the enhancement MCS50001 in cmod.

Especially when changes to your z_fields are ment to force a new delta-record, it can only be done that way.

hth

cheers

Sven

Former Member
0 Kudos

Hi Sven and thank you.

I am doing this in the developement system and I do a new init of the setup tables each time to test - so no delta loads involved. I will do a new initial run in prod. too when this is solved.

BR

Stefan