Skip to Content
author's profile photo Former Member
Former Member

create PO with BAPI 'BAPI_PO_CREATE1'

Hi, when i call this BAPI, SAP gives runtime error as follow'A RAISE statement in the program "CL_HANDLE_MANAGER_MM==========CP" raised th

exception

condition "FAILURE".' i can not understand this message.

my code is as follow, very simple,

*POPULATE HEADER DATA

l_po_header-comp_code = p_bukrs .

l_po_header-vendor = SEQ_FILEH-lifnr .

l_po_header-purch_org = p_EKORG .

l_po_header-pur_group = p_EKGRP .

l_po_header-SALES_PERS = SEQ_FILEH-VERKF .

l_po_header-SUPPL_PLNT = p_RESWK .

l_po_header-langu = sy-langu .

l_po_header-doc_date = sy-datum.

*POPULATE HEADER DATA FOR PO

l_po_headerx-comp_code = c_x.

l_po_headerx-vendor = c_x.

l_po_headerx-purch_org = c_x.

l_po_headerx-pur_group = c_x.

l_po_headerx-SALES_PERS = c_x.

l_po_headerx-SUPPL_PLNT = c_x .

l_po_headerx-langu = c_x.

l_po_headerx-doc_date = c_x.

*POPULATE ITEM DATA.

clear t_po_items.

t_po_items-po_item = v_poitem * 10.

t_po_items-material = SEQ_FILEH-matnr.

t_po_items-SHORT_TEXT = SEQ_FILEH-MAKTX.

t_po_items-plant = p_RESWK.

t_po_items-quantity = SEQ_FILEH-MENGE.

  • t_po_items-PO_UNIT = SEQ_FILEH-MEINS.

t_po_items-TRACKINGNO = SEQ_FILEH-BEDNR.

  • t_po_items-ACCTASSCAT = SEQ_FILEH-KNTTP.

  • t_po_items-ADMOI = SEQ_FILEH-ADMOI.

APPEND t_po_items.

*POPULATE ITEM FLAG TABLE

clear t_po_itemsx.

t_po_itemsx-po_item = v_poitem * 10.

t_po_itemsx-po_itemx = c_x.

t_po_itemsx-material = c_x.

t_po_itemsx-SHORT_TEXT = c_x.

t_po_itemsx-plant = c_x.

t_po_itemsx-quantity = c_x.

t_po_itemsx-PO_UNIT = c_x.

t_po_itemsx-TRACKINGNO = c_x.

t_po_itemsX-ACCTASSCAT = c_x.

t_po_itemsx-tax_code = c_x.

t_po_itemsX-item_cat = c_x.

  • t_po_items-ADMOI = c_x.

APPEND t_po_itemsx.

wait online

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 29, 2006 at 10:08 AM

    Do add document type in the header lever as well.

    Kind Regards

    Eswar

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.