Screen Exit in Tcode COR1 - Create Process Order

Hi All,
Can anyone let me know if there is a screen exit or a BADI where in i can use it to extend the COR1 general data tab to include a field.
Even if i can add a additional tab in COR1 tcode through a BADI, will be good.
Please help.
Thanks,
Jaffer Ali.S

Hi,
STEP1:- Add Z-Fiels in Structure CAUFVD & Table: AUFK using (Goto --> Append Structure)
Step1. T-code: CMOD
STEP2: Enter project name: Zxxxxx  --> Create
STEP3: Enter Short text -- > Click Enhancement Assignment
STEP4: Enter Enhancement: PPCO0001 & PPCO0020
STEP5: Click on Components
STEP6.1: double click on Screen-Exit: SAPLCOKO (Screen no: 5900)
A) Add Z-fileds in SCreen layout with keyp of structure :CAUFVD
Screen FLOW LOGIC:-
Process before output.
PROCESS BEFORE OUTPUT.
Set the screen status
Screen modifications incase of Display
  MODULE screen_display.
Process after input.
PROCESS AFTER INPUT.
Screen fields and its processing.
  CHAIN.
    FIELD:  caufvd-z_cust1,
            caufvd-z_cust2,
            caufvd-z_cust3,
            caufvd-z_cust4,
            caufvd-z_cust5,
            caufvd-z_qty1,
            caufvd-z_qty2,
            caufvd-z_qty3,
            caufvd-z_qty4,
            caufvd-z_qty5.
    MODULE header_update.
  ENDCHAIN.
  FIELD: z_total.
  MODULE disp_data.
Update the header.
Not required as of now.
module screen_display output.
Disable input in case of display.
  if sy-tcode = 'COR3'.
    loop at screen.
         screen-input       = 0.
        modify screen.
    endloop.
  endif.
endmodule.                 " screen_display  OUTPUT
module header_update input.
  check not sy-tcode = 'COR3'.
  perform data_check using caufvd.
endmodule.                 " HEADER_UPDATE  INPUT
*Validate screen input fiels
form data_check using p_caufvd structure caufvd.
  data: l_v_count type i.
  get parameter id 'MAT' field p_caufvd-matnr.
  if p_caufvd-z_cust1 is initial and p_caufvd-z_qty1 is initial and
     p_caufvd-z_cust2 is initial and p_caufvd-z_qty2 is initial and
     p_caufvd-z_cust3 is initial and p_caufvd-z_qty3 is initial and
     p_caufvd-z_cust4 is initial and p_caufvd-z_qty4 is initial and
     p_caufvd-z_cust5 is initial and p_caufvd-z_qty5 is initial.
  else.
    if not p_caufvd-z_cust1 is initial
      and not p_caufvd-z_qty1 is initial.
      select single count(*) into l_v_count from zcc_t01
        where z_custmat = p_caufvd-z_cust1 and
              matnr = p_caufvd-matnr.
      if l_v_count < 1.
        message e000(zpp) with 'Entered customer does not exist'.
      endif.
      clear l_v_count.
    else.
      message e000(zpp) with 'Fill both customer material and Qty'.
    endif.
    if not p_caufvd-z_cust2 is initial
      and not p_caufvd-z_qty2 is initial.
     select single count(*) into l_v_count from zcc_t01
        where z_custmat = p_caufvd-z_cust2 and
              matnr = p_caufvd-matnr.
      if l_v_count < 1.
        message e000(zpp) with 'Entered customer does not exist'.
      endif.
      clear l_v_count.
    elseif
     not ( p_caufvd-z_cust2 is initial and p_caufvd-z_qty2 is initial ).
      message e000(zpp) with 'Fill both customer material and Qty'.
    endif.
    if not p_caufvd-z_cust3 is initial
      and not p_caufvd-z_qty3 is initial.
     select single count(*) into l_v_count from zcc_t01
        where z_custmat = p_caufvd-z_cust3 and
              matnr = p_caufvd-matnr.
      if l_v_count < 1.
        message e000(zpp) with 'Entered customer does not exist'.
      endif.
      clear l_v_count.
    elseif
     not ( p_caufvd-z_cust3 is initial and p_caufvd-z_qty3 is initial ).
      message e000(zpp) with 'Fill both customer material and Qty'.
    endif.
    if not p_caufvd-z_cust4 is initial
      and not p_caufvd-z_qty4 is initial.
     select single count(*) into l_v_count from zcc_t01
        where z_custmat = p_caufvd-z_cust4 and
              matnr = p_caufvd-matnr.
      if l_v_count < 1.
        message e000(zpp) with 'Entered customer does not exist'.
      endif.
      clear l_v_count.
    elseif
     not ( p_caufvd-z_cust4 is initial and p_caufvd-z_qty4 is initial ).
      message e000(zpp) with 'Fill both customer material and Qty'.
    endif.
    if not p_caufvd-z_cust5 is initial
      and not p_caufvd-z_qty5 is initial.
     select single count(*) into l_v_count from zcc_t01
        where z_custmat = p_caufvd-z_cust5 and
              matnr = p_caufvd-matnr.
      if l_v_count < 1.
        message e000(zpp) with 'Entered customer does not exist'.
      endif.
      clear l_v_count.
    elseif
     not ( p_caufvd-z_cust5 is initial and p_caufvd-z_qty5 is initial ).
      message e000(zpp) with 'Fill both customer material and Qty'.
    endif.
  endif.
endform.                    " Data_check
STEP7:-Double click on Function Exit:EXIT_SAPLCOKO_005
            Doouble click on include program: ZXCO1U21 and careae and add below code in include program
Data declarations
TYPES: BEGIN OF l_ty_zqty,
        z_custmat TYPE zcc_t01-z_custmat,
        z_qty     TYPE zcc_t01-z_qty,
       END OF l_ty_zqty.
DATA: l_s_zqty TYPE l_ty_zqty,
      l_t_zqty LIKE STANDARD TABLE OF l_s_zqty,
      l_v_frac TYPE zcc_t01-z_qty,
      l_v_four TYPE f VALUE '0.4'.
SET PARAMETER ID 'MAT' FIELD i_caufvd-matnr.
Get the fields from ZCC_T01 and display it.
IF ( sy-tcode EQ 'COR1' OR sy-tcode EQ 'COR2' )
          AND g_v_flag IS INITIAL.
  IF i_caufvd-z_cust1 IS INITIAL AND
     i_caufvd-z_cust2 IS INITIAL AND
     i_caufvd-z_cust3 IS INITIAL AND
     i_caufvd-z_cust4 IS INITIAL AND
     i_caufvd-z_cust5 IS INITIAL.
    SELECT z_custmat z_qty INTO TABLE l_t_zqty FROM zcc_t01
    WHERE matnr = i_caufvd-matnr
      AND z_qty NE space
      AND z_qty NE '0'.
    CHECK sy-subrc = 0.
    LOOP AT l_t_zqty INTO l_s_zqty.
      CASE sy-tabix.
        WHEN 1.
          caufvd-z_cust1 = l_s_zqty-z_custmat.
          caufvd-z_qty1 = i_caufvd-gamng * l_s_zqty-z_qty / 100.
          COMPUTE l_v_frac = FRAC( caufvd-z_qty1 ).
          IF l_v_frac > l_v_four.
            COMPUTE caufvd-z_qty1 = CEIL( caufvd-z_qty1 ).
          ELSE.
            COMPUTE caufvd-z_qty1 = FLOOR( caufvd-z_qty1 ).
          ENDIF.
          CLEAR l_v_frac.
        WHEN 2.
          caufvd-z_cust2 = l_s_zqty-z_custmat.
          caufvd-z_qty2 = i_caufvd-gamng * l_s_zqty-z_qty / 100.
          COMPUTE l_v_frac = FRAC( caufvd-z_qty2 ).
          IF l_v_frac > l_v_four.
            COMPUTE caufvd-z_qty2 = CEIL( caufvd-z_qty2 ).
          ELSE.
            COMPUTE caufvd-z_qty2 = FLOOR( caufvd-z_qty2 ).
          ENDIF.
          CLEAR l_v_frac.
        WHEN 3.
          caufvd-z_cust3 = l_s_zqty-z_custmat.
          caufvd-z_qty3 = i_caufvd-gamng * l_s_zqty-z_qty / 100.
          COMPUTE l_v_frac = FRAC( caufvd-z_qty3 ).
          IF l_v_frac > l_v_four.
            COMPUTE caufvd-z_qty3 = CEIL( caufvd-z_qty3 ).
          ELSE.
            COMPUTE caufvd-z_qty3 = FLOOR( caufvd-z_qty3 ).
          ENDIF.
          CLEAR l_v_frac.
        WHEN 4.
          caufvd-z_cust4 = l_s_zqty-z_custmat.
          caufvd-z_qty4 = i_caufvd-gamng * l_s_zqty-z_qty / 100.
          COMPUTE l_v_frac = FRAC( caufvd-z_qty4 ).
          IF l_v_frac > l_v_four.
            COMPUTE caufvd-z_qty4 = CEIL( caufvd-z_qty4 ).
          ELSE.
            COMPUTE caufvd-z_qty4 = FLOOR( caufvd-z_qty4 ).
          ENDIF.
          CLEAR l_v_frac.
        WHEN 5.
          caufvd-z_cust5 = l_s_zqty-z_custmat.
          caufvd-z_qty5 = i_caufvd-gamng * l_s_zqty-z_qty / 100.
          COMPUTE l_v_frac = FRAC( caufvd-z_qty5 ).
          IF l_v_frac > l_v_four.
            COMPUTE caufvd-z_qty5 = CEIL( caufvd-z_qty5 ).
          ELSE.
            COMPUTE caufvd-z_qty5 = FLOOR( caufvd-z_qty5 ).
          ENDIF.
          CLEAR l_v_frac.
        WHEN OTHERS.
      ENDCASE.
    ENDLOOP.
    g_v_flag = 'X'.
  ENDIF.
  IF g_v_flag IS INITIAL AND sy-tcode = 'COR2'.
    MOVE-CORRESPONDING i_caufvd TO caufvd.
  ENDIF.
ELSE.
  MOVE-CORRESPONDING i_caufvd TO caufvd.
ENDIF.
STEP8:- Double click EXIT_SAPLCOKO_006
            Doouble click on include program: ZXCO1U17 and careae and add below code in include program
Data Declaration.
tables : caufvd.
Export the fields.
move-corresponding caufvd to e_coci_aufk.
hope this help...
Regards
Sudheer Madisetty

Similar Messages

  • COR1 create process order change field value when save(PPCO0001)

    Dears
    When tcode: COR1 create process order, i want to change some fields value on the tab: "Goods Recpt", for example the field: Goods Recipient:                     , anyone konws how to do this? now i am trying to using the exit: PPCO0001( EXIT_SAPLCOBT_001)
    in thie eixt tables POSITION_TABLE : has this field: WEMPF (Goods Recipient) , i add some coding to change this field and save , but the change is not affect on the order . that is when open the order just create , this field is still empty.
    do i need some other process or call some other functions or some other exit to do this?
    thanks a lot for your posting.
    Edited by: Jackyguoguo on Mar 11, 2010 3:51 AM
    Edited by: Jackyguoguo on Mar 11, 2010 4:21 AM

    1. Use BADI: WORKORDER_UPDATE--> Method: BEFORE_UPDATE
    2. Use ASSIGN "(SAPLCOBT)AFPO_BT[]" statement to access and modify the desired fields.
    Regards,
    Suraj

  • Need BAPI for COR1(Create process Order)

    Hi Gurus,
    I need a BAPI or Function module for create process order (Tcode - COR1)
    for which i am passing Plant, storage location,produced material number, quantity to produce,
    received material,quantity to recived.
    Regards,
    Vijay Mekala

    Hi,
    is there any other BAPI or function module for COR1...
    Regards,
    Mekala Vijay

  • Screen exits for transaction KO01 (Create Internal Order)

    Hi Experts,
    I would like to enchane the screen of transaction KO01 by adding one new field.
    I am able to find the enchacement names (COOPA003) and I have already implemented it by creating project in CMOD.
    I have also added the new field in structure CI_AUFK of table AUFK.
    But the problem is I dont know how to attach the new sub screen to this existing transaction.
    So can any one please help me on this issue.
    It is very urgent.
    Thanks in advance.
    Regards.

    Hi Wasim,
    As I mentioned in my earlier reply go to SPRO -> CONTROLLING -> Internal Orders -> Order Master Data -> Screen Lay out -> Define Order Layouts
    Select the existing layout and and double click on Position Group boxes. Here you can see a group box called "User Defined Fields".
    First please read the documentation avaialable under the SCREEN LAYOUT option in SPRO. You will understand how can you have custom subscreens or fields.
    Thanks,
    Anil.

  • Problem creating process order with ref of sale order

    Dear all,
    Kindly give solution for this scenerio..............................
    I am creating Process Order with ref of sale order manually in cor1. In the COR1 screen copy from field i gave my ref sale order, so that particualr order and batch is assigned to that order only.
    My problem was suppose if sale order is created for 10 tonns, but my batch size and resource capacity is 2 tonns only. so first time i change my batch quantity 2 tonns instead of 10 tonns and created my order and confirmed.
    if i go to second time the same process i am doing creating process order with ref of same sale order but it comes again 10 tonns instead of 8 tonns. why it comes like this already i confirmed 2 tonns in this sale order?
    my requirement is if any process order is created with ref of any sale order and again if i am creating any process order with ref of same sale order left quantity only system should show.
    for this what i have to do kindly help to this
    regards,
    s.sakthivel

    Dear KK,
    Pls check whether ZKIN, ZKQT, ZKOR have all the properties similar to IN, QT, OR respectively. If they are different, please ensure that you know the reason why they are different. This check has to be done at tcode VOV8
    Some fields like sales document category, Transaction group, screen seq group, Doc pricing procedure need to be similar to the parent document unless you know why you have changed them.
    Once this check is done, check the copy controls in VTAA. Before that try creating these documents separately without reference. This shoudl work fine only after which you need to check copy control. If this is not working fine, then there is some problem with the document type settings in VOV8. Testing this is possible only if Reference mandatory field is left empty. Make sure that is properly configured.
    Once this is done, check copy controls in VTAA. You can just copy the copycontrol between IN and QT and QT and OR and create for ZKIN to ZKQT and ZKQT to ZKOR.
    Once this is done, check whether your item category settings are properly done , also the schedule line settings. The tcodes are VOV7, VOV6, VOV4, VOV5 etc.
    Now check whether your material master and customer master are consistent with the item category settings(Item category group).
    Now create the transaction. It shoudl work fine.
    Reward if this helps.

  • Screen exits for tcode co88

    Hi All,
            To allow multiple selection of production orders to be processed in tcode co88.  Can you provide the screen exits for tcode co88.

    hi,
    Try this COOM0003.
    Thanks,
    Sanket.

  • Error in manual batch determination while creating process order

    Hi Expert,
    Manual batch determination is happening for some of material and for some material it is working firne  when creating process order,
    Pleae assist
    Thanks
    Intekhab

    Dear,
    please open this prd order in change mode CO02 then press tab button cost calculation near release button in order header screen now do not save this order go to edit >log> cost calculation
    There it will show the error tht occured during costing
    Please refer this thread,
    Cost error when saving production oredr
    Regards,
    R.Brahmankar

  • Problem on creating process order

    Dear Team,
    I have a problem on creating process order thru COR1 where the basic start date only accept and follows current date. Basic finished date, no problem. Previously, i can set the basic start date using previous date / date in the past (in the same current month). I'm using "Only capacity requirements" for scheduling type.
    is there anywhere in the SAP config that i can check?
    and why this problem occured?
    Thanks

    Dear Tallha,
    Here is screenshoot of my process order. the basic finished date is automatically changed to current date. (date entered 1/5/2014)
    Thanks

  • After releasing the order same screen user updating the quantity in process order  in sap pp

    Hi experts,
    After releasing the order in the same screen user updating the quantity in process order  in sap pp.
    How to control it.
    can any help in this regards
    Thanking you,
    Rishit.

    Hi Rishit,
    You can control it by BAdi WORKORDER_UPDATE method AT_SAVE make error message if there is any change in quantity.
    Or you can create Transaction Variant through SHD0 for CO02 and make field Total Qty (CAUFVD-GAMNG) as output only.
    Regards,
    R.Brahmankar

  • Stop Creation of reservation while creating process orders....

    Hi All,
    THe requirement is to stop creation of reservations on creation of process order.
    have done the configuration in order type dependent parameters to stop creation of reservations on creation of process order.
    After this configuration the reservations have stopped appearing in the MMBE for components although there are reservation created.
    The above case appears only when i am creating process orders manually through transaction COR1....But when process orders are created by converting Plann order then in this case although the order type is same there are reservations visible in the MMBE transaction for the components.
    Request you to please guide through the reason for creation of reservations when a process order is created by converting a plan order.
    Thanks in advance for your help.
    Vinit

    Hi All,
    We are using the planning strategy 40 where in we produce only when the sales order is received.
    For a material we are using SPK as stock transfer from other plant.
    The requirement for this material is triggered due to 1)dependent reservation(as this component is used as a component to manufacture other material 2)Sales requirement for this material.
    On MRP the requirement is transferred to the supplying plant and we receive the stock in our plant.
    Now this stock is the total of requirement generated to fulfill the sales requirement and the consumption requirement.We cannot differentiate which stock was called in for sales order and which for fulfilling the production requirement of the superior material.
    Whenever a production order for the superior material is created reservation for this material are created because of which the stock will not be available for creation of deliveries for sales orders.(This is because of the av checking rule)
    Is there a way to differentiate these stocks.
    We thought about creating MRP areas to manage the requirements differently but this will lead to creation storage locations and thus affect our global template.
    Thus we thought of blocking of creation of reservations......this we thought as all the materials are already available by the time the process order is created so there is no point in creating reservations for the same.
    Let m know if you need any further information .......Help me providing a proper solution to the issue.
    Thanks in advance

  • Problem with creating Process order confirmation using BAPI

    Hello,
    While creating Process Order confirmation using BAPI_PROCORDCONF_CREATE_TT, material document is getting created. But a line item is inserted in the table AFRU without material document number. When it is created manually using the transaction COR6, the table is getting updated with material doc in the line item. Can anyone let me know what other attributes to be passed in order the update the same?
    Thanks in Advance.
    Regards, Senthil G.

    Hello , I am working with the same Bapi, can you please send me the code to fill the parameters, if I find the same error like you, I will send you the solution if I correct that.
    Thanks for your help.
    [email protected]
    Guatemala, Cempro ADATSA

  • Create Process Order by BAPI (COR6)

    Hi,
    I am looking for BAPI to create Process Order (Order category = 40),
    Instead of doing BI to transaction COR6.
    I try <b>BAPI_PRODORDCONF_CREATE_HDR</b> but with no success,
    because it works only with Production Order (Order category = 10).
    I get the following error: <i>“Orders of the order type YI01 cannot be confirmed“</i>
    (YI01 is a Process Order type).
    Thanks in advance,
    Gilad.

    Hi Gilad, I the same problem, I am using the bapi 'BAPI_PRODORDCONF_CREATE_TT',
    please if you find the correct BAPI, send me,
    If I find it first, I send you.
    Thanks for your help.
    Leonel Saavedra
    Guatemala.

  • Create process order confirmation

    Hello,
    I use the Bapi 'BAPI_PROCORDCONF_CREATE_TT' to create a confirmation in our Z program to replace 'COR6N'.
    The only problem I meet is that it makes a material document for the good movements but don't write it in the table AFRU (field WABLNR).
    Do I miss something in the BAPI??
    I run the BAPI like that:
      CALL FUNCTION 'BAPI_PROCORDCONF_CREATE_TT'
        IMPORTING
          return                   = lwa_return
        TABLES
          timetickets              = gt_timetickets
          goodsmovements           = gt_goodsmovements
          detail_return            = lt_detail_return
    The tables gt_timetickets & gt_goodsmovements are filled with relevant values.
    Could anyone help me to know what make the doc no. to be written in AFRU?!!!
    Thanks in advance,
    Fariba

    Hi Fariba,
    I am facing the same kind of issue that you faced long back. If you have resolved this issue, can you help me by replying back to the thread Problem with creating Process order confirmation using BAPI
    Thanks in Advance.
    Regards, Senthil G.

  • Creating Process Orders Without a Material and Without a Master Recipe

    Hi PP experts, anyone knows if it is possible and how to do create Process Orders Without a Material and Without a Master Recipe?
    Thanks!!

    Dear,
    If you want to use a cleanout recipe
    T code CORO
    create a order w/o material for rework qty
    Make the same entries as described under Creating a Process Order With a Material. Use OPJG config to have a default operation defined for the plant and order type combination.
    Please find the required details and conditions for creating process orders without master recipe.
    http://help.sap.com/saphelp_47x200/helpdata/en/89/a42cb3461e11d182b50000e829fbfe/frameset.htm
    Regards,
    R.Brahmankar
    Edited by: R Brahmankar on Oct 13, 2008 5:12 PM

  • Creating Process Orders using batch processing

    Hi :
    I am creating process orders automatically by using batch processing.I have a custom T.code and custom table.The batch program should be build based on custom table.From where will i get the data for batch processing? from custom table? if so how can i prepare a file for that.
    I have to submit this batch program to the custom T.Code so that it creates Process Orders automatically.
    Can u guide how to procede in this.
    Thx.
    Raghu

    Hi Raghu,
      What i think is u have a custom program which creates Process Orders using some user data. this user data is posted to a custom tabel.
    Now if i am right then u want to create a batch program around this custom program so as to achieve benifits of batch processing.
    yopu can check these links to better understand how to create a BDCprogram.
    http://www.sapdevelopment.co.uk/bdc/bdchome.htm
    http://www.sap-img.com/abap/learning-bdc-programming.htm
    http://www.sappoint.com/abap/bdcconcept.pdf
    http://www.sappoint.com/abap/bdcconcept.pdf
    http://www.sap-img.com/abap/learning-bdc-programming.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/fa/097022543b11d1898e0000e8322d00/frameset.htm
    http://www.planetsap.com/bdc_main_page.htm
    http://searchsap.techtarget.com/ateQuestionNResponse/0,289625,sid21_gci1068429_tax293481,00.html
    Hope this helps.
    Award rewar points if its useful.

Maybe you are looking for

  • Getting new 8 core today - will it run Leopard?

    My 2006 Mac Pro died today. I have 4 SATA drives in it's bays. One of the HD's has a Snow Leopard install and another has Leopard 10.5.8 on it. The other two have media files on them. I want to drop all 4 into the new Mac Pro and pull the one it come

  • Flatten Page JavaScript Debugger problem

    I found a common solution online about flattening comments into a PDF: 1) Press CTRL+J to open Debugger window 2) Delete anything out of the console window 3) Type this.flattenPage() 4) Leave the cursor in the line and press CTRL+ENTER I tried this o

  • There is a big looking streak in the middle of the screen why?

    ok so i just got my imac 21.5 i3 like a week ago and today i decided to clean the screen when i notice this big looking streak right in the middle of the monitor and say i wipe it with a free lint cleaning cloth the iklear provided and it goes away b

  • User Authenciation error

    Hello, We have done an OS-DB Migration of Portal,ECC,SRM,XI. All the systems are up and running. Following are the details for Portal and ECC where we are facing issues, ECC CI and DB hostname - helios App servers hostname - nyx, nyx2, nyx3, nyx4, ny

  • Compression/ uncompression issue over sokects

    Only one thread running at the time of test; JAVA: Java(TM) SE Runtime Environment (build 1.7.0_02-b13) i have a problem with the following scenario. A client inside a loop reads data from a file, does some processing of incoming data, compresses it