Saving ROWID for Batch Processing, for Processing

Hi
I must Upload a table (A) from other Table (B) have 6 000 000 records,
The Process can stop or Crashed when some user (donk) turn off microcomputer ( I commit each 1000 records)
is there some way to save Rowid of Table B and When begin new processing It begin last position , wihtout create other columns or begin from first register ?
tks

CURSOR CTABLE1 IS
SELECT ROWID row_id
FROM TABLE1
CURSOR CTABLE2 IS
SELECT ROWID row_id
FROM TABLE2
CURSOR cTABLE3IS
SELECT ROWID row_id FROM TABLE3
FOR REG_TABLE1 IN cTABLE1 LOOP
UPDATE TABLE1
SET FIED01 = NULL,
FIELD02 = NULL,
FIELD0N = NULL
WHERE ROWID = REG_TABLE1.row_id;
IF w_quan_commit = 1000 THEN
COMMIT;
w_quan_commit := 0;
ELSE
w_quan_commit := w_quan_commit + 1;
END IF;
END LOOP;
DO FOR TABLE2 AND TABLE3
This dealy about 2 or 2.5 hours
NOW Begin processing below == 6 hours !!!!
CURSOR MYCURSOR IS
SELECT TABLE1.ROWID oc_rowid,
TABLE1.cod_classe oc_cod_classe,
TABLE1.cod_atividade oc_cod_atividade,
TABLE1.num_prefixo_medidor oc_num_prefixo_medidor,
TABLE1.num_medidor oc_num_medidor,
TABLE1.num_endereco oc_num_endereco,
TABLE1.cod_opcao_faturamento oc_cod_opcao_faturamento,
TABLE1.cod_irregularidade oc_cod_irregularidade,
TABLE1.cod_alteracao_cadastral oc_cod_alteracao_cadastral,
TABLE1.num_referencia oc_num_referencia,
TABLE1.date_modified oc_date_modified, -- usado
TABLE1.last_user oc_last_user, -- usado
TABLE1.qtd_consumo_mes_atual oc_qtd_consumo_atual,
TABLE1.num_llli oc_num_llli, -- usado
TABLE1.num_cep oc_num_cep, -- usado
TABLE1.num_cep_complemento oc_num_cep_complemento,-- usado
TABLE1.nom_consumidor oc_nom_consumidor, -- usado
TABLE1.ano_mes_referencia_faturamento oc_ano_mes_ref,
TABLE1.num_dias_consumo_mes oc_num_dias_consumo_mes, -- usado
TABLE1.qtd_consumo_mes_atual oc_qtd_consumo_mes_atual,
TABLE1.qtd_consumo_medio oc_qtd_consumo_medio,
TABLE1.num_cpf_consumidor oc_num_cpf_consumidor, -- usado
TABLE1.num_cgc_consumidor oc_num_cgc_consumidor, -- usado
TABLE1.dta_processamento oc_dta_processamento -- usado
WHERE substr(num_referencia, 2, 3) = 'XXX'
AND num_referencia = (SELECT DISTINCT facilityid FROM ordinarycustomer_db WHERE facilityid = num_referencia)
AND TABLE1.ROWID >= oc_row_mark
AND rownum <= 100;
OPEN MYCURSOR;
LOOP
FETCH MYCURSOR
INTO VAR1,VAR22,.......VARN
EXIT WHEN MYCURSOR%NOTFOUND;
BEGIN
SELECT objectid INTO n_objectid
FROM atable2
WHERE facilityid = varreferency;
     UPDATE table2
     SET date_modified = VAR1,
     last_user = VAR2,,
     nume_llli = VAR3,
     nume_cep_ende_conm = VAR4,
     nome_conm = VAR5,
     num_dia_consumo = VAR6,
     qtd_consumo_medio = VAR7
     nume_cpf_conm = VAR8
     nume_cgc_conm = VAR9
     qtd_consumo_atual = VAR10 ,
     codi_comm_cep_conm = VAR11,
     nume_logr_unid_conm = VAR12,
     cod_atii = VAR13
     customerclass = VAR14
     dta_fatura_atual =VAR15
     cod_opca_fatu_dois =VAR16
     dta_proc_consumo =VAR17
     ano_mes_referencia =VAR18
WHERE objectid = n_objectid;
UPDATE TABLE3
SET FIELD1 = VAR1
FIED2 = VAR2
FIELDN = VAR??
UPDATE TABLE3 ....ETC
END LOOP

Similar Messages

  • User Exit for batch classification for tcode mb1c

    HI experts,
    I have implement customer exit MBCFC004 EXIT_SAPMM07M_004 and CLFM0002 EXIT_SAPLCLFM_002 to set a value for
    a customize  characteristics.
    Now I have a issue.
    MBCFC004 EXIT_SAPMM07M_004  can work with migo but when I with mb1c to do same transaction it didn't
    work.
    CLFM0002 EXIT_SAPLCLFM_002  only work when I input a value in the customize  characteristics it can change the input value.
    I have set extension in OMCV for my move type. and assigned the bath to material.
    I have reference
        Re: User Exit for batch classification
    but I haven't found any question for my solution.
    please help me.
    thanks a lot.

    Class ZBATCH has status 1 (= 'Released') but the customizing of classtype 023 doesn't allow to classify with classes of this status. Settingsfor class status in class type 023 are different from what SAP delivers.Correct please these settings. You may lookup the correct definition of
    the class status in class type 022.

  • Assign Search procedure for batch determination for delivery

    Hi all,
    i have a problem with automatic batch determiantion during delivery creation.
    i have created a transfer order (purchasing order type UB from one plant to
    another).
    i have created delivery. Batch determination is impossible because the sistem
    didn't find search procedure.
    But if i create a sales order and subsequent delivery the batch determination is
    carried out correctly.
    in customizing i found the transaction in which we have to assign for a
    particular sales organization and sales document a search procedure ("Allocate
    SD Search procedure/ activate check")and i created the correct items for my
    sales document.
    My question is: where can i assign a search procedure to a delivery without
    sales order reference?
    In customizing i have activated "Automatic batch determination for my Delivery
    item category" but the sistem didn't find search procedure.
    What's wrong?
    Thanks
    Veronica

    Hi Veronica,
    For deliveries without reference to a sales order you still need to define a default order type for the delivery type - this will provide the control criteria that is normally copied from the sales document header into the delivery document.
    In our system our replenishment delivery type is the standard NL and the Default ord. ty. is set to DL, which I think is the standard SAP setting.
    Give this a try.
    Regards,
    Monika Strasser

  • Which table will get updated for batch characterstics for the MIGO trans?

    Hi all,
    As i am trying to post a goods receipt for 101/102 movement type in MIGO transaction.
    But it is giving error as 'Batch characterstics values are not classified'.
    If i give Batch Type- as  PRODUCTION(P)  in batch classification.
    It will get posted.
    Can any one help me out in which table this field will get updated.
    Thanks...

    HI ,
                 Try table MSEG.
    Regards,
    Mohan

  • Tables for Batch classification for materials

    Hi SAP gurus,
    I have an issue that I need to display the values for a number of materials in its classification view (class type 023) without using MM03.
    Could anyone please let me know the table(s) where I can find this?
    Thanks !!

    Hi Moumita_kar,
    Characteristics :
    CABN      Characteristics ( o.a. batch/vendor)
    CABNT      Characteristics description
    CAWN      Characteristics ( o.a. material)
    CAWNT      Characteristics description
    AUSP      Characteristic Values
    Class types and objects :
    TCLAO      Several class types for object
    TCLA      Class types ( vb. lfa1 => v10 en 010)
    TCLAT      Class type text
    TCLT      Classifiable objects
    TCLC      Classification status
    Links :
    INOB      Link between Internal Number and Object
    KLAH      Class header data
    KSSK      Allocation Table: Object (vb.matnr) to Class
    KSML      Characteristics for a class (internal number)
    Please try and confirm.
    Regards
    Suri

  • Customer exit for Batch management

    Hi experts,
    I'm using customer exit for batch management for internal number assignment.
    I need the Batch number as i mentioned below 
    DDMMYYB01
    DD-Date
    MM-Month
    YY-Year
    B-Block
    01-Number
    For this i need to give logic. How to give i'm not getting. This batch number creation will come at the time of GR.
    Anybody help me?
    Naren

    Hi
    Please use the user exit SAPLV01Z as I mentioned in your other thread, please go to SMOD to read its documentstion.
    In SMOD, select the 'Documentation' and click 'Display', this will show the overview documentation.
    Select the 'Componnet', then ciick the 'Display'. select each component and click 'Documentation Ctrl+F4) this will show the detailed documentation of them.
    Best Regards.
    Leon.

  • Table for batch detail

    Hello
    plz suggest Table for batch detail for sale & purchase in SAP 8.81 pl 07

    hi Jayakumar
    In Sap b1 8.8 the batch tables have been changed
    Category                                     Old Tables                    New Tables
    Batch Number                          OIBT, IBT1, OSRD             OBTN, OBTQ, OBTW, OITL, ITL1
    i think this will solve
    Regards
    Jenny

  • Issues during Component Batch Determination for Process Orders

    Hi,
    I am encountering a strange issue during component batch determination of process order.
    1. During creation of process order, when I execute batch determination, systems does determination based on strategies we have set and when I click on Copy it gives an error
    "Log cannot be saved: Object/subobject not specified"
    Message no. BL201
    *Diagnosis
    Log save cancelled because at least one log contains no object or subobject.
    Object and subobject are needed to classify application logs because there are several log types. Only a few logs are managed in main memory at runtime, so this classification is not needed.
    If the logs are to be saved in the database, object/subobject must be specified for later retrieval.
    Procedure for System Administration
    Object/sub object can be passed when a log is created (function module BAL_LOG_CREATE) and changed with BAL_LOG_CHANGE.
    The possible values for object and sub object must be configured in transaction SLG0.*
    If I save the order with CRTD status and come back again in change mode and do determination, It works fine.
    Again when the order is in REL status and do the determination, It gives the same error.
    This happens only for a specific plant, In other plants batch determination works in all scenarios.
    I checked for all plant related Config for batch determination and coudn't find any discrepancies.
    Please advise how to resolve this issue. Thanks in advance for your help
    Regards,
    Aheesh

    There Is no direct solution for your requirement just try this work around.
    While defining the batch determination search strategy for process order in COB1, there is one column Quantity proposal where you can attach the Routines (This is written in ABAB code )  make use of this, define New Routines with ABAB help to fulfill your requirement. Try this if found useful award full points.
    Regards,
    Ajay Nikte

  • Batch Traceability for Sugar as raw material during the production process

    Dear Colleague ,
    I need your support for a traceability issue in a customer on beverage sector
    See the case below:
    Batch Traceability for Sugar as raw material during the production process
    In AMSB the batch traceability in some production processes is very difficult, especially in case of sugar where tanks wherein more than one batches of the same material can be mixed. For example, in a single day almost 17-20 batches of the same material can be mixed and as the result is a composition of water and sugar the normal FIFO rule strategy cannot be applied during the component consumption.
    The raw material (sugar) is received in tank S5 at different points of time, and its content is transferred to tank B1 for storage purposes as well as for mix the sugar with other material such as water.
    At a specific moment the S5 tank contains only a single batch, while the tank B1 contains more than one batch. Tank B1 is used in order to supply the production line and the corresponding material consumption is triggered in backflush as soon as the production activity is declared (production confirmation). Along with the material consumption the batch determination takes place and a complex algorithm is applied: at a very high level, the single batch is consumed depending on its percentage inside the mix of composition and in case the this
    percentage is under a threshold level the current batch should be full used in order to avoid that it will exist for ever.
    Moreover, the good movement reversal (reversal of material consumption) and its correction lead to a complete new calculation of all the batches consumed after the original movement date/time. This means that the algorithm for batch determination should be reapplied for all the consumptions subsequent to the original movement.
    On the other hand it’s not possible to identify the mix of batches at the exit point of silos B1 because the total consumption of the material in the tank will never happen. As long as the tank level decreases it will be filled up from the tank used for receiving of sugar (S5).
    As requirement AMSB needs to post the material consumption starting from EWM, this means that EWM should be the master system in this case and the correspondingmovements have to be  transferred to ECC afterwards. This mainly because EWM  should guarantee the business continuity in case the ERP system is not available.
    AMSB asked if the scenario depicted has been implemented in some customer, in EWM system or in any other SAP solution.

    Hi ,
    At the time of consumption you can put ' * ' aestrix sign in the batch field.
    You will get list of batches of that material.select ur batch and consume the quantity.
    Regards
    Piyush

  • Problem in automatic batch determination for components in process order

    hi
    Ours is a process order industry. Here we prepare food items.
    We are entering manual batch for finished product. We want to perform automatic batch determination for one of the components raw material. For other packing material we do not want to maintain batches.
    The batch procedure picked is me0001 for 261 movement type instead of C00001.
    Because of that we need to enter batch manually.
    Send us the procedure to automatic batch determination for components.
    regards
    ravi

    Ravi,
    Before posting please do search in this forum because this topic has been discussed many times in past.
    Please check below links which could be helpful to you Automatic batch determination in process order
    http://www.sapsword.com/home/sap-batch-management/sap-batch-determination
    If you still have issues then please come back.
    Br
    KK

  • Process Order number as batch number for produced materiai

    Hi gurus
    Is it possible in SAP to automatically set the process order number as the batch number for an semi finished good or finished good? Is there a config like that in SAP?
    Thanks

    Hi,
    Refer this [link|http://help.sap.com/saphelp_46b/helpdata/fr/e9/c6f9bdaa28d3119b440060b0671acc/content.htm]
    you have to use EXIT_SAPLV01Z_001 and EXIT_SAPLV01Z_002 in the case were you want to Copying the production order number to the batch number.
    Regards,
    Dhaval

  • Process Order -Batch determination for a BOM material(same batch)

    Hi Friends,
    Thanks in advance.
    Let us say, a material (ROH) has so many batches as A,B,C & D. Whenever we create a new process order, system has to pick only the particular batch( say -C here)  in the process order BOM through batch determination.  (during process order creation stage)
    1.How to achieve the same ?
    2. What are the ways are there to achieve the same ?
    3.Is there any Exit for this?
    Regards,
    Mani

    Hi Velmurugan & Vishwas,
    Thnaks for your feed back.
    1. Is there any other ways without batch classification ? ( Because there are so many material without MM-classification view.....and client wants without extending the Classification view for MM master as it suggests same batch for all GI for delivery & GR for purchase.....)...We want only for process order batch determination.....
    2. Is there any exit for this ?
    3. Is it possible through any kind of Characteristic assignment in the Sort sequence? How?
    Regards,
    Mani

  • Batch Determination for material in Process Order

    Hello,
    I need to set up a Batch determination strategy for the Raw material at IM level for a Process Order.
    Basically the materials are Batch Managed and already have a Batch number assigned to it.
    I just want to use a simple strategy of determining material with the oldest GR datel(FIFO) during the Process Order creation/release or during the Process Order confirmation.
    Can you guide me how to set up the strategy and the conditions to do a FIFO for the materials during the Process order.
    Thanks in Advance
    SAP FANS....

    Hi,
    Only Problem with this FIFO strategy in which you want to do Batch Determination with reference to Oldest GR date is GR date itself.
    Batch determination will only possible if Batch Characteristic values are maintain.What I have observe for this GR date is if we use this as a Reference Characteristic in that case also Value is not set automatically in the Batch Data, so value of the GR date is maintain manually.Pls check it your end if no problem then The rest of the things for Batch determination are not difficult.
    Use below link for Batch determination,
    [Batch Management and Determination |Re: Browser Based PI sheet]
    Regards,
    Dhaval

  • Auto batch detmn for components in Process Order selects batch in Q status.

    Hi Gurus,
    We have the following issue with automatic batch determination for component batches for a Process Order:
    Say for a Process Order it requires components A,B, and C.
    The issue is with component C. if the PO requires 100 Qty of C. the system is picking batch X having 80 qty  and picking 20 from another batch Y which is still in u201CQu201D status (due to some defects it is not cleared .  for which inspection should have completed 3 days before Process Order is released).
    Also there are only these two batches for this component in MMBE.
    What I understand is system adds GR date + GR processing days ( for inspection) and release component for production after that (ie., moves to Un restricted stock). Therefore system selects this batch as per the availability check (by calculating the GR+ GR processing date) even thoe it is not cleared yet.
    Also, I want to know If this is correct procedure, how can we make system to not to include batch with Q stock (batch which is having some defects).
    Thanks,
    N.

    Hi
    Use separate Checking Group(Availability Check) in MRP-3 view for comp C with the settings in OPJJ(Availability Check+Checking rule combination) with untick incl.quality insp stock. Idea is to select the un-restricted batch stock qty during Auto Batch determination for Components
    Regards
    Brahmaji

  • ESB Process reads a Batch file for a limited set of records only..?

    Dear All,
    I am having an ESB process that reads a Batch file (csv) that has around 10,000 Products information.
    I have another BPEL process that will create the Product in Oracle Apps through standard API (Main BPEL process that calls a child process for creating product).
    I am invoking the BPEL process from ESB, and that works fine.
    Now, the Issue is: I am able to create at a time around 10 Products (the main process calls the child process in a loop.). The main process instance is not getting created but the child process instance is getting created for a set of records, afterwards the child process instances get stops creating. The main process instance could not be found in the console. Not getting why the process is not getting visible as well it is not completing the process.
    What could be the problem for this... Am I need to change any environment configurations...?
    Please update...
    Many Thanks in advance...

    Does this apply to you?
    https://social.technet.microsoft.com/Forums/en-US/9ccd8e50-b0af-4f58-9787-6435834e4c52/dfsr-not-working-on-new-windows-2008r2-server
    Thanks for the link, but no - not the same scenario although the error is the same.   The RGs I'm working with are all in sync and communication is working, it's just getting the backlog reported correctly.
    To reiterate, I can paste two versions of the exact command into the DOS window buffer; one copied from OneNote and one copied from my batch file.  Executing the one from OneNote succeeds and reports the RG in sync and the one copied from the batch
    file fails.
    I can repeat the results by up arrow once to the command pasted into the buffer from the batch file and see it fail.  Then up arrow twice to retrieve the command pasted from OneNote into the buffer and it will report correctly (illustrated in the grahic).
    Let me add that the command in the batch file was originally copied from OneNote and pasted in to the batch file; as if going into the batch file somehow corrupts it.
    - a -

Maybe you are looking for

  • Wake on Lan (works, but not always)

    Iam trying to get Wak on Lan working on my iMac. It works, but not always. When I put my mac to sleep en send the magic package, my mac turns back on. But when my mac turns to sleep and I wait a few hours (the next morning), my Mac doesn't respond to

  • Oracle 9i dblink to SQL Server

    Hi experts, I need some info on what I need to set up a db link on an Oracle 9i db running on HP-UX to a SQL Server 2008 db running on Windows Server 2008 R2. For the Oracle Windows component do I need to keep it at Oracle 9 or can I install the late

  • Install on XP

    I installed Oracle 8i on Win XP home Edition, and now I'm getting this annoying message all time about java.exe, the mistake sign says: sZAppName:java.exe szAppVer:0.0.0.0 szModName:symcjit.dll szModVer:0005f974 This .dll archive had to be changed to

  • Loading display names in array

    Hi, I would like comparing registry display names before and after a software installation. So the function below is : 1. loading display names 2. Then I create manually a registry display names 3. I load again the display names 4. And I am running a

  • ETA for New iTunes?

    I've been looking forward to using the upcoming version of iTunes since September. Now, its release was delayed by a month due to some sort of error and now that the month that Apple claims it's to be released in is almost over, I'm now wondering whe