Create a work order using the BAPI for IW31
Hi,
I want to create a work order using the BAPI for IW31 tr. can any one help me with the program description.
Full points will be awarded for the useful answers.
Thanks and regards,
Sunil
hi,
first use fm "bapi_po_create".
then use fm "BAPI_ACC_GL_POSTING_POST"
The demo environment was made with real business scenario in mind, but following subjects need to be addressed in a live implementation:
No exceptions and error handling is implemented, except the order rejection (e.g. partly delivery);
In Navision both XML Ports and the XML DOM has been used to integrate with SAP XI, because XML ports has some drawbacks regarding to Namespaces in XML Documents (mandatory in SAP XI);
A minimum of SAP and Navision customization is required to implement this solution. (e.g. user exit in SAP, Navision XML DOM).
Similar Messages
-
Create a Purchase order using the BAPI using the data in the XML file.
Hello Gurus,
here is the scenario can anyone help me how to proceed explaining the procedure?
Create a Purchase order using the BAPI using the data in the XML file.
comprehensive explanations are appreciated.
thanks in advance.hi,
first use fm "bapi_po_create".
then use fm "BAPI_ACC_GL_POSTING_POST"
The demo environment was made with real business scenario in mind, but following subjects need to be addressed in a live implementation:
No exceptions and error handling is implemented, except the order rejection (e.g. partly delivery);
In Navision both XML Ports and the XML DOM has been used to integrate with SAP XI, because XML ports has some drawbacks regarding to Namespaces in XML Documents (mandatory in SAP XI);
A minimum of SAP and Navision customization is required to implement this solution. (e.g. user exit in SAP, Navision XML DOM). -
On Work Order using Object lists for equip u can manually create Notifi
On a maintenance Work Order using Object lists for equipment you can manually create a notification for each line item.
We want to automate this process to do this when we save the document.
Any ideau2019s on how to do this?
Does a user exit exist for this?Hi:
Check with Tcode: IBIP - Plant maintenace batch input utility tool.
Hope, it may help!
Thanks,
Murali. -
How to delete an operation from order using the bapi
Can somebody please tell me how to delete an operation from order using the bapi
BAPI_ALM_ORDER_MAINTAIN.
Following was the test data for the BAPI.
000000 OPERATION DELETE 0000040052810070
000000 SAVE 0000040052810070
Even I tried entering the operation table. The BAPI control ends fine, but when I check the order using IW32, the operation still exists.
So, can you please tell me where Iam going wrong.Hi Subash Mohanvel,
Check bapireturn parameter of the bapi BAPI_ALM_ORDER_MAINTAIN after execution of the code , and if there is no error message in the return table then call bapi_Transaction_commit.
Unless you call this database saving of the records/values will not get reflected in the system.
Hope that helps.
Regards
Kapadia
***Assigning points is the way to say thanks in SDN.*** -
Once I create a html5 animation using the 'Toolkit for CreateJS' in flash, how do I then insert it into a webpage via Dreamweaver:
This has been sending me round in circles for over a week - can anyone let me know how I do this or can they point me in the direction of a tutorial? Thank you in advance - d;-)There are some tutorials on Adobe site:
<http://www.adobe.com/devnet/createjs/articles/getting-started.html>
<http://tv.adobe.com/watch/adc-presents/toolkit-for-createjs-part-1-designing-game-assets/>
<http://tv.adobe.com/watch/adc-presents/toolkit-for-createjs-part-2-adding-game-interactivi ty/>
The parts 1 and 2 are videos about 10 minutes each while the first link is a detailed article that you can print and practice on your machine.
Hope this helps. -
Creating the Sales Order using the bapi BAPI_SALESORDER_CREATEFROMDAT2
Hi,
My problem is , i have created one module pool program for accelerating the Sales Order creation.
I am using the bapi BAPI_SALESORDER_CREATEFROMDAT2 for sales order creation. After executing the program
bapi is given an errot that, incomplete sales order document is saved.
Can any body tell me plz what are the necessary fields i need to take in the header and item level , so that the complete
document will be saved through BAPI.
<removed_by_moderator>
Thanks
Edited by: Julius Bussche on Jan 11, 2010 12:09 PMTABLES: VBAK, "Sales Document: Header Data
VBAP. "Sales Document: Item Data
*************************************WORK AREA DECELERATION************************
DATA: BEGIN OF WA_HEADER,
LI TYPE I, "LINE TYPE
AUART TYPE VBAK-AUART, "Sales Document Type
VKORG TYPE VBAK-VKORG, "Sales Organization
VTWEG TYPE VBAK-VTWEG, "Distribution Channel
SPART TYPE VBAK-SPART, "Division
KUNNR TYPE BAPIPARNR-PARTN_NUMB, "Customer number
END OF WA_HEADER.
DATA: BEGIN OF WA_ITEM,
LI TYPE I,
MATNR TYPE VBAP-MATNR, "MATERIAL NUMBER
ZMENG TYPE VBAP-ZMENG, "QUANTITY
END OF WA_ITEM.
***********************************INTERNAL TABLE DECELERATION***************************************
DATA: IT_HEADER LIKE TABLE OF WA_HEADER WITH HEADER LINE. "IT FOR HEADER
DATA: IT_ITEM LIKE TABLE OF WA_ITEM WITH HEADER LINE. "IT FOR ITEM
DATA: IT LIKE VBAK OCCURS 0 WITH HEADER LINE.
***************************SALES ORDER INTERNAL TABLE DECELERATION********************************
DATA:
HEADER TYPE TABLE OF BAPISDHEAD WITH HEADER LINE, "SALES HEADER DATA
ITEMS TYPE TABLE OF BAPIITEMIN WITH HEADER LINE, "SALES ITEM DATA
PARTNERS TYPE TABLE OF BAPIPARTNR WITH HEADER LINE. "SALLES PARTNERS
***********************************DYNAMIC FIEL PATH GETTING DECELERATION************************
DATA : HL_FIELD_NAME TYPE DYNPREAD-FIELDNAME VALUE 'G_P_SPATH', "SCREEN FIELD NAME
HL_FILE_NAME TYPE IBIPPARMS-PATH VALUE 'G_P_SPATH', "Local file for upload/download
IL_FIELD_NAME TYPE DYNPREAD-FIELDNAME VALUE 'G_P_EPATH', "SCREEN FIELD NAME
IL_FILE_NAME TYPE IBIPPARMS-PATH VALUE 'G_P_EPATH', "Local file for upload/download
FL_FIELD_NAME TYPE DYNPREAD-FIELDNAME VALUE 'G_P_EPATH', "SCREEN FIELD NAME
FL_FILE_NAME TYPE IBIPPARMS-PATH VALUE 'G_P_EPATH'. "Local file for upload/download
DATA : CTR TYPE I .
DATA : CTR2 TYPE STRING.
DATA : CTR1 TYPE STRING.
Sales document number
DATA : L_VBELN LIKE BAPIVBELN-VBELN.
SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME TITLE T1.
SELECTION-SCREEN : SKIP.
PARAMETER : P_HPATH TYPE STRING.
PARAMETER : P_IPATH TYPE STRING.
SELECTION-SCREEN : SKIP.
SELECTION-SCREEN : END OF BLOCK B1.
SELECTION-SCREEN : BEGIN OF BLOCK B2 WITH FRAME TITLE T2.
SELECTION-SCREEN : SKIP.
SELECTION-SCREEN : BEGIN OF LINE.
SELECTION-SCREEN : PUSHBUTTON 10(14) UPLOAD USER-COMMAND CLICK1.
SELECTION-SCREEN : END OF LINE.
SELECTION-SCREEN END OF BLOCK B2.
******************************************INITIALIZATION.***************************************************
INITIALIZATION.
T1 = 'Putchase Order Source File Path'.
T2 = 'Push Button'.
UPLOAD = 'Upload'.
*******************************************AT SELECTION SCREE EVENT********************************************
AT SELECTION-SCREEN.
CASE SY-UCOMM.
WHEN 'CLICK1'.
IF P_HPATH IS INITIAL AND P_IPATH IS INITIAL. "CHECKING BTHE THE TEXT BOX
MESSAGE I009.
ELSE.
PERFORM SELECT. "CALLING THE SELECT SUBROUTINE
ENDIF.
WHEN OTHERS.
MESSAGE 'PRESS FORM BUTTON' TYPE 'I'. "WHEN EXECUTE BUTTON IS PRESSED
ENDCASE.
***********************************GETTING HEADER FIEL PATH*******************************************
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_HPATH.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = HL_FIELD_NAME
IMPORTING
FILE_NAME = HL_FILE_NAME.
P_HPATH = HL_FILE_NAME.
***********************************GETTING ITEM FIEL PATH*******************************************
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_IPATH.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = IL_FIELD_NAME
IMPORTING
FILE_NAME = IL_FILE_NAME.
P_IPATH = IL_FILE_NAME.
START-OF-SELECTION.
*& Form SELECT
text
--> p1 text
<-- p2 text
FORM SELECT .
CALL FUNCTION 'GUI_UPLOAD' " function resposible to get the local flat
EXPORTING " and upload it in a internal table
FILENAME = P_HPATH
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = '#'
TABLES
DATA_TAB = IT_HEADER.
CALL FUNCTION 'GUI_UPLOAD' " function resposible to get the local flat
EXPORTING " and upload it in a internal table
FILENAME = P_IPATH
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = '#'
TABLES
DATA_TAB = IT_ITEM.
LOOP AT IT_HEADER.
Initialize Header values
HEADER-DOC_TYPE = IT_HEADER-AUART.
HEADER-SALES_ORG = IT_HEADER-VKORG.
HEADER-DISTR_CHAN = IT_HEADER-VTWEG.
HEADER-DIVISION = IT_HEADER-SPART.
APPEND HEADER.
PARTNERS-PARTN_ROLE = 'WE'.
PARTNERS-PARTN_NUMB = IT_HEADER-KUNNR.
APPEND PARTNERS.
CTR = 10.
LOOP AT IT_ITEM WHERE LI = IT_HEADER-LI.
CTR2 = CTR.
CONCATENATE '0000' CTR2 INTO CTR1.
***Initialize Item values
ITEMS-ITM_NUMBER = IT_ITEM-ITEM.
ITEMS-ITM_NUMBER = CTR1.
ITEMS-MATERIAL = IT_ITEM-MATNR.
ITEMS-REQ_QTY = IT_ITEM-ZMENG.
APPEND ITEMS.
CTR = CTR + 10.
ENDLOOP.
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT1'
EXPORTING
ORDER_HEADER_IN = HEADER "SALES HEADER DATA
IMPORTING
SALESDOCUMENT = L_VBELN "RETRIEVED SALES DOCUMENT NUMBER
TABLES
ORDER_ITEMS_IN = ITEMS "SALES ITEM LEVEL DATA
ORDER_PARTNERS = PARTNERS. "SAKES PARTNERS
APPEND L_VBELN TO IT.
COMMIT WORK AND WAIT.
CLEAR : HEADER , ITEMS[] ,PARTNERS,CTR,CTR1,CTR2.
REFRESH : ITEMS.
ENDLOOP.
IF IT[] IS NOT INITIAL.
LOOP AT IT.
WRITE: / 'SALES ORDER', IT-VBELN , 'CREATED'.
ENDLOOP.
LEAVE TO LIST-PROCESSING.
SET PF-STATUS SPACE.
ELSE.
MESSAGE I044.
ENDIF .
ENDFORM. " SELECT -
How to create multiple Purchase Order using the same document number?
HI Friends,
I m in a product which extracts data from SAP and stored in Access database.
For that,while i extracting Purchase Order from the Demo Database (SBODemo_US)for OEC Computers,the same DocNum is used for several Purchase Order using Index Line numbers.
eg:
DocNum for Purchase Order1 -->3000 0 (Index)
DocNum for Purchase Order2 -->3000 1 (Index)
But i can't create multiple Purchase Order using same DocNum manually in SAP B1,Could anybody please help me <b>to create a Purchase Order using same DocumentNumber?</b>
Thanks in Advance
SooriyaKala.PHi,
The problem statement is not quite clear to me.
As far as I understand your statement, I think you want to club multiple orders into one purchase order using the index incrementally.
For this I think once you have created the first purchase order, open the purchase order in edit mode the second time and append the new line items.
If I am getting you wrong please explain the problem statement in more detail.
Regards,
Rara. -
Unable to calculate the price using the bapi BAPI_SALESDOCU_CREATEFROMDATA
hi guys,
i am able to create a sales order using the bapi BAPI_SALESDOCU_CREATEFROMDATA1' .
the problem is that we are unable to calculate the price the amount column in the sales order is showing 00000 even though the condition has been taken from condition master.
thanks.
Edited by: nishant patel on Jul 21, 2008 9:59 AM
Edited by: nishant patel on Jul 21, 2008 10:00 AMHi,
You need not pass the condition records for filling the pricing records in the sales order. The functional consultant will maintain all the necessary pricing procedure and the condition records and it will flow from there.
May the pricing procedure is not correctly defined for that particular soldto party in the system, once that is maitained then everything will flow correctly.
Thanks,
Mahesh. -
Open Purchase Order UPload Using the BAPI 's
i need to upload the open Purchase Order using the BAPI function BAPI_PO_CREATE1., below is the given fileds blod are for Header, header will Repeat for the line items,can any one help me out using the BAIP's for upload the PO, i need sample code for this ........
Thanks & Regards
Raghu
<u>Field Name Field Description Type Length</u>
<b>EBELN Purchasing Document Number CHAR 010 X
BUKRS Company Code CHAR 004 MN10 C
EKORG Purchasing Organization CHAR 004 MN00 C
EKGRP Purchasing group CHAR 003 X
BSART Order type (Purchasing) CHAR 004 X
LIFNR Account Number of Vendor or Creditor CHAR 010 X
BEDAT Purchase Order Date DATS 010 X
ZTERM Terms of payment key CHAR 004 X
WAERS Currency Key CUKY 005 X
INCO1 Incoterms (part 1) CHAR 003 X
INCO2 Incoterms (part 2) CHAR 028 X</b>
EBELP Item Number of Purchasing Document NUMC 005 X
EMATN Material number CHAR 018 X
WERKS Plant CHAR 004 X
LGORT Storage location CHAR 004 X
EPSTP Item category in purchasing document CHAR 001 X
KNTTP Account assignment category CHAR 001 X
EINDT Item delivery date DATS 010 X
MENGE "Purchase order quantity (direct input, transfer of POs)" CHAR 013 X
MEINS Order unit UNIT 003 X
NETPR "Net price: Document currency (direct input, transfer of" CHAR 011 X
PEINH "Price unit (direct input, transfer of POs)" CHAR 005 X
BPRME Order Price Unit (Purchasing) UNIT 003 X
BPUMZ Numerator: Conversion OPUn into OUn (direct input of POs CHAR 005 X
BPUMN Denominator: Conversion OPUn into OUn (direct input of P CHAR 005 X
SAKTO Cost element CHAR 010 X
KOSTL Cost Center CHAR 010 X
VBELN Sales and Distribution Document Number CHAR 010 X
VBELP Sales document item NUMC 006 X
WEMPF Goods recipient CHAR 012 X
WEBTH "Amount in local currency (direct input, transfer of POs)" CHAR 013 X
WEBTF "Amount in document currency (direct input, transfer of P" CHAR 013 X
WEREF Flag for treatment of GR/IR (direct input of POs) CHAR 001 X
SPINF Indicator: Update info record CHAR 001 X
WEPOS Goods Receipt Indicator CHAR 001 X
REPOS Invoice receipt indicator CHAR 001 Xi need to upload the open Purchase Order using the BAPI function BAPI_PO_CREATE1., below is the given fileds blod are for Header, header will Repeat for the line items,can any one help me out using the BAIP's for upload the PO, i need sample code for this ........
Thanks & Regards
Raghu
<u>Field Name Field Description Type Length</u>
<b>EBELN Purchasing Document Number CHAR 010 X
BUKRS Company Code CHAR 004 MN10 C
EKORG Purchasing Organization CHAR 004 MN00 C
EKGRP Purchasing group CHAR 003 X
BSART Order type (Purchasing) CHAR 004 X
LIFNR Account Number of Vendor or Creditor CHAR 010 X
BEDAT Purchase Order Date DATS 010 X
ZTERM Terms of payment key CHAR 004 X
WAERS Currency Key CUKY 005 X
INCO1 Incoterms (part 1) CHAR 003 X
INCO2 Incoterms (part 2) CHAR 028 X</b>
EBELP Item Number of Purchasing Document NUMC 005 X
EMATN Material number CHAR 018 X
WERKS Plant CHAR 004 X
LGORT Storage location CHAR 004 X
EPSTP Item category in purchasing document CHAR 001 X
KNTTP Account assignment category CHAR 001 X
EINDT Item delivery date DATS 010 X
MENGE "Purchase order quantity (direct input, transfer of POs)" CHAR 013 X
MEINS Order unit UNIT 003 X
NETPR "Net price: Document currency (direct input, transfer of" CHAR 011 X
PEINH "Price unit (direct input, transfer of POs)" CHAR 005 X
BPRME Order Price Unit (Purchasing) UNIT 003 X
BPUMZ Numerator: Conversion OPUn into OUn (direct input of POs CHAR 005 X
BPUMN Denominator: Conversion OPUn into OUn (direct input of P CHAR 005 X
SAKTO Cost element CHAR 010 X
KOSTL Cost Center CHAR 010 X
VBELN Sales and Distribution Document Number CHAR 010 X
VBELP Sales document item NUMC 006 X
WEMPF Goods recipient CHAR 012 X
WEBTH "Amount in local currency (direct input, transfer of POs)" CHAR 013 X
WEBTF "Amount in document currency (direct input, transfer of P" CHAR 013 X
WEREF Flag for treatment of GR/IR (direct input of POs) CHAR 001 X
SPINF Indicator: Update info record CHAR 001 X
WEPOS Goods Receipt Indicator CHAR 001 X
REPOS Invoice receipt indicator CHAR 001 X -
Creating SNP planned order using ''BAPI_MOSRVAPS_SAVEMULTI3'
Hi Experts,
I am new to SAP-APO, kindly clarify my question. I am using 'BAPI_MOSRVAPS_SAVEMULTI3' with source of supply PDS for creating SNP planned order by passing 'EE' in the table parameters 'ORDER_HEAD-MASTER_ATPCAT'. It is creating a planned order which is PPDS planned order with number range starting from '1000...' rather than creating SNP planned order with number range starting from '8000..'. Please let me know what might be the reason for the BAPI misbehaving incorrectly. Also kindly let meknow what are specific parameters to pass to above bapi to create SNP planned order.Hi,
The BAPI BAPI_MOSRVAPS_SAVEMULTI3 is used for creating PPDS inhouse orders.
You will have to use BAPI_MOSRVAPS_CREATESNPORDER for SNP inhouse orders creation from SNP PPMs( there is no explict mention of SNP PDS- you may please check).
Regards
Datta -
Unable to update sales order unsing the BAPI 'BAPI_SALESORDER_CHANGE'
Hi All,
I am unable to update the payment method field for some sales orders using the bapi 'BAPI_SALESORDER_CHANGE'. I am getting the reason in the table RETURN as 'Field 'ZLSCH' cannot be changed, VBAPKOM 000050 ready for input'.
Could anyone throw some light on it.
Thanks a ton.
Regards,
Santosh Kotra.Hi
Without reversing invoice we can't update price and this is standard bevaior which is logical too. For your scenario I am wondering why would you want to change price for a line item or order which is alrady invoiced and posted to FI. What difference would it make to change price in sale order when this has already been posted in FI?
Thank$ -
Craation of Notification Using the BAPI
Hi Experts ,
I Ned to Creat a Notification By Using the Bapi BAPI_ALM_NOTIF_CREATE, I have Inputted the Fields Correctly , BUt Iam Getting the Error Specifing "Indicate sort number" as the Return Value and Notification is Not Getting Creted.
Kindly Treat This an important issue.Kindly Suggest me Solution.
Regards
Prem.Hi Saha,
My Return Structure is EMPTY after running the BAPI and also i tried giving the BAPI_TRANSACTION_COMMIT still the telephone number is not getting updated.
Edited by: PraveenDeloitte on Jan 11, 2011 7:36 AM
Edited by: PraveenDeloitte on Jan 11, 2011 7:37 AM -
BAPI for transaction IW31 (creating a work order)
Hi all,
I need to be able to create a work order ( IW31) using ABAP code and was wondering if any knew if there was a BAPI that should be used for this functionality.
Thanks in advance
Marthi,
You can use
BAPI_ALM_ORDER_MAINTAIN.
Have a look at the following documentation.
FU BAPI_ALM_ORDER_MAINTAIN
Text
Process Maintenance-/Service Order
Functionality
This Business Application Programming Interface (BAPI) is used for changing maintenance- or service orders and their lower-level objects. The following objects of an order can be processed (for restrictions, see the note at the end of the documentation):
Order header
Partner
User status
Order operations
Relationships
Components
Long texts for order header, operations, and components
Function
Calling up this BAPI once allows you to perform all the operations. For this the system supplies the function module with a method table containing the methods to be performed. The entries in the method table refer to data records in the optionally filled-out data tables. All the methods from the method table are performed. Alternatively, just lower- level objects from existing orders can be changed.
You can process the transferred data with the Business Add-In (BAdI) IBAPI_ALM_ORD_MODIFY to, for example, merge data from the external system with data from the R/3 system. The BAdI is called up as soon as the transferred data is converted into the internal format. The tests then take place after this.
Construction of Method Table
REFNUMBER Reference number for linking object methods - attributes
The reference number is the line of the database which contains the corresponding data. The data table is determined by the object type.
OBJECTTYPE Object category
The object category specifies which object from the order should be processed. The key words listed here are not language-dependent and must be transferred exactly as they are. The following objects exist:
HEADER Order header
PARTNER Partner data
USERSTATUS User status
OPERATION Operation data
RELATION Relationships
COMPONENT Components
TEXT Long texts
(empty) ,General BAPI functions (save)
METHOD Methods
The methods with which the data should be processed. The following functions exist:
CREATE Create objects
CHANGE Change objects
DELETE Delete objects
RELEASE Release
TECHNICALCOMPLETE Technically complete
ATPCHECK Availability check
CALCULATE Calculate
SCHEDULE Schedule
DELELTEDSEX Delete the status for external scheduling at operation level
SAVE Save all data
DIALOG Call-up dialog. See explanation below.
TRACE Write trace file in the specified file to the frontend
OBJECTKEY SAP external object key
This key is for assigning the lower-level objects correctly to the corresponding objects, as there is always just one key in the data table. The key must have the following structure:
1-12 Order number
When creating orders with internal number assignment, a reference number beginning with % must be entered here. The BAPI then returns this number and the number actually assigned.
13-16 Operation number
17-20 Sub-operation number
For relationships, the key is structured as follows:
1-12 ,Order number from
13-16 Operation number from
17-28 Order number to
29-32 Operation number to
The following methods are permissible for the individual objects:
HEADER:
CREATE, CHANGE, RELEASE, TECHNICALCOMPLETE, ATPCHECK, CALCUALTE, SCHEDULE
OPERATION
CREATE, CHANGE, DELETE, DELETEDSEX
PARTNER, RELATION, COMPONENT, USERSTATUS, TEXT:
CREATE, CHANGE, DELETE
(empty):
SAVE, DIALOG, TRACE
Data tables and update tables
The objects have one or more data tables. For some objects you can specify which of the fields specified in the structure should be changed. For this you must set the field in the corresponding table to X as in the data table. If no update-table is transferred, then only those fields are set that have a value that is not initial. This simplifies the transfer data. However, this means it is not possible to delete fields. If an update structure should only be specified for some data records, the table with the update fields must nonetheless have the same amount of lines as the data table. The empty lines are then treated as if no update structure was transferred. The objects "Partner", "User Status", and "Text" have no update tables. The whole data record is always copied here.
References
The objects use the field REFNUMBER from the method table to refer to the lines in the data table. Counting always begins with 1. In doing this, REFNUMBER also refers to the update table. However, in the method table there is a second reference to higher-level objects for lower-levels objects. The field OBJECTKEY must be filled with order number, operation number, and sub-operation number, as specified above. If lower-level objects of a newly-created order should be changed, then you must enter a temporary order number that must begin with %. Several orders can be numbered serially, for example, with %00000000001, %00000000002 ... .
The following objects have special treatment for REFNUMBER:
Partner
Texts
Partners have an order number in the data table. During processing of the method table, all those entries in the data table are processed which have an order number that is the same as that in the line to which the method refers. Thus, through just one entry in the method table, several partners can be changed.
Texts are composed of two tables. The first table (IT_TEXT) is made up of the header data of the text. Here you must specify the object and the first and last line of the text table (respectively inclusive, counting from 1). Through this, a line segment is specified in the text line table (IT_TEXT_LINES).
Peculiarities in processing
The BAPI processes the transferred methods in a particular sequence, which must not correspond to the sequence in the methods table.
Write trace file
Change user status time period 1
Delete objects (dependent first)
Create new objects
Change existing or newly-created objects
Change user status time period 2
Status change of order
Save data
The methods are performed such that lower-level objects can also be assigned to newly-created objects. For example, first the operations are created, and then the components. Long texts can also be created for the objects.
Components have an exceptional position. Components are created through the assignment to an operation, that is, using the "key" order/ operation (item number). However, as this is not the unique component key, you can only access the components to change them, delete them, or add long texts by using the reservation number/-item, which is only given after saving. This means that, for example, you cannot create a long text when you create the component.
User status changes can take place at two different time points. Time point 1 is before the object changes, time point 2 is after the object changes and before the status change of the system. These time points should be defined in the transfer table in the field CHANGE_EVENT. The field documentation contains the possible values.
The external scheduling is offered by the BAPI as a special function. THe BAPI can set the date field directly at the operation level, and select the operation with the status DSEX "Date set by external system". This status prevents any further scheduling of the operation, it keeps the transferred dates. For this, set the category 'X' in the restriction categories. When reading the operation, this category is also returned, independent of the category of restriction set in the dialog. To delete the status, you can call up the method DELETEDSEX for the object operation. The external scheduling cannot be influenced in the dialog. All changes to the scheduling restrictions in the dialog are saved as normal, but are not relevant for the scheduling as long as the status DSEX is active.
Every time the BAPI is called up, a SAVE or DIALOG method must be transferred. Normally, calling up a BAPI is seen as a transaction. All data that is changed in the BAPI should be saved to the database immediately. The BAPI checks whether a SAVE method exists, otherwise it terminates processing. A test run of the BAPI is composed of a normal call-up using the SAVE method and a subsequent BAPI_TRANSACTION_ROLLBACK. To call up the BAPI without the SAVE method, for example, to realize dialog transactions, the BAPI can be called up with the DIALOG method. This switches off the check for the SAVE method. The processor must then ensure that later either a SAVE method or a BAPI_TRANSACTION_ROLLBACK is called up.
A BAPI_TRANSACTION_COMMIT without SAVE method terminates processing in the update to ensure that no inconsistent data is written to the database. The processor who called up the BAPI does not receive any confirmation for the termination of the update in the target system. This logic is necessary as the order data was flagged for updating with BAPI_TRANSACTION_COMMIT through the SAVE method. However, the status information was already flagged for updating when the BAPI was called up. A BAPI_TRANSACTION_COMMIT without SAVE method then just saves the status information and would generate inconsistent orders, if the updating was not terminated.
Customer Enhancement
The BAdI IBAPI_ALM_ORD_MODIFY can be used to change the transferred data. The BAdI is called up after the conversion of the transfer structure into the structures used internally. Additional data can be transferred using the table EXTENSION_IN. Only then is the data checked.
Example
The following examples should clarify the use.
Creating an order
OBJECTKEY should be filled with a temporary key. The BAPI returns this key together with the assigned order number in the return table ET_NUMBERS . The order number in the HEADER table should also be filled with the number. For external number assignment, the external number should be specified. The update structure can be transferred if necessary.
Methods table
REFNUMBER OBJECTTYPE METHOD OBJECTKEY
1 HEADER CREATE %00000000001
IT_HEADER
ORDERID ORDER_TYPE PLANPLANT ...
%00000000001 PM01 1000 ...
Creating an order with operation and long text
Methods table
REFNUMBER OBJECTTYPE METHOD OBJECTKEY
1 HEADER CREATE %00000000001
1 OPERATION CREATE %00000000001
1 TEXT CREATE %000000000010010
IT_HEADER
ORDERID ORDER_TYPE PLANPLANT ...
%00000000001 PM01 1000 ...
IT_OPERATION
ACTIVITY SUB_ACTIVITY CONTROL_KEY WRK_CNTR ...
10 PM01 MECHANIC ...
IT_TEXT
ACTIVITY ... TEXTSTART TEXTEND
10 ... 1 2
IT_TEXT_LINES
TDFORMAT TDLINE
Longtext for operation 10, line 1
Line 2 of the long text
Notes
Using the BAPI to process the order data cannot support all the functions of the transaction. This applies in particular for the following functions:
Order header data
The object list cannot be processed.
Refurbishment orders are not supported.
The estimated costs cannot be processed - only the estimated overall costs of the order.
Notification data cannot be processed with the order BAPI. Even if the settings in Customizing are such that the orders and notifications can be maintained on one screen, no notification is created for the order.
Permits cannot be processed.
The order addresses cannot be processed.
Individual partner addresses cannot be maintained.
The settlement rule cannot be maintained.
Order functions
Printing the papers is not possible.
Locking and unlocking the order is not possible.
Accepting and rejecting quotations is not possible.
Business completion is not possible.
Flagging for deletion is not possible.
The log cannot be displayed.
User default values are not used.
The field selection is not checked.
The Customer Exits/BAdIs are not executed completely.
Joint ventures are not supported.
Funds Management is not supported.
Investment orders are not supported.
No integration of service products with task lists possible.
No integration of configurable service products possible.
Assignment of sales document items with service products in accordance with the aforementioned conditions.
Operation data
A change of the control key in the operation is not possible, if this leads to a change of the processing type (internal-/external processing)
User status change not possible.
Production resources and tools cannot be processed.
Service lines cannot be processed.
Task list integration is not supported.
Linking operations with object list is not supported.
Component data
User status change not possible.
BOM data cannot be processed.
The delivery address cannot be processed.
Further Information
See also the documentation for the individual transfer tables.
Parameters
IT_METHODS
IT_HEADER
IT_HEADER_UP
IT_HEADER_SRV
IT_HEADER_SRV_UP
IT_USERSTATUS
IT_PARTNER
IT_PARTNER_UP
IT_OPERATION
IT_OPERATION_UP
IT_RELATION
IT_RELATION_UP
IT_COMPONENT
IT_COMPONENT_UP
IT_TEXT
IT_TEXT_LINES
EXTENSION_IN
RETURN
ET_NUMBERS
Exceptions
Function Group
IBAPI_ALM_ORDER
~~Guduri -
Create Work Order Using BAPI in LSMW
Hi All,
I searched in SCN but i dint get the correct idea to create Work Order USING BAPI,
Im trying to create Work Order Using BAPI in LSWM
Can any one Give me Brief Idea to create Work Order(Either Component or Operations) (t code - IW31) using BAPI in LSMW
Regards
SmithaHi All,
I searched in SCN but i dint get the correct idea to create Work Order USING BAPI,
Im trying to create Work Order Using BAPI in LSWM
Can any one Give me Brief Idea to create Work Order(Either Component or Operations) (t code - IW31) using BAPI in LSMW
Regards
Smitha -
How to create an Invoice for the sales order using the T-Code VF01
Hello Experts,
How to create an Invoice for a sales order using the T-Code VF01?
Thanks in advace,
Sumahi,
Make the following settings-
1. Create sales document and billing type
2. assign billing type in sales document type config VOV8
3. Activate itemcategory as sales order related billing
4. Maintain copy control header and item level between sales order and billing
5. Maintain pricing procedure for sales order and billing
6. Define Output procedure in case to print invoice
Regards
Goutham
Maybe you are looking for
-
How to install Mac OS 10.4.8 on 4 new WD Raptors?
Hello, just got my Mac Pro delivered with 1 x 250 GB drive. Now I want to replace this drive with 4 WD 74GB Raptor's in a RAID 0 configuration. How can I do this? For the moment I have only the Install CD's and the 4 Raptor's. They are not yet format
-
When dowloading itunes 10.5 i am getting error message
there is a problem with this windows installer package. a program required for this install to complete could not be run. can anyone help? Thanks
-
Why do I get sometimes my macbook to do white noise out of the blue
Why do I get sometimes my macbook to do white noise out of the blue? It's a new mac so is it faulty?
-
How to get digital sound from macbook air?
i know the new air does not have digital output in the headphone jack, but is there another way to approach this problem? I heard there are ways to connect an external sound card to make it work (i'm new to this and not sure exactly how it works). I
-
Document library column permissions
Hello everybody ! I've a problem regarding to the Sharepoint authorization system(again), is it possible to apply permissions to columns in my custom content type ? I've added two columns to my content type and i'd like to know if it's possible to p