What are the Mandatory Fields in Transaction ME51

Hello Seniors,
I have a requirement about purchase order creation. In this process, I am using the BAPI named   " BAPI_PO_CREATE1 ". I have passed all the fields but when I debug and look into the internal tables, I couldn't find certain records. I even debugged " bapiret2"  and I see an error which reads "" All mandatory fields are missing"". I have even created a PO  in ME51 and found out the mandatory fields but in vain. BAPIRET2 still says, there are some more mandatory fields missing. I need to know what are all the mandatory fields to create a Purchase order using TCODE - ME51.
Your reply is most awaited and rewarded.
Thanks and Regards,
MARKIV

hi ,
Functionality
Function module BAPI_PO_CREATE1 enables you to create purchase orders. The BAPI uses the technology behind the Enjoy purchase order transaction ( ME21N).
Alternatively, the IDoc type PORDCR1 is available. The data from this IDoc automatically populates the interface parameters of the function module BAPI_PO_CREATE1.
Functionality in Detail
Authorization
The following authorization objects are checked when an Enjoy purchase order is created (activity 01):
M_BEST_BSA (document type in PO)
M_BEST_EKG (purchasing group in PO)
M_BEST_EKO (purchasing organization in PO)
M_BEST_WRK (plant in PO)
Controlling adoption of field values via X bar
For most tables, you can determine via your own parameters in the associated X bar in each case (e.g. PoItemX) whether fields are to be set initial, values inserted via the interface, or default values adopted (e.g. from Customizing or master records) (for example, it is not mandatory to adopt the material group from an underlying purchase requisition - you can change it with the BAPI).
Transfer
Header data
The header data of the Enjoy purchase order is transferred in the table PoHeader.
Item data
The item data of the Enjoy purchase order is stored in the table PoItem (general item data). The delivery schedule lines are stored in the table PoSchedule.
Use the table PoAccount to specify the account assignment information. If account assignments have been specified for services and limits, you show the relevant account assignment line in PoAccount in the table PoSrvAccessValues via the package number of the service or the limit.
Services and limits
Services, free limits and limits with contract reference can be specified in the tables PoServices, PoLimits, and PoContractLimits.
Conditions
Conditions are transferred in the table PoCond; header conditions in the table PoCondHeader. Price determination is reinitiated via the parameter CALCTYPE in the table PoItem.
Vendor and delivery address
The vendor's address can be specified individually in the table PoAddrVendor; the delivery address in the table PoAddrDelivery. If you do not make any individual specification, the fields will be populated via the central address managementfacility.
Note
In this method, the following restrictions apply with regard to addresses:
Addresses can only be created with this method - they cannot be changed. You can only change address data with the method BAPI_ADDRESSORG_CHANGE.
When you create addresses, they are not checked by the method. An Enjoy purchase order may therefore contain faulty address data.
Partner roles
The partners can be maintained individually via the table PoPartner (with the exception of the partner role "vendor").
Import/export data
Import/Export data can be specified per item in the table PoExpImpItem. Foreign trade data can only be transferred as default data for new items.
Texts
Header and item texts can be transferred in the tables PoTextHeader and PoTextItem. Texts for services are imported in the table PoServicesText.
Version Management
You can make use of the Version Management facility via the table AllVersions.
Return
The PO number is returned in the parameter ExpPurchaseOrder. In addition, all information except the service and export/import tables is placed in the output structures.
Return messages
Messages are returned in the parameter Return. This also contains information as to whether interface data has been wrongly or probably wrongly (heuristical interface check) populated. If a PO has been successfully created, the PO number is also placed in the return table with the appropriate message.
Example
Example of population of BAPI interface in the Function Builder
Parameter: POHEADER
COMP_CODE = 1000
DOC_TYPE = NB
ITEM_INTVL = 00001
VENDOR = 0000001000
PMNTTRMS = 0001
PURCH_ORG = 1000
PUR_GROUP = 001
CURRENCY = EUR
Parameter: POHEADERX
COMP_CODE = X
DOC_TYPE = X
ITEM_INTVL = X
VENDOR = X
PMNTTRMS = X
PURCH_ORG = X
PUR_GROUP = X
Parameter: POITEM
PO_ITEM = 00001
MATERIAL = 100-100
PLANT = 1000
STGE_LOC = 0001
QUANTITY = 15.000
TAX_CODE = V0
ITEM_CAT = 0
ACCTASSCAT = K
Parameter: POITEMX
PO_ITEM = 00001
MATERIAL = X
PLANT = X
STGE_LOC = X
QUANTITY = X
TAX_CODE = X
ITEM_CAT = X
ACCTASSCAT = X
Parameter: POSCHEDULE
PO_ITEM = 00001
SCHED_LINE = 0001
DELIVERY_DATE = 02.12.2002
QUANTITY = 6.000
PO_ITEM = 00001
SCHED_LINE = 0002
DELIVERY_DATE = 03.12.2002
QUANTITY = 5.000
PO_ITEM = 00001
SCHED_LINE = 0003
DELIVERY_DATE = 04.12.2002
QUANTITY = 4.000
Parameter: POSCHEDULEX
PO_ITEM = 00001
SCHED_LINE = 0001
PO_ITEMX = X
SCHED_LINEX = X
DELIVERY_DATE = X
QUANTITY = X
PO_ITEM = 00001
SCHED_LINE = 0002
PO_ITEMX = X
SCHED_LINEX = X
DELIVERY_DATE = X
QUANTITY = X
PO_ITEM = 00001
SCHED_LINE = 0003
PO_ITEMX = X
SCHED_LINEX = X
DELIVERY_DATE = X
QUANTITY = X
Parameter: POACCOUNT
PO_ITEM = 00001
SERIAL_NO = 01
QUANTITY = 15.000
GL_ACCOUNT = 0000400000
COSTCENTER = 0000001000
CO_AREA = 1000
Parameter: POACCOUNTX
PO_ITEM = 00001
SERIAL_NO = 01
QUANTITY = X
GL_ACCOUNT = X
COSTCENTER = X
CO_AREA = X
Parameter: POCOND
ITM_NUMBER = 000001
COND_ST_NO = 001
COND_TYPE = PB00
COND_VALUE = 79.900000000
CURRENCY = EUR
CURRENCY_ISO = EUR
COND_UNIT = KG
COND_P_UNT = 1
CHANGE_ID = U
Parameter: POCONDX
ITM_NUMBER =  000001
COND_ST_NO =  000
ITM_NUMBERX =  X
COND_TYPE =  X
COND_VALUE =  X
CURRENCY =  X
CHANGE_ID =  X
Parameter: POPARTNER
PARTNERDESC =  OA
LANGU =  EN
BUSPARTNO =  0000001100
PARTNERDESC =  GS
LANGU =  EN
BUSPARTNO =  0000001200
PARTNERDESC =  PI
LANGU =  EN
BUSPARTNO =  0000001000
Help in the Case of Problems
1. Note 197958 lists answers to frequently asked questions (FAQs). (Note 499626 contains answers to FAQs relating to External Services Management.)
2. If you have detected an error in the function of a BAPI, kindly create a reproducible example in the test data directory in the Function Builder (transaction code SE37). Note 375886 tells you how to do this.
3. If the problem persists, please create a Customer Problem Message for the componente MM-PUR-PO-BAPI, and document the reproducible example where necessary.
Customer Enhancements
The following user exits (function modules) are available for the BAPI BAPI_PO_CREATE1:
EXIT_SAPL2012_001 (at start of BAPI)
EXIT_SAPL2012_003 (at end of BAPI)
The following user exits (function modules) are available for the BAPI BAPI BAPI_PO_CHANGE:
EXIT_SAPL2012_002 (at start of BAPI)
EXIT_SAPL2012_004 (at end of BAPI)
These exits belong to the enhancement SAPL2012 (see also transaction codes SMOD and CMOD).
There is also the option of populating customer-specific fields for header, item, or account assignment data via the parameter EXTENSIONIN.
Further information
1. Note 197958 contains up-to-date information on the purchase order BAPIs.
2. If you test the BAPIs BAPI_PO_CREATE1 or BAPI_PO_CHANGE in the Function Builder (transaction code SE37), no database updates will be carried out. If you need this function, please take a look at Note 420646.
3. The BAPI BAPI_PO_GETDETAIL serves to read the details of a purchase order. The BAPI cannot read all details (e.g. conditions). However, you can use the BAPI BAPI_PO_CHANGE for this purpose if only the document number is populated and the initiator has change authorizations for purchase orders.
4. Frequently used BAPIs for purchase orders are BAPI_PO_CREATE, BAPI_PO_CREATE1, BAPI_PO_CHANGE, BAPI_PO_GETDETAIL, BAPI_PO_GETITEMS, BAPI_PO_GETITEMSREL, and BAPI_PO_GETRELINFO.
5. For more information on purchase orders, refer to the SAP library (under MM Purchasing -> Purchase Orders) or the Help for the Enjoy Purchase Order, or choose the path Tools -> ABAP Workbench -> Overview -> BAPI Explorer from the SAP menu.
regards
reena

Similar Messages

  • What are the mandatory fields while creation of material master in differen

    what are the mandatory fields while creation of material master in different views?

    Hi Gopi,
      This is purely depends on the function configuration, which would be done MM consultants.  Kindly check with them.
    thanks & regards
    Kishore Kumar Maram

  • What are the mandatory fields needed to setup/register the SIP phone manually in CUCM

    What are the mandatory fields needed to setup/register the SIP phone manually.Also, if someone can let me know the mandatory fields for Cisco based SIP phone and also the third party SIP hard phones like Avaya or any other Third party SIP phones both Soft phone and physical phone requirements...in CUCM
    Please suggest...I need to know if MAC address is mandatory for all Cisco SIP phone to setup 

    http://www.cisco.com/c/en/us/td/docs/voice_ip_comm/cucm/admin/7_1_2/ccmcfg/bccm-712-cm/b09sip3p.html
    http://www.cisco.com/c/en/us/support/docs/voice-unified-communications/unified-communications-manager-version-70/112110-phone-add-00.html

  • What are the mandatory fields in DTW for opening balances imports?

    Hi All,
    As the title mentions could you please help by listing all the mandatory fields in DTW for importing opening balances ?
    Thank you for your help,
    MB

    Hi Gordon and all,
    I have a look at the SDk help files and almost cried but am i right in thinking it is Account Code, Debit and Credit fields that are the mandatory fields for opening balances?
    These sdk help files are awful by the way...really awful.
    MB

  • RV_INVOICE_CREATE for this FM what are the mandatory fields

    Hi guru,
            in my process development, first i am creating the sales order using the BAPI FM SD_SALESDOCUMENT_CREATE, From this FM i get the sales order no, after that i use this fm RV_INVOICE_CREATE , then i pass the VBELN (sales order no), but it is not created the invoice no,
    what are the fields i have to pass for this FM.
    What is the use of this FM : RV_INVOICE_DOCUMENT_ADD, is it useful in my scenario.
    plz give the details briefly
    thanks & regards
         raj.

    HI ,
    call function 'RV_INVOICE_CREATE'
        exporting
          with_posting = 'B'
          vbsk_i       = i_xvbsk
        importing
          vbsk_e       = i_xvbsk
        tables
          xkomv        = xkomv
          xvbpa        = xvbpa
          xvbrp        = xvbrp
          xvbrk        = xvbrk
          xkomfk       = i_komfk
          xthead       = xthead
          xvbfs        = i_vbfs
          xvbss        = i_vbss.
    These table are not optional , these all are mand...
    Reagrds,
    Bharani

  • What are the Mandatory fields????

    Hi.... Experts...
       Please spend your valueble time for me.... I can get back to you with 10 points....
    Here I got a requirement to create contract with VA41 transaction...
    But I am in confusion with feilds which should be must record...
    Please guide me on mandatory fields of VA41 transaction....
    Thanks,
    Naveen.I

    Hi,
    When ever you want to know the required fields for any transaction just try to run the Transaction In SHDB in forgroud mode with a recording name.
    You will easily get to know the required fields to be entered for a given transaction.
    Sometimes when we run this VA41, eventhough some fields are not mandatory we dont pass them but we willnt b able to create the document eventhough some fields are not mandatory to fill> To have the clear idea abt the manadotry fields try to run in SHDB.
    for this VA41, ther mandatory fields are-
    contract type (VBAK-AUART)
    Sales Area is a combintaiotn of SAles Org, SAles divnsion, Distirbution channel hende all 3 are required to be filled.
    1st screen-
    Sales Area(VBAK-VKORG)
    Division(VBAK-SPART)
    D.Channel(VBAK-VTWEG),
    2nd screen-
    Customer code(kunnr),
    Contract validity,
    material code(matnr),
    quantity
    plant(werks).
    Best Wishes,
    Chandralekha
    Edited by: Craig Cmehil on Jun 30, 2008 11:24 AM

  • What are the mandatory fields of BAPI for creating a new purchase order?

    Hi friends,
    I am very new to XI.My Boss has given me task to create a purchase order using BAPI. I want step by step guide to create it.How will i know which fields are mandatory for BAPI_PO_CREATE?

    Hi Shweta,
    However It depends upon the configuration that which fields to be passed.
    But you can check this by running the BAPI in the SAP system by using transaction Se37.
    The most commanly used fields are:
    HEADER :
    DOC_TYPE                       NB
    CO_CODE                        9001
    PURCH_ORG                    9001
    PUR_GROUP                    900
    VENDOR                         100000
    ITEM
    PO_ITEM                        00001
    MATERIAL                      MM10
    STORE_LOC                   01
    MAT_GRP                       01
    SHORT_TEXT                  SERVICE (optional )
    PLANT                            9001
    NET_PRICE                    500
    ITEM_SCHEDULE
    PO_ITEM                        00001
    SERIAL_NO                      0001
    DELIV_DATE                     05.04.2008
    QUANTITY                                  1.000
    You can run the BAPI with some test data... if something is missing the BAPI will ask for it... the Results are displayed in Return Table.
    Regrads,
    Sachin

  • What are the Corresponding fields in CRM for sales order in ECC

    HI! Experts,
    While creating a standard sales order in CRM I want to poulate these fields in ECC Sales order, these fields are
    VBKD-BSARK - Purchase order type
    VBAK-BNAME - Name: user ordered
    VBKD-IHREZ - Web Confirmation Number
    VBAK-TELF1 - Telephone number
    Or the other way round I want to know what are the corresponding fields in CRM for these fields so that when I pass the data in crmd_order in those fields it gets populated in the above mentioned fields.
    Thanks and Regards
    Mayank

    Mayank,
    May I suggest you to create an Order in R/3 with these fields and check that back in CRM. This is not as easy as it may sound. It is possible that some of these fields are "determined" by the system - for example the "Sold-To"'s first telephone number maintained in VBAK-TELF1. So, though it becomes a part of the Order header in R/3, CRM, generally doesn't duplicate them in the transaction but allows to refer back to the master data from the transaction!
    Check the following fields in CRM and see if you find the data you require.
    VBKD-BSARK - Purchase order type There is a field in CRM that "holds" this value. ACTIVITY CATEGORY. This can be found in the ACTIVITY_H set of the transaction. Filed name CATEGORY. Problem with this is, - "Category Type" of a CRM Activity to be mapped to PO type? Didn't workout good for us since the master data for both vary widely. So, we used custom Header Extension data for this (EEWB). So, you have to work
    VBAK-BNAME - Name: user ordered Is usually CREATED_BY in the CRM Order Header (CRMD_ORDERADM_H). But this fills up the VBAK_ERNAM bit not the BNAME.See the next item, that may give a clue if this is related to the next item.
    VBAK-TELF1 - Telephone number is usually "determined". Usually the Sold-To's first telephone number maintained in the Business Partner "Communication" section for that Sold-To.
    VBKD-IHREZ - Web Confirmation Number Actually it is Customer's or vendor's internal reference as per standard use. Looks like your customer is using it for custom purposes. Well, if you maintain the relationship  "Is Correwspondence Recipient for" with the Sold-To partner in CRM, and maintain the details of this Person, then this will be transferred to R/3.
    Hint: Once you have the R/3 order in CRM, try using the Report program (SE38)  CRM_ORDER_READ in CRM. This is a good tool to "dissect and see" and order in CRM. The program needs only the Transaction Number as the input.
    Easwar Ram
    http://www.parxlns.com

  • What are the parameters in Call transaction method?

    Hi ABAPER'S,
        Please give me what are the parameters in call transaction method?
    Thanks,
    Prakash

    Processing batch input data with CALL TRANSACTION USING is the faster of the two recommended data transfer methods. In this method, legacy data is processed inline in your data transfer program.
    Syntax:
    CALL TRANSACTION <tcode>
    USING <bdc_tab>
    MODE  <mode>
    UPDATE  <update>
    <tcode> : Transaction code
    <bdc_tab> : Internal table of structure BDCDATA.
    <mode> : Display mode:
    A
    Display all
    E
    Display errors only
    N
    No display
    <update> : Update mode:
    S
    Synchronous
    A
    Asynchronous
    L
    Local update
    A program that uses CALL TRANSACTION USING to process legacy data should execute the following steps:
    Prepare a BDCDATA structure for the transaction that you wish to run.
    With a CALL TRANSACTION USING statement, call the transaction and prepare the BDCDATA structure. For example:
    CALL TRANSACTION 'TFCA' USING BDCDATA
    MODE 'A'
    UPDATE 'S'.
    MESSAGES INTO MESSTAB.
    IF SY-SUBRC <> 0.
    <Error_handling>.
    ENDIF.
    The MODE Parameter
    You can use the MODE parameter to specify whether data transfer processing should be displayed as it happens. You can choose between three modes:
    A Display all. All screens and the data that goes in them appear when you run your program.
    N No display. All screens are processed invisibly, regardless of whether there are errors or not. Control returns to your program as soon as transaction processing is finished.
    E Display errors only. The transaction goes into display mode as soon as an error in one of the screens is detected. You can then correct the error.
    The display modes are the same as those that are available for processing batch input sessions.
    The UPDATE Parameter
    You use the UPDATE parameter to specify how updates produced by a transaction should be processed. You can select between these modes:
    A Asynchronous updating. In this mode, the called transaction does not wait for any updates it produces to be completed. It simply passes the updates to the SAP update service. Asynchronous processing therefore usually results in faster execution of your data transfer program.
    Asynchronous processing is NOT recommended for processing any larger amount of data. This is because the called transaction receives no completion message from the update module in asynchronous updating. The calling data transfer program, in turn, cannot determine whether a called transaction ended with a successful update of the database or not.
    If you use asynchronous updating, then you will need to use the update management facility (Transaction SM12) to check whether updates have been terminated abnormally during session processing. Error analysis and recovery is less convenient than with synchronous updating.
    S Synchronous updating. In this mode, the called transaction waits for any updates that it produces to be completed. Execution is slower than with asynchronous updating because called transactions wait for updating to be completed. However, the called transaction is able to return any update error message that occurs to your program. It is much easier for you to analyze and recover from errors.
    L Local updating. If you update data locally, the update of the database will not be processed in a separate process, but in the process of the calling program. (See the ABAP keyword documentation on SET UPDATE TASK LOCAL for more information.)
    The MESSAGES Parameter
    The MESSAGES specification indicates that all system messages issued during a CALL TRANSACTION USING are written into the internal table <MESSTAB> . The internal table must have the structure BDCMSGCOLL .
    You can record the messages issued by Transaction TFCA in table MESSTAB with the following coding:
    (This example uses a flight connection that does not exist to trigger an error in the transaction.)
    DATA: BEGIN OF BDCDATA OCCURS 100.
    INCLUDE STRUCTURE BDCDATA.
    DATA: END OF BDCDATA.
    DATA: BEGIN OF MESSTAB OCCURS 10.
    INCLUDE STRUCTURE BDCMSGCOLL.
    DATA: END OF MESSTAB.
    BDCDATA-PROGRAM = 'SAPMTFCA'.
    BDCDATA-DYNPRO = '0100'.
    BDCDATA-DYNBEGIN = 'X'.
    APPEND BDCDATA.
    CLEAR BDCDATA.
    BDCDATA-FNAM = 'SFLIGHT-CARRID'.
    BDCDATA-FVAL = 'XX'.
    APPEND BDCDATA.
    BDCDATA-FNAM = 'SFLIGHT-CONNID'.
    BDCDATA-FVAL = '0400'.
    APPEND BDCDATA.
    CALL TRANSACTION 'TFCA' USING BDCDATA MODE 'N'
    MESSAGES INTO MESSTAB.
    LOOP AT MESSTAB.
    WRITE: / MESSTAB-TCODE,
    MESSTAB-DYNAME,
    MESSTAB-DYNUMB,
    MESSTAB-MSGTYP,
    MESSTAB-MSGSPRA,
    MESSTAB-MSGID,
    MESSTAB-MSGNR.
    ENDLOOP.
    The following figures show the return codes from CALL TRANSACTION USING and the system fields that contain message information from the called transaction. As the return code chart shows, return codes above 1000 are reserved for data transfer. If you use the MESSAGES INTO <table> option, then you do not need to query the system fields shown below; their contents are automatically written into the message table. You can loop over the message table to write out any messages that were entered into it.
    Return codes:
    Value
    Explanation
    0
    Successful
    <=1000
    Error in dialog program
    > 1000
    Batch input error
    System fields:
    Name:
    Explanation:
    SY-MSGID
    Message-ID
    SY-MSGTY
    Message type (E,I,W,S,A,X)
    SY-MSGNO
    Message number
    SY-MSGV1
    Message variable 1
    SY-MSGV2
    Message variable 2
    SY-MSGV3
    Message variable 3
    SY-MSGV4
    Message variable 4
    Error Analysis and Restart Capability
    Unlike batch input methods using sessions, CALL TRANSACTION USING processing does not provide any special handling for incorrect transactions. There is no restart capability for transactions that contain errors or produce update failures.
    You can handle incorrect transactions by using update mode S (synchronous updating) and checking the return code from CALL TRANSACTION USING. If the return code is anything other than 0, then you should do the following:
    write out or save the message table
    use the BDCDATA table that you generated for the CALL TRANSACTION USING to generate a batch input session for the faulty transaction. You can then analyze the faulty transaction and correct the error using the tools provided in the batch input management facility.

  • What are the key fields used to group double orders in t-code SDD1?

    What are the key fields used to group double orders in t-code SDD1?
    Cheers,
    VT

    Hi,
    You can group the duplicate sales documents with the help of the following fields,
    Sold-To-Party,Document type,date and sales area details.
    Regards,
    Gopal.

  • Can any one say What are the mandatory parameters in BAPI_GOODSMVT_CREATE

    Hi,
    Can any one say What are the mandatory parameters in
    BAPI_GOODSMVT_CREATE.
    Helpful answer will be rewarded.

    Hi,
    The following is an abap program making used of the BAPI function BAPI_GOODSMVT_CREATE to do Goods Receipts for Purchase Order after importing the data from an external system.
    BAPI TO Upload Inventory Data
    GMCODE Table T158G - 01 - MB01 - Goods Receipts for Purchase Order
                         02 - MB31 - Goods Receipts for Prod Order
                         03 - MB1A - Goods Issue
                         04 - MB1B - Transfer Posting
                         05 - MB1C - Enter Other Goods Receipt
                         06 - MB11
    Domain: KZBEW - Movement Indicator
         Goods movement w/o reference
    B - Goods movement for purchase order
    F - Goods movement for production order
    L - Goods movement for delivery note
    K - Goods movement for kanban requirement (WM - internal only)
    O - Subsequent adjustment of "material-provided" consumption
    W - Subsequent adjustment of proportion/product unit material
    report zbapi_goodsmovement.
    parameters: p-file like rlgrap-filename default
                                     'c:\sapdata\TEST.txt'.
    parameters: e-file like rlgrap-filename default
                                     'c:\sapdata\gdsmvterror.txt'.
    parameters: xpost like sy-datum default sy-datum.
    data: begin of gmhead.
            include structure bapi2017_gm_head_01.
    data: end of gmhead.
    data: begin of gmcode.
            include structure bapi2017_gm_code.
    data: end of gmcode.
    data: begin of mthead.
            include structure bapi2017_gm_head_ret.
    data: end of mthead.
    data: begin of itab occurs 100.
            include structure bapi2017_gm_item_create.
    data: end of itab.
    data: begin of errmsg occurs 10.
            include structure bapiret2.
    data: end of errmsg.
    data: wmenge like iseg-menge,
          errflag.
    data: begin of pcitab occurs 100,
            ext_doc(10),           "External Document Number
            mvt_type(3),           "Movement Type
            doc_date(8),           "Document Date
            post_date(8),          "Posting Date
            plant(4),              "Plant
            material(18),          "Material Number
            qty(13),               "Quantity
            recv_loc(4),           "Receiving Location
            issue_loc(4),          "Issuing Location
            pur_doc(10),           "Purchase Document No
            po_item(3),            "Purchase Document Item No
            del_no(10),            "Delivery Purchase Order Number
            del_item(3),           "Delivery Item
            prod_doc(10),          "Production Document No
            scrap_reason(10),      "Scrap Reason
            upd_sta(1),            "Update Status
          end of pcitab.
    call function 'WS_UPLOAD'
      exporting
        filename                      = p-file
        filetype                      = 'DAT'
    IMPORTING
      FILELENGTH                    =
      tables
        data_tab                      = pcitab
    EXCEPTIONS
      FILE_OPEN_ERROR               = 1
      FILE_READ_ERROR               = 2
      NO_BATCH                      = 3
      GUI_REFUSE_FILETRANSFER       = 4
      INVALID_TYPE                  = 5
      OTHERS                        = 6
    if sy-subrc <> 0.
      message id sy-msgid type sy-msgty number sy-msgno
              with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      exit.
    endif.
    gmhead-pstng_date = sy-datum.
    gmhead-doc_date = sy-datum.
    gmhead-pr_uname = sy-uname.
    gmcode-gm_code = '01'.   "01 - MB01 - Goods Receipts for Purchase Order
    loop at pcitab.
      itab-move_type  = pcitab-mvt_type.
      itab-mvt_ind    = 'B'.
      itab-plant      = pcitab-plant.
      itab-material   = pcitab-material.
      itab-entry_qnt  = pcitab-qty.
      itab-move_stloc = pcitab-recv_loc.
      itab-stge_loc   = pcitab-issue_loc.
      itab-po_number  = pcitab-pur_doc.
      itab-po_item    = pcitab-po_item.
      concatenate pcitab-del_no pcitab-del_item into itab-item_text.
      itab-move_reas  = pcitab-scrap_reason.
      append itab.
    endloop.
    loop at itab.
      write:/ itab-material, itab-plant, itab-stge_loc,
              itab-move_type, itab-entry_qnt, itab-entry_uom,
              itab-entry_uom_iso, itab-po_number, itab-po_item,
                                                  pcitab-ext_doc.
    endloop.
    call function 'BAPI_GOODSMVT_CREATE'
      exporting
        goodsmvt_header             = gmhead
        goodsmvt_code               = gmcode
      TESTRUN                     = ' '
    IMPORTING
        goodsmvt_headret            = mthead
      MATERIALDOCUMENT            =
      MATDOCUMENTYEAR             =
      tables
        goodsmvt_item               = itab
      GOODSMVT_SERIALNUMBER       =
        return                      = errmsg
    clear errflag.
    loop at errmsg.
      if errmsg-type eq 'E'.
        write:/'Error in function', errmsg-message.
        errflag = 'X'.
      else.
        write:/ errmsg-message.
      endif.
    endloop.
    if errflag is initial.
      commit work and wait.
      if sy-subrc ne 0.
        write:/ 'Error in updating'.
        exit.
      else.
        write:/ mthead-mat_doc, mthead-doc_year.
        perform upd_sta.
      endif.
    endif.
          FORM UPD_STA                                                  *
    form upd_sta.
      loop at pcitab.
        pcitab-upd_sta = 'X'.
        modify pcitab.
      endloop.
      call function 'WS_DOWNLOAD'
        exporting
          filename                      = p-file
          filetype                      = 'DAT'
    IMPORTING
      FILELENGTH                    =
        tables
          data_tab                      = pcitab
    EXCEPTIONS
      FILE_OPEN_ERROR               = 1
      FILE_READ_ERROR               = 2
      NO_BATCH                      = 3
      GUI_REFUSE_FILETRANSFER       = 4
      INVALID_TYPE                  = 5
      OTHERS                        = 6
    endform.
    *--- End of Program
    Reward for useful answers.
    Regards,
    Raj.

  • What are the corresponding field names

    Hi,
    What are the corresponding field names for the followings:
    (1) Last post goods issue date
    (2) No of finished goods movement days
    (3) Unit price per carton
    (4) Per carton quantity
    Thanks.

    hello, friend.
    you can find out the technical names (to include table and field names) by going to the fields themselves, and clicking on 'F1'.  the "Performance Assistant" will appear.  in this latter screen, go to the menu and click on the 'Technical Info' icon that looks like a hammer and wrench.  you will find your info there.
    regards.

  • What and Which are the Mandatory fields in a Purchase Order?

    Please advise how I can check what the Mandatory fields are in a purchase order and which fields are not Mandatory ?
    Also, Please advise where this information can be found in the manual?
    Thanks in advance.
    Edited by: Darpal Thiarha on Feb 26, 2008 3:49 PM

    Hi,
    mandatory fields are:
    vendor
    docdate
    delivery date
    and other fields you may test in sbo_transactionnotification procedure.
    I don`t think that this is written in manual, you have to test to add the document with few fields filled and check it.
    Petr

  • What are the following Fields meant to contain...?

    What info are the following Fields in iTunes meant to contain?
    'Comments', 'Description', 'Category', 'Grouping'?
    Thanks.

    They're not meant to contain anything, so they may be blank. However, those fields are there for various purposes. For example, pick any song or Podcast in your Library:
    Comments: this field can have a note about the song, Podcast etc. etc. Amazon use the Comments field to make a note of the Amazon ID they assign a song when they sell it to you. You can edit the Comments field if you wish, adding any note that you want, for your own purposes.
    Description: is used by Podcasters. They enter a description of their Podcast, typically a little information about that particular show. This field for a song etc, can be found (and edited) on the Videos tab of the song, (even if it's not a video!). Not all Podcasters make use of this field and not usually used in songs.
    Category: Used by iTunes Radio services, to identify the type of programming they offer. Also used by Podcasters. Not always used by either service and not usually used in songs.
    Grouping: Ah! Now, this is a good and useful field. Suppose you want a song to be in two different genres. Well, that cannot be done. However, if you want one song with genre "Rock" to also be included with all your "70's Pop" genre, simply type Rock into the grouping field and then create a Smart Playlist which has the rules: Genre is 70's Pop and Grouping is Rock. This Smart Playlist will have all the "70's Pop" genre in it and any song that you have typed "Rock" into the Grouping field. It will not have any of the other Rock genre in the list.
    Actually, a Smart Playlist can make use of any of the fields you have mentioned. So it's possible to create a Smart Playlist that picks out any song or Podcast etc. containing a particular word in the Description field and a different word in the Comments field.

  • What are the mandatory iSetup patches on top of 12.1.2

    Hi,
    Our DBA's installed following patches (on top of 12.1.1)
    '7651091' (Applications Technology Family : Patchset Oracle Applications Technology Release Update Pack 2 for 12.1 (R12.ATG_PF.B.DELTA.2))
    '7303033' (Maintenance Pack: Oracle E-Business Suite 12.1.2 Release Update Pack (RUP2)      )
    Please provide us with the mandatory patches on top or 12.1.2
    Thanks,
    Guido

    Hi Mugunthan,
    Thanks for the details regarding the isetup in R12.1.2 , currently we are in R12.1.2 and planning to use this for our functional setup migrations.
    How difficult to setup this module to use ? What are the products it is supporting in Oracle EBS ? We are doing the implementation in all the manufaturing modules.
    can you please provide the basic details to start with ?
    I have gone through the article given by you "List of Manual Setup required for iSetup to work" , Is it still required in r12.1.2 ?
    Please advice.
    Thanks and Regards,
    kannan

Maybe you are looking for