cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

2LIS_02_ITM (When BW receive value " ", "X", "R" Reversal indicator

Former Member
0 Kudos
2,054

Hi !

I Have an issue (I think is issue)...with extractor 2LIS_02_ITM about reversal or deleted indicator….

Some PO are created on R/3 and mark for deleted some line items… I try or I hope received a “R” indicator…. But I didn´t receive the indicator…..

I only receive “X” on this field.. (delete indicator). or in other examples blank on this field

What’s the difference between “X” , “R” and blank indicator?... when is posible receive X, R or blank value??

I was thinking that when on R/3 some lines of PO orders were deleted.. I receive "R" indicator when I extract to BW (on the PSA)... but I didn't...

If you know how work this kind of cases or examples, please explain me more.. or let me know where can I find more information please.

I will assign points to all the answer.

Thank you

Alice

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Alice,

The meaning of Before & After Images:

let if u load a purchase order valur 10000 in to BW

If end user changed the same PO to 15000,

then if u load now, then since ur DS has ABR (After Before Reverse) process,

it creates an LUW(logical unit of work) with 2 images(Before & After Images)

Before Image:-10000

After Image:+15000

will be loaded to ur data target

This change will not be observed in R/3 side but we observed in BW side(in PSA)

Finally in ur data target 10000-10000+15000=15000,which is same as R/3 value

To use this advantage,for keyfigures,u need to select the inversion check box in DS maintenance

Then only ur before image values will get -ve sign

Then u can load to ODS or CUBE

If u dont select the inversion check box ,u need to load to ODS only

Hope it helps

Arjun

Answers (4)

Answers (4)

Former Member
0 Kudos

thank you for your help.

I understand now how work.. before and after image Arjun, and I would like to know why in my example I can´t receive de deleted mark for the record that was deleted on sorce system.

Let me explain you the details:

-

-


We have an issue on extractor 2LIS_02_ITM.

We have one PO with some positions… for this example I will explain about position 30 and 40.

The position 30 has movement related and position 40 just was created and then mark for deleted.

I hope that in BW we will receive a indicator for position 40 for deleted and then later on BW. The same for position 30, but I don’t see after I process this information that this position are deleted on BW… this mean that position 30 and 40 continue like active.

PO: 6500378341 exist on R/3 and the position 30 is mark for deleted and the position 40 too...

The difference between these two position are that: position 3 has an history…this mean movement related, and the position 40 has not movement or history…

Position 30..with history.....

Position 40… without history..

On RSA3 on R/3, you can see that position 40 on Annulations field its blank “ ” … instead of on position 30 this field contain “X”

When we extract to BW.. position 40… Blank on field Reversal indicator

When we extract to BW.. position 30… “X” on field Reversal indicator:

After process into BW this package… we have this:

You can see that position 30 and 40 exist and these didn’t deleted.

This is the ABAP code for start routine

PROGRAM UPDATE_ROUTINE.

$$ begin of global - insert your declaration only below this line -

INCLUDE RS_BCT_MM_UPDATE_RULES.

DATA G_PRICE_UNIT TYPE REF TO DATA.

FIELD-SYMBOLS TYPE ANY.

CONSTANTS C_PRICE_UNIT TYPE STRING VALUE

'/BIC/CS2LIS_02_ITM-price_unit'.

$$ end of global - insert your declaration only before this line -

  • The follow definition is new in the BW3.x

TYPES:

BEGIN OF DATA_PACKAGE_STRUCTURE.

INCLUDE STRUCTURE /BIC/CS2LIS_02_ITM.

TYPES:

RECNO LIKE sy-tabix,

END OF DATA_PACKAGE_STRUCTURE.

DATA:

DATA_PACKAGE TYPE STANDARD TABLE OF DATA_PACKAGE_STRUCTURE

WITH HEADER LINE

WITH NON-UNIQUE DEFAULT KEY INITIAL SIZE 0.

FORM startup

TABLES MONITOR STRUCTURE RSMONITOR "user defined monitoring

MONITOR_RECNO STRUCTURE RSMONITORS " monitoring with record n

DATA_PACKAGE STRUCTURE DATA_PACKAGE

USING RECORD_ALL LIKE SY-TABIX

SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS

CHANGING ABORT LIKE SY-SUBRC. "set ABORT <> 0 to cancel update

*

$$ begin of routine - insert your code only below this line -

  • fill the internal table "MONITOR", to make monitor entries

  • see OSS note 627498

DATA: V_MATERIAL TYPE /BIC/OIZMATERIAL,

V_UMB TYPE /BI0/OIBASE_UOM,

V_NUMER TYPE /BIC/AZGTO_O0200-UOMZ1D,

V_DENOM TYPE /BIC/AZGTO_O0200-UOMN1D,

V_CANTUMB TYPE /BIC/OIZCANTUMB,

V_ZPRODUCT TYPE /BIC/OIZPRODUCT,

WA_DATA_PACK LIKE DATA_PACKAGE,

IDX TYPE SY-INDEX.

  • see OSS note 627498

LOOP AT DATA_PACKAGE INTO WA_DATA_PACK.

IDX = SY-TABIX.

IF ( WA_DATA_PACK-PROCESSKEY NE '001' AND

WA_DATA_PACK-PROCESSKEY NE '011' AND

WA_DATA_PACK-PROCESSKEY NE '021' AND

WA_DATA_PACK-PROCESSKEY NE '002' AND

WA_DATA_PACK-PROCESSKEY NE '012' AND

WA_DATA_PACK-PROCESSKEY NE '022'

) OR

  • see OSS note 636914

WA_DATA_PACK-ORDER_QUAN EQ 0 OR

WA_DATA_PACK-NUMERATOR EQ 0 OR

WA_DATA_PACK-DENOMINTR EQ 0.

DELETE DATA_PACKAGE INDEX IDX.

  • see OSS note 690106

  • ELSEIF DATA_PACKAGE-recordmode EQ 'R'.

  • DATA_PACKAGE-recordmode = 'X'.

*Note 530706 - Deleting records in 0SD_O01, 0SD_O03. 0PUR_O01, 0PUR_O02

  • DATA_PACKAGE-storno = 'X'.

*Note 791334 - 0PUR_O02/0PUR_C07/0PUR_C08: value key figures are wrong

  • DATA_PACKAGE-NET_PO_VAL = 0.

  • Note 791334

*Note 530706

ENDIF.

*

**--- CALCULO DE UNIDAD DE MEDIDA BASE

    • (Lógica Copiada de transformación del Gasto)

CLEAR: V_UMB, " Unidad de Medida Base

V_MATERIAL, " Material en Homologado

V_NUMER, "

V_DENOM,

V_CANTUMB, "Cantidad en UMB

V_ZPRODUCT.

  • Si la posición del pedido no tiene material no aplica el calculo

IF NOT WA_DATA_PACK-MATERIAL IS INITIAL.

CONCATENATE WA_DATA_PACK-/BIC/ZSOURCE WA_DATA_PACK-MATERIAL

INTO V_ZPRODUCT.

  • Buscar unidad de medida

SELECT SINGLE BASE_UOM /BIC/ZMATERIAL

INTO (V_UMB, V_MATERIAL)

FROM /BIC/PZPRODUCT

WHERE /BIC/ZPRODUCT = V_ZPRODUCT

AND OBJVERS = 'A'.

  • Si encontro el zproduct

IF SY-SUBRC = 0 AND WA_DATA_PACK-ORDER_QUAN NE ' '.

  • Comparar las unidades

IF V_UMB = WA_DATA_PACK-PO_UNIT.

  • Si son iguales pasan igual

WA_DATA_PACK-/BIC/ZCANTUMB = WA_DATA_PACK-ORDER_QUAN.

WA_DATA_PACK-BASE_UOM = WA_DATA_PACK-PO_UNIT.

ELSE.

  • Buscar UMB en ODS

SELECT SINGLE UOMZ1D UOMN1D

INTO (V_NUMER, V_DENOM)

FROM /BIC/AZGTO_O0200

WHERE /BIC/ZSOURCE = WA_DATA_PACK-/BIC/ZSOURCE

AND /BIC/ZMATERIAL = V_MATERIAL

AND UNIT = WA_DATA_PACK-PO_UNIT

AND BASE_UOM = V_UMB .

IF SY-SUBRC = 0.

IF V_DENOM IS INITIAL.

V_CANTUMB = 0.

WA_DATA_PACK-/BIC/ZCANTUMB = V_CANTUMB.

WA_DATA_PACK-BASE_UOM = V_UMB.

ELSE.

V_CANTUMB = ( WA_DATA_PACK-ORDER_QUAN * V_NUMER

) / V_DENOM.

WA_DATA_PACK-/BIC/ZCANTUMB = V_CANTUMB.

WA_DATA_PACK-BASE_UOM = V_UMB.

ENDIF.

ELSE.

WA_DATA_PACK-/BIC/ZCANTUMB =

WA_DATA_PACK-ORDER_QUAN.

WA_DATA_PACK-BASE_UOM = V_UMB.

ENDIF.

ENDIF.

  • Si NO encontro el zproduct

ELSE.

WA_DATA_PACK-/BIC/ZCANTUMB = WA_DATA_PACK-ORDER_QUAN.

WA_DATA_PACK-BASE_UOM = WA_DATA_PACK-PO_UNIT.

ENDIF.

ENDIF.

IF WA_DATA_PACK-LOC_CURRCY CS 'MXP'.

MOVE 'MXN' TO WA_DATA_PACK-LOC_CURRCY.

ENDIF.

IF WA_DATA_PACK-ORDER_CURR CS 'MXP'.

MOVE 'MXN' TO WA_DATA_PACK-ORDER_CURR.

ENDIF.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

INPUT = WA_DATA_PACK-COMP_CODE

IMPORTING

OUTPUT = WA_DATA_PACK-COMP_CODE.

  • --- ASIGNAR los cambios al registro actual

MODIFY DATA_PACKAGE INDEX IDX

FROM WA_DATA_PACK

TRANSPORTING ORDER_CURR COMP_CODE LOC_CURRCY

/BIC/ZCANTUMB BASE_UOM .

ENDLOOP.

  • if abort is not equal zero, the update process will be canceled

ABORT = 0.

$$ end of routine - insert your code only before this line -

*

I really appreciate your help or comments

Thank you.

Alice

Former Member
0 Kudos

Thank you a lot Andreas and Teja.

I have another question, it´s not clear for me the meaning of after image... before image... etc.

How can I investigate how work the extractor 2LIS_02_ITM in the cases when one line item is created... and the after some minutes the user decide mark as deleted (like a mark with recylce bottle)... on R/3 they execute the process on OLI3BW.. for this docuemnt... later.. I process on BW... but this record continue active on my BW... this mean that I never received the deleted line...

Thank you a lot for your help....

I will appreciate your help and I will assign more points for you.

Alice

Former Member
0 Kudos

Hi

While delta extraction, you will get the latest record also( as you said the deleted one)...

You can check the delta process for your data source in the table 'ROOSOURCE'..(for your data source it is 'ABR'

with this delta type if you check the table 'RODELTAM' you can see the delta processes...

In your case...in delta extraction your changed record will be updated to BW with 'delete image'...

Hope it helps

Thanks,

Teja

Former Member
0 Kudos

Hi

The field 0RECORDMODE determines whether the records are added to or overwritten.

It determines how a record is updated in the delta process:

blank character signifies an after image,

X’ = before image,

D’ = deletes the record

and

R’ = reverse image.

Please have a look at the below url

http://help.sap.com/saphelp_nw04s/helpdata/en/84/81eb588fc211d4b2c90050da4c74dc/frameset.htm

Hope it helps

Thanks,

Teja

Former Member
0 Kudos

Hi,

the field 0RECORDMODE determines whether the records are added to or overwritten. It determines how a record is updated in the delta process: A blank character signifies an after image, ‘X’ a before image, ‘D’ deletes the record and ‘R’ means a reverse image.

' ' -> The record delivers an after image

'X' -> The record delivers a before image

'A' -> The record delivers an additive image

Links:

http://help.sap.com/saphelp_nw04s/helpdata/en/84/81eb588fc211d4b2c90050da4c74dc/frameset.htm

Check this SAP notes regarding 2LIS_02_ITM

[Records with mode "R" (2LIS_02_ITM)|https://websmp230.sap-ag.de/sap(bD1kZSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=690106]

[Recognizing deletion records in the ODS|https://websmp230.sap-ag.de/sap(bD1kZSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=334300]

Additional note for your DataSource 2LIS_02_ITM you should check on relevance:

[Decimal places incorrect at net price in 2LIS_02_ITM|https://websmp230.sap-ag.de/sap(bD1kZSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=377733]

Hope this helps.

Regards

Andreas