cancel
Showing results for 
Search instead for 
Did you mean: 

Start routine..

Former Member
0 Kudos

Can someone help me in creting a start routine..

1. Read the table T006B

2. Map the Commm structure UOM field to T006b's MSEH3 field.

3. if they matches then COMM structure field will be passed into ODS field.

4. If NOT I need to match it with T006B's MSEHI field and find the correspoding value of MSEH3 and pass that value..

Please help

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Its giving me the followimg error message

"E:Field "COMM_STRUCTURE-BASE_UOM" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement. "DATA" statement."

Please help !!

Former Member
0 Kudos

Thanks again AHP.

1) Do I have to make this in the TR or Update rule ??

2) I created this in Update rule and Its still giving the conversion error.

Please let me know.

edwin_harpino
Active Contributor
0 Kudos

hi

try ....-base_uom, without 0.

Former Member
0 Kudos

Thanks AHP..

Tried "COMM_STRUCTURE-base_uom.", "COMM_STRUCTURE-baseuom."..still the same thing.. Do I have to define it above ?/

edwin_harpino
Active Contributor
0 Kudos

this part put in infoobject 0BASE_UOM mapping, create routine.

read table it_uom with key mseh3 = COMM_STRUCTURE-BASE_UOM.

if sy-subrc = 0.

RESULT = COMM_STRUCTURE-BASE_UOM

else.

read table it_uom with key msehi = COMM_STRUCTURE-BASE_UOM.

if sy-subrc = 0.

RESULT = it_uom-mseh3.

endif.

endif.

Former Member
0 Kudos

Thanks AHP. I have done as below,.,But when I do a check its giving me the "E:Field "COMM_STRUCTURE-0BASE_UOM" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement. "DATA" Statement"

My code is as below.. Help Help .. I am prettu new into this.

========================================================

PROGRAM UPDATE_ROUTINE.

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

  • TABLES: ...

tables : t006b.

  • DATA: ...

data : it_uom like t006b occurs 0 with header line.

$$ 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/CS0000000073.

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 tables "MONITOR" and/or "MONITOR_RECNO",

  • to make monitor entries

select * from t006b into table it_uom.

read table it_uom with key mseh3 = COMM_STRUCTURE-0BASE_UOM.

if sy-subrc = 0.

RESULT = COMM_STRUCTURE-[uomfield]

else.

read table it_uom with key msehi = COMM_STRUCTURE-0BASE_UOM.

if sy-subrc = 0.

RESULT = it_uom-mseh3.

endif.

endif.

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

ABORT = 0.

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

*

ENDFORM.

edwin_harpino
Active Contributor
0 Kudos

hi,

try following in 'start routine' of update rules :

tables : t006b.

data : it_uom like t006b occurs 0 with header line.

data : it_data_package like data_package occurs 0 with header line.

select * from t006b into table it_uom.

it_data_package[] = data_package[].

loop at it_data_package.

read table it_uom with key mseh3 = COMM_STRUCTURE- BASE_UOM.

if sy-subrc = 0.

it_data_package[]-BASE_UOM = COMM_STRUCTURE-BASE_UOM

else.

read table it_uom with key msehi = COMM_STRUCTURE- BASE_UOM.

if sy-subrc = 0.

it_data_package[]-BASE_UOM = it_uom-mseh3.

endif.

modify it_data_package[].

endloop.

data_package[] = it_data_package[].

edwin_harpino
Active Contributor
0 Kudos

hi,

now i have no access to system, try :

  • start routine

tables : t006b.

data : it_uom like t006b occurs 0 with header line.

select * from t006b into table it_uom.

in each routine of infoobject mapping

read table it_uom with key mseh3 = comm_structure-[uomfield].

if sy-subrc = 0.

result = comm_structure-[uomfield]

else.

read table it_uom with key msehi = comm_structure-[uomfield].

if sy-subrc = 0.

result = it_uom-mseh3.

endif.

endif.

if all coding in start routine, use data_package