Open Purchase Order UPload Using the BAPI 's

i need to upload the open Purchase Order using the BAPI function BAPI_PO_CREATE1., below is the given fileds blod are for Header, header will Repeat for the line items,can any one help me out  using the BAIP's for upload the PO, i need sample code for this ........
Thanks & Regards
Raghu
<u>Field Name     Field Description                              Type     Length</u>
<b>EBELN             Purchasing Document Number                         CHAR     010          X
BUKRS             Company Code                                                     CHAR    004     MN10     C
EKORG             Purchasing Organization                              CHAR     004     MN00     C
EKGRP             Purchasing group                              CHAR     003          X
BSART             Order type (Purchasing)                              CHAR     004          X
LIFNR             Account Number of Vendor or Creditor                    CHAR     010          X
BEDAT             Purchase Order Date                              DATS     010          X
ZTERM             Terms of payment key                              CHAR     004          X
WAERS             Currency Key                                   CUKY     005          X
INCO1             Incoterms (part 1)                              CHAR     003          X
INCO2             Incoterms (part 2)                              CHAR     028          X</b>
EBELP             Item Number of Purchasing Document                    NUMC     005          X
EMATN             Material number                                   CHAR     018          X
WERKS             Plant                                        CHAR     004          X
LGORT             Storage location                              CHAR     004          X
EPSTP             Item category in purchasing document                    CHAR     001          X
KNTTP             Account assignment category                         CHAR     001          X
EINDT             Item delivery date                              DATS     010          X
MENGE            "Purchase order quantity (direct input, transfer of POs)"     CHAR     013          X
MEINS            Order unit                                   UNIT     003          X
NETPR            "Net price: Document currency (direct input, transfer of"     CHAR     011          X
PEINH            "Price unit (direct input, transfer of POs)"               CHAR     005          X
BPRME            Order Price Unit (Purchasing)                         UNIT     003          X
BPUMZ            Numerator: Conversion OPUn into OUn (direct input of POs          CHAR     005          X
BPUMN            Denominator: Conversion OPUn into OUn (direct input of P          CHAR     005          X
SAKTO            Cost element                                   CHAR     010          X
KOSTL              Cost Center                                   CHAR     010          X
VBELN          Sales and Distribution Document Number                    CHAR     010          X
VBELP          Sales document item                              NUMC     006          X
WEMPF          Goods recipient                                   CHAR     012          X
WEBTH          "Amount in local currency (direct input, transfer of POs)"     CHAR     013          X
WEBTF          "Amount in document currency (direct input, transfer of P"     CHAR     013          X
WEREF          Flag for treatment of GR/IR (direct input of POs)          CHAR     001          X
SPINF          Indicator: Update info record                         CHAR     001          X
WEPOS          Goods Receipt Indicator                              CHAR     001          X
REPOS          Invoice receipt indicator                         CHAR     001          X

i need to upload the open Purchase Order using the BAPI function BAPI_PO_CREATE1., below is the given fileds blod are for Header, header will Repeat for the line items,can any one help me out  using the BAIP's for upload the PO, i need sample code for this ........
Thanks & Regards
Raghu
<u>Field Name     Field Description                              Type     Length</u>
<b>EBELN             Purchasing Document Number                         CHAR     010          X
BUKRS             Company Code                                                     CHAR    004     MN10     C
EKORG             Purchasing Organization                              CHAR     004     MN00     C
EKGRP             Purchasing group                              CHAR     003          X
BSART             Order type (Purchasing)                              CHAR     004          X
LIFNR             Account Number of Vendor or Creditor                    CHAR     010          X
BEDAT             Purchase Order Date                              DATS     010          X
ZTERM             Terms of payment key                              CHAR     004          X
WAERS             Currency Key                                   CUKY     005          X
INCO1             Incoterms (part 1)                              CHAR     003          X
INCO2             Incoterms (part 2)                              CHAR     028          X</b>
EBELP             Item Number of Purchasing Document                    NUMC     005          X
EMATN             Material number                                   CHAR     018          X
WERKS             Plant                                        CHAR     004          X
LGORT             Storage location                              CHAR     004          X
EPSTP             Item category in purchasing document                    CHAR     001          X
KNTTP             Account assignment category                         CHAR     001          X
EINDT             Item delivery date                              DATS     010          X
MENGE            "Purchase order quantity (direct input, transfer of POs)"     CHAR     013          X
MEINS            Order unit                                   UNIT     003          X
NETPR            "Net price: Document currency (direct input, transfer of"     CHAR     011          X
PEINH            "Price unit (direct input, transfer of POs)"               CHAR     005          X
BPRME            Order Price Unit (Purchasing)                         UNIT     003          X
BPUMZ            Numerator: Conversion OPUn into OUn (direct input of POs          CHAR     005          X
BPUMN            Denominator: Conversion OPUn into OUn (direct input of P          CHAR     005          X
SAKTO            Cost element                                   CHAR     010          X
KOSTL              Cost Center                                   CHAR     010          X
VBELN          Sales and Distribution Document Number                    CHAR     010          X
VBELP          Sales document item                              NUMC     006          X
WEMPF          Goods recipient                                   CHAR     012          X
WEBTH          "Amount in local currency (direct input, transfer of POs)"     CHAR     013          X
WEBTF          "Amount in document currency (direct input, transfer of P"     CHAR     013          X
WEREF          Flag for treatment of GR/IR (direct input of POs)          CHAR     001          X
SPINF          Indicator: Update info record                         CHAR     001          X
WEPOS          Goods Receipt Indicator                              CHAR     001          X
REPOS          Invoice receipt indicator                         CHAR     001          X

Similar Messages

  • Purchase order upload using LSMW

    Hi
    Can we use Basic type ORDERS05 in the IDOC method to upload purchase order using LSMW.
    This also can achieved using business object BUS2012 and basic type PORDCR05.
    Just wanted to what would be the difference between these two methods and possibliity of PO using basic type ORDERS05 using Idoc method.
    Regards
    Raj
    Edited by: Rajitha1234 on Jan 28, 2011 6:55 AM
    Edited by: Rajitha1234 on Jan 28, 2011 6:56 AM

    Hai
    Check with the following
    Select fifth Radio button then follow the bellow step
    <b>5) select radio-Button 5 and execute
       Maintain Field Mapping and Conversion Rules
       Select the Tcode and click on Rule button there you   will select constant
       and press continue button
       give Transaction Code : ME21 and press Enter</b>
    Thanks & regards
    Sreenivasulu P

  • PURCHASE ORDER CREATION USING ALE ( BAPI )...

    HI,
          I DESPERATELY NEED SOME ADVISE IN CREATING A PURCHASE ORDER USING ALE....I AM VERY NEW TO ALE SO CAN ANYONE EXPLAIN IN STEPS WHAT TO BE DONE IN DETAIL....PLS HELP ME OUT IN THIS REGARD....I WILL GET SOME DATA AS INBOUND IDOCS AND I NEED TO CREATE A PURCHASE ORDER USING ALE USING BAPI( BAPI_PO_CREATE1 ).......HOPING A QUICK REPLY ASAP.....

    Hi Gianluca,
    I need to do the same as per the original post and your answers gets me halfway there.  My remaining question is how to get the PO to output the PORDCR messgage on the outbound side (also a SAP system)?  Or do you have to output the PO as an ORDERS message and map that to the PORDCR message in something like XI or other middleware?
    Thanks for the help.
    Johan

  • When connecting Macbook Air to iMac, have to keep Macbook Air open in order to use the iMac as a display.

    When I connect my Macbook Air to my iMac with Thunderbolt, I have to keep my Macbook Air open or else the iMac does not sense it. I've tried closing it to just use the iMac as the display, but then the iMac goes back to its regular screen. Also, I have to control everything from the MBA keyboard and touchpad- my iMac mouse and keyboard suddenly won't work. How do I fix this?

    Hi there,
    Apple outline the steps to do so in the link I've posted below. If you need help with any of them, just shout.
    Using Mac in Clamshell
    Have a nice day,
    Regards,
    Nathan

  • Open Purchase order pload

    Can any one provide OPen purchase order upload program using BAPI method....
    Thanks & regards.
    Ramesh T.
    Moderator Message : Not enough re-search before posting. Thread locked
    Edited by: Vinod Kumar on Apr 22, 2011 3:41 PM

    Hi Harshad,
    You can use the Service PO scenario.
    Service PO is used to Procure/ Avail the Services. you can create the service PO ( having account Assignment Category 'K' and item Category 'D'  for services) which has the validity period.
    at item overview level, you have to specify the Material /Service info in Short text.
    At Item Detail level, you will have the service tab. Depending on your indent (as and when it comes) you can enter the service item with its unit cost and qty.
    Later on, once you physically received the Material/Service, then using transaction ML81N you can accept the service. which in turn post your GR Document.
    Regards,
    S Anand

  • Open Purchase Order Quantity

    Hi, All,
    Is there any way to know how many open purchase order quantity in the SAP system?
    If I want to differentiate different business unit open purchase order, how I can do?
    What's the T-code?
    Thanks

    Hi,
    You can use ME2M, ME2N, ME2L, in the field Selection Parameters on the initial screen specify WE101 & the reports will list out all PO's for which GR is pending (i.e. Open PO's). Now you can change layout add / remove fields as per your need. You can also sub-total on plant or purchasing org. thereby getting the data you require. Also in the selection screen in the field Scope of List you can specify ALV to get an alv listing.
    Hope the above answers your query.
    Regards,
    Vivek

  • About Open Purchase order

    Hello Friends,
        Can u explain me about Open Purchaseorder, ie about the tables and fields that are used in open purchase order and also the Tcode.
      Thanks in advance,
      Bannu.

    Right now i am working with the same report
    I took the tables EKKO, EKPO, EINE, EKET.
    different fileds r, P.O#, Line #, Mat #, short description, vend #, Vend name, plant id, po delivery date, contract number, contract price, pricing info record number, price......
    main condition u have to check for the open PO is EKPO-ELIKZ = ' ' then those po r open po's or u can also check EKPO-EREKZ = ' '.
    If you find useful mark the points
    ~~Guduri

  • Restrict "Create Purchase Order" Authorization using vendor number "LIFNR"

    Hello All,
    How can we restrict the creation of purchase order(ME21N) using the vendor number (LIFNR).
    Any helpful idea?
    Regards,

    Hey Sanjay,
    i am facing same problem of uploading multiple line item through LSMW .
    and u did good exploration on  same can u give me some idea,
    how i do modification in LSMW program?
    do u mean i need to do some coding before step CONVERT DATA.
    and can u give some guidline to do it..
    u r hint will be sufficient..
    Thx in Advance..
    Rajesh

  • Open purchase order list

    Hi experts,
    how i can generate open purchase order list with the amount ?
    regards,
    Sanju M S

    HI
    try report
    ME80FN
    here after executing click on changes view and select PO history
    Regards
    Kailas Ugale

  • Create a Purchase order using the BAPI using the data in the XML file.

    Hello Gurus,
    here is the scenario can anyone help me how to proceed explaining the procedure?
    Create a Purchase order using the BAPI using the data in the XML file.
    comprehensive explanations are appreciated.
    thanks in advance.

    hi,
      first use fm "bapi_po_create".
      then use fm "BAPI_ACC_GL_POSTING_POST"
    The demo environment was made with real business scenario in mind, but following subjects need to be addressed in a live implementation:
    •     No exceptions and error handling is implemented, except the order rejection (e.g. partly delivery);
    •     In Navision both XML Ports and the XML DOM has been used to integrate with SAP XI, because XML ports has some drawbacks regarding to Namespaces in XML Documents (mandatory in SAP XI);
    •     A minimum of SAP and Navision customization is required to implement this solution. (e.g. user exit in SAP, Navision XML DOM).

  • Upload of purchase order text in the material master

    Now we have information of Purchase order text for all the material.
    Is it possible to upload the Purchase order text using LSMW.
    Some friends were telling that LSMW is not possible for Purchase Order text.
    Can anyone suggest how I can upload this purchase order text for all 1000
    material using LSMW program.
    /if not LSMW is there any other method to upload it
    thanks in advance
    deepak.s.goura

    Dear Deepak,
    there is standard direct upload i believe
    go to lsmw
    Execute 1st option
    then inLSMW:Object Attribute screen
    in standard batch/ direct input
    firsr radio button
    select object 005
    and method 003
    Program name RSTXLITF.
    Then go by normal process i.e source field , field mapping...
    In this way u can also upload Text in the Material master.
    Rewards if helpful
    Regards
    Sanjay L

  • Upload of purchase order details using LSMW

    Hi friends,
    I encountered a problem while uploading purchase order details using LSMW . in the field mapping I could not able to fine the field TCODE. as a result I could not assign the transaction code ME21. could you please suggest me a solution.
      thanks

    Hai
    Check with the following
    Select fifth Radio button then follow the bellow step
    <b>5) select radio-Button 5 and execute
       Maintain Field Mapping and Conversion Rules
       Select the Tcode and click on Rule button there you   will select constant
       and press continue button
       give Transaction Code : ME21 and press Enter</b>
    Thanks & regards
    Sreenivasulu P

  • HOW WE FIND OUT OPEN PURCHASE ORDER AND CLOSED PURCHASE IN THE TABLE?

    HI,
    PLZZ HELP ME.
    what are fields names for open purchase order and closed purchase order
    thanks

    Hi param,
    Go to mseg table, pass the purchase order number and purchase order item. if the mseg-menge = ekpo-menge for the corresponding purchase order then consider the purchase order is close, else it is still open. even check if the entries are not there for corresponding purchase order in mseg table then also it is open.
    select mblnr zeile matnr menge from mseg into it_mseg where ebeln = it_ekko-ebeln
    and    ebelp = it_ekpo-ebeln.
    if sy-subrc <> 0.
    then consider the purchase order is open.
    This is the first case.
    even u can consider like this
    if sy-subrc = 0.
    if it_ekpo-menge > it_mseg-menge.
    then also the purchase order is open.
    Regards,
    Santosh Kumar M.
    Award points if it is useful.

  • Creating the Sales Order using the bapi BAPI_SALESORDER_CREATEFROMDAT2

    Hi,
    My problem is , i have created one module pool program for accelerating the Sales Order creation.
    I am using the bapi BAPI_SALESORDER_CREATEFROMDAT2 for sales order creation. After executing the program
    bapi is given an errot that, incomplete sales order document is saved.
    Can any body tell me plz what are the necessary fields i need to take in the header and item level , so that the complete
    document will be saved through BAPI.
    <removed_by_moderator>
    Thanks
    Edited by: Julius Bussche on Jan 11, 2010 12:09 PM

    TABLES: VBAK,                             "Sales Document: Header Data
            VBAP.                             "Sales Document: Item Data
    *************************************WORK AREA DECELERATION************************
    DATA: BEGIN OF WA_HEADER,
            LI    TYPE I,                      "LINE TYPE
            AUART TYPE VBAK-AUART,             "Sales Document Type
            VKORG TYPE VBAK-VKORG,             "Sales Organization
            VTWEG TYPE VBAK-VTWEG,             "Distribution Channel
            SPART TYPE VBAK-SPART,             "Division
            KUNNR TYPE BAPIPARNR-PARTN_NUMB,   "Customer number
          END OF WA_HEADER.
    DATA: BEGIN OF WA_ITEM,
            LI     TYPE I,
            MATNR  TYPE VBAP-MATNR,            "MATERIAL NUMBER
            ZMENG  TYPE VBAP-ZMENG,           "QUANTITY
          END OF WA_ITEM.
    ***********************************INTERNAL TABLE DECELERATION***************************************
    DATA: IT_HEADER      LIKE TABLE OF WA_HEADER WITH HEADER LINE.                   "IT FOR HEADER
    DATA: IT_ITEM        LIKE TABLE OF WA_ITEM WITH HEADER LINE.                     "IT FOR ITEM
    DATA: IT             LIKE VBAK OCCURS 0 WITH HEADER LINE.
    ***************************SALES ORDER INTERNAL TABLE DECELERATION********************************
    DATA:
          HEADER  TYPE TABLE OF BAPISDHEAD WITH HEADER LINE,        "SALES HEADER DATA
          ITEMS   TYPE TABLE OF BAPIITEMIN WITH HEADER LINE,         "SALES ITEM DATA
          PARTNERS TYPE TABLE OF BAPIPARTNR WITH HEADER LINE.      "SALLES PARTNERS
    ***********************************DYNAMIC FIEL PATH GETTING DECELERATION************************
    DATA : HL_FIELD_NAME TYPE DYNPREAD-FIELDNAME VALUE 'G_P_SPATH',              "SCREEN FIELD NAME
           HL_FILE_NAME  TYPE IBIPPARMS-PATH VALUE 'G_P_SPATH',                  "Local file for upload/download
           IL_FIELD_NAME TYPE DYNPREAD-FIELDNAME VALUE 'G_P_EPATH',              "SCREEN FIELD NAME
           IL_FILE_NAME  TYPE IBIPPARMS-PATH VALUE 'G_P_EPATH',                  "Local file for upload/download
           FL_FIELD_NAME TYPE DYNPREAD-FIELDNAME VALUE 'G_P_EPATH',              "SCREEN FIELD NAME
           FL_FILE_NAME  TYPE IBIPPARMS-PATH VALUE 'G_P_EPATH'.                  "Local file for upload/download
    DATA : CTR TYPE I .
    DATA : CTR2 TYPE STRING.
    DATA : CTR1 TYPE STRING.
    Sales document number
    DATA : L_VBELN LIKE BAPIVBELN-VBELN.
    SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME TITLE T1.
    SELECTION-SCREEN : SKIP.
    PARAMETER        : P_HPATH TYPE STRING.
    PARAMETER        : P_IPATH TYPE STRING.
    SELECTION-SCREEN : SKIP.
    SELECTION-SCREEN : END OF BLOCK B1.
    SELECTION-SCREEN : BEGIN OF BLOCK B2 WITH FRAME TITLE T2.
    SELECTION-SCREEN : SKIP.
    SELECTION-SCREEN : BEGIN OF LINE.
    SELECTION-SCREEN : PUSHBUTTON 10(14) UPLOAD USER-COMMAND CLICK1.
    SELECTION-SCREEN : END OF LINE.
    SELECTION-SCREEN   END OF BLOCK B2.
    ******************************************INITIALIZATION.***************************************************
    INITIALIZATION.
      T1       = 'Putchase Order Source File Path'.
      T2       = 'Push Button'.
      UPLOAD   = 'Upload'.
    *******************************************AT SELECTION SCREE EVENT********************************************
    AT SELECTION-SCREEN.
      CASE SY-UCOMM.
        WHEN 'CLICK1'.
          IF P_HPATH IS INITIAL AND P_IPATH IS INITIAL.      "CHECKING BTHE THE TEXT BOX
            MESSAGE I009.
          ELSE.
            PERFORM SELECT.                                  "CALLING THE SELECT SUBROUTINE
          ENDIF.
        WHEN OTHERS.
          MESSAGE 'PRESS FORM BUTTON' TYPE 'I'.      "WHEN EXECUTE BUTTON IS PRESSED
      ENDCASE.
    ***********************************GETTING HEADER FIEL PATH*******************************************
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_HPATH.
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          PROGRAM_NAME  = SYST-CPROG
          DYNPRO_NUMBER = SYST-DYNNR
          FIELD_NAME    = HL_FIELD_NAME
        IMPORTING
          FILE_NAME     = HL_FILE_NAME.
      P_HPATH = HL_FILE_NAME.
    ***********************************GETTING ITEM FIEL PATH*******************************************
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_IPATH.
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          PROGRAM_NAME  = SYST-CPROG
          DYNPRO_NUMBER = SYST-DYNNR
          FIELD_NAME    = IL_FIELD_NAME
        IMPORTING
          FILE_NAME     = IL_FILE_NAME.
      P_IPATH = IL_FILE_NAME.
    START-OF-SELECTION.
    *&      Form  SELECT
          text
    -->  p1        text
    <--  p2        text
    FORM SELECT .
      CALL FUNCTION 'GUI_UPLOAD'             " function resposible to get the local flat
          EXPORTING                          " and upload it in a internal table
            FILENAME            = P_HPATH
            FILETYPE            = 'ASC'
            HAS_FIELD_SEPARATOR = '#'
          TABLES
            DATA_TAB            = IT_HEADER.
      CALL FUNCTION 'GUI_UPLOAD'             " function resposible to get the local flat
          EXPORTING                          " and upload it in a internal table
            FILENAME            = P_IPATH
            FILETYPE            = 'ASC'
            HAS_FIELD_SEPARATOR = '#'
          TABLES
            DATA_TAB            = IT_ITEM.
      LOOP AT IT_HEADER.
        Initialize Header values
        HEADER-DOC_TYPE     =  IT_HEADER-AUART.
        HEADER-SALES_ORG    =  IT_HEADER-VKORG.
        HEADER-DISTR_CHAN   =  IT_HEADER-VTWEG.
        HEADER-DIVISION     =  IT_HEADER-SPART.
        APPEND HEADER.
        PARTNERS-PARTN_ROLE = 'WE'.
        PARTNERS-PARTN_NUMB = IT_HEADER-KUNNR.
        APPEND PARTNERS.
        CTR = 10.
        LOOP AT IT_ITEM WHERE LI = IT_HEADER-LI.
          CTR2 = CTR.
          CONCATENATE '0000' CTR2 INTO CTR1.
    ***Initialize Item values
         ITEMS-ITM_NUMBER   = IT_ITEM-ITEM.
          ITEMS-ITM_NUMBER   = CTR1.
          ITEMS-MATERIAL     = IT_ITEM-MATNR.
          ITEMS-REQ_QTY   = IT_ITEM-ZMENG.
          APPEND ITEMS.
          CTR = CTR + 10.
        ENDLOOP.
        CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT1'
          EXPORTING
            ORDER_HEADER_IN = HEADER                      "SALES HEADER DATA
          IMPORTING
            SALESDOCUMENT   = L_VBELN                        "RETRIEVED SALES DOCUMENT NUMBER
          TABLES
            ORDER_ITEMS_IN  = ITEMS                       "SALES ITEM LEVEL DATA
            ORDER_PARTNERS  = PARTNERS.                    "SAKES PARTNERS
        APPEND L_VBELN TO IT.
        COMMIT WORK AND WAIT.
        CLEAR : HEADER , ITEMS[] ,PARTNERS,CTR,CTR1,CTR2.
        REFRESH : ITEMS.
      ENDLOOP.
      IF IT[] IS NOT INITIAL.
        LOOP AT IT.
          WRITE: / 'SALES ORDER', IT-VBELN , 'CREATED'.
        ENDLOOP.
        LEAVE TO LIST-PROCESSING.
        SET PF-STATUS SPACE.
      ELSE.
        MESSAGE I044.
      ENDIF .
    ENDFORM.                    " SELECT

  • Report  showing the open Purchase orders

    Hi Experts,
               Is there any standard report to view the open Purchase orders.
    Developing a new report is the only solution.
    Thanks

    Hi,
    You need not create Zreport.
    Either you can use ME2N with selection parameter WE101 & Scope of list BEST
    or
    Go to SE16
    Use Table EKPO
    Use Filed name ELIKZ
    If you give X list of all the delivery completed items.
    If you leave blank list of all Open PO items will display.
    Reward points if found useful.
    Regards,
    Vengat

Maybe you are looking for

  • T40P ACCESS IBM BUTTON DOES NOT WORK AFTER INTIAL OPENING AND MUSIC PLAYS ????

    Hello, from a very un-savy laptop and computer user,my T40P thnk pad doesnt work when you push ACCESS IBM BLUE BUTTON,??Ive tried to uninstall some of the IBM componets,But not haveing a real clue as what to uninstall ,i i did uninstall a few that a

  • How to send a smartform result through mail?

    How to send a smartform result through mail?

  • PDF Printing without BI  - a solution that works

    I have used the instruction givein in the follwing post: http://carlback.blogspot.com/2007/03/apex-cocoon-pdf-and-more.html Below are my steps 1.) Install java sdk 2.) Create environment variable JAVA_HOME that points to this dir. : JAVA_HOME=C:\Prog

  • How is EP linked to Web Dynpro

    Hi boss, Am new to Web Dynpro willing to train in Web Dynpro, and would like to know how is EP linked to Web Dynpro. When i complete my course how should i market my self as Web Dynpro expert or EP  with Web Dynpro. Please guide me,......Thank's in a

  • Oracle Julian Date

    I have an oracle date like this 1112260180 How can I change this to a date time so i can use a Min or Max function ?