Bom explosion in purchase requisition using BAPi

Hello All,
Is it possible to explode a BOM in a purchase requisition using a functional module.
Vivek

Rajen,
I have a material on which when I run MRP I get purchase requisitions with two different production version.
In one purchase requisition I can see the BOM components and while on the other one I dont see BOM components.
If I pass these two Purchase requisitions in EBAN table I find that RSNUM is blank for the latter case.
If I go in this purchase requisition in change mode and explode the BOM and save, I can see BOM components.
Also If I refresh EBAN table after this activity, I see the RSNUM field is populated.
I hope this helps.
Vivek

Similar Messages

  • Creation of Purchase Requisition using BAPI

    Hi Experts
    Can anyone provide me the sample code for creating Purchase Requisition using BAPI
    Thanks in advance

    Hi siri,
    go throught this, hope
    http://www.erpgenie.com/abap/bapi/example.htm
    Also refer to the following links..
    www.sappoint.com/abap/bapiintro.pdf
    www.sap-img.com/bapi.htm
    www.sap-img.com/abap/bapi-conventions.htm
    www.planetsap.com/Bapi_main_page.htm
    www.sapgenie.com/abap/bapi/index.htm
    Checkout !!
    http://searchsap.techtarget.com/originalContent/0,289142,sid21_gci948835,00.html
    http://techrepublic.com.com/5100-6329-1051160.html#
    http://www.sap-img.com/bapi.htm
    http://www.sap-img.com/abap/bapi-conventions.htm
    http://www.sappoint.com/abap/bapiintro.pdf
    http://sap-img.com/bapi.htm
    Thanks
    Naveen khan
    Message was edited by:
            Pattan Naveen

  • Create Purchase Order with reference to Purchase Requisition using BAPI's

    Hello Experts,
    I need to create a Purchase order with reference to a Purchase Requisition.
    All the above has to be done by using BAPI's.
    For creating PR, I am using BAPI_REQUISITION_CREATE.
    and for PO, I am using BAPI_PO_CREATE.
    I am not able to use the requistion number in the PO. BAPI throws the following exception
    "Requisition 1014396 00010 not selectable"
    "Document contains no items"
    Query's:
    1. Do I need to release the PR for using it in PO?
    2. If so how can I work with the "BAPI_REQUISITION_RELEASE_GEN" to release PR?
    I have tried using the BAPI getting the following error "Release outside filed of responsibility".
    Please help I am in critical Postion...
    Thanks,
    Suma

    Hi Meenakshi,
    When, I try to release error I am getting the following the error " Purchase Requisition can not be released".
    Is this problem because of authorization or data issue?
    Thanks
    Suma

  • Attach the file for purchase requisition using BSP service

    Hi All,
    I have Requirement Attach the any file like(PDF,TXT,PPT) to Purchase requisition using BSP service.Could please provide me any function module or BAPI for this functionality.
    Thanks in advance.
    Regards,
    Rajesh.

    Hi All,
    REPORT ZTESTJLG3 . .
    parameter p_mandt like sy-mandt default '120' .
    parameter p_equi type equnr default '1000007' .
    parameter p_path like IBIPPARMS-path memory id AD_LOCAL_PATH .
    parameter p_name(30) default 'Test attach 100007' lower case .
    " nom attachement .
    data w_prog like sy-repid .
    data w_dynnr like sy-dynnr .
    data w_attachement type borident .
    initialization .
    w_prog = sy-repid .
    w_dynnr = sy-dynnr .
    " test jean luc recuperer le code de
    fucntion module 'GOS_EXECUTE_SERVICE'
    data lo_container TYPE REF TO cl_gui_container .
    *call method lo_container->get_container_type .
    at selection-screen on value-request for p_path .
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
    PROGRAM_NAME = w_prog
    DYNPRO_NUMBER = w_dynnr
    FIELD_NAME = 'P_PATH'
    IMPORTING
    FILE_NAME = p_path .
    start-of-selection .
    if sy-mandt ne p_mandt .
    write 'Erreur mandt ' .
    exit .
    endif .
    data ws_borident like borident .
    ws_borident-OBJKEY = p_equi.
    ws_borident-OBJTYPE = 'EQUI'.
    data w_document like SOOD4 .
    data : begin of wt_files occurs 0 .
    data fname(128) .
    data end of wt_files.
    wt_files-fname = p_path .
    append wt_files .
    data folder_id like SOODK .
    call function 'SO_FOLDER_ROOT_ID_GET'
    EXPORTING
    region = 'B'
    IMPORTING
    folder_id = folder_id
    EXCEPTIONS
    others = 1.
    w_document-foltp = folder_id-objtp .
    w_document-folyr = folder_id-objyr .
    w_document-folno = folder_id-objno .
    append document to documents.
    w_document-objdes = p_name .
    w_document-objnam = p_name .
    data w_h_data like sooD2 ..
    data w_fol_data like sofm2.
    data w_rec_data like soos6 .
    w_h_data-objdes = p_name .
    CALL FUNCTION 'SO_DOCUMENT_REPOSITORY_MANAGER'
    EXPORTING
    METHOD = 'IMPORTFROMPC'
    OFFICE_USER =
    REF_DOCUMENT = w_document
    NEW_PARENT =
    IMPORTING
    AUTHORITY =
    TABLES
    OBJCONT =
    OBJHEAD =
    OBJPARA =
    OBJPARB =
    RECIPIENTS =
    ATTACHMENTS =
    REFERENCES =
    FILES = wt_files
    CHANGING
    DOCUMENT = w_document
    HEADER_DATA = w_h_data
    FOLMEM_DATA = w_fol_data
    RECEIVE_DATA = w_rec_data .
    if w_document-okcode = 'CREA' or w_document-okcode = 'CHNG'.
    w_attachement-objtype = 'MESSAGE'.
    w_attachement-objkey = w_document(34).
    CALL FUNCTION 'BINARY_RELATION_CREATE_COMMIT'
    EXPORTING
    OBJ_ROLEA = ws_borident
    OBJ_ROLEB = w_attachement
    RELATIONTYPE = 'ATTA'
    IMPORTING
    BINREL =
    TABLES
    BINREL_ATTRIB =
    EXCEPTIONS
    NO_MODEL = 1
    INTERNAL_ERROR = 2
    UNKNOWN = 3
    OTHERS = 4
    IF SY-SUBRC 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    endif .
    For above requirement i am trying like above code.
    working fine but which transaction i can find the attach file.I am trying to fine using ME52N transaction but i c't find this file.
    Please suggest me how can i find this one
    Thanks in advance,
    RajeshV.

  • HOW TO CREATE PURCHASE ORDER USING BAPI

    HI FRIENDS,
    I HAVE URGENT REQUIREMNT ,TO CREATE PURCHASE ORDER USING BAPI.PLS HELP ON THIS.
    UR'S
    RAVI

    Hi
    See the sample code and do accordingly
    REPORT zpo_bapi_purchord_tej.
    DATA DECLARATIONS *
    TYPE-POOLS slis.
    TYPES: BEGIN OF ty_table,
    v_legacy(8),
    vendor TYPE bapimepoheader-vendor,
    purch_org TYPE bapimepoheader-purch_org,
    pur_group TYPE bapimepoheader-pur_group,
    material TYPE bapimepoitem-material,
    quantity(13),
    delivery_date TYPE bapimeposchedule-delivery_date,
    net_price(23),
    plant TYPE bapimepoitem-plant,
    END OF ty_table.
    TYPES: BEGIN OF ty_alv,
    v_legs(8),
    success(10),
    v_legf(8),
    END OF ty_alv.
    TYPES: BEGIN OF ty_alv1,
    v_legf1(8),
    v_msg(500),
    END OF ty_alv1.
    *-----Work area declarations.
    DATA: x_table TYPE ty_table,
    x_header TYPE bapimepoheader,
    x_headerx TYPE bapimepoheaderx,
    x_item TYPE bapimepoitem,
    x_itemx TYPE bapimepoitemx,
    x_sched TYPE bapimeposchedule,
    x_schedx TYPE bapimeposchedulx,
    x_commatable(255),
    x_alv TYPE ty_alv,
    x_alv1 TYPE ty_alv1,
    x_alv2 TYPE ty_alv1.
    *-----Internal table declarations.
    DATA: it_table TYPE TABLE OF ty_table,
    it_commatable LIKE TABLE OF x_commatable,
    it_item TYPE TABLE OF bapimepoitem,
    it_itemx TYPE TABLE OF bapimepoitemx,
    it_sched TYPE TABLE OF bapimeposchedule,
    it_schedx TYPE TABLE OF bapimeposchedulx,
    it_alv TYPE TABLE OF ty_alv,
    it_alv1 TYPE TABLE OF ty_alv1,
    it_alv2 TYPE TABLE OF ty_alv1.
    DATA: po_number TYPE bapimepoheader-po_number,
    x_return TYPE bapiret2,
    it_return TYPE TABLE OF bapiret2,
    v_file TYPE string,
    v_temp(8),
    v_succsount TYPE i VALUE 0,
    v_failcount TYPE i VALUE 0,
    v_total TYPE i.
    DATA: v_temp1(5) TYPE n VALUE 0.
    DATA: x_event TYPE slis_t_event,
    x_fieldcat TYPE slis_t_fieldcat_alv,
    x_list_header TYPE slis_t_listheader,
    x_event1 LIKE LINE OF x_event,
    x_layout1 TYPE slis_layout_alv,
    x_variant1 TYPE disvariant,
    x_repid2 LIKE sy-repid.
    DATA : it_fieldcat TYPE TABLE OF slis_t_fieldcat_alv.
    SELECTION-SCREEN *
    SELECTION-SCREEN BEGIN OF BLOCK v_b1 WITH FRAME.
    *-----To fetch the flat file.
    PARAMETERS: p_file TYPE rlgrap-filename.
    SELECTION-SCREEN END OF BLOCK v_b1.
    AT SELECTION-SCREEN *
    AT SELECTION-SCREEN.
    IF p_file IS INITIAL.
    MESSAGE text-001 TYPE 'E'.
    ENDIF.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    *-----To use F4 help to find file path.
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
    program_name = syst-cprog
    dynpro_number = syst-dynnr
    IMPORTING
    file_name = p_file.
    v_file = p_file.
    START-OF-SELECTION *
    START-OF-SELECTION.
    PERFORM gui_upload.
    LOOP AT it_table INTO x_table.
    PERFORM header_details.
    v_temp = x_table-v_legacy.
    LOOP AT it_table INTO x_table WHERE v_legacy = v_temp.
    PERFORM lineitem.
    PERFORM schedule.
    ENDLOOP.
    DELETE it_table WHERE v_legacy = v_temp.
    PERFORM bapicall.
    MOVE po_number TO x_alv-success.
    APPEND x_alv TO it_alv.
    CLEAR x_alv.
    *-----To clear the item details in internal table after the operation for a header.
    REFRESH: it_item,
    it_itemx,
    it_sched,
    it_schedx.
    CLEAR: v_temp1.
    ENDLOOP.
    v_total = v_succsount + v_failcount.
    PERFORM display_alv.
    FORM GUI_UPLOAD *
    FORM gui_upload .
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = v_file
    filetype = 'ASC'
    TABLES
    data_tab = it_commatable
    EXCEPTIONS
    file_open_error = 1
    file_read_error = 2
    no_batch = 3
    gui_refuse_filetransfer = 4
    invalid_type = 5
    no_authority = 6
    unknown_error = 7
    bad_data_format = 8
    header_not_allowed = 9
    separator_not_allowed = 10
    header_too_long = 11
    unknown_dp_error = 12
    access_denied = 13
    dp_out_of_memory = 14
    disk_full = 15
    dp_timeout = 16
    OTHERS = 17
    IF sy-subrc = 0.
    *-----To fetch the comma seperated flat file into an internal table.
    LOOP AT it_commatable INTO x_commatable.
    IF x_commatable IS NOT INITIAL.
    SPLIT x_commatable AT ',' INTO
    x_table-v_legacy
    x_table-vendor
    x_table-purch_org
    x_table-pur_group
    x_table-material
    x_table-quantity
    x_table-delivery_date
    x_table-net_price
    x_table-plant.
    APPEND x_table TO it_table.
    ENDIF.
    CLEAR x_table.
    ENDLOOP.
    ENDIF.
    ENDFORM. " gui_upload
    FORM HEADER_DETAILS *
    FORM header_details .
    MOVE 'NB' TO x_header-doc_type.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    input = x_table-vendor
    IMPORTING
    output = x_table-vendor
    MOVE x_table-vendor TO x_header-vendor.
    MOVE x_table-purch_org TO x_header-purch_org.
    MOVE x_table-pur_group TO x_header-pur_group.
    x_headerx-doc_type = 'X'.
    x_headerx-vendor = 'X'.
    x_headerx-purch_org = 'X'.
    x_headerx-pur_group = 'X'.
    ENDFORM. " header_details
    FORM LINEITEM *
    FORM lineitem .
    v_temp1 = v_temp1 + 10.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    input = v_temp1
    IMPORTING
    output = v_temp1.
    MOVE v_temp1 TO x_item-po_item.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    input = x_table-material
    IMPORTING
    output = x_table-material.
    MOVE x_table-material TO x_item-material.
    MOVE x_table-quantity TO x_item-quantity.
    MOVE x_table-net_price TO x_item-net_price.
    MOVE x_table-plant TO x_item-plant.
    x_itemx-po_item = v_temp1.
    x_itemx-material = 'X'.
    x_itemx-quantity = 'X'.
    x_itemx-net_price = 'X'.
    x_itemx-plant = 'X'.
    APPEND x_item TO it_item.
    APPEND x_itemx TO it_itemx.
    CLEAR: x_item, x_itemx.
    ENDFORM. " lineitem1
    FORM SCHEDULE *
    FORM schedule .
    MOVE x_table-delivery_date TO x_sched-delivery_date.
    MOVE v_temp1 TO x_sched-po_item.
    x_schedx-delivery_date = 'X'.
    x_schedx-po_item = v_temp1.
    APPEND x_sched TO it_sched.
    APPEND x_schedx TO it_schedx.
    CLEAR: x_sched, x_schedx.
    ENDFORM. " schedule
    FORM BAPICALL *
    FORM bapicall .
    CALL FUNCTION 'BAPI_PO_CREATE1'
    EXPORTING
    poheader = x_header
    poheaderx = x_headerx
    IMPORTING
    exppurchaseorder = po_number
    TABLES
    return = it_return
    poitem = it_item
    poitemx = it_itemx
    poschedule = it_sched
    poschedulex = it_schedx.
    IF po_number IS NOT INITIAL.
    v_succsount = v_succsount + 1.
    MOVE x_table-v_legacy TO x_alv-v_legs.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    ELSE.
    v_failcount = v_failcount + 1.
    MOVE x_table-v_legacy TO x_alv-v_legf.
    MOVE x_table-v_legacy TO x_alv1-v_legf1.
    LOOP AT it_return INTO x_return.
    IF x_alv1-v_msg IS INITIAL.
    MOVE x_return-message TO x_alv1-v_msg.
    ELSE.
    CONCATENATE x_alv1-v_msg x_return-message INTO x_alv1-v_msg SEPARATED BY space.
    ENDIF.
    ENDLOOP.
    APPEND x_alv1 TO it_alv1.
    CLEAR x_alv1.
    ENDIF.
    ENDFORM. " bapicall
    FORM DISPLAY_ALV *
    FORM display_alv .
    PERFORM x_list_header.
    PERFORM build_fieldcat CHANGING x_fieldcat.
    x_repid2 = sy-repid.
    x_event1-name = 'TOP_OF_PAGE'.
    x_event1-form = 'TOP_OF_PAGE'.
    APPEND x_event1 TO x_event.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    i_callback_program = x_repid2
    is_layout = x_layout1
    it_fieldcat = x_fieldcat
    i_callback_user_command = 'USER_COMMAND'
    i_callback_top_of_page = 'TOP_OF_PAGE'
    i_save = 'A'
    is_variant = x_variant1
    it_events = x_event
    TABLES
    t_outtab = it_alv
    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_master_data
    FORM USER_COMMAND *
    FORM user_command USING ucomm LIKE sy-ucomm selfield
    TYPE slis_selfield.
    READ TABLE it_alv INTO x_alv INDEX selfield-tabindex.
    CLEAR : x_alv2,it_alv2[].
    LOOP AT it_alv1 INTO x_alv1 WHERE v_legf1 = x_alv-v_legf.
    x_alv2 = x_alv1.
    APPEND x_alv2 TO it_alv2 .
    ENDLOOP.
    DATA : it_fieldcat TYPE slis_t_fieldcat_alv.
    DATA : x3_fieldcat LIKE LINE OF it_fieldcat.
    CLEAR : x3_fieldcat,it_fieldcat[].
    CLEAR x3_fieldcat.
    x3_fieldcat-col_pos = '1'.
    x3_fieldcat-fieldname = 'V_LEGF1'.
    x3_fieldcat-reptext_ddic = text-111.
    x3_fieldcat-ref_tabname = 'IT_ALV2'.
    APPEND x3_fieldcat TO it_fieldcat.
    CLEAR x3_fieldcat.
    CLEAR x3_fieldcat.
    x3_fieldcat-col_pos = '1'.
    x3_fieldcat-fieldname = 'V_MSG'.
    x3_fieldcat-reptext_ddic = text-112.
    x3_fieldcat-ref_tabname = 'IT_ALV2'.
    APPEND x3_fieldcat TO it_fieldcat.
    CLEAR x3_fieldcat.
    x_layout1-colwidth_optimize = 'X'.
    x_layout1-zebra = 'X'.
    IF it_alv2[] IS NOT INITIAL.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    i_callback_program = x_repid2
    is_layout = x_layout1
    it_fieldcat = it_fieldcat
    i_save = 'A'
    i_callback_top_of_page = 'TOP'
    is_variant = x_variant1
    it_events = x_event
    TABLES
    t_outtab = it_alv2
    EXCEPTIONS
    program_error = 1
    OTHERS = 2.
    ENDIF.
    ENDFORM.
    FORM USER_COMMAND *
    FORM top.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    it_list_commentary = 'Commentry'.
    ENDFORM.
    FORM BUILD_FIELDCAT *
    FORM build_fieldcat CHANGING et_fieldcat TYPE slis_t_fieldcat_alv.
    DATA: x1_fieldcat TYPE slis_fieldcat_alv.
    CLEAR x1_fieldcat.
    x1_fieldcat-col_pos = '1'.
    x1_fieldcat-fieldname = 'V_LEGS'.
    x1_fieldcat-reptext_ddic = text-108.
    x1_fieldcat-ref_tabname = 'IT_ALV'.
    APPEND x1_fieldcat TO et_fieldcat.
    CLEAR x1_fieldcat.
    x1_fieldcat-col_pos = '2'.
    x1_fieldcat-fieldname = 'SUCCESS'.
    x1_fieldcat-key = 'X'.
    x1_fieldcat-reptext_ddic = text-109.
    x1_fieldcat-ref_tabname = 'IT_ALV'.
    APPEND x1_fieldcat TO et_fieldcat.
    CLEAR x1_fieldcat.
    x1_fieldcat-col_pos = '3'.
    x1_fieldcat-fieldname = 'V_LEGF'.
    x1_fieldcat-key = 'X'.
    x1_fieldcat-reptext_ddic = text-110.
    x1_fieldcat-ref_tabname = 'IT_ALV'.
    APPEND x1_fieldcat TO et_fieldcat.
    CLEAR x1_fieldcat.
    ENDFORM. " build_fieldcat
    FORM BUILD_LIST_HEADER *
    FORM x_list_header.
    DATA: x_list_header1 TYPE slis_listheader.
    *-----List Header: type H
    CLEAR x_list_header1 .
    x_list_header1-typ = 'H'.
    x_list_header1-info = text-105.
    APPEND x_list_header1 TO x_list_header.
    *-----List Key: type S
    x_list_header1-typ = 'S'.
    x_list_header1-key = text-106.
    x_list_header1-info = v_total.
    APPEND x_list_header1 TO x_list_header.
    *-----List Key: Type S
    CLEAR x_list_header1 .
    x_list_header1-typ = 'S'.
    x_list_header1-key = text-107.
    x_list_header1-info = v_succsount.
    APPEND x_list_header1 TO x_list_header.
    ENDFORM. " build_list_header
    FORM TOP_OF_PAGE *
    FORM top_of_page.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    it_list_commentary = x_list_header.
    ENDFORM. " TOP_OF_PAGE
    Reward points if useful
    Anji

  • Rounding Values while creating purchase requisitions using ME51N

    Hi MM Experts,
    I have created some materials with a Rounding Value maintained in MRP1 View of the material master.
    Whenever I raise a purchase order, the order quantity rounds off to the value maintained in the material master which is the correct functionality.
    But when i try to create a purchase requisition using ME51N, the rounding functionality doesn't work.
    Example: Rounding value (in MRP1 view) of a material is 25.
    The order quantity entered is 4. But before saving the PURCHASE ORDER the order quantity will be changed to 25(which is the rounding value). This is the correct functionality but doesn't happen with the PURCHASE REQUISITION (ME51N)
    Can someone guide me on how to make the rounding value work for purchase requisitions when using ME51N?
    Thanks in advance.
    cheers,
    Randi

    Hi!
    i had the same problem with a company.
    i did not find any customizing possibilities.
    I solved it with BAdI ME_PROCESS_REQ_CUST
    Method PROCESS_ITEM.
    I hope this helps
    Flo

  • Purchase Requisition using webdynpro

    Hi all,
        I have a requirement wherein i have to create a purchase requisition using webdynpro by taking Document type, Plant, Storage Location, Material and Quantity as input. I am able to generate a PR NO. for a single Material but when there are multiple Materials for the same plant and storage location the PR does not get generated. Kindly Help.
    Regards,
    Santhosh.

    Hi,
    In extended notification the approvar will be asked to SAP login details and proceed for approval process. Without log into sap you cannot approve the PR. Please refer below link for better clarity. Thanking you.
    Approve workitems from outlook

  • Block Project Purchase Requisition using User Status

    Dear All,
    We need a copy of TECO, we tried to create a new status using BS22 transaction but its totally new activity of creating the system status. This transaction does not allow to copy an existing status. is there any other way to do so
    We alos tried to block the Purchase Requisition using user status, but its not working. Please guide
    Thanks in advance.
    Murtaza

    Yes, you are right I need the said status for WBS Element. I have assigned it to relevant WBS Elements but not working.
    Let me explain the scenario little more, there are activities having commitments (Purchase Requisitions), we need to process the existing PRs but new commitments must be blocked. we need to use status on WBSE to control it so that if we need to re-open the new commitments, we can do it by disabling the status.
    Murtaza

  • Automatic Purchase Requisition using Reorder Point without MRP Run

    Dear Freinds,
    My client wants Purchase Requisition should be automatically created as soon as the stock falls below reorder level without MRP run.
    Is this possible? if possible then what are the settings required.
    Thanks
    Prashant Atri

    Dear,
    It is not possible in standard SAP.
    What is the problem to take MRP run?
    You can take the MRP run in background through MDBT so system will create automatic Purchase Requisition using Reorder Point.
    Hope clear to you.
    Regards,
    R.Brahmankar

  • How to create purchase reqisation using BAPI....?

    Hi Guru's,
    i have 100 purchase reqisation details in CSV file ..
    could you please any one of you ..which BAPI i have to use to create the purchase reqisation's..
    please porvide any program logic realated to this that would be helpfull to me..if you have...:)
    please let me know if my question is not clear..
    please let  me know if any alternative process for this....
    thanks in advance and will give full points..
    Srinivas...

    Hi Srinivas,
    You have standard BAPI to create the Purchase Requisitions in SAP.  You can use this BAPI BAPI_REQUISITION_CREATE to upload all your Purchase requistions.
    Thanks,
    Mahesh.

  • Create a Service Purchase Requisition using BAPI_PR_CREATE

    Hi Everyone,
    I am using BAPI_PR_CREATE.
    I am able to create Standard Purchase requisition.
    But while creating Service Purchase Requisition, i am not able to create.
    I am getting no errors for the PR Item, but even after entering Services for the PR Item i am getting error message in return table of bapi "Please Maintain Services or limits'.
    Do i have to pass value to Package_No field in the item level table of BAPI_PR_CREATE.
    Please help.
    Regards,
    Akash

    Hi,
    Check this link for creation of services.
    Bapi_pr_change in services
    PO Upload through BAPI_PO_CREATE1 - Problem in Service Item
    BAPI_PO_CREATE1 Error
    Hope it helps
    Sujay

  • Bom text in Purchase requisition

    hi all
    we are working on Project base scenarion with MTO.
    we create bom as per wbs element.
    we have a material codes for pumps, motors. in bom we maintain text for line item.
    e g for pump we maintain make for the pump in text line of bom.
    my requirement is when we run MRP and Purchase requisition is created i can see the that text in the purchase requisition. but where i dont know.
    or for this kind of task is it require to develope a programm ?
    please guide.

    Hi,
    I can think of 2 options:
    1. BADI - MD_CHANGE_MRP_DATA with method - CHANGE_MDPSX_EBAN
    2. Create a Z program by using BAPI_REQUISITION_CHANGE, here you can read the PR & update the text field by reading the BOM item as per your need.
    I would suggest use option 2 as option 1 relates to MRP program so you will have to do a lot of checks to ensure the runtime is not long & there are no issues with MRP results.
    You can schedule your Z program to run immediately after the MRP run, thereby ensuring you can meet your need.
    Regards,
    Vivek

  • Hi experts, Upload purchase order using BAPI

    hi
    Could you please help me how to do PURCHASE ORDER CREATION using BAPI.
                         Thank you.

    Satyendra,
    The forum that you have posted your question in is for questions related to the SAP Business One Integration for SAP NetWeaver.  Your question is or seems to be related to R/3 and should be posted in that forum.
    Eddy

  • Enter short text error when creating a purchase requisition using ME51

    Hello
    I would be grateful if someone can help. I am currently trying to raise a purchase req using ME51. The purchase req is for one item so i enter details of this item on line 1. However when i try to save the purchase req i get an error message stating "enter short text"  on line 3 and it does not let me continue. Line 3 however does not contain any item information so i dont understand why i am getting this error message.
    Another user created the same purchase req and it worked fine for them so i am not sure why i am getting this message.
    I  would be grateful if you can please help.
    Thank you
    Regards
    Bindi

    Syed
    I  have tried logging off and logging back in and still having this issue.
    Jurgen
    No im only having this problem in a ME51 creating purchase requisitions and not in a CATT or any batch input recording
    Regards
    Bindi

  • Creation of purchase order using bapi

    hi gurus,
    Can anyone give me an example of how to create purchase order using bapi

    Hi use BAPI_PO_CREATE.. I have an eg. of changing a PO using BAPI. This is almost similar to create.. Go thru and let me know if u need more info..
    Dont forget to use 'BAPI COMMIT'  after the function call...
    DATA:
    *Update Short text, qty, net price, item no.,
    *agreement no. and agreement line no.
         it_po_item                  TYPE TABLE OF bapimepoitem,
    *Select fields
         it_po_item_x                TYPE TABLE OF bapimepoitemx,
    *Delivery date
         it_po_schedule              TYPE TABLE OF bapimeposchedule,
    *Select fields
         it_po_schedule_x            TYPE TABLE OF bapimeposchedulx,
    *Return parameters
         it_return                   TYPE TABLE OF bapiret2,
    *PO Account
         it_po_account               TYPE TABLE OF bapimepoaccount,
    *Select fields
         it_po_account_x             TYPE TABLE OF bapimepoaccountx,
    Condition Types
         it_po_cond                  TYPE TABLE OF bapimepocond,
    *Select fields
         it_po_cond_x                TYPE TABLE OF bapimepocondx,
         it_po_text                  type table of BAPIMEPOTEXT.
    Structures
    DATA:
          st_po_header               TYPE         bapimepoheader,
          st_po_header_x             TYPE         bapimepoheaderx,
          st_po_item                 LIKE LINE OF it_po_item,
          st_po_item_x               LIKE LINE OF it_po_item_x,
          st_po_schedule             LIKE LINE OF it_po_schedule,
          st_po_schedule_x           LIKE LINE OF it_po_schedule_x,
          st_return                  TYPE          bapiret2,
          st_po_account              LIKE LINE OF  it_po_account,
          st_po_account_x            LIKE LINE OF  it_po_account_x,
          st_po_cond                 LIKE LINE OF  it_po_cond,
          st_po_cond_x               LIKE LINE OF  it_po_cond_x,
          st_po_text                 like line of  it_po_text.
    Variables
    DATA : po_number    TYPE bapimepoheader-po_number,
           w_item_no(10) TYPE n VALUE  '1'.
    START-OF-SELECTION.
    test values
      po_number                = '94490'.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        input         = po_number
    IMPORTING
       OUTPUT        = po_number
      st_po_item-po_item       = w_item_no.
      st_po_item-quantity      = '00.000'.
      st_po_item-delete_ind    = 'X'.
    st_po_item-short_text    = 'ZMU-test1'.
    st_po_item-agreement     = '0060000128'.
    st_po_item-agmt_item     = '1'.
    st_po_item-net_price     = '1'.
      st_po_item_x-po_item      = w_item_no.
      st_po_item_x-po_itemx     = 'X'.
      st_po_item_x-delete_ind   = 'X'.
      st_po_item_x-quantity     = 'X'.
    st_po_item_x-short_text   = 'X'.
    st_po_item_x-agreement    = 'X'.
    st_po_item_x-agmt_item    = 'X'.
    st_po_item_x-net_price    = 'X'.
    st_po_schedule-po_item         = w_item_no.
    st_po_schedule-delivery_date   = '9/19/2008'.
    st_po_schedule-quantity        = '1'.
    st_po_schedule_x-po_item         = w_item_no.
    st_po_schedule_x-po_itemx        = 'X'.
    st_po_schedule_x-delivery_date   = 'X'.
    st_po_schedule_x-quantity        = 'X'.
    st_po_cond-itm_number  = w_item_no.
    st_po_cond-cond_type   = 'PB00'.
    st_po_cond-cond_value  = '1.000'.
    st_po_cond-currency    = 'USD'.
    st_po_cond-change_id   = 'U'.
    st_po_cond_x-itm_number  = w_item_no.
    st_po_cond_x-itm_numberx = 'X'.
    st_po_cond_x-cond_type   = 'X'.
    st_po_cond_x-cond_value  = 'X'.
    st_po_cond_x-currency    = 'X'.
    st_po_cond_x-change_id   = 'X'.
    st_po_text-PO_NUMBER = po_number.
    st_po_text-PO_ITEM = w_item_no.
    st_po_text-TEXT_LINE = 'MU_TEST1 MU_TEST2'.
      APPEND:
             st_po_item_x      TO it_po_item_x,
             st_po_item        TO it_po_item.
            st_po_schedule_x  TO it_po_schedule_x,
            st_po_schedule    TO it_po_schedule,
            st_po_cond        TO it_po_cond,
            st_po_cond_x      TO  it_po_cond_x,
            st_po_text        to  it_po_text.
    st_po_text-PO_NUMBER = po_number.
    st_po_text-PO_ITEM = w_item_no.
    st_po_text-TEXT_LINE = 'MU_TEST2'.
    st_po_text-TEXT_FORM = '03'.
    append st_po_text to it_po_text.
      PERFORM function_call.
      LOOP AT it_return INTO st_return.
        WRITE:/ st_return-message, 'Message type =', st_return-type,/.
      ENDLOOP.
      REFRESH:
                it_return,
                it_po_item,
                it_po_item_x,
                it_po_cond,
                it_po_cond_x.
    PERFORM update_price.
    WRITE:/ 'After update - Messages'.
    LOOP AT it_return INTO st_return.
       WRITE:/ st_return-message, 'Message type =', st_return-type,/.
    ENDLOOP.
    data: begin of test occurs 0,
            f1,
          end of test.
          FORM function_call                                            *
    FORM function_call.
      CALL FUNCTION 'BAPI_PO_CHANGE'
        EXPORTING
          purchaseorder              = po_number
         POHEADER                  =
         POHEADERX                 =
      POADDRVENDOR                 =
      TESTRUN                      =
      MEMORY_UNCOMPLETE            =
      MEMORY_COMPLETE              =
    IMPORTING
      EXPHEADER                    =
       TABLES
          return                     = it_return
          poitem                     = it_po_item
          poitemx                    = it_po_item_x
      POADDRDELIVERY               =
        poschedule                 = it_po_schedule
        poschedulex                = it_po_schedule_x
       poaccount                   =
      POACCOUNTPROFITSEGMENT       =
       poaccountx                  =
      POCONDHEADER                 =
      POCONDHEADERX                =
       pocond                      =  it_po_cond
       pocondx                     =  it_po_cond_x
      POLIMITS                     =
      POCONTRACTLIMITS             =
      POSERVICES                   =
      POSRVACCESSVALUES            =
      POSERVICESTEXT               =
      EXTENSIONIN                  =
      EXTENSIONOUT                 =
      POTEXTHEADER                 =
       POTEXTITEM                   =  it_po_text
      POPARTNER                    =
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
           EXPORTING
                wait   = 'X'
           IMPORTING
                return = st_return.
    ENDFORM.

Maybe you are looking for