BAPI_PO_GETDETAIL1 in 4.6B ?

Hi guys,
we would like to use the BAPI_PO_CREATE1 for a migration of POs from a SAP 4.6B to an ERP 6.0.
However, in order to get the data in the format required by BAPI_PO_CREATE1, we must use the BAPI_PO_GETDETAIL1 on the 4.6B system. Unfortunately, it doesnt seem to be available on 4.6B.
Does anyone have a clue how to best solve this problem?
Any help would be greatly appreciated!

There is no solution to this problem.

Similar Messages

  • PO line item details from BAPI_PO_GETDETAIL1 and append to BAPI_PO_CHANGE

    Hi,
    The requirement is to get PO line item details from BAPI_PO_GETDETAIL1 and save it in the internal table and append that internal table into  the BAPI_PO_CHANGE.
    But i am getting dump in this program.
    TABLES: ekpo.
    DATA: BEGIN OF po_details.
            INCLUDE STRUCTURE BAPIMEPOITEM. "Include the structure of Dictionary Reference.
    DATA: END OF po_details.
    DATA: BEGIN OF po_details1.
            INCLUDE STRUCTURE BAPIMEPOITEM. "Include the structure of Dictionary Reference.
    data: END OF po_details1.
    DATA: it_po_details LIKE STANDARD TABLE OF po_details,
    wa_po_details like line of it_po_details.
    data: it_po_details1 like standard table of po_details,
    wa_po_details1 like line of it_po_details1.
    PARAMETERS: p_ebeln LIKE ekpo-ebeln DEFAULT '4500000016'.
    CALL FUNCTION 'BAPI_PO_GETDETAIL1'
      EXPORTING
        PURCHASEORDER = p_ebeln
      TABLES
        POITEM        = it_po_details.
    loop at it_po_details into po_details.
      read table it_po_details into wa_po_details with key PO_item = p_ebeln.
      move-corresponding po_details to po_details1.
      CALL FUNCTION 'BAPI_PO_CHANGE'
        EXPORTING
          PURCHASEORDER = p_ebeln
        TABLES
          POITEM        = it_po_details.
      append po_details to it_po_details1.
      LOOP AT it_po_details1 INTO wa_po_details1.
        WRITE:/ wa_po_details1-PO_item,
           wa_po_details1-MATERIAL,
           wa_po_details1-SHORT_TEXT,
           wa_po_details1-PLANT.
      ENDLOOP.
    endloop.

    HI,
    1st you check for the following following  authorization objects are checked:                                                                               
    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)          
    and to change the PO below is the eg for changing the short text:-
    TABLES: ekpo.
    DATA: BEGIN OF po_details.
            INCLUDE STRUCTURE bapimepoitem. "Include the structure of Dictionary Reference.
    DATA: END OF po_details.
    DATA: BEGIN OF po_details1.
            INCLUDE STRUCTURE bapimepoitem. "Include the structure of Dictionary Reference.
    DATA: END OF po_details1.
    DATA: it_po_details LIKE STANDARD TABLE OF po_details,
    wa_po_details LIKE LINE OF it_po_details.
    DATA: it_po_details1 LIKE STANDARD TABLE OF po_details,
    wa_po_details1 LIKE LINE OF it_po_details1,
    poheader  LIKE  bapimepoheader,
    return  LIKE STANDARD TABLE OF  bapiret2 WITH HEADER LINE,
    poitemx LIKE STANDARD TABLE OF  bapimepoitemx WITH HEADER LINE.
    PARAMETERS: p_ebeln LIKE ekpo-ebeln DEFAULT '5600010646'.
    CALL FUNCTION 'BAPI_PO_GETDETAIL1'
      EXPORTING
        purchaseorder = p_ebeln
      IMPORTING
        poheader      = poheader
      TABLES
        poitem        = it_po_details.
    LOOP AT it_po_details INTO po_details.
      READ TABLE it_po_details INTO wa_po_details INDEX 1.
      MOVE-CORRESPONDING po_details TO po_details1.
      MOVE: po_details-po_item TO poitemx-po_item,
            'X' TO poitemx-short_text.
      APPEND poitemx.
      CALL FUNCTION 'BAPI_PO_CHANGE'
        EXPORTING
          purchaseorder = p_ebeln
          poheader      = poheader
        TABLES
          return        = return[]
          poitem        = it_po_details[]
          poitemx     =
          poitemx[].
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
      APPEND po_details TO it_po_details1.
      LOOP AT it_po_details1 INTO wa_po_details1.
        WRITE:/ wa_po_details1-po_item,
        wa_po_details1-material,
        wa_po_details1-short_text,
        wa_po_details1-plant.
      ENDLOOP.
    ENDLOOP.

  • BAPI_PO_GETDETAIL1 issue.

    Hi, all.
    I meet a runtime error after using the below function in my program. I totally dun know how to start to solve it
      CALL FUNCTION 'BAPI_PO_GETDETAIL1'
        EXPORTING
          PURCHASEORDER            = PO_NUMBER
         DELIVERY_ADDRESS         = 'X'
       TABLES
         POADDRDELIVERY           = IT_DELIVER[]
    Am I using this function correctly?
    The error analysis is like below:
       A RAISE statement in the program "CL_HANDLE_MANAGER_MM==========CP" raised the
        exception
       condition "FAILURE".
       Since the exception was not intercepted by a superior
       program, processing was terminated.
    Very appreciate if somebody can guide me. Thanks in advance.

    Hi there
    Use FM 'BAPI_PO_GETDETAIL' as follows:
    DATA:  l_po_order            type          ebeln,
               wa_header            type          bapiekkol,
               tb_po_items          type  table of bapiekpo,
               tb_return                type table of bapireturn.
               wa_return                type          bapireturn.
        call function 'BAPI_PO_GETDETAIL'
             exporting
                  purchaseorder      = l_po_order
                  items              = 'X'
                  account_assignment = ' '
                  schedules          = ' '
                  history            = ' '
                  item_texts         = ' '
                  header_texts       = ' '
                  services           = ' '
                  confirmations      = ' '
                  service_texts      = ' '
             importing
                  po_header          = wa_po_header
             tables
                  po_items           = tb_po_items
                  return               =  tb_return.
      Error handling
        read table tb_return index 1 into wa_return.
        if  wa_return-type = 'E'.
          message e000( )  raising error_in_bapi_po_getdetail.
        endif.
    Thanks
    Shivika

  • BAPI_PO_GETDETAIL1 Giving Runtime Error

    Hello
    I am getting the following error on calling a BAPI BAPI_PO_GETDETAIL1 from smartform layout set.
    Please could you let me know if something can be cone about it.
    Error analysis
        A RAISE statement in the program "CL_HANDLE_MANAGER_MM==========CP" raised the
         exception
        condition "FAILURE".
        Since the exception was not intercepted by a superior
        program, processing was terminated.
        Short description of exception condition:
        For detailed documentation of the exception condition, use
        Transaction SE37 (Function Library). You can take the called
        function module from the display of active calls.
    Regards
    Atush Rohan

    REPORT zbapi_po_items .
    TABLES: ekpo.
    DATA: BEGIN OF po_details.
    INCLUDE STRUCTURE bapiekpo.
    DATA: END OF po_details.
    DATA: it_po_details LIKE STANDARD TABLE OF po_details.
    PARAMETERS: p_ebeln LIKE ekpo-ebeln.
    *SELECT-OPTIONS: p_ebeln FOR ekpo-ebeln.
    CALL FUNCTION 'BAPI_PO_GETDETAIL'
    EXPORTING
    purchaseorder = p_ebeln
    TABLES
    po_items = it_po_details.
    START-OF-SELECTION.
    LOOP AT it_po_details INTO po_details.
    WRITE:/01 po_details-po_number COLOR COL_HEADING,
    20 po_details-po_item,
    50 po_details-material,
    70 po_details-short_text.
    CLEAR po_details.
    ENDLOOP.
    Edited by: Krupaji on Feb 25, 2010 12:16 PM

  • BAPI_PO_GETDETAIL1 - An invalid XML character (Unicode: 0xb) was found

    Hi,
    We are using BAPI_PO_GETDETAIL1 to get the Purchase Order details. it worked well in the past.
    But its failing for a particular PO number.
    Error Message:An invalid XML character (Unicode: 0xb) was found in the element content of the document.
    I understand there might be some special character in the record. But it works well at SAP ECC.
    Can someone please suggest some solution or workaround?
    Thanks,
    Anil

    Hi,
    I faced the same issue recently, and came accross this sap note : 1559677 : XML renderer creates invalid XML.
    Take a few moments to read the contents, but here's the most important part :
    If an application program uses the SAP XML renderers to create XML 1.0
    documents that must strictly conform to the specifications of W3C, this
    application program must ensure that problematic characters are removed
    from the data before transferring this data to the SAP XML renderer.
    So, you need to clean up the characters by yourself...
    Best regards,
    Wouter

  • FM BAPI_PO_GETDETAIL1 with table and Flex

    Since you didn't post the WSDL itself I am forced to ask the obvious, is the table you want "exposed" on the web service side?

    Sorry for that. I did realize that it was a mess after the post, but I had to leave.
    I am using FLEX Builder 3.
    I tried changing the parameter of the <mx:operation from e4x to XML and still the same issue occurs. How do I use the event.message.body in the code?
    Here is the required section of the WSDL.
    - <xsd:element name="BAPI_PO_GETDETAIL1.Response">
    - <xsd:complexType>
    - <xsd:all>
    - <xsd:element name="POITEM">
    - <xsd:complexType>
    - <xsd:sequence>
      <xsd:element name="item" minOccurs="0" maxOccurs="unbounded" type="s0:BAPIMEPOITEM" />
      </xsd:sequence>
      </xsd:complexType>
      </xsd:element>
    The last part of the XSDL is below
    - <binding name="BAPI_PO_GETDETAIL1Binding" type="s0:BAPI_PO_GETDETAIL1PortType">
      <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
    - <operation name="BAPI_PO_GETDETAIL1">
      <soap:operation soapAction="http://www.sap.com/BAPI_PO_GETDETAIL1" />
    - <input>
      <soap:body use="literal" />
      </input>
    - <output>
      <soap:body use="literal" />
      </output>
      </operation>
      </binding>
    - <service name="BAPI_PO_GETDETAIL1Service">
      <documentation>SAP Service BAPI_PO_GETDETAIL1 via SOAP</documentation>
    - <port name="BAPI_PO_GETDETAIL1PortType" binding="s0:BAPI_PO_GETDETAIL1Binding">
      <soap:address location="http://xxxxxxx:1080/sap/bc/soap/rfc" />
      </port>
      </service>
      </definitions>
    I assumed that since the BAPIResponse has the POITEM table, i could refer to it in the data grid as lastResult.POITEM.item
    Thank you Daniel for your help.

  • BAPI , BAPI_PO_GETDETAIL1 to get the detail of a PO.

    hi gurus can you please tell me how to write a program using  BAPI , BAPI_PO_GETDETAIL1 to get the detail of a PO.

    Hi,
    Go throgh the FM documentation or the link
    [http://abap.wikiprog.com/wiki/BAPI_PO_GETDETAIL1]
    you will get the detail.
    Regards
    Sandipan

  • BAPI_PO_GETDETAIL1 how to write program

    Hi gurus ,
    Please help me with the detail code to call a BAPI to dispaly PURCHSA ORDER details.
    i have to use BAPI_PO_GETDETAIL1.
    how to do the coding??????

    Hi,
      Welcome To SDN!!
    Try this out...
    Report ZBapi .
    data: po_items type table of bapiekpo with header line.
    parameters: p_ebeln type ekko-ebeln.
    call function 'BAPI_PO_GETDETAIL'
    exporting
    purchaseorder = p_ebeln
    ITEMS = 'X'
    ACCOUNT_ASSIGNMENT = ' '
    SCHEDULES = ' '
    HISTORY = ' '
    ITEM_TEXTS = ' '
    HEADER_TEXTS = ' '
    SERVICES = ' '
    CONFIRMATIONS = ' '
    SERVICE_TEXTS = ' '
    EXTENSIONS = ' '
    IMPORTING
    PO_HEADER =
    PO_ADDRESS =
    tables
    PO_HEADER_TEXTS =
    po_items = po_items
    PO_ITEM_ACCOUNT_ASSIGNMENT =
    PO_ITEM_SCHEDULES =
    PO_ITEM_CONFIRMATIONS =
    PO_ITEM_TEXTS =
    PO_ITEM_HISTORY =
    PO_ITEM_HISTORY_TOTALS =
    PO_ITEM_LIMITS =
    PO_ITEM_CONTRACT_LIMITS =
    PO_ITEM_SERVICES =
    PO_ITEM_SRV_ACCASS_VALUES =
    RETURN =
    PO_SERVICES_TEXTS =
    EXTENSIONOUT =
    check sy-subrc = 0.
    loop at po_items.
    write:/ po_items.
    endloop.
    Refer
    http://abap.wikiprog.com/wiki/BAPI_PO_GETDETAIL1
    Regards
    Kiran SURE

  • What are all the mandatory fields of the BAPI_PO_GETDETAIL?

    Hi friends,
    I am new to XI. I am using the "BAPI_PO_GETDETAIL1" in my scenario to get details of a particular Purchase Order. Can you tell me the mandatory fields of this BAPI?
    Where should i look to identify the mandatory fields of a BAPI?
    Thanks.
    Senthil Nathan.

    Hi you can see this in SE37 under the Import Tab. Here you see that the only mandatory input field is PURCHASEORDER. So if you provide the purchaseorder number you get alle the details for that.
    Kind regards
    Mikkel

  • Purchase order text report

    Hi All,
      I want to take report of "Purchase order text" which is stored in material master.
    Any Idea pls let me know....
    Thanks
    Hari

    Dear Hari,
    You can use BAPI_PO_GETDETAIL1 or BAPI_PO_GETDETAIL to retrieve the data in your program.Enter the PO number and tick the item text and header text indicator.
    Regards,
    w1n

  • Open purchase orders problem

    Hi all,
    I want to close all open purchase order . MEMASSPO transaction doesnt allow me to close partial open POS ie PO is of 10 QTY & I received 5 qty .Remaining  5 QTY. there are around 1000 PO's are like that .
    Going  into me22 & delivery completed tick, I can do it manually .but its very hectic due to large no of PO's. Can I write a BDC for that ? I have a doubt whether that BDC will work properly or not because In each PO line Item Nos are different. which item is received completly & which not this is also to be considered.
    Plz reply .
    Thanks in Advance.
    Atul

    Hi,
    you can uses BAPIs instead of BDC. You can get details of PO from BAPI BAPI_PO_GETDETAIL1 and then change it using BAPI_PO_CHANGE. Both BAPIs have table POITEM with field NO_MORE_GR. This field corresponds to your flag. So you can easily see which items has not this flag set and then easily set this flag.
    Cheers

  • BAPI_PO_CHANGE not updating internal order no. in account assignment

    Hi,
    I am using 'BAPI_PO_CHANGE' to update the internal order no.
    I am first fetching the existing account assignment line items using 'BAPI_PO_GETDETAIL1' and then modifying the internal order no. as below.
            lt_poaccount-orderid = '310021000000'.
            MODIFY lt_poaccount INDEX lv_poacc_tabix TRANSPORTING orderid.
            lt_poaccountx-po_item = gt_po-ebelp.
            lt_poaccountx-orderid = 'X'.
            APPEND lt_poaccountx.
    but while calling the BAPI, the original values are returned and the message is 'No Data Changed'.
        CALL FUNCTION 'BAPI_PO_CHANGE'
          EXPORTING
            purchaseorder = gt_distinct_po-ebeln
          TABLES
            return        = lt_return
            poaccount     = lt_poaccount
            poaccountx    = lt_poaccountx.
    (The internal order no. is different than the original)
    Can somebody please assist me on this?
    Thanks in advance.

    Hi Kumar,
    I recommend you to try changing the internal order manually through transaction ME22N and see if that is possible in your system first.
    After that if that isn't possible you should contact your MM Expert for advise.
    Regards,
    Gilberto Li

  • Program works but background job for that program fails....

    I have a requirement where I have to collect the details of the purchase order and put the details in XML file format and FTP the XML file to an external third party FTP Server.
    To realize this I developed a report program which follows following logic.
    1)     First I collected the PO details by calling the BAPI BAPI_PO_GETDETAIL1.
    2)     Then using the following link "/people/r.eijpe/blog/2005/11/10/xml-dom-processing-in-abap-part-i--convert-an-abap-table-into-xml-file-using-sap-dom-approach
    I converted these PO details to the XML file format that the third party people accept.
           In the code I used u201CCALL METHOD cl_gui_frontend_services=>gui_downloadu201D and in this process first the XML file is generated and is getting stored on my deskytop.
    3)     Then I called HTTP_SCRAMBLE, FTP_CONNECT, FTP_COMMAND , FTP_DISCONNECT and RFC_CONNECTION_CLOSE.
    This works perfectly well and each time I execute the report the file is getting FTPu2019ed to the third party FTP server.
    Now I tried to schedule a batch job for this and the batch job fails with follwing errors
    02/25/2009 15:08:47 Error in Control Framework
    Message Class  = FES         
    Message Number = 022  
    Message Type   = E
    02/25/2009 15:08:47 Job cancelled after system exception ERROR_MESSAGE 
    Message Class  = 00        
    Message Number = 564  
    Message Type   = A                
    Can some one tell me what is going wrong. My report works perfect in front end but fails if I try to schedule a background job for it in SM36.
    Can you please tell me whatz going wrong with batch job? Any Help is highly appreciated.
    Regards,
    JEssica SAm

    Robert...Thanks for the reply...
    I am using follwing code
    l_xml_size = l_ostream->get_num_written_raw( ).
        CALL METHOD cl_gui_frontend_services=>gui_download
          EXPORTING
            bin_filesize = l_xml_size
            filename     = FILEPATH
            filetype     = 'BIN'
          CHANGING
            data_tab     = l_xml_table
          EXCEPTIONS
            OTHERS       = 24.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                     WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    Now what changes should i make..where should i store my XML file then instead of my desktop?
    and whih Function Module should i Use..

  • Reg. creation of Blanket Order through BAPI_PO_CREATE1

    Hi All,
    I have a requirement of creating framework order of document type FO. When I fill bapi interface correctly, I am getting an error message as either error  SE-518 u201CNo account assignment exists for service lineu201D or error 06 436-In case of account assignment, please enter acc. assignment data for item". I even tried in reverse way of filling bapi interface of po create1 by seeing from BAPI_PO_GETDETAIL1 of already created PO.but still I face same error. I filled up POLIMTS,with dummy package value in POSERVICES,POITEM,POITEMX, and account assignment details in POACCOUNT,POACCOUNTX tables of BAPI_PO_CREATE1 inetrface.
    If any one of you has worked on this before, i request you to send the code or any suggestion on how to proceed.
    Srikanth.

    i have the same problem. Can you suggest me your solution.
    Thank in advance.

  • BAPI for Purchase Order Confirmation and update EKES table

    Hi all,
    I have a requirement to update the PO confirmation soon after successful creation of PO in an IDOC.
    I have used BAPI_PO_CHANGE function module which didnt serve the purpose as it cannot update confirmations.
    I tried using ME_CONFIRMATION_UPDATE where I was able to add a confirmation entry in EKES table but that is not being reflected in ME23N transaction when I display the PO.
    Please help me out on this.
    Thanks & Regards
    Pavan

    NB: Never use a standard update FM (check attributes of ME_CONFIRMATION_UPDATE) its often only a SQL statement collector without any check, logging of changes or database consistency, if you perform a where-used you should find it is never called alone but with a bunch of other update FM after checks and other update preparation.
    Get back to the BAPI and table parameter POCONFIRMATION, also use BAPI_PO_GETDETAIL1 to get current data for the call of BAPI_PO_CHANGE.
    Regards,
    Raymond
    PS: If it is not in 197958 - BAPIs for purchase orders: Missing functions, you should be able to do it

Maybe you are looking for

  • Excise invoice to ship-to-party but billing to Sold-to-party

    Hi Experts, My client wants to send pro-forma excise invoice to ship-to-party but wants billing to Sold to party. here Sold to party and Ship to party address will be different. can you tell me the settings which should I do. Thanks in advance.

  • MacBook Air software question.

    hi how do i know if when i **bought** the macbook air was it the OS X Lion or it wasn't and the people in the store updated it?

  • Very strange JavaScript bug in Dreamweaver CS6 for Mac

    I'm not sure if this works only on a Mac, but it definitely works on any documents containing JavaScript that I create. Type these characters exactly on a new line or at the end of any line of JS code in Dreamweaver. Works in a <script> tag in an HTM

  • How to kill a Thread?

    Hello, My question is simple how to kill a thread. The background is a call to a method in a third party API, crawler4j, that locks the entire program. The design of crawler4j is "You should stop it when you think it's enough (ctrl+c)" but as I use i

  • Apple care protection plan Q

    Okay..I have that 1 year apple care protection plan that came with the ipod (the warranty)...I'm curious, what would they do in a case where my screen does not respond to being touched, and doesn't do anything...Would they replace it w/ a nw G1 or G2