Changing of the volume information using BAPI_OUTB_DELIVERY_CHANGE

Hi experts,
I want to change the volume details in OUTBOUND DELIVERY using
BAPI : BAPI_OUTB_DELIVERY_CHANGE.
What all the values that i have to pass to the BAPI.
Waiting for your replays.
Thanks in advance,
Kruthik.

Got solution by myself

Similar Messages

  • My soundcard is dropping out as I make changes in the volume line

    Can anybody tell me what to do? I work in Soundtrack Pro with an Apogee mini-me or M-box as soundcard. If I make changes in the volume-line after a while the soundcard is dropping out and no more sound is coming also when I try to change the system sound settings again to computer or soundcard. I have to restart the whole computer before the sound is working again. It is a problem working with the I-Mac as with the Mac pro I work on.

    I'm having a similar issue; however it appears to only affect midi files. I can rename them in itunes or finder (either directly or with the information window); the results are the same: The data (name, artist genre etc.) appears to be ok until the file is played.
    I am using iTunes 7.6.1 on the mac.
    Mumpitz, are you having this issue with mp3's as well?
    Message was edited by: Travmac63 -- added iTunes version ID and OS

  • Incorrect values in the Volume Information

    On startup all I see is a white screen. Using the startup manager and booting from a clone all is fine. When I run Disk Warrior on the internal WD500 the report says "Incorrect values in the Volume Information were repaired". At this point I may be able to shutdown and restart a few times normally. Eventually the iMac refuses to shut down and after a forced shutdown and restart I'm back to the white screen. This has been happening for a few months now. Any idea what could be causing this?

    Have you considered consulting a Genius at the Genius Bar? or an Apple Authorized Service provider?

  • HT1918 I would like to change my Visa card from the account but its not changing and the billing information is not changing and I can't purchase any thing from my account its now not usable please help me to solve the problem

    I would like to change my Visa card from the account but its not changing and the billing information is not changing and I can't purchase any thing from my account its now not usable please help me to solve the problem

    You made a purchase and exhausted the credit on your card before it processed. All purchases are final. Contact iTunes Store support. You need to settle up before you can purchase or download anything else.

  • I have file with 500 pages created from AutoCad file. In all pages, I have different document numbers.The file is not editable in pdf. How to change all the document numbers using "Comment" feature? Any alternate method?  alternate method? I have Adobe Ac

    I have pdf file with 500 pages created from AutoCad file. In all pages, I have different document numbers.The file is not editable in pdf. How to change all the document numbers using "Comment" feature? Any alternate method?  alternate method? I have Adobe Acrobat X Pro and Windows -7 platform.

    Yes, I just want to cover up all the pages for those particular area of document numbers.
    Nothing sensitive about it. I just want to show the correct document numbers on all pages in print out.
    So, I wanted to cover up by comments, but commenting on each page will be difficult. So, I wanted to comment the same on all pages.

  • How to track personal details changes in the report without using triggers on the database tables

    Hi There,
    I'm having a requirement to track the oracle HRMS Personal details changes in the report not using the triggers.
    ex: if some changes the address of the person, then that changed values should be populated in the report.
    Please find below query:
    If any of the following columns data is updated, the new value should be populated in the report.
    SELECT PAPF.PERSON_ID                                                       PAPF_PERSON_ID
    ,      PAPF.EMPLOYEE_NUMBER                                               EMPLOYEE_NUMBER        
    ,      PAPF.FIRST_NAME                                                            FIRST_NAME   
    ,      PAPF.LAST_NAME                                                            LAST_NAME
    ,      TO_CHAR(PAPF.DATE_OF_BIRTH ,'DD-MON-YYYY')     DATE_OF_BIRTH
    ,      ADDR.ADDRESS_LINE1                                                   ADDRESS_1
    ,      ADDR.ADDRESS_LINE2                                                   ADDRESS_2
    ,      ADDR.ADDRESS_LINE3                                                   ADDRESS_3
    ,      ADDR.TOWN_OR_CITY                                                    TOWN
    ,      ADDR.REGION_1                                                              COUNTY
    ,      ADDR.POSTAL_CODE                                                     POST_CODE
    ,      ADDR.COUNTRY                                                              COUNTRY
    ,      PAY.PAYROLL_NAME                                                     PAYROLL_NAME
    ,      PLN_TYP.NAME                                                              PLAN_TYP
    ,      PLN.NAME                                                                     PRODUCT_NAME
    ,      BOF.NAME                                                                     COVERAGE
    FROM   PER_ALL_PEOPLE_F                                                PAPF
    ,      PER_ALL_ASSIGNMENTS_F                                          PAF
    ,      PER_ADDRESSES                                                        ADDR
    ,      PAY_PAYROLLS_F                                                       PAY
    ,      BEN_PRTT_ENRT_RSLT_F                                                 PEN
    ,      BEN_PL_TYP_F                                                         PLN_TYP
    ,      BEN_PL_F                                                             PLN
    ,      BEN_OIPL_F                                                           BOIPF
    ,      BEN_OPT_F                                                            BOF
    WHERE 1                                     = 1
    AND PAPF.PERSON_ID                          = PAF.PERSON_ID
    AND TRUNC(SYSDATE)                          BETWEEN PAPF.EFFECTIVE_START_DATE AND PAPF.EFFECTIVE_END_DATE
    AND TRUNC(SYSDATE)                          BETWEEN PAF.EFFECTIVE_START_DATE AND PAF.EFFECTIVE_END_DATE
    AND PAPF.PERSON_ID                          = ADDR.PERSON_ID
    AND ADDR.PRIMARY_FLAG                       = 'Y'
    AND ADDR.DATE_TO                            IS NULL
    AND PAF.PAYROLL_ID                          = PAY.PAYROLL_ID(+)
    AND PEN.PERSON_ID                           = PAPF.PERSON_ID
    AND PEN.BUSINESS_GROUP_ID                   = PAPF.BUSINESS_GROUP_ID
    AND TRUNC(SYSDATE)                          BETWEEN TRUNC(PEN.EFFECTIVE_START_DATE) AND TRUNC(PEN.EFFECTIVE_END_DATE)
    AND PEN.PRTT_ENRT_RSLT_STAT_CD              IS NULL
    AND PEN.SSPNDD_FLAG                         = 'N'
    AND ( PEN.ENRT_CVG_THRU_DT                  >= TRUNC(SYSDATE)
    OR    PEN.ENRT_OVRIDN_FLAG                  = 'Y')
    AND EXISTS(SELECT PIL.PER_IN_LER_ID
               FROM   BEN_PER_IN_LER PIL
               WHERE  PIL.PER_IN_LER_ID         = PEN.PER_IN_LER_ID
               AND    PIL.BUSINESS_GROUP_ID     = PEN.BUSINESS_GROUP_ID
               AND    PIL.PER_IN_LER_STAT_CD    NOT IN ('VOIDD','BCKDT'))
    AND PEN.PL_TYP_ID                           = PLN_TYP.PL_TYP_ID  
    AND TRUNC(SYSDATE)                          BETWEEN PLN_TYP.EFFECTIVE_START_DATE AND PLN_TYP.EFFECTIVE_END_DATE  
    AND PLN_TYP.PL_TYP_ID                       = PLN.PL_TYP_ID 
    AND TRUNC(SYSDATE)                          BETWEEN PLN.EFFECTIVE_START_DATE AND PLN.EFFECTIVE_END_DATE
    AND PLN.PL_ID                               = PEN.PL_ID
    AND PEN.OIPL_ID                             = BOIPF.OIPL_ID(+)
    AND TRUNC(SYSDATE)                          BETWEEN NVL(BOIPF.EFFECTIVE_START_DATE,HR_GENERAL.START_OF_TIME) AND NVL(BOIPF.EFFECTIVE_END_DATE,HR_GENERAL.END_OF_TIME)
    AND BOIPF.OPT_ID                            = BOF.OPT_ID(+)
    AND TRUNC(SYSDATE)                          BETWEEN NVL(BOF.EFFECTIVE_START_DATE,HR_GENERAL.START_OF_TIME) AND NVL(BOF.EFFECTIVE_END_DATE,HR_GENERAL.END_OF_TIME)
    AND (:P_SYSDATE)                            BETWEEN TRUNC(PEN.ENRT_CVG_STRT_DT) AND TRUNC(PEN.ENRT_CVG_THRU_DT)
    AND (CASE WHEN :P_PAYROLL_ID IS NULL THEN 'Y' ELSE NVL((SELECT 'Y' FROM DUAL WHERE PAY.PAYROLL_ID  = :P_PAYROLL_ID), 'N') END) = 'Y'
    AND PAPF.LAST_UPDATE_DATE                   = (:P_SYSDATE) ;
    --AND PAPF.LAST_UPDATE_DATE                   BETWEEN to_date(:P_SYSDATE) and (to_date(:p_sysdate) + INTERVAL '31' Day);
    --AND (:P_SYSDATE)                           = PAPF.LAST_UPDATE_DATE ;
    Thanks

    check this -
    Re: Best Event-Based notifications for Sox Complience?

  • I need to get the cluster information using"MSCluster.Cluster" object

    Hi,
    Please anyone solve my problem ? I need to get the cluster information using"MSCluster.Cluster" object.
    Set objCluster = CreateObject("MSCluster.Cluster")
    objCluster .open <clustername>
    If i run the vbscript " Microsoft VBScript runtime error: ActiveX component can't create object: 'MSCluster.Cluster' " error is thrown.
    Kindly explain what is the issue and what can i do ? 
    -Sundar.

    this question was closed and answered a long time ago.
    Post questions about WS2012 in th WS2012 forum.
    The cluster object will no longer work in WS2012.  Use the supplied CmdLets and utilities.
    post future questions in the WS2012 forum.
    ¯\_(ツ)_/¯

  • The unit of issue cannot be changed because the material is used in BOM.

    Hi Pals
    Please could you help with the following:
    I have a request to change value in unit of issue field (Work Scheduling tab), current value if ZPC and i need to remove it and leave field blank.
    When i delete this value and press enter error message occurs: "The unit of issue cannot be changed because the material is used in a BOM" (Message no. M3214).
    I've removed this material from all BOMs at concerns plant level, but this doesn't help.
    Under cs15 tcode, SAP still sees deleted BOM history and probably this stops SAP to allow to change unit of issue.
    Do you know how to remove BOMs without history. And mainly, how to solve this problem.
    Thank you in advance
    Regards
    Andrey

    Hi R.Brahmankar
    thank you for support!
    you wrote:
    Dear,
    Please refer OSS note 215970 It will resolve this issue.
    Regards,
    R.Brahmankar
    I searched in note you gave: and there are 3 reports mentioned:
    1. ZZITMTC4 - selection report without update option
    2. ZZITMTD4 - selection report with update option
    3. ZZITMTD5 - selection report per each material with update option
    4. ZZITMTDOC - selection report with document entry and update option
    To be honest, i don't know how to use those reports...
    I searched in GRR3 tcode for such, but no such reports exist.
    Please could you advise how to use those reports.
    Thank you
    Best Regards
    Andrey

  • How to change the storage location using BAPI_OUTB_DELIVERY_CHANGE

    Hi !
    I want to do batch split in the delivery using BAPI_OUTB_DELIVERY_CHANGE.
    Can anyone tell me how to pass/change the storage location of each batch item.
    Is there any other BAPI that can do the batch split and populate the storage location also for the split batches?
    Regards,
    Firoz.

    Hi all,
    BAPI_OUTB_DELIVERY_CHANGE  can be used to do batch split and updating storage loaction against each item of an outbond delivey.
    I have done that in the folllowing way:
    1 > Firstly i have updated the storage location for each delivery item using 'BAPI_OUTB_DELIVERY_CHANGE' passing some mininal parameters.
       Fetch the item details from LIPS table based on the outbound delivery and pass the corresponding fields to item_data, item_control  and item_data_spl parameters and passed into intenal table li_lips.
    Loop at li_lips inti lw_lips.
        lw_item_data-deliv_numb           = lw_lips-vbeln.
        lw_item_data-deliv_item             = lw_lips-posnr.
        lw_item_data-material                = lw_lips-matnr.
        lw_item_data-fact_unit_nom      = lw_lips-umvkz.
        lw_item_data-fact_unit_denom  = lw_lips-umvkn.
        lw_item_data-base_uom            = lw_lips-meins.
        lw_item_data-sales_unit            = lw_lips-vrkme.
        lw_item_control-deliv_numb      = lw_lips-vbeln.
        lw_item_control-deliv_item        = lw_lips-posnr.
        lw_item_data_spl-deliv_numb   = lw_lips-vbeln.
        lw_item_data_spl-deliv_item     = lw_lips-posnr.
        lw_item_data_spl-pick_denial   = 'X'.
        lw_item_data_spl-stge_loc       = v_lgort.
    "(This would be your Storage Location which you want to be updated)
    Appending work areas into internal table to pass as parameter
        APPEND lw_item_data_lgort     TO li_item_data_lgort .
    Appending work areas into internal table to pass as parameter
        APPEND lw_item_control_lgort  TO li_item_control_lgort.
    Appending work areas into internal table to pass as parameter
        APPEND lw_item_data_spl_lgort TO li_item_data_spl_lgort.
    endloop.
    Passing the delivery no in the work area of header data
      lw_header_data-deliv_numb           = v_delivery_no.
      lw_header_control-deliv_numb       = v_delivery_no.
      lw_header_tech_control-upd_ind   = 'U'.
    Calling BAPI to change the Storage location
      CALL FUNCTION 'BAPI_OUTB_DELIVERY_CHANGE'
        EXPORTING
          header_data       = lw_header_data
          header_control   = lw_header_control
          delivery               = v_delivery_no
          techn_control     = lw_header_tech_control
        TABLES
          item_data           = li_item_data
          item_control       = li_item_control
          return                 = li_return_change
          item_data_spl    = li_item_data_spl.
    Calling BAPI to committ the task
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' .
    2> Then i have used the same BAPI again 'BAPI_OUTB_DELIVERY_CHANGE' to do the batch split/update batch only(if required) and change the Actual Delivered Quantity.
    Here you have to pass the same thing along with actual delivery qauntity and different batches to do batch split.
    Here it is assumed that Batch numbers, actual delivered quantity are coming from an internal table i_lqua.
    Looping through Internal table to get Bin details
      LOOP AT i_lqua INTO w_lqua .
    Clearing work area before use
        CLEAR : lw_item_data, lw_lips, lw_item_control, lw_item_data_spl.
    Reading table comparing metrial number
        READ TABLE li_lips INTO lw_lips
        WITH KEY matnr = w_lqua-matnr BINARY SEARCH.
    If read is successful, passing values from table
        IF sy-subrc EQ 0.
    Passing the delivery details into Item level table
          lw_item_data-deliv_numb              = lw_lips-vbeln.
          lw_item_data-deliv_item                = lw_lips-posnr.
          lw_item_data-material                   = lw_lips-matnr.
          lw_item_data-batch                       = w_lqua-charg.
          lw_item_data-dlv_qty                    = w_lqua-verme.
          lw_item_data-dlv_qty_imunit         = w_lqua-verme.
          lw_item_data-base_uom               = w_lqua-meins.
          lw_item_data-hieraritem                = lw_lips-posnr.
          lw_item_data-usehieritm                = 1.
          lw_item_data-fact_unit_nom          = lw_lips-umvkz.
          lw_item_data-fact_unit_denom      = lw_lips-umvkn.
          lw_item_data-sales_unit                 = lw_lips-vrkme.
          lw_item_control-deliv_numb           = lw_lips-vbeln.
          lw_item_control-deliv_item             = lw_lips-posnr.
          lw_item_control-chg_delqty           = 'X'.
          lw_item_data_spl-deliv_numb        = lw_lips-vbeln.
          lw_item_data_spl-deliv_item          = lw_lips-posnr.
          lw_item_data_spl-stge_loc            = w_lqua-lgort.
          lw_item_data_spl-pick_denial        = 'X'
    Appending work area into internal table to pass as parameter
          APPEND  lw_item_data TO  li_item_data.
    Appending work area into internal table to pass as parameter
          APPEND lw_item_control TO li_item_control.
    Appending work area into internal table to pass as parameter
          APPEND lw_item_data_spl TO li_item_data_spl.
    Clearing work areas after use
          CLEAR : lw_item_data, w_lqua,lw_item_data_spl,lw_item_control,
                        lw_vbpok, lw_lips.
        ENDIF.
      ENDLOOP.
    Passing the delivery no in the work area of header data
      lw_header_data-deliv_numb           = v_delivery_no.
      lw_header_control-deliv_numb       = v_delivery_no.
      lw_header_tech_control-upd_ind   = 'U'.
    Calling BAPI to change the Batch/Batch-Split/Delivery Quantity
      CALL FUNCTION 'BAPI_OUTB_DELIVERY_CHANGE'
        EXPORTING
          header_data           = lw_header_data
          header_control       = lw_header_control
          delivery                   = v_delivery_no
          techn_control         = lw_header_tech_control
        TABLES
          item_data                = li_item_data
          item_control            = li_item_control
          return                     = li_return_change
          item_data_spl         = li_item_data_spl.
    Calling BAPI to committ the task
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' .
    This is the only way which i found as better way to do the Batch split and updating storage location togetherly.
    I hope this code will help you.

  • Advice on RAID Sets, Volume Sets, and RAID Levels of the Volume Sets using an Areca Controller

    I have read through a lot of information on disk usage, storage rules for an editing rig, users inquiries/member responses in this forum and I thank each and every one of you – especially Harm.
    In building my new workstation, I purchased five (5) WD 1T, 7k, 64M SATAIII hard drives and an Areca RAID card, ARC-1880ix-16-4G, which I plan to use primarily as my media/data disk array.  The workstation will use a 128GB SATAIII SSD as the OS/program drive and I will transfer two (2) WD Raptor/10k SATA 70GB drives from my current system for pagefile/scratch/render use.  I tentatively plan on using a mobo SATAIII port for the SSD and mobo SATA ports with a software RAID (level 0) for the 10k Raptors.
    In reading the Areca Instruction manual, I am now considering exactly how I should configure the 5 physical 1TB drives in terms of RAID Level(s), Volume Sets, and RAID Sets.  I must admit that I like the opportunity of allowing for a Dedicated Hot Spare as I am generally distrustful of the MTBF data that drive vendors tout and have the bad experience in the past of losing data from a mal-configured RAID array and a single drive hardware failure (admittedly, my fault!).
    In line with the logic that one doesn’t want to perform disk reading while trying to write at the same time (or vice-versa), I am thinking the approach above should work OK in using the mobo disk interface and both software and external hardware RAID controllers without having to create separate RAID level configurations within a Volume Set or further dividing up the physical drives into separate RAID sets.  I know in forum messages that Harm noted that he had 17 drives and I could envision a benefit to having separate RAID sets in that situation, but I am not at that point yet. 
    To some degree I think it might be best to just create one RAID Level on one Volume Set on one RAID Set, but want to solicit thoughts from veteran controller users on their workflows/thoughts in these regards.
    Anyone care to share thoughts/perspectives?  Thanks
    Bill

    Thanks for the speedy feedback Harm - I appreciate it.
    I was thinking RAID level 3 as well.
    Of course, it's always something!   I purchased the Caviar Blacks by mistake - which are non-TLER.   I will work with EggHead to return the ones I purchased and replace them with RE4 versions  as I'm not thrilled about the possibility of the controller declaring the volume/disks degraded unnecessarily and although I have the DOS utility WDTLER where one is supposed to be able to enable/disable TLER on WD drives  - I suspect WD is way beyond that now anyway with current builds.
    I agree with you about just testing the performance of the options for the raptors - on the mobo and then on the controller.  When I benchmark them I'll post the results in case others are curious.
    Thanks again....off to EggHead!

  • Different brand earbuds are barely half the volume they used to be!

    So these other brand earbuds I use like Bose and Koss don't work well with my iPod anymore. The volume is literally so low I have to turn it all the way up and it's still not loud enough! And yes my Sound Check is off, butt when I blast my apple earbuds it's so loud I cud tell what song is playing in the room next door. Idk if that "determining audio or volume levels" thing has anything to do with it because it always does that whenever I turn iTunes do I just X it out

    If the iPod is loud enough with the iPod headphones then it is outputting the sound at the correct levels. Sounds like the issue is with your other headphones. The iPod does not 'know' which headphones are connected and therefore can't change the volume being played. The 'determining audio levels' is nothing to do with it.

  • System volume information using most disk resources?

    I have a Toshiba satellite p755-S5381 running windows 7 64 bit with a 750 GB HDD. For the last several months it occasionally gets slow even when few programs are running. When I check the resource manager the system process is reading and writing in the System Volume Information folder on both the main "C" drive and an extra partition "E" drive which contains a window 8 install. I have tried defragmenting and disk check but neither had any effect on the level of disk use. What could be causing this? It is really reducing the performance of the computer.

    Satellite P755-S5381
    the system process is reading and writing in the System Volume Information folder on both the main "C" drive and an extra partition "E" drive which contains a window 8 install.
    That's the shadow-copy function which provides both System Restore points and backup versions of individual files. You can turn it off entirely by disabling the Volume Shadow Copy service in Services (services.msc).
    And you can adjust it. Open System Properties (sysdm.cpl). On the System Protection tab, select a partition and click Configure. You'll probably want to turn it off for your E partition and make some adjustments for your C partition.
    -Jerry

  • How to track changes on the table not using triggers

    Hi,
    I would like to track DML changes on the tables. As I have many tables it is not efficient to write triggers.
    Is there any setup I can do at database level.
    I am using 11g R2.
    Thanks

    thanks fran.
    I would like to know old and new data in case of updates. This method will not show me.are you sure??
    SQL> sho parameter audit_trail
    NAME                                 TYPE        VALUE
    audit_trail                          string      DB, EXTENDED
    SQL> audit select, insert, update on fran.test1;
    AuditorÝa terminada correctamente.
    SQL> conn fran/fran
    Conectado.
    SQL> select * from test1;
    ninguna fila seleccionada
    SQL> insert into fran.test1 values('EX',2);
    1 fila creada.
    SQL> update fran.test1 set object_id=3 where object_id=2;
    1 fila actualizada.
    SQL> commit;
    Confirmaci¾n terminada.
    SQL> conn / as sysdba
    Conectado.
    SQL> select sqltext from aud$ where sqltext is not null;
    SQLTEXT
    select * from test1
    insert into fran.test1 values('EX',2)
    update fran.test1 set object_id=3 where object_id=2If you want more data, FGA is your goal
    I have read some where on flashback database ..
    would this create a replica table with old changesflashback database is to set the current data like in the past. I mean:
    SQL> conn / as sysdba
    Conectado.
    SQL> alter table fran.test1 enable row movement;
    Tabla modificada.
    SQL> drop table fran.test1;
    Tabla borrada.
    SQL> select * from fran.test1;
    select * from fran.test1
    ERROR en lÝnea 1:
    ORA-00942: la tabla o vista no existe
    SQL> flashback table fran.test1 to before drop;
    Flashback terminado.
    SQL> select * from fran.test1;
    OBJECT_NAME                    OBJECT_ID
    EX                             3

  • Can't adjust the volume while using DJ controller

    I've got a DJ controller. I just hopped from Windows to MAC (Pro Retina 13). I basically use Traktor DJ whenever I mix. Normally when I'd quit the program for DJing, the controller kept working - so I could play music via youtube through my speakers.
    And just control the volume overall with the volume keys. Now that I'm on MAC, the DJ program works fine and I can control the master with a knob, but as soon as I quit the DJ program - It plays music through youtube and iTunes just fine, the only thing is it won't allow me to adjust the volume in any way.
    The controller is mapped to a program, I can't use a master knob to adjust the volume out of the program...
    Whenever I try to adjust the volume with the F11 and F12 keys it just shows an O with a slash through it.
    I really want to control my volume through my mixer, please help!!!

    Have you by chance installed an app called "Boom"?

  • Can i Change/Update the Lead Status using Action profile of Activity.

    Hi,
    I have created one Lead, and on the basis of Qualification level action triggers and Ativity getting generated.
    I want to know that it is possible by using functions(Action Profile/conditions) in activity, If i change the status reason of Activity (as Accepted) Earlier Leads status would change.(as Close)
    Please resolve with solution.
    Regurds,
    Dipesh.

    Hi Dipesh,
    What I understand is, u wish to change the status of preceding lead transaction when the activity status reason is changed to accepted.
    1.  This functionality can be achieved using ORDER_SAVE Badi. This Badi implementation shall check the activity reason changed to accepted, if yes, read the doc flow, get the lead transaction and change its status to close.
    2. As per my knowledge use of action profiles and conditions will not be helpful in this case.Else, create an action definition as Activity reason changed, put a condition which like Activity reason= Accepted.
    In the action definition Processing type use method call.
    Here u will have to create a new implementation of the BADI of action profile, and put the same logic as stated in point 1.
    But in think implementing point 1 should be easier.
    Wish the information is useful.
    Regards,
    Shalini Chauhan

Maybe you are looking for