Skip to Content
author's profile photo Former Member
Former Member

prob regarding update rules

Hello BW gurus

i m creating a cube same str of 0sd_c03.for this i have 7 datsources.2lis_11_vahdr

, 2lis_11_vaitm,

2lis_11_v_itm

,2lis_12_vcitm,

2lis_12_vchdr,

2lis_13_vdhdr,

2lis_13_vditm.

There is one field in cube" gross weight in Kilogram" but in the datasource field its only "gross weight" not in kilograms.

when i m applying update rules for this key fig its saying "source currency and target currency gross weight must b same".and update rules are not activating.

can anybody tell me how can i solve this problem.

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    Posted on Nov 18, 2005 at 12:48 PM

    Hi Tarun,

    In my system many KFs in that cube are mapped with a routine!

    For example, the following is a routine in 2LIS_11_VAITM update rule:

    PROGRAM UPDATE_ROUTINE.

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

    • TABLES: ...

    DATA: IN TYPE F,

    OUT TYPE F,

    DENOM TYPE F,

    NUMER TYPE F.

    • Def. of 'credit-documents': following doc.categ. are 'credit docs'

    • return order (H)

    • credit memo (K)

    • Credit-documents are delivered with negative sign. Sign is switched

    • to positive to provide positive key-figures in the cube.

    *

    • The combination of characteristics DE_CRED and DOC-CLASS provides

    • a comfortable way to distinguisch e.g. positive incoming orders or

    • order returns.

    • Def. der 'Soll-Dokumente': folgende Belegtypen sind 'Soll-Belege'

    • Retoure (H)

    • Gutschriftsanforderung (K)

    • Soll-Dokumente werden mit negativem Vorzeichen geliefert. Um die Kenn-

    • zahlen positiv in den Cube zu schreiben, wird das Vorzeich. gedreht

    • Die Kombination der Merkmale DEB_CRED und DOC-CLASS gibt Ihnen die

    • M√∂glichkeit schnell z.B. zwischen Auftrags-Eingang oder Retouren zu

    • unterscheiden.

    DATA: DEB_CRED(2) TYPE C VALUE 'HK'.

    DATA: QUOT(1) TYPE C VALUE 'B'.

    constants: c_msgty_e value 'E'.

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

    FORM compute_data_field

    TABLES MONITOR STRUCTURE RSMONITOR "user defined monitoring

    USING COMM_STRUCTURE LIKE /BI0/_2CS2LIS_11_VAITM

    RECORD_NO LIKE SY-TABIX

    RECORD_ALL LIKE SY-TABIX

    SOURCE_SYSTEM LIKE RSUPDSIMULH-LOGSYS

    CHANGING RESULT LIKE /BI0/V0SD_C03T-GR_WT_KG

    RETURNCODE LIKE SY-SUBRC

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

    *

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

    CLEAR RESULT.

    DATA: WEIGHT LIKE COMM_STRUCTURE-GROSS_WGT.

    IF COMM_STRUCTURE-UNIT_OF_WT NE 'KG'.

    WEIGHT = COMM_STRUCTURE-GROSS_WGT.

    CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'

    EXPORTING

    INPUT = COMM_STRUCTURE-GROSS_WGT

    UNIT_IN = COMM_STRUCTURE-UNIT_OF_WT

    UNIT_OUT = 'KG'

    IMPORTING

    OUTPUT = WEIGHT

    EXCEPTIONS

    CONVERSION_NOT_FOUND = 1

    DIVISION_BY_ZERO = 2

    INPUT_INVALID = 3

    OUTPUT_INVALID = 4

    OVERFLOW = 5

    TYPE_INVALID = 6

    UNITS_MISSING = 7

    UNIT_IN_NOT_FOUND = 8

    UNIT_OUT_NOT_FOUND = 9

    OTHERS = 10.

    IF SY-SUBRC NE 0.

    CLEAR MONITOR.

    MONITOR-msgno = '009'.

    MONITOR-msgid = 'SDBW'.

    MONITOR-msgty = c_msgty_e.

    MONITOR-msgv1 = COMM_STRUCTURE-UNIT_OF_WT.

    append MONITOR.

    RETURNCODE = 4.

    WEIGHT = 0.

    ELSE.

    RESULT = WEIGHT.

    RETURNCODE = 0.

    ENDIF.

    ELSE.

    RESULT = COMM_STRUCTURE-GROSS_WGT.

    RETURNCODE = 0.

    ENDIF.

    IF COMM_STRUCTURE-DOC_CATEG CA DEB_CRED.

    RESULT = RESULT * ( -1 ).

    ENDIF.

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

    *

    ENDFORM.[/code]

    To get all URs properly you'd better activate business content.

    Best regards,

    Eugene

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 18, 2005 at 12:32 PM

    Check of the fields are correctly mapped in tranfer rule.

    Regards,

    Rohini

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.