Vendor batch is retrieved from LIPS-LICHN only if LIPS-LICHN is not blank,

(Current design)
Batch is retrieved from LIPS-CHARG
Vendor batch is retrieved from LIPS-LICHN
(If there is no record in LIPS, blank will be printed out for both fields)
REQUIREMENT:
Batch is retrieved from LIPS-CHARG
Vendor batch is retrieved from LIPS-LICHN only if LIPS-LICHN is not blank.
If LIPS-LICHN is blank, vendor batch is retrieved from LIPS-CHARG.
(If there is no record in LIPS, blank will be printed out for both fields. If both LIPS-CHARG and LIPS-LICHN are blank, blank will be printed out for both fields)
t-lips is the internal table :
DATA: BEGIN OF t_lips OCCURS 0,
         vbeln LIKE lips-vbeln, "Delivery document no
         posnr LIKE lips-posnr, "Item number for Delivery document
         charg LIKE lips-charg, "Batch number
         lichn LIKE lips-lichn, "Vendor Batch number
      END OF t_lips.
Following is the piece of code:
*&      Form  f_collect_final
      Routine to collect all the display data into the final internal
      table t_display.
FORM f_collect_final.
  DATA: l_std_pac_no LIKE eket-menge,
        l_std_pac_no_out(13) TYPE p,
        l_tot_std_pt(13) TYPE c,
        l_rmdr(13) TYPE n,
        l_qtnt(13) TYPE n,
        l_tabix TYPE i.
  LOOP AT t_eket.
    t_display-ebeln = t_eket-ebeln.
    t_display-ebelp = t_eket-ebelp.
    t_display-etens = t_eket-etens.
    t_display-eindt = t_eket-eindt.
    t_display-menge = t_eket-menge.
    t_display-meins = t_eket-meins.
    t_display-matnr = t_eket-matnr.
mod begin CR1591
   t_display-maktx = t_eket-maktx.
    READ TABLE t_makt WITH KEY matnr = t_eket-matnr
                      BINARY SEARCH.
    IF sy-subrc = 0.
      t_display-maktx = t_makt-maktx.
    ENDIF.
mod end CR1591
    t_display-vpnam = t_eket-vpnam.
    t_display-lifnr = t_eket-lifnr.
    t_display-charg = t_eket-charg.
    READ TABLE t_mlgn WITH KEY matnr = t_eket-matnr
                                      BINARY SEARCH.
    IF sy-subrc = 0.
      t_display-lhmg1 = t_mlgn-lhmg1.
      t_display-lhme1 = t_mlgn-lhme1.
      t_display-lety1 = t_mlgn-lety1.
      t_display-ltkze = t_mlgn-ltkze.
    ENDIF.
    READ TABLE t_marm WITH KEY matnr = t_eket-matnr
                                           BINARY SEARCH.
    IF sy-subrc = 0.
      t_display-umrez = t_marm-umrez.
      t_display-meinh = t_eket-meins.
    ENDIF.
    READ TABLE t_marc WITH KEY matnr = t_eket-matnr
                                         BINARY SEARCH.
    IF sy-subrc = 0.
      t_display-zzjp_nyu_sop = t_marc-zzjp_nyu_sop.
      t_display-zzjp_dos_frm = t_marc-zzjp_dos_frm.
      t_display-zzjp_aprn    = t_marc-zzjp_aprn.
      t_display-zzjp_re1     = t_marc-zzjp_re1.
    ENDIF.
    READ TABLE t_lfa1 WITH KEY lifnr = t_eket-lifnr
                                      BINARY SEARCH.
    IF sy-subrc = 0.
      t_display-name1 = t_lfa1-name1.
    ENDIF.
    READ TABLE t_lips WITH KEY vbeln = t_eket-vbeln
                               posnr = t_eket-vbelp
                               BINARY SEARCH.
    l_tabix = sy-tabix.
    IF sy-subrc = 0.
      t_display-charg = t_lips-charg.(I think this is the place to change).
     t_display-lichn = t_lips-charg.
    ENDIF.
I have tried with the following code, but it is not working.
IF sy-subrc = 0.
      t_display-charg = t_lips-charg.
IF not t_lips-lichn is initial.
     t_display-lichn = t_lips-lichn.
    ELSE.
   t_display-lichn = t_lips-charg.
    ENDIF.
ENDIF.

Hi,
Find the modification below, consider the bold text and remove the old one:
READ TABLE t_lips WITH KEY vbeln = t_eket-vbeln
posnr = t_eket-vbelp
BINARY SEARCH.
l_tabix = sy-tabix.
IF sy-subrc = 0.
<b>if t_lips-lichn EQ space AND
t_lips-charg NE space.
t_display-charg = t_lips-charg.
t_display-lichn = t_lips-charg.
endif.</b>
<i>t_display-charg = t_lips-charg.(I think this is the place to change).
t_display-lichn = t_lips-charg.</i>ENDIF.

Similar Messages

  • Select from 1 table only if a value does not exist

    Hello all,
    I'm having problems devising a single select statement to accomplish a single return value. I have tried variations of DECODE and COALESCE, but it's escaping me.
    I have two tables that are as follows:
    NAME
    ID, FULLNAME
    1, Senior
    2, Junior
    3, Mister
    4, Senor
    5, Miss
    ABBREVIATION
    ID, ABBREV
    1, Sr
    2, Jr
    3, Mr
    5, Ms
    What I would like to do is select from the NAME table only if the value does not exist in the ABBREVIATION table.
    Ideally if I were to do something such as:
    SELECT * FROM .... WHERE (ID=1 or ID=2 or ID=4) ....
    I would receive the following output:
    1, Sr
    2, Jr
    4, Senor
    Thanks for reading!

    You want an outer join.
    SELECT decode(a.abbrev, NULL, n.fullname, a.abbrev)
    FROM name n,
    abbreviation a
    WHERE n.ID = a.ID(+)
      AND ....Something like that.
    Full example:
    with n as (
    select 1 as ID, 'Senior' as FULLNAME from dual UNION ALL
    select 2 as ID, 'Junior' as FULLNAME from dual UNION ALL
    select 3 as ID, 'Mister' as FULLNAME from dual UNION ALL
    select 4 as ID, 'Senor' as FULLNAME from dual UNION ALL
    select 5 as ID, 'Miss' as FULLNAME from dual),
    a as (
    select 1 as ID, 'Sr' as ABBREV from dual UNION ALL
    select 2 as ID, 'Jr' as ABBREV from dual UNION ALL
    select 3 as ID, 'Mr' as ABBREV from dual UNION ALL
    select 5 as ID, 'Ms' as ABBREV from dual)
    select decode(a.abbrev, NULL, n.fullname, a.abbrev)
    from a, n
    where n.id = a.id(+)
    order by n.id;
    ID                     DECODE(A.ABBREV,NULL,N.FULLNAME,A.ABBREV)
    1                      Sr                                       
    2                      Jr                                       
    3                      Mr                                       
    4                      Senor                                    
    5                      Ms                                       
    5 rows selectedEdited by: tk-7381344 on Nov 17, 2008 1:31 PM

  • How can I add apple loops into Garageband on the iPad so that they can be retrieved from the loops section of the app (and not via 'import')?

    The issue with using the import function in the track is that you cant preview the sample and check it's suitability before you bring it in to the selected track.
    If samples can be added to the Garageband 'Loop Library' - that would be graet. Can anyone help?

    I think the Pearson people gave you the right advice. There is no way you can run a program that requires a Mac computer on an iDevice.

  • Values in "vendor batch" in the Goods-in-order and Goods-in-plan lists are

    Vendor batch No.  : Transaction ZJPMPU322
    (Background)     
    There are "vendor batch" and "batch" fields in Goods-in-order and Goods-in-plan lists (transaction ZJPMPU322). Values for these fields are retrieved from inbound delivery document (transaction VL33N). After core 7.0 upgrade, "vendor batch" is not copied from "batch" in inbound delivery document any more so that nothing appears in the vendor batch field in the lists.
    (Change request)
    Values in "vendor batch" in the Goods-in-order and Goods-in-plan lists are retrieved from "batch" in inbound delivery document ONLY IF "vendor batch" is blank in the inbound delivery document.
    (Current design)
    Batch is retrieved from LIPS-CHARG
    Vendor batch is retrieved from LIPS-LICHN
    (If there is no record in LIPS, blank will be printed out for both fields)
    (After change)
    Batch is retrieved from LIPS-CHARG
    Vendor batch is retrieved from LIPS-LICHN only if LIPS-LICHN is not blank.
    If LIPS-LICHN is blank, vendor batch is retrieved from LIPS-CHARG.
    (If there is no record in LIPS, blank will be printed out for both fields. If both LIPS-CHARG and LIPS-LICHN are blank, blank will be printed out for both fields),
    Following is the program:
    REPORT zjpmrpu322  MESSAGE-ID  zjpm001
                  NO STANDARD PAGE HEADING
                            LINE-COUNT  50
                            LINE-SIZE  255.
    *&   Development ID: PU_DD_322_LJP                                     *
    *&   Report        : ZJPMRPU322                                        *
    *&   The Purpose of this program is to print the  Goods-in-order list  *
    *&   and the Goods in plan list for raw materials, materials purchase  *
    *&   etc at the Sasayama plant, Japan.                                 *
    *&   Change Log:                                                       *
    *&   Init    Who              Date        Text                         *
    *&   PV      P V R S Varma    07-May-2003  Initial Version             *
    *&   DU      D.Usui           2004/02/26   CR No. 1432                 *
    *&   DU      D.Usui           2004/03/08   CR No. 1447                 *
    *&   DU      D.Usui           2004/05/06   CR No. 1591                 *
                            Constants
    CONSTANTS:
    c_werks   LIKE ekpo-werks VALUE 'JP01',    "Plant code - Sasayama plant
    c_id      LIKE thead-tdid VALUE 'F02',     "Text ID for Info record
    c_object  LIKE thead-tdobject VALUE 'EKPO',"Object of text for info rec
    *c_zzjp_r1 LIKE marc-zzjp_re1 VALUE 'GMP',  "Goods in plan- Domestic
    *c_zzjp_r2 LIKE marc-zzjp_re1 VALUE 'GMPI', "Import sales order document
    c_plus    TYPE c VALUE '',                "Holding '' sign
    c_spras   LIKE makt-spras VALUE 'J',       "Language key Japan
    *c_device(7)    type c value 'PRINTER',    "Device type
    c_form(16)     TYPE c VALUE 'ZJPMPU305',  "Form name
    c_ele_gmp(4)   TYPE c VALUE 'GMP',        "GMP Text element
    c_ele_gmpi(4)  TYPE c VALUE 'GMPI',       "GMPI Text element
    add begin CR1432
    c_ele_bgmp(4)  TYPE c VALUE 'BGMP',       "BGMP
    c_ele_bgmpi(5) TYPE c VALUE 'BGMPI',      "BGMPI
    add end CR1432
    c_function(3)  TYPE c VALUE 'SET',        "Function
    c_type(4)      TYPE c VALUE 'BODY',       "Window area in main window
    c_win_head(7)  TYPE c VALUE 'HEADING',    "Heading window
    c_win_shead(7) TYPE c VALUE 'SUBHEAD',    "sub heading window
    c_win_fot1(7)  TYPE c VALUE 'FOOTER1',    "Footer 1 window
    c_win_main(4)  TYPE c VALUE 'MAIN',       "Main window
    c_comd(8)      TYPE c VALUE 'NEW-PAGE',   "New-page command
    c_zar TYPE ekko-bsart VALUE 'ZAR',
    c_x            TYPE c VALUE 'X',          "Indicator for print options
    c_f            TYPE c VALUE 'F',          "Indicator for Purchase Order
    add begin CR1591
    Deletion indicator in purchasing document
    c_loekz(1)     TYPE c VALUE 'L',
    For ranges tables
    c_sign_i(1)    TYPE c VALUE 'I',          "Sign(include)
    c_op_eq(2)     TYPE c VALUE 'EQ',         "Option(=)
    Confirmation category
    c_ebtyp_ab(2)  TYPE c VALUE 'AB',         "Order acknowledgment
    add end CR1591
    c_la(2)        TYPE c VALUE 'LA'.         "Indicator for Inbound deliver
                          Database Tables
                        Vaiables / Internal tables                       *
    Internal table to store PO information
    Not used after CR1591
    DATA: BEGIN OF t_purc OCCURS 0,
             ebeln LIKE eket-ebeln, "Purchasing Document Number
             ebelp LIKE eket-ebelp, "Item Number of Purchasing Document
             eindt LIKE eket-eindt, "Item delivery date
             menge LIKE eket-menge, "Scheduled quantity
             charg LIKE eket-charg, "Batch number
             matnr LIKE ekpo-matnr, "Material code
             werks LIKE ekpo-werks, "Plant
             meins LIKE ekpo-meins, "Unit of measure
             lifnr LIKE ekko-lifnr, "Vendor number
          END OF t_purc.
    Internal table to store material description.
    DATA: BEGIN OF t_makt OCCURS 0,
            matnr LIKE makt-matnr,  "Material code
            maktx LIKE makt-maktx,  "Material description
          END OF t_makt.
    Internal table for storage of final EKET data
    DATA: BEGIN OF t_eket OCCURS 0,
             ebeln LIKE eket-ebeln, "Purchasing Document Number
             ebelp LIKE eket-ebelp, "Item Number of Purchasing Document
             ebelp_ex(6) TYPE n,    "Extended ebelp with length 6
             eindt LIKE eket-eindt, "Item delivery date
             menge LIKE eket-menge, "Scheduled quantity
             dabmg LIKE ekes-dabmg, " Delivered Quantity
             charg LIKE eket-charg, "Batch number
             matnr LIKE ekpo-matnr, "Material code
             werks LIKE ekpo-werks, "Plant
             maktx LIKE makt-maktx, "Material Description-- jp check
             etens LIKE ekes-etens, "Sequence Number
             meins LIKE ekpo-meins, "Unit of measure
             lifnr LIKE ekko-lifnr, "Vendor number
             vbeln LIKE ekes-vbeln,
             vbelp LIKE ekes-vbelp,
             vpnam(40) TYPE c,      "Vendor product name
          END OF t_eket.
    Internal table for extraction of data from EKES
    Not used after CR1591
    DATA: BEGIN OF t_ekes OCCURS 0,
             ebeln LIKE ekes-ebeln, "Purchasing Document Number
             ebelp LIKE ekes-ebelp, "Item Number of Purchasing Document
             etens LIKE ekes-etens, "Sequence No
             eindt LIKE ekes-eindt, "Item delivery date
             menge LIKE ekes-menge, "Scheduled Quantity
             dabmg LIKE ekes-dabmg, " delivered quantity
             vbeln LIKE ekes-vbeln,
             vbelp LIKE ekes-vbelp,
             mark TYPE c,
          END OF t_ekes.
    Internal table for extraction of data from EKES
    Not used after CR1591
    DATA: BEGIN OF t_ekes_temp OCCURS 0,
             ebeln LIKE ekes-ebeln, "Purchasing Document Number
             ebelp LIKE ekes-ebelp, "Item Number of Purchasing Document
             etens LIKE ekes-etens, "Sequence No
             eindt LIKE ekes-eindt, "Item delivery date
             menge LIKE ekes-menge, "Scheduled Quantity
          END OF t_ekes_temp.
    Internal table for storing data from MLGN table.
    DATA: BEGIN OF t_mlgn OCCURS 0,
             matnr LIKE mlgn-matnr, "material code
             lhmg1 LIKE mlgn-lhmg1, "Standard pallet size
             lhme1 LIKE mlgn-lhme1, "Unit of measure
             lety1 LIKE mlgn-lety1, "tower
             ltkze LIKE mlgn-ltkze, "Storage location
          END OF t_mlgn.
    Internal table for storing data from MARM table.
    DATA: BEGIN OF t_marm OCCURS 0,
             matnr LIKE marm-matnr, "material code
             umrez LIKE marc-zzjp_cas_size, "Std package unit
             meins LIKE ekpo-meins, "alternate unit
          END OF t_marm.
    Internal table for storing data from MARC table.
    DATA: BEGIN OF t_marc OCCURS 0,
             matnr LIKE marc-matnr,               "Material code
             zzjp_nyu_sop LIKE marc-zzjp_nyu_sop, "Product Std number
             zzjp_dos_frm LIKE marc-zzjp_dos_frm, "Dosage form
             zzjp_aprn     LIKE marc-zzjp_aprn,   "Apperance
             zzjp_re1     LIKE marc-zzjp_re1,     "Heading
          END OF t_marc.
    Internal table for storing data from lfa1 table.
    DATA: BEGIN OF t_lfa1 OCCURS 0,
             lifnr LIKE lfa1-lifnr, "Vendor code
             name1 LIKE lfa1-name1, "Vendor name
          END OF t_lfa1.
    Internal table for Storing data from LIPS table.
    DATA: BEGIN OF t_lips OCCURS 0,
             vbeln LIKE lips-vbeln, "Delivery document no
             posnr LIKE lips-posnr, "Item number for Delivery document
             charg LIKE lips-charg, "Batch number
             lichn LIKE lips-lichn, "Vendor Batch number
          END OF t_lips.
    Internal table for storing the final display data.
    DATA: BEGIN OF t_display OCCURS 0,
            g_checkbox  type  c,       "check box for selection of records
             ebeln LIKE ekes-ebeln,      "Purchasing Document Number
             ebelp LIKE ekes-ebelp,      "Item Number of Purchasing Document
             etens LIKE ekes-etens,      "Sequence No
             eindt LIKE eket-eindt,      "Item delivery date
             menge LIKE eket-menge,      "Scheduled Quantity
             vpnam(40) TYPE c,          "Vendor product name
             lifnr LIKE ekko-lifnr,      "Vendor code
             name1 LIKE lfa1-name1,      "Vendor name
             meins LIKE ekpo-meins,      "Unit of measure
             matnr LIKE ekpo-matnr,      "Material Number
             maktx LIKE makt-maktx,     "Material Description-- jp check
             charg LIKE lips-charg,      "Batch number
             lichn LIKE lips-lichn,      "Vendor Batch number
             lhmg1 LIKE mlgn-lhmg1,     "standard pallet size
             lhme1 LIKE mlgn-lhme1,      "Unit of standard pallet
             lety1 LIKE mlgn-lety1,     "tower
             ltkze LIKE mlgn-ltkze,      "Storage location
             umrez LIKE marc-zzjp_cas_size,      "Std package unit
             meinh LIKE ekpo-meins,      "alternate unit
             zzjp_nyu_sop LIKE marc-zzjp_nyu_sop,      "Product Std number
             zzjp_dos_frm LIKE marc-zzjp_dos_frm,      "Dosage form
             zzjp_aprn     LIKE marc-zzjp_aprn,          "Apperance
             zzjp_re1     LIKE marc-zzjp_re1,           "Heading
             std_pac_no(13) TYPE n,            "Std receipt package no
             tot_std_pt(13) TYPE n,             "Total no of std pallets
    add begin CR1447
    Add new field 'Goods-in-order','Item' for goods in plan list
             vbeln like ekes-vbeln,     "Goods-in-order
             vbelp like ekes-vbelp,     "Item
    add end CR1447
          END OF t_display.
    Internal table for storing the final display data -Goods in order list
    DATA: BEGIN OF t_display1 OCCURS 0,
             ebeln LIKE ekes-ebeln,      "Purchasing Document Number
             ebelp LIKE ekes-ebelp,      "Item Number of Purchasing Document
             etens LIKE ekes-etens,      "Sequence No
             eindt LIKE eket-eindt,      "Item delivery date
             menge LIKE eket-menge,      "Scheduled Quantity
             vpnam(40) TYPE c,          "Vendor product name
             lifnr LIKE ekko-lifnr,      "Vendor code
             name1 LIKE lfa1-name1,      "Vendor name
             meins LIKE ekpo-meins,      "Unit of measure
             matnr LIKE ekpo-matnr,      "Material Number
             maktx LIKE makt-maktx,     "Material Description-- jp check
             charg LIKE lips-charg,      "Batch number
             lichn LIKE lips-lichn,      "Vendor Batch number
             lhmg1 LIKE mlgn-lhmg1,     "standard pallet size
             lhme1 LIKE mlgn-lhme1,      "Unit of standard pallet
             lety1 LIKE mlgn-lety1,     "tower
             ltkze LIKE mlgn-ltkze,      "Storage location
             umrez LIKE marc-zzjp_cas_size,      "Std package unit
             meinh LIKE ekpo-meins,      "alternate unit
             zzjp_nyu_sop LIKE marc-zzjp_nyu_sop,      "Product Std number
             zzjp_dos_frm LIKE marc-zzjp_dos_frm,      "Dosage form
             zzjp_aprn     LIKE marc-zzjp_aprn,          "Apperance
             zzjp_re1     LIKE marc-zzjp_re1,           "Heading
             std_pac_no(13) TYPE n,            "Std receipt package no
             tot_std_pt(13) TYPE n,             "Total no of std pallets
          END OF t_display1.
    Internal table for storing the final display data - Goods in plan list
    DATA: BEGIN OF t_display2 OCCURS 0,
             ebeln LIKE ekes-ebeln,      "Purchasing Document Number
             ebelp LIKE ekes-ebelp,      "Item Number of Purchasing Document
             etens LIKE ekes-etens,      "Sequence No
             eindt LIKE eket-eindt,      "Item delivery date
             menge LIKE eket-menge,      "Scheduled Quantity
             name1 LIKE lfa1-name1,      "Vendor name
             meins LIKE ekpo-meins,      "Unit of measure
             matnr LIKE ekpo-matnr,      "Material Number
             maktx LIKE makt-maktx,     "Material Description-- jp check
             charg LIKE lips-charg,      "Batch number
             lichn LIKE lips-lichn,      "Vendor Batch number
             lhmg1 LIKE mlgn-lhmg1,     "standard pallet size
             lety1 LIKE mlgn-lety1,     "tower
             ltkze LIKE mlgn-ltkze,      "Storage location
             tot_std_pt(13) TYPE n,             "Total no of std pallets
    add begin CR1447
    Add new field 'Goods-in-order','Item' for goods in plan list
             vbeln like ekes-vbeln,     "Goods-in-order
             vbelp like ekes-vbelp,     "Item
    add end CR1447
          END OF t_display2.
    add begin CR1591
    RANGES: r_matnr FOR mara-matnr,   "for p_matnr
            r_ebeln FOR ekpo-ebeln.   "for p_ebeln
    add end CR1591
    DATA: line TYPE i.            " line number
    DATA: g_checkbox  TYPE  c.       "check box for selection of records
    DATA: g_tab LIKE sy-index.    "variable to hold index
    DATA  g_tabix LIKE sy-tabix.  "holder for table index
    Printing Options.
    DATA: lw_pr_options LIKE itcpo.
    *lw_pr_options-tddest = 'SA03'.      " Print Device Name
    lw_pr_options-tdpreview = 'X'.      " Print Preview
    lw_pr_options-tdnewid = 'X'.        " New Request
    lw_pr_options-tdlifetime = 2.       " Retention in Spool
                            Selection Screen                             *
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME.
    SELECT-OPTIONS:
      s_date  FOR sy-datum DEFAULT sy-datum. " Search period.
    PARAMETERS:
      p_matnr LIKE mara-matnr,               " Material code
      p_ebeln LIKE ekpo-ebeln.               " Purchase Document No
    SELECTION-SCREEN END OF BLOCK blk1.
                       Selection Screen Checks                           *
    AT SELECTION-SCREEN.
      IF ( s_date-low IS INITIAL ) AND
         ( p_matnr IS INITIAL ) AND
         ( p_ebeln IS INITIAL ).
        MESSAGE e000 WITH 'Entry Must in atleast one of the Fields'(t00).
      ENDIF.
      IF ( NOT p_matnr IS INITIAL ) AND
         ( s_date IS INITIAL )      AND
         ( p_ebeln IS INITIAL ).
        MESSAGE e000 WITH 'Date should also be Entered'(t01).
      ENDIF.
    del begin CR1591
    This check is not found in original FS
    IF ( NOT p_matnr IS INITIAL ) AND
        ( s_date IS INITIAL ) AND
        ( NOT p_ebeln IS INITIAL ).
       MESSAGE e000 WITH 'Date should also be Entered'(t01).
    ENDIF.
    del end CR1591
                   Validations for Data selection                        *
    del begin CR1591
    Waste check
    IF ( NOT s_date IS INITIAL ) AND
        ( p_matnr IS INITIAL ) AND
        ( p_ebeln IS INITIAL ).
       PERFORM f_check_date_in_eket.
    ENDIF.
    IF ( NOT s_date IS INITIAL ) AND
        ( NOT p_matnr IS INITIAL ) AND
        ( p_ebeln IS INITIAL ).
       PERFORM f_check_matnr_in_plant.
       PERFORM f_check_matnr_in_ekpo.
       PERFORM f_check_date_in_eket.
       PERFORM f_check_matnr_in_plant.
       PERFORM f_check_matnr_in_ekpo.
    ENDIF.
    IF ( NOT s_date IS INITIAL ) AND
        ( NOT p_matnr IS INITIAL ) AND
        ( NOT p_ebeln IS INITIAL ).
       PERFORM f_check_matnr_in_plant.
       PERFORM f_check_matnr_in_ekpo.
       PERFORM f_check_date_in_eket.
       PERFORM f_check_ebeln_in_ekpo.
       PERFORM f_check_werks_in_ekpo.
    ENDIF.
    IF ( NOT p_ebeln IS INITIAL ) AND
        ( NOT s_date IS INITIAL ) AND
        ( p_matnr IS INITIAL ).
       PERFORM f_check_date_in_eket.
       PERFORM f_check_ebeln_in_ekpo.
       PERFORM f_check_werks_in_ekpo.
    ENDIF.
    IF ( NOT p_ebeln IS INITIAL ) AND
        ( s_date IS INITIAL ) AND
        ( p_matnr IS INITIAL ).
       PERFORM f_check_ebeln_in_ekpo.
       PERFORM f_check_werks_in_ekpo.
    ENDIF.
    del end CR1591
                         Data selection from Tables                      *
    START-OF-SELECTION.
      SET PF-STATUS 'SELECT'.
    add begin CR1591
    Set ranges tables
      PERFORM set_ranges.
    add end CR1591
    mod begin CR1591
    **Selection of PO data from EKET into internal table t_purc.
    PERFORM f_select_eket.
    **Selection of corresponding PO data for EKET from EKES into t_ekes.
    PERFORM f_select_ekes.
    **Selection of material desc from MAKT table into T_makt.
    PERFORM f_select_makt.
    **Copy the contents of t_purc and t_makt into t_eket table.
    PERFORM f_move_eket.
    **Replace the corresponding entries of t_eket with t_ekes.
    PERFORM f_update_eket.
    Selection of PO data from EKET into internal table T_EKET.
      PERFORM f_select_eket2.
    Selection of corresponding PO data from EKES appending to T_EKET.
      PERFORM f_select_ekes2.
    Selection of material desc from MAKT table into T_MAKT.
      PERFORM f_select_makt2.
    mod end CR1591
    *Selection of vendor product name.
      PERFORM f_select_vpnam.
    del begin CR1591
    No need
    **copy t_eket-ebelp into temporary variable.
    PERFORM f_copy_ebelp.
    del end CR1591
    *selection of data from MLGN table into t_mlgn internal table
      PERFORM f_select_mlgn.
    *selection of data from marm table into t_marm internal table
      PERFORM f_select_marm.
    *selection of data from marc table into t_marc internal table
      PERFORM f_select_marc.
    *selection of data from lfa1 table into t_lfa1 internal table
      PERFORM f_select_lfa1.
    *Selection of data from LIPS table into t_lips internal table
      PERFORM f_select_lips.
    del begin CR1591
    Don't display list screen when no data exists
    *END-OF-SELECTION.
    del end CR1591
    *lines = sy-linno - 1.
    *Collection of data into the final display internal table t_Display
      PERFORM f_collect_final.
    *Display the contents of t_display as a simple List
      PERFORM f_list_display.
    AT USER-COMMAND.
      PERFORM f_select_layout.
      INCLUDE zjpmipu315.
      INCLUDE zjpmipu316.
    *&      Form  f_check_MATNR_in_plant
         This Routine is to check if the the selected material code is
         available in the plant 'JP01'.
    FORM f_check_matnr_in_plant.
      DATA: l_matnr LIKE mara-matnr.
      SELECT matnr UP TO 1 ROWS FROM marc
                       INTO l_matnr
                       WHERE
                       matnr = p_matnr AND
                       werks = c_werks.
      ENDSELECT.
      IF l_matnr IS INITIAL.
        MESSAGE e000 WITH
        'The material is not available in '(t02)  c_werks 'plant'(t20).
      ENDIF.
    ENDFORM.                    " f_check_MATNR_in_plant
    *&      Form  f_check_EBELN_in_EKPO
          This Routine is to check if the Purchase order number selected
          is existing or not and if it exists, check if it is related to
          the plant 'JP01'.
    FORM f_check_ebeln_in_ekpo.
      DATA: l_ebeln LIKE ekpo-ebeln.
      SELECT ebeln UP TO 1 ROWS FROM ekpo
                    INTO l_ebeln
                    WHERE
                    ebeln = p_ebeln AND
                    werks = c_werks.
      ENDSELECT.
      IF l_ebeln IS INITIAL.
        MESSAGE e000 WITH
        'PO not available or not related to '(t03) c_werks 'plant'(t21).
      ENDIF.
    ENDFORM.                    " f_check_EBELN_in_EKPO
    *&      Form  f_check_matnr_in_ekko
          This routine is to check if any PO exist for the selected
          Material code.
    FORM f_check_matnr_in_ekpo.
      DATA: l_matnr LIKE ekpo-matnr.
      SELECT matnr UP TO 1 ROWS FROM ekpo
                       INTO l_matnr
                       WHERE
                       matnr = p_matnr.
      ENDSELECT.
      IF l_matnr IS INITIAL.
        MESSAGE e000 WITH
        'PO does not exist for the material no'(t04) p_matnr.
      ENDIF.
    ENDFORM.                    " f_check_matnr_in_ekpo
    *&      Form  f_check_date_in_eket
          This routine is to check if any purchase order exists
          with the selected
    FORM f_check_date_in_eket.
      DATA: l_eindt LIKE eket-eindt.
      SELECT eindt UP TO 1 ROWS FROM eket
                       INTO l_eindt
                       WHERE
                       eindt IN s_date.
      ENDSELECT.
      IF l_eindt IS INITIAL.
        MESSAGE e000 WITH
       'No PO exist with the selected delivery date '(t05).
      ENDIF.
    ENDFORM.                    " f_check_date_in_eket
    *&      Form  f_check_werks_in_ekpo
          This Routine is to check if the selected purchase order
          is associated with the plant JP01
    FORM f_check_werks_in_ekpo.
      DATA: l_ebeln LIKE ekpo-ebeln.
      SELECT ebeln UP TO 1 ROWS FROM ekpo
                       INTO l_ebeln
                       WHERE
                       werks = c_werks.
      ENDSELECT.
      IF l_ebeln IS INITIAL.
        MESSAGE e000 WITH
        'The selected P0 is not relevant to '(t06) c_werks 'plant'(t22).
      ENDIF.
    ENDFORM.                    " f_check_werks_in_ekpo
    *&      Form  f_select_eket
          Routine to collect data from EKET, EKPO, MAKT, EKKO tables
          using inner join and store the data into internal table
          t_PURC. The data selection is based on the selection screen's
          input.
    FORM f_select_eket.
      IF ( NOT s_date-low IS INITIAL ) AND
         ( p_matnr IS INITIAL ) AND
         ( p_ebeln IS INITIAL ).
        SELECT
                eket~ebeln
                eket~ebelp
                eket~eindt
                eket~menge
                eket~charg
                ekpo~matnr
                ekpo~werks
                ekpo~meins
                ekko~lifnr
         INTO TABLE t_purc
        FROM
                 (  ( eket  INNER JOIN  ekko  ON
                  eketebeln = ekkoebeln )   INNER JOIN  ekpo  ON
                  eketebelp = ekpoebelp  AND
                  ekpoebeln = ekkoebeln )
      WHERE
                eket~eindt IN s_date AND
                ekpo~werks = c_werks AND
                ekpo~elikz NE c_x AND
                ekko~bstyp EQ c_f AND
                ekko~bsart NE c_zar.
      ELSEIF ( NOT s_date-low IS INITIAL ) AND
         ( NOT p_matnr IS INITIAL ) AND
         ( p_ebeln IS INITIAL ).
        SELECT
                eket~ebeln
                eket~ebelp
                eket~eindt
                eket~menge
                eket~charg
                ekpo~matnr
                ekpo~werks
                ekpo~meins
                ekko~lifnr
         INTO TABLE t_purc
        FROM
                 (  ( eket  INNER JOIN  ekko  ON
                  eketebeln = ekkoebeln )   INNER JOIN  ekpo  ON
                  eketebelp = ekpoebelp  AND
                  ekpoebeln = ekkoebeln )
      WHERE
                eket~eindt IN s_date AND
                ekpo~matnr = p_matnr AND
                ekpo~werks = c_werks AND
                ekpo~elikz NE c_x AND
                ekko~bstyp EQ c_f AND
                ekko~bsart NE c_zar.
      ELSEIF ( NOT s_date-low IS INITIAL ) AND
         ( NOT p_matnr IS INITIAL ) AND
         ( NOT p_ebeln IS INITIAL ).
        SELECT
                eket~ebeln
                eket~ebelp
                eket~eindt
                eket~menge
                eket~charg
                ekpo~matnr
                ekpo~werks
                ekpo~meins
                ekko~lifnr
         INTO TABLE t_purc
        FROM
                 (  ( eket  INNER JOIN  ekko  ON
                  eketebeln = ekkoebeln )   INNER JOIN  ekpo  ON
                  eketebelp = ekpoebelp  AND
                  ekpoebeln = ekkoebeln )
      WHERE
                eket~eindt IN s_date AND
                ekpo~matnr = p_matnr AND
                ekpo~ebeln = p_ebeln AND
                ekpo~werks = c_werks AND
                ekpo~elikz NE c_x AND
                ekko~bstyp EQ c_f AND
                ekko~bsart NE c_zar.
      ELSEIF ( s_date-low IS INITIAL ) AND
         ( p_matnr IS INITIAL ) AND
         ( NOT p_ebeln IS INITIAL ).
        SELECT
                eket~ebeln
                eket~ebelp
                eket~eindt
                eket~menge
                eket~charg
                ekpo~matnr
                ekpo~werks
                ekpo~meins
                ekko~lifnr
         INTO TABLE t_purc
        FROM
                 (  ( eket  INNER JOIN  ekko  ON
                  eketebeln = ekkoebeln )   INNER JOIN  ekpo  ON
                  eketebelp = ekpoebelp  AND
                  ekpoebeln = ekkoebeln )
      WHERE
                ekpo~ebeln = p_ebeln AND
                ekpo~werks = c_werks AND
                ekpo~elikz NE c_x AND
                ekko~bstyp EQ c_f AND
                ekko~bsart NE c_zar.
      ELSEIF ( NOT s_date-low IS INITIAL ) AND
         ( p_matnr IS INITIAL ) AND
         ( NOT p_ebeln IS INITIAL ).
        SELECT
                eket~ebeln
                eket~ebelp
                eket~eindt
                eket~menge
                eket~charg
                ekpo~matnr
                ekpo~werks
                ekpo~meins
                ekko~lifnr
         INTO TABLE t_purc
        FROM
                 (  ( eket  INNER JOIN  ekko  ON
                  eketebeln = ekkoebeln )   INNER JOIN  ekpo  ON
                  eketebelp = ekpoebelp  AND
                  ekpoebeln = ekkoebeln )
      WHERE
                eket~eindt IN s_date AND
                ekpo~ebeln = p_ebeln AND
                ekpo~werks = c_werks AND
                ekpo~elikz NE c_x AND
                ekko~bstyp EQ c_f AND
                ekko~bsart NE c_zar.
      ENDIF.
    IF sy-subrc <> 0.
       MESSAGE s000 WITH 'Data not found'(t07).
       LEAVE LIST-PROCESSING.
    ELSE.
      SORT t_purc.
    ENDIF.
    ENDFORM.                    " f_select_eket
    *&      Form  f_select_makt
          Routine to select the material description for all the
          materials present in T_purc table
    FORM f_select_makt.
      DATA: l_t_makt(4) TYPE c VALUE 'MAKT'.
      SELECT
          matnr
          maktx
      FROM
          makt
      INTO TABLE t_makt
          FOR ALL ENTRIES IN t_purc
      WHERE
         matnr = t_purc-matnr AND
         spras = c_spras.
      IF sy-subrc <> 0.
        MESSAGE s000 WITH
          'Relevant data not found in'(t09) l_t_makt 'table'(t23).
      ELSE.
        SORT t_makt.
      ENDIF.
    ENDFORM.                    " f_select_makt
    *&      Form  f_move_eket
          Routine to join data in T_PURC and T_MAKT tables into
          internal table T_MAKT.
    FORM f_move_eket.
      LOOP AT t_purc.
        t_eket-ebeln = t_purc-ebeln.
        t_eket-ebelp = t_purc-ebelp.
        t_eket-eindt = t_purc-eindt.
        t_eket-menge = t_purc-menge.
        t_eket-charg = t_purc-charg.
        t_eket-matnr = t_purc-matnr.
        t_eket-werks = t_purc-werks.
        t_eket-meins = t_purc-meins.
        t_eket-lifnr = t_purc-lifnr.
        READ TABLE t_makt WITH KEY matnr = t_purc-matnr
                                         BINARY SEARCH.
        IF sy-subrc = 0.
          t_eket-maktx = t_makt-maktx.
        ENDIF.
        APPEND t_eket.
        CLEAR t_eket.
      ENDLOOP.
    ENDFORM.                    " f_move_eket
    *&      Form  f_select_ekes
          Routine to select EKES data for all corresponding entries
          of T_EKET.
    FORM f_select_ekes.
      DATA: l_tabix TYPE i.
    IF NOT s_date IS INITIAL.
       SELECT
               ebeln
               ebelp
               etens
               eindt
               menge
        INTO   TABLE t_ekes
         FROM
               ekes
        WHERE
               eindt IN s_date.
    ELSE.
      DESCRIBE TABLE t_purc LINES l_tabix.
      IF l_tabix GT 0.
        SELECT
                ebeln
                ebelp
                etens
                eindt
                menge
                dabmg
                vbeln
                vbelp
         FROM
                ekes
         INTO   TABLE t_ekes
               FOR ALL ENTRIES IN t_eket
                FOR ALL ENTRIES IN t_purc
         WHERE
                ebeln = t_purc-ebeln AND
                ebelp = t_purc-ebelp AND
                eindt IN s_date.
              AND ebeln eq p_ebeln.
           and matnr in p_matnr.
      ENDIF.
      CLEAR l_tabix.
      IF NOT s_date IS INITIAL AND NOT p_ebeln IS INITIAL.
        SELECT
                ekes~ebeln
                ekes~ebelp
                ekes~etens
                ekes~eindt
                ekes~menge
                ekes~dabmg
       APPENDING TABLE t_ekes
          FROM ekes
         WHERE
                eindt IN s_date AND
                ebeln EQ p_ebeln AND
                ebtyp EQ c_la.
      ELSEIF NOT s_date IS INITIAL AND p_ebeln IS INITIAL.
        SELECT
                    ekes~ebeln
                    ekes~ebelp
                    ekes~etens
                    ekes~eindt
                    ekes~menge
                    ekes~dabmg
           APPENDING TABLE t_ekes
              FROM ekes
             WHERE
                    eindt IN s_date AND
               ebeln EQ p_ebeln AND
                    ebtyp EQ c_la.
      ELSEIF s_date IS INITIAL AND NOT p_ebeln IS INITIAL.
        SELECT
                    ekes~ebeln
                    ekes~ebelp
                    ekes~etens
                    ekes~eindt
                    ekes~menge
                    ekes~dabmg
           APPENDING TABLE t_ekes
              FROM ekes
             WHERE
               eindt IN s_date AND
                    ebeln EQ p_ebeln AND
                    ebtyp EQ c_la.
      ENDIF.
      IF sy-subrc = 0.
        SORT t_ekes.
      ENDIF.
      IF NOT t_ekes[] IS INITIAL.
        t_ekes_temp[] = t_ekes[].
        SORT t_ekes_temp BY ebeln ebelp.
        DELETE ADJACENT DUPLICATES FROM t_ekes_temp COMPARING ebeln ebelp.
        LOOP AT t_ekes_temp.
          READ TABLE t_purc WITH KEY ebeln = t_ekes_temp-ebeln
                                     ebelp = t_ekes_temp-ebelp.
          IF sy-subrc NE 0.
            CLEAR t_purc.
            SELECT SINGLE
                  eket~ebeln
                  eket~ebelp
                  eket~eindt
                  eket~menge
                  eket~charg
                  ekpo~matnr
                  ekpo~werks
                  ekpo~meins
                  ekko~lifnr
           INTO  CORRESPONDING FIELDS OF t_purc
          FROM
                   (  ( eket  INNER JOIN  ekko  ON
                    eketebeln = ekkoebeln )   INNER JOIN  ekpo  ON
                    eketebelp = ekpoebelp  AND
                    ekpoebeln = ekkoebeln )
        WHERE
                 eket~ebeln = t_ekes_temp-ebeln
          AND    eket~ebelp = t_ekes_temp-ebelp
          AND    ekpo~elikz NE c_x
          AND    ekko~bstyp EQ c_f
          AND    ekko~bsart NE c_zar.
            IF sy-subrc EQ 0.
              APPEND t_purc.
              CLEAR t_purc.
            ENDIF.
          ENDIF.
        ENDLOOP.
      ENDIF.
      REFRESH: t_ekes_temp, t_ekes.
      CLEAR: t_ekes_temp, t_ekes.
    Once the header is filled up get the details from EKES
      SELECT ebeln ebelp  etens eindt menge dabmg vbeln vbelp
                         INTO TABLE t_ekes
                         FROM ekes
                         FOR ALL ENTRIES IN t_purc
                   WHERE ebeln EQ t_purc-ebeln.
    Mark the entries as 'X' which falls in the date range
      LOOP AT t_ekes.
        IF t_ekes-eindt IN s_date.
          t_ekes-mark = 'X'.
          MODIFY t_ekes INDEX sy-tabix TRANSPORTING mark.
        ENDIF.
      ENDLOOP.
      SORT t_ekes BY ebeln ebelp ASCENDING mark DESCENDING.
    Delete the entries from eket if no entries in EKES falls in the period
      LOOP AT t_purc.
        l_tabix = sy-tabix.
        READ TABLE t_ekes WITH KEY ebeln = t_purc-ebeln
                                   ebelp = t_purc-ebelp.
        IF sy-subrc EQ 0.
          IF t_ekes-mark NE 'X'.
            DELETE t_purc INDEX l_tabix.
          ENDIF.
        ENDIF.
      ENDLOOP.
    delete the entries from EKES which do not fall in the specified period
      DELETE t_ekes WHERE mark NE 'X'.
    ENDFORM.                    " f_select_ekes
    *&      Form  f_update_eket
          Routine to substitute relevant t_eket entries  with that of
          t_ekes entries.It does not modify the remaining entries for
          for which the corresponding values in t_ekes doesnot  exist.
    FORM f_update_eket.
      DATA: BEGIN OF lt_temp_eket OCCURS 0,
               ebeln LIKE eket-ebeln, "Purchasing Document Number
               ebelp LIKE eket-ebelp, "Item Number of Purchasing Document
               eindt LIKE eket-eindt, "Item delivery date
               menge LIKE eket-menge, "Scheduled quantity
               dabmg LIKE ekes-dabmg,  " Delivered quantity
               matnr LIKE ekpo-matnr, "Material code
               maktx LIKE makt-maktx, "Material Description-- jp check
               etens LIKE ekes-etens, "Sequence Number
               meins LIKE ekpo-meins, "Unit of measure
               lifnr LIKE ekko-lifnr, "Vendor number
               charg LIKE eket-charg, " Batch number   Added by PD 08/08/03
               vbeln LIKE ekes-vbeln,
               vbelp LIKE ekes-vbelp,
            END OF lt_temp_eket,
            l_menge LIKE ekes-menge.
      LOOP AT t_eket.
        LOOP AT t_ekes WHERE ebeln = t_eket-ebeln
                        AND  ebelp = t_eket-ebelp.
    Added by PD 08/08/03
          MOVE t_eket-charg TO lt_temp_eket-charg.
    addition ends
          MOVE t_eket-ebeln TO lt_temp_eket-ebeln.
          MOVE t_eket-ebelp TO lt_temp_eket-ebelp.
          MOVE t_eket-meins TO lt_temp_eket-meins.
          CLEAR l_menge.
          l_menge = t_ekes-menge - t_ekes-dabmg.
          IF l_menge LE 0.
            CONTINUE.
          ELSE.
            MOVE l_menge TO lt_temp_eket-menge.
          ENDIF.
          MOVE t_ekes-eindt TO lt_temp_eket-eindt.
          MOVE t_ekes-etens TO lt_temp_eket-etens.
          MOVE t_eket-lifnr TO lt_temp_eket-lifnr.
          MOVE t_eket-maktx TO lt_temp_eket-maktx.
          MOVE t_eket-matnr TO lt_temp_eket-matnr.
          MOVE t_ekes-vbeln TO lt_temp_eket-vbeln.
          MOVE t_ekes-vbelp TO lt_temp_eket-vbelp.
          APPEND lt_temp_eket.
          CLEAR lt_temp_eket.
          CLEAR t_ekes.
        ENDLOOP.
        IF sy-subrc NE 0.
    Added by PD 08/08/03
          MOVE t_eket-charg TO lt_temp_eket-charg.
    addition ends
          MOVE t_eket-ebeln

    Dear
    Problem No 1 : we are working in a process industries with three plants each of them have three order type. we have define MRP group in "OPPR" then assign each MRP group to Orde types in "OPPE". Now the problem is whn i convert plan order in process order for any material systme automaticaly pick the order type PIi01.
    Answer :
    1.Please check the OPPR -Plant and MRP group -Select Order Type Button -Check what Order Type you have assinged here ( PI01( May be the default Process Order Type )
    2.If you are maintaing MRP group ( 0001 or 0002) , did you asisng the same in MRP1 view ?? because
    3.Did you maintain the similar Order type in OPKP -Define Production Scheduling Profile ? -This has highest priority .
    4.Did you maintain correct order type in OPJH-Maintain Order Type ??
    Refer the expert comments on the same issue : Strategy group to define production order type
    Problem No 2: 2nd Problem is system system is not creating plan order for prrevios dates. say i enter PIR for month of november from first november to 30th november and run MRP on 29th the sytem create plan order on 30th of november with exception message 30.
    Answer : You can plan the order in back dated , if you maitain Satrt date in the Past optiuon in OPU3/OPU5-Define Scheduling parameters .Goto OPU3 -Select the Order Type -Double click -Maintain 90-60 days in the Start Date in the past in Scheduling Control and Details scheduling tab .
    Hope it helps
    regards
    JH

  • Only one epub file will not open in ADE or on my Nook. The others I downloaded will open on both and will copy to the Nook as usual.

    I download epub books from Overdrive. Only one epub file will not open in ADE on my Mac or on my Nook. The many others I've downloaded will open on both and will copy to the Nook as usual. Using the latest edition of ADE. Could be a corrupted ePub file? Curiously, this is the second time I've downloaded this epub from the same site, and I had no problem the first time. It still has 9 days remaining in the borrowing period.

    Forgot to make clear that on both my Mac and the Nook, attempting to open the epub causes ADE to crash.

  • Automatically create vendor batches from DESADV

    Hello gurus,
    we receive DESADV Idocs that automatically create inbound deliveries in our SAP system.
    When the vendor sends a batch number, it is correctly transmitted into field u201Cvendor batchu201D (LIPS-LICHN). Field u201Cbatchu201D (LIPS-CHARG) is empty.
    Now we would like to use the vendoru2019s batches in our system.
    Example: We do not have any stock or batch information of a certain material. Now we order 10 pieces of that material and the vendor sends a DESADV containing batch information for the goods to be delivered (vendor batch number is 1234).
    Now, we would like to have the system create a batch automatically and post the material to that batch on GR. The number of the batch may be automatically created, but the vendor batch number (1234) must be visible in the batch master record.
    Is there a standard way to do this (in plain MM, without LE)?
    Cheers
    Alicia

    Hello Alica Moore,
    The batch management is controlling the inventory at your location level only ( like plant /  co. co / material ). The batch which is sending by your vendor  /  customer, that can be used if the manual batch is using. If the system is using automatic batch management , than the sytem auto batch only updated in your inventory system and the batch is given by your vendor would be optional entry.
    I think this can be achived with making your system as manual batch entry which would be used as vendor batch number in your system.
    Pavan

  • How to retrieve data from a read-only Excel file

    Hi Developers,
    I'm trying to retrieve data from a read-only Excel file. I used the same code that I used to retrieve data from a normal Excel file, but it can't work.
    My code is as followed:
    try
    InputStream KpExcel = new FileInputStream("kp.xls");
    HSSFWorkbook Kpwb = new HSSFWorkbook(KpExcel);
    HSSFSheet Kpsheet = Kpwb.getSheetAt(0);
    catch(Exception e)
    e.printStackTrace();
    System.out.println("Exception: "+e.getMessage());
    The error I received is as followed:
    java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
    at org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFactory.java:224)
    at org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:160)
    at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:163)
    at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:210)
    at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:191)
    at photoproductionsystem.IncomingWIPPanel.getKp(IncomingWIPPanel.java:118)
    at photoproductionsystem.IncomingWIPPanel.<init>(IncomingWIPPanel.java:76)
    at photoproductionsystem.TabbedDisplay.<init>(TabbedDisplay.java:47)
    at photoproductionsystem.Display.create(Display.java:73)
    at photoproductionsystem.Display.init(Display.java:44)
    at photoproductionsystem.Display.main(Display.java:229)
    Caused by: java.lang.ArrayIndexOutOfBoundsException
    at java.lang.System.arraycopy(Native Method)
    at org.apache.poi.hssf.record.UnknownRecord.<init>(UnknownRecord.java:62)
    at org.apache.poi.hssf.record.SubRecord.createSubRecord(SubRecord.java:57)
    at org.apache.poi.hssf.record.ObjRecord.fillFields(ObjRecord.java:99)
    at org.apache.poi.hssf.record.Record.fillFields(Record.java:90)
    at org.apache.poi.hssf.record.Record.<init>(Record.java:55)
    at org.apache.poi.hssf.record.ObjRecord.<init>(ObjRecord.java:61)
    ... 15 more
    Can someone please help me with my problem? Thanks a lot in advance!

    Madeline wrote:
    how do I ask at Apache mailing list?I wonder why it seems to be a strange idea to some people to look at the software vendor's site for product support. :p
    http://poi.apache.org/mailinglists.html

  • I am trying to retrieve music that I had from an iPad to my iTunes account. I'm using the same computer for synching my iPhone.  I'm logged into my iPad account, but can't retrieve music. It only recognizes my iPhone.

    I am trying to retrieve music that I had from an iPad to my iTunes account. I'm using the same computer for synching my iPhone.  I'm logged into my iPad account, but can't retrieve music. It only recognizes my iPhone.  Does anyone know how I can get my music?  I know longer own the iPad so I don't have access to it, but I don't think that should be a problem.

    So you had music on the iPad that is not in iTunes and you no longer have the iPad. Is that what you are saying? If that is what you are saying, iTunes won't "recognize" anything that was on the iPad, that was not purchased from iTunes. If the music was purchased from iTunes, you should probably be able to download it again for free as long as you are using the same Apple ID that you bought it with. Did you try downloading the music again?
    Am I understanding what it is that you want to do? If I am understanding you correctly, you will find this to be useful.
    Downloading past purchases from the App Store ... - Support - Apple
    I admit that I'm a little confused by your remark about being logged into your iPad account. You should be logged into your iTunes account.

  • Exit to populate Vendor Batch field in Material tab while creating PO.

    Hi Experts,
    I need an exit to populate Vendor Batch field in Material tab while creating Purchase Order.
    Regards,
    Jayapal.
    Message was edited by:
            Jayapal

    HI ,
    Folllowing r the exits for po .
    Enhancement/ Business Add-in            Description
    Enhancement
    MEVME001                                WE default quantity calc. and over/ underdelivery tolerance
    MM06E001                                User exits for EDI inbound and outbound purchasing documents
    MM06E003                                Number range and document number
    MM06E004                                Control import data screens in purchase order
    MM06E005                                Customer fields in purchasing document
    MM06E007                                Change document for requisitions upon conversion into PO
    MM06E008                                Monitoring of contr. target value in case of release orders
    MM06E009                                Relevant texts for "Texts exist" indicator
    MM06E010                                Field selection for vendor address
    MMAL0001                                ALE source list distribution: Outbound processing
    MMAL0002                                ALE source list distribution: Inbound processing
    MMAL0003                                ALE purcasing info record distribution: Outbound processing
    MMAL0004                                ALE purchasing info record distribution: Inbound processing
    MMDA0001                                Default delivery addresses
    MMFAB001                                User exit for generation of release order
    MRFLB001                                Control Items for Contract Release Order
    AMPL0001                                User subscreen for additional data on AMPL
    MEQUERY1                                Enhancement to Document Overview ME21N/ME51N
    LMEDR001                                Enhancements to print program
    LMELA002                                Adopt batch no. from shipping notification when posting a GR
    LMELA010                                Inbound shipping notification: Transfer item data from IDOC
    LMEQR001                                User exit for source determination
    LMEXF001                                Conditions in Purchasing Documents Without Invoice Receipt
    LWSUS001                                Customer-Specific Source Determination in Retail
    M06B0001                                Role determination for purchase requisition release
    M06B0002                                Changes to comm. structure for purchase requisition release
    M06B0003                                Number range and document number
    MELAB001                                Gen. forecast delivery schedules: Transfer schedule implem.
    MEFLD004                                Determine earliest delivery date f. check w. GR (only PO)
    MEETA001                                Define schedule line type (backlog, immed. req., preview)
    ME590001                                Grouping of requsitions for PO split in ME59
    M06E0005                                Role determination for release of purchasing documents
    M06E0004                                Changes to communication structure for release purch. doc.
    M06B0005                                Changes to comm. structure for overall release of requisn.
    M06B0004                                Number range and document number
    Regards

  • What is the Different between the vendor batch in inbound delivery and MIGO

    Dear Guru,
    My vendor batch number did not copied to goods receipt when i use migo to post GR reference with Inbound delivery.
    Can anyone advice if there is any different to the vendor batch in GR and IB?
    Thank you very much,
    Regards,
    Chee Wee

    Dear Amey,
    Thanks.
    Actually we have an interface with our supplier system, where they post the Goods issue in their system, then we will receive an inbound delivery idoc "DESADV" from the supplier.
    and my vendor can provide their batch number to us only when their goods issue is posted.
    In this case, we would like the inbound delivery idoc to include this vendor batch number, so when we perform the goods receipt reference with Inbound delivery will have the vendor batch number automatically.
    Regards
    Chee wee

  • MIGO field selection - vendor batch number

    I created a new movement type by copying from the standard SAP movement type 501 (GR w/o purchase order).
    When posting a GR with this movement type and a batch-managed material, the Batch field is open for entry but the Vendor Batch field (GOITEM-LICHA) is suppressed. I suppose this is because SAP does not expect you to enter any vendor-related information if you do not have a PO. And similarly if you have vendor-related information (like a vendor's batch number) you should be using a PO.
    However the business requires a Vendor Batch number to be entered in this scenario.
    Does anyone know how to make the Vendor Batch field open for input when using a specific movement type?
    I'm thinking maybe a BADI like MB_MIGO_ITEM_BADI is my only option. I've tried the MIGO field selection (OMJX) but couldn't make this work. Any input would be appreciated.
    Thanks!

    I am afraid I must confirm that, as you have already seen, it is not possible to enter a Vendor Batch (LICHA) in a goods receipt without reference to the purchase order with the movemement types 501, 511 or 561.
    There is no standard system setting or program code available which can set this entry as required or optional. This kind of requirement can only be achieved through a software modification,
    Also, please notice that although you can enter a Vendor Batch when posting a goods movement with reference to a purchase order, you cannot display it later with transaction MIGO:
    Please, kindly check the information contained under the attached note regarding this matter:
    330585 - MIGO: Vendor batch in material document display.
    As stated in this note, under the 'System response after the note is implemented' section:
    "After the attached correction instructions are implemented, the field
      can no longer be seen in the display of the material document for the
      vendor batch using Transaction MIGO. Displaying the vendor batch does
      not make much sense since it might have changed since the posting of
      the material document. The material document itself does not have the
      information of the vendor batch that was entered at that time. In the
      system, only the information of the current vendor batch exists for
      the batch."
    Sorry not having a positive answer ! =/
    Plauto

  • Vendor Open items transfer from one Recon to Another recon

    We have wrongly maintained one recon account in Vendor. 
    Is there any way to trnasfer Vendor Open items transfer from one Recon to Another reconciliation account..

    Hi,
    The best way is to transfer the items from old to new reconciliation account.
    Please use the following entries to transfer.
    1. Dr Vendor a/c(Old recon a/c)
        Cr Vendor clearing a/c
    After nullifying the balance in old recon account, here chage recon in the master.
    2. Dr Vendor clearing a/c
        Cr Vendor a/c(New recon a/c)
    F101 only post the adjustment entry at period end and reverse the same entry in next period. So, transferring the items is the best method. If you have volume of data, then create a LSMW for this.
    Rgds
    Murali. N

  • I recently removed an outlook account and now all of my calendar events are missing. The majority of them were added from my iphone 4s. How do I retrieve the events? Backing up with iCloud did not help, as I assumed it would.

    I recently removed an outlook account and now all of my calendar events are missing. The majority of them were added from my iphone 4s. How do I retrieve the events? Backing up with iCloud did not help, as I assumed it would.

    Outlook is a mail client for PC's (and Macs). It is not a type of account. Do you mean an "Exchange Account"?
    If so, then re-add it. The calendar events live on the Exchange Server. The only way to get them back is to re-add the account to the phone. The contents of Exchange and IMAP accounts are not part of the 'backup' as they already exist elsewhere.

  • Inspection type 01 - inspection lot creation based on vendor batch number

    Hi Guys,
    this topic has been discussed several times here, but I was not able to find a suitable answer for my question.
    I am facing the folowing requirement:
    I have activated inspection type 01 for a raw material.
    I am receiving a firs goods receipt from vendor A with vendor batch number 0001.
    The system creates its own goods receipt batch number 0546 based on internal numbering.
    A new inspection lot is created.
    I am posting a second goods receipt from vendor a with vendor batch 0001.
    The system creates a new batch number 0547 based on internal numbering.
    A new inspection lot is created.
    I do not want to get the second inspection lot, because I received vendor batch 0001 before and I am assuming it has been inspected or is in inspection.
    Option 1: Post the second goods receipt against the first internal batch number created.
    I am aware of this need at the moment, but a user is not always checking if there is an internal batch with the same vendor received before.
    Can I customize the system to create inspection lots based on the fact that the vendor batch number was received before?
    Or do I have to use an exit and some ABAP code to get the wanted result?
    Thanks for your advice in advance.

    You need to use one of the enhancements that Do-Wook has suggested.  There is no standard SAP way to suppress the inspection based on the vendor batch number.
    With the first enhancement you use the system to check for a previously received vendor batch and if one is found, then that batch number is proposed and not the next one from the numbering series.  In this case, the lot isn't created than due to the inspection lot control of the inspection type.
    With the second enhancement you check the vendor batch number and if it's been received you suppress the inspection lot creation and the stock goes right to unrestricted.
    You'll probably need to do one or the other.  Myself, I prefer the first enhancement.
    Craig

  • While creating PO using BAPI_PO_CREATE1 vendor batch number is not comming.

    Hi Friends,
    I am using BAPI "    'BAPI_PO_CREATE1' to create PO in my report.
    The PO's are getting created but i the vendor batch number is not found in the PO.
    Where as i am passing the vendor batch number.
             bapimepoitem-vendrbatch = '2'.
              bapimepoitemx-vendrbatch = 'X'.
      CALL FUNCTION 'BAPI_PO_CREATE1'
        EXPORTING
          poheader          = bapimepoheader
          poheaderx         = bapimepoheaderx
          memory_uncomplete = 'X'
        IMPORTING
          exppurchaseorder  = v_po_number
        TABLES
          return            = bapiret2
          poitem            = bapimepoitem
          poitemx           = bapimepoitemx
          poschedule        = bapimeposchedule
          poschedulex       = bapimeposchedulx.
        Commit the transaction
      IF v_po_number NE space.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
          EXPORTING
            wait   = 'X'
          IMPORTING
            return = bapiret2_c.
      ENDIF.
    Please reply urgently.
    Thanks Regards,
    Sandipan Jena

    Hi
    My answer is pure assumption.
    Please check the following OSS notes
    Note 758810 - BAPI_PO_CHANGE vendor batch and batch not visible
    Note 1230268 - Field Vendor Batch never filled for PO BAPIs
    Please take help from BASIS and SAP, before implementing the OSS note
    Regards
    Madhan D

Maybe you are looking for

  • Email id geterates in PDF Problem

    Hi, I have a problem when generating a PDF in dat if i get email id. then in the log its generating Possible variable substitution ignored. Variable 'gmail' not found.  for any email id. some times the dat is going in to loop that crashing the adobe

  • How to find the user who have restarted the schedular.

    Hi, We are using the cron trigger schedular to initiate the BPEL process. We use the oc4jadmin user to login into the em console of SOA. Somebody has restarted the schedular on production server which we can see in the log file. But is there any way

  • PROJECTS Security

    Hi, How can I put security on the specific Projects. For example, I want to create a Project and it should display only to a specific department. It should not be available in any Module for any Actual Transaction like Timecard, PR, PO...etc. We are

  • How to include JAVA work in a maintenance cycle

    Good Day; Would anyone know where I can find documentation on how to include JAVA changes in a Solution Manager / ChaRM maintenance cycle? I understand that a transport can be created for JAVA work. Thanks All Regards Don Newton

  • How to convert rows into single columns in Oracle?

    I have table with data like shown below in Oracle database. P_COLUMN COLUMN_1 COLUMN_2 COLUMN_3 COLUMN_ 4 COLUMN_5 COLUMN_6 COLUMN_7 COLUMN_8 COLUMN_9 COLUMN_10 1 A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 1 B1 B2 B3 B4 B5 B6 B7 B8 B9 B10 1 C1 C2 C3 C4 C5 C6 C7