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

Start routine

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

Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 03, 2007 at 06:45 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 03, 2007 at 06:42 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 03, 2007 at 06:44 AM

    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

    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.