IDOC for Creation of Production order and also adding components

Hi ,
I have a requirement like I get the data from a 3rd party system and using that i have to create production orders and also should be able to add more materials in COMPONENTS part of that Production order. I was looking for a BAPI which can handle this process.
And also can any one help me by letting me know is there any Message type available for handling this process of Production order creation and Adding extyra components to it.
I have a  message type LOIPRO (for Production Order) and associated function modle CLOI_MASTERIDOC_CREATE_LOIPRO for creation of master IDoc, but not sure can i handle the Components part in this.
Please do send replies ASAP, its very urgent.
Or else atleast suggest me the other ways of doing this .
Also send me any BDC program if anyone has already developed for this.
Thanks
Kumar
Edited by: Phani Kumar Peddagopu on Mar 19, 2008 6:56 PM

Resolved .

Similar Messages

  • FM for creation of production order creation

    Hi All,
    Can anyone tell me the BAPI for the production order creation.
    BAPI for creation of production order through CO01 transaction code.
    Thanks in advance
    Ramesh.

    Hi,
    Please check this FM CO_ZF_PRODUCTIONORDER_CREATE.
    Regards,
    Ferry Lianto

  • BAPI for creation of Production Order with Ref to sales order

    Hi all,
    we are using BAPI_PRODORD_CREATE  for creating Production Order with ref to sales order.
    As per the Business Scenario, we are not creating any masters like BOM and Routing, instead
    we are creating Routing directly into the Production Order under operation overview screen.
    during creation of routing system is generating a default operation.
    the following is the error results after running the Bapi.
    "No routing selected"
    Best Regards.
    GTNRNR.

    Hi GTNRNR,
    with out creation of BOM you created routing and in routing for the operations which components did you allocated so that can be used to manufacture the final product. Can you be please specific?
    Regards,
    Madhu.G

  • Multiple batches for a production order and mapping with components

    Hello Gurus,
    Our business requires to create multiple batches for one production order + they want to trace which component in the production order has been issued to the main equipment.
    For example, I am creating production order for 'A' equipment for 4 qty. Business wants to create 4 different batches for these equipment
    Lets say now 4 batches are created A001, A002, A003 and A004.
    Now lets assume 2 nos of 'B' component are required for 1no of 'A' component. So the requirement of B component is 8.
    Lets say 8 batches are generated B001, B002 ......B008
    Now lets say batch B001 and B002 are issued for A001 and packed together. How do we map this?
    I understand we can do some enhancement for creating the multiple batches but I still dont know how to map them with each other.
    Please help

    Hi Ethan
    There is a functionality called WIP batches, that allows you keep the batch traceability within an order.
    With WIO batches you can track which batch of component was used to produce each batch of finished product.
    See this link for more details:
    Work-in-Process (WIP) Batch - SAP Library
    BR
    Caetano

  • Creation of Production Orders(CO01) , its opeartion & Components in mass

    Hi Gurus
    I have to create the Production Orders in mass with Operation & Component alloacation & i want to use the BAPI BAPI_PRODORD_CREATE, whether i can create the Opeartions & components of Production Orders at the same time using this BAPI BAPI_PRODORD_CREATE or anything else i have to use ?
    what should be the solution for this kind of situation ?
    i am going to get the flat file that have each & every single detail about Production Orders, its operations & Components & i have to create the Production orders in a big mass approiximately 2 million Production orders with Operations & componets.
    Please suggest how to deal with this ?
    Thanks

    Resolved .

  • EDI for creation of Sales Order and sending copy of Invoice

    Hello Experts,
    I am working on EDI. We have a scenario, where the purchase order created in the 3rd party system has to be converted into a sales order in our SAP system.
    Then, the regular flow would follow uptil delivery and creation of invoice in SAP.
    We have to send a copy of this Invoice back to the 3rd party system.
    So, in effect, we would have EDI at two points, while capturing the PO from the 3rd party and another when sending a copy of the Invoice back to the 3rd party.
    Please advise on how to go about implementing EDI in the above mentioned scenarios.
    Regards,
    Divyata

    Use EDI 850 Process code ORDE FM IDOC_INPUT_ORDERS for PO (Inbound)
    use EDI 810 Process code SD09  FM IDOC_OUTPUT_INVOIC for Invoic (Outbound)
    Edited by: srini korada on Jun 9, 2011 4:51 PM

  • Difference between IDOC for creation, change and deletion

    Hi,
    As per the requirement, an IDOC will be generated for PO, Vendor Masters and Goods receipt when ever a PO or Vendor or Goods receipt is created or changed. How can we identify whether the IDOC has been created for creation or change of a particular thing? Is there any identifier where in we can check whether the IDOC generated is for creation or change?
    And also how to identify that a particular PO or VM or GR has been deleted or cancelled?
    Thanks & Best Regards,
    Phani.

    hi,
    to check the idoc status ie idoc created or changed --use transaction WE05
    we02 to diplay idoc
    please rewrd points if helpful,
    shylaja

  • BOM Selection Mandatory while creation of Production Order

    Hello Friends,
    I would like to know that is there any option other than production version which makes it mandatory to have valid BOM must for creation of Production order / coversion of planned order to Production order.
    I have tried with Production version option but it doesnt throw any error in case BOM with inactive status has been selected in it & also Production order gets created & released.
    Before going for user exit / enhancement option, I just wanted to ensure that it is not possible with standard SAP.
    Kindly share your views on the same.
    Your urgent replies will be highly appreciated.
    Regards,
    Tejas

    Hello Tejas,
    I think this is standard SAP Behaviour.
    Try with following exits:
    PPCO0018
    PPCO0012
    Also check out the following link:
    [How To Make BOM Mandatory while creating Production Order;
    Regards,
    Vinod

  • How to attempt production orders and get feedback by using IDocs

    Hi,
    I'm new new to SAP and R3 respectively mySAP. I need to know how to use IDocs (over file system) to attempt production orders to an extern application and how to get the feedback of the whole orders and single operations.
    I found the IDoc-base-type "PPCC2RECORDER01" to send production orders. Is that the right base type for production orders?
    (In consideration of compatibility and support me was recommend to avoid the old types OPERA2 and CONF21.)
    What IDoc-types do I need to get feedback about a production order and its operations?
    I hope someone is understanding my questions is able to help me. Please apologize my broken English.
    Thanks!
    Hannes

    PROGRAM....... ZRCCLORDPROC
    TITLE......... Production Odrer Idocs
    AUTHOR........ Aveek Ghose
    DATE WRITTEN.. 15/09/2006
    R/3 RELEASE... 4.6C
    =====================================================================*
    COPIED FROM... N/A
    DESCRIPTION...
    *& Creation of production order IDOCs to a given selection
    *& This program selects to an input given via the selection screen the *
    *& corresponding production orders from the database. Then the function
    *& module for creation of planned order idocs is called.               *
    *& In general this report is called from the report RCCLTRAN, but it   *
    *& can also be used for its own.                                       *
    =====================================================================*
    PROGRAM TYPE.. Outbound Interface
    DEV. CLASS.... ZPD1
    LOGICAL DB.... N/A
    =====================================================================*
    SCREENS....... N/A
    GUI TITLE..... N/A
    GUI STATUS.... N/A
    TRANSACTIONS.. N/A
    USER EXITS.... N/A
    =====================================================================*
    CHANGE HISTORY                                                       *
    Date       By        Correction Number & Brief Description     Release
    Tables / Structures
    REPORT  zrcclordproc
            NO STANDARD PAGE HEADING
            MESSAGE-ID ZCUST
            LINE-COUNT 65(0)
            LINE-SIZE 255.
    INCLUDE RCORDO01.                    " PBO-Modules                   *
    INCLUDE RCORDI01.                    " PAI-Modules                   *
    INCLUDE RCORDF01.                    " FORM-Routines                 *
    --> Global data
    TYPE-POOLS: cloi.
    include zprodata.        "Types / constants for Orderselection
    include zrcordtop.                      "Tables / Data for this report
    include zrcordtop1.
    include yrccl_constants.
    TABLES : jcds,
             tvarv,
             zzzz_xref_data.
    TYPES:  BEGIN OF ty_date,
              aufnr  TYPE aufnr,
              aedat  TYPE aufaedat,
              aezeit TYPE co_chg_time,
              erdat  TYPE auferfdat,
              erfzeit TYPE co_ins_time,
              loekz  TYPE aufloekz,
              indicator(1) TYPE c,
           END OF ty_date.
    DATA: is_enhancement type isu_ord_segments_determine.
    DATA: itab_date TYPE STANDARD TABLE OF ty_date
                         INITIAL SIZE 0 WITH HEADER LINE.
    DATA: f_objnr TYPE j_objnr.
    DATA: g_report_sub_head(72) TYPE c,          "Sub-Header hold area
          g_report_head(72)     TYPE c,          "Header hold area
          g_run_date(72)        TYPE c,          "Holds message for Run date
          g_run_time(72)        TYPE c.          "Holds message for Run time
    DATA:
    f_old_date TYPE datum,
    f_old_time TYPE uzeit,
    f_continue(1) TYPE c.
    END OF INSERTION DS001
    --> Überschrift für sonstige Einstellungen
    SELECTION-SCREEN SKIP 2.
    SELECTION-SCREEN BEGIN OF BLOCK miscellaneous WITH FRAME.
    SELECTION-SCREEN SKIP 1.
    SELECTION-SCREEN COMMENT 1(30) text-001. "#EC
    SELECTION-SCREEN SKIP 1.
    *>> Logical system comes from Report RCCLTRANS
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 3(30) text-002.
    SELECTION-SCREEN POSITION 35.
    PARAMETERS opt_sys LIKE tbdlst-logsys.
    SELECTION-SCREEN END OF LINE.
    *>> Messagetype comes from Report RCCLTRANS
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 3(30) text-003.
    SELECTION-SCREEN POSITION 35.
    PARAMETERS mestyp LIKE tbdme-mestyp.
    SELECTION-SCREEN END OF LINE.
    *>> Messagetype comes from Report RCCLTRANS
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 3(30) text-004.
    SELECTION-SCREEN POSITION 35.
    PARAMETERS:     p_date     TYPE sydatum.       "last run date
    SELECTION-SCREEN END OF LINE.
    *>> Messagetype comes from Report RCCLTRANS
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 3(30) text-005.
    SELECTION-SCREEN POSITION 35.
    PARAMETERS:     p_time     TYPE syuzeit.       "last run time
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK MISCELLANEOUS.
    *MOD-006
    *>> Messagetype comes from Report RCCLTRANS
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 3(30) text-006.
    SELECTION-SCREEN POSITION 35.
    PARAMETERS: p_update   AS   CHECKBOX DEFAULT space.
    SELECTION-SCREEN END OF LINE.
    *MOD-006
    *MOD-006
    *>> Messagetype comes from Report RCCLTRANS
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 3(30) text-007.
    SELECTION-SCREEN POSITION 32.
    SELECT-OPTIONS: s_rundt FOR sy-datum NO-EXTENSION.
    SELECTION-SCREEN END OF LINE.
    *MOD-006
    *MOD-006
    *>> Messagetype comes from Report RCCLTRANS
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 3(30) text-008.
    SELECTION-SCREEN POSITION 32.
    SELECT-OPTIONS: s_runtm FOR sy-uzeit NO-EXTENSION.
    SELECTION-SCREEN END OF LINE.
    *MOD-006
    **MOD-006
    *SELECTION-SCREEN BEGIN OF LINE.
    *SELECTION-SCREEN COMMENT 3(30) text-009.
    *SELECTION-SCREEN POSITION 32.
    *SELECT-OPTIONS: s_emat FOR zzzz_xref_data-z_in_value.
    *SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN END OF BLOCK miscellaneous.
    **MOD-006
    Write selected AUFPL numbers via ranges table to memory ?
    PARAMETERS:
      ordtomem TYPE cloi_x DEFAULT '' NO-DISPLAY.  "X: yes
    do not select from MARC, but use ranges tables directly.   MK 4.0C
    matnr_gl and werks_gl must have the same length.
    PARAMETERS: no_sel  TYPE c DEFAULT ' ' NO-DISPLAY.
    --> Normal selection parameters for ORD comes from the logical db
    *&   Event START-OF-SELECTION
    START-OF-SELECTION.
    --> Select the ORD according to the selected
        MRP controller, Material, work center and plant
    *MOD-006
    Validate the last run date & Time
    PERFORM validate_last_run_date_time.
    *MOD-006
    BEGIN OF INSERTION DS001
    get the entry of the last program run
    select single * for update from ycloidownlprot
                     where logsys = OPT_SYS and
                           downloadtype eq C_DOWNL_PROCESS_ORDERS.
    if YCLOIDOWNLPROT-IN_PROGRESS eq CLOI_TRUE.
    program is already running, do not allow to start again
       write : / text-004, YCLOIDOWNLPROT-USERNAME.
       exit.
    endif.
    YCLOIDOWNLPROT-MANDT        = SY-MANDT.
    YCLOIDOWNLPROT-LOGSYS       = OPT_SYS.
    YCLOIDOWNLPROT-START_DATE   = SY-DATUM.
    YCLOIDOWNLPROT-START_TIME   = SY-UZEIT.
    YCLOIDOWNLPROT-USERNAME     = SY-UNAME.
    YCLOIDOWNLPROT-DOWNLOADTYPE = C_DOWNL_PROCESS_ORDERS.
    YCLOIDOWNLPROT-IN_PROGRESS  = CLOI_TRUE.
    insert or update entry (dependant if entry already exists)
    MODIFY YCLOIDOWNLPROT.
    COMMIT WORK.
    CLEAR CREATED_MASTERIDOCS_PRO.
    EXPORT CREATED_MASTERIDOCS_PRO TO MEMORY ID 'YLOI001'.
    END OF INSERTION DS001
    BEGIN OF INSERTION DS001
    if not sscrfields-ucomm = 'ONLI'.   mk zu 4.0
      exit.
    endif.
    if s_dispo is initial and
        s_matnr is initial and
        s_arbpl is initial and
        s_werks is initial.
       exit.
    endif.
    Send only orders with type 40 - process orders
    p_autyp = '40'.
    END OF INSERTION DS001
    *>> Put the ranges tabs back into matwrk list if no selection (NO_SEL)
      IF no_sel = cloi_true.
        CLEAR t_matwrk_key. REFRESH t_matwrk_key.
        LOOP AT s_matnr.
          t_matwrk_key-matnr = s_matnr-low.
          READ TABLE s_werks  INDEX sy-tabix.
          t_matwrk_key-werks  = s_werks-low.
          APPEND t_matwrk_key.
        ENDLOOP.
        SORT t_matwrk_key BY matnr werks.
        DELETE ADJACENT DUPLICATES FROM t_matwrk_key.
    delete duplicate duplicates from ranges table. Therfore sort by LOW
    (HIGH is not used in this case).
        SORT s_matnr BY low.
        DELETE ADJACENT DUPLICATES FROM s_matnr.
        SORT s_werks BY low.
        DELETE ADJACENT DUPLICATES FROM s_werks.
      ENDIF.
    --> Determine which segments are selected in the message type
      PERFORM ord_segments_determine
        USING mestyp
        CHANGING afpo_x
                 jstk_x
                 afab_x
                 affl_x
                 afvo_x
                 kbed_x
                 jstv_x
                 resb_x
                 kbeu_x
                 afuv_x
                 is_enhancement
                 jstu_x.
    Export the flags to the memory, because the following subroutine
    must not have any parameters !!!
      EXPORT affl_x
             afvo_x
             kbed_x
             resb_x
             kbeu_x
             afuv_x
             TO MEMORY ID 'LOI03'.
    MK 19980326 enhanced selections on header/operation level
    get selection profile for log system from customizing if available
      SELECT SINGLE * FROM tcloi9 WHERE logsys = opt_sys.
    if entry exists for the logical system
      IF sy-subrc = 0.
    if an selection profile for the order is entered, use it for selection
        IF NOT tcloi9-ord_selid IS INITIAL.
          p_selid = tcloi9-ord_selid.
        ENDIF.
        IF NOT tcloi9-ord_opr_selid IS INITIAL AND
           NOT afvo_x IS INITIAL AND NOT affl_x IS INITIAL.
          ord_opr_selid = tcloi9-ord_opr_selid.
        ENDIF.
      ENDIF.
    initialize control key table for selections
      CALL FUNCTION 'CLOI_STEUS_GET'
           EXPORTING
                logsys_to_init         = opt_sys
           IMPORTING
                no_entry_for_logsys    = no_entry_for_logsys
           TABLES
                t_steus                = t_steus
           EXCEPTIONS
                logsys_not_initialized = 1
                OTHERS                 = 2.
    Write structure information into the memory
    perform fill_memory_selobj.
    -> import table with already sent orders
      IMPORT gt_aufnrdone FROM MEMORY ID 'LOIAUFNRTAB'.         "N599845
      SORT gt_aufnrdone BY low.                                 "N599845
    --> Read header information
    GET ioheader.
      Check if material/plant combination is selected MK 4.0C
      CLEAR check_flg.
      IF no_sel = cloi_true.
        READ TABLE t_matwrk_key
                   WITH  KEY matnr = ioheader-matnr
                             werks = ioheader-werks BINARY SEARCH.
        IF sy-subrc  <> 0.
          check_flg = cloi_true.
        ENDIF.
      ENDIF.
    -> check if order was already sent
      IF NOT gt_aufnrdone[] IS INITIAL.                         "N599845
        READ TABLE gt_aufnrdone WITH KEY                        "N599845
          low = ioheader-aufnr                                  "N599845
          TRANSPORTING NO FIELDS                                "N599845
          BINARY SEARCH.                                        "N599845
        IF sy-subrc = 0.                                        "N599845
        -> order already sent
          check_flg = cloi_true.                                "N599845
        ENDIF.                                                  "N599845
      ENDIF.                                                    "N599845
    leave GET routine if check_flg is set.
      CHECK check_flg IS INITIAL.
      CLEAR t_afpo. REFRESH t_afpo.
      CLEAR t_affl. REFRESH t_affl.
      MOVE-CORRESPONDING ioheader TO t_afko.
    GET ioheader LATE.
    BEGIN OF INSERTION DS001
    Check whether the process order has been changed since the last
    run of the program
    clear f_continue.
    if the CHANGED date is greater than the last run or initial
    IF IOHEADER-AEDAT  GT F_OLD_DATE OR
           ( ioheader-aedat  is initial and
             ioheader-aezeit is initial ).
    if the CHANGED date is initial check the creation date
       if ioheader-aedat is initial.
    if the creation date is greater than or equal to the date of the last
    run, if it is equal the creation time must be later or equal to the
    start time of the last run
         IF IOHEADER-ERDAT GT F_OLD_DATE OR
            ( IOHEADER-ERDAT EQ F_OLD_DATE AND
              IOHEADER-ERFZEIT GE F_OLD_TIME ).
           f_continue = 'X'.
         endif.
       else.
         f_continue = 'X'.
       endif.
    if the CHANGED dat is not initial check it against the last run
    ELSEIF IOHEADER-AEDAT  EQ F_OLD_DATE AND
            IOHEADER-AEZEIT GE F_OLD_TIME.
       f_continue ='X'.
    endif.
    Aenderung 295/99  Selektions-Aenderung vom 26. August 99
    Wenn Auftrag bereits techn. abgeschlossen ist, so darf kein IDOC
    erzeugt werden, wenn Auftrag zum löschen vorgemerkt wird.
    CONCATENATE 'OR' IOHEADER-AUFNR INTO F_OBJNR.
    SELECT SINGLE * FROM JEST
                     WHERE OBJNR = F_OBJNR
                     AND   STAT  = 'I0045'.
    IF JEST-INACT EQ SPACE AND SY-SUBRC EQ 0.
       SELECT * FROM JCDS WHERE OBJNR EQ F_OBJNR AND
                                STAT  EQ 'I0045' AND
                                INACT EQ SPACE.
    letzte Aenderung des Status TABG wird geprueft    Beg. WA 354/99
       ENDSELECT.
      IF ( F_OLD_DATE GT JCDS-UDATE OR                         " Beg JB_02
          ( F_OLD_DATE EQ JCDS-UDATE AND
           F_OLD_TIME GT JCDS-UTIME ) ) AND                    " End JB_02
          SY-SUBRC EQ 0.
         CLEAR F_CONTINUE.
       ENDIF.
    ENDIF.
    Ende 295/99
    check f_continue eq 'X'.
    END OF INSERTION DS001
      t_afko-t_afpo = t_afpo[].
      t_afko-t_jstk = t_jstk[].
      t_afko-t_affl = t_affl[].
      t_afko-t_afab = t_afab[].
      APPEND t_afko.
      IF jstk_x = cloi_x.
        t_objnr-objnr = ioheader-objnr.
        APPEND t_objnr.
      ENDIF.
    *---> Remember the orders that are already selected for the global
        selection parameters
      IF ordtomem = cloi_x.                "write order numbers to memory
        t_aufnr_range_done-sign = 'I'.
        t_aufnr_range_done-option = 'NE'.
        t_aufnr_range_done-low = ioheader-aufpl.
        APPEND t_aufnr_range_done.
      ENDIF.
    *---> Remember the orders internal/external keys for AFAB (relationship)
      IF afab_x = cloi_x.
        MOVE-CORRESPONDING ioheader TO t_aufpl_aufnr.
        APPEND t_aufpl_aufnr.
      ENDIF.
    check afpo_x = cloi_x.
    GET ioitem.
    BEGIN OF INSERTION DS001
    Check whether the process order has been changed since the last
    run of the program
    CLEAR F_CONTINUE.
    if the CHANGED date is greater than the last run or initial
    IF IOHEADER-AEDAT  GT F_OLD_DATE OR
           ( ioheader-aedat  is initial and
             ioheader-aezeit is initial ).
    if the CHANGED date is initial check the creation date
       if ioheader-aedat is initial.
    if the creation date is greater than or equal to the date of the last
    run, if it is equal the creation time must be later or equal to the
    start time of the last run
         IF IOHEADER-ERDAT GT F_OLD_DATE OR
            ( IOHEADER-ERDAT EQ F_OLD_DATE AND
              IOHEADER-ERFZEIT GE F_OLD_TIME ).
           f_continue = 'X'.
         endif.
       else.
         f_continue = 'X'.
       endif.
    if the CHANGED date is not initial check it against the last run
    ELSEIF IOHEADER-AEDAT  EQ F_OLD_DATE AND
            IOHEADER-AEZEIT GE F_OLD_TIME.
       f_continue ='X'.
    endif.
    Aenderung 295/99  Selektions-Aenderung vom 26. August 99
    Wenn Auftrag bereits techn. abgeschlossen ist, so darf kein IDOC
    erzeugt werden, wenn Auftrag zum löschen vorgemerkt wird.
    CONCATENATE 'OR' IOHEADER-AUFNR INTO F_OBJNR.
    SELECT SINGLE * FROM JEST
                     WHERE OBJNR = F_OBJNR
                     AND   STAT  = 'I0045'.
    IF JEST-INACT EQ SPACE AND SY-SUBRC EQ 0.
       SELECT * FROM JCDS WHERE OBJNR EQ F_OBJNR AND
                                STAT  EQ 'I0045' AND
                                INACT EQ SPACE.
    letzte Aenderung des Status TABG wird geprueft
       ENDSELECT.
      IF ( F_OLD_DATE GT JCDS-UDATE OR                         " Beg JB_02
          ( F_OLD_DATE EQ JCDS-UDATE AND
           F_OLD_TIME GT JCDS-UTIME ) ) AND                    " End JB_02
          SY-SUBRC EQ 0.
         CLEAR F_CONTINUE.
       ENDIF.
    ENDIF.
    Ende 295/99
    check f_continue eq 'X'.
    END OF INSERTION DS001
      IF afpo_x = cloi_x.
        MOVE-CORRESPONDING ioitem TO t_afpo.
        APPEND t_afpo.
      ENDIF.
    Put matnr and ltrmi in a help structure, which later goes to t_afpo
      IF ioitem-posnr = '0001'.
        MOVE-CORRESPONDING ioitem TO help_afpo.
        APPEND help_afpo.
    put PSP element (internal key) into order header. Unique for positions
        IF t_afko-pspel IS INITIAL.
          t_afko-pspel = ioitem-projn.
        ENDIF.
      ENDIF.
      CHECK affl_x = cloi_x.
    GET iosequen.
      CLEAR t_afvo. REFRESH t_afvo.
      MOVE-CORRESPONDING iosequen TO t_affl.
    GET iosequen LATE.
      t_affl-t_afvo = t_afvo[].
      APPEND t_affl.
      CHECK afvo_x = cloi_x.
    GET iooper.
      CLEAR t_kbed. REFRESH t_kbed.
      CLEAR t_afuv. REFRESH t_afuv.
      CLEAR t_resb. REFRESH t_resb.
      MOVE-CORRESPONDING iooper TO t_afvo.
      "Temporary storing of operation information if for a phase
      "the corresponding operation has is needed
      MOVE-CORRESPONDING iooper TO t_aufpl_aplzl_vornr.
      APPEND t_aufpl_aplzl_vornr.
    check, if selection profile (if exists) for the operation is ok
      IF NOT ord_opr_selid IS INITIAL.
        CALL FUNCTION 'STATUS_CHECK_BY_SELSCHEM'
             EXPORTING
                  objnr          = iooper-objnr
                  selid          = ord_opr_selid
             IMPORTING
                  fullfill       = status_ok
             EXCEPTIONS
                  no_stat_tab    = 1
                  no_stat_scheme = 2
                  OTHERS         = 3.
        IF sy-subrc <> 0.
          status_ok = cloi_x.
        ENDIF.
      ELSE.
        status_ok = cloi_x.
      ENDIF.
    check if control key (STEUS) should not be selected.
      control_key_ok = cloi_x.
      IF no_entry_for_logsys IS INITIAL.
        READ TABLE t_steus WITH KEY
             steus = iooper-steus BINARY SEARCH.
        IF sy-subrc <> 0.
          CLEAR control_key_ok.
        ENDIF.
      ENDIF.
      CHECK NOT status_ok IS INITIAL.
      CHECK NOT control_key_ok IS INITIAL.
    GET iooper LATE.
      t_afvo-t_kbed = t_kbed[].
      t_afvo-t_afuv = t_afuv[].
      t_afvo-t_resb = t_resb[].
      APPEND t_afvo.
      IF jstv_x = cloi_x.
        t_objnr-objnr = iooper-objnr.
        APPEND t_objnr.
      ENDIF.
      CHECK kbed_x = cloi_x.
    GET ioopcap.
      MOVE-CORRESPONDING ioopcap TO t_kbed.
      APPEND t_kbed.
      CHECK resb_x = cloi_x.
    GET ioopcomp.
    do not transfer RESB entries with deletion flag
      CHECK ioopcomp-xloek IS INITIAL.
      MOVE-CORRESPONDING ioopcomp TO t_resb.
      APPEND t_resb.
      CHECK afuv_x = cloi_x.
    GET iosoper.
      CLEAR t_kbeu. REFRESH t_kbeu.
      MOVE-CORRESPONDING iosoper TO t_afuv.
    check if control key (STEUS) should not be selected.
      control_key_ok = cloi_x.
      IF no_entry_for_logsys IS INITIAL.
        READ TABLE t_steus WITH KEY
             steus = iooper-steus BINARY SEARCH.
        IF sy-subrc <> 0.
          CLEAR control_key_ok.
        ENDIF.
      ENDIF.
      CHECK NOT control_key_ok IS INITIAL.
    GET iosoper LATE.
      t_afuv-t_kbeu = t_kbeu[].
      APPEND t_afuv.
      IF jstv_x = cloi_x.
        t_objnr-objnr = iosoper-objnr.
        APPEND t_objnr.
      ENDIF.
      CHECK kbeu_x = cloi_x.
    GET iosocap.
      MOVE-CORRESPONDING iosocap TO t_kbeu.
      APPEND t_kbeu.
    *&   Event END-OF-SELECTION
    END-OF-SELECTION.
    *MOD-006
      DATA: itab_matnr TYPE zzzz_xref_data OCCURS 0.
      DATA: l_wa_matnr TYPE zzzz_xref_data.
      DATA: l_wa_matnr_value TYPE zzzz_xref_data-z_in_value.
      DATA: l_wa_afko TYPE  cloi_afko_struct.
    SELECT *
      FROM zzzz_xref_data
    APPENDING TABLE itab_matnr
    WHERE trans_id = 'ZELCUSMATLOOKUP' AND
           ( z_in_value IN s_matnr OR
             z_out_value IN s_matnr ).
    IF sy-subrc = 0.
         LOOP AT ITAB_MATNR INTO L_WA_MATNR.
           L_WA_MATNR_VALUE = L_WA_MATNR-z_OUT_VALUE.
           S_MATNR-LOW = L_WA_MATNR_VALUE.
           S_MATNR-SIGN = 'I'.
           S_MATNR-OPTION = 'EQ'.
           APPEND S_MATNR.
         ENDLOOP.
       DELETE itab_matnr WHERE NOT in_value IN s_emat.
       SORT itab_matnr BY out_value.
    ENDIF.
    CLEAR: l_wa_matnr.
    **MOD-010
    Data which is not in the material lookup table but in the T_AFKO.
      LOOP AT t_afko INTO l_wa_afko.
       READ TABLE S_MATNR WITH KEY LOW = L_WA_AFKO-MATNR BINARY SEARCH.
        READ TABLE itab_matnr INTO l_wa_matnr
            WITH KEY z_out_value = l_wa_afko-matnr BINARY SEARCH.
        IF sy-subrc NE 0.
          l_wa_afko-rgekz = 'X'.
          MODIFY t_afko FROM l_wa_afko  TRANSPORTING rgekz.
        ENDIF.
       IF NOT P_DATE IS INITIAL.
         IF T_AFKO-GSTRP < p_date OR
                 ( T_AFKO-GSTRP = p_date AND
                   T_AFKO-GSUZP > p_time ).
           L_WA_AFKO-RGEKZ = 'X'.
           MODIFY T_AFKO FROM L_WA_AFKO  TRANSPORTING RGEKZ.
         ENDIF.
       ENDIF.
      ENDLOOP.
    Delete  Data which is not in the material lookup
    table but in the T_AFKO.
    DELETE t_afko WHERE rgekz = 'X'.
    *MOD-010
    *MOD-006
    BEGIN OF INSERTION DS001
      DATA: l_wa_itab_date TYPE ty_date.
    Check whether the process order has been changed since the last
    run of the program
      CLEAR f_continue.
      IF NOT t_afko IS INITIAL.
        SELECT aufnr aedat aezeit erdat erfzeit loekz
        INTO TABLE itab_date
        FROM aufk
        FOR ALL ENTRIES IN t_afko
        WHERE aufnr = t_afko-aufnr.
        IF sy-subrc = 0.
          IF NOT p_date IS INITIAL.
            CLEAR: itab_date.
    Check whether the process order has been changed since the last
    run of the program
            LOOP AT itab_date INTO l_wa_itab_date.
    if the CHANGED date is greater than the last run or initial
              IF l_wa_itab_date-aedat GT p_date OR
                    ( l_wa_itab_date-aedat  IS INITIAL AND
                      l_wa_itab_date-aezeit IS INITIAL ).
    if the CHANGED date is initial check the creation date
                IF l_wa_itab_date-aedat IS INITIAL.
    if the creation date is greater than or equal to the date of the last
    run, if it is equal the creation time must be later or equal to the
    start time of the last run
                  IF l_wa_itab_date-erdat GT p_date OR
                     ( l_wa_itab_date-erdat EQ p_date AND
                       l_wa_itab_date-erfzeit GE p_time ).
                    f_continue = 'X'.
                  ELSE.
                    l_wa_itab_date-indicator = 'X'.
                MODIFY itab_date FROM l_wa_itab_date TRANSPORTING indicator.
                  ENDIF.
                ELSE.
                  f_continue = 'X'.
                ENDIF.
    if the CHANGED dat is not initial check it against the last run
              ELSEIF l_wa_itab_date-aedat  EQ p_date AND
                     l_wa_itab_date-aezeit GE p_time.
                f_continue ='X'.
              ELSE.
                l_wa_itab_date-indicator = 'X'.
                MODIFY itab_date FROM l_wa_itab_date TRANSPORTING indicator.
              ENDIF.
            ENDLOOP.
    *MOD-006
      ELSE.
         CLEAR: ITAB_DATE.
         LOOP AT ITAB_DATE INTO L_WA_ITAB_DATE.
    if the CHANGED date is greater than the last run or initial
           IF L_WA_ITAB_DATE-AEDAT GT P_RUNDT OR
                 ( L_WA_ITAB_DATE-aedat  is initial and
                   L_WA_ITAB_DATE-aezeit is initial ).
    if the CHANGED date is initial check the creation date
             if l_wa_itab_date-aedat is initial.
    if the creation date is greater than or equal to the date of the last
    run, if it is equal the creation time must be later or equal to the
    start time of the last run
               IF L_WA_ITAB_DATE-ERDAT GT P_RUNDT OR
                  ( L_WA_ITAB_DATE-ERDAT EQ P_RUNDT AND
                    L_WA_ITAB_DATE-ERFZEIT GE S_RUNTM-LOW OR
                    L_WA_ITAB_DATE-ERFZEIT LE S_RUNTM-HIGH ).
                 f_continue = 'X'.
               else.
                 l_wa_itab_date-indicator = 'X'.
                 MODIFY ITAB_DATE FROM L_WA_ITAB_DATE
                                   TRANSPORTING INDICATOR.
               endif.
             else.
               f_continue = 'X'.
             endif.
    if the CHANGED dat is not initial check it against the last run
           ELSEIF L_WA_ITAB_DATE-AEDAT  EQ P_RUNDT AND
                  L_WA_ITAB_DATE-AEZEIT GE S_RUNTM-LOW.
             f_continue ='X'.
           ELSE.
             l_wa_itab_date-indicator = 'X'.
             MODIFY ITAB_DATE FROM L_WA_ITAB_DATE
                                TRANSPORTING INDICATOR.
           endif.
         ENDLOOP.
    *MOD-006
          ENDIF.
        ENDIF.
      ENDIF.
    DELETE ITAB_DATE WHERE INDICATOR = 'X'.
    *MOD-006
      CLEAR: itab_date.
      IF s_rundt-high IS INITIAL AND NOT s_rundt IS INITIAL.
        s_rundt-high = sy-datum.
      ENDIF.
      LOOP AT itab_date INTO l_wa_itab_date.
        IF NOT s_rundt IS INITIAL.
    if the CHANGED date is greater than the last run or initial
          IF    ( l_wa_itab_date-aedat  IS INITIAL AND
                  l_wa_itab_date-aezeit IS INITIAL ).
    if the CHANGED date is initial check the creation date
            IF l_wa_itab_date-aedat IS INITIAL.
    if the creation date is greater than or equal to the date of the last
    run, if it is equal the creation time must be later or equal to the
    start time of the last run
              IF ( l_wa_itab_date-erdat GT s_rundt-low AND
                 l_wa_itab_date-erfzeit GT s_runtm-low ) AND
                 ( l_wa_itab_date-erdat LT s_rundt-high AND
                 l_wa_itab_date-erfzeit LT s_runtm-high ).
                f_continue = 'X'.
              ELSE.
                l_wa_itab_date-indicator = 'X'.
                MODIFY itab_date FROM l_wa_itab_date
                                  TRANSPORTING indicator.
              ENDIF.
            ELSE.
              f_continue = 'X'.
            ENDIF.
    if the CHANGED dat is not initial check it against the last run
          ELSEIF ( l_wa_itab_date-aedat  GE s_rundt-low AND
                  l_wa_itab_date-aezeit  GE s_runtm-low ) AND
                 ( l_wa_itab_date-aedat  LE s_rundt-high AND
                 l_wa_itab_date-aezeit LE s_runtm-high ).
            f_continue ='X'.
          ELSE.
            l_wa_itab_date-indicator = 'X'.
            MODIFY itab_date FROM l_wa_itab_date
                               TRANSPORTING indicator.
          ENDIF.
        ENDIF.
      ENDLOOP.
    DELETE itab_date WHERE indicator = 'X'.
    *MOD-006
    **MOD-006
    LOOP AT t_afko INTO l_wa_afko.
       READ TABLE itab_date INTO l_wa_itab_date
                WITH KEY aufnr = l_wa_afko-aufnr BINARY SEARCH.
       IF sy-subrc NE 0.
         l_wa_afko-rgekz = 'X'.
         MODIFY t_afko FROM l_wa_afko  TRANSPORTING rgekz.
       ENDIF.
    ENDLOOP.
    DELETE t_afko WHERE rgekz = 'X'.
    **MOD-006
    -> initialize logical data base to reduce memory consumption
      PERFORM ldb_process_init(sapdbioc)
        CHANGING
          lv_subrc.
    --> add information to the order structure that is not
        selected via logical database:
        - if AFVO-entry is a phase (phflg) --> fill field for
          corresponding operation number (PVZNR)
          The internal node number (aplzl) of the corresponding operation
          is in field PVZKN of the phase
        - relationship information: E1AFABL
          especially: select external numbers for the used
          internal numbers in the table AFAB
        - status information of the order header: E1JSTKL
        - status information of the operation: E1JSTVL
    --> Put matnr and ltrmi in the table t_afko
      SORT t_afko BY aufnr.
      LOOP AT help_afpo.
        READ TABLE t_afko WITH KEY aufnr = help_afpo-aufnr
          ASSIGNING -gltri = help_afpo-ltrmi.
        ENDIF.
      ENDLOOP.
    --> Select entries for order and operation status
      IF NOT t_objnr[] IS INITIAL.
        SELECT objnr stat FROM jest INTO TABLE t_jest2
          FOR ALL ENTRIES IN t_objnr
          WHERE objnr = t_objnr-objnr
          AND   inact <> 'X'.
      ENDIF.
    --> Select entries for relationships from afab for all orders
        into table t_afab_tmp
      SORT t_aufpl_aplzl_vornr BY aufpl aplzl.
      IF afab_x = cloi_x AND NOT t_aufpl_aufnr[] IS INITIAL.
      -> select afab data
        SELECT * FROM afab INTO TABLE t_afab_tmp
          FOR ALL ENTRIES IN t_aufpl_aufnr
          WHERE aufpl_vor = t_aufpl_aufnr-aufpl.
        SELECT * FROM afab APPENDING TABLE t_afab_tmp
          FOR ALL ENTRIES IN t_aufpl_aufnr
          WHERE aufpl_nch = t_aufpl_aufnr-aufpl.
        SORT t_afab_tmp
          BY aufpl_vor aplzl_vor aufpl_nch aplzl_nch aobar mimax.
        DELETE ADJACENT DUPLICATES FROM t_afab_tmp
          COMPARING aufpl_vor aplzl_vor aufpl_nch aplzl_nch aobar mimax.
      -> read external order numbers out of data base
        CLEAR t_aufpl. REFRESH t_aufpl.
        LOOP AT t_afab_tmp ASSIGNING -aufpl_nch.
          COLLECT t_aufpl.
        ENDLOOP.
        CLEAR t_aufpl_aufnr. REFRESH t_aufpl_aufnr.
        IF NOT t_aufpl[] IS INITIAL.
          SELECT aufpl aufnr FROM afko INTO TABLE t_aufpl_aufnr
            FOR ALL ENTRIES IN t_aufpl
            WHERE aufpl = t_aufpl-aufpl.
          SORT t_aufpl_aufnr BY aufpl.
        ENDIF.
      -> add order numbers to afab data
        LOOP AT t_afab_tmp ASSIGNING -aufnr_nch = t_aufpl_aufnr-aufnr.
          ENDIF.
        ENDLOOP.
      -> read operation numbers out of data base
        CLEAR t_aufpl_aplzl. REFRESH t_aufpl_aplzl.
        LOOP AT t_afab_tmp ASSIGNING -aplzl_nch.
          COLLECT t_aufpl_aplzl.
        ENDLOOP.
        IF NOT t_aufpl_aplzl[] IS INITIAL.
          SELECT aufpl aplzl vornr FROM afvc
            APPENDING TABLE t_aufpl_aplzl_vornr
            FOR ALL ENTRIES IN t_aufpl_aplzl
            WHERE aufpl = t_aufpl_aplzl-aufpl
              AND aplzl = t_aufpl_aplzl-aplzl.
          SORT t_aufpl_aplzl_vornr BY aufpl aplzl.
        ENDIF.
      -> add operation numbers to afab data
        LOOP AT t_afab_tmp ASSIGNING -vornr_nch = t_aufpl_aplzl_vornr-vornr.
          ENDIF.
        ENDLOOP.
      ENDIF.                               "afab_x
    --> fill AFAB (relationship information) and status information
      SORT t_aufpl_aufnr BY aufnr.
      LOOP AT t_afko ASSIGNING .
      -> fill order head status information
        IF jstk_x = cloi_x.
          CLEAR t_jstk. REFRESH t_jstk.
          LOOP AT t_jest2 INTO wa_tjest2 WHERE objnr = -t_jstk = t_jstk[].
        ENDIF.
      -> fill afab information
        IF afab_x = cloi_x.
          CLEAR t_aufpl_aufnr.
          READ TABLE t_aufpl_aufnr WITH KEY
            aufnr = -t_afab = t_afab[].
        ENDIF.
      -> fill operation and suboperation status information
        IF jstv_x = cloi_x OR afvo_x = cloi_x.
          LOOP AT .
            -> read status information of suboperation
              IF jstu_x = cloi_x.
                LOOP AT -t_jstu = t_jstu[].
                ENDLOOP.
              ENDIF.
            -> read status information of operation
              IF jstv_x = cloi_x.
                CLEAR t_jstv. REFRESH t_jstv.
                LOOP AT t_jest2 INTO wa_tjest2 WHERE objnr = -t_jstv = t_jstv[].
              ENDIF.
            -> Read operation for a phase
              IF NOT -pvznr = t_aufpl_aplzl_vornr-vornr.
                ENDIF.
              ENDIF.
            ENDLOOP.
          ENDLOOP.
        ENDIF.
      -> collect order numbers
        CLEAR wa_aufnrdone.
        wa_aufnrdone-low = -aufnr.
        APPEND wa_aufnrdone TO lt_aufnrdone.
      ENDLOOP.
    -> append collected order numbers to global table
      APPEND LINES OF lt_aufnrdone TO gt_aufnrdone.
      EXPORT gt_aufnrdone TO MEMORY ID 'LOIAUFNRTAB'.
    -> free large tables
      CLEAR t_jest2. REFRESH t_jest2.
      CLEAR t_afab_tmp. REFRESH t_afab_tmp.
      CLEAR t_aufpl. REFRESH t_aufpl.
      CLEAR t_aufpl_aufnr. REFRESH t_aufpl_aufnr.
      CLEAR t_aufpl_aplzl. REFRESH t_aufpl_aplzl.
      CLEAR t_aufpl_aplzl_vornr. REFRESH t_aufpl_aplzl_vornr.
    -> create idocs
      CALL FUNCTION 'CLOI_MASTERIDOC_CREATE_LOIPRO'
           EXPORTING
                opt_sys      = opt_sys
                message_type = mestyp
           TABLES
                order_data   = t_afko
           EXCEPTIONS
                OTHERS       = 1.
    -> export already selected order numbers via ranges tab to memory
      EXPORT t_aufnr_range_done TO MEMORY ID 'LOI002'.
    **MOD-006
    IMPORT created_masteridocs_pro FROM MEMORY ID 'YLOI001'.
    ycloidownlprot-end_date       = sy-datum.
    ycloidownlprot-end_time       = sy-uzeit.
    ycloidownlprot-idocs_selected = created_masteridocs_pro.
    ycloidownlprot-in_progress    = cloi_false.
    insert or update entry (dependant if entry already exists)
    MODIFY ycloidownlprot.
    COMMIT WORK.
    MESSAGE i967(z001) WITH created_masteridocs_pro.
    **MOD-006
    Update last run date and time
      IF p_update = 'X'.
        PERFORM update_last_run.
      ELSE.
      MESSAGE s000 WITH text-022.
        "Last Run Date and Last Run Time not updated
        LEAVE LIST-PROCESSING.
      ENDIF.
      INCLUDE rcordf01.
    *&      Form  validate_last_run_date_time
          text
    -->  p1        text
    <--  p2        text
    *FORM validate_last_run_date_time.
    IF p_date IS INITIAL OR
        p_time IS INITIAL.
       IF sy-batch IS INITIAL.
         MESSAGE s000 WITH text-017.
         "Last Run date & Last Run Time can not be blank
         LEAVE LIST-PROCESSING.
       ELSE.
         MESSAGE e000 WITH text-017.
         "Last Run date & Last Run Time can not be blank
       ENDIF.
    ENDIF.
    *ENDFORM.                    " validate_last_run_date_time
    *&      Form  update_last_run
          text
    -->  p1        text
    <--  p2        text
    FORM update_last_run.
      CONSTANTS:
            l_c_name    TYPE rvari_vnam  VALUE 'Z_PROC_DATE',
            l_c_name1   TYPE rvari_vnam  VALUE 'Z_PROC_TIME',
            l_c_type    TYPE rsscr_kind  VALUE 'P',
            l_c_numb    TYPE tvarv_numb  VALUE '0000'.
    Update last run date
      UPDATE tvarv SET low  = sy-datum
                 WHERE name = l_c_name AND
                       type = l_c_type AND
                       numb = l_c_numb.
      IF sy-subrc = 0.
        COMMIT WORK.
      ELSE.
        ROLLBACK WORK.
        g_run_date = text-015. "#EC
        "Updation of TVARV table failed for ZLAST_RUN_DATE. Update manually
      ENDIF.
    Update last run time
      UPDATE tvarv SET low  = sy-uzeit
                 WHERE name = l_c_name1 AND
                       type = l_c_type AND
                       numb = l_c_numb.
      IF sy-subrc = 0.
        COMMIT WORK.
      ELSE.
        ROLLBACK WORK.
        g_run_time = text-016. "#EC
        "Updation of TVARV table failed for ZLAST_RUN_TIME. Update manually
      ENDIF.
    ENDFORM.                    " update_last_run

  • Creation of Sales Order and Service Contract from Inbound IDOC

    Hi Experts,
    My requirement is to create a Sales Order as well as a Service Contract from one Inbound IDOC. I am getting the Inbound IDOC from a third Party. The message type is ORDERS and Basic Type is ORDERS02. How ever i am using an extension type IDOC which carries all the required data for Sales Order and Service Contract. My requirement is like, to create a Sales Order first.
    I have created a Z FM which is attached to the Process Code and subsequently to the message type. Inside the FM i an calling FM 'IDOC_INPUT_ORDERS' for creation of Sales Order. After that i am changing the IDOC data for the Document Type. I am changing the document type which is responsible for Contract Creation.
    Then I am again calling the FM 'IDOC_INPUT_ORDERS' for creation of Contract with the help of IDOC data. But here the Contract is not getting created. It's getting failed during the Batch input session.
    I need to solve this problem as soon as possible. Please help me. If there are any other options also please share.
    Thanks in Advance.
    Regards,
    Priyabrata

    Actually there is problem with BDCDATA. Inside the FM it's calling transaction with help of BDCDATA. If i am creating a Sales order or contract alone its creating successfully. But when i am trying to create both, it's retuning sy-subrc '1001' after calling the transaction on the second attempt. Is there any problem with BDCDATA like we can't handle with less time gap? Please help and give your inputs.
    Regards,
    Priyabrata

  • Reg:Bapi for mass creation of production order/confirmation

    Dear Experts,
    I wanted to know with the following BAPI is it possible to create Multiple production orders for different semifinshed Materials along with material availability check and other functions similar to CO01 transaction.
    I knew there are standard transactions for mass confirmation for production orders. But i need a confirmation on this BAPI . As i am planning to go-ahed with ,mass creation of production order creation / Order confirmation in single custom transaction.Need back flush activity even supported.
    BAPI_PRODORD_CREATE to create the orders.
    BAPI_PRODORD_RELEASE to release the orders.
    BAPI_PRODORDCONF_GET_TT_PROP to get the default data for the confirmation.
    BAPI_PRODORDCONF_CREATE_TT to ost the confirmation of production order.
    Along with this BAPI do i need to commit any other BAPI to carry out back flush for components.
    Need your suggestions to take it further.
    Regards,
    Daya.

    Dear SAP Daya
    If the issue has been solved, please close this thread.
    You have already mentioned that the issue has been resolved, thefore, you should not ask for help on another thread before closing this one, as it looks like you are trying to force people to answer your threads.
    Users are always trying to answer as many threads as possible on good will we don't need this kind of "incentive".
    Please read carefully the The SCN Rules of Engagement, especially point 8:
    Be responsive. If an SCN member has answered your question, please mark the answer as "helpful” or “correct”. Mark the discussion as “answered,” so that other members can find the answers more easily
    Also, I checked your old threads and I could observe that there is only one closed. Please review your old threads and close those already solved.
    BR
    Caetano

  • How do we Prevent Creation of Production Orders for Phantom materials.

    Dear Experts;
    We have some materials which are Phantoms.
    We have set "special procurement type" as 50 in MRP2 and "Strategy Group" as 59 in MRP3
    These are non stchable items, but have BOMS.
    We dont create orders for them, however at the mement the system allows order creation. How do we prevent creation of production orders for these items in the system.
    Thanks in Advance
    Richard.

    Dear Richard,
    Check using this BADI - WORKORDER_UPDATE using method IN_UPDATE or Release by including a check if MATNR and for
    WERKS combination if SOBSL = 50 from table MARC,then do not allow to save.
    Check whether this works or else you have to set a plant specific status using OMS4  for not allowing production order
    creation and assign this value in the material master of the phantom assemblies.
    Check and revert
    Regards
    Mangalraj.S

  • Evaluation Structure for Production Order and Repetitive Manufacturing

    Dear PP friends,
    I am trying to create a Evaluation Structure with reference to an Evaluation Structure (t-code MCR7). I need to join the Standard Evaluation Structures S021 (Production Order) and S026 (Material Usage), but S021 is not appearing to choose characteristics and key figures.
    Does anyone have suggestions?
    My requirement is to create a report where I can see goods receipt x goods issues per order.
    Thanks in advance.
    Marcos

    Hi,
             As we know that In Repetitive Manufacturing, components are often staged at the production line without reference to a particular order.
    To create the demand program again for your production order, you must define the planning strategy for a product. Planning strategies represent the methods of production for planning and manufacturing or procuring a product. and run the scenario accordingly.
    Regards
    Chandra

  • Purchase Requisition on creation of Production Order

    Dear Experts,
    Please clarify the following points
    1 In our Business Scenario on creation of Production Order for a Material, Purchase Requisition is being created on creation of Production Order itself for all Dependent Materials where the items are declared as Non Stock items in BOM  and for the stock items only on MRP run the Purchase Requisitions are created. Is this the standard procedure, or can we customize to create the PRs for all the items on creation of Production Orders??
    2 What exactly the processing indicator in MRP list indicate?
    Thank you,
    Regards,
    Ramakrishna

    For Non Stock items it is understandable, that a PR has to be created with production order creation , as they are not in the stock.
    For Stock items, the creation of PR cannot be linked with Production order creation but can be done with MRP run.
    We can make the system create planned orders or Purchase requisitions or PR in opening period during MRP.
    Processing indicator gives you the scope of PLanning.
    PLanning all the materials within the Planning horizon  --NETPL
    Plaqnning all the materials beyond also--NETCH
    Deleting the current plan and recreating the plan.-regenarative PLannng
    regards
    Ratan

  • Block Creation of Production order Unless released in Order.

    Hi Experts.
    we have a requirement where we want to block the creation of production order inless it is confirmed. Is there any User exit / or anyother indicator where i can define or configure so that the MRP run and also the Creation of the production order can be block for a sales order.
    Plz advice.
    Thanks in Advance
    Rishi

    Hi
    But Manually it does allow the user to create Production order .
    I want unless, Say the delivey block at item level is removed , User should not be allowed to create the production order for the relevant line item of the sales order.
    Any more suggestion
    Thanks
    Rishi

Maybe you are looking for

  • Error 507 - I can not Update de OS

    Hello! I have the error 507 in my device BB 8320. I have run the Java Loader to uninstall the OS because I had problems with my carrier. Now I tried to update the soft from the new DTM (6.0) but this one does not give me the option "Update device". W

  • Strange Hyperion Planning data form bug...

    Hi all, I'm having a very strange problem on a data form in Hyperion planning. When trying to input a number against a percentage type member, after pressing enter it sometimes displays as the number I put in - 0.00000000000000001 !! So, for example,

  • Missing oracle/xdb/XMLType

    Hi, I am developing simple java class to try xsu. I am using jdev 10.1.2.1. I have done java class to generate xml using OracleXMLQuery. It works fine. I have done java class to save data from xml using OracleXMLSave. It doesn't work! The code is sim

  • No thumbnails in Project panel

    I have thumbnails turned on but nothing appears in the project panel next to the name of the file or in the preview window.

  • Table cells invisible

    I want to set some cells of table view in invisible mode. Based on condition i have invisible radio buttons of the table rows. I am not rendering radio buttons column. I have used SingleSelection mode to display the radio buttons. How can I make invi