Error in BAPI for ME21N
Hi,
I have developed a Z program for ME21N by using BAPI( BAPI_PO_CREATE1). When I executive it always shows
"Please enter items first. No instance of object type PurchaseOrder has been created. External reference: Document contains no items".
Would you suggest how can I solve this problem
Best Regards
Mahabub
Hi mahaboob,
Before creating Z program , first execute Function module itself in se37 by passing required parameters with help of functional consultant and if any errors occurs , functional consultant can easily idetifies and resolves it. After successfully execution, develop the Zprogram.
Place the parameters what you are passing , so that i can help you if you need.
Regards,
Ravi
Similar Messages
-
BAPI for ME21N with Material Configuration
Hi friends,
I need to create a Z Program which will create the purchase order and during creation of purchase order it will also make the configuration of material in Material Data. I know the BAPI name BAPI_PO_CREATE1, but it will not do the configuration in Material Data.
I have tryed the BDC but it is working for only one line item only.
Please suggest any suitable way for the solution.
Thanks in advance.
KrishanCan you explain what exactly you mean by Material Configuration?
BAPI_PO_CREATE1 is the right bapi for ME21N.
YOu cannot do a BDC on this tansaction as it is a SAP Enjoy transaction.
Regards,
ravi -
Error in BAPI for salary account posting
Dear Experts,
I am developing and report for salary account posting whrere i am using a bapi called BAPI_ACC_DOCUMENT_POSTING. Which require RFC destinetion of the target system where the document should post in its import parameters.But m not passing anything thr and its automatically taking an rfc destinatin.But while i try to run this report document is not posted and in its return table 2 error msgs comes
1. Error in document: BKPFF $ CLNTD11320
2. FI/COinterface: Line item entered several times
Pls provive me input if any one has come across this error.
ThanksLine item passed to the vendor and gl tables of the bapi cannot be same.ie. if vendor table contains 3 entry with line item 1,2,3 gl should contain line item starting from 4.Line item field cannbe field manually using a count variable.
-
Am doing and enhancement on transaction ME21N. Where I am validating a price based on the Purchase requisition.
I implemented the BADI YWVKU_DETERMINE_SP and in method GET_SALES_PRICE I used my code.
I created a custom message class in se91 to display the error message when we run me21n. I get a short dump as follows
The current application program detected a situation which really
should not occur. Therefore, a termination with a short dump was
triggered on purpose by the key word MESSAGE (type X).
Please assistThis is part of the dump
Error analysis
Short text of error message:
General system messages
Long text of error message:
Technical information about the message:
Message class....... "ME"
Number.............. 000
Variable 1.......... "Price cannot be greater than 10% of PR"
Variable 2.......... " "
Variable 3.......... " "
Variable 4.......... " "
How to correct the error
Probably the only way to eliminate the error is to correct the program.
If the error occures in a non-modified SAP program, you may be able to
find an interim solution in an SAP Note.
If you have access to SAP Notes, carry out a search with the following
keywords:
"MESSAGE_TYPE_X" " "
"SAPLMEPO" or "MM06EF0B_BUCHEN"
"BUCHEN"
If you cannot solve the problem yourself and want to send an error
notification to SAP, include the following information:
1. The description of the current problem (short dump)
To save the description, choose "System->List->Save->Local File
(Unconverted)".
2. Corresponding system log
Display the system log by calling transaction SM21.
Restrict the time interval to 10 minutes before and five minutes
after the short dump. Then choose "System->List->Save->Local File
(Unconverted)".
3. If the problem occurs in a problem of your own or a modified SAP -
Hi,
While using BAPI_INCOMINGINVOICE_CREATE to post an invoice with a purchase order (MIRO), we are getting the error message
"Balance not zero: 165.60 debits: 0.00 credits: 165.60".
Please help us to detect where the error is.
We are entering values in 'ITEMDATA', 'GLACCOUNTDATA' and 'HEADERDATA' segments.
In 'ITEMDATA', we are giving the debit_creditor indicator as 'S' and in 'GLACCOUNTDATA' we are giving the debit_creditor indicator as 'H'.
In both 'ITEMDATA' and 'GLACCOUNTDATA' we are providing the item amount as 165.60.
In header data we have not provided a value for 'GROSS_AMOUNT'. (Even if we provide value of '165.60' in header, we get a similiar error)
The PO has got onlly one line item.
This is a high priority issue. Please help.
Thanks,
JohnJohn,
I think we need to post debit and credit entries in the 'GLACCOUNTDATA' for the same amount.
Regards,
Kiran Bobbala -
Error thrown in BAPI for Customer Master
Hi,
When I execute the BAPI - BAPI_CUSTOMER_CREATEFROMDATA1 the following error will come.
Error
Invalid form of address text for customer
Please give me a solution for this.
and documentation also.
Thanks,
Suresh Maniarasu.*& Report ZBAPICUST_APPL
REPORT ZBAPICUST_APLL.
TABLES: BAPIKNA101_1,BAPIKNA102,BAPIKNA103,BAPIRETURN1.
DATA: F_STOP.
DATA: V_EMPTY TYPE I,V_TOTAL TYPE I.
DATA: PI_PERSONALDATA LIKE BAPIKNA101_1,
PI_COPYREFERENCE LIKE BAPIKNA102,
CUSTOMERNO LIKE BAPIKNA103,
RETURN LIKE BAPIRETURN1.
DATA: IT_INTERN TYPE ALSMEX_TABLINE OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF IT_KNA101_1 OCCURS 100.
INCLUDE STRUCTURE BAPIKNA101_1.
DATA: END OF IT_KNA101_1.
DATA: BEGIN OF IT_DATA OCCURS 100,
AD_TITLETX(30),
AD_NAMEFIR(40),
AD_NAMELAS(40),
AD_NAMEMID(40),
GBDAT(8),
REGIO(3),
AD_CITY1(40),
SPRAS(1),
AD_CITY2(40),
AD_PSTCD1(10),
AD_POBX(10),
AD_STREET(60),
AD_HSNM1(10),
AD_BLDNG(20),
AD_ROOMNUM(10),
LAND1(3),
AD_TITLE(4),
WAERS(5),
VKORG(4),
VTWEG(2),
SPART(2),
REFKUNNR(10),
KUNNR(10),
END OF IT_DATA.
SELECTION-SCREEN BEGIN OF BLOCK SCR1 WITH FRAME TITLE TEXT-111.
PARAMETER : P_FILE TYPE RLGRAP-FILENAME OBLIGATORY DEFAULT 'C:\Documents and Settings\Administrator\Desktop\MARCDESCRIPTION.XLS'.
PARAMETER : P_MAX(4) OBLIGATORY DEFAULT '100'.
PARAMETERS: P_HEADER TYPE I DEFAULT 0.
PARAMETERS: P_BEGCOL TYPE I DEFAULT 1 NO-DISPLAY,
P_BEGROW TYPE I DEFAULT 1 NO-DISPLAY,
P_ENDCOL TYPE I DEFAULT 100 NO-DISPLAY,
P_ENDROW TYPE I DEFAULT 32000 NO-DISPLAY.
SELECTION-SCREEN END OF BLOCK SCR1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
PERFORM VALIDATE_FILE USING P_FILE.
START-OF-SELECTION.
PERFORM CONVERT_XLS_ITAB.
IF NOT IT_DATA[] IS INITIAL.
PERFORM DELETE_HEADER_EMPTY_RECS.
ENDIF.
END-OF-SELECTION.
PERFORM UPLOAD_CUSTMAS.
*& Form VALIDATE_FILE
text
-->F_FILE text
FORM VALIDATE_FILE USING F_FILE TYPE RLGRAP-FILENAME.
DATA: ITAB TYPE TABLE OF STRING.
DATA: WA TYPE STRING.
OPEN DATASET P_FILE FOR INPUT IN TEXT MODE ENCODING DEFAULT .
IF SY-SUBRC = 0.
DO.
READ DATASET P_FILE INTO WA.
IF sy-subrc = 0.
EXIT.
ENDIF.
APPEND WA TO ITAB.
ENDDO.
ENDIF.
CLOSE DATASET P_FILE.
ENDFORM. "VALIDATE_FILE
*& Form CONVERT_XLS_ITAB
text
FORM CONVERT_XLS_ITAB.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
FILENAME = P_FILE
I_BEGIN_COL = P_BEGCOL
I_BEGIN_ROW = P_BEGROW
I_END_COL = P_ENDCOL
I_END_ROW = P_ENDROW
TABLES
INTERN = IT_INTERN
EXCEPTIONS
INCONSISTENT_PARAMETERS = 1
UPLOAD_OLE = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
PERFORM MOVE_DATA.
ENDFORM. "CONVERT_XLS_ITAB
*& Form MOVE_DATA
text
FORM MOVE_DATA.
DATA: LV_INDEX TYPE I.
field-symbols <FS>.
SORT IT_INTERN BY ROW COL.
CLEAR IT_INTERN.
LOOP AT IT_INTERN.
MOVE IT_INTERN-COL TO LV_INDEX.
ASSIGN COMPONENT LV_INDEX OF STRUCTURE IT_DATA TO <FS>.
MOVE IT_INTERN-VALUE TO <FS>.
AT END OF ROW.
APPEND IT_DATA.
CLEAR IT_DATA.
ENDAT.
ENDLOOP.
ENDFORM. "MOVE_DATA
*& Form DELETE_HEADER_EMPTY_RECS
text
FORM DELETE_HEADER_EMPTY_RECS.
DATA:LV_TABIX LIKE SY-TABIX.
IF NOT p_header IS INITIAL.
LOOP AT IT_DATA.
IF P_HEADER > 0 AND NOT IT_DATA IS INITIAL.
DELETE IT_DATA FROM 1 TO P_HEADER.
EXIT.
ENDIF.
ENDLOOP.
ENDIF.
CLEAR IT_DATA.
LOOP AT IT_DATA.
LV_TABIX = SY-TABIX.
IF IT_DATA IS INITIAL.
V_EMPTY = V_EMPTY + 1.
DELETE IT_DATA INDEX LV_TABIX.
ENDIF.
ENDLOOP.
CLEAR IT_DATA.
DESCRIBE TABLE IT_DATA LINES V_TOTAL.
IF V_TOTAL = 0.
F_STOP = 'X'.
STOP.
ENDIF.
ENDFORM. "DELETE_HEADER_EMPTY_RECS
*& Form UPLOAD_CUSTMAS
text
FORM UPLOAD_CUSTMAS.
LOOP AT IT_DATA.
PI_PERSONALDATA-TITLE_P = IT_DATA-AD_TITLETX.
PI_PERSONALDATA-FIRSTNAME = IT_DATA-AD_NAMEFIR.
PI_PERSONALDATA-LASTNAME = IT_DATA-AD_NAMELAS.
PI_PERSONALDATA-MIDDLENAME = IT_DATA-AD_NAMEMID.
Pi_personaldata-date_birth = IT_DATA-GBDAT.
PI_PERSONALDATA-REGION = IT_DATA-REGIO.
PI_PERSONALDATA-CITY = IT_DATA-AD_CITY1.
PI_PERSONALDATA-LANGU_P = IT_DATA-SPRAS.
PI_PERSONALDATA-DISTRICT = IT_DATA-AD_CITY2.
PI_PERSONALDATA-POSTL_COD1 = IT_DATA-AD_PSTCD1.
PI_PERSONALDATA-PO_BOX = IT_DATA-AD_POBX.
PI_PERSONALDATA-STREET = IT_DATA-AD_STREET.
PI_PERSONALDATA-HOUSE_NO = IT_DATA-AD_HSNM1.
PI_PERSONALDATA-BUILDING = IT_DATA-AD_BLDNG.
PI_PERSONALDATA-ROOM_NO = IT_DATA-AD_ROOMNUM.
Pi_personaldata-country = IT_DATA-LAND1.
Pi_personaldata-title_key = IT_DATA-AD_TITLE.
PI_PERSONALDATA-CURRENCY = IT_DATA-WAERS.
PI_COPYREFERENCE-SALESORG = IT_DATA-VKORG.
PI_COPYREFERENCE-DISTR_CHAN = IT_DATA-VTWEG.
PI_COPYREFERENCE-DIVISION = IT_DATA-SPART.
PI_COPYREFERENCE-REF_CUSTMR = IT_DATA-REFKUNNR.
CUSTOMERNO-CUSTOMER = IT_DATA-KUNNR.
CALL FUNCTION 'BAPI_CUSTOMER_CREATEFROMDATA1'
EXPORTING
PI_PERSONALDATA = BAPIKNA101_1
PI_OPT_PERSONALDATA =
PI_COMPANYDATA =
PI_OPT_COMPANYDATA =
PI_CONSUMEREN =
PI_COPYREFERENCE = BAPIKNA102
PI_CREDIT_CONTROL_FLAG =
IMPORTING
CUSTOMERNO = BAPIKNA103
RETURN = BAPIRETURN1
IF RETURN-TYPE = 'E'.
WRITE:/ 'ERROR' ,RETURN-MESSAGE,'FOR CUSTOMER' ,IT_DATA-KUNNR.
ELSEIF RETURN-TYPE = 'S'.
WRITE:'SUCCESFULLY CREATED CUSTOMER', IT_DATA-KUNNR.
ENDIF.
ENDLOOP.
ENDFORM. "UPLOAD_CUSTMAS
thanks & regards,
Suresh Maniarasu -
Error in open_form for document in ME21n Transaction for pring preview
Hi,
While creating a PO using ME21N. Ifi click on Print Preview Button,the following error is coming "<b>Error in OPEN_FORM for document *********** "</b>This PO output type is "Fax".
This only happens for output type "Fax". For Output type "Print", preview works fine.
Same program is used for fax and print in configuration(NACE).
Please help me out in this.
Regards,
KishoreHi Krishna,
It is possible to check the print preview of the document with FAX as output.
Please put a break-point in your progarm and check it. -
Error in ecatt testing for me21n transaction.
Hi All,
I have created Test script, test data container and Test configuration for ME21N (create purchase order) transaction
While executing test configuration, I got below error message.
S00349 Field COBL-KOSTL. does not exist in the screen SAPLMEGUI 0014
Please help me for further action.
Many thanks
VikasHi Vikas,
Before running the test configuration, Please check ME21N transaction manually and find out the field
COBL-KOSTL and check whether it is mandatory or not.
If it found check your script whether that field is properly recorded or not.
May be this field is newly added as mandatory for that transaction
Regards,
Santosh.
Edited by: ABAP Santosh on Oct 19, 2009 9:17 AM -
Reg bapi for creation of purchase order
hai to all,
i have to upload purchase orders from legacy file to R/3 system
certain order having more than 50 line items
so please any one send me <b>stardard bapi program or bdc program for me21n</b> transaction which will suitable for my senario.
please send asap
regards
vijayhai
i am trying to create po using bapi
the following code explains
constants : c_x value 'X'.
data: del_date type sy-datum.
data: pohead type bapimepoheader.
data: poheadx type bapimepoheaderx.
data: exp_head type bapimepoheader.
data: t_return_out type table of bapiret2 with header line,
wa_return_out TYPE bapiret2.
data: poitem type table of bapimepoitem with header line.
data: poitemx type table of bapimepoitemx with header line.
data: posched type table of bapimeposchedule with header line.
data: poschedx type table of bapimeposchedulx with header line.
data: ex_po_number type bapimepoheader-po_number.
Header Level Data
pohead-comp_code = '1011'.
pohead-doc_type = 'NB' .
pohead-creat_date = sy-datum .
pohead-vendor = 'A1138'.
pohead-purch_org = 'DOMS'.
pohead-pur_group = 'MFR'.
pohead-langu = sy-langu .
pohead-doc_date = sy-datum.
poheadx-comp_code = c_x.
poheadx-doc_type = c_x.
poheadx-creat_date = c_x.
poheadx-vendor = c_x.
poheadx-langu = c_x.
poheadx-purch_org = c_x.
poheadx-pur_group = c_x.
poheadx-doc_date = c_x.
Item Level Data
poitem-po_item = 1.
poitem-material = '000000000100001079'.
poitem-plant = 'HO01'.
poitem-stge_loc = ''.
poitem-quantity = 1.
append poitem.
poitemx-po_item = 1.
poitemx-po_itemx = c_x.
poitemx-material = c_x.
poitemx-plant = c_x .
poitemx-stge_loc = c_x .
poitemx-quantity = c_x .
poitemx-tax_code = c_x .
poitemx-item_cat = c_x .
poitemx-acctasscat = c_x .
append poitemx.
Schedule Line Level Data
posched-po_item = 1.
posched-sched_line = 1.
posched-del_datcat_ext = 'D'.
del_date = sy-datum + 1.
write del_date to posched-delivery_date.
posched-deliv_time = '000001'.
posched-quantity = 1.
append posched.
poschedx-po_item = 1.
poschedx-sched_line = 1.
poschedx-po_itemx = c_x.
poschedx-sched_linex = c_x.
poschedx-del_datcat_ext = c_x.
poschedx-delivery_date = c_x.
poschedx-quantity = c_x.
append poschedx.
call function 'BAPI_PO_CREATE1'
EXPORTING
poheader = pohead
poheaderx = poheadx
testrun = ' '
IMPORTING
exppurchaseorder = ex_po_number
expheader = exp_head
TABLES
return = t_return_out
poitem = poitem
poitemx = poitemx.
poschedule = posched
poschedulex = poschedx.
call function 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
if not ex_po_number is initial.
call function 'DEQUEUE_ALL'.
else.
call function 'DEQUEUE_ALL'.
message i036.
endif.
**endform. " create_po
IF ex_po_number IS NOT INITIAL.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
PERFORM show_result.
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
PERFORM show_result.
ENDIF.
*& Form show_result
text
--> p1 text
<-- p2 text
FORM show_result .
LOOP AT t_return_out INTO wa_return_out.
write : ex_po_number.
WRITE : / wa_return_out-type,
/ wa_return_out-id,
/ wa_return_out-number,
/ wa_return_out-message,
/ wa_return_out-log_no,
/ wa_return_out-log_msg_no,
/ wa_return_out-message_v1,
/ wa_return_out-message_v2,
/ wa_return_out-message_v3,
/ wa_return_out-message_v4,
/ wa_return_out-parameter,
/ wa_return_out-row,
/ wa_return_out-field,
/ wa_return_out-system.
ENDLOOP.
<b>iam geting the error such that</b>
E
BAPI
001
No instance of object type PurchaseOrder has been created. External reference:
000000
PurchaseOrder
POHEADER
1
E
ME
062
Account assignment mandatory for material 100001079 (enter acc. ***. cat.)
000000
100001079
POITEM
<b>how to correct this error</b>
regards
vijay -
Net Price showing zero while using BAPI_PO_CREATE1 for me21n
Dear All,
I am using BAPI_PO_CREATE1 for ME21N. The problem is, after execution of the program the error msg it shows-
No instance of object type PurchaseOrder has been created. External reference:
Purchase order still contains faulty items
Net price must be greater than 0
The values are coming from excel file.
Please tell me where I am doing wrong.
With regards,
Rosaline.Hi,
Symptom
You create a purchase order with BAPI_PO_CREATE1 or you add an item to an existing purchase order with BAPI_PO_CHANGE. You assign a value in field POITEM-NET_PRICE. However, this value is not transferred. If it was not possible for you to determine any conditions, the system generated the error message 06218 'Net price must be greater than 0'.
Other terms
BAPI_PO_CREATE1, BAPI_PO_CHANGE, price, net price, gross price, conditions, price determination, condition type, 06218, EKPO-NETPR, NETPR, POITEM-NET_PRICE, NET_PRICE, PO_PRICE, BAPI_PO_PRICE, BUS2012, PurchaseOrder.CreateFromData1, CreateFromData1, PurchaeOrder.Change
Reason and Prerequisites
This function has not been available up to now. You could also assign conditions via the condition tables.
Read also Notes 399791, 428621, 529287, 578253 and 539950 for this.
Solution
The present note adds field PO_PRICE to table POITEM. PO_PRICE can have the values ' ', '1' or '2' with the following meaning:
PO_PRICE = ' ': The price determination is carried out as before.
PO_PRICE = '1': The value assigned in field NET_PRICE is transferred as a gross price, that is it is set in the condition type that is defined as a base price in the calculation schema. All other condition types remain unchanged. No conditions are copied from the last document.
PO_PRICE = '2': The value assigned in field NET_PRICE is transferred as a net price, that is it is set in the condition type that is defined as base price in the calculation scheme. All other condition types are deleted.
Note the following
The following restrictions apply to field PO_PRICE:
If you assign conditions via the BAPI interface, these are always transferred. This is carried out independently of the value that you assign in field PO_PRICE.
If you add a new item to a purchase order with BAPI_PO_CHANGE, it does not suffice to fill field POITEM-NET_PRICE on item level. The corresponding currency must be specified explicitly on header level.
You can only use field PO_PRICE during the creation of a purchase order item. If you want to change the price of an already existing item, you can only do this via the conditions.
If you fill field POITEM-PO_PRICE, you must enter an 'X' in POITEMX-PO_PRICE so that the value is transferred.
Correction
The correction is made available via R/3 support package. If you want to implement the note manually, proceed as follows:
1. Make sure that your system contains Notes 494759, 552189 and 578253.
2. Create data type BAPI_PO_PRICE with the following attributes:
Short text:
Price transfer indicator: 1 = gross, 2 = net
Package: ME
Domain: BPUEB
3. Extend structure BAPIMEPOITEM (directly after NO_ROUNDING):
Component: PO_PRICE
Component type: BAPI_PO_PRICE
4. Extend structure BAPIMEPOITEMX (directly after NO_ROUNDING):
Component: PO_PRICE
Component type: BAPIUPDATE
5. Extend structure MEPOITEM_DATA (directly after NO_ROUNDING):
Component: PO_PRICE
Component type: BAPI_PO_PRICE
6. Extend structure MEPOITEM_DATAX (directly after NO_ROUNDING):
Component: PO_PRICE
Component type: BAPIUPDATE
7. Implement the correction instructions in your system.
regards,
Ravi
Edited by: Parupelly on Dec 14, 2011 1:30 PM -
IDOC/BAPI for Production order creation from Legacy system
Hi all
We are using an interface to create Production orders from legacy to SAP. Would you recommend an IDOC or a BAPI to create Production orders. If IDOC or BAPI then could you please mention which one?
thanks a bunchHi John,
For your purposes, please use BAPI for production order creation from legacy system. There is no standard inbound IDoc available to use. SAP has an IDoc for outbound interface only (message type LOIPRO).
If there is an inbound IDoc available, I would recommend to use an IDoc.
IDoc technology has excellent error handling and will allow you to reprocess an error (if any).
BAPI is also good approach to use and fast in term of processing.
For BAPI approach, you can use BAPI BAPI_PRODORD_CREATE.
Hope this will help.
Regards,
Ferry Lianto -
Help Rgd. BAPI for Creation of Inbound delivery Document
Hi all,
I need a Bapi to create inbound delivery document without using PO reference. I have seen the below BAPIs. i) BAPI_IBDLV_CREATE_FROM_OBDLV,
ii) BAPI_GOODSMVT_CREATE. I am not sure whether they are for creating inbound delivery document without using PO reference.
It will be of great use if anyone can give me the BAPI for the purpose and the mandatory parameters or sample test data for the BAPI.
Thanks in Advance,
Rakesh.If you create the inbound delivery->check the purchase order in the tabstrip "Confirmations" on item level. There are three fields: "Confirmation control key", "Order acknowl." and "acknowl. required".
Ckeck if there is a value in "confirmation control key".
You should get the same error if you try to create VL31N in dialog mode, not only by using the bapi.
Rgds,
JP -
How to Use PM BAPI for equipment Master upload : BAPI_EQUIPMENT_SAVEREPLICA
Hi ,
How to use PM BAPI for equipment Master upload : BAPI_EQUIPMENT_SAVEREPLICA.
May i know what are the input parameters & fields mandatory
for each Table structures ct_data , ct_datax , it_descript , it_longtext.
Can any one explain me Step by Step Process.
B'cos i tried with below code. Equipment is not getting created.
wa_itab-equipment_ext = '000000000100000001'.
wa_itab-descript = 'Test 2 -> Lube Oil Pump'.
wa_itab-text_language = 'EN'.
wa_itab-sdescript = 'Short Description'.
APPEND wa_itab TO it_itab.
CLEAR wa_itab.
LOOP AT it_itab INTO wa_itab.
ct_data-ta_guid = '000000000000000001'.
ct_data-equipment_ext = wa_itab-equipment_ext.
ct_data-descript = wa_itab-descript .
ct_data-valid_date = sy-datum.
ct_data-equicatgry = 'M'.
APPEND ct_data.
CLEAR ct_data.
ct_datax-ta_guid = '000000000000000001'.
ct_datax-equipment_ext = 'X'.
ct_datax-equipment = 'X'.
APPEND ct_datax.
CLEAR ct_datax.
it_descript-ta_guid = '000000000000000001'.
it_descript-text_language = wa_itab-text_language.
it_descript-descript = wa_itab-sdescript .
APPEND it_descript.
CLEAR it_descript.
it_longtext-ta_guid = '000000000000000001'.
it_longtext-text_language = wa_itab-text_language.
it_longtext-text_id = 'LTXT'.
it_longtext-text_line = 'SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS'.
APPEND it_longtext.
CLEAR it_longtext.
it_longtext-ta_guid = '000000000000000001'.
it_longtext-text_language = wa_itab-text_language.
it_longtext-text_id = 'INTV'.
it_longtext-text_line = 'aaaaaaaaaaaaaaa'.
APPEND it_longtext.
CLEAR it_longtext.
it_longtext-ta_guid = '000000000000000001'.
it_longtext-text_language = wa_itab-text_language.
it_longtext-text_id = 'INTV'.
it_longtext-text_line = 'bbbbbbbbbbbb'.
APPEND it_longtext.
CLEAR it_longtext.
it_longtext-ta_guid = '000000000000000001'.
it_longtext-text_language = wa_itab-text_language.
it_longtext-text_id = 'INTV'.
it_longtext-text_line = 'cccccccccccccccc'.
APPEND it_longtext.
CLEAR it_longtext.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
call BAPI-function in this system
CALL FUNCTION 'BAPI_EQUIPMENT_SAVEREPLICA'
TABLES
ct_data = ct_data
ct_datax = ct_datax
it_descript = it_descript
it_longtext = it_longtext
return = return
EXCEPTIONS
OTHERS = 1.
IF sy-subrc = 0.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
WRITE : 'Successful'.
ENDIF.
IF NOT return IS INITIAL.
LOOP AT return.
IF return-type = 'A' OR return-type = 'E'.
WRITE : 'Error'.
ENDIF.
ENDLOOP.
ENDIF.
REFRESH return.
ENDLOOP.
Regards
SUrendarHi ,
How to use PM BAPI for equipment Master upload : BAPI_EQUIPMENT_SAVEREPLICA.
May i know what are the input parameters & fields mandatory
for each Table structures ct_data , ct_datax , it_descript , it_longtext.
Can any one explain me Step by Step Process.
B'cos i tried with below code. Equipment is not getting created.
wa_itab-equipment_ext = '000000000100000001'.
wa_itab-descript = 'Test 2 -> Lube Oil Pump'.
wa_itab-text_language = 'EN'.
wa_itab-sdescript = 'Short Description'.
APPEND wa_itab TO it_itab.
CLEAR wa_itab.
LOOP AT it_itab INTO wa_itab.
ct_data-ta_guid = '000000000000000001'.
ct_data-equipment_ext = wa_itab-equipment_ext.
ct_data-descript = wa_itab-descript .
ct_data-valid_date = sy-datum.
ct_data-equicatgry = 'M'.
APPEND ct_data.
CLEAR ct_data.
ct_datax-ta_guid = '000000000000000001'.
ct_datax-equipment_ext = 'X'.
ct_datax-equipment = 'X'.
APPEND ct_datax.
CLEAR ct_datax.
it_descript-ta_guid = '000000000000000001'.
it_descript-text_language = wa_itab-text_language.
it_descript-descript = wa_itab-sdescript .
APPEND it_descript.
CLEAR it_descript.
it_longtext-ta_guid = '000000000000000001'.
it_longtext-text_language = wa_itab-text_language.
it_longtext-text_id = 'LTXT'.
it_longtext-text_line = 'SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS'.
APPEND it_longtext.
CLEAR it_longtext.
it_longtext-ta_guid = '000000000000000001'.
it_longtext-text_language = wa_itab-text_language.
it_longtext-text_id = 'INTV'.
it_longtext-text_line = 'aaaaaaaaaaaaaaa'.
APPEND it_longtext.
CLEAR it_longtext.
it_longtext-ta_guid = '000000000000000001'.
it_longtext-text_language = wa_itab-text_language.
it_longtext-text_id = 'INTV'.
it_longtext-text_line = 'bbbbbbbbbbbb'.
APPEND it_longtext.
CLEAR it_longtext.
it_longtext-ta_guid = '000000000000000001'.
it_longtext-text_language = wa_itab-text_language.
it_longtext-text_id = 'INTV'.
it_longtext-text_line = 'cccccccccccccccc'.
APPEND it_longtext.
CLEAR it_longtext.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
call BAPI-function in this system
CALL FUNCTION 'BAPI_EQUIPMENT_SAVEREPLICA'
TABLES
ct_data = ct_data
ct_datax = ct_datax
it_descript = it_descript
it_longtext = it_longtext
return = return
EXCEPTIONS
OTHERS = 1.
IF sy-subrc = 0.
CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
WRITE : 'Successful'.
ENDIF.
IF NOT return IS INITIAL.
LOOP AT return.
IF return-type = 'A' OR return-type = 'E'.
WRITE : 'Error'.
ENDIF.
ENDLOOP.
ENDIF.
REFRESH return.
ENDLOOP.
Regards
SUrendar -
Problem in creating a bapi for bom
hai all,
i am trying to create a bapi for bom using csap_mat_bom_create, but it am getting sy-subrc value as 1.
and displaying error message as the function module name itself.
is there any solution dor it.Hello,
Try to use that bapi :
BAPI_MATERIAL_BOM_GROUP_CREATE
Thierry -
Error in BAPI while creating incoming invoice
Hi Experts,
Im creating incoming invoice by using the BAPI, 'BAPI_INCOMINGINVOICE_CREATE'.
when im going to posting my invoice it is showing the error like 'EDI: Error in customizing for differential invoicing'.it is a urgent requirement and need to solve this ASAP.Pls help me out with this error
Im passing following parameters to BAPI:
wa_header-invoice_ind = 'X'.
wa_header-doc_date = sy-datum. "Enter the document date
wa_header-pstng_date = sy-datum . "Enter the posting date
* wa_header-ref_doc_no = '5000008590'.
wa_header-comp_code = '1000'.
*wa_header-gross_amount = '50.11'. "Enter the gross amount(aft. tax) for the invoice
*wa_header-calc_tax_ind = 'X'.
wa_header-currency = 'INR'.
wa_header-INV_TRAN = 'X'.
wa_header-SIMULATION = 'X'.
wa_item-invoice_doc_item = '000001'.
wa_item-po_number = '3700000557'. "Enter the PO number
wa_item-po_item = '00010'. "Enter the PO item number
* wa_item-ref_doc = '5000008590'. "Enter the GR number
* wa_item-ref_doc_year = '2014'. "Enter the GR fiscal year
* wa_item-ref_doc_it = '0001'. "Enter the GR item number
* wa_item-tax_code = 'V0'. "Enter the tax code applicable
wa_item-item_amount = '50.60'. "Enter the item amount
* wa_item-quantity = '2380'. "Enter the invoice quantity
* wa_item-po_unit = 'EA'. "Enter the UoM
APPEND wa_item TO it_item.
CALL FUNCTION 'BAPI_INCOMINGINVOICE_CREATE'
EXPORTING
headerdata = wa_header
* * ADDRESSDATA =
IMPORTING
invoicedocnumber = g_invno
fiscalyear = g_fyear
TABLES
itemdata = it_item
* * ACCOUNTINGDATA =
* * GLACCOUNTDATA =
* * MATERIALDATA =
* * TAXDATA =
* * WITHTAXDATA =
* * VENDORITEMSPLITDATA =
return = it_ret
* * EXTENSIONIN =
IF g_invno IS NOT INITIAL.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
* * IMPORTING
* * RETURN =Thanks every one for your valuable solutions.
Issue is Solved by unchecking the flag.
wa_header-INV_TRAN = 'X'.
Thanks & Regards,
Ramjee.
Maybe you are looking for
-
How to restore mail and address book?
I recently had to reformat my hard drive and I had backed up my entire home directory. I would like to either restore everything in these two programs, or consolidate the data with that on another computer. Where do I find the files? I assumed it wou
-
BADI MD_PIR_FLEX_CONS not working
Hi, We want the Stock transfport order to consume the PIRs. For this purpose we implemented the BADI MD_PIR_FLEX_CONS. But its just working for all SD docuements and not MM documents like Purchase req rel, Planned order rel and Stock transport orders
-
Imap authentication fail error - cannot email pdf
!I installed acrobat XI about 6 months ago and still have not been able to figure out how to get it to send a pdf other than closing it. Copying it from file location and then posting in an amail. HIGHLY ANNOYING!!! When i try send directly from open
-
In addition, I've tried to repair, and even did a system restore, thinking that could help. Its the first time this has happened...
-
Flash MX to Flash 8 bug??
Hello. I am trying to update a file (~5 MB) built in Flash MX using Flash 8. Everything works fine with the file until I open the actionscript window. The file totally slows down to the point the hour glass shows up everytime I pick an object in the