Bapi for release purchase order

Hi Experts
      Is there any BAPI available to release the Purchae Order.
     Pls advise me to do the same.
regards
rajaram

hi,
check this fm.
ME_RELEASE_PURCHASE_DOCUMENT.
WOD1_RELEASE_PURCHASE_ORDER.

Similar Messages

  • Report for released purchase order

    Hai guru's
    this is second time but i did't get any good replay please consider this, i want any standard report for released purchase order,means(i released two backdated po today next day i verify the report ME2n,those po are not display, the system take only document date not released date, now i am using CDHDR through this i got the report. but it is big process, so once check this and send your valuable solution.
    Prasad

    Hi Krishna,
    You could use Me2N with the dynamic selection coupled with normal selection screen.
    In Dynamic selection(3rd icon in screen).....you can select for which company code, release indicator as released....and save it as default variant.
    hope this should solve your query
    Sk.

  • BAPI for Mass Purchase Order Confirmation

    Dear All,
    In standard SAP,it is possible to confirm for single line item only by using confirmation tab.
    We want to confirm Mass PO Confirmation.
    Is there any BAPI for Mass Purchase Order Confirmation?
    Regards,
    Ramesh

    Hi Sumant,
    I have tried with TC:MASS.
    By using this TC we can update quantity but not  delivery date & Confirmation Control (Fields available in the confirmation tab of ME22n for Vendor Confirmation).
    Is there any way to updates all these fields which are available in the Confirmation Tab?
    Is there any BAPI which is tranferring confirmation tab details into EKES table?
    Expecting your valuable inputs in this regard.
    Regards,
    Ramesh

  • LSMW issue using BAPI for changing Purchase Order G/L Account

    Wonder if anyone can help as I'm tearing my hair out!!
    Have used LSMW lots of times using the transaction recorder, but tried using a BAPI as we have a mass update to do of G/L Accounts for Purchase Orders and it seems the tidiest and most efficient way to do it.
    Got my LSMW project working as a test by changing the Short Text on a purchase order, this works fine.  However, when I add the Account Assignment details in (Structure E1BPMEPOACCOUNT and E1BPMEACCOUNTX) everything seems to run fine, the IDOC posts and gives message 'Document xxx changed'.  Yet when I look into the order it hasn't actually changed the G/L.
    If I go into the purchase order in change mode in another session and run the LSMW again it recognises the purchase order is locked so it seems to be doing everything right, just not updating the G/L Account field.  Anyone got any ideas ? It updated the short text fine so I'm sure everything is set up OK but for some reason it ignores the G/L that I upload.  Anything relating to the Account Assignment (Unloading Point, GR, Cost Center) just gets ignored if I try and upload a change.
    I seem to be so close it seems a shame not to be able to get it sorted !!!
    Thanks,

    Helen Smith wrote:
    HI Praveen,
    >
    > Thank you very much for your response.  I tested the BAPI as per yor instructions and the return message comes back 'Eng & other PO xxxx changed' so it seems to indicate a success message again (like the LSMW does) but the actual data doesn't update.
    >
    > I thought I'd found it as I searched OSS and found note  0001382965 which seemed exactly my problem.  I imported it and applied it but yet I still get the same issue - LSMW runs, says app doc posted and purchase order has been saved but no Account Assignment field will update.
    >
    > So it seems as if it's the BAPI not doing what it should - so I'm considering logging with SAPNET just to see if they can help as getting desperate with this one now! Felt sure I had it sorted when I found that note!
    >
    > Thanks
    >
    > Helen
    >
    > ** I should add I also ran the test above altering something in the item detail (the short text) - and that worked and updated.  So it still seems to point to the Account Assignment part of the BAPI not updating.
    >
    > Edited by: Helen Smith on Nov 2, 2010 4:35 PM
    Hi Helen,
    Just wondering whether you have found solution to your issue.
    We also encounter the same issue and have implemented the note without any positive result.
    Please share if you found the solution.
    Thank you.
    Abraham

  • BAPI for Release Purchase Contracts

    Hi Experts,
    I have an ECC with a Workflow for approve Purchase Contracts, ok!!
    I have too an External Program for approve this contracts, but I don´t know a BAPI or FM for export this requisitions to the External Program.
    I know that for PO and PR exist BAPI's, but I did not found for the aprove Purchase Contracts.
    Could you help me?
    Regards,
    Ariel Prebianca
    Edited by: Rob Burbank on Sep 16, 2010 2:22 PM
    Edited by: Ariel Prebianca on Sep 16, 2010 10:38 PM

    Hi
    The BAPI which you found for purchase orders works for Purchasing contracts also.
    Please test.
    Regards
    Sachin

  • Bapi For Blocked sales orders & Bapi for Releasing those orders

    Hi All,
        Can anybody help me regarding <b>Bapi</b> for getting <b>Blocked sales orders</b> and bapi for <b>releasing</b> those sales orders..
    Any help will be rewarded...
    Thanks..
    Regards,
    Srinivas.

    Use bapi:
    BAPI_SALESORDER_GETLIST to get the list of all sales orders based on Parameters
    CUSTOMER_NUMBER
    SALES_ORGANIZATION
    MATERIAL
    DOCUMENT_DATE
    DOCUMENT_DATE_TO
    PURCHASE_ORDER
    Then,
    loop at the internal table
    and use the bapi BAPI_SALESORDER_GETSTATUS to get the status of each sales order.
    choose only which are blocked.
    Regards,
    ravi

  • Bapi for subcontracting purchase order

    Hi,
    is there a BAPI allowing to create a subcontracting purchase order?
    Best regards.

    Hello,
    BAPI_PO_CREATE and BO: BUS2012.
    BAPIEKPOC = ITEM_CAT (3 - Subcontracting)
    Regds, Murugesh AS

  • Version Management active for Release Purchase Orders

    Hi Friends
    We activated Version Management for Purchasing documents. Version 0
    activates automatically when we create PO / contract. After final
    release version will be closed automatically.
    When ever new version is active we could able to make release orders.
    When we make message no.MEDCM014 to error, we could not to do. But we
    want release orders should be make up to old value.
    Can we do with some user exit or BADI for this purpose.
    Regards,
    Sai Krishna

    Hi,
    I think there is no std. way to solve this
    Regards,
    Sai Krishna

  • Bapi for creating purchase order

    hi, iam using BAPI_PO_CREATE1 to create PO's for service. after creating opne PO if i go and create another po within a short span of a minute or so then it does not create the second PO. it gives message that doc does not contain any items.
    TABLES: ekpo,zcta_podates,ekko.
    DATA iekpo LIKE ekpo OCCURS 0 WITH HEADER LINE.
    DATA iekko LIKE ekko OCCURS 0 WITH HEADER LINE.
    DATA ipodates LIKE zcta_podates OCCURS 0 WITH HEADER LINE.
    DATA : wabldat1 LIKE zcta_podates-podat.
    DATA : wabldat2 LIKE zcta_podates-podat.
    DATA : wabldat3 LIKE zcta_podates-podat.
    DATA : wabldat4 LIKE zcta_podates-podat.
    DATA : wabldat5 LIKE zcta_podates-podat.
    DATA : wabldat6 LIKE zcta_podates-podat.
    DATA : wabldat7 LIKE zcta_podates-podat.
    DATA :fname1 TYPE string.
    DATA :w_fname1 TYPE string.
    DATA : BEGIN OF itab1 OCCURS 0 ,
           txz01 LIKE mepo1211-txz01,
           werks LIKE mepo1211-name1,
           srvpos  LIKE esll-srvpos,
           gross(15),
           val1(10),   "LIKE esll-frmval1,
           val2(10),   " LIKE esll-frmval2
           val3(10),
          zzformat LIKE ekpo-zzformat,
          zzcampaign LIKE ekpo-zzcampaign,
          zzmeansofad LIKE ekpo-zzmeansofad,
          zzcity  LIKE ekpo-zzcity,
          zzlangu  LIKE ekpo-zzlangu,
          zzedition LIKE ekpo-zzedition,
          zzcolorhue  LIKE ekpo-zzcolorhue,
          zztypeofad LIKE ekpo-zztypeofad,
          date1(10),
           date2(10),
           date3(10),
           date4(10),
           date5(10),
           date6(10),
           date7(10),
           END OF itab1.
    DATA :BEGIN OF itab2 OCCURS 0,         " radio
             txz01 LIKE mepo1211-txz01,
          werks LIKE mepo1211-name1,
          srvpos  LIKE esll-srvpos,
          gross(12),
          val1(10),   "LIKE esll-frmval1,
          val2(10),   " LIKE esll-frmval2
          zzformat LIKE ekpo-zzformat,
          zzcampaign  LIKE ekpo-zzcampaign,
          zzmeansofad LIKE ekpo-zzmeansofad,
          zzcity      LIKE ekpo-zzcity,
          zzprogramname LIKE ekpo-zzprogramname,
          zzdealstructure LIKE ekpo-zzdealstructure,
          zztimeband    LIKE ekpo-zztimeband,
         date1(10),
           date2(10),
           date3(10),
           date4(10),
           date5(10),
           date6(10),
           date7(10),
          END OF itab2.
    DATA :BEGIN OF itab3 OCCURS 0,   "tv
          txz01 LIKE mepo1211-txz01,
          werks LIKE mepo1211-name1,
          srvpos  LIKE esll-srvpos,
          gross(12),
          val1(10),   "LIKE esll-frmval1,
          val2(10),   " LIKE esll-frmval2
          zzformat LIKE ekpo-zzformat,
          zzcampaign    LIKE ekpo-zzcampaign,
          zzmeansofad LIKE ekpo-zzmeansofad,
          zzgenre        LIKE ekpo-zzgenre,
          zzprogramname LIKE ekpo-zzprogramname,
          zzdealstructure LIKE ekpo-zzdealstructure,
          zztimeband    LIKE ekpo-zztimeband,
          zzlangu       LIKE ekpo-zzlangu,
          zzcity(20),  "      LIKE ekpo-zzcity,
          date1(10),
           date2(10),
           date3(10),
           date4(10),
           date5(10),
           date6(10),
           date7(10),
          END OF itab3.
    DATA :BEGIN OF itab4 OCCURS 0,   "OUTDOOR
             txz01 LIKE mepo1211-txz01,
          werks LIKE mepo1211-name1,
          srvpos  LIKE esll-srvpos,
          gross(12),
          val1(10),   "LIKE esll-frmval1,
          val2(10),   " LIKE esll-frmval2
          cond(12),
          zzformat LIKE ekpo-zzformat,
          zzcampaign    LIKE ekpo-zzcampaign,
          zzmeansofad LIKE ekpo-zzmeansofad,
          zzcity      LIKE ekpo-zzcity,
          zzlocationorroad LIKE ekpo-zzlocationorroad,
          zztypeofad  LIKE ekpo-zztypeofad,
          zztrafficdirtn LIKE ekpo-zztrafficdirtn,
          date1(10),
           date2(10),
           date3(10),
           date4(10),
           date5(10),
           date6(10),
           date7(10),
          END OF itab4.
    DATA :BEGIN OF itab5 OCCURS 0,  "INTERNET
          txz01 LIKE mepo1211-txz01,
          werks LIKE mepo1211-name1,
          srvpos  LIKE esll-srvpos,
          gross(12),
          val1(10),   "LIKE esll-frmval1,
          val2(10),   " LIKE esll-frmval2
          cond(12),
          zzformat LIKE ekpo-zzformat,
          zzcampaign    LIKE ekpo-zzcampaign,
          zzmeansofad LIKE ekpo-zzmeansofad,
          zztypeofad  LIKE ekpo-zztypeofad,
          zzsection      LIKE ekpo-zzsection,
         date1(10),
           date2(10),
           date3(10),
           date4(10),
           date5(10),
           date6(10),
           date7(10),
          END OF itab5.
    DATA :BEGIN OF itab6 OCCURS 0,  "CINEMA
          txz01 LIKE mepo1211-txz01,
          werks LIKE mepo1211-name1,
          srvpos  LIKE esll-srvpos,
          gross(12),
          val1(10),   "LIKE esll-frmval1,
          val2(10),   " LIKE esll-frmval2
          cond(12),
          zzformat LIKE ekpo-zzformat,
          zzcampaign    LIKE ekpo-zzcampaign,
          zzcity      LIKE ekpo-zzcity,
          zzlocationorroad LIKE ekpo-zzlocationorroad,
          zzcinemaname   LIKE ekpo-zzcinemaname,
          date1(10),
           date2(10),
           date3(10),
           date4(10),
           date5(10),
           date6(10),
           date7(10),
          END OF itab6.
    DATA :BEGIN OF itab7 OCCURS 0,   "OTHER MEDIA
             txz01 LIKE mepo1211-txz01,
          werks LIKE mepo1211-name1,
          srvpos  LIKE esll-srvpos,
          gross(12),
          val1(10),   "LIKE esll-frmval1,
          val2(10),   " LIKE esll-frmval2
          val3(10),
          val4(10),
          zzformat LIKE ekpo-zzformat,
          zcampaign    LIKE ekpo-zzcampaign,
          zzmeansofad LIKE ekpo-zzmeansofad,
          zzcity      LIKE ekpo-zzcity,
          zzedition   LIKE ekpo-zzedition,
          zzcolorhue  LIKE ekpo-zzcolorhue,
          zztypeofad  LIKE ekpo-zztypeofad,
          zzlangu       LIKE ekpo-zzlangu,
          zzgenre        LIKE ekpo-zzgenre,
          zzprogramname LIKE ekpo-zzprogramname,
          zzdealstructure LIKE ekpo-zzdealstructure,
          zztimeband    LIKE ekpo-zztimeband,
          zzlocationorroad LIKE ekpo-zzlocationorroad,
          zzsection      LIKE ekpo-zzsection,
          date1(10),
           date2(10),
           date3(10),
           date4(10),
           date5(10),
           date6(10),
           date7(10),
          END OF itab7.
    DATA :BEGIN OF itab8 OCCURS 0,    "NO MEDIA
            txz01 LIKE mepo1211-txz01,
          werks LIKE mepo1211-name1,
          srvpos  LIKE esll-srvpos,
          qty(12),
          gross(12),
          zzformat LIKE ekpo-zzformat,
          zzcampaign    LIKE ekpo-zzcampaign,
          zzcity      LIKE ekpo-zzcity,
          date1(10),
           date2(10),
           date3(10),
           date4(10),
           date5(10),
           date6(10),
           date7(10),
          END OF itab8.
    DATA : BEGIN OF str OCCURS 0,
           txz01 LIKE mepo1211-txz01,
           werks LIKE mepo1211-name1,
           srvpos  LIKE esll-srvpos,
           gross(15),
           val1(10),   "LIKE esll-frmval1,
           val2(10),   " LIKE esll-frmval2
           val3(10),
          val4(10),
          zzformat LIKE ekpo-zzformat,
          zzcampaign LIKE ekpo-zzcampaign,
          zzmeansofad LIKE ekpo-zzmeansofad,
          zzcity  LIKE ekpo-zzcity,
          zzlangu  LIKE ekpo-zzlangu,
          zzedition LIKE ekpo-zzedition,
          zzcolorhue  LIKE ekpo-zzcolorhue,
          zztypeofad LIKE ekpo-zztypeofad,
          zzillumination LIKE ekpo-zzillumination ,
         zztrafficdirtn LIKE ekpo-zztrafficdirtn ,
        zzstore LIKE ekpo-zzstore ,
        zzcasting LIKE ekpo-zzcasting ,
        zzgenre LIKE ekpo-zzgenre ,
        zzsection LIKE ekpo-zzsection ,
        zznumberofdays LIKE ekpo-zznumberofdays ,
        zzprogramname LIKE ekpo-zzprogramname ,
        zzdealstructure LIKE ekpo-zzdealstructure ,
        zztimeband LIKE ekpo-zztimeband ,
        zzdate LIKE ekpo-zzdate ,
    zzdaysofwk LIKE ekpo-zzdaysofwk ,
    zzasnum LIKE ekpo-zzasnum ,
    zzlocationorroad LIKE ekpo-zzlocationorroad ,
    zzcinemaname LIKE ekpo-zzcinemaname ,
    zzcapacity LIKE ekpo-zzcapacity ,
    zzfield2 LIKE ekpo-zzfield2 ,
    zzfield3 LIKE ekpo-zzfield3 ,
           date1(10),
           date2(10),
           date3(10),
           date4(10),
           date5(10),
           date6(10),
           date7(10),
           END OF str.
    DATA :package(10) TYPE n VALUE '4747'.
    DATA :subpackage(10) TYPE n VALUE '4748'.
    DATA : l_po_header LIKE bapimepoheader.
    DATA : l_po_headerx LIKE bapimepoheaderx.
    DATA : l_purchaseorder LIKE bapimepoheader-po_number.
    DATA : t_po_account LIKE bapimepoaccount OCCURS 0 WITH HEADER LINE.
    DATA : t_po_accountx LIKE bapimepoaccountx OCCURS 0 WITH HEADER LINE.
    DATA : t_po_servalue LIKE bapiesklc OCCURS 0 WITH HEADER LINE.
    DATA : BEGIN OF t_po_items OCCURS 0.
            INCLUDE STRUCTURE bapimepoitem.
    DATA : END OF t_po_items.
    DATA : BEGIN OF t_po_itemsx OCCURS 0.
            INCLUDE STRUCTURE bapimepoitemx.
    DATA : END OF t_po_itemsx.
    DATA : BEGIN OF t_return OCCURS 0.
            INCLUDE STRUCTURE bapiret2.
    DATA : END OF t_return.
    DATA : BEGIN OF t_po_services OCCURS 0.
            INCLUDE STRUCTURE bapiesllc.
    DATA : END OF t_po_services.
    DATA: l_item(5) TYPE n,l_last_po(10).
    *TABLES : zerror.
    DATA lcounter(3) TYPE n.
    DATA : l_errflag.
    SELECTION-SCREEN:BEGIN OF BLOCK b1 WITH FRAME.
    PARAMETER:x_lifnr LIKE ekko-lifnr .
    PARAMETER:x_ekorg LIKE ekko-ekorg DEFAULT '9000' .
    PARAMETER:x_ekgrp LIKE ekko-ekgrp .
    PARAMETER:x_bukrs LIKE ekko-bukrs DEFAULT '0101' .
    PARAMETER:x_bsart LIKE ekko-bsart DEFAULT 'ZNB1'.
    PARAMETER:x_sdate LIKE ekko-bedat.
    PARAMETER : x_edate LIKE ekko-bedat.
    PARAMETER: pr_fn1 LIKE ibipparms-path OBLIGATORY.
    PARAMETER: rad1 RADIOBUTTON GROUP gr1.
    PARAMETER: rad2 RADIOBUTTON GROUP gr1.
    PARAMETER: rad3 RADIOBUTTON GROUP gr1.
    PARAMETER: rad4 RADIOBUTTON GROUP gr1.
    PARAMETER: rad5 RADIOBUTTON GROUP gr1.
    PARAMETER: rad6 RADIOBUTTON GROUP gr1.
    PARAMETER: rad7 RADIOBUTTON GROUP gr1.
    PARAMETER: rad8 RADIOBUTTON GROUP gr1.
    SELECTION-SCREEN:END OF BLOCK b1 .
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR pr_fn1.
      CALL FUNCTION 'F4_FILENAME'
        IMPORTING
          file_name = pr_fn1.
      MOVE pr_fn1 TO w_fname1.
    START-OF-SELECTION.
      IF rad1 = 'X'.
        PERFORM table_upload  TABLES itab1.
      ELSEIF rad2 = 'X'.
        PERFORM table_upload  TABLES itab2.
      ELSEIF rad3 = 'X'.
        PERFORM table_upload  TABLES itab3.
      ELSEIF rad4 = 'X'.
        PERFORM table_upload  TABLES itab4.
      ELSEIF rad5 = 'X'.
        PERFORM table_upload  TABLES itab5.
      ELSEIF rad6 = 'X'.
        PERFORM table_upload  TABLES itab6.
      ELSEIF rad7 = 'X'.
        PERFORM table_upload  TABLES itab7.
      ELSEIF rad8 = 'X'.
        PERFORM table_upload  TABLES itab8.
      ENDIF.
      LOOP AT str.
        SHIFT str-srvpos RIGHT DELETING TRAILING ' '.
        OVERLAY str-srvpos WITH '00000000000000000'.
        MODIFY str.
      ENDLOOP.
      CLEAR : l_po_header.
      PERFORM create_po_header.
      LOOP AT str FROM 2 .
        PERFORM append_item.
      ENDLOOP.
      PERFORM create_po.
      WAIT UP TO 5 SECONDS.
      SELECT * FROM ekpo INTO CORRESPONDING FIELDS OF TABLE iekpo WHERE ebeln = l_purchaseorder.
      COMMIT WORK.
      WAIT UP TO  5 SECONDS.
      LOOP AT iekpo.
        l_item =  sy-tabix + 1.
        READ TABLE str INDEX  l_item.
        iekpo-zzfield2 = str-zzfield2 .
        iekpo-zzfield3 = str-zzfield3 .
        iekpo-zzformat = str-zzformat .
        iekpo-zzmeansofad = str-zzmeansofad .
        iekpo-zzedition = str-zzedition .
        iekpo-zzcolorhue = str-zzcolorhue .
        iekpo-zztypeofad = str-zztypeofad .
        iekpo-zzcity = str-zzcity .
        iekpo-zzlangu = str-zzlangu .
        iekpo-zzdaysofwk = str-zzdaysofwk .
        iekpo-zzasnum = str-zzasnum .
        iekpo-zzlocationorroad = str-zzlocationorroad .
        iekpo-zzcinemaname = str-zzcinemaname .
        iekpo-zzcapacity = str-zzcapacity .
        iekpo-zzcampaign = str-zzcampaign .
        iekpo-zzillumination = str-zzillumination .
        iekpo-zztrafficdirtn = str-zztrafficdirtn .
        iekpo-zzstore = str-zzstore .
        iekpo-zzcasting = str-zzcasting .
        iekpo-zzgenre = str-zzgenre .
        iekpo-zzsection = str-zzsection .
        iekpo-zznumberofdays = str-zznumberofdays .
        iekpo-zzprogramname = str-zzprogramname .
        iekpo-zzdealstructure = str-zzdealstructure .
        iekpo-zztimeband = str-zztimeband .
        iekpo-zzdate = str-zzdate .
        MODIFY iekpo.
      ENDLOOP.
      WAIT UP TO 2 SECONDS.
      COMMIT WORK.
      WAIT UP TO 15 SECONDS.
      UPDATE ekpo FROM TABLE iekpo.
      COMMIT WORK.
      WAIT UP TO 2 SECONDS.
      SELECT * FROM ekko INTO CORRESPONDING FIELDS OF TABLE iekko WHERE ebeln = l_purchaseorder.
      LOOP AT iekko.
        iekko-kdatb = x_sdate.
        iekko-kdate = x_edate.
        MODIFY iekko.
      ENDLOOP.
      UPDATE ekko FROM TABLE iekko.
      COMMIT WORK.
      WAIT UP TO 1 SECONDS.
      CLEAR l_item.
      l_item = 10.
      LOOP AT str FROM 2 .
        CONCATENATE str-date1+6(4)  str-date1+3(2)  str-date1(2)  INTO wabldat1.
        CONCATENATE str-date2+6(4)  str-date2+3(2)  str-date2(2)  INTO wabldat2.
        CONCATENATE str-date3+6(4)  str-date3+3(2)  str-date3(2)  INTO wabldat3.
        CONCATENATE str-date4+6(4)  str-date4+3(2)  str-date4(2)  INTO wabldat4.
        CONCATENATE str-date5+6(4)  str-date5+3(2)  str-date5(2)  INTO wabldat5.
        CONCATENATE str-date6+6(4)  str-date6+3(2)  str-date6(2)  INTO wabldat6.
        CONCATENATE str-date7+6(4)  str-date7+3(2)  str-date7(2)  INTO wabldat7.
        ipodates-ebeln = l_purchaseorder.
        ipodates-ebelp = l_item.
        ipodates-linno = '001'.
        ipodates-podat = wabldat1.
        APPEND ipodates.
        ipodates-ebeln = l_purchaseorder.
        ipodates-ebelp = l_item.
        ipodates-linno = '002'.
        ipodates-podat = wabldat2.
        APPEND ipodates.
        ipodates-ebeln = l_purchaseorder.
        ipodates-ebelp = l_item.
        ipodates-linno = '003'.
        ipodates-podat = wabldat3.
        APPEND ipodates.
        ipodates-ebeln = l_purchaseorder.
        ipodates-ebelp = l_item.
        ipodates-linno = '004'.
        ipodates-podat = wabldat4.
        APPEND ipodates.
        ipodates-ebeln = l_purchaseorder.
        ipodates-ebelp = l_item.
        ipodates-linno = '005'.
        ipodates-podat = wabldat5.
        APPEND ipodates.
        ipodates-ebeln = l_purchaseorder.
        ipodates-ebelp = l_item.
        ipodates-linno = '006'.
        ipodates-podat = wabldat6.
        APPEND ipodates.
        ipodates-ebeln = l_purchaseorder.
        ipodates-ebelp = l_item.
        ipodates-linno = '007'.
        ipodates-podat = wabldat7.
        APPEND ipodates.
        l_item = l_item + 10.
      ENDLOOP.
      WAIT UP TO 1 SECONDS.
      MODIFY zcta_podates FROM TABLE ipodates.
      COMMIT WORK.
      WAIT UP TO 2 SECONDS.
    ipodates-podat,ipodates-ebeln,ipodates-ebelp,ipodates-linno.
      WAIT UP TO 5 SECONDS.
      LOOP AT t_return.
        WRITE :/ t_return-message.
      ENDLOOP.
    free : ipodates,iekpo,str,itab1,itab2,itab3,itab4,itab5,itab6,itab7,itab8.
    *&      Form  create_po_header
    FORM create_po_header .
      l_po_header-comp_code = '0101'.             " Company Code
      l_po_header-doc_type = x_bsart.         "'ZNB1'.            " Order Typr BSART
      l_po_header-creat_date = sy-datum.        " P.O Dt - BEDAT
      l_po_header-doc_date  = sy-datum.
      l_po_header-vendor   =   x_lifnr.
      l_po_header-vper_start  = x_sdate.
      l_po_header-vper_end  =     x_edate.
      l_po_header-purch_org = '9000'.           " Purch. Org - EKKO-EKORG
      l_po_header-pur_group = x_ekgrp.        " Purch Group - EKKO-EKGRP
      l_po_header-currency_iso = 'INR'.
      CLEAR : l_po_headerx.
      l_po_headerx-po_number = 'X'.
      l_po_headerx-comp_code = 'X'." Company Code
      l_po_headerx-doc_type = 'X'. " Order Typr BSART
      l_po_headerx-vendor = 'X'. "Vendor - EKKO-LIFNR
      l_po_headerx-purch_org = 'X'. " Purch. Org - EKKO-EKORG
      l_po_headerx-pur_group = 'X'. " Purch Group - EKKO-EKGRP
      l_po_headerx-currency_iso = 'X'. " Currency Default field for Enjoy
      l_po_headerx-ref_1       = 'X'.
    ENDFORM.                    " create_po_header
    *&      Form  APPEND_ITEM
    FORM append_item .
      package  = package + 2.
      subpackage = package + 1.
      l_item = l_item + 10.
      t_po_items-po_item =  l_item.
      t_po_items-acctasscat = 'K'.
      t_po_items-item_cat = 'D'.
      t_po_items-short_text = str-txz01. .
      t_po_items-plant = str-werks  . " P
      t_po_items-tax_code = 'S1'.
      t_po_items-pckg_no  =    package.            " 4748.             "package.
      APPEND t_po_items.
      CLEAR t_po_items.
      t_po_itemsx-po_item =  l_item.
      t_po_itemsx-po_itemx = 'X'.
      t_po_itemsx-acctasscat = 'X'.
      t_po_itemsx-item_cat = 'X'.
      t_po_itemsx-short_text = 'X'.
      t_po_itemsx-plant = 'X'.
      t_po_itemsx-tax_code = 'X'.
      t_po_itemsx-pckg_no  = 'X'.
      APPEND t_po_itemsx.
      CLEAR t_po_itemsx.
      t_po_account-po_item =  l_item.
      t_po_account-serial_no = 1.
      t_po_account-quantity = 1.
      t_po_account-distr_perc = '00'.
      t_po_account-costcenter = '0006079000'.                   " 'BR034'.
      t_po_account-gl_account = '0054014071'.        "'0000135075'.
      t_po_account-co_area    =  '1001'.
      APPEND t_po_account.
      CLEAR t_po_account.
      t_po_accountx-po_item =  l_item.
      t_po_accountx-serial_no = 1.
    t_po_accountx-quantity = 'X'.
      t_po_accountx-distr_perc = 'X'.
      t_po_accountx-costcenter = 'X'.
      t_po_accountx-gl_account = 'X'.
      t_po_accountx-co_area  = 'X'.
      APPEND t_po_accountx.
      CLEAR t_po_accountx.
      t_po_services-pckg_no =  package.                         "'4748'.
      t_po_services-line_no = '0000000001' .
      t_po_services-ext_line = '0000000000' .
      t_po_services-outl_level = '0'.
      t_po_services-outl_no = ' '.
      t_po_services-outl_ind = 'X'.
      t_po_services-subpckg_no =  subpackage .                  "'4749'.
      APPEND t_po_services. CLEAR t_po_services .
      t_po_services-pckg_no = subpackage .                      "'4749'.
      t_po_services-line_no = '0000000002' .
      t_po_services-ext_line = '10' .
      t_po_services-outl_level = '0'.
      t_po_services-service = str-srvpos.          "'000000000003000045'.
      t_po_services-gr_price = str-gross.                       "'2000.00'.
      t_po_services-form_val1 =  str-val1.                      "'10.000'.
      t_po_services-form_val2 = str-val2.                       "'33.000'.
    if rad1 = 'x'.
      t_po_services-form_val3 = str-val3.                       " '3.000'.
    endif.
      t_po_services-tax_code   = 'S1'.
      APPEND t_po_services. CLEAR t_po_services .
      t_po_servalue-pckg_no = subpackage .                      "'4749'.
      t_po_servalue-line_no = '0000000002' .
      t_po_servalue-serial_no = '01'.
      APPEND t_po_servalue . CLEAR t_po_servalue.
    ENDFORM.                    " APPEND_ITEM
    *&      Form  create_po
    FORM create_po .
      CALL FUNCTION 'BAPI_PO_CREATE1'
          EXPORTING
            poheader                     = l_po_header
           poheaderx                    =  l_po_headerx
         IMPORTING
           exppurchaseorder             = l_purchaseorder
         TABLES
           return                       = t_return
           poitem                       =  t_po_items
           poitemx                      =  t_po_itemsx
           poaccount                    = t_po_account
           poaccountx                   = t_po_accountx
           poservices                   = t_po_services
         posrvaccessvalues            =   t_po_servalue
      WAIT UP TO 15 SECONDS.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
    ENDFORM.                    " create_po
    *&      Form  TABLE_UPLOAD
    FORM table_upload  TABLES   p_itab1.  " structure < itab1 #local# >
      "Insert correct name for <...>.
      CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        filename                      = w_fname1
       filetype                      = 'ASC'
       has_field_separator           = 'X'
       read_by_line                  = 'X'
       replacement                   = '#'
      TABLES
        data_tab                      =  p_itab1.
      LOOP AT p_itab1.
        MOVE-CORRESPONDING p_itab1 TO str.
        APPEND str.
        CLEAR p_itab1.
      ENDLOOP.
    *  WAIT UP TO 5 SECONDS.
    ENDFORM.                    " TABLE_UPLOAD

    Hi,
    Check this sample code..how to use the BAPI_PO_CREATE1.
    REPORT  Z_TEST_PO   .
    *DATA DECLARATION
    CONSTANTS : C_X VALUE 'X'.
    *Structures to hold PO header data
    DATA : HEADER LIKE BAPIMEPOHEADER ,
    HEADERX LIKE BAPIMEPOHEADERX .
    *Structures to hold PO account data
    DATA : ACCOUNT LIKE BAPIMEPOACCOUNT OCCURS 0 WITH HEADER LINE ,
    ACCOUNTX LIKE BAPIMEPOACCOUNTX OCCURS 0 WITH HEADER LINE .
    *Internal Tables to hold PO ITEM DATA
    DATA : ITEM LIKE BAPIMEPOITEM OCCURS 0 WITH HEADER LINE,
    ITEMX LIKE BAPIMEPOITEMX OCCURS 0 WITH HEADER LINE,
    *Internal table to hold messages from BAPI call
    RETURN LIKE BAPIRET2 OCCURS 0 WITH HEADER LINE,
    *Internal table to hold messages from BAPI call
    POCONTRACTLIMITS LIKE BAPIESUCC OCCURS 0 WITH HEADER LINE.
    DATA : W_HEADER(40) VALUE 'PO Header',
    PURCHASEORDER LIKE BAPIMEPOHEADER-PO_NUMBER,
    DELIVERY_DATE LIKE BAPIMEPOSCHEDULE-DELIVERY_DATE.
    DATA : WS_LANGU LIKE SY-LANGU.
    *text-001 = 'PO Header' - define as text element
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETERS : COMPANY LIKE HEADER-COMP_CODE DEFAULT '122' ,
    DOCTYP LIKE HEADER-DOC_TYPE DEFAULT 'NB' ,
    CDATE LIKE HEADER-CREAT_DATE DEFAULT SY-DATUM ,
    VENDOR LIKE HEADER-VENDOR DEFAULT '2000000012' ,
    PUR_ORG LIKE HEADER-PURCH_ORG DEFAULT 'PU01' ,
    PUR_GRP LIKE HEADER-PUR_GROUP DEFAULT '005' .
    *sociedad like HEADER-COMP_CODE default '122' ,
    *vendedor like HEADER-SALES_PERS default 'sale person'.
    SELECTION-SCREEN END OF BLOCK B1.
    SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
    PARAMETERS : ITEM_NUM LIKE ITEM-PO_ITEM DEFAULT '00010',
    MATERIAL LIKE ITEM-MATERIAL DEFAULT '12000000' ,
    TIPO_IMP LIKE ITEM-ACCTASSCAT DEFAULT 'K' ,
    *pos_doc like ITEM-ITEM_CAT default 'F' ,
    SHORTTXT LIKE ITEM-SHORT_TEXT DEFAULT 'PRUEBA BAPI' ,
    GRUP_ART LIKE ITEM-MATL_GROUP DEFAULT '817230000' ,
    PLANT LIKE ITEM-PLANT DEFAULT '3001' ,
    MPE LIKE ITEM-TRACKINGNO DEFAULT '9999' ,
    *contrato like ITEM-AGREEMENT default '4904000003' ,
    *quantity like ITEM-QUANTITY default 1 .
    PO_UNIT LIKE ITEM-PO_UNIT DEFAULT 'EA'.
    SELECTION-SCREEN END OF BLOCK B2.
    * Par?mnetros de imputaci?n
    SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-004.
    PARAMETERS : CENTRO LIKE ACCOUNT-COSTCENTER DEFAULT '1220813150',
    CUENTA LIKE ACCOUNT-GL_ACCOUNT DEFAULT '6631400' ,
    NUM_POS LIKE ACCOUNT-PO_ITEM DEFAULT '10' ,
    SERIAL LIKE ACCOUNT-SERIAL_NO DEFAULT '01' ,
    IND_IMP LIKE ACCOUNT-TAX_CODE DEFAULT 'I2' .
    SELECTION-SCREEN END OF BLOCK B3.
    START-OF-SELECTION.
    *DATA POPULATION
      WS_LANGU = SY-LANGU. "Language variable
    *POPULATE HEADER DATA FOR PO
    *HEADER-COMP_CODE = sociedad .
      HEADER-DOC_TYPE = DOCTYP .
      HEADER-VENDOR = VENDOR .
      HEADER-CREAT_DATE = CDATE .
      HEADER-CREATED_BY = 'TD17191' .
      HEADER-PURCH_ORG = PUR_ORG .
      HEADER-PUR_GROUP = PUR_GRP .
      HEADER-COMP_CODE = COMPANY .
      HEADER-LANGU = WS_LANGU .
    *HEADER-SALES_PERS = vendedor .
    *HEADER-CURRENCY = 'DOP' .
    *HEADER-ITEM_INTVL = 10 .
    *HEADER-PMNTTRMS = 'N30' .
    *HEADER-EXCH_RATE = 1 .
    *POPULATE HEADER FLAG.
      HEADERX-COMP_CODE = C_X.
      HEADERX-DOC_TYPE = C_X.
      HEADERX-VENDOR = C_X.
      HEADERX-CREAT_DATE = C_X.
      HEADERX-CREATED_BY = C_X.
      HEADERX-PURCH_ORG = C_X.
      HEADERX-PUR_GROUP = C_X.
      HEADERX-LANGU = C_X.
    *HEADERX-sales_pers = c_x.
    *HEADERX-CURRENCY = c_x.
    *HEADER-ITEM_INTVL = c_x.
    *HEADER-PMNTTRMS = c_x.
    *HEADER-EXCH_RATE = c_x.
    *HEADER-EXCH_RATE = c_x.
    *POPULATE ITEM DATA.
      ITEM-PO_ITEM = ITEM_NUM.
      ITEM-QUANTITY = '1'.
    *ITEM-MATERIAL = material .
      ITEM-SHORT_TEXT = 'prueba bapi_po_create1'.
    *ITEM-TAX_CODE = ''.
      ITEM-ACCTASSCAT = 'K' .
    *ITEM-ITEM_CAT = 'D' .
      ITEM-MATL_GROUP = '817230000' .
      ITEM-PLANT = '3001' .
      ITEM-TRACKINGNO = '99999'.
      ITEM-PREQ_NAME = 'test'.
    *ITEM-AGREEMENT = '' .
    *ITEM-AGMT_ITEM = ''.
      ITEM-QUANTITY = '1' .
      ITEM-PO_UNIT = 'EA'.
    *ITEM-ORDERPR_UN = 'EA'.
      ITEM-CONV_NUM1 = '1'.
      ITEM-CONV_DEN1 = '1'.
      ITEM-NET_PRICE = '1000000' .
      ITEM-PRICE_UNIT = '1'.
      ITEM-GR_PR_TIME = '0'.
      ITEM-PRNT_PRICE = 'X'.
      ITEM-UNLIMITED_DLV = 'X'.
      ITEM-GR_IND = 'X' .
      ITEM-IR_IND = 'X' .
      ITEM-GR_BASEDIV = 'X'.
    *ITEM-PCKG_NO = '' .
      APPEND ITEM. CLEAR ITEM.
    *POPULATE ITEM FLAG TABLE
      ITEMX-PO_ITEM = ITEM_NUM.
      ITEMX-PO_ITEMX = C_X.
    *ITEMX-MATERIAL = C_X.
      ITEMX-SHORT_TEXT = C_X.
      ITEMX-QUANTITY = C_X.
    *ITEMX-TAX_CODE = C_X.
      ITEMX-ACCTASSCAT = C_X.
    *ITEMX-ITEM_CAT = c_x.
      ITEMX-MATL_GROUP = C_X.
      ITEMX-PLANT = C_X.
      ITEMX-TRACKINGNO = C_X.
      ITEMX-PREQ_NAME = C_X.
    *ITEMX-AGREEMENT = C_X.
    *ITEMX-AGMT_ITEM = c_x.
      ITEMX-STGE_LOC = C_X.
      ITEMX-QUANTITY = C_X.
      ITEMX-PO_UNIT = C_X.
    *ITEMX-ORDERPR_UN = C_X.
      ITEMX-CONV_NUM1 = C_X.
      ITEMX-CONV_DEN1 = C_X.
      ITEMX-NET_PRICE = C_X.
      ITEMX-PRICE_UNIT = C_X.
      ITEMX-GR_PR_TIME = C_X.
      ITEMX-PRNT_PRICE = C_X.
      ITEMX-UNLIMITED_DLV = C_X.
      ITEMX-GR_IND = C_X .
      ITEMX-IR_IND = C_X .
      ITEMX-GR_BASEDIV = C_X .
      APPEND ITEMX. CLEAR ITEMX.
    *POPULATE ACCOUNT DATA.
      ACCOUNT-PO_ITEM = ITEM_NUM.
      ACCOUNT-SERIAL_NO = SERIAL .
      ACCOUNT-CREAT_DATE = SY-DATUM .
      ACCOUNT-COSTCENTER = CENTRO .
      ACCOUNT-GL_ACCOUNT = CUENTA .
      ACCOUNT-GR_RCPT = 'tester'.
      APPEND ACCOUNT. CLEAR ACCOUNT.
    *POPULATE ACCOUNT FLAG TABLE.
      ACCOUNTX-PO_ITEM = ITEM_NUM .
      ACCOUNTX-PO_ITEMX = C_X .
      ACCOUNTX-SERIAL_NO = SERIAL .
      ACCOUNTX-SERIAL_NOX = C_X .
      ACCOUNTX-CREAT_DATE = C_X .
      ACCOUNTX-COSTCENTER = C_X .
      ACCOUNTX-GL_ACCOUNT = C_X .
      ACCOUNT-GR_RCPT = C_X.
      APPEND ACCOUNTX. CLEAR ACCOUNTX.
    *BAPI CALL
      CALL FUNCTION 'DIALOG_SET_NO_DIALOG'.
      CALL FUNCTION 'BAPI_PO_CREATE1'
        EXPORTING
          POHEADER         = HEADER
          POHEADERX        = HEADERX
        IMPORTING
          EXPPURCHASEORDER = PURCHASEORDER
        TABLES
          RETURN           = RETURN
          POITEM           = ITEM
          POITEMX          = ITEMX
          POACCOUNT        = ACCOUNT
          POACCOUNTX       = ACCOUNTX.
    *Confirm the document creation by calling database COMMIT
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
      EXPORTING
      WAIT = 'X'
    * IMPORTING
    * RETURN =
    END-OF-SELECTION.
    *Output the messages returned from BAPI call
      LOOP AT RETURN.
        WRITE / RETURN-MESSAGE.
      ENDLOOP.
    Regards
    vijay

  • Bapi for createing purchase order

    Hi,
    when i'm creating PO by BAPI        BAPI_PO_CREATE1
    given error message is comming
    No instance of object type PurchaseOrder has been created. External reference:
    PO header data still faulty
    can any body help me out.
    thanks
    mukesh

    Thanks for reply , pl. help me.
    THIS IS MY HEADER PARAMETER
    poheaderx-po_number = 'X'.
    POHEADERx-PURCH_ORG  = 'X' .
    POHEADERx-PUR_GROUP = 'X'.
    *POHEADER-CURRENCY =
    *POHEADER-CURRENCY_ISO
    *POHEADER-EXCH_RATE
    POHEADERX-ITEM_INTVL = 'X'.
    POHEADERx-DOC_DATE = 'X'.
    POHEADERx-DOC_TYPE = 'X' .
    POHEADERx-COMP_CODE = 'X'.
    POHEADERx-CREAT_DATE = 'X'.
    POHEADERx-VENDOR = 'X' .
    POHEADERx-CREATED_BY = 'X' .
    POHEADERx-PMNTTRMS = 'X'.
    POHEADERx-INCOTERMS1 = 'X' .
    POHEADERx-INCOTERMS2 = 'X' .
    POHEADERX-LANGU = 'X'.
    POHEADERX-EXCH_RATE = 'X'.
    POHEADERX-STATUS = 'X'.
    POHEADERX-SUPPL_VEND = 'X'.
    poheaderx-delete_ind = 'X'.
    poheaderx-our_ref   = 'X'.
    poheaderx-currency_iso = 'X'.
    poheaderx-dscnt1_to = 'X'.
    poheaderx-dscnt2_to = 'X'.
    poheaderx-dscnt3_to = 'X'.
    poheaderx-dsct_pct1 = 'X'.
    poheaderx-dsct_pct2 = 'X'.
    poheaderx-LANGU_ISO = 'X'.
    poheaderx-CURRENCY = 'X'.
    poheaderx-EX_RATE_FX = 'X'.
    poheaderx-VPER_START = 'X'.
    poheaderx-VPER_END = 'X'.
    poheaderx-WARRANTY = 'X'.
    poheaderx-QUOTATION = 'X'.
    poheaderx-QUOT_DATE = 'X'.
    poheaderx-REF_1 = 'X'.
    poheaderx-SALES_PERS = 'X'.
    poheaderx-LOGSYSTEM = 'X'.
    poheaderx-SUBITEMINT = 'X'.
    poheaderx-PO_REL_IND = 'X'.
    poheaderx-REL_STATUS = 'X'.
    poheaderx-VAT_CNTRY = 'X'.
    poheaderx-VAT_CNTRY_ISO = 'X'.
    poheaderx-REASON_CANCEL = 'X'.
    poheaderx-REASON_CODE = 'X'.
    POHEADER-PURCH_ORG  = 'DUPO' .
    POHEADER-PUR_GROUP = 'D01'.
    POHEADER-CURRENCY = 'AED'.
    *POHEADER-CURRENCY_ISO
    POHEADER-ITEM_INTVL = '00001'.
    POHEADER-DOC_DATE = SY-DATUM.
    POHEADER-DOC_TYPE = 'N10' .   "NB
    POHEADER-COMP_CODE = 'BSGL'.
    POHEADER-CREAT_DATE = SY-DATUM.
    POHEADER-VENDOR = '0000351466' .
    POHEADER-CREATED_BY = sy-uname.
    POHEADER-PMNTTRMS = '0001'.
    POHEADER-INCOTERMS1 = 'EXW' .
    POHEADER-INCOTERMS2 = 'PLANT' .
    POHEADER-LANGU =  sy-langu.
    POHEADER-EXCH_RATE = '1'.
    POHEADER-STATUS = '9'.
    POHEADERX-SUPPL_VEND = '0000351466'.
    poheader-our_ref   = 'REF'.
    ITEM LEVEL   PARAMETERS
    POITEM-EMATERIAL = WMATNR .
    POITEM-MATERIAL   = WMATNR .
      POITEM-PLANT = 'DUBI' .
      POITEM-QUANTITY = '1' .
    POITEM-PO_UNIT = 'MTS' .
      POITEM-NET_PRICE = '2500' .
      POITEM-TAX_CODE  = 'DT'.
      POITEM-BATCH = '0001331951'.
      POITEM-matl_group = '48200'.
    POITEM-PO_ITEM = '0001' .
    POITEM-stge_loc  = 'DU01'.
    POITEM-ITEM_CAT = '0'.
    APPEND POITEM.
    POITEMX-EMATERIAL = 'X'.
    POITEMX-MATERIAL   = 'X' .
      POITEMX-PLANT = 'X' .
      POITEMX-QUANTITY = 'X' .
      POITEMX-price_unit = 'X' .
      POITEMX-NET_PRICE = 'X' .
      POITEMX-TAX_CODE  = 'X'.
      POITEMX-BATCH = 'X'.
    POITEMX-PO_ITEM = '0001' .
    POITEMX-item_cat = 'X'.
    POITEMX-ITEM_CAT = 'X' .
    poitemx-matl_group = 'X' .
    APPEND POITEMX.

  • FM / BAPI Inbound delivery creation for a Purchase Order without material

    Dear All,
    I have a requirement to create a Inbound Delivery for a Purchase order without material number. The Purchase Order has only Material text and no material number. Please let me know a BAPI or FM to create inbound delivery in this case where there is no material defined on PO. I require BAPI / FM  since I have to make a web-service for the same.
    Thanks in advance!
    Abhishek

    Hi I did a coding in one of the userexit. If ekpo-matnr is empty then fill
    KOMDLGN-UMVKZ = 1
    KOMDLGN-UMVKN = 1
    KOMDLGN-MEINS = EKPO-MEINS
    This parameters i.e. Qty conversion are necessary and since MATNR does not exists it has to be filled.

  • DELIVERY COMPLETED indicator for Services Purchase Order

    hello experts,
    i'm working in SAP with R3 4.7 for developing funtion / BAPI for a mobile web application for services purchase order.
    i have a big problem:
    is it possibile to set the DELIVERY COMPLETED indicator (<i>ELIKZ</i>) in services purchase order via BAPI or Function Module?
    <i>I'm working with BAPI_PO_CHANGE but and i succeded with material PURCHASE ORDER but not with SERVICES PURCHASE ORDER</i>.
    can anyone help me?
    thanks in advance,
    Eliana

    For material:
    Delivery completion (DCI) tick available at line item level for each material (EKPO- ELIKZ)so you can check for the each material in PO the DCI is available or not.
    For Services:
    As Service code (Service line items) are maintained in details screen of Header line item. So whenever the DCI (Delivery completion indicator) marked for that Header line item it means that all the service line items are marked as DCI for that Header line.
    DCI indicator can mark manually in Change PO mode and automatically when service entry done as final for that Header line.
    So you can check the DCI for service same way as you do for material
    Hope it will help you
    Regards
    Vikrant

  • Error release purchase order using transaction code me29n

    i have warning error this purchasing document number cannot be released.
    while i enter me29n t code.why?
    then how to release purchase order using me29n t code?
    can anyone answer this two questions.

    hi
    i have warning error this purchasing document number cannot be released. while i enter me29n t code.why?
    is the release strategy is triggred for the po ?? check thisin  P order in me23n ,in header level check release strategy tab ,
    then how to release purchase order using me29n t code? can anyone answer this two questions.
    just go to me29n >release strategy tab here just click on the release button in front of the release code

  • Problem for Goods Receipt for Subcontracting Purchase Order

    Dear all,
    Presently, we are using SAP version 4.6C and we need to introduce GR for
    Subcontracting Purchase Order. We have developed a ABAP program to handle
    subcon Goods Receipt by uploading flat-files from our subcontractor. The
    scenario is as follows :
    Goods Receipt for Subcontracting Purchase Order
    1. In the ABAP program, function BAPI_GOODSMVT_CREATE will be used for goods
    movement.
    2. Data provided to the function are as follows :
    - Posting date
    - Document date
    - Material number
    - Plant
    - Storage location
    - Batch
    - Movement type (101)
    - Quantity
    - Purchase order number
    - Purchase order item
    - Movement indicator (B - Goods receipt for purchase order)
    3. The function will do data verification and automatically determine GI
    item for subcon stock:
    - Movement type (543)
    - Special stock (O - parts prov. vendor)
    - Material
    - Quantity
    - Plant
    Our problem is that :
    Only the GR item in the interface is to be transferred and the GI item is
    determined by the system. So, the quantity for subcon stock cannot be
    changed using this BAPI. Then the system will continue processing the goods
    receipt and create material document.
    Manually, by using transaction code MIGO, the user can display the subcon
    stock data and then change the quantity.
    By using transaction code MB01, after the user fills in all the GR fields,
    the system comes to line item 002 (subcon stock data) and then quantity can
    be changed.
    As per user requirement, quantity for GI item must be same with the quantity
    that has been transferred to subcon vendor in Delivery for Subcon
    (transaction code VL02N).
    We cannot achieve this requirement by using the BAPI mentioned above. Would
    appreciate any valuable help from anyone who is able to help us on this
    matter. Are there any other BAPI's that can help us to achieve the same
    result ?
    Thank you in advance and best regards.

    As far as i understood the problem I suggest u to create the
    BDC according to user actions that are performed in he manual
    operation.
    I can't say that the BAPI performs the exac solution what you want.
    I have done some BDC work using MB01 and suggest you to be careful
    and try to keep the complete in the logic as some chages in rows in BDC will
    change the complete scenario.And throw correct quantity val in correct
    material
    row.
    This methodology will help u even in mass uploads.
    Or in case of automation u can perform the call transaction BDC in
    background mode.
    so As per my understanding bdc program is the solution. pls try and let me
    know.

  • Z Report of Transaction ME28.(Release Purchase Order)

    Dear all,
                   I want to make Z Report for the Transaction ME28 (Release Purchase Order).
    I am facing problem of GUI status in my Z Report. Actually Report is not displaying like ME28.
    and all the menu and function keys are also not coming properly.
    So, pls suggest me good solution.
    Thanks & Regards,
    Sandip Sonar.

    I am attaching a copy of ME28. Please give it to your ABAP consultant.
    He should be able to do the needful:
    REPORT RM06EF00 NO STANDARD PAGE HEADING MESSAGE-ID ME.
           Anzeigen Einkaufsbelege zur Belegnummer                       *
    Tabellen                                                            *
    INCLUDE FM06LTO1.
    INCLUDE FM06LCFR.
    **table added t16fc  - SAPBY     6 Feb 98
    TABLES: T16FG, T16FS, T16FV, T16FE, RM06B, T160B, T16FC.
    DATA: BEGIN OF XEKPO OCCURS 100.
            INCLUDE STRUCTURE EKPO.
    DATA: END OF XEKPO.
    *- Interne Tabelle der Zustände -
    DATA: BEGIN OF ZUS OCCURS 10.
            INCLUDE STRUCTURE T16FV.
    DATA: END OF ZUS.
    DATA: BEGIN OF ZUSKEY,
             MANDT LIKE EKKO-MANDT,
             FRGGR LIKE EKKO-FRGGR,
             FRGSX LIKE EKKO-FRGSX,
          END OF ZUSKEY.
    Parameter und Select-Options                                        *
    PARAMETERS:     P_FRGCO LIKE T16FC-FRGCO OBLIGATORY.
    SELECT-OPTIONS: S_FRGGR FOR EKKO-FRGGR.
    PARAMETERS:     P_FRGSE LIKE RM06A-P_FRGSE DEFAULT 'X',
                    P_FRGRS LIKE RM06A-P_FRGRS,
                    P_FRGVO LIKE RM06A-P_FRGVO DEFAULT 'X',
    set default to 'X' to show items as well - SAPBY
                    P_MITPOS AS CHECKBOX DEFAULT 'X',
    set default to 'DEFAULT'  - SAPBY
                    LISTU LIKE T160O-LISTU DEFAULT 'DEFAULT'.
    SELECT-OPTIONS: S_BSTYP FOR EKKO-BSTYP,
                    S_EKORG FOR EKKO-EKORG,
                    S_EBELN FOR EKKO-EBELN MATCHCODE OBJECT MEKK
                                           MEMORY ID BES,
                    S_BSART FOR EKKO-BSART,
                    S_EKGRP FOR EKKO-EKGRP,
                    S_LIFNR FOR EKKO-LIFNR MATCHCODE OBJECT KRED,
                    S_RESWK FOR EKKO-RESWK,
                    S_BEDAT FOR EKKO-BEDAT.
    Hilfsfelder                                                         *
    INCLUDE FM06LCEK.
    DATA: XFRG1 LIKE EKKO-FRGZU,
          XFRG2 LIKE EKKO-FRGZU.
    DATA: XSELKB LIKE EKKO-BSTYP,
          XSELKK LIKE EKKO-BSTYP,
          XSELKL LIKE EKKO-BSTYP,
          XSELKA LIKE EKKO-BSTYP.
    FIELD-SYMBOLS: .
    DATA: HFDPOS LIKE SY-FDPOS.
    **workflow line added for workflow
    DATA : LAST_USER_COMMAND  LIKE SY-UCOMM.
    Intitialisierung                                                    *
    INITIALIZATION.
      PERFORM ANFORDERUNGSBILD(SAPFM06L) USING XSELKB XSELKK
                                               XSELKL XSELKA.
    lines 67, 70 and 73 commented out -SAPBY
    **listu = t160b-listu.
      S_BSTYP-SIGN = 'I'.
      S_BSTYP-OPTION = 'EQ'.
    **if xselkb ne space.
      S_BSTYP-LOW = 'F'.
      APPEND S_BSTYP.
    **endif.
      IF XSELKK NE SPACE.
        S_BSTYP-LOW = 'K'.
        APPEND S_BSTYP.
      ENDIF.
      IF XSELKL NE SPACE.
        S_BSTYP-LOW = 'L'.
        APPEND S_BSTYP.
      ENDIF.
      IF XSELKA NE SPACE.
        S_BSTYP-LOW = 'A'.
        APPEND S_BSTYP.
      ENDIF.
    next two lines added to default the release code
      IMPORT T16FC-FRGCO FROM MEMORY.
    get parameter id 'ZRC' field t16fc-frgco.
      P_FRGCO = T16FC-FRGCO.
    Seketionsbild                                                       *
    AT SELECTION-SCREEN ON LISTU.
      PERFORM LISTUMFANG(SAPFM06L) USING LISTU.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FRGCO.
      CALL FUNCTION 'HELP_VALUES_FRGAB'
           EXPORTING
                I_FRGOT = '2'
           IMPORTING
                E_FRGAB = P_FRGCO
           EXCEPTIONS
                OTHERS  = 1.
    AT SELECTION-SCREEN.
      CALL FUNCTION 'ME_REL_CHECK_MANY'
           EXPORTING
                I_FRGOT = '2'
                I_FRGCO = P_FRGCO
           TABLES
                T_FRGGR = S_FRGGR
                T_T16FV = ZUS.
    Beginn der Selektion                                                *
    START-OF-SELECTION.
      NOT_FOUND = 'X'.
      SET PF-STATUS 'FREI'.
      SET TITLEBAR '001' WITH P_FRGCO.
      PERFORM FRG_INIT(SAPFM06L) USING P_FRGCO P_MITPOS.
    *- Lesen Belegköpfe -
      SELECT * FROM EKKO APPENDING TABLE XEKKO
                         FOR ALL ENTRIES IN ZUS
                         WHERE FRGRL EQ 'X'
                           AND FRGGR EQ ZUS-FRGGR
                           AND FRGSX EQ ZUS-FRGSX
                           AND EBELN IN S_EBELN
                           AND BSTYP IN S_BSTYP
                           AND EKORG IN S_EKORG
                           AND LIFNR IN S_LIFNR
                           AND RESWK IN S_RESWK
                           AND BEDAT IN S_BEDAT
                           AND BSART IN S_BSART
                           AND EKGRP IN S_EKGRP
                           AND LOEKZ EQ SPACE.
      IF P_FRGRS NE SPACE.
        SELECT * FROM EKKO APPENDING TABLE XEKKO
                           FOR ALL ENTRIES IN ZUS
                           WHERE FRGRL EQ SPACE
                             AND FRGGR EQ ZUS-FRGGR
                             AND FRGSX EQ ZUS-FRGSX
                             AND EBELN IN S_EBELN
                             AND BSTYP IN S_BSTYP
                             AND EKORG IN S_EKORG
                             AND LIFNR IN S_LIFNR
                             AND RESWK IN S_RESWK
                             AND BEDAT IN S_BEDAT
                             AND BSART IN S_BSART
                             AND EKGRP IN S_EKGRP
                             AND LOEKZ EQ SPACE.
      ENDIF.
      SORT XEKKO.
    *- Prüfen Freigabevoraussetzungen -
      LOOP AT XEKKO.
        MOVE-CORRESPONDING XEKKO TO ZUSKEY.
        READ TABLE ZUS WITH KEY ZUSKEY BINARY SEARCH.
        CHECK SY-SUBRC EQ 0.
        XFRG1 = ZUS+9(8).
        XFRG2 = XEKKO-FRGZU.
        TRANSLATE XFRG2 USING 'X  +'.
        OVERLAY XFRG1 WITH XFRG2 ONLY '+'.
        SEARCH XFRG1 FOR 'X'.
    *---- Keine Freigabezuständigkeit -
        IF SY-SUBRC NE 0.
          DELETE XEKKO.
        ELSE.
    *---- Freigabestelle merken -
          HFDPOS = SY-FDPOS.
          ASSIGN XFRG2+SY-FDPOS(1) TO .
    *---- Freigabe bereits erfolgt -
          IF P_FRGRS EQ SPACE AND
              EQ SPACE.
            DELETE XEKKO.
          ELSE.
    *---- Freigabe noch nicht erfolgt -
            IF P_FRGSE EQ SPACE AND
                NE SPACE.
              DELETE XEKKO.
            ELSE.
    *---- Freigabevoraussetzung fehlt -
              IF XFRG1 CA '+' AND
                 P_FRGVO NE SPACE.
                DELETE XEKKO.
              ELSE.
                EKKO = XEKKO.
                PERFORM FRG_FEKKO_AUFBAUEN(SAPFM06L) USING HFDPOS.
              ENDIF.
            ENDIF.
          ENDIF.
        ENDIF.
      ENDLOOP.
      SORT XEKKO.
    *- Lesen Belegpositionen -
      IF P_MITPOS NE SPACE.
        SELECT * FROM EKPO APPENDING TABLE XEKPO
                           FOR ALL ENTRIES IN XEKKO
                           WHERE EBELN EQ XEKKO-EBELN.
      ENDIF.
    *- Ausgabe -
      LOOP AT XEKKO.
        EKKO = XEKKO.
        PERFORM EKKO_ANSCHRIFT(SAPFM06L).
        PERFORM EKKO_AUSGABE(SAPFM06L).
        IF P_MITPOS NE SPACE.
          LOOP AT XEKPO WHERE EBELN EQ EKKO-EBELN.
            EKPO = XEKPO.
            PERFORM FC_ME_READ_HISTORY(SAPFM06L).
            PERFORM EKPO_AUSGABE(SAPFM06L).
          ENDLOOP.
        ENDIF.
      ENDLOOP.
    Ende der Selektion                                                  *
    END-OF-SELECTION.
      IF NOT_FOUND NE SPACE.
        MESSAGE S260.
        IF SY-CALLD NE SPACE.
          LEAVE.
        ELSE.
          LEAVE TO TRANSACTION SY-TCODE.
        ENDIF.
      ENDIF.
      WRITE: /(81) SY-ULINE.
    OK-Code-Eingabe                                                     *
    AT USER-COMMAND.
    **workflow inserted 6 Feb 98 by SAPBY
        PERFORM WORKFLOW_AT_USER_COMMAND.
    INS GSB 18/02/2004 - check user approving is not user that create
    PO
    if sy-ucomm = 'FRGU' or sy-ucomm = 'FRGS'.
    loop at xekko.
      if xekko-ERNAM = sy-uname.
         CALL FUNCTION 'POPUP_TO_DISPLAY_TEXT'
           EXPORTING
             TITEL              = 'Error'
    TEXTLINE1 = 'As the creator of this pruchase order you cannot approve it
    as well !'
        leave program.
      endif.
    endloop.
    endif.
      PERFORM USER_COMMAND(SAPFM06L).
    Seitenueberschrift                                                  *
    TOP-OF-PAGE.
      PERFORM TOP(SAPFM06L).
    TOP-OF-PAGE DURING LINE-SELECTION.
      PERFORM TOP(SAPFM06L).
    **& form workflow_at_user_command
    TEXT
    ---> p1  text
    <--  p2  text
    FORM WORKFLOW_AT_USER_COMMAND.
      IF LAST_USER_COMMAND IS INITIAL.
        LAST_USER_COMMAND = SY-UCOMM.
      ENDIF.
      IF SY-UCOMM EQ 'ZURU'.
         PERFORM TRIGGER_WORKFLOW.
      ENDIF.
      CASE SY-UCOMM.
        WHEN 'BU'.
          IF P_MITPOS EQ 'X'.
            CHECK LAST_USER_COMMAND <> 'FRGR'.
            PERFORM TRIGGER_WORKFLOW.
          ELSE.
            CHECK LAST_USER_COMMAND = 'FRGS'.
            PERFORM TRIGGER_WORKFLOW.
          ENDIF.
        WHEN 'FRGU'.
          PERFORM TRIGGER_WORKFLOW.
      ENDCASE.
      LAST_USER_COMMAND = SY-UCOMM.
    ENDFORM.
    **& form TRIGGER_WORKFLOW.
    TEXT
    ---> p1  text
    <--  p2  text
    FORM TRIGGER_WORKFLOW.
    DATA : BEGIN OF ZEKKO OCCURS 20.
              INCLUDE STRUCTURE ZEKKO.
    DATA : END OF ZEKKO.
    DATA : BEGIN OF YEKKO OCCURS 20.
              INCLUDE STRUCTURE ZEKKO.
    DATA : END OF YEKKO.
    DATA : WFBAN LIKE EKKO-EBELN,
           WFERN LIKE EKKO-ERNAM.
    CLEAR : WFBAN, WFERN.
    MOVE-CORRESPONDING XEKKO TO YEKKO.
    CONCATENATE YEKKO-FRGZU 'X' INTO YEKKO-FRGZU.
    APPEND YEKKO.
    MOVE-CORRESPONDING XEKKO TO ZEKKO.
    *XEKKO-KZ = 'F'.
    APPEND ZEKKO.
    SELECT SINGLE KOKRS KOSTL
         INTO (EKKN-KOKRS, EKKN-KOSTL)
         FROM EKKN
         WHERE EBELN = XEKKO-EBELN
         AND EBELP   = '00010'.
    if sy-subrc <> 0.                  " Cost centres not mandatory at XXX
      exit.
    endif.
    CALL FUNCTION 'Z_ME_REL_EVENT_EKKO'
         EXPORTING
              I_CALL_UPDKZ = 'F'
              I_WFBAN      = EKKO-EBELN
              I_FRGCO      = T16FC-FRGCO
              I_ERNAM      = SY-UNAME
              I_UCOMM      = SY-UCOMM
         TABLES
              I_EKKO_NEW   =  YEKKO
              I_EKKO_OLD   =  ZEKKO.
    ENDFORM.

Maybe you are looking for

  • Display name not getting generated When creating user thorugh GTC

    We are using GTC flat file as a trusted source. We see that display name not getting generated. And same thing happening when creating a new GTC mapping. previously when we ran with few test user got created with display name through GTC flat file ,

  • Time Machine wont backup

    I bought an external hard drive and put files from my old computer on it before I bought my iMac. Now I want to use it for backing up my iMac but Time Machine wont backup to it without erasing the contents. Is there a way around this? Or will I have

  • ADF Menu or ADF tree

    Hi experts , JDEV 11.1.2 which is better ? 1. implement menu using ADF menu component. 2. implement menu using ADF tree component. i just wish to knw which is better method? PMS

  • Drivers won't load in windows 8.1

    9:15:26 PM  i have a hp photosmart 5510 all in one printer, the print spooler in the service command, won't start it, error code, 0x800706b9, not enough resources etc;. even in the command processor, page, the one you put sc config spooler depend= RP

  • Laptop randomly switching over to f4 key, monitor switching, auto selects one and locks me out.

    for the past month or so now, my pavilion dv6 special edition notebook has been acting up. itll randomly pop the switch monitor deal onto the screen, automatically pick a monitor option, and then lock me out. This is annoying as it happens multiple t