How to flow Vendor Batch fields in PSG segment

Dear Experts,
I need vendor Batch Field in COPA Document.
I am doing third party sale.so at the time of GR(MIGO).My material is issued at Batch wise and Vendor batch is also maintained at GR level.
Then Billing no PGI
Now my Client want to see Profitability VENDOR BATCH WISE.
How to flow cost vendor batch wise in COPA.because the field is not part of my PSG and PSG is determined at Sales order Level.
regards
RR

Hi
Do the transaction in front of your ABAP consultant... Tell him which field you want to be fetched into COPA and where to store and from where to fetch it
Your case: you want Batch No to be fetched, stored into WW Char and fetched from GR document...
He needs to write the logic in exit to fetch and store the data
br, Ajay M

Similar Messages

  • Subcontarcting: vendor batch field for By-products

    Hi,
    In subcontracting scenario, we recieve by-products (defined in PO) via Mvt 545 when MIGO is done.
    For these by-products , under Batch Tab ( in MIGO) there is vendor batch field which is greyed-out.
    Any idea on how to make this vendor batch field as optional entry?,
    Can this be made optional, at all ?  . If no, then why?
    (changing the status in OMJX has already been tried out and it doen't solve the purpose)
    Regards
    Rajat

    OMJX is working. Did you save customizing in OMJX & then try?
    Please try again.

  • 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

  • Vendor Batch Field

    Hi,
    I need to make the Vendor Batch Field as an Input Field ( GOITEM-LICHA ) for the movement type 501. It is populatin g for 101 mvt type if the material is batch managed whereas for 501 even though the material is batch managed i am not able to get the field populated.
    I had tried the settings in the field selection for mvt type but in vain.
    Could anyone help me out to get a solution for this scenario.
    Regards,
    RitiG

    Hi Jurgen,
    Thanks for the mail, but the functionality of 501 basically lies with the Goods Receipt without having a Purchase order. The vendor will be inputted during the MIGO transaction through which we can trigger creation of a PO in the background.
    Hope my functionality is quite clear to you.
    Regards,
    RitiG

  • Vendor Material No. and Vendor Batch field in MIGO for GR against Order

    HI,
      I received a very specific requirment for one of our client: Client need the field Vendor Material No. and Vendor Batch in the detail data --> material and batch tab in MIGO transcation for A01 (Goods receipt ) against R08 (Order), this is for good receipt against Process Order, Here though the vendor does not come in picture , these field are required. These field are appearing in GR(A01 against Purchase order(R01)
    Regards
    Rahul

    Hi,
    First of all, why do you want Vendor Batch no & material no while doing receipt against process order.  You can enter the same while doing a GR against Purchase order & same can be tracked using some reports.
    As you said, since you are doing a receipt against the Process order, vendor doesn't come in picture. Hence the vendor batch no: or vendor material no: wont be populated as per Std.SAP.  You can check for some enhancements/BAdi's in MIGO transaction to populate the same.
    Thanks & Regards,

  • Vendor batch field MCHA-LICHA

    HI,
    I understand MCHA-LICHA field in batch record(MSC3N) is a information field only and it is not getting populated automatically with any transaction. Am I correct?
    I want to populate this field with some information using user exit.
    Please revert if I am wrong.
    Thank you,
    Dipak

    Is it possible to trace original batch?
    We have a batch getting created if you do GR using inbound delivery.
    Also we have  a different batch from issue plant location.
    I want to trace this batch which was selected during GI.
    Its a typically a senario  of CC STO.
    Regards,
    Dipak

  • 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 batch and batch field on the inbound delivery

    hi GUrus,
    i have looked through most of the threads where the topic of vendor batch and batch on the inbound delviery has comeup. I'm specifically looking at a scneario where i would want to pass the on the batch number provided by the vendor on the IDOC to batch field on the inbound delivery. The reason for this is , i can look at the batch field in the confirmations tab of the PO, in the purchase order histroy tab of the PO, and also MMBE tcode. the material is also batch managed turned on in hte material master. But the issue is that even though i put the batch provided by vendor in the CHARG field on the ASN IDOC, it is still getting populated in the vendor batch field in the inbound delivery.
    any ideas?
    Thanks
    Ravi

    Hi,
       Refer the note:  833668 - Creating batches in the inbound delivery using IDOC  which explains the system design.
    Regards,
    AKPT

  • Vendor batch data

    Hi experts,
    While displaying batch (transaction MSC3N), I found Vendor Batch field with the vendor batch number in it.
    It drives me to the table-field MCHA-LICHA.
    But when I check the table, I find the field MCHA-LICHA with a blank value.
    How come it happened? where can I find the vendor batch data?
    Please advise.
    regards,
    rob

    To my knowlege there is no standard report that will show movements with or by vendor batch.
    The vendor batch that you enter while doing a goods receipt is only stored in the batch record, mot in the movement.
    In BMBC batch information cockpit it is possible to list batches and to display the vendor batch at the same time (tab where used).
    You may need to execute this first, then take all your batches for a certain vendor batch and use it as selection criteria for MB51 to the see movements.

  • Making batch field dispaly in mb1b while doing 541 against PO

    Dear Friends,
    How can I make batch field dispaly in mb1b while doing 541 against a subcontracting PO so that no one can change the batch number in MB1B.It should flow from the PO.
    Regards
    Rutabhadra Panda

    Hi Friends,
    Thanks for your kind reply.
    But there is no option to of making it display.
    Only required, optional & suppress are there.
    Please answar.
    Regards
    Rutabhadra Panda

  • 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

  • Vendor Batch Tracking

    Dear Sir
    For Getting Vendor Batch Tracking
    We are have adopted a Process in our company as below.
    1) @ Inward entry (105 nmovement ) an internal Batch will be created.
    2) @Quality clearance(qa32) the item is being moved to unrestricted  stock by selecting the  option  "New material", and by giving the same material code & entering new manual batch(Vendor batch) we are moving it into the stock .
    So internal batch will be a parent batch in our premises for tracking the Vendor batch.
    But the  problem we are facing in this procedure is
    the vendor batches we are getting is 15 to 18 characters but internal or external batch number is only of 10 characters.
    Does the poblem will be solved with document batch adoption.
    So kindly please suggest a new procedure or any adoptabl;e condition to overcome my problem.
    Regards
    Chaitanya

    Hi,
    You should use Vendor Batch field (MCHA-LICHA) under Trading Data Info in Basic data1 of Batch Master record in order to store Vendor Batch tracking. This field has 15 length character. So if you need to have more character you should go for text field only.
    Regards,
    Girang

  • Removinga field from the segment which is already released

    Hi Folks,
        I have created a custom segment & released it. But later when I want to remove a field from it I'm not able to do so. I tried to cancel the release of the segment & then make the required changes but while tried to cancel the release I'm getting an error saying "Error while resetting release of segment ZDATA_BASIC_SEG". Kindly let me know how could I remove the field from this segment. For your information the current release of our system is 700 & the release of segment is also 700.
    Thanks & Regards,
       santosh

    Hi Santosh,
    As you said, current release of your system is 700 & the release of segment is also 700.
    I tried to test the possible errors during the release of the segment. Please have a breakpoint in the program LEDIJF05 in the form CHANGE_CLOSE_SEGDEF.  The error could be mismatch with the previous definition of the segment, where the release is not equal to 700.
    Message Id : EA, msg no 259.
    Please check.
    Hope this helps.
    Regards,
    Satish Kanteti

  • How can batch field in Purchase Order(PO) be a fixed value????

    Hi Experts,
    In SAP, when create a purchase order, there is a field "Batch" for every item,
    which means "Assigns a material that is manufactured in batches or production lots to a specific
    batch ".
    For some special reasons, we want for some certain materials,when create purchase orders every
    time,the "Batch" field will be a fixed values.
    For example,for material "AB1" ,"CD2",when create purchase orders every time,the "Batch" field will
    be "2345" automatically,do not need input manually.But for all the other materials, the "Batch" field would be null ,no value.
    How can I do this? How can assign fixed batch number values to some certain materials in Purchase
    Order?
    If there needs some ABAP development,which user exit do I need??
    Thanks for any reply!

    Hi there,
    You may need to establish, whether you wish to use batch managent or split valuation.
    Spilt valuation does allow you to default values into purchasing documents via information records, but I guess it depends on what else you want to do with this tracking
    Split valuation can be controlled independently at the material and plant level
    Regards
    Steve

  • How to pass smtp_addr(email field) to cremas idoc while creation of vendor?

    Hi All,
    i am creating the vendors by IDOC by using CREMAS basic type CREMAS05.
    There is no email field in any of the idoc segments,as i need to pass the email address being mandatory,
    i created the Z segment and added the email field into it and then created the z extension and added this zsegment into the extension.
    Now how do i and where do i map this field so that email data is also passed while creating the vendor master.
    i have debugged the cremas Function Module IDOC_INPUT_CREDITOR and the data is getting passed segment wise,and for customer segement i.e for the zsegment there is a enhancement section where i need to pass this field,but i do not know how do i map this field and with what structure.
    Please let me know how do i handel this/or is there in other way to do it.
    Thanks.
    RJP.

    Hi,
    the email is part of the address data. It is therefore not belonging to the customer master data. So it is also not part of the DEBMAS idoctype.
    To distribute via ALE accurate customer address data, you need to distribute ADRMAS, ADR2MAS, ADR3MAS idoctypes too.
    See [note 384462|https://service.sap.com/sap/support/notes/384462] and [note 306275|https://service.sap.com/sap/support/notes/306275]
    BR
    Alain

Maybe you are looking for

  • How to do a service callout to a service with/without MTOM support

    I have a problem trying to call a business service from a proxy service as a service callout related to MTOM. Specifically, the service I have is a Java based web service with the following signature: void archive(byte[] bytes, String fileName) When

  • Regarding Internal table logic

    Hi, I have my internal table as follows: DATA: BEGIN OF I_DATA OCCURS 0,         prgname TYPE SYST-REPID,         matnr   TYPE mara-matnr,         berid   TYPE mdma-berid,       END OF I_DATA. Data that fills into can be as follows: Ex: PROGRAM1,1000

  • Dump 'LOAD_PROGRAM_NOT_FOUND' while using QM02 and ZXqm02

    Dear All, We are facing dump LOAD_PROGRAM_NOT_FOUND at the time of QM02 and One Z transaction ZXQM02. Could you please tell me what should be the reason or what should be the remedy? Regards, AMAR

  • Using Exchange for Hotmail

    I am long time user of Hotmail for mail, contacts and calendar on my PC. Recently purchased MacBookPro. I share my calendar with my daughter who is a PC user. Even though when I attempt to create an exchange account (I have one on my iPhone4 and iPad

  • Hana Studio "The system is locked; the license is invalid or has expired"

    Hello, I am using HANA Studio 1.0.48 with HANA One AWS-instance successfully since 4 month. Since one week my HANA Studio Ver. 1.0.48 can't connect with the HANA-DB. Following errors appear during connecting: "The system is locked; the license is inv