FM to read Production-order serialnumbers

Hi friends,
does anyone know a fm/bapi to read the serial numbers of a production order ?
regards joerg

DOnt know about FM's but u can try querying database direclty.
Pass AUFNR to SER05 to get a list of OBKNR's.
Pass this OBKNR's to table OBJK to get the list of serial numbers.

Similar Messages

  • Bapi to read production order network

    Hi all
    I am searching a bapi to read entire network of a production order. I tried searching on forum but did not find anything.
    Can anybody help me please?
    regards
    Gabriele

    Hi Montoro,
    You can use FM      BAPI_PRODORD_COMPLETE_TECH       to read production order network..
    Thanks,
    Ravi

  • How to read Production Order Long Text data in ABAP program

    Hi friends,
      I have the issue in reading the ' Long Text '  tab view data of production order
    in CO03 transaction.Please can some body help me out to get this in ABAP program.
    Regards,
    Rajesh Akarte

    ok goto the long text, double click it, or use the small pencil, so that you proceed to the text editor.
    Once you are there, use the menu: goto->head
    a small popup will come up, stating the information you need.
    what you need is OBJECT, ID, Language and NAME.
    with those information you can feed the FM READ_TEXT.
    and woooohooo there you go

  • Getting a runtime error in reading long text from production order

    Hi all,
    I am trying to read production order long text and the code is not showing any syntax error but if i execute it i am getting a runtime error as "Text object aufk is not available".
    But i did check for the text object , text id enties in TTXOB and TTXID tables. Also i am able to see the relevant text in tables STXH and STXL, dont know why i am getting this runtime error and unable to debug.
    I tried a lot searching in forums, but they all ask me to write the code in the way i did, so dont know what is the problem.
    Data Declarations
    data: xaufk  type aufk.
    data: l_name type thead-tdname.
    data: ilines type table of tline with header line.
    Parameters
    parameters: p_aufnr type aufk-aufnr.
    concatenate sy-mandt p_aufnr into l_name.
    condense l_name no-gaps.
              CALL FUNCTION 'READ_TEXT'
                EXPORTING
                 CLIENT                         = SY-MANDT
                  ID                                =  'kopf'
                  LANGUAGE                 =  sy-langu
                  NAME                          = l_name
                  OBJECT                       = 'aufk'
                TABLES
                  LINES                         =  ilines
              write : ilines.
    Regards
    Jessica

    Hey Vijay,
    Thanks for you reply, It worked, i am not getting the runtime error, but also not getting the output.
    am i missing anywrite statements?
    Please check the code and suggest changes if required. i want to see the long text in the production order in the output. should i say write: ilines.?
    Data Declarations
    data: xaufk  type aufk.
    data: l_name type thead-tdname.
    data: ilines type table of tline with header line.
    Parameters
    parameters: p_aufnr type aufk-aufnr.
    concatenate sy-mandt p_aufnr into l_name.
    condense l_name no-gaps.
              CALL FUNCTION 'READ_TEXT'
                EXPORTING
                 CLIENT                         = SY-MANDT
                  ID                            = 'KOPF'
                  LANGUAGE                      =  sy-langu
                  NAME                          = l_name
                  OBJECT                        = 'AUFK'
                TABLES
                  LINES                         =  ilines
                 write : ilines.
    Regards,
    Jessica.

  • How can we improve performance while selection production orders from resb

    Dear all,
    there is a performance issue in a report which compares sales order and production order.
    Below is the code, in this while reading production order data from resb with the below select statement.
    can any body tell me how can we improve the performance? should we use indexing, if yes how to use indexing.
    *read sales order data
      SELECT vbeln posnr arktx zz_cl zz_qty
      INTO (itab-vbeln, itab-sposnr, itab-arktx, itab-zz_cl, itab-zz_qty)
      FROM vbap
      WHERE vbeln  = p_vbeln
      AND   uepos  = p_posnr.
        itab-so_qty = itab-zz_cl * itab-zz_qty / 1000.
        CONCATENATE itab-vbeln itab-sposnr
           INTO itab-document SEPARATED BY '/'.
        CLEAR total_pro.
    **read production order data*
        SELECT aufnr posnr roms1 roanz
        INTO (itab-aufnr, itab-pposnr, itab-roms1, itab-roanz)
        FROM resb
        WHERE kdauf  = p_vbeln
        AND   ablad  = itab-sposnr+2.

    Himanshu,
    Put a break point before these two select statements and execute in the production.This way you will come to know which select statement is taking much time to get executed.
    In both the select statements the where clause is not having the primary keys.
    Coming to the point of selecting the data from vbap do check the SAP note no:-185530 accordigly modify the select statement.
    As far as the table RESB is concerened here also the where clause doesn't have the primary keys.Do check the SAP Note No:-187906.
    I guess not using primary keys is maring the performance.
    K.Kiran.

  • Program RCCLTRAN is locking the changes of the Production Orders

    Hello,
    I am encountering an issue, the standard program RCCLTRAN which read production order and create idocs are locking the changes made in APO. The message specifies: "Changes to Order 1XXXX are not transferred".
    May I know if there is a User Exit that could be implemented that will not affect the planning activities of the planners when the program is running simultaneously?
    Thanks for your support!
    Nap

    Hi Nap,
    I am not familiar with the program that you mentioned.
    However I think it should still be possible to give some guidance if you can share the following information:
    1) Using RCCLTRAN, where do you send the Idocs to?
    2) The error that you mentioned - Is it appearing in APO or is it appearing in R/3 when this program RCCLTRAN is running in R/3, and some planners are sending planned orders from APO?
    PS: In standard SAP, it's not possible that 2 users make changes simultaneously to the same document, and this is not advisable also. So I hope you are not requesting for this.
    Regards - Pawan

  • Class for Purchase order item components and Production order components

    I'm looking for a some classes.   I'm very new to objects, so I could be searching for them incorrectly.
    The first class I'm looking for is a purchase order class that contains the item components.  I've looked at CL_PO_ITEM_HANDLE_MM and CL_PO_HEADER_HANDLE_MM.  I couldn't find components as a part of either of the classes.
    The second one I'm looking for is not as critical.  It is for the components for a production order.   I have a function module: BAPI_PRODORD_GET_DETAIL that gets the components for the order.  However, to take advantage of objects - I read somewhere - that if possible I should avoid calling a function module.
    Any help that you could give would be greatly appreciated.
    Thank you!
    Michelle

    Hello Michelle
    I do not think there are already classes available on ERP 6.0 for reading production order (yet I might be wrong...). However, regarding purchase order you are already on the right track.
    *& Report  ZUS_SDN_OO_READ_PO
    *& Thread: Class for Purchase order item components and Production order components
    *& <a class="jive_macro jive_macro_thread" href="" __jive_macro_name="thread" modifiedtitle="true" __default_attr="1206523"></a>
    "& NOTE: Coding adapted from BAPI_PO_GETDETAIL1
    REPORT  zus_sdn_oo_read_po.
    TYPE-POOLS: abap, mmpur.
    PARAMETER:
      p_ebeln   TYPE ebeln  DEFAULT '3000000045'.
    DATA: gs_document    TYPE mepo_document,
          go_po          TYPE REF TO cl_po_header_handle_mm,
          gs_header      TYPE mepoheader,
          gd_tcode       TYPE sy-tcode,
          gd_result      TYPE mmpur_bool.
    data: gt_items       type PURCHASE_ORDER_ITEMS,
          gs_itm         type PURCHASE_ORDER_ITEM,
          gs_item        type mepoitem.
    START-OF-SELECTION.
    *  prepare creation of PO instance
      gs_document-doc_type    = 'F'.
      gs_document-process     = mmpur_po_process.
      gs_document-trtyp       = 'A'.  " anz.  => display
      gs_document-doc_key(10) = p_ebeln.
    *  object creation and initialization
    **  l_ebeln = purchaseorder.
      CREATE OBJECT go_po.
      CALL METHOD go_po->po_initialize( im_document = gs_document ).
      CALL METHOD go_po->set_po_number( im_po_number = p_ebeln ).
      CALL METHOD go_po->set_state( cl_po_header_handle_mm=>c_available ).
    *  read purchase order from database
      gd_tcode = 'ME23N'.
      CALL METHOD go_po->po_read
        EXPORTING
          im_tcode     = gd_tcode
          im_trtyp     = gs_document-trtyp
          im_aktyp     = gs_document-trtyp
          im_po_number = p_ebeln
          im_document  = gs_document
        IMPORTING
          ex_result    = gd_result.
    *  there was a problem in reading the PO
      IF ( gd_result EQ mmpur_no ).
    **    l_messages = l_handler->get_list_for_bapi( ).
    **    PERFORM return TABLES l_messages return
    **                          poitem poschedule poaccount.
    **    CALL METHOD l_po->po_close( ).
      ELSE.
        gs_header = go_po->if_purchase_order_mm~get_data( ).
        WRITE: / gs_header-ebeln,
                 gs_header-bukrs,
                 gs_header-bsart,
                 gs_header-lifnr.
      ENDIF.
      gt_items = go_po->if_purchase_order_mm~get_items( ).
      LOOP AT gt_items INTO gs_itm.
        gs_item = gs_itm-item->get_data( ).
        write: / gs_item-ebelp,
                 gs_item-matnr,
                 gs_item-menge.
      ENDLOOP.
    END-OF-SELECTION.
    Regards
      Uwe

  • Assign serialnumbers to production order

    Hi all,
    I have to assign serialnumbers (equipments) to production orders. Manually I can do this via CO02, but I have to do this in ABAP.
    I tried function module SERNR_ADD_TO_PP but I was not able to assign serialnumbers with it. Actually nothing happened; no error messages or any other hints.
    Does anybody have an idea, how to use this function module or how to add serialnumber to production orders?
    Thanks in advance
    Holger

    DATA: GS_AFVGD_SS LIKE AFVGD.
    DATA: GS_AFVGD LIKE AFVGD,
          GS_CAUFVD_PO LIKE CAUFVD,
          GS_AFPOD_PO LIKE AFPOD,
          GS_CAUFVD_CO LIKE CAUFVD.
    DATA: L_NUM_SERNO LIKE SY-TABIX.
    CONSTANTS: L_PPORD LIKE CAUFVD-AUTYP VALUE '10'.
    DATA: GT_SERNOS LIKE E1RMSNO OCCURS 0 WITH HEADER LINE.
    GS_AFPOD_PO-SERNP = 'ZLS'.
    GS_CAUFVD_CO-MATNR = '00000000000AB24C24'.
    L_NUM_SERNO = '1'.
    GS_AFPOD_PO-POSNR = '0001'.
    gs_caufvd_co-auart = 'ZP01'.
    GS_AFPOD_PO-DWERK = 'NTC'.
    GS_CAUFVD_CO-AUFNR = '000001006421'.
    gt_sernos-sernr = '25000211'.
    append gt_sernos.
    CALL FUNCTION 'SERNR_ADD_TO_PP'
             EXPORTING
                  PROFILE               = GS_AFPOD_PO-SERNP
                  MATERIAL              = GS_CAUFVD_CO-MATNR
                  QUANTITY              = L_NUM_SERNO
                  PPAUFNR               = GS_CAUFVD_CO-AUFNR
                  PPPOSNR               = GS_AFPOD_PO-POSNR
                  PPAUTYP               = L_PPORD
                  PPAUFART              = GS_CAUFVD_CO-AUART
                  PMRSORD               = SPACE
                  PPWERK                = GS_AFPOD_PO-DWERK
                  M_CHARGE              =
                  KMATNR                =
                  CUOBJ                 =
                  J_VORGANG             = 'PMP1'
             IMPORTING
                  ANZSN                 = L_NUM_SERNO
                  ZEILEN_ID             =
                  SERIAL_COMMIT         =
             TABLES
                  SERNOS                = GT_SERNOS
             EXCEPTIONS
                  KONFIGURATIONS_ERROR  = 1
                  SERIALNUMBER_ERRORS   = 2
                  SERIALNUMBER_WARNINGS = 3
                  NO_PROFILE_OPERATION  = 4
                  OTHERS                = 5.
                  CALL FUNCTION 'SERIAL_LISTE_POST_PP'
                   EXPORTING
                    MEMORY_ID_STATUS       = ' '.
                  TABLES
                   TAB_CUOBJ              = P_TAB_CUOBJ.
    if sy-subrc = 0.
    commit work and wait.
    endif.

  • How track changes in production order which is already Read PP master data

    Hi Gurus,
    Due to some unavoidable reason my client has to do Read PP master data time and again, now my client having a requirement that want to see what has been changes in Production Order.
    We already created 1 report for that which tracks whatever has been changed in Production Order but having a constraint in it.  That It could not be able to distinguish to which order READ PP MASTER DATA done.
    So my query is how to map that in report. As sytem Status directly changed to CRTD phase.
    Any table which can track the changes once the order been through with READ PP MASTER DATA?
    As there are huge number of Production Order so we can go and open each order to see the Status changes in each and every order.
    Hope to get a reply soon.
    Regards,
    Sap User

    Hi,
    A suggestion:
    Change the specification as, log changes at each save instead of Read PP Master Data, as the changes would become effective only upon save. So if this is acceptable then 2 options, 1. Go with OCM feature or 2. Refer note - 390635
    Revert if you face any issues.
    Regards,
    Vivek

  • How can read BOM component date before save the production order??

    Hi Experts,
    In our company, we need to develop a program to read the BOM component data of the production order
    before we save the production order.
    That for example ,when we create and release a production order , before we save the production
    order,we want a porgram to read the BOM component data. If some component data can meet our
    requriement (may be if there is material requirement quantity>100 EA),then the system will pop up a
    small dialog box to remind us.
    There is user exit PPCO0007 and PPCO0007.But it seems they only can read the head data of the
    production order before we save the production order. And the BOM component data of the production
    order are saved in the RESB(Reservation Table).So if we do not save the production order,all the BOM
    component data are not saved in the RESB table.
    So how can slove the problem??
    How can read component date before save the production order??
    Are there any other user exit we can use???

    Hi Just wanted to check am I right that you are trying to check if you have enough Materials Available before you release or Save the order right ? if this is your business objective then when you create order you have material availability tab which checks and gives error if shortage is there. Please let me know if is this wht you asking for ?

  • How to read text in Production Memo tab of Production Order using READ_TEXT

    Hi all,
    Please help me, I was able to develop a program that using READ_TEXT function module to read the Production Order long text.
    Now my requirement is to read the text in the Production memo tabe of production order.
    Can some one tell mee how to do it? the same program is now not working.
    do i need to do any changes?

    Hi,
    TDOBJECT --> AUFK
    TDID -->KOPF
    IF your given same means it's correct i think check your coding
    i will give u sample coding analyze .
    REPORT  z_test1.
    TABLES:
      thead.
    PARAMETERS:
      p_vbeln TYPE vbak-vbeln.
    PARAMETERS:
      p_textid TYPE thead-tdid.
    DATA:
      BEGIN OF t_thead OCCURS 0.
            INCLUDE STRUCTURE thead.
    DATA:
    END OF t_thead.
    DATA:
      w_line TYPE i,
      w_idx TYPE i,
      w_flag TYPE i.
    DATA:
      BEGIN OF t_tline OCCURS 0.
            INCLUDE STRUCTURE tline.
    DATA:
    END OF t_tline.
    DATA:
      w_test TYPE thead-tdname,
      w_temp TYPE string VALUE 'TEST'.
    START-OF-SELECTION.
      w_test = p_vbeln.
      CALL FUNCTION 'READ_TEXT'
        EXPORTING
          client                  = sy-mandt
          id                      = p_textid
          language                = sy-langu
          name                    = w_test
          object                  = 'VBBK'
        TABLES
          lines                   = t_tline
        EXCEPTIONS
          id                      = 1
          language                = 2
          name                    = 3
          not_found               = 4
          object                  = 5
          reference_check         = 6
          wrong_access_to_archive = 7
          OTHERS                  = 8.
      IF sy-subrc NE 0.
        MESSAGE 'HEADER TEXT NOT FOUND' TYPE 'I'.
      ENDIF.
    END-OF-SELECTION.
      LOOP AT t_tline.
        IF t_tline-tdline = w_temp.
          w_flag = 1.
        ENDIF.
      ENDLOOP.
      IF w_flag NE 1.
        t_tline-tdline = w_temp.
        APPEND t_tline.
      ENDIF.
      REFRESH t_thead.
      t_thead-tdobject = 'VBBK'.
      t_thead-tdname = w_test.
      t_thead-tdid =   p_textid.
      t_thead-tdspras = sy-langu.
      APPEND t_thead.
      CALL FUNCTION 'SAVE_TEXT'
        EXPORTING
          client          = sy-mandt
          header          = t_thead
          savemode_direct = 'X'
        TABLES
          lines           = t_tline
        EXCEPTIONS
          id              = 1
          language        = 2
          name            = 3
          object          = 4.
      IF sy-subrc NE 0.
        WRITE: / 'ERROR'.
      ELSE.
        COMMIT WORK.
        WRITE: / 'TEXT SAVED'.
      ENDIF.
      LOOP AT t_tline.
        WRITE: / t_tline-tdline.
      ENDLOOP.
    Regards
    swamy

  • Batch processing function to read PP data for production orders

    Hi,
      As we know, If BOMs changed we can use T-code: CO02, then follow the menu "Function --> read PP master data" to get up-to-date BOM. But If there're many production orders need to be read PP master data again, I have to do it one by one.
       My question is, If I have a list of production orders, could I do it in batches? and What's the transaction for it?
    Please kindly Advise.
    Best Regards.

    Hi,
      As we know, If BOMs changed we can use T-code: CO02, then follow the menu "Function --> read PP master data" to get up-to-date BOM. But If there're many production orders need to be read PP master data again, I have to do it one by one.
       My question is, If I have a list of production orders, could I do it in batches? and What's the transaction for it?
    Please kindly Advise.
    Best Regards.

  • Need FM or Logic to read the Classification of Production Order

    Hi All,
    I am going to CO03 transaction and display Production Order . ThenI  am following path:  Header-->Classification Controlling. Now i can see the General  Characterstic descritpton and Value.
    Can some one give me the FM or logic, to read the Controlling Classification of Production Order.
    Thanks,
    Suresh kUmar.

    Hi,
    If the need is to read those values, then you can do that directly from the table.
    Pass production order number to AUFK-AUFNR, then read OBJNR.
    Pass AUFK-OBJNR to AUSP-OBJNR, read values from AUSP-ATWRT.
    If you want the characteristic description as well, then pass AUSP-ATINN to CABNT-ATINN & read CABNT-ATBEZ. (Ensure you also specify the language key).
    Hope it clarifies.
    Regards,
    Vivek

  • How to collective read PP master data in Production order?

    Hi: Guys
    Please tell me how to collective read PP master data in production orders. in COHV, I can find out some collective functions but read PP master data.
    Thanks
    Henry

    Read PP master data is only to update routing and BOM in production order if it is already created to effect the changesmade in routing and BOM.    I think in that collective option is not possible.  
    Regards
    KrishnamurthyDSS

  • Open Production Order

    Hi have to create a report that has open sales order , open po , open pur req , open planned order and open Production order.
    I need the logic for OPEN PRODUCTION ORDERS.
    The status of the production orders are maintained in JEST Table .
      I need logic to elimate the completed production orders during my selcet . Since JEST Table has multiple entries and for some orders that are released the 'DELV'  status wil not be maintained at all at that time.
    I wil really appreciate your help , if you can tell me how to emliminate the completed production orders during my select query to get the open prod orders.
    Is there any fun moduel or bapi that wil give the Open prod orders ?? or any std report that gives open PO??
    Thanks

    for this you can use the Function STATUS_TEXT_EDIT , for this pass Objnr (get the objnr from AUFK table using the production order) it will give you the status in the LINE exporting parameters.
    Import parameters               Value
    CLIENT                          100
    FLG_USER_STAT
    OBJNR                           QM000200000010
    ONLY_ACTIVE                     X
    SPRAS                           EN
    BYPASS_BUFFER
    Export parameters               Value
    ANW_STAT_EXISTING
    E_STSMA
    LINE                            OSNO NOTE   "this is the status text
    USER_LINE
    STONR                           00
    if line CS 'DELV'
    "ignore the Order
    endif.

Maybe you are looking for