cancel
Showing results for 
Search instead for 
Did you mean: 

Start routine

Former Member
0 Kudos
79

HI Experts,

I want to delete data-package in the start rotine based on selections below..

How do i do it???

If PLANT not equal to any of the value below

3000, 4000, 5000 , 6000 , 7000

then delete the data-packege otherwise do nothing or just assign the current value in the datapackage4 to PLANT ( like data-package_plant = data_package_plant)

Thanks in advance

DV

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

LhELLO dvmc

OOP AT DATA_PACKAGE.

IF DATA_PACKAGE-PLANT EQ '3000' .

DELETE DATA_PACKAGE '.

ENDIF.

ENDLOOP.

or

DELETE DATA_PACKAGE where PLANT EQ '3000'.

Thanks

Tripple k

Former Member
0 Kudos

HI experts,

please read my post again.. my requirement is to keep the record if they as listed in my previous post.. i dont want to delete..

DV

Former Member
0 Kudos

did you read the second part of my post??

ok... ok... have reread your post and adjusted the coding.

let us know

Olivier.

Message was edited by:

Olivier Cora

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

if you delete the datapackage for the values you have mentionned, the correponsding records won't be updated in your datatarget:


*start routine in transfer rules
DELETE DATAPAK
WHERE NOT
    ( PLANT = '3000' AND PLANT = '4000' 
  AND PLANT = '5000' AND PLANT = '6000' 
  AND PLANT = '7000' ).

*in update rules, replace DATAPAK by DATA_PACKAGE.

If you want to still update the record but leaving the PLANT empty for your values then you'll have to write a transfer or an update routine:


*in TRules
IF TRAN_STRUCTURE-PLANT = '3000' 
  OR TRAN_STRUCTURE-PLANT = '4000' 
  OR TRAN_STRUCTURE-PLANT = '5000' 
  OR TRAN_STRUCTURE-PLANT = '6000' 
  OR TRAN_STRUCTURE-PLANT = '7000'.

  RESULT = TRAN_STRUCTURE-PLANT.
ELSE.
  CLEAR RESULT.
ENDIF.

* in URules replace TRAN_STRUCTURE by COMM_STRUCTURE.

Hope this helps...

Olivier.

Message was edited by:

Olivier Cora

Former Member
0 Kudos

hai,

start routine used for structure diffinition...if u diffine a structure after that field level it will featch the data...after that if u want to delete the selection creteria u go to end routine and delete the oter packages...

thankz & regards,

prakasu.

Former Member
0 Kudos

prakasu,

i wanted the code and not the method to do it...can you please help me with the code?

DV

Former Member
0 Kudos

Hi

try using the following

DELETE DATA_PACKAGE WHERE PLANT EQ '3000'

OR PLANT EQ '4000'

OR PLANT EQ '5000'

OR PLANT EQ '6000'

OR PLANT EQ '7000'.