How to change workcenter in my routing while creating producton order?

we have 4 workcenters in routing.
PP guy configured the system in such a way that when production order is created, it will by default assign 1st workcenter in the routing as work center.
I need to write prg to change the work center in the routing for that production order accroding to the free capacity on workcenter.
I know which workcenter i need to assign to the production order in my routing.
i am using enhancement ppco0007 for assigning workcenter to the produciton order automatically according to the free capacity.
Can any one please suggest me if i am wrong in selecting the enhancement or ehat r the fields that i need to change to assign diffferent workcenter to the production order...
thank you very much in advance...
Any hint is very much appreciated..
Points will be given for sure...

Hello Lavanya,
                      You have to use the enhancement "EXIT_SAPLCOBT_001" for updating the Work center in Production order. You need to query to the table CRHD with the field value ARBID to get the work center number . This field is existing in the enhancemnet that you had mentioned before. Try that enhancement as well. That also may work.
Let me know how it goes.
Thanks,
Greetson

Similar Messages

  • How to change the status of material while creating sales order via BDC

    Hai.
    In BDC while creating sales order( va01 posting ) it is stucking up in middle saying material is new. I.e Sales order (va01) is not  getting created because  of material status is new . I want to create sales order  (va01) even  material status is new.
    pls give me out the solution. Points will be rewarded.
    thanks & regards,
    sami.

    Hi,
    If you drag the line item a little towards the right side, you will find a filed material entered. The one you see in the material filed on sales order over view screen is the one determined. You can as well double click and see the fields material entered and material determined.
    Is there anything else you are expecting to see as part of analysis ?
    Regards
    Sadhu Kishore

  • How to manual maintain TAX condition value while creating sales order

    Hi
    I am creating one Tax condition suppose JLST without access sequence .
    while creating sales order I am manually maintain the % value of TAX. suppose it is 1%
    then I see It show some value in TAX .
    save that sales order & creating delivery document for that but when I create Invoice its show error.
    " Tax code  in procedure CMTAXP is invalid ".
    I know the configuration only for Tax condition with vk11 condition record .
    BUT now I want to maintain TAX condition at the time of creating sales order.
    so I remove the access sequence of that condition .
    but It shows tax code error while billing.
    My main question is that If i maintain condition record while creating sales order then how i can assign Tax code .
    Can it is possible ?
    if yes then How?
    please help me.
    thank you

    Hi,
    The "straight-forward" answer for Tax Code creation is contact the FI consultant. He shall help you, by creating Tax codes.
    I have tested, with creating a tax cond type (copy of MWST) & manually entering values. I can create Sorder, Dlv and Bill but I cannot create an Accounting document. That is because of every line (amount) a Tax code is necessary.
    I THINK, you can NOT have manually filled tax codes; access sequence is needed to get the tax value (%) and the Tax code from the condition record.
    There is lot of material on the web to understand Tax classification, code etc. etc. See a useful link below -
    http://www.sapgeek.net/2010/04/sd-determines-tax-code/
    In short Tax code is a must and take the help of your FI consultant for the configuration of the same.
    BTW - Tax code is already made created for MWST, therefore I suggested that you can use MWST. Furthermore, you can change the values corresponding to Tax codes in FTXP.
    But if you are a beginner in these things, better take help.

  • How to hide componant row of BOM while creating sales order  OR AR Invoice

    Dear expert
    my client wants to create Sales order with Sales BOM, but they do not want to see componant product while create sales order or AR invoice they want to see only parent items.
    Please help me asap

    Hi,
    check below link
    Avoid printing child items of Sales BOM in AR Invoice
    Regards
    Deepak Tyagi

  • How to resolve the issue of route while creating a sales order using IDOC

    Hi,
    When I am creating a sales order mannualy the the route is correct and matching  also but while using IDOC try to create a sales order then the route is showing wrong.
    I tried to debug the program SAPMV45A but I am not getting anything.
    Could any body help me on this.
    Waiting for quick response.
    Best Regards,
    BDP

    Hi Bansidhar,
                 You need to debug the Function Module thats assigned to your Process code.
                 In standard config for Sales Order, Process Code ORDE is assigned to FM IDOC_INPUT_ORDERS. And this FM uses Call Transaction Method to create Sales Orders. SO you can  debug this FM.
               Hope this helps you solving the problem.
    Regards
    Srikanth  M

  • How to avoid XVBPA line item values while creating sales order

    Hi Friends
    I am creating Sales order using function module IDOC_INPUT_ORDERS, for that I am passing partner details through segment E1EDKA1.If I pass the same partner details(Partner number, name1,name4,city,postel code) which is same like customer master,
    I can able to book the order and entries are coming only one time in VBPA table(Header Item level).But if I change any value for the particular partner in the Input(For example Name4, there is no value in customer master but I added through program).Now its creating an order but its showing the entered partner informations in header level.When I checked the same in line item level, its not picking the values from header, its picking the values from customer master for that particular partner.
    So this line item also coming in VBPA table, because its different from header data.
    Anyone guide me, how to avoid this problem while booking order through program.
    Thanks
    Gowrishankar

    I am updating Ship-To-Party value in segment E1EDKA1 and calling IDOC_INPUT_ORDERS function module to create the sales order.
    In this case for the particular partner there is no NAME4 value in KNA1, I am passing some value through this segment E1EDKA1.
    So its creating an order with this new addresses , so its generating new ADRNR in VBPA header level.Thats fine.But the same time
    its not copying the same value from header to line item.
    In Line item level again its picking the address details from KNA1 for the particular partner number.So its showing Blank value in NAME4 field of line items.Its creating and spllitting issue, while creating delivery.
    Thanks
    Gowrishankar

  • How to make Classification entry pop up while creating internal order(KO01)

    Dear All
    I need to have the characteristics values of the class assigned to my internal order POP UP during the Internal Order Creation (KO01)
    I have activated the necessary config and the class , characteristic and characteristic value is able to generated successfully.Also, I have activated classification in order type.
    I have  make the characteristic value as Required Entry but it still does not pop up to ask me for entry, instead it just shows a general message as follows:
    +Status changed: missing values for required chars in TM0000000002OR
    Message no. CL500
    Diagnosis
    You want to save an allocation to a class with released status. However, the class contains characteristics for which an entry is required.
    System Response
    The system changes the status of the allocation to incomplete.
    Procedure
    If you want to save the allocation with released status, first you must assign values to all the required characteristics. Then you can set the status you require.
    Note
    The classification status affects functions such as the find objects function. You can define whether objects with incomplete classification status are included in the search result.
    If the classification status of a configurable material is incomplete for an allocation to a class, this does not affect configuration.+
    Please advise. Thanks.

    Hi,
    Have you installed the Software Component
    /QAS/AXO     46C      0000   -                   QuickAddress for BAS
    You can check this in transaction SPAM -> package level.
    BR

  • Resrtict -  copy from option while creating Production order

    Dear all,
    I want to know how to  Block  the "copy from" option while creating Production order(CO01).
    Regs.
    S.R

    Dear Ramesh,
    You can do this Via SHD0
    Just check the below link
    [Regarding Backflushing(MFBF) fields making display;
    Regards
    kumar

  • How to change workcenter using bdc

    hi,
      can any one help me that how to change Workcenter while creating production order.
    plz its urgent.
    plzzzzzz
    Gowri

    Gowri,
    Before calling BDC upload u have to do the validations,So put a logic for which Items u have to change WC.
    try to use any BAPI to overcome TC issue.
    Sample program here.
    data: str type c length 1,
    var type c length 30,
    cntr type i.
    data: begin of record,
    AUFNR(012),
    FLG_OVIEW(001),
    GLTRP(010),
    GSTRP(010),
    ARBPL(008),
    KTSCH(020),
    end of record.
    DATA: itab LIKE record OCCURS 1000 WITH HEADER LINE.
    PARAMETERS textfile LIKE rlgrap-filename DEFAULT
    'c:\prdord.txt'.
    End generated data section ***
    START-OF-SELECTION.
    CALL FUNCTION 'WS_UPLOAD'
    EXPORTING
    filename = textfile
    filetype = 'DAT'
    TABLES
    data_tab = itab
    EXCEPTIONS
    conversion_error = 1
    file_open_error = 2
    file_read_error = 3
    invalid_type = 4
    no_batch = 5
    unknown_error = 6
    invalid_table_width = 7
    OTHERS = 8.
    IF sy-subrc <> 0.
    WRITE:/ 'Upload From',textfile,'to itab is not successful'.
    EXIT.
    ENDIF.
    LOOP AT itab.
    IF sy-subrc <> 0. EXIT. ENDIF.
    perform bdc_dynpro using 'SAPLCOKO1' '0110'.
    perform bdc_field using 'BDC_CURSOR'
    'CAUFVD-AUFNR'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'CAUFVD-AUFNR'
    itab-AUFNR.
    perform bdc_field using 'R62CLORD-FLG_OVIEW'
    itab-FLG_OVIEW.
    perform bdc_dynpro using 'SAPLCOKO1' '0115'.
    perform bdc_field using 'BDC_OKCODE'
    '=TERM'.
    perform bdc_field using 'BDC_CURSOR'
    'CAUFVD-GSTRP'.
    perform bdc_field using 'CAUFVD-GLTRP'
    itab-GLTRP.
    perform bdc_field using 'CAUFVD-GSTRP'
    itab-GSTRP.
    perform bdc_dynpro using 'SAPLCOKO1' '0115'.
    perform bdc_field using 'BDC_OKCODE'
    '=VGUE'.
    perform bdc_field using 'BDC_CURSOR'
    'CAUFVD-GAMNG'.
    perform bdc_field using 'CAUFVD-GSTRP'
    itab-GSTRP.
    perform bdc_dynpro using 'SAPLCOVG' '0100'.
    perform bdc_field using 'BDC_CURSOR'
    'AFVGD-KTSCH'.
    Here is where i need to check whether the 'AFVGD-KTSCH'containing value 'SEWING' then the itab value should be placed in the below screen-field.
    perform bdc_field using 'BDC_CURSOR'
    'AFVGD-ARBPL(02)'.
    perform bdc_field using 'BDC_OKCODE'
    '/00'.
    perform bdc_field using 'AFVGD-ARBPL(02)'
    itab-ARBPL.
    perform bdc_dynpro using 'SAPLCOVG' '0100'.
    perform bdc_field using 'BDC_OKCODE'
    '=FREI'.
    perform bdc_field using 'BDC_CURSOR'
    'PSFC_DISP-AUFNR'.
    perform bdc_dynpro using 'SAPLSPO2' '0300'.
    perform bdc_field using 'BDC_OKCODE'
    '=OPT1'.
    perform bdc_dynpro using 'SAPLCOVG' '0100'.
    perform bdc_field using 'BDC_OKCODE'
    '=BU'.
    perform bdc_field using 'BDC_CURSOR'
    'PSFC_DISP-AUFNR'.
    CALL TRANSACTION 'CO02' USING bdcdata MODE 'A'.
    if sy-subrc eq 1001.
    write:/ ITAB-aufnr,ITAB-arbpl, ITAB-gstrp.
    write 'Not Updated'.
    else.
    write:/ ITAB-aufnr,ITAB-arbpl, ITAB-gstrp.
    write 'Updated Successfully'.
    endif.
    REFRESH bdcdata.
    *else.
    write 'Improper Text File Format'.
    *endif.
    endloop.

  • Changes in Netprice(KOMP-NETWR) While Creation Sales Order(VA01)

    Hi expert ,
    My issues while creating sales order(Va01) is :
    i have added two conditions types namely YVAT and YNBT in Condition , while calculating netprice (NETWR) its picking both values for YVAT and YNBT , i want only netprice excluding YVAT and YNBT , for example
    NETPRICE is  3000.00
    YVAT      is      50.00
    YNBT      is       30.00
    NET         is       3080.00
    but i want to display only 3000.00 in NET(KOMP-NETWR)
    please suggest  is there any user exit to do this calculations.

    Hi,
    I'm not sure if you need to update ADRC table - the address number is usually the the customer's address and is picked automatically.
    Also the transport zone is picked automatically based on the customers address or on the shipping conditions in the Sales Order.
    Transportation Zone (LZONE) also exists in the partner function (VBPA) and the shipping partner (VTPA) - in case you need to suggest a different route for shipping other than the one determined automatically.
    To change this - change both the internal tables table xvbpa and xvtpa (after reading with sales order and item from structures vbak and xvbap) in USER_SAVE_DOCUMENT_PREPARE in the include MV45AFZZ.
    But, I'm not sure if the Address Number (determining the shipping point) would be independent of the Transp Zone, though it's changed in the exit.
    Regards,
    Anil.

  • How to block the material qty to 1 while creating sales order (VA01)?

    Hi All,
    Scenario :  We have 20 Materials each with 100 qty in Plant. In the sales order we should have all the 20 materials with qty one. The sales order should throw an error if the material qty is more than 1 and should not allow to create a sales order.
    so is there any transaction code where we can block the entire material qty to 1 from the same plant while creating sales order?
    Note: We should not set in MM01 "Minimum order qty". Assume we have 100 material in plant we can't set for each material one by one "minimum order qty".Instead of that is there any option to set the whole material qty to 1 as minimum while creating sales order?
    Kindly guide me how to proceed.
    Thanks,
    Renjith

    If you have access to idoc before calling the processing Function module, Adding header text segments E1EDKT1 and E1EDKT2 to the idoc will create the header text.
    Regards
    Sridhar

  • How to add more than one datafile while creating tablespace

    how to add more than one datafile while creating tablespace. I know by using alter command i can add datafile but i want while creating tablespace

    Hi Dadivela,
    how to add more than one datafile while creating tablespace.Here is the syntax:
    !http://www.dba-oracle.com/images/create_tablespace.jpg!
    I do it like this:
    create tablespace myts
    datafile
    *'/u01/app/oracle/db1.dbf' size 100m,*
    *'/u02/app/oracle/db2.dbf' size 200m;*
    Here are my complete notes:
    http://www.dba-oracle.com/t_tablespace_create_alter.htm
    Hope this answers your question . . .
    Donald K. Burleosn
    Oracle Press author

  • How to restrict the order reason in Tcode Va01 while creating sales order

    Hi Gurus,
    My requirement is
    while creating sales order in VA01
    if order type is Zvol
    than the list of order reasons has to be restricted.
    Now 15 are coming from OVAU  tcode
    I need only 5 from these.
    Thanks & Reagrds
    kals.

    Hi,
    By doing the user exit in IW32 we achieved the requirement of restriction of maintenance order TECO functionality if any Service Entry sheet pending with reference of maintneance order.
    regards
    JKM

  • Automatic creation of  settlement rule while creating sales order

    Hi Friends,
    Can any one help me how to create settlement rule automatically while creating sales order i.e saving sales order. Is there any function module or any badi which can be used.. please suggest.
    thanks
    bobby

    Hi,
    Here is the solution , First Create a sustitution by going into OPSN Transaction , only user exit say 'U902'
    and write the form routine in Program named 'ZRGGBS000'
    The code is below ,
    *&      Form  U902
       Automatic Generation of Settlement Rule For WBS and Company 4180
    FORM u902.
    Exit For Automatic Settlement Rule Creation for WBS Billing elements
      IF sy-tcode = 'CJ20N' or sy-tcode = 'CJ01' or sy-tcode = 'CJ02'.
        DATA   lv_proj TYPE ps_pspid.
        lv_proj = proj-pspid.
        EXPORT lv_proj TO MEMORY ID 'PSPID'.
    Calling YGPS_CJB1EXEC Program For Creating Settlement Rule
        SUBMIT ygps_cjb1exec AND RETURN.
      ENDIF.
    ENDFORM.                                                    "u902
    *& Program  YGPS_CJB1EXEC
    PROGRAM  ygps_cjb1exec.
       Automatic Generation of Settlement Rule For WBS and Company 4180
    Called From Exit For Automatic Settlement Rule Creation for WBS Billing elements
    DATA: bdcdata_wa  TYPE bdcdata,
          bdcdata_tab TYPE TABLE OF bdcdata,
          itab TYPE TABLE OF bdcmsgcoll.
    DATA :lv_currm LIKE bkpf-monat,
          lv_curry LIKE bkpf-gjahr,
          lv_prevm LIKE bkpf-monat,
          lv_prevy LIKE bkpf-gjahr,
          lv_proj TYPE ps_pspid,
          lv_mode TYPE c,
          lv_time TYPE sy-uzeit.
    DATA :g_datfm            LIKE usr01-datfm,
          g_dd(2)            TYPE c,                         " Day
          g_mm(2)            TYPE c,                         " Month
          g_yyyy(4)          TYPE c,                         " Year
          g_sydatum(10)      TYPE c.
    IMPORT lv_proj FROM MEMORY ID 'PSPID'.
    lv_mode = 'N'.
    CLEAR bdcdata_wa.
    bdcdata_wa-program  = 'SAPLKAZB'.
    bdcdata_wa-dynpro   = '1000'.
    bdcdata_wa-dynbegin = 'X'.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'BDC_CURSOR'.
    bdcdata_wa-fval = 'PRZB-VARIANT'.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'PRZB-VARIANT'.
    bdcdata_wa-fval = 'ZGPS0001'.
    APPEND bdcdata_wa TO bdcdata_tab.
    CALL FUNCTION 'GET_CURRENT_YEAR'
      EXPORTING
        bukrs = '4180'
      IMPORTING
        currm = lv_currm
        curry = lv_curry
        prevm = lv_prevm
        prevy = lv_prevy.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'RKAUF-FROM'.
    bdcdata_wa-fval = lv_currm.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'RKAUF-GJAHR'.
    bdcdata_wa-fval = lv_curry.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'BDC_OKCODE'.
    bdcdata_wa-fval = '=VARC'.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-program  = 'RKPSEL00'.
    bdcdata_wa-dynpro   = '1000'.
    bdcdata_wa-dynbegin = 'X'.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'BDC_CURSOR'.
    bdcdata_wa-fval = 'CN_PROJN-LOW'.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'CN_PROJN-LOW'.
    bdcdata_wa-fval = lv_proj.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'CN_PSPNR-LOW'.
    bdcdata_wa-fval = space.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'CN_NETNR-LOW'.
    bdcdata_wa-fval = space.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'CN_ACTVT-LOW'.
    bdcdata_wa-fval = space.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'CN_MATNR-LOW'.
    bdcdata_wa-fval = space.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'BDC_OKCODE'.
    bdcdata_wa-fval = '/00'.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'BDC_OKCODE'.
    bdcdata_wa-fval = '=SAVE'.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'BDC_OKCODE'.
    bdcdata_wa-fval = '=VBAC'.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-program  = 'SAPLSPO1'.
    bdcdata_wa-dynpro   = '0100'.
    bdcdata_wa-dynbegin = 'X'.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'BDC_OKCODE'.
    bdcdata_wa-fval = '=YES'.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-program  = 'SAPLKAZB'.
    bdcdata_wa-dynpro   = '1000'.
    bdcdata_wa-dynbegin = 'X'.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'RKAUF-BATCH'.
    bdcdata_wa-fval = 'X'.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'RKAUF-TEST'.
    bdcdata_wa-fval = space.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'BDC_OKCODE'.
    bdcdata_wa-fval = '=RUN'.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-program  = 'SAPLKABA'.
    bdcdata_wa-dynpro   = '0210'.
    bdcdata_wa-dynbegin = 'X'.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'KABA01-JNAME'.
    bdcdata_wa-fval = 'CJB1_EXEC'.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'BDC_SUBSCR'.
    bdcdata_wa-fval = 'SAPLKABA'.
    APPEND bdcdata_wa TO bdcdata_tab.
    Extract the date format from the user settings
    PERFORM f_get_dateformat CHANGING g_datfm.
    Changing the current date format to User Profile Date Settings
    PERFORM f_format_date USING   g_datfm
                                  sy-datum+4(2)
                                  sy-datum+6(2)
                                  sy-datum+0(4)
                         CHANGING g_sydatum.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'KABA01-STDAY'.
    bdcdata_wa-fval = g_sydatum.
    APPEND bdcdata_wa TO bdcdata_tab.
    lv_time = sy-uzeit  + 30.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'KABA01-STTME'.
    bdcdata_wa-fval = lv_time.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'KABA01-PRIKZ'.
    bdcdata_wa-fval = space.
    APPEND bdcdata_wa TO bdcdata_tab.
    CLEAR bdcdata_wa.
    bdcdata_wa-fnam = 'BDC_OKCODE'.
    bdcdata_wa-fval = '=TAKE'.
    APPEND bdcdata_wa TO bdcdata_tab.
    Calling Transaction 'CJB1' for creating settlement rule
    CALL TRANSACTION 'CJB1'  USING bdcdata_tab MODE lv_mode .
    IF sy-subrc = 0.
    ENDIF.
    *&      Form  F_GET_DATEFORMAT
          This subroutine returns the date format in the user setttigs
         <--P_G_DATFM  Date Format
    FORM f_get_dateformat CHANGING p_g_datfm.                   "#EC *
      SELECT SINGLE datfm FROM usr01 INTO p_g_datfm
      WHERE bname = sy-uname.
    ENDFORM.                    " F_GET_DATEFORMAT
    *&      Form  F_FORMAT_DATE
          This subroutine returns the date as per the user settings
         -->P_G_DATFM  Date Format
         -->P_G_MM  Month
         -->P_G_DD  Day
         -->P_G_YYYY  Year
         <--P_G_DATE  Date
    FORM f_format_date USING    p_g_datfm
                                p_g_mm
                                p_g_dd
                                p_g_yyyy
                       CHANGING p_g_date.                       "#EC *
      CONSTANTS: c_dot VALUE '.',
                 c_slash VALUE '/',
                 c_dash VALUE '-',
                 c_1 VALUE '1',
                 c_2 VALUE '2',
                 c_3 VALUE '3',
                 c_4 VALUE '4',
                 c_5 VALUE '5',
                 c_6 VALUE '6'.
      DATA: l_day(2),
            l_month(2).
      l_day = p_g_dd.
      l_month = p_g_mm.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          input  = l_month
        IMPORTING
          output = l_month.
      CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
        EXPORTING
          input  = l_day
        IMPORTING
          output = l_day.
      CASE p_g_datfm.
        WHEN c_1.
          CONCATENATE l_day l_month p_g_yyyy INTO p_g_date
              SEPARATED BY c_dot.
        WHEN c_2.
          CONCATENATE l_month l_day p_g_yyyy INTO p_g_date
           SEPARATED BY c_slash.
        WHEN c_3.
          CONCATENATE l_month l_day p_g_yyyy INTO p_g_date
              SEPARATED BY c_dash.
        WHEN c_4.
          CONCATENATE p_g_yyyy l_month l_day INTO p_g_date
              SEPARATED BY c_dot.
        WHEN c_5.
          CONCATENATE p_g_yyyy l_month l_day INTO p_g_date
              SEPARATED BY c_slash.
        WHEN c_6.
          CONCATENATE p_g_yyyy l_month l_day INTO p_g_date
              SEPARATED BY c_dash.
      ENDCASE.
    ENDFORM.                    " F_FORMAT_DATE
    thanks
    bobby

  • Prt availability.while creating production order

    while creating production order. system checking PRT availabilty
    if PRT is not there system throws warning msg
    PRT: Item: 0010  Material TESTPRT1 plant BP01 is not available.
    Message no. CF301
    Diagnosis
    You are attempting to use a PRT. However, the current status of this PRT does not permit you to use it.
    how can change into error msg.........
    thx in advance

    Hello,
    I've checked the WUL of the message CF301 and found:
    CALL FUNCTION 'CO_FU_FHM_AVAILABILITY_CHECK'
           EXPORTING
                index_imp             = affhd_sav-indbt
                tco11_imp             = tco11_tmp
           IMPORTING
                fhm_not_available_exp = fhm_not_available_tmp.
    FHM verfügbar
      IF NOT fhm_not_available_tmp IS INITIAL.
        CASE affhd_sav-fhmar.
          WHEN material.
            MESSAGE i301 WITH affhd_sav-psnfh
                              affhd_sav-matnr
                              affhd_sav-fhwrk.
          WHEN sonstige.
            MESSAGE i302 WITH affhd_sav-psnfh
                              affhd_sav-sfhnr.
          WHEN dokument.
            MESSAGE i303 WITH affhd_sav-psnfh
                              affhd_sav-fhmnr.
          WHEN equipment.
            MESSAGE i307 WITH affhd_sav-psnfh
                              affhd_sav-fhmnr.
          WHEN OTHERS.
            MESSAGE a886
                    WITH sy-repid
                         hlp-fname.
        ENDCASE.
    I'm afraid the attribute is hardcoded to be warning.
    BR,
    Tiemin

Maybe you are looking for