Attachment missing in back end for purchase order

Hi all,
We are using SRM 5.0 SP10 extended classic scenario.
I have created a shopping cart with attachment. A local purchase order has been successfully created and i can find the attachment in it.
When i check in the backend the purchase order doesnt contain the attachment.
I have made the required changes in BBP_CREATE_PO_BACK. I have made necessary changes in DC10,DC20 and DC30. 
I have checked the related threads in SDN but couldnt find any help.
Please let me know if this works only for classic scenario or the attachments can even be sent to backend in extended classic scenari as well. If yes please let me know what else needs to be done to be able to view the attachment in the backend.
Thanks,
Zubair.

Hi Sanjeev,
Thanks for your reply. I have looked into both the BAdis. I couldnt understand how bbp_driver_determine BAdi could be useful to this scenario.
However i looked at bbp_ecs_po_out BAdi. It has IT_ATTACH as importing parameter but i couldnt make out how this BAdi could be used to transfer attachment to backend. It doesnt have a relevant exporting or changing parameter.
Please advice.
Thanks,
Zubair.

Similar Messages

  • Missing Parts report for Purchase Orders

    Hey Gurus,
    We are running the availability check for Purchase orders and the user group is wondering if there is a standard Missing Parts report in SAP similiar to transaction CO24 for Purchase Orders so that they can view all of the Purchase orders with missing parts.
    As a side note,  we are using subcontracting purchase orders.

    didn't get a response.

  • Customizing for Back to Back Sales and Purchase Order

    Dear Gurus,
    Can anybody give me detailed customizing steps so that I can create a back to back sales and purchase order ? How does this process work ?
    Would really appreciate if you dont just paste the SAP help URL over here.
    Thanks

    Dear,
    Please check: http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/business_maps/guid/eg1slxvyat1odhrwoi8vc29sdxrpb25jb21wb3nlci5zyxauy29tl3nvy292awv3l21jcgdl%0d%0adc5hc3a/cgfja2fnzwlkpsz2awv3pxnty3jlbmrlcjimawq9muu2rtqwmjk5mue2nduwmzk0m0fg%0d%0aqtnfnjg1rjbgmkymjnhzbc1iyxnlpwh0dha6ly9zb2x1dglvbmnvbxbvc2vylnnhcc5jb20vc29j%0d%0ab3zpzxcvbwnwz2v0x21pbwuuyxnwp3vybd1zzg5fbmv3lyymd2vilxvybd1odhrwczovl3nvbhv0%0d%0aaw9uy29tcg9zzxiuc2fwlmnvbs9zb2nvdmlldy9ty3bnzxrfbwltzs5hc3a/dxjspsymehnslwxp%0d%0ac3q9c2rux2dlbmvyywxfcmvuzgvylnhzbhq7c2rux2xpbmtyzxdyaxrpbmcuehnsddtnzw5lcmf0%0d%0azuhutuxfu0rolnhzbhqmjnbhy2thz2utawq9jizyzxnvdxjjzxr5cgu9c2rux3nvbhv0aw9ux2nv%0d%0abxbvc2vyx2z1bgxwywdljizwyxjlbnrssuq9l3dlymnvbnrlbnqvd2vicgfnzxmvynb4lzqwielu%0d%0azhvzdhjpzxmvuhvibgljifnly3rvci9cdxnpbmvzcybqcm9jzxnzifbsyxrmb3jtigluifb1ymxp%0d%0ayybtzwn0b3imjnrpdgxlpckgr2xvymfsifryywrlie1hbmfnzw1lbnq6iejhy2stdg8tqmfjaybu%0d%0acmfkaw5nifbyb2nlc3mmjnzpcnr1yww9dhj1zq==;jsessionid=(J2EE3417300)ID0462866350DB00827079450451046937End?prtmode=default
    http://help.sap.com/bp_cp1600/CP_Global/Solution_Map/1E6E402991A64503943AFA3E685F0F2F.htm
    http://help.sap.com/saphelp_gts71/helpdata/en/0b/333a426ea5b26be10000000a155106/frameset.htm
    Regards,
    Syed Hussain.

  • Error:-document is in transfer for purchase order..creation is not possible

    Hello,
    While doing confirmation of PO I am getting this error, saying "document is in transfer for purchase order..creation is not possible".
    can anyone please suggest me solution on this type of error?

    Hi,
    Is the PO in ORDERED status? Is there any confirmation posted for this PO which might be stuck (idoc failed to reach back end)?
    If it is a case of idoc failure, then reprocess the idoc and then do the next confirmation.
    regards,
    MRao

  • 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

  • PS - Set Commitment only for Purchase order

    Hi experts,
    I would like to know if its possible set in the Customizing, the  Commitment just for Purchase Order.
    Because, currently we have fixed Purchase Requisition and Purchase Order.
    Thanks in advance.
    Nacho

    Hi,
    SAP Note:955107 addresses this problem. You may refer the note, but for easy reference, relevant portios of the note are quoted below:
    Quote begins:
    Symptom
    The purchase requisition commitment should not be taken into account in the availability control.
    How can this be achieved?
    Reason and Prerequisites
    This is a customer request.
    It should be possible to enter purchase requisitions with any amount and only the resulting purchase orders should be checked by an availability control.
    Solution
    For Releases 4.6C, 4.70, 5.00 and 6.00 first implement the corrections from Note 955106 if you have not already done this.
    Afterwards proceed as follows.
    1. Create a utility program ZBPFCI21 of the 'Subroutine Pool' type. For the source code of the program refer to the attached correction instruction 488705.
                  Caution: Do not use a different name than ZBPFCI21.
    2. Adjust the source code within the utility program ZBPFCI21 as follows:
                  When the residual order plan should not be included in the assigned value of the availability control, activate the line
                           CLEAR cd_flag_pr_commitment_avac.
                  (That is, delete the sign '*' in front of the line.)
    3. Save and activate the ZBPFCI21 utility program.
    4. Reconstruct the assigned values of the availability control (Transactions KO31 for orders or CJBN for projects).
    Quote ends.
    Kindly acknowledge, if it meets your requirement.
    Muraleedharan.R

  • Release Procudure for Purchase Order

    Hi Experts,
    I am new Release Procudure.My client wants release procedure for two users.
    End user wants create Purchase Order then other user wants release that purchase order and then another user wants final release. Please tell how can map this process in sap.
    Thanks in advance,
    Chandhu
    Edited by: chnadu9 on Jan 5, 2011 5:48 AM

    Hi,
    The release code is a two character ID allowing a person to release (clear, or approve) a requisition or an external purchasing document. The release codes is basically controlled via a system of authorizations (authorization object M_EINK_FRG).
    Use SE12, structure CEKKO to check all the fields available for controlling the Purchase Order.
    An example of configuring a Purchase Order Release Strategy
    If the total value for the Purchase Order exceeds 10,000, release strategy 01 is assigned to the Purchase Order. There is only one characteristic created in this example. For controlling the Purchase Order type, create characteristic for CEKKO-BSTYP and the value NB.
    Steps for configuring the PO release strategy
    Create the PO Characteristic
    Transaction code : CT04 - Create Characteristic e.g. NETVALUE
    Click Additional data tabstrips
    Table name CEKKO Field name GNETW and press enter and you will see this information message :-
    Format data taken from Data Dictionary (press enter)
    (for currency dependent field, you are prompt to enter the currency which the system then converts the currency of the Purchasing document into this currency)
    In the Basic data tabsritps (X refers to tick),
    X Mutliple values
    X Interval values
    In the Value data, in the Char. value column, type >=10000 (equal or greater than 10000) and press enter
    Save your data
    Create the Class of the PO Release Strategy
    Transaction code : CL02 - Class
    Class - Create REL_PUR
    Class type - 032
    Click Create button
    Description - Release Procedure for Purchase Order
    In the Same Classification section, click Check with error
    In the Char. (characteristic) tabstrips, type NETVALUE to assign your characteristics to the class
    Save your data and this message will appear :-
    Class type 032: Class REL_PUR created
    Define the Release Procedure
    OMGS - Define Release Procedure for Purchase Order Type
    Release Group - New entries
    Rel.group Rel. Object Class Description
    02 REL_PUR Rel. Strategy for PO
    Save your entries.
    Release codes - New entries
    Grp Code
    02 01
    Save your entries.
    Release indicators - New entries
    Release indicators Release Description
    0 Blocked
    1 X Release
    Save your entries
    Release Strategy - New entries
    Release group 02
    Rel.strategy 01 - Release
    Release codes 01
    Release status 0 - Blocked
    1 - Release
    Click the Release prerequisities button
    Click the Relase statuses button the click the Continue button
    Click the Classification button
    Choose your check values
    Click the Back button
    Save your entries
    Check your PO release configuration
    Finally, check your PO Release Strategy configuration to make sure that there are no errors.
    OMGSCK - Check Release Strategies
    (make sure there are no error messages)
    Once the Purchase Order is not release, buyers will not be able to print the Purchase Order.
    Goods Receipts will be shown with Message no. ME 390 - Purchasing document XXXXXXX not yet released.
    In 4.6c, Purchase Order with Release Strategy have a tabs at the end of the Header. This allowed the buyers to check the release status of the Purchase Order.
    The person with the release authorization have to use ME28 to release the Purchase Order.
    Regards,
    Mohar

  • Open items for purchase order its very urgent

    hi
    my requirement is to write extract program for purchase order(me21) to extract only open items.
    please provide sample code its very urgent.
    thanks in advance.
    points will be rewarded.
    thanks
    hari prasad reddy

    check the below report :
    REPORT ZMM_OPEN_PO_REPORT no standard page heading
                              line-size 255
                              message-id zwave.
    ======================================================================
    Program Name : ZMM_OPEN_PO_REPORT                                    *
    Description  : This report displays all Open PO Items and output     *
                   would be PO Number,Material number and so on          *
    Author       : Seshu                                                 *
    Date         : 01/24/2007                                            *
    MODIFICATION HISTORY                                                 *
    DATE    | AUTHOR   | CHANGE #   | DESCRIPTION OF MODIFICATION        *
    --|||--
    01/24/07| Seshu    | DEVK921979 | Initial                            *
    D A T A  D E C L A R A T I O N   P A R T                         ***
    type-pools
    type-pools : slis.
    Tables
    tables : ekko, " Purchase order Header
             ekpo, " Purchase order Item
             marc. " Material with Plant data
    Internal table for output.
    data : begin of i_output occurs 0,
           ebeln like ekko-ebeln,
           matnr like ekpo-matnr,
           end of i_output.
    ALV Data declaration.
    data : v_repid like sy-repid.
      ALV Function Module Variables
    DATA: gs_layout type slis_layout_alv,
          g_exit_caused_by_caller,
          gs_exit_caused_by_user type slis_exit_by_user.
    DATA: gt_fieldcat    type slis_t_fieldcat_alv,
          gs_print       type slis_print_alv,
          gt_events      type slis_t_event,
          gt_list_top_of_page type slis_t_listheader,
          g_status_set   type slis_formname value 'PF_STATUS_SET',
          g_user_command type slis_formname value 'USER_COMMAND',
          g_top_of_page  type slis_formname value 'TOP_OF_PAGE',
          g_top_of_list  type slis_formname value 'TOP_OF_LIST',
          g_end_of_list  type slis_formname value 'END_OF_LIST',
          g_variant LIKE disvariant,
          g_save(1) TYPE c,
          g_tabname_header TYPE slis_tabname,
          g_tabname_item   TYPE slis_tabname,
          g_exit(1) TYPE c,
          gx_variant LIKE disvariant.
    data : gr_layout_bck type slis_layout_alv.
    Ranges
    ranges r_eindt for eket-eindt.
    initialization.
    v_repid = sy-repid.
    start-of-selection.
    Get the data from EKKO ,EKPO and MARC Table
    perform get_data_tables.
    end-of-selection.
    display the data in the form of ALV
    perform display_data.
    *&      Form  get_data_tables
          Get the data from EKKO,EKPO and MARC Table
    FORM get_data_tables.
    clear : i_output.
    refresh : i_output.
    fill the dates in ranges
    r_eindt-low = sy-datum - 7.
    r_eindt-high = sy-datum + 14.
    r_eindt-option = 'BT'.
    r_eindt-sign = 'I'.
    append r_eindt.
    Get the data from EKKO,EKPO and EKET Tables
    select aebeln bmatnr into table i_output
                           from ekko as a inner join
                                ekpo as b on aebeln = bebeln
                                inner join marc as c on cmatnr = bmatnr
                                inner join mara as d on dmatnr = bmatnr
                                inner join eket as e on eebeln = aebeln
                                               and   eebelp = bebelp
                                where c~beskz = 'E'
                                and   c~werks = '1000'
                                and   d~mtart = 'FERT'
                                and   b~loekz = space
                                and   b~elikz = space
                                and   e~eindt in r_eindt.
    if sy-subrc ne 0.
    message e000(zwave) with 'No open purchase order found'.
    endif.
    ENDFORM.                    " get_data_tables
    *&      Form  display_data
          text
    FORM display_data.
    Fill the Fiedlcat
      PERFORM fieldcat_init  using gt_fieldcat[].
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
       I_INTERFACE_CHECK                 = ' '
       I_BYPASSING_BUFFER                =
       I_BUFFER_ACTIVE                   = ' '
         I_CALLBACK_PROGRAM                = v_repid
       I_CALLBACK_PF_STATUS_SET          = ' '
        I_CALLBACK_USER_COMMAND           = g_user_command
       I_CALLBACK_TOP_OF_PAGE            = ' '
       I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
       I_CALLBACK_HTML_END_OF_LIST       = ' '
       I_STRUCTURE_NAME                  =
       I_BACKGROUND_ID                   = ' '
       I_GRID_TITLE                      =
       I_GRID_SETTINGS                   =
       IS_LAYOUT                         = gr_layout_bck
          IT_FIELDCAT                       = gt_fieldcat[]
       IT_EXCLUDING                      =
       IT_SPECIAL_GROUPS                 =
       IT_SORT                           =
       IT_FILTER                         =
       IS_SEL_HIDE                       =
       I_DEFAULT                         = 'X'
        I_SAVE                            = g_save
        IS_VARIANT                        =
       IT_EVENTS                         =
       IT_EVENT_EXIT                     =
       IS_PRINT                          =
       IS_REPREP_ID                      =
       I_SCREEN_START_COLUMN             = 0
       I_SCREEN_START_LINE               = 0
       I_SCREEN_END_COLUMN               = 0
       I_SCREEN_END_LINE                 = 0
       IT_ALV_GRAPHICS                   =
       IT_ADD_FIELDCAT                   =
       IT_HYPERLINK                      =
       I_HTML_HEIGHT_TOP                 =
       I_HTML_HEIGHT_END                 =
       IT_EXCEPT_QINFO                   =
    IMPORTING
       E_EXIT_CAUSED_BY_CALLER           =
       ES_EXIT_CAUSED_BY_USER            =
        TABLES
          T_OUTTAB                          = i_output
       EXCEPTIONS
         PROGRAM_ERROR                     = 1
         OTHERS                            = 2
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    " display_data
    *&      Form  fieldcat_init
          text
         -->P_GT_FIELDCAT[]  text
    FORM fieldcat_init USING  e01_lt_fieldcat type slis_t_fieldcat_alv.
      DATA: LS_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    Purchase order number
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'EBELN'.
      LS_FIELDCAT-ref_fieldname = 'EBELN'.
      LS_FIELDCAT-ref_tabname = 'EKKO'.
      LS_FIELDCAT-TABNAME    = 'I_OUTPUT'.
      ls_fieldcat-seltext_L = 'Purchase Order'.
      ls_fieldcat-seltext_M = 'Purchase Order'.
      ls_fieldcat-seltext_S = 'Purchase Order'.
      APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
    Material #
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'MATNR'.
      LS_FIELDCAT-ref_fieldname = 'MATNR'.
      LS_FIELDCAT-ref_tabname = 'EKPO'.
      LS_FIELDCAT-TABNAME    = 'I_OUTPUT'.
      ls_fieldcat-seltext_L = 'Material'.
      ls_fieldcat-seltext_M = 'Material'.
      ls_fieldcat-seltext_S = 'Material'.
      APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
    ENDFORM.                    " fieldcat_init

  • Use of SAVE_TEXT in customer exits / BADI for purchase order

    Hi All,
    I am trying to save some long text by using SAVE_TEXT function module in a badi implementation for purchase order header text. The same is working fine if i try to update the PO header text via a report. But if i try using badi (the code is written in a PAI event for the BADI), then though the text transfer and save is successful during the code excution, but for the first time when i add any text its not visible in ME22N tcode. Since its an online event. But when i double click on that editor and the sap script editor gets opened. then i press back button, the text is appearing on the same small screen edtor . after this any number of time i edit or delete text, the save_text function module works fine.
    My issue is why for the first time always i have to double click on the editor to open the sap script editor. I have also included commit_text in this case after save_text FM.
    the requirement here goes like this. in one tab for PO header the user will enter some number (This is a customizing screen implemented through badi.) and the corresponsing discription should appear when user clicks on text tab in po header screen (me21n / me22n).
    Kindly help.
    Thanks
    Mamata

    Hi  mamata rath
    I have solve the problem which similar to yours.  the code which is as the following
    DATA: textline TYPE tdline,
            name TYPE c LENGTH 70,
            glines TYPE TABLE OF tline,
            gline  LIKE LINE OF glines,
            ls_header TYPE thead.
         CONCATENATE ch_eban-banfn ch_eban-bnfpo INTO name.
             ls_header-tdobject = 'EBAN'.
             ls_header-tdname = name.
             ls_header-tdid = 'B01'.
             ls_header-tdspras = sy-langu.
             CALL FUNCTION 'SAVE_TEXT'
               EXPORTING
    *           CLIENT                = SY-MANDT
                 header                = ls_header
    *           INSERT                = ' '
    *           SAVEMODE_DIRECT       = ' '
    *           OWNER_SPECIFIED       = ' '
    *           LOCAL_CAT             = ' '
    *         IMPORTING
    *           FUNCTION              =
    *           NEWHEADER             =
               tables
                 lines                 = glines
               EXCEPTIONS
                 ID                    = 1
                 LANGUAGE              = 2
                 NAME                  = 3
                 OBJECT                = 4
                 OTHERS                = 5
              IF sy-subrc = 0.
                  CALL FUNCTION 'COMMIT_TEXT'
                    EXPORTING
                      OBJECT                = 'EBAN'
                      NAME                  = name
    *                ID                    = '*'
    *                LANGUAGE              = '*'
    *                SAVEMODE_DIRECT       = ' '
    *                KEEP                  = ' '
    *                LOCAL_CAT             = ' '
    *              IMPORTING
    *                COMMIT_COUNT          =
    *              TABLES
    *                T_OBJECT              =
    *                T_NAME                =
    *                T_ID                  =
    *                T_LANGUAGE            =
              ENDIF.

  • Problem in creating a SyncBo for Purchase Order BAPIs

    Hello Everybody,
    I am trying to create a smart sync application for Purchase Orders.
    I have used standard bapis like BAPI_PO_GETDETAIL AND BAPI_PO_CREATE1.
    I have developed my own wrapper functions using these std bapis. For the PO creation i only plan to insert the necessary and mandatory data. The problem i face is that some of the tables in the create bapi which are mandatory for a PO creation are freezed in the SyncBo.
    Tables like POITEMX, POADDRDELIVERY, POSCHEDULE and structure POHEADERX are all required for the creation of a PO. Without this minimum data a PO cannot be created.
    After i have created the syncBo, on the mapping screen i can only see these tables under the create BAPI. But i am not able to perform the mapping of their fields. These are non-editable or i must say that they are freezed.
    And if i cannot map them then i cannot pass data for them from the client. Although i can do the mapping for the table PO_ITEM and the structure PO_HEADER.
    I hope i am able to expplain my problem. Kindly get back to me if i am not clear. Any sort of help is welcome.
    Thanking in advance,
    Saurabh.

    Hi Saurabh,
    Hope you are aware of the prerequisites for creating the BAPI Wrappers.
    If you want to insert some data into the Business Object, then you have to include
    GETLIST, GETDETAIL and CREATE Bapi Wrappers.
    I think in your case,
    You might not have mapped those fields in your GETLIST Bapi Wrapper.Just check whether you have mapped those fields that are necessary for PO creation in your GETLIST and GETDETAIL BApi wrapper mapping screen.
    Those fields you have mapped in the GETLIST and GETDETAIL BAPI wrappers will be visible (for selection - checkboxes will be editable) in the mapping screen for CREATE BAPI Wrapper.
    So first of all, you have to map fields there in the mapping screens for GETLIST and GETDETAIL Bapi Wrappers...
    check this thing...
    refer these links..
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/com.sap.km.cm.docs/library/mobile/mobile%20infrastructure/mobile%20development%20kit%202.5/content/appdev/smartsync/introduction.html
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/com.sap.km.cm.docs/library/mobile/mobile%20infrastructure/mobile%20development%20kit%202.5/content/appdev/smartsync/bapi_wrapper_types.html
    In the second link, you can see one figure, which is explaining the things that are to be satisfied by the BAPI Wrappers for SyncBO creation...
    Let me know If you have doubts in the prerequisite section itself...
    Regards,
    Kishor Gopinathan

  • Call BAPI_GOODSMVT_CREATE to create a goods receipt for purchase order

    Hi,
    I'm calling the bapi BAPI_GOODSMVT_CREATE to create a goods receipt for purchase order, but the following code doesn't work. It doesn't give me any kind of error message but it does nothing as well...
    Can anyone help me please?
    Thank You
    Hugo
    Code
    DATA: wa_goodsmvt_header  LIKE bapi2017_gm_head_01,
                            wa_goodsmvt_code    LIKE bapi2017_gm_code,
                            wa_bapi2017_gm_head TYPE bapi2017_gm_head_ret-mat_doc.
                      DATA: it_goodsmvt_item LIKE bapi2017_gm_item_create OCCURS  0 WITH HEADER LINE,
                            it_return        LIKE bapiret2 OCCURS  0 WITH HEADER LINE.
                      wa_goodsmvt_header-pstng_date = SY-DATUM.
                      wa_goodsmvt_header-doc_date   = SY-DATUM.
                      wa_goodsmvt_header-ref_doc_no = '4500000020'.
                      wa_goodsmvt_code-gm_code = '01'.          "Goods receipt for purchase Order
                      it_goodsmvt_item-stge_loc  = 'BPF2'.
                      it_goodsmvt_item-move_type = '101' .
                      it_goodsmvt_item-entry_qnt = 17.
                      it_goodsmvt_item-entry_uom = 'KG'.
                      it_goodsmvt_item-mvt_ind   = 'B'.
                      it_goodsmvt_item-po_number = '4500000020'.
                      it_goodsmvt_item-po_item   = '00010'.
                      it_goodsmvt_item-material  = '50'.
                      APPEND it_goodsmvt_item.
                      CALL FUNCTION  'BAPI_GOODSMVT_CREATE'
                        EXPORTING
                          goodsmvt_header  = wa_goodsmvt_header
                          goodsmvt_code    = wa_goodsmvt_code
                        IMPORTING
                          materialdocument = wa_bapi2017_gm_head
                        TABLES
                          goodsmvt_item    = it_goodsmvt_item
                          return            = it_return.
                        data: begin of errmsg occurs 10.
                                include structure bapiret2.
                        data: end of errmsg.
                        data: wmenge like iseg-menge,
                              errflag.
                        clear errflag.
                        loop at errmsg.
                          if errmsg-type eq 'E'.
                            write:/'Error in function', errmsg-message.
                            errflag = 'X'.
                          else.
                            write:/ errmsg-message.
                          endif.
                        endloop.
                        if errflag is initial.
                          commit work and wait.
                          if sy-subrc ne 0.
                            write:/ 'Error in updating'.
                            exit.
                          else.
                            write:/ 'Ok'.
                          endif.
                        endif.
                        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
                        EXPORTING
                        wait = ' '.

    Hi,
    Thank you for the asnwer! I'm a rookie at ABAP so please forgive my stupid questions
    I've changed the code to:
    DATA: wa_goodsmvt_header  LIKE bapi2017_gm_head_01,
                            wa_goodsmvt_code    LIKE bapi2017_gm_code,
                            wa_bapi2017_gm_head TYPE bapi2017_gm_head_ret-mat_doc.
                      DATA: it_goodsmvt_item LIKE bapi2017_gm_item_create OCCURS  0 WITH HEADER LINE,
                            it_return        LIKE bapiret2 OCCURS  0 WITH HEADER LINE.
                      wa_goodsmvt_header-pstng_date = SY-DATUM.
                      wa_goodsmvt_header-doc_date   = SY-DATUM.
                      wa_goodsmvt_header-ref_doc_no = '4500000020'.
                      wa_goodsmvt_code-gm_code = '01'.          "Goods receipt for purchase Order
                      it_goodsmvt_item-plant     = 'BP01'.
                      it_goodsmvt_item-stge_loc  = 'BPF2'.
                      it_goodsmvt_item-move_type = '101' .
                      it_goodsmvt_item-entry_qnt = 10.
                      it_goodsmvt_item-entry_uom = 'KG'.
                      it_goodsmvt_item-mvt_ind   = 'B'.
                      it_goodsmvt_item-po_number = '4500000020'.
                      it_goodsmvt_item-po_item   = '10'.
                      it_goodsmvt_item-material  = '50'.
                      APPEND it_goodsmvt_item.
                      CALL FUNCTION  'BAPI_GOODSMVT_CREATE'
                        EXPORTING
                          goodsmvt_header  = wa_goodsmvt_header
                          goodsmvt_code    = wa_goodsmvt_code
                        IMPORTING
                          materialdocument = wa_bapi2017_gm_head
                        TABLES
                          goodsmvt_item    = it_goodsmvt_item
                          return            = it_return.
                          write:/ it_return-message.
    And the return message is : Material document data and PO data do not match (Material)
    Any idea of what might be the problem?
    Thanks

  • Goods Receipts for Purchase Order using BAPI_GOODSMVT_CREAT

    Hi experts,
    I am working on the a program where am generating Goods Receipts for Purchase Order. the BAPI_GOODSMVT_CREAT returns an error saying "Material 6003022 not maintained in plant 1001"
    Can any one assist? is there a field I may be missing?
    Here is a sample code.
    DATA: gm_header TYPE bapi2017_gm_head_01.
    DATA: gm_code TYPE bapi2017_gm_code.
    DATA: gm_headret TYPE bapi2017_gm_head_ret.
    DATA: gm_item TYPE TABLE OF bapi2017_gm_item_create WITH HEADER LINE.
    DATA: gm_return TYPE bapiret2 OCCURS 0 WITH HEADER LINE.
    DATA: gm_retmtd TYPE bapi2017_gm_head_ret-mat_doc.
    CLEAR: gm_return, gm_retmtd.
    REFRESH gm_return.
    Setup BAPI header
    "data
    gm_header-pstng_date = sy-datum.
    gm_header-doc_date = sy-datum.
    gm_code-gm_code = '02'.
    " MB1A * Write 971 movement to table CLEAR GM_ITEM.
    MOVE '101' TO gm_item-move_type .
    " MOVE 'Q' TO GM_ITEM-SPEC_STOCK.
    MOVE '6003022' TO gm_item-material.
    MOVE '10' TO gm_item-entry_qnt.
    MOVE 'EA' TO gm_item-entry_uom.
    MOVE '1001' TO gm_item-plant.
    MOVE '' TO gm_item-stge_loc.
    MOVE '0901' TO gm_item-move_reas.
    "  MOVE '4500006877' TO GM_ITEM-WBS_ELEM.
    "  MOVE '0020' TO GM_ITEM-VAL_WBS_ELEM.
    MOVE '0020' TO gm_item-deliv_numb.
    MOVE '4500006881' TO gm_item-po_number.
    MOVE '0010' TO gm_item-po_item.
    APPEND gm_item.
    Call goods movement BAPI
    CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
      EXPORTING
        goodsmvt_header  = gm_header
        goodsmvt_code    = gm_code
      IMPORTING
        goodsmvt_headret = gm_headret
        materialdocument = gm_retmtd
      TABLES
        goodsmvt_item    = gm_item
        return           = gm_return.
    IF NOT gm_retmtd IS INITIAL.
      COMMIT WORK AND WAIT.
      CALL FUNCTION 'DEQUEUE_ALL'.
    ELSE.
      COMMIT WORK AND WAIT.
      CALL FUNCTION 'DEQUEUE_ALL'.
    ENDIF.

    >
    Spark842 wrote:
    > Hi experts,
    > I am working on the a program where am generating Goods Receipts for Purchase Order. the BAPI_GOODSMVT_CREAT returns an error saying "Material 6003022 not maintained in plant 1001"
    >  Can any one assist? is there a field I may be missing?
    >
    > Here is a sample code.
    >
    > DATA: gm_header TYPE bapi2017_gm_head_01.
    > DATA: gm_code TYPE bapi2017_gm_code.
    > DATA: gm_headret TYPE bapi2017_gm_head_ret.
    > DATA: gm_item TYPE TABLE OF bapi2017_gm_item_create WITH HEADER LINE.
    > DATA: gm_return TYPE bapiret2 OCCURS 0 WITH HEADER LINE.
    > DATA: gm_retmtd TYPE bapi2017_gm_head_ret-mat_doc.
    > CLEAR: gm_return, gm_retmtd.
    > REFRESH gm_return.
    > * Setup BAPI header
    > "data
    > gm_header-pstng_date = sy-datum.
    > gm_header-doc_date = sy-datum.
    > gm_code-gm_code = '02'.
    >
    >
    > " MB1A * Write 971 movement to table CLEAR GM_ITEM.
    > MOVE '101' TO gm_item-move_type .
    > " MOVE 'Q' TO GM_ITEM-SPEC_STOCK.
    > MOVE '6003022' TO gm_item-material.
    > MOVE '10' TO gm_item-entry_qnt.
    > MOVE 'EA' TO gm_item-entry_uom.
    > MOVE '1001' TO gm_item-plant.
    > MOVE '' TO gm_item-stge_loc.
    > MOVE '0901' TO gm_item-move_reas.
    > "  MOVE '4500006877' TO GM_ITEM-WBS_ELEM.
    > "  MOVE '0020' TO GM_ITEM-VAL_WBS_ELEM.
    > MOVE '0020' TO gm_item-deliv_numb.
    > MOVE '4500006881' TO gm_item-po_number.
    > MOVE '0010' TO gm_item-po_item.
    > APPEND gm_item.
    >
    > * Call goods movement BAPI
    >
    > CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
    >   EXPORTING
    >     goodsmvt_header  = gm_header
    >     goodsmvt_code    = gm_code
    >   IMPORTING
    >     goodsmvt_headret = gm_headret
    >     materialdocument = gm_retmtd
    >   TABLES
    >     goodsmvt_item    = gm_item
    >     return           = gm_return.
    >
    > IF NOT gm_retmtd IS INITIAL.
    >
    >   COMMIT WORK AND WAIT.
    >   CALL FUNCTION 'DEQUEUE_ALL'.
    > ELSE.
    >   COMMIT WORK AND WAIT.
    >
    >   CALL FUNCTION 'DEQUEUE_ALL'.
    > ENDIF.
    My guess, is that this material is not really maintained in the Plant '1001', to be on the safer side, get the exact values from EKPO itself, also check if this material exists in the table MARC for the plant and storage location.
    MOVE '1001' TO gm_item-plant.   "<< Hard coded
    MOVE '' TO gm_item-stge_loc.
    Replace the above hardcodes to something like this to get the actual value from EKPO.
    select werks lgort into (gm_item-plant, gm_item-stge_loc) from ekpo
       where ebeln = gm_item-po_number
            and ebelp = gm_item-po_item.

  • Getting errors when iam using  BAPI_PO_CREATE1 for Purchase Order creation

    Hi sap Gurus,
      I am getting Errors when iam using  BAPI_PO_CREATE1 for Purchase Order creation that Material (144) does not exist but it is alreardy maintained in MM01.
    I dont get how it is coming.and what are the mandatory fields in bapi BAPI_PO_CREATE1 in item level .that is too material only.
    pls let me know .
    thanks in advance.

    Hi,
    Check the sample code..
    report  zpo_test             .
    *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
    Sudheer

  • Problem in using output type for purchase order

    Hi experts,
         I am using output type for first time so may be i have done wrong configuration for po output type.The steps i have done are :-
    1) Going to  tcode NACE->Selected  the row u201CEF Purchase Orderu201D and clicked on u201CProcedures".
    2) In procedures there are 2 procedures for the application EF (Purchase Order). To proceed further, we would need to find out the procedure that is currently active.Gone to transaction SPRO. In this, navigate as Materials management -> Purchasing ->Messages -> Output control -> Message Determination Schemas ->Define Message Schema for Purchase Order
    3) Clicking on u201CAssign Schema to Purchase Orderu201D. So, the procedure RMBEF1 is active for EF (Purchase Order) . 
    4) Go back to transaction NACE. Select u2018EFu2019 and click on u201COutput typesu201D.
    5)  Let us use the output type u201CNEU name purchase orderu201D for this purpose. Double-click on NEU.
    6) Ensured  that the checkboxes u201CAccess to conditionsu201D and u201Cmultiple issuingu201D are checked and the access sequence is 0001(DocType/PurchOrg/Vendor).Only 0001 and 0002 is available in f4 help for this.
    7) Now clicked on u201CProcessing Routinesu201D on the left hand side. Ensured that there is an entry for Medium u2018Au2019 (Distribution ALE).
    8) After that going back to the main screen of NACE. Select EF (Purchase Order) and clicked on u201CCondition Recordsu201D.
    Select NEU and clicked on u201CCondition recordsu201D. The pop-up box appears that gives three radio button option :-
      1) Purchasing output determination :purchasing org / vendor for EDI
      2) Purchasing output determination :doc. type / purchasing org /vendor
      3) Purchasing output determination :document type
          but it is not having option only for purchasing organisation through which we can send idoc for changes or creation of PO in that particular pur.org now if i choose 2) i have to give doc type and purchasing org both bcoz they are mandatory fields and value for vendor.
    9)  Also i  have done the necessary ALE configuration (not covered in this document). In the partner profiles, use the message type u201CORDERSu201D and the IDOC type u201CORDERS05u201D.In the tab u201CMessage Controlu201D, used the process codes u201CME10u201D and u201CME11u201D for u201CPO Createu201D and u201CPO Changeu201D respectively.
    but the idoc is not generated many times when po is changed and when once it is generated it is giving error
    Please suggest solution.
    Thanks in advance
    nehavt

    In me22n in messages tab after looking into  processing log it is giving->No recipient found for message type ORDCHG in the
    ALE model ,next time giving error as no idoc items belonging to purchasing document found,when i changed message type to ORDCHG the  status is green in messages tab it is giving-> error occured while idoc xyz is sent and in WE02 status is red 02
    error passing data to port(could not find code page for receiving system)

  • Updating Batch classification data from MIGO for Purchase order

    Hi,
    I need to update batch classification data (in MSC3n) from MIGO for purchase order. The logic needed for this is as below,
    1) Pass material and batch to MCH1 table to get CUOBJ_BM.
    2) Pass CUOBJ_BM to INOB table to get INOB-OBJEK.
    3) Pass INOB-OBJEK to CLAF_CLASSIFICATION_OF_OBJECTS to get class name & characteristic name.
    4) Pass INOB-OBJEK, CLASS name and characteristic name to BAPI_OBJCL_CHANGE to update batch classification data.
    I created implicit enhancement at the bottom of FM "CLVF_VB_INSERT_CLASSIFICATION". But the problem is, the return parameter of BAPI_OBJCL_CHANGE is giving the following error.
    Class type 023, object type MCH1, object RAW-6             0000001151
    Object is currently locked by user
    The assignment was not changed
    Please let me know how to do it. Is there any BADI or User Exit?

    Hi,
    As you said the break point is not triggering did you activate your exit and activated even the project to which your exit is assigned.
    I hope you missed activating your project in CMOD transaction. Please verify it once and if it is not activated then immediately activate it and try debugging again.
    Regards,
    Rafi

Maybe you are looking for

  • Error while executing LSMW for fk02

    Hi, I was trying to update the Payment Terms in fk02 through LSMW. On executing the last step of lsmw, i'm getting the following error: Enter a valid value Message no. 00002 Procedure Display the allowed values with F4 and correct your entry. How do

  • In Firefox 2.0+ you can go to Advanced JavaScript Settings and check a box to allow scripts to change status bar text. How do I do this is Firefox 10.0.1?

    In Firefox 2.0+ you can go to Advanced JavaScript Settings and check a box to allow scripts to change status bar text. How do I do this is Firefox 10.0.1?

  • Tomcat with Apache

    Hi, I have followed the tutorial on this website to configure tomcat to connect with Apache. I am on a CENTOS 5 system. Apache was already installed and serving three web sites without problems. I wanted to add the ability to work with .jsp files and

  • Itunes constantly maximizes

    Hi there, Since I ran an update this morning (to Vista plus a few drivers) iTunes has started to constantly maximize / focus itself every few seconds. as I've been writing this it's done it a few times already. It's driving me freaking bananas! I'm o

  • GPS shows the wrong position

    Hi I'm from Bahrain and i moved to china few months ago i downloaded the nokia maps in Bahrain in my Nokia E66 and i & i used it perfectly in Bahrain i also downloaded the maps of china but now that I'm in china when ever i press " MY POSITION" it go