While loop is not working properly

Dear all,
I have a procedure which takes data form other tables and fill one table.
See partial code
DECLARE
--  WELLS
CURSOR c_well
IS
SELECT *
FROM   well
where well_s = 3419740
-- Welltest
CURSOR c_welltest ( v_well_s NUMBER )
IS
SELECT *
FROM   welltest_msr
WHERE  well_s  = 3419740
AND    check_ind = 1
ORDER BY msr_date DESC
-- FBHP
CURSOR c_fbhp_dsr ( v_well_s NUMBER )
IS
select m.pfnu_s
,       m.msr_date
,      p.value
from   msr_act m
,        msr_act_par p
,       r_msr_act_par r
where  m.msr_act_s       = p.msr_act_s
and    p.r_msr_act_par_s = r.r_msr_act_par_s
and    r.abbr            = 'FBH1'
and    m.pfnu_s             = 3419740
and    p.check_ind         = 1
ORDER BY m.msr_date DESC
r_fbhp_dsr            c_fbhp_dsr%ROWTYPE;
r_fbhp_dsr_leeg       c_fbhp_dsr%ROWTYPE;
DELETE FROM so_welltest_plus;
FOR r_well IN c_well
LOOP
r_fbhp_dsr         := r_fbhp_dsr_leeg;
   OPEN  c_fbhp_dsr ( r_well.well_s  );
   FETCH c_fbhp_dsr INTO r_fbhp_dsr;
FOR r_welltest IN c_welltest ( r_well.well_s )
   LOOP
WHILE NVL(r_fbhp_dsr.msr_date,r_welltest.msr_date - 1) >=
r_welltest.msr_date
     LOOP
       FETCH c_fbhp_dsr INTO r_fbhp_dsr;
     -- dbms_output.put_line (r_fbhp_dsr.msr_date);
       IF    c_fbhp_dsr%NOTFOUND
       THEN
          BEGIN
             r_fbhp_dsr := r_fbhp_dsr_leeg;
             EXIT;
          END;
       END IF;
     END LOOP;
INSERT INTO SO_WELLTEST_PLUS
       (    WELL_S
       ,    WELLNAME
       ,    WELLTEST_DATE
       ,    BFPD
       ,    BOPD
       ,    BWPD
       ,    WATERCUT
       ,    FBHP
       ,    FBHP_SRO
       ,    FBHP_DMG
       ,    FBHP_DATE
       ,    FBHP_SRO_DATE
       ,    FBHP_DMG_DATE
VALUES
        (      r_well.well_s
         ,     r_well.wellname
         ,     r_welltest.msr_date
         ,     r_welltest.fld_rate
         ,     r_welltest.oil_rate
         ,     r_welltest.wtr_rate
         ,       v_watercut
    ,       r_fbhp.value
        ,      r_fbhp_dsr.value
        ,     r_fbhp_dmg.value
    ,    r_fbhp.msr_date
    ,    r_fbhp_dsr.msr_date
    ,    r_fbhp_dmg.msr_date
END LOOP;
CLOSE c_fbhp_dsr;
COMMIT;
END LOOP;
END;I will explain what the code is doing now:
Result cursor C_WELL:
+WELL_S+ +MSR_DATE+
3419740     23-OCT-12
3419740     18-SEP-12
3419740     28-AUG-12
3419740     16-JUL-12
3419740     14-JUN-12
3419740     11-MAY-12
3419740     12-APR-12
3419740     15-MAR-12
3419740     16-FEB-12
3419740     23-JAN-12
3419740     05-JAN-12
3419740     07-DEC-11Result for CURSOR c_fbhp_dsr:
+PFNU_S+ +MSR_DATE+ +VALUE+
3419740     23-OCT-12  445
3419740     19-SEP-12      447
3419740     28-AUG-12      441
3419740     16-JUL-12      449
3419740     14-JUN-12      449
3419740     09-MAY-12      451
3419740     11-APR-12      447
3419740     12-DEC-11      434
3419740     01-DEC-11      426After the while loop the data is inserted into the table:
+well_s+        +wellname+  +welltest_date+  +fbhp_sro+ +fbhp_sro_date+
3419740            3Z22               23-OCT-12     447                 19-SEP-12
3419740            3Z22               18-SEP-12     441                 28-AUG-12
3419740            3Z22               28-AUG-12     449                 16-JUL-12
3419740            3Z22               16-JUL-12             449                 14-JUN-12
3419740            3Z22               14-JUN-12     451                 09-MAY-12
3419740            3Z22               11-MAY-12     451                 09-MAY-12
3419740            3Z22               12-APR-12     447                 11-APR-12
3419740            3Z22               15-MAR-12     434                 12-DEC-11
3419740            3Z22               16-FEB-12     434                 12-DEC-11
3419740            3Z22               23-JAN-12     434                 12-DEC-11
3419740            3Z22               05-JAN-12     434                 12-DEC-11
3419740            3Z22               07-DEC-11     426                 01-DEC-11As you can see the value 23 oct 2012 from CURSOR c_fbhp_dsr is not being inserted.
That value should also be inserted.
The result should be like this:
+well_s+        +wellname+  +welltest_date+  +fbhp_sro+ +fbhp_sro_date+
3419740            3Z22               23-OCT-12     445                 23-OCT-12
3419740            3Z22               18-SEP-12     441                 28-AUG-12
3419740            3Z22               28-AUG-12     441                 28-AUG-12
3419740            3Z22               16-JUL-12             449                 16-JUL-12
3419740            3Z22               14-JUN-12     449                 14-JUN-12
3419740            3Z22               11-MAY-12     451                 09-MAY-12
3419740            3Z22               12-APR-12     447                 11-APR-12
3419740            3Z22               15-MAR-12     434                 12-DEC-11
3419740            3Z22               16-FEB-12     434                 12-DEC-11
3419740            3Z22               23-JAN-12     434                 12-DEC-11
3419740            3Z22               05-JAN-12     434                 12-DEC-11
3419740            3Z22               07-DEC-11     426                 01-DEC-11I did a dbms output on the while loop and it isn't collecting 23-oct-12.
Some please on this please.
Thanks,
Diana

Hi,
My procedure is not exactly doing what i want it to do.
My question is, how can i get it to do this:
Loop through cursor c_fbhp_dsr and c_welltest based on parameter well_s from c_well (see the data in first post).
When the MSR_DATE of c_fbhp_dsr is the same as MSR_DATE of c_welltest for the same WELL_S ( see cursor c_well), then data is inserted in the SO_WELLTEST_PLUS table. When the dates are not equal, then insert should be done on condition MSR_DATE of c_fbhp_dsr should be > than MSR_DATE of c_welltest.
INSERT INTO SO_WELLTEST_PLUS
       (    WELL_S
       ,    WELLNAME
       ,    WELLTEST_DATE
       ,    FBHP_SRO
       ,    FBHP_SRO_DATE
VALUES
        (      r_well.well_s
         ,     r_well.wellname
         ,     r_welltest.msr_date
         ,      r_fbhp_dsr.value
         ,    r_fbhp.msr_date
        );Example:
CURSOR C_RBHP:
+PFNU_S+ +MSR_DATE+ +VALUE+
3419740     23-OCT-12  445
3419740     19-SEP-12      447
3419740     28-AUG-12      441
3419740     16-JUL-12      449
3419740     14-JUN-12      449
3419740     09-MAY-12      451
3419740     11-APR-12      447
3419740     12-DEC-11      434
3419740     01-DEC-11      426CURSOR C_WELLTEST:
+WELL_S+ +MSR_DATE+
3419740     23-OCT-12
3419740     18-SEP-12
3419740     28-AUG-12
3419740     16-JUL-12
3419740     14-JUN-12
3419740     11-MAY-12
3419740     12-APR-12
3419740     15-MAR-12
3419740     16-FEB-12
3419740     23-JAN-12
3419740     05-JAN-12
3419740     07-DEC-11Desired output:
+well_s+        +wellname+  +welltest_date+  +fbhp_sro+ +fbhp_sro_date+
3419740            3Z22               23-OCT-12     445                 23-OCT-12
3419740            3Z22               18-SEP-12     441                 28-AUG-12
3419740            3Z22               28-AUG-12     441                 28-AUG-12
3419740            3Z22               16-JUL-12             449                 16-JUL-12
3419740            3Z22               14-JUN-12     449                 14-JUN-12
3419740            3Z22               11-MAY-12     451                 09-MAY-12
3419740            3Z22               12-APR-12     447                 11-APR-12
3419740            3Z22               15-MAR-12     434                 12-DEC-11
3419740            3Z22               16-FEB-12     434                 12-DEC-11
3419740            3Z22               23-JAN-12     434                 12-DEC-11
3419740            3Z22               05-JAN-12     434                 12-DEC-11
3419740            3Z22               07-DEC-11     426                 01-DEC-11

Similar Messages

  • Pick activity is not working properly while creating two or more file adapt

    Hi,
    pick activity is not working properly while creating two or more file adapter for bpel process.
    bpel process compiled and deployed succesfully but while observing the wsdl file of deployed process you can find only one file adapter. so it polls only from that location.
    can anybody help on over this? or it's limitation of jdev to use only one file adapter at time while using Pick.
    Thanks
    sagar

    Does anybody tried this?
    Thanks
    sagar

  • I am facing problem in playing yahoo pool in Firefox 4 while it was working fine in Firefox 3.6. In Firefox 4 the combination of mouse keys are not working properly.

    I am facing problem in playing yahoo pool in Firefox 4 while it was working fine in Firefox 3.6. In Firefox 4 the combination of mouse keys are not working properly.

    I updated to Firefox 4.01 today and the middle scroll button on my Lenovo T400 stopped working. I downloaded the updated Ultranav utility and the Ultranav driver for my T400 from here http://www-307.ibm.com/pc/support/site.wss/MIGR-72858.html and then uninstalled the "Thinkpad Ultranav Driver" from Add/Remove programs rebooted and then installed the updated utility and driver (another reboot) and it now works perfectly.
    So glad to get this working again.

  • Subvi does not work properly when called inside a vi

    Hello Every body
    thanks for your help. i am using a sub vi for sine signal generation. as a vi it works fine. but when i called this subvi inside another VI it gives some problems. for example timer indicator works properly.it reinitializes as well in the sub vi, but in the main VI it does not work properly. means does not count the time.in the sub vi on the fly i can change the values of frequency and amplitude in real time, but when i use as sub vi, it does not reponse as i change the values in the control arrays.similarly pause and continue works properly in the sub vi, but once again in the main VI, it does not work properly.graph indicator also work properly in the sub vi. but here once again it does not work properly in the main VI.the pause resume indicator also does not blink, when it is continue. in the subvi it blinks very well.generally why the sub vi does not work properly inside the VI?i am sending my VI and sub vis.
    any tips would be highly appreciated.
    thanks
    Regards
    Attachments:
    vi.zip ‏87 KB

    I just want to add some more details to Dan's answer. The subVI is acting exactly like you've coded it. The mistake is in understanding how subVIs work. When you call a subVI (or a function in any other language), you pass some parameters to it, the subVI does it's thing and returns values. the subVI does not accept new parameters from the calling VI until it returns to the caller and the caller runs the subVI again. In your case, you have a subVI with a while loop. You have some front panel control wired to the subVI's stop terminal. When first called, the value is false. So the subVI will keep running until the subVI's stop button becomes true but you cannot change it from main until the subVI finishes and returns so the subVI will never stop. As Dan says, the solution is pass references of front panel controls to the subVI and have the subVI monitor those references for changes and to update references to indicators on Main. You subVI does not need any front panel controls or indicators of it's own.

  • Sir i am using datasocket read ,i am communicating with java but my problem is that bcz im using while loop to see if value has changed my labview consumes all the processors time ,sir i want a event like thing so that while loop is not in continuous loop

    sir i have given lot of effort but i am not able to solve my problem either with notifiers or with occurence fn,probably i do not know how to use these synchronisation tools.

    sir i am using datasocket read ,i am communicating with java but my problem is that bcz im using while loop to see if value has changed my labview consumes all the processors time ,sir i want a event like thing so that while loop is not in continuous loopHi Sam,
    I want to pass along a couple of tips that will get you more and better response on this list.
    1) There is an un-written rule that says more "stars" is better than just one star. Giving a one star rating will probably eliminate that responder from individuals that are willing to anser your question.
    2) If someone gives you an answer that meets your needs, reply to that answer and say that it worked.
    3) If someone suggests that you look at an example, DO IT! LV comes with a wonderful set of examples that demonstate almost all of the core functionality of LV. Familiarity with all of the LV examples will get you through about 80% of the Certified LabVIEW Developer exam.
    4) If you have a question first search the examples for something tha
    t may help you. If you can not find an example that is exactly what you want, find one that is close and post a question along the lines of "I want to do something similar to example X, how can I modify it to do Y".
    5) Some of the greatest LabVIEW minds offer there services and advice for free on this exchange. If you treat them good, they can get you through almost every challenge that can be encountered in LV.
    6) If English is not your native language, post your question in the language you favor. There is probably someone around that can help. "We're big, we're bad, we're international!"
    Trying to help,
    Welcome to the forum!
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Remote not working properly with Apple TV...sporadic fuctioning

    Hello,
    I have no idea what caused this to happen, but both my remotes (I have one from my MacBook Pro and one from my AppleTV) seem to not work properly with AppleTV. It sometimes works but it is extremely frustrating as it only registers about 1 out of every 10-20 clicks then continues to remember the previous clicks therefore making it essentially impossible to select the desired menu/item. Basically it just seems like it's out of control!
    I tested whether it was the remote or AppleTV that was causing the problem by running Front Row on my MacBook Pro and both remotes seem to navigate Front Row perfectly fine. They both act the same way with AppleTV, whether they are paired or not. It seems as though something happened with my AppleTV. This problem occurred randomly, with no specific cause I can think of.
    Please let me know if any of you have ever experienced this problem and what your solution was, if any!
    I have tried restoring to factory conditions, resetting settings, ran diagnostics, unplugged and replugged it, and nothing seems to be working!
    Oh, and I just replaced the battery on one and have tried swapping batteries, etc.
    HELP PLEASE!
    Thank you,
    Travis

    The menus have never been as responsive as they used to since the 2.0 update in my opinion - basically AppleTV seems to cache/buffer remote click if it is busy or perhaps waiting for something to stream from itunes, and when resources become available it suddenly executes all command rapidly which makes it behave wildly in menus.
    Usually happens I find after restarting the unit or if streaming drives have gone in to power saving modes and there's a delay while they wake up to feed the AppleTV.

  • Hi ALL i have a BDC code  it is not working properly

    this BDC code is not working properly , when ever the file is transfering BDC is aborting in the case of   invalid material/batch comes into teh picture... so please could you ''Check for invalid material/batch combinations so they are not processed by the BDC in the program and correctly output in an exception report''
    *****************************CODE HERE*****************************
    S E L E C T I O N S C R E E N
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
    PARAMETERS: p_file LIKE rlgrap-filename,
    p_arch LIKE rlgrap-filename. "RM080107
    SELECTION-SCREEN SKIP.
    PARAMETERS: p_mode LIKE ctu_params-dismode DEFAULT 'N'.
    SELECTION-SCREEN END OF BLOCK b1.
    I N C L U D E S
    INCLUDE zwm_np_stock_recon_top.
    INCLUDE zwm_np_stock_recon_f01.
    I N I T I A L I Z A T I O N
    INITIALIZATION.
    PERFORM get_interface_filename USING c_interface_file p_file.
    PERFORM get_interface_filename USING c_archive_file p_arch."RM080107
    S T A R T O F S E L E C T I O N
    START-OF-SELECTION.
    PERFORM read_file USING p_file.
    PERFORM pre_processing.
    E N D O F S E L E C T I O N
    END-OF-SELECTION.
    PERFORM process_checks.
    IF w_no_change = 'X'.
    WRITE: / text-b03.
    WRITE: / sy-uline(34).
    ELSE.
    PERFORM bdc_mi09.
    PERFORM file_check_report.
    PERFORM bdc_report.
    ENDIF.
    PERFORM post_process_checks.
    *-- Move the processed file to archive directory
    PERFORM move_file.
    ...*************.........first include...................************
    INCLUDE ZWM_NP_STOCK_RECON_TOP *
    Data declaration ----------------------------------------------
    TYPES: st_rawdata(2000) TYPE c.
    TYPES: BEGIN OF st_stck_cnt,
    werks TYPE iseg-werks, "plant
    lgort TYPE iseg-lgort, "storage location
    matnr TYPE iseg-matnr, "material number
    charg TYPE iseg-charg, "batch
    vfdat TYPE mch1-vfdat, "Sell by date
    lwedt TYPE mch1-lwedt, "Manufacture date
    quarn(8) TYPE n, "qaunrantine quantity
    menge(8) TYPE n, "quantity on hand
    message(1), "Message Type (E/W/I)
    msg_txt TYPE t100-text, "Message Text
    zerostck(1), "Zero stock identifier "RM220307
    END OF st_stck_cnt.
    TYPES: BEGIN OF st_batch_errors,
    matnr TYPE iseg-matnr, "material number
    charg TYPE iseg-charg, "batch
    clabs TYPE mchb-clabs, "Stock Balance
    END OF st_batch_errors.
    DATA:
    t_rawdata TYPE TABLE OF st_rawdata,
    w_rawdata TYPE st_rawdata,
    t_stck_cnt TYPE TABLE OF st_stck_cnt,
    d_stck_cnt TYPE TABLE OF st_stck_cnt, "RM191006
    w_stck_cnt TYPE st_stck_cnt,
    t_batch_errors TYPE TABLE OF st_batch_errors,
    w_batch_errors TYPE st_batch_errors,
    t_messtab LIKE bdcmsgcoll OCCURS 0,
    w_messtab LIKE LINE OF t_messtab,
    w_no_change.
    CONSTANTS: c_interface_file(26) TYPE c VALUE 'ZNP_STOCK_RECON',
    c_archive_file(26) TYPE c
    VALUE 'ZNP_STOCK_RECON_ARCHIVE'. "RM080107
    .*************................second include..........************
    ***INCLUDE ZWM_NEXTPHARMA_STOKRECON_F01 .
    *& Form read_file
    reads NextPharma file sent through via webmethods
    -->P_FILENAME
    FORM read_file USING p_filename.
    CLEAR: t_rawdata,
    w_rawdata.
    REFRESH: t_rawdata.
    OPEN DATASET p_filename FOR INPUT IN TEXT MODE.
    IF sy-subrc <> 0.
    MESSAGE e720(01).
    ENDIF.
    DO.
    READ DATASET p_filename INTO w_rawdata.
    IF sy-subrc <> 0.
    EXIT.
    ELSE.
    APPEND w_rawdata TO t_rawdata.
    ENDIF.
    ENDDO.
    CLOSE DATASET p_filename.
    ENDFORM. " read_file
    *& Form pre_processing
    Read file values into internal table
    FORM pre_processing.
    DATA: lw_matnr TYPE iseg-matnr.
    LOOP AT t_rawdata INTO w_rawdata.
    lw_matnr = w_rawdata+21(20). "RM031006
    lw_matnr = w_rawdata+22(18). "RM031006
    CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
    EXPORTING
    input = lw_matnr
    IMPORTING
    output = lw_matnr
    EXCEPTIONS
    length_error = 1
    OTHERS = 2.
    MOVE: lw_matnr TO w_stck_cnt-matnr.
    w_stck_cnt-werks = w_rawdata+14(4).
    w_stck_cnt-lgort = w_rawdata+18(4).
    w_stck_cnt-charg = w_rawdata+84(25).
    w_stck_cnt-vfdat = w_rawdata+109(8).
    w_stck_cnt-lwedt = w_rawdata+117(8).
    w_stck_cnt-quarn = w_rawdata+141(8).
    w_stck_cnt-menge = w_rawdata+125(8).
    APPEND w_stck_cnt TO t_stck_cnt.
    CLEAR w_stck_cnt.
    ENDLOOP.
    SORT t_stck_cnt BY werks
    lgort
    matnr
    charg.
    DELETE ADJACENT DUPLICATES FROM t_stck_cnt.
    ENDFORM. " pre_processing
    *& Form bdc_mi09
    Run file data via BDC TCODE: MI09
    FORM bdc_mi09.
    DATA: t_bdcdata TYPE TABLE OF bdcdata,
    w_bdcdata TYPE bdcdata,
    lw_datum(10) TYPE c,
    lw_count(2) TYPE n.
    WRITE sy-datum TO lw_datum DD/MM/YYYY.
    Front Screen
    CLEAR w_bdcdata.
    w_bdcdata-program = 'SAPMM07I'.
    w_bdcdata-dynpro = '0700'.
    w_bdcdata-dynbegin = 'X'.
    APPEND w_bdcdata TO t_bdcdata.
    Enter
    CLEAR w_bdcdata.
    w_bdcdata-fnam = 'BDC_OKCODE'.
    w_bdcdata-fval = '/00'.
    APPEND w_bdcdata TO t_bdcdata.
    Count Date
    CLEAR w_bdcdata.
    w_bdcdata-fnam = 'RM07I-ZLDAT'.
    w_bdcdata-fval = lw_datum.
    APPEND w_bdcdata TO t_bdcdata.
    Document Date
    CLEAR w_bdcdata.
    w_bdcdata-fnam = 'RM07I-BLDAT'.
    w_bdcdata-fval = lw_datum.
    APPEND w_bdcdata TO t_bdcdata.
    Plant
    CLEAR w_bdcdata.
    w_bdcdata-fnam = 'IKPF-WERKS'.
    w_bdcdata-fval = w_stck_cnt-werks.
    APPEND w_bdcdata TO t_bdcdata.
    Storage Location
    CLEAR w_bdcdata.
    w_bdcdata-fnam = 'IKPF-LGORT'.
    w_bdcdata-fval = w_stck_cnt-lgort.
    APPEND w_bdcdata TO t_bdcdata.
    LOOP AT t_stck_cnt INTO w_stck_cnt.
    Do not submit items with Errors against them
    CHECK w_stck_cnt-message NE 'E' AND
    w_stck_cnt-zerostck NE 'X'.
    "RM220307
    lw_count = lw_count + 1.
    Input Screen
    CLEAR w_bdcdata.
    w_bdcdata-program = 'SAPMM07I'.
    w_bdcdata-dynpro = '0731'.
    w_bdcdata-dynbegin = 'X'.
    APPEND w_bdcdata TO t_bdcdata.
    Page Down
    CLEAR w_bdcdata.
    w_bdcdata-fnam = 'BDC_OKCODE'.
    w_bdcdata-fval = '=P+'.
    APPEND w_bdcdata TO t_bdcdata.
    Material
    CLEAR w_bdcdata.
    w_bdcdata-fnam = 'ISEG-MATNR(01)'.
    w_bdcdata-fval = w_stck_cnt-matnr.
    APPEND w_bdcdata TO t_bdcdata.
    Batch
    CLEAR w_bdcdata.
    w_bdcdata-fnam = 'ISEG-CHARG(01)'.
    w_bdcdata-fval = w_stck_cnt-charg.
    APPEND w_bdcdata TO t_bdcdata.
    IF w_stck_cnt-menge NE 0.
    Quantity
    CLEAR w_bdcdata.
    w_bdcdata-fnam = 'ISEG-ERFMG(01)'.
    w_bdcdata-fval = w_stck_cnt-menge.
    APPEND w_bdcdata TO t_bdcdata.
    *-- Begin RM220307 - We need to create an item when the quantity is zero
    *-- in file and is non-zero in SAP
    ELSE.
    Zero Stock indicator
    CLEAR w_bdcdata.
    w_bdcdata-fnam = 'ISEG-XNULL(01)'.
    w_bdcdata-fval = 'X'.
    APPEND w_bdcdata TO t_bdcdata.
    *-- End RM220307
    ENDIF.
    ENDLOOP.
    CHECK lw_count NE 0.
    After all line items have been input
    Final Screen
    CLEAR w_bdcdata.
    w_bdcdata-program = 'SAPMM07I'.
    w_bdcdata-dynpro = '0731'.
    w_bdcdata-dynbegin = 'X'.
    APPEND w_bdcdata TO t_bdcdata.
    Save Document
    CLEAR w_bdcdata.
    w_bdcdata-fnam = 'BDC_OKCODE'.
    w_bdcdata-fval = '=BU'.
    APPEND w_bdcdata TO t_bdcdata.
    CALL TRANSACTION 'MI09' USING t_bdcdata
    MODE p_mode
    MESSAGES INTO t_messtab.
    ENDFORM. " bdc_mi09
    *& Form bdc_report
    Write BDC Messages.
    FORM bdc_report.
    DATA: lw_text TYPE t100-text.
    SKIP.
    WRITE: / text-b01.
    WRITE: / sy-uline(21).
    SKIP.
    Write BDC Messages
    LOOP AT t_messtab INTO w_messtab WHERE msgspra = sy-langu.
    MESSAGE ID w_messtab-msgid TYPE w_messtab-msgtyp
    NUMBER w_messtab-msgnr
    WITH w_messtab-msgv1
    w_messtab-msgv2
    w_messtab-msgv3
    w_messtab-msgv4
    INTO lw_text.
    WRITE: / lw_text.
    ENDLOOP.
    ENDFORM. " bdc_report
    *& Form process_checks
    Perform process check before creating BDC Session
    FORM process_checks.
    DATA: lw_clabs LIKE mchb-clabs,
    lw_menge LIKE mchb-clabs,
    lw_matnr LIKE mara-matnr,
    lw_charg LIKE mch1-charg,
    lw_fail,
    lw_vfdat TYPE mch1-vfdat,
    lv_sell TYPE c, "RM191006
    lv_qty(8) TYPE c. "RM191006
    CLEAR: d_stck_cnt[], d_stck_cnt. "RM191006
    Check if any of the stock figures differ from current stock figures
    LOOP AT t_stck_cnt INTO w_stck_cnt.
    lw_menge = w_stck_cnt-menge.
    SELECT SINGLE clabs INTO lw_clabs
    FROM mchb
    WHERE matnr = w_stck_cnt-matnr
    AND werks = w_stck_cnt-werks
    AND lgort = w_stck_cnt-lgort
    AND charg = w_stck_cnt-charg.
    IF sy-subrc = 0.
    IF lw_clabs NE lw_menge.
    lw_fail = 'X'.
    *-- Begin RM220307 - Do not create PI item if the stock is zero in the
    *-- file and is zero in SAP
    EXIT.
    ELSEIF lw_clabs = 0 AND lw_menge = 0.
    w_stck_cnt-zerostck = 'X'.
    MODIFY t_stck_cnt FROM w_stck_cnt.
    ENDIF.
    *-- End RM220307
    ELSE.
    lw_fail = 'X'.
    ERROR
    ENDIF.
    ENDLOOP.
    If no differences are found set NO CHANGE Flag
    IF lw_fail NE 'X'.
    w_no_change = 'X'.
    EXIT.
    ENDIF.
    Check for Errors in file data
    LOOP AT t_stck_cnt INTO w_stck_cnt.
    CLEAR lv_sell. "RM191006
    SELECT SINGLE matnr INTO lw_matnr
    FROM mara
    WHERE matnr = w_stck_cnt-matnr.
    IF sy-subrc NE 0.
    Invalid Material (E)
    w_stck_cnt-message = 'E'.
    w_stck_cnt-msg_txt = 'Invalid Material'.
    MODIFY t_stck_cnt FROM w_stck_cnt.
    CONTINUE.
    ENDIF.
    SELECT SINGLE charg vfdat
    INTO (lw_charg, lw_vfdat)
    FROM mch1 "KOB01 - changed from MCHA
    WHERE matnr = w_stck_cnt-matnr
    AND charg = w_stck_cnt-charg.
    AND werks = w_stck_cnt-werks.
    IF sy-subrc NE 0.
    Invalid Material Batch (E)
    w_stck_cnt-message = 'E'.
    CONCATENATE 'Invalid Material Batch for plant' w_stck_cnt-werks
    INTO w_stck_cnt-msg_txt SEPARATED BY space.
    MODIFY t_stck_cnt FROM w_stck_cnt.
    CONTINUE.
    ELSE.
    IF w_stck_cnt-vfdat <> lw_vfdat.
    Sell by dates do not match (W)
    w_stck_cnt-message = 'W'.
    w_stck_cnt-msg_txt =
    'Sell by Date does not match Shelf life Expiry Date'.
    MODIFY t_stck_cnt FROM w_stck_cnt.
    lv_sell = 'X'. "RM191006
    CONTINUE. "RM191006
    ENDIF.
    ENDIF.
    IF w_stck_cnt-quarn > 0.
    Quarantine balance not Zero (W)
    w_stck_cnt-message = 'W'.
    *-- Begin RM191006
    *-- We do want all warning messages on the report
    lv_qty = w_stck_cnt-quarn.
    CONDENSE lv_qty NO-GAPS.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
    EXPORTING
    input = lv_qty
    IMPORTING
    output = lv_qty.
    w_stck_cnt-msg_txt = 'Quarantine balance is not zero'.
    CONCATENATE 'Quarantine balance is ' lv_qty '- not zero'
    INTO w_stck_cnt-msg_txt SEPARATED BY space.
    MODIFY t_stck_cnt FROM w_stck_cnt.
    CONTINUE.
    IF lv_sell = 'X'.
    APPEND w_stck_cnt TO d_stck_cnt.
    CLEAR lv_sell.
    ELSE.
    MODIFY t_stck_cnt FROM w_stck_cnt.
    ENDIF.
    *-- End RM191006
    ENDIF.
    ENDLOOP.
    *-- Begin RM191006
    *-- Finally get all the records into dummy table to report
    APPEND LINES OF t_stck_cnt TO d_stck_cnt.
    SORT d_stck_cnt.
    DELETE ADJACENT DUPLICATES FROM d_stck_cnt.
    *-- End RM191006
    ENDFORM. " process_checks
    *& Form file_check_report
    Write warning and Error messages from File checks
    FORM file_check_report.
    WRITE: /2 'Material',
    22 'Batch',
    32 'Sell By',
    45 'Message Text'.
    WRITE: /2 sy-uline(115).
    SKIP.
    LOOP AT t_stck_cnt INTO w_stck_cnt. "RM191006
    LOOP AT d_stck_cnt INTO w_stck_cnt. "RM191006
    CHECK w_stck_cnt-message NE ' '.
    WRITE: /2 w_stck_cnt-matnr,
    22 w_stck_cnt-charg,
    32 w_stck_cnt-vfdat,
    43 w_stck_cnt-message,
    45 w_stck_cnt-msg_txt.
    ENDLOOP.
    ENDFORM. " file_check_report
    *& Form post_process_checks
    Check Material Batches in SAP against NP File
    FORM post_process_checks.
    RANGES: r_matnr FOR mchb-matnr,
    r_lgort FOR mchb-lgort,
    r_werks FOR mchb-werks.
    SORT t_stck_cnt.
    LOOP AT t_stck_cnt INTO w_stck_cnt.
    AT END OF matnr.
    r_lgort-sign = 'I'.
    r_lgort-option = 'EQ'.
    r_lgort-low = w_stck_cnt-lgort.
    APPEND r_lgort.
    r_werks-sign = 'I'.
    r_werks-option = 'EQ'.
    r_werks-low = w_stck_cnt-werks.
    APPEND r_werks.
    r_matnr-sign = 'I'.
    r_matnr-option = 'EQ'.
    r_matnr-low = w_stck_cnt-matnr.
    APPEND r_matnr.
    ENDAT.
    ENDLOOP.
    Select all material batches for NP Materials
    SELECT matnr charg clabs
    INTO TABLE t_batch_errors
    FROM mchb
    WHERE werks IN r_werks
    AND lgort IN r_lgort.
    IF sy-subrc EQ 0.
    Check if the Material Batches are in the NP file
    LOOP AT t_batch_errors INTO w_batch_errors.
    Disregard Batches without positive unrestricted stock
    IF w_batch_errors-clabs LE 0.
    DELETE t_batch_errors.
    CONTINUE.
    ENDIF.
    READ TABLE t_stck_cnt INTO w_stck_cnt
    WITH KEY matnr = w_batch_errors-matnr
    charg = w_batch_errors-charg.
    IF sy-subrc = 0.
    DELETE t_batch_errors.
    ENDIF.
    ENDLOOP.
    ENDIF.
    CHECK NOT t_batch_errors[] IS INITIAL.
    Write Batch chak results to report
    SKIP.
    WRITE: / text-b02.
    WRITE: / sy-uline(74).
    WRITE: /2 'Material',
    22 'Batch'.
    WRITE: /2 sy-uline(32).
    SKIP.
    LOOP AT t_batch_errors INTO w_batch_errors.
    WRITE: /2 w_batch_errors-matnr,
    22 w_batch_errors-charg.
    ENDLOOP.
    ENDFORM. " post_process_checks
    G E T _ I N T E R F A C E _ F I L E N A M E
    FORM get_interface_filename USING filename lw_path.
    DATA: i_file TYPE filename-fileintern,
    out_filename LIKE v_path-pathextern.
    CLEAR: out_filename.
    i_file = filename.
    get the interface filename to be used when creating file
    CALL FUNCTION 'FILE_GET_NAME'
    EXPORTING
    logical_filename = i_file
    IMPORTING
    file_name = out_filename
    EXCEPTIONS
    file_not_found = 1
    OTHERS = 2.
    IF sy-subrc = 0.
    MOVE out_filename TO lw_path.
    IF filename NE c_archive_file. "RM080107
    CONCATENATE lw_path 'NP_StockBalance.dat'
    INTO lw_path.
    *-- Begin RM080107 - Add timestamp to the archived file
    ELSE.
    CONCATENATE lw_path 'NP_StockBalance' sy-datum sy-uzeit '.dat'
    INTO lw_path.
    ENDIF.
    *-- End RM080107
    ELSE.
    ENDIF.
    ENDFORM. "get_interface_filename
    *& Form move_file RM080107
    Move the processed file to archive directory
    FORM move_file.
    *-- At last move the file to archive directory
    OPEN DATASET p_arch FOR OUTPUT IN TEXT MODE.
    IF sy-subrc = 0.
    LOOP AT t_rawdata INTO w_rawdata.
    TRANSFER w_rawdata TO p_arch.
    ENDLOOP.
    ENDIF.
    CLOSE DATASET p_arch.
    DELETE DATASET p_file.
    ENDFORM. " move_file

    Hi,
    S E L E C T I O N S C R E E N
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
    PARAMETERS: p_file LIKE rlgrap-filename,
    p_arch LIKE rlgrap-filename. "RM080107
    SELECTION-SCREEN SKIP.
    PARAMETERS: p_mode LIKE ctu_params-dismode DEFAULT 'N'.
    SELECTION-SCREEN END OF BLOCK b1.
    I N C L U D E S
    INCLUDE zwm_np_stock_recon_top.
    INCLUDE zwm_np_stock_recon_f01.
    I N I T I A L I Z A T I O N
    INITIALIZATION.
    PERFORM get_interface_filename USING c_interface_file p_file.
    PERFORM get_interface_filename USING c_archive_file p_arch."RM080107
    S T A R T O F S E L E C T I O N
    START-OF-SELECTION.
    PERFORM read_file USING p_file.
    PERFORM pre_processing.
    E N D O F S E L E C T I O N
    END-OF-SELECTION.
    PERFORM process_checks.
    IF w_no_change = 'X'.
    WRITE: / text-b03.
    WRITE: / sy-uline(34).
    ELSE.
    PERFORM bdc_mi09.
    PERFORM file_check_report.
    PERFORM bdc_report.
    ENDIF.
    PERFORM post_process_checks.
    *-- Move the processed file to archive directory
    PERFORM move_file.
    ...*************.........first include...................************
    INCLUDE ZWM_NP_STOCK_RECON_TOP *
    Data declaration ----------------------------------------------
    TYPES: st_rawdata(2000) TYPE c.
    TYPES: BEGIN OF st_stck_cnt,
    werks TYPE iseg-werks, "plant
    lgort TYPE iseg-lgort, "storage location
    matnr TYPE iseg-matnr, "material number
    charg TYPE iseg-charg, "batch
    vfdat TYPE mch1-vfdat, "Sell by date
    lwedt TYPE mch1-lwedt, "Manufacture date
    quarn(8) TYPE n, "qaunrantine quantity
    menge(8) TYPE n, "quantity on hand
    message(1), "Message Type (E/W/I)
    msg_txt TYPE t100-text, "Message Text
    zerostck(1), "Zero stock identifier "RM220307
    END OF st_stck_cnt.
    TYPES: BEGIN OF st_batch_errors,
    matnr TYPE iseg-matnr, "material number
    charg TYPE iseg-charg, "batch
    clabs TYPE mchb-clabs, "Stock Balance
    END OF st_batch_errors.
    DATA:
    t_rawdata TYPE TABLE OF st_rawdata,
    w_rawdata TYPE st_rawdata,
    t_stck_cnt TYPE TABLE OF st_stck_cnt,
    d_stck_cnt TYPE TABLE OF st_stck_cnt, "RM191006
    w_stck_cnt TYPE st_stck_cnt,
    t_batch_errors TYPE TABLE OF st_batch_errors,
    w_batch_errors TYPE st_batch_errors,
    t_messtab LIKE bdcmsgcoll OCCURS 0,
    w_messtab LIKE LINE OF t_messtab,
    w_no_change.
    CONSTANTS: c_interface_file(26) TYPE c VALUE 'ZNP_STOCK_RECON',
    c_archive_file(26) TYPE c
    VALUE 'ZNP_STOCK_RECON_ARCHIVE'. "RM080107
    .*************................second include..........************
    ***INCLUDE ZWM_NEXTPHARMA_STOKRECON_F01 .
    *& Form read_file
    reads NextPharma file sent through via webmethods
    -->P_FILENAME
    FORM read_file USING p_filename.
    CLEAR: t_rawdata,
    w_rawdata.
    REFRESH: t_rawdata.
    OPEN DATASET p_filename FOR INPUT IN TEXT MODE.
    IF sy-subrc <> 0.
    MESSAGE e720(01).
    ENDIF.
    DO.
    READ DATASET p_filename INTO w_rawdata.
    IF sy-subrc <> 0.
    EXIT.
    ELSE.
    APPEND w_rawdata TO t_rawdata.
    ENDIF.
    ENDDO.
    CLOSE DATASET p_filename.
    ENDFORM. " read_file
    *& Form pre_processing
    Read file values into internal table
    FORM pre_processing.
    DATA: lw_matnr TYPE iseg-matnr.
    LOOP AT t_rawdata INTO w_rawdata.
    lw_matnr = w_rawdata+21(20). "RM031006
    lw_matnr = w_rawdata+22(18). "RM031006
    CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
    EXPORTING
    input = lw_matnr
    IMPORTING
    output = lw_matnr
    EXCEPTIONS
    length_error = 1
    OTHERS = 2.
    MOVE: lw_matnr TO w_stck_cnt-matnr.
    w_stck_cnt-werks = w_rawdata+14(4).
    w_stck_cnt-lgort = w_rawdata+18(4).
    w_stck_cnt-charg = w_rawdata+84(25).
    w_stck_cnt-vfdat = w_rawdata+109(8).
    w_stck_cnt-lwedt = w_rawdata+117(8).
    w_stck_cnt-quarn = w_rawdata+141(8).
    w_stck_cnt-menge = w_rawdata+125(8).
    APPEND w_stck_cnt TO t_stck_cnt.
    CLEAR w_stck_cnt.
    ENDLOOP.
    SORT t_stck_cnt BY werks
    lgort
    matnr
    charg.
    DELETE ADJACENT DUPLICATES FROM t_stck_cnt.
    ENDFORM. " pre_processing
    *& Form bdc_mi09
    Run file data via BDC TCODE: MI09
    FORM bdc_mi09.
    DATA: t_bdcdata TYPE TABLE OF bdcdata,
    w_bdcdata TYPE bdcdata,
    lw_datum(10) TYPE c,
    lw_count(2) TYPE n.
    WRITE sy-datum TO lw_datum DD/MM/YYYY.
    <b>select single MATNR
                       WERKS
                       CHARG
               from MCHA
               into (l_matnr, l_werks, l_charg)
               where matnr = w_stck_cnt-matnr
                  and werks = w_stck_cnt-werks.
                  and charg =  w_stck_cnt-charg.
    if sy-subrc ne 0.
    continue.
    endif.</b>
    Front Screen
    CLEAR w_bdcdata.
    w_bdcdata-program = 'SAPMM07I'.
    w_bdcdata-dynpro = '0700'.
    w_bdcdata-dynbegin = 'X'.
    APPEND w_bdcdata TO t_bdcdata.
    Enter
    CLEAR w_bdcdata.
    w_bdcdata-fnam = 'BDC_OKCODE'.
    w_bdcdata-fval = '/00'.
    APPEND w_bdcdata TO t_bdcdata.
    Count Date
    CLEAR w_bdcdata.
    w_bdcdata-fnam = 'RM07I-ZLDAT'.
    w_bdcdata-fval = lw_datum.
    APPEND w_bdcdata TO t_bdcdata.
    Document Date
    CLEAR w_bdcdata.
    w_bdcdata-fnam = 'RM07I-BLDAT'.
    w_bdcdata-fval = lw_datum.
    APPEND w_bdcdata TO t_bdcdata.
    Plant
    CLEAR w_bdcdata.
    w_bdcdata-fnam = 'IKPF-WERKS'.
    w_bdcdata-fval = w_stck_cnt-werks.
    APPEND w_bdcdata TO t_bdcdata.
    Storage Location
    CLEAR w_bdcdata.
    w_bdcdata-fnam = 'IKPF-LGORT'.
    w_bdcdata-fval = w_stck_cnt-lgort.
    APPEND w_bdcdata TO t_bdcdata.
    LOOP AT t_stck_cnt INTO w_stck_cnt.
    Do not submit items with Errors against them
    CHECK w_stck_cnt-message NE 'E' AND
    w_stck_cnt-zerostck NE 'X'.
    "RM220307
    lw_count = lw_count + 1.
    Input Screen
    CLEAR w_bdcdata.
    w_bdcdata-program = 'SAPMM07I'.
    w_bdcdata-dynpro = '0731'.
    w_bdcdata-dynbegin = 'X'.
    APPEND w_bdcdata TO t_bdcdata.
    Page Down
    CLEAR w_bdcdata.
    w_bdcdata-fnam = 'BDC_OKCODE'.
    w_bdcdata-fval = '=P+'.
    APPEND w_bdcdata TO t_bdcdata.
    Material
    CLEAR w_bdcdata.
    w_bdcdata-fnam = 'ISEG-MATNR(01)'.
    w_bdcdata-fval = w_stck_cnt-matnr.
    APPEND w_bdcdata TO t_bdcdata.
    Batch
    CLEAR w_bdcdata.
    w_bdcdata-fnam = 'ISEG-CHARG(01)'.
    w_bdcdata-fval = w_stck_cnt-charg.
    APPEND w_bdcdata TO t_bdcdata.
    IF w_stck_cnt-menge NE 0.
    Quantity
    CLEAR w_bdcdata.
    w_bdcdata-fnam = 'ISEG-ERFMG(01)'.
    w_bdcdata-fval = w_stck_cnt-menge.
    APPEND w_bdcdata TO t_bdcdata.
    *-- Begin RM220307 - We need to create an item when the quantity is zero
    *-- in file and is non-zero in SAP
    ELSE.
    Zero Stock indicator
    CLEAR w_bdcdata.
    w_bdcdata-fnam = 'ISEG-XNULL(01)'.
    w_bdcdata-fval = 'X'.
    APPEND w_bdcdata TO t_bdcdata.
    *-- End RM220307
    ENDIF.
    ENDLOOP.
    CHECK lw_count NE 0.
    After all line items have been input
    Final Screen
    CLEAR w_bdcdata.
    w_bdcdata-program = 'SAPMM07I'.
    w_bdcdata-dynpro = '0731'.
    w_bdcdata-dynbegin = 'X'.
    APPEND w_bdcdata TO t_bdcdata.
    Save Document
    CLEAR w_bdcdata.
    w_bdcdata-fnam = 'BDC_OKCODE'.
    w_bdcdata-fval = '=BU'.
    APPEND w_bdcdata TO t_bdcdata.
    CALL TRANSACTION 'MI09' USING t_bdcdata
    MODE p_mode
    MESSAGES INTO t_messtab.
    ENDFORM. " bdc_mi09
    *& Form bdc_report
    Write BDC Messages.
    FORM bdc_report.
    DATA: lw_text TYPE t100-text.
    SKIP.
    WRITE: / text-b01.
    WRITE: / sy-uline(21).
    SKIP.
    Write BDC Messages
    LOOP AT t_messtab INTO w_messtab WHERE msgspra = sy-langu.
    MESSAGE ID w_messtab-msgid TYPE w_messtab-msgtyp
    NUMBER w_messtab-msgnr
    WITH w_messtab-msgv1
    w_messtab-msgv2
    w_messtab-msgv3
    w_messtab-msgv4
    INTO lw_text.
    WRITE: / lw_text.
    ENDLOOP.
    ENDFORM. " bdc_report
    *& Form process_checks
    Perform process check before creating BDC Session
    FORM process_checks.
    DATA: lw_clabs LIKE mchb-clabs,
    lw_menge LIKE mchb-clabs,
    lw_matnr LIKE mara-matnr,
    lw_charg LIKE mch1-charg,
    lw_fail,
    lw_vfdat TYPE mch1-vfdat,
    lv_sell TYPE c, "RM191006
    lv_qty(8) TYPE c. "RM191006
    CLEAR: d_stck_cnt[], d_stck_cnt. "RM191006
    Check if any of the stock figures differ from current stock figures
    LOOP AT t_stck_cnt INTO w_stck_cnt.
    lw_menge = w_stck_cnt-menge.
    SELECT SINGLE clabs INTO lw_clabs
    FROM mchb
    WHERE matnr = w_stck_cnt-matnr
    AND werks = w_stck_cnt-werks
    AND lgort = w_stck_cnt-lgort
    AND charg = w_stck_cnt-charg.
    IF sy-subrc = 0.
    IF lw_clabs NE lw_menge.
    lw_fail = 'X'.
    *-- Begin RM220307 - Do not create PI item if the stock is zero in the
    *-- file and is zero in SAP
    EXIT.
    ELSEIF lw_clabs = 0 AND lw_menge = 0.
    w_stck_cnt-zerostck = 'X'.
    MODIFY t_stck_cnt FROM w_stck_cnt.
    ENDIF.
    *-- End RM220307
    ELSE.
    lw_fail = 'X'.
    ERROR
    ENDIF.
    ENDLOOP.
    If no differences are found set NO CHANGE Flag
    IF lw_fail NE 'X'.
    w_no_change = 'X'.
    EXIT.
    ENDIF.
    Check for Errors in file data
    LOOP AT t_stck_cnt INTO w_stck_cnt.
    CLEAR lv_sell. "RM191006
    SELECT SINGLE matnr INTO lw_matnr
    FROM mara
    WHERE matnr = w_stck_cnt-matnr.
    IF sy-subrc NE 0.
    Invalid Material (E)
    w_stck_cnt-message = 'E'.
    w_stck_cnt-msg_txt = 'Invalid Material'.
    MODIFY t_stck_cnt FROM w_stck_cnt.
    CONTINUE.
    ENDIF.
    SELECT SINGLE charg vfdat
    INTO (lw_charg, lw_vfdat)
    FROM mch1 "KOB01 - changed from MCHA
    WHERE matnr = w_stck_cnt-matnr
    AND charg = w_stck_cnt-charg.
    AND werks = w_stck_cnt-werks.
    IF sy-subrc NE 0.
    Invalid Material Batch (E)
    w_stck_cnt-message = 'E'.
    CONCATENATE 'Invalid Material Batch for plant' w_stck_cnt-werks
    INTO w_stck_cnt-msg_txt SEPARATED BY space.
    MODIFY t_stck_cnt FROM w_stck_cnt.
    CONTINUE.
    ELSE.
    IF w_stck_cnt-vfdat <> lw_vfdat.
    Sell by dates do not match (W)
    w_stck_cnt-message = 'W'.
    w_stck_cnt-msg_txt =
    'Sell by Date does not match Shelf life Expiry Date'.
    MODIFY t_stck_cnt FROM w_stck_cnt.
    lv_sell = 'X'. "RM191006
    CONTINUE. "RM191006
    ENDIF.
    ENDIF.
    IF w_stck_cnt-quarn > 0.
    Quarantine balance not Zero (W)
    w_stck_cnt-message = 'W'.
    *-- Begin RM191006
    *-- We do want all warning messages on the report
    lv_qty = w_stck_cnt-quarn.
    CONDENSE lv_qty NO-GAPS.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
    EXPORTING
    input = lv_qty
    IMPORTING
    output = lv_qty.
    w_stck_cnt-msg_txt = 'Quarantine balance is not zero'.
    CONCATENATE 'Quarantine balance is ' lv_qty '- not zero'
    INTO w_stck_cnt-msg_txt SEPARATED BY space.
    MODIFY t_stck_cnt FROM w_stck_cnt.
    CONTINUE.
    IF lv_sell = 'X'.
    APPEND w_stck_cnt TO d_stck_cnt.
    CLEAR lv_sell.
    ELSE.
    MODIFY t_stck_cnt FROM w_stck_cnt.
    ENDIF.
    *-- End RM191006
    ENDIF.
    ENDLOOP.
    *-- Begin RM191006
    *-- Finally get all the records into dummy table to report
    APPEND LINES OF t_stck_cnt TO d_stck_cnt.
    SORT d_stck_cnt.
    DELETE ADJACENT DUPLICATES FROM d_stck_cnt.
    *-- End RM191006
    ENDFORM. " process_checks
    *& Form file_check_report
    Write warning and Error messages from File checks
    FORM file_check_report.
    WRITE: /2 'Material',
    22 'Batch',
    32 'Sell By',
    45 'Message Text'.
    WRITE: /2 sy-uline(115).
    SKIP.
    LOOP AT t_stck_cnt INTO w_stck_cnt. "RM191006
    LOOP AT d_stck_cnt INTO w_stck_cnt. "RM191006
    CHECK w_stck_cnt-message NE ' '.
    WRITE: /2 w_stck_cnt-matnr,
    22 w_stck_cnt-charg,
    32 w_stck_cnt-vfdat,
    43 w_stck_cnt-message,
    45 w_stck_cnt-msg_txt.
    ENDLOOP.
    ENDFORM. " file_check_report
    *& Form post_process_checks
    Check Material Batches in SAP against NP File
    FORM post_process_checks.
    RANGES: r_matnr FOR mchb-matnr,
    r_lgort FOR mchb-lgort,
    r_werks FOR mchb-werks.
    SORT t_stck_cnt.
    LOOP AT t_stck_cnt INTO w_stck_cnt.
    AT END OF matnr.
    r_lgort-sign = 'I'.
    r_lgort-option = 'EQ'.
    r_lgort-low = w_stck_cnt-lgort.
    APPEND r_lgort.
    r_werks-sign = 'I'.
    r_werks-option = 'EQ'.
    r_werks-low = w_stck_cnt-werks.
    APPEND r_werks.
    r_matnr-sign = 'I'.
    r_matnr-option = 'EQ'.
    r_matnr-low = w_stck_cnt-matnr.
    APPEND r_matnr.
    ENDAT.
    ENDLOOP.
    Select all material batches for NP Materials
    SELECT matnr charg clabs
    INTO TABLE t_batch_errors
    FROM mchb
    WHERE werks IN r_werks
    AND lgort IN r_lgort.
    IF sy-subrc EQ 0.
    Check if the Material Batches are in the NP file
    LOOP AT t_batch_errors INTO w_batch_errors.
    Disregard Batches without positive unrestricted stock
    IF w_batch_errors-clabs LE 0.
    DELETE t_batch_errors.
    CONTINUE.
    ENDIF.
    READ TABLE t_stck_cnt INTO w_stck_cnt
    WITH KEY matnr = w_batch_errors-matnr
    charg = w_batch_errors-charg.
    IF sy-subrc = 0.
    DELETE t_batch_errors.
    ENDIF.
    ENDLOOP.
    ENDIF.
    CHECK NOT t_batch_errors[] IS INITIAL.
    Write Batch chak results to report
    SKIP.
    WRITE: / text-b02.
    WRITE: / sy-uline(74).
    WRITE: /2 'Material',
    22 'Batch'.
    WRITE: /2 sy-uline(32).
    SKIP.
    LOOP AT t_batch_errors INTO w_batch_errors.
    WRITE: /2 w_batch_errors-matnr,
    22 w_batch_errors-charg.
    ENDLOOP.
    ENDFORM. " post_process_checks
    G E T _ I N T E R F A C E _ F I L E N A M E
    FORM get_interface_filename USING filename lw_path.
    DATA: i_file TYPE filename-fileintern,
    out_filename LIKE v_path-pathextern.
    CLEAR: out_filename.
    i_file = filename.
    get the interface filename to be used when creating file
    CALL FUNCTION 'FILE_GET_NAME'
    EXPORTING
    logical_filename = i_file
    IMPORTING
    file_name = out_filename
    EXCEPTIONS
    file_not_found = 1
    OTHERS = 2.
    IF sy-subrc = 0.
    MOVE out_filename TO lw_path.
    IF filename NE c_archive_file. "RM080107
    CONCATENATE lw_path 'NP_StockBalance.dat'
    INTO lw_path.
    *-- Begin RM080107 - Add timestamp to the archived file
    ELSE.
    CONCATENATE lw_path 'NP_StockBalance' sy-datum sy-uzeit '.dat'
    INTO lw_path.
    ENDIF.
    *-- End RM080107
    ELSE.
    ENDIF.
    ENDFORM. "get_interface_filename
    *& Form move_file RM080107
    Move the processed file to archive directory
    FORM move_file.
    *-- At last move the file to archive directory
    OPEN DATASET p_arch FOR OUTPUT IN TEXT MODE.
    IF sy-subrc = 0.
    LOOP AT t_rawdata INTO w_rawdata.
    TRANSFER w_rawdata TO p_arch.
    ENDLOOP.
    ENDIF.
    CLOSE DATASET p_arch.
    DELETE DATASET p_file.
    ENDFORM. " move_file
    Best regards,
    Prashant

  • Copy Function is Not Working properly In Order Management

    Hi,
    Description-
    When an order with remnant model is copied, it copied only the topple model line and they include items attached to the top model line. It doesn’t copy the
    option class lines and the option item lines (unshipped and shipped).
    Example-
    Enter an order with for pd-pto-model. See order#21231.The ordered quantities and structure of the model is shown below:
    pd-pto-model 5 qty
    pd-std-item1 (included item) 5 qty
    pd-pto-oc (option class) 5 qty
    pd-std-item1 (included item with rfr checked) 5 qty
    pd-std-item2 (option item with rfr checked) 5 qty
    pd-std-item3 (option item) 5 qty
    Booked the order and pick relased the order. While shipconfirming only shipped 5 qty of pd-std-item3 and staged the rest. On querying the sales order, the line status is seen correctly as follows:
    pd-pto-model Closed
    pd-std-item1 (included item) Picked
    pd-pto-oc (option class) Closed
    pd-std-item1 (included item with rfr checked) Picked
    pd-std-item2 (option item with rfr checked) Picked
    pd-std-item3 (option item) Partially Interfaced to receivables
    Copied this order from the order header. The new order# is 21232.On querying the order, I see only 2 lines as follows:pd-pto-model.
    Anyone can help me on this issue.
    Thanks,
    Chinna

    haisrig wrote:
    Hi ,
    We are facing an issue with select() in Solaris 10. we had written a sample program to this issue.
    Program name :- sel.cpp
    int main()
    struct timeval sleeptime;
    sleeptime.tv_sec = 60;
    printf("1\n");
    select(0,NULL,NULL,NULL,&sleeptime);
    printf("2");
    return 0;
    When i run this program in Solaris 9, its printing 1 and after one minute its printing 2.
    When i run this program on Solaris 10, its printing 1 and 2 without waiting for 60 seconds.
    When i tried to print tv_usec, its printing as 0 in solaris 9 and some garbage values in solaris 10.
    I think because of that the above select function is not working properly in solaris 10.
    Why the tv_usec is not taking 0 as default values in Solaris 10?
    We are using our legacy code for past 20 years. So, before going to do any changes we are trying to find why this happenig like this.Hi
    It sounds to me that you've been lucky for 20 years then.
    Local POD variables on the stack that aren't explicitly initialized can contain any value. Here's what I see in your app with dbx
    (dbx) run
    Running: sel
    stopped in main at line 9 in file "sel.cpp"
        9      sleeptime.tv_sec = 60;
    (dbx) print sleeptime
    sleeptime = {
        tv_sec  = -4198732
        tv_usec = 0
    }That's on a Solaris 10 SPARC machine. If I try it on a Solaris 10 x86 box then I get
    (dbx) print sleeptime
    sleeptime = {
    tv_sec = -830490588
    tv_usec = 134510556
    and I see the behaviour that you describe.
    Paul

  • Anchor links to accordion panels not working properly across browsers

    Hi everyone,
    I need some help to figure out why my anchor links  to specific accordion panels on another page are not working properly  across browsers.
    I have a Map page which has tooltips on  mouseover on the site markers. 15 of the tooltips have "Click here for  information" anchor links (although only 14 are currently linked) which,  in theory, would take you to the Nurseries page where the specified  accordion panel would be opened with the nursery entry appearing at the  top of the new browser window.
    Here are the links to the Map page and Nurseries page, respectively:
    www.alegriadesignstudio.com/RFRI/map_v6.html
    www.alegriadesignstudio.com/RFRI/nurseries_v6.html
    I've  tested the anchor links on IE, Firefox, Google Chrome, and Safari, and  have received varying results. In most cases, the anchor links worked  perfectly on two of the browsers, while on the other browsers, the  correct accordion panel is opened but the nursery entry does not appear  at the top of the new browser window. Anchor links using Safari and  Google Chrome fared better (10 out of 14 links worked properly, and  8/14, respectively), whereas when using Firefox and IE, only 3 anchor  links worked properly. The target audience for this website will be  using IE and Firefox, so I  would appreciate any help to figure out how to tweak the code so that  the most, if not all, anchor links work properly on these two browsers  in particular.
    Here's an anchor link which worked perfectly in  IE, GC, and Safari, but in FF, the entry did not appear at the top of  the new browser window.
    www.alegriadesignstudio.com/RFRI/nurseries_v6.html?luzon=9#mangatarem
    http://www.alegriadesignstudio.com/RFRI/nurseries_v6.html?luzon=9#mangatarem [To access the anchor link on the Map page, mouseover the third green  dot from the top of the map (Tooltip--Location: Mangatarem) and then  click on "Click here for information."]
    Here's a sample anchor link in which the entry did not appear at the  top of the new browser window in any of the 4 browsers:
    www.alegriadesignstudio.com/RFRI/nurseries_v6.html?mindanao=4#magpetAmabel
    http://http://www.alegriadesignstudio.com/RFRI/nurseries_v6.html?mindanao=4#magpetAmabel [To access the anchor link on the Map page, go to "Mindanao" at the  bottom of the map and mouseover the fourth green  dot below the word "Mindanao" (Tooltip--LOCATION:        Brgys. Amabel, Bongolanon, Imamaling, & Manobisa; Magpet;        North Cotabato) and then  click on "Click here for information."]
    Here's a sample anchor  link in which the anchor link worked properly in GC and Safari, but the  entry didn't appear at the top of the browser window in IE and FF:
    www.alegriadesignstudio.com/RFRI/nurseries_v6.html?visayas=1#bilar
    http://http://www.alegriadesignstudio.com/RFRI/nurseries_v6.html?visayas=1#bilar [To access the anchor link on the Map page, go to the small island  north and a bit west of "Mindanao" which is called "Bohol" and mouseover  the fourth green  dot below the word "Mindanao" (Tooltip--LOCATION: Bilar; Bohol) and then   click on the first "Click here for information."]
    Many thanks in  advance for your assistance!
    Joy

    Hi everyone,
    I'm still trying to figure out how to resolve the problem of anchor links to accordion panels not working properly across browsers (see original post for details). I would greatly appreciate any suggestions on how to resolve the problem.
    Many thanks in advance.
    Joy

  • Pick List Value Not Working Properly

    Hi Oracle Framework Gurus,
    I have a strange Issue in which one of my cusom page is working properly in Jdev and not working Properly when deployed in the apps instance.
    There are two custom pages with the same VO.
    What I do is have a picklist from one of the custom page and depending on the value of the picklist and I navigate to the other custom page.
    This is working properly in the JDev,But for some reasons it works properly in apps instance, when I try to run the first time(ie) when I run page A and pick 'X' from the picklist the Page 'B' is coming properly as per the controller code and when i pick 'Y' from the picklist in Page B, it is navigating to Page A as per the controller code.
    This works fine for the first time,But when i again select 'X' from the picklist the proper value from the Picklist is not getting selected and passed to the custom package and so I get wrong values in Page 'B'
    What could be the reason for it as it working fine in Jdev,I can navigate from Page A to Page B and Page B to Page A as many times possible.

    Hi Anand,
    Controller1 :
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    //int intPersonId = pageContext.getEmployeeId();
    int intPersonId; // = pageContext.getEmployeeId();
    String strPersonId = Integer.toString(277671);
    //String strPersonId = Integer.toString(intPersonId);
    java.util.Date sysdate = pageContext.getCurrentUserDate();
    String convSysDate = pageContext.getOANLSServices().dateToString(sysdate);
    // Date testdate = (Date)sysdate.dateValue();
    // get the Application Module
    OAApplicationModule oaAM = pageContext.getApplicationModule(webBean);
    Serializable parameters[] = { strPersonId,convSysDate };
    Serializable param[] = { strPersonId };
    System.out.println("The Sysdate PF "+convSysDate);
    //pass parameters to Application Module
    oaAM.invokeMethod("insertLovRow", param);
    if ((String)pageContext.getSessionValue("PFlag1") != null)
    String PFlag1 =(String)pageContext.getSessionValue("PFlag1");
    String SDate1 =(String)pageContext.getSessionValue("SDateSession1");
    Serializable param1[] = { SDate1 };
    oaAM.invokeMethod("insertLovRow", param);
    oaAM.invokeMethod("initEmpLovQuery1",param1);
    oaAM.invokeMethod("initEmpTransLovQuery1");
    OAMessageChoiceBean orgMesgChoiceBean = (OAMessageChoiceBean)webBean.findChildRecursive("Year");
    orgMesgChoiceBean.setPickListViewObjectDefinitionName("EmployeeTest.oracle.apps.per.server.EmpTransDateLov");
    orgMesgChoiceBean.setListValueAttribute("StartDate");
    orgMesgChoiceBean.setListDisplayAttribute("DateRange" );
    orgMesgChoiceBean.setPickListCacheEnabled(false);
    else
    oaAM.invokeMethod("insertRow", parameters);
    oaAM.invokeMethod("initQuery", param);
    oaAM.invokeMethod("execQuery");
    oaAM.invokeMethod("totexecQuery");
    OAMessageChoiceBean orgMesgChoiceBean = (OAMessageChoiceBean)webBean.findChildRecursive("Year");
    orgMesgChoiceBean.setPickListViewObjectDefinitionName("EmployeeTest.oracle.apps.per.server.EmployeeDateLovVO");
    orgMesgChoiceBean.setListValueAttribute("StartDate");
    orgMesgChoiceBean.setListDisplayAttribute("DateRange" );
    orgMesgChoiceBean.setPickListCacheEnabled(false);
    oaAM.invokeMethod("initEmpLovQuery");
    OAViewObject oaviewobject1 =(OAViewObject)oaAM.findViewObject("EmployeeUtilVO1");
    oaviewobject1.reset();
    if (oaviewobject1 != null)
    do
    if(!oaviewobject1.hasNext())
    break;
    oaviewobject1.next();
    OARow row = (OARow)oaviewobject1.getCurrentRow();
    String fullName = (String)row.getAttribute("EmpDep");
    System.out.println("The Name is "+fullName);
    } while(true);
    * Procedure to handle form submissions for form elements in
    * a region.
    * @param pageContext the current OA page context
    * @param webBean the web bean corresponding to the region
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    //int intPersonId = pageContext.getEmployeeId();
    //String strPersonId = Integer.toString(intPersonId);
    int intPersonId; // = pageContext.getEmployeeId();
    String strPersonId = Integer.toString(277671);
    OAApplicationModule oaAM = pageContext.getApplicationModule(webBean);
    if (pageContext.getParameter("ViewDetails") != null)
    pageContext.putSessionValue("strPersonId", strPersonId);
    pageContext.setForwardURL("OA.jsp?page=/EmployeeTest/oracle/apps/per/webui/EmployeePanelIB",
    null,
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    null,
    null,
    true, // Retain AM
    OAWebBeanConstants.ADD_BREAD_CRUMB_YES, // Show breadcrumbs
    OAWebBeanConstants.IGNORE_MESSAGES);
    System.out.println("strPersonId "+strPersonId);
    String strEvent= pageContext.getParameter(EVENT_PARAM) ;
    if ( strEvent.equals("update"))
    OAMessageChoiceBean DepStatus1 = (OAMessageChoiceBean) webBean.findIndexedChildRecursive("Year");
    String sDate = DepStatus1.getSelectionValue(pageContext);
    //String sDate = DepStatus1.getValue(pageContext).toString();
    //Serializable parameters[] = { strPersonId,sDate };
    Serializable parameters[] = { strPersonId,sDate };
    Serializable param[] = { strPersonId };
    System.out.println("The PersonId "+strPersonId);
    System.out.println("The Controller Date passed is IBUtil "+sDate);
    oaAM.invokeMethod("insertRow", parameters);
    oaAM.invokeMethod("initQuery", param);
    oaAM.invokeMethod("execQuery");
    String flag = "1";
    //pageContext.putSessionValue("strPersonId", strPersonId);
    pageContext.putSessionValue("PFlag", flag);
    pageContext.putSessionValue("SDateSession", sDate);
    pageContext.setForwardURL("OA.jsp?page=/EmployeeTest/oracle/apps/per/webui/EmpTestPG",
    null,
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    null,
    null,
    true, // Retain AM
    OAWebBeanConstants.ADD_BREAD_CRUMB_YES, // Show breadcrumbs
    OAWebBeanConstants.IGNORE_MESSAGES);
    Controller 2:
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    //int intPersonId = pageContext.getEmployeeId();
    int intPersonId; // = pageContext.getEmployeeId();
    String strPersonId = Integer.toString(277671);
    //String strPersonId = Integer.toString(intPersonId);
    java.util.Date sysdate = pageContext.getCurrentUserDate();
    String convSysDate = pageContext.getOANLSServices().dateToString(sysdate);
    // get the Application Module
    OAApplicationModule oaAM = pageContext.getApplicationModule(webBean);
    Serializable parameters[] = { strPersonId,convSysDate };
    Serializable param[] = { strPersonId };
    System.out.println("The Sysdate PF "+convSysDate);
    //pass parameters to Application Module
    oaAM.invokeMethod("insertLovRow", param);
    if ((String)pageContext.getSessionValue("PFlag") != null)
    String PFlag1 =(String)pageContext.getSessionValue("PFlag");
    String SDate1 =(String)pageContext.getSessionValue("SDateSession");
    Serializable param2[] = { strPersonId, SDate1 };
    Serializable param1[] = { SDate1 };
    oaAM.invokeMethod("insertLovRow", param);
    oaAM.invokeMethod("initEmpLovQuery1",param1);
    oaAM.invokeMethod("initEmpTransLovQuery1");
    OAMessageChoiceBean orgMesgChoiceBean = (OAMessageChoiceBean)webBean.findChildRecursive("Year");
    orgMesgChoiceBean.setPickListViewObjectDefinitionName("EmployeeTest.oracle.apps.per.server.EmpTransDateLov");
    orgMesgChoiceBean.setListValueAttribute("StartDate");
    orgMesgChoiceBean.setListDisplayAttribute("DateRange" );
    orgMesgChoiceBean.setPickListCacheEnabled(false);
    else
    oaAM.invokeMethod("insertRow", parameters);
    oaAM.invokeMethod("initQuery", param);
    oaAM.invokeMethod("execQuery");
    oaAM.invokeMethod("totexecQuery");
    OAMessageChoiceBean orgMesgChoiceBean = (OAMessageChoiceBean)webBean.findChildRecursive("Year");
    orgMesgChoiceBean.setPickListViewObjectDefinitionName("EmployeeTest.oracle.apps.per.server.EmployeeDateLovVO");
    orgMesgChoiceBean.setListValueAttribute("StartDate");
    orgMesgChoiceBean.setListDisplayAttribute("DateRange" );
    orgMesgChoiceBean.setPickListCacheEnabled(false);
    oaAM.invokeMethod("initEmpLovQuery");
    OAViewObject oaviewobject1 =(OAViewObject)oaAM.findViewObject("EmployeeUtilVO1");
    oaviewobject1.reset();
    if (oaviewobject1 != null)
    do
    if(!oaviewobject1.hasNext())
    break;
    oaviewobject1.next();
    OARow row = (OARow)oaviewobject1.getCurrentRow();
    String fullName = (String)row.getAttribute("EmpDep");
    System.out.println("The Name is "+fullName);
    } while(true);
    * Procedure to handle form submissions for form elements in
    * a region.
    * @param pageContext the current OA page context
    * @param webBean the web bean corresponding to the region
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    OAApplicationModule oaAM = pageContext.getApplicationModule(webBean);
    //int intPersonId = pageContext.getEmployeeId();
    //String strPersonId = Integer.toString(intPersonId);
    int intPersonId; // = pageContext.getEmployeeId();
    String strPersonId = Integer.toString(277671);
    if (pageContext.getParameter("ViewDetails") != null)
    pageContext.setForwardURL("OA.jsp?page=/EmployeeTest/oracle/apps/per/webui/EmpPanelPG",
    null,
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    null,
    null,
    true, // Retain AM
    OAWebBeanConstants.ADD_BREAD_CRUMB_YES, // Show breadcrumbs
    OAWebBeanConstants.IGNORE_MESSAGES);
    pageContext.putSessionValue("strPersonId", strPersonId);
    String strEvent= pageContext.getParameter(EVENT_PARAM) ;
    if ( strEvent.equals("update"))
    OAMessageChoiceBean DepStatus1 = (OAMessageChoiceBean) webBean.findIndexedChildRecursive("Year");
    String sDate = DepStatus1.getSelectionValue(pageContext);
    //String sDate = DepStatus1.getValue(pageContext).toString();
    Serializable parameters[] = { strPersonId,sDate };
    Serializable param[] = { strPersonId };
    System.out.println("The Controller Date passed is CBUtil "+sDate);
    System.out.println("The PersonId "+strPersonId);
    oaAM.invokeMethod("insertRow", parameters);
    oaAM.invokeMethod("initQuery", param);
    oaAM.invokeMethod("execQuery");
    String flag = "2";
    //pageContext.putSessionValue("strPersonId", strPersonId);
    pageContext.putSessionValue("PFlag1", flag);
    pageContext.putSessionValue("SDateSession1", sDate);
    pageContext.setForwardURL("OA.jsp?page=/EmployeeTest/oracle/apps/per/webui/EmpIBUtilPG",
    null,
    OAWebBeanConstants.KEEP_MENU_CONTEXT,
    null,
    null,
    true, // Retain AM
    OAWebBeanConstants.ADD_BREAD_CRUMB_YES, // Show breadcrumbs
    OAWebBeanConstants.IGNORE_MESSAGES);
    Hi Above two are the controller codes forget the rest of the codes,Concentrate on the PFR code, Just want to know what I am doing is correct or not.
    First time when I select the Picklist value,the value gets passed as a parameter to the custom package and the page gets displayed properly and vice versa,But I am not able to do the same cycle again for some reasons.
    Please get back to me ASAP.
    Regards,
    Magesh.M.K.
    Edited by: user1393742 on Oct 19, 2010 11:58 PM

  • Charger is not working properly

    Hi, after 10.9.2 update my charger is not working properly. First I thought the problem was the charger itself had died, but then I saw a pale light. I searched here and found that resetting SMC could be a solution. It worked for a while, but now the problem is back and resetting again doesn't work. I also resetted PRAM and nothing happens. The light is now green, but battery status says it isn't charging.
    What else can I do? Mavericks updates are a headache that has already made me format my laptop – because of another problem– and I'd love to avoid it. Thanks in advance.

    If you are still under warranty and/or have AppleCare, call them.  Let them deal w/it.
    OOW:  Take your MBP & charger to your local Apple Store or an AASP.  Diagnostic testing is FREE!

  • Since the last update to iTunes 11.0.3 (42) the airplay connection is not working properly , keeping breaking up

    since the last update to iTunes 11.0.3 (42) the airplay connection is not working properly , keeping breaking up, while the airplay works fine with my iPad and iPhone. Anyone has experienced the same? any fix available?

    Hi Erdelestre,
    Thanks for visiting Apple Support Communities!
    See this article for some tips about troubleshooting AirPlay:
    Troubleshooting AirPlay and AirPlay Mirroring
    http://support.apple.com/kb/ts4215
    Troubleshooting performance issues with AirPlay or AirPlay Mirroring
    If you are experiencing intermittent playback or significant network lag with AirPlay or AirPlay Mirroring, it could be due to a weak Wi-Fi connection, interference, or the distance between the Wi-Fi router and your iOS device, Apple TV or AirPort Express. Try the following suggestions:
    Ensure that other devices are not trying to stream to the same Apple TV at the same time.
    Turn off Bluetooth on your iOS device by tapping Settings > General > Bluetooth.
    Ensure that your Wi-Fi router is set up with the recommended settings for the best performance.
    Certain external devices, such as microwave ovens and baby monitors, may interfere with a Wi-Fi network. Try moving or disabling these devices.
    If possible, try to locate your Wi-Fi router in the same room as your Apple TV and iPhone/iPad.
    If your wireless and wired networks are the same, try connecting your Apple TV to the router via Ethernet instead of Wi-Fi.
    If the Wi-Fi router has an external antenna, check to see that is it connected properly and in good condition.
    Use the Wi-Fi network troubleshooting guide to resolve interference and other issues.
    Best,
    Jeremy

  • My trackpad is not working properly since installing the upgrade. What should I do?

    My trackpad is not working properly since installing the upgrade. The keyboard is also not working right. What should I do?

    i am getting the same issues. i have to use an external mouse but i still get moves even without touching the mouse or trackpad. i upgraded to maverick about 2 months ago. how can i fix this fast? am a dj so i really need this problem fix. and now my keyboard is acting up even while i type

  • Swf is not working properly when upload to server

    I develop 1.swf which is having 3 buttons each one having
    anather .swf to call 2.swf, 3.swf respectively.
    This application is running perfectly on my PC, but
    While uploading the swf to server the 2.swf and 3.swf is
    not running. Can any one tell how to recover from this kind
    of problem.

    justbipin wrote:
    > basically my code working perfectly,
    > but its not working properly when upload to server
    > can anybody having any ref. or link to solve this
    issues.
    why is that we insist on seeing the source file ?
    There is no one way of doing things in flash and no one can
    help
    you based on "does not work description".
    This is way to broad of a subject to even try to guess.
    Same as asking "my car does not work, what's up with
    that"....
    Please upload the problematic file and provide url for us to
    check.
    Otherwise you need to try to troubleshoot it yourself as we
    can't
    guess from here what possibly is wrong with that file.
    Regards
    Urami
    Happy New Year guys - all the best there is in the 2006 :)
    <urami>
    http://www.Flashfugitive.com
    </urami>
    <web junk free>
    http://www.firefox.com
    </web junk free>

  • N70 not working properly

    My N70 is not working properly. Whenever I try to install new softwares, it says 'Corrupted File!'. I can't view my captured images and videos, it says 'Corrupted File!'. It even damages my music tracks. I have formatted my phone memory as well as my memory card for many times but still it isn't solved.
    Solved!
    Go to Solution.

    Hi bipul,
    Have you tried Hard Format in the phone? If not, try the steps below:
    Hold 3 keys; Green dial key, * Star key, no. 3 key on keypad (until you get it to work).
    - Turn off PIN code requests.
    - Charge the phone fully.
    - Turn off the phone.
    - Remove the memory card (not really needed, but I usually do it to be on the safe side).
    - Put the phone on a table (easier to press the keys then, in my opinion).
    - Press the three keys and keep them securely down and do not release.
    - While the keys are still down, turn the power on.
    - Do not release the three keys until you see the prompt for the home city.
    If it doesn't work, retry until you get it right. It is easier if you have three hands.
    If you can dial, try atleast these steps to reset to factory settings:
    dial *#7370# after that it will ask for security code dial 12345 it's by default! make sure you back up your important detail first
    Either of them should work.

Maybe you are looking for

  • Calibrating a 6552 using Cal Exec.

    I am trying to calibrate a 6552 card. What does Cal Exec mean when its asking me to "Select the switch device strings" "SCXI slot 0" and "SCXI slot 1"? I have never seen this before?

  • [Web Player][Playlists] Playlist sorting

     A previous thread on this topic - https://community.spotify.com/t5/Closed-Ideas/Sort-Playlists-Alphabetically/idi-p/699414 - was incorrectly defined as a duplicate and can therefore no longer benefit from user kudos.  Spotify, I'd urge you to pay cl

  • Crm workflow

    Hi,   Can any one send me the list of standard workflows in CRM and business objects in it. Regards Rose

  • BC4J, OC4J and MySQL

    I have been trying to get this configuration working. After much progress, I am getting for following error even though I am pretty sure that I have the datasource defined correctly: java.lang.NullPointerException      void oracle.jbo.pcoll.OraclePer

  • IPhone 4S a mobile operator Verizon Wireless

    Good day! I live in a country of Russia in Moscow. Bought the iPhone 4S hand (not in the store) I was told that it is blocked by the operator Verizon Wireless, I used the Russian services official unlock cellular operator. After unlocking I have a SI