Print of TO created through Bapi
Hi friends,
I want to have immediate printing of the TO created through BAPI l_to_create_multiple.
I don't want to change the configuration setting what is the other way to get TP printed immediately.
Thanks,
Kiran
Immediate printing of Transfer order is depend on the spool code setting.If the transfer order which you are creating through L_TO_CREATE_MULTIPLE is having the spool code and print immediately is activated for the spool code then it should trigger the printing.
SPRO---LE - WM --ACTIVITIES -- DEFINE PRINT CONTROL (Definition -----Spool code)
Similar Messages
-
Quantity field KWMENG not updating in Salesorder created through BAPI
Hi ,
I created sales order through BAPI - BAPI_SALESORDER_CREATEFROMDAT2.Here, I passed material , quantity , unit of measure etc..
But, when the sales order is created the value in the quantity filed is missing.
I passed values as :--
wa_itemx-updateflag = 'I'.
wa_item-itm_number = '10'.
wa_itemx-itm_number = 'X'.
wa_item-material = wa_alv-matnr.
wa_itemx-material = 'X'.
wa_item-rnddlv_qty = wa_alv-kwmeng.
wa_itemx-rnddlv_qty = 'X'.
wa_item-target_qu = wa_alv-kmein.
wa_itemx-target_qu = 'X'.
wa_itemx-ITEM_CATEG = 'X'.
append wa_item to it_item.
append wa_itemx to it_itemx.
What possibly could be the error?
Thanks,
Shivaa......Hi,
You have to pass the quantity in the schedule lines parameter ORDER_SCHEDULES_IN..
Thanks
Naren -
Printing of cheque created through FCH5
Hi
I am creating vendor down payment wrt payment request in T code F-48 screen. again i am creating cheque for that payment document in FCH5 screen.
How to do cheque printing manually for cheque cerated in FCH5 screen.
Please help me in this regard.
Regards
Sanil Bhandarihi sanil,
see you can clear the payment through F-48 but you cannt print it.
If you want to clear the payment go to Tcode F-58 this is to clear the Payment with the print out.
1. Create the check lot number in Tcode FCHI.
Thanks
Ranjit -
Problem in Material create through BAPI
Hi All,
For creating MATERIAL first used BAPI_MATERIAL_GETINTNUMBER for material no generation and for creation material master BAPI_MATERIAL_SAVEDATA.
<garbled code removed>
Moderator message: Post relevant portions of the code only!
My problem is material no is not created and passing into second bapi.
Help me out of this
Edited by: Suhas Saha on Jun 17, 2011 8:01 PMHi Venkatesh,
*Use This Bapi :BAPI_MATERIAL_SAVEREPLICA and pass values as mentioned below.*
Use this method to create new material master data or change existing material master data. Every time this method is called, data for one or more materials can be transferred.
When new material master data is created, the material number, the material type and the sector must be sent to the method. Furthermore, a short text and the language in which the short text has been created, have to be entered. When data is being changed, only the material number need be entered.
In the header data, at least one view has to be selected for which the data is to be created. Depending on the selected view, additional mandatory parameters that have been defined as such in Customizing have to be created. If not all mandatory fields are field with data, the method ends with an error message being displayed.
First, the appropriate fields in the tables (for example, CLIENTDATA) have to be filled with data by the user. These fields must also be flagged as the method data can only be written to the database if this is the case. The user must also provide data for the appropriate fields that have been selected in a checkbox table (for example, CLIENTDATAX). Checkbox tables exist for tables that do not contain language-dependent texts (MAKT, MLTX), European article numbers (MEAN) and tax classifications (MLAN). More than one data record can be created for a material in these tables (for all materials transferred to the method).
If a structure contains fields for a unit of measure (for example, structure CLIENTDATA, field BASE_UOM), language indicator (for example, structure MATERIALDESCRIPTION, field LANGU) or country identifier (for example, structure TAXCLASSIFICATIONS, field DEPCOUNTRY) then a similarly-named field ending with _ISO also exists. In doing so, the user has the option of using the internal SAP code or the ISO code for units of measure, language indicators or country identifiers. ISO codes are converted into an SAP code for further processing. The ISO code is only used if the SAP code is not displayed. In Customizing under "General Settings", a clear assignment has to be made between the ISO codes and the SAP codes for the following activities, if you want to use ISO codes:
If a structure contains fields for units of measurement (such as structure CLIENTDATA, field BASE_UOM), language indicators (such as structure MATERIALDESCRIPTION, field LANGU), or country indicators (such as structure TAXCLASSIFICATIONS, field DEPCOUNTRY), there is always a field of the same name with the ending _ISO. This makes it possible to transfer either the internally used SAP code or a standardized ISO code for the units of measurement, language indicators, or country indicators. ISO codes are converted to an SAP code internally for further processing. The ISO code is used only if the SAP code is not transferred. If you use ISO codes, there must be a unique assignment of the ISO code to the SAP code in the following activities in Customizing for Global Parameters:
Check Units of Measurement
Define Countries
If long texts (for example, basic data texts, internal notes, purchasing info texts, material notes or sales and distribution texts) or customer-specific fields have to be created for a material, some specific characteristics have to be taken into consideration. These characteristics are detailed in the documentation for parameters MATERIALLONGTEXT and EXTENSIONIN. -
IN Po quantity is getting round off - when we create PO through BAPI?
Hi all,
In PO quantity is getting round off instead of 5711.210 it is taking 5711 only. Here we are creating the PO's through BAPI automatically.
and in excel sheet we have maintained 5711.210, Kindly let me know what may be the possible causes for this..
regards,
archanafyi
change decimal places in PO quantity -
How to create PO through BAPI from custom screen
Hi SAP Technical Guru,
i am new to module pool programming.
i designed custom screen which is like TA me21n means it has one tabstrip and tablecontrol.
for header details(fields) at tab strip, and item detials(fields) at table control i used.
now i have to capture screen fields into FM bapi_po_create1 and update the database tables.
please suggest me how to create Purchase Order through BAPI FM.
regards,here is the sample code
*tables for passing podata to bapi
DATA : gt_header TYPE STANDARD TABLE OF bapimepoheader,
gt_headerx TYPE STANDARD TABLE OF bapimepoheaderx,
gt_item TYPE STANDARD TABLE OF bapimepoitem,
gt_itemx TYPE STANDARD TABLE OF bapimepoitemx,
gt_account TYPE STANDARD TABLE OF bapimepoaccount,
gt_accountx TYPE STANDARD TABLE OF bapimepoaccountx,
*tables used for passing custom field data to bapi
gt_custom TYPE STANDARD TABLE OF bapiparex,
gt_custdata_in TYPE STANDARD TABLE OF bapi_te_mepoaccounting,
gt_custdata_ix TYPE STANDARD TABLE OF bapi_te_mepoaccountingx,
*tables used for cathing messages returned by bapi
gt_return TYPE STANDARD TABLE OF bapiret2,
gt_return1 TYPE STANDARD TABLE OF bapiret2,
*Work area declaration for passing custom field data to bapi
w_custom LIKE LINE OF gt_custom,
w_custdata_in LIKE LINE OF gt_custdata_in,
w_custdata_ix LIKE LINE OF gt_custdata_ix,
*Work area declaration for passing podata to bapi
w_header LIKE LINE OF gt_header,
w_headerx LIKE LINE OF gt_headerx,
w_item LIKE LINE OF gt_item,
w_itemx LIKE LINE OF gt_itemx,
w_account LIKE LINE OF gt_account,
w_accountx LIKE LINE OF gt_accountx,
*work area declaration for cathing messages returned by bapi
w_return LIKE LINE OF gt_return,
w_return1 LIKE LINE OF gt_return1.
*populating po dat into internal tables
w_header-comp_code = 'PH02'.
w_header-doc_type = 'TEST'.
w_header-vendor = '0000600019'.
w_header-purch_org = 'PH02'.
w_header-pur_group = '901'.
w_headerx-comp_code = 'X'.
w_headerx-doc_type = 'X'.
w_headerx-vendor = 'X'.
w_headerx-purch_org = 'X'.
w_headerx-pur_group = 'X'.
w_item-po_item = '00001'.
w_item-short_text = 'test po'.
w_item-po_unit = 'CM'.
w_item-matl_group = '01'.
w_item-po_unit = 'EA'.
w_item-plant = 'PH02'.
w_item-quantity = '1.000'.
w_item-net_price = '10.00'.
w_item-item_cat = '0'.
w_item-acctasscat = 'K'.
APPEND w_item TO gt_item.
w_itemx-po_item = '00001'.
w_itemx-short_text = 'X'.
w_itemx-matl_group = 'X'.
w_itemx-po_unit = 'X'.
w_itemx-plant = 'X'.
w_itemx-stge_loc = 'X'.
w_itemx-quantity = 'X'.
w_itemx-tax_code = 'X'.
w_itemx-net_price = 'X'.
w_itemx-item_cat = 'X'.
w_itemx-acctasscat = 'X'.
APPEND w_itemx TO gt_itemx.
w_account-po_item = '00001'.
w_account-serial_no = '01'.
w_account-quantity = '1.000'.
w_account-gl_account = '0000199999'.
w_account-costcenter = '0000400011'.
APPEND w_account TO gt_account.
w_accountx-po_item = '00001'.
w_accountx-serial_no = '01'.
w_accountx-quantity = 'X'.
w_accountx-gl_account = 'X'.
w_accountx-costcenter = 'X'.
APPEND w_accountx TO gt_accountx.
w_custdata_in-po_item = '00001'.
w_custdata_in-serial_no = '01'.
w_custdata_in-zzttry = '1000'.
w_custom-structure = 'BAPI_TE_MEPOACCOUNTING'.
MOVE w_custdata_in TO w_custom-valuepart1.
APPEND w_custom TO gt_custom.
w_custdata_ix-zzttry = 'X'.
w_custdata_ix-po_item = '00001'.
w_custdata_ix-serial_no = '01'.
w_custom-structure = 'BAPI_TE_MEPOACCOUNTINGX'.
MOVE w_custdata_ix TO w_custom-valuepart1.
APPEND w_custom TO gt_custom.
*bapi to create po oreders
CALL FUNCTION 'BAPI_PO_CREATE1'
EXPORTING
poheader = w_header
poheaderx = w_headerx
TABLES
return = gt_return
poitem = gt_item
poitemx = gt_itemx
poaccount = gt_account
poaccountx = gt_accountx
extensionin = gt_custom.
*bapi for po data commit
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = ' '
IMPORTING
return = w_return1.
*clearing tables & work area
REFRESH:gt_account,gt_item,gt_itemx,gt_accountx.
CLEAR:w_header,w_headerx.
*displaying message returned by bapi
LOOP AT gt_return INTO w_return.
WRITE: w_return-type , w_return-id , w_return-number , w_return-message .
ENDLOOP. -
How to create shipment cost document through BAPI?
Hi SAP Guru,
My requirement is to create shipment cost document through BAPI.
Is there any standard BAPI to create Shipment cost documents? If any buddy no please help me out.I am in client place i have find out the solution..
Thanks & Regards,
Pankaj SinhaHi Pankaj,
See the following link for more help.
IDOC/BAPI for changing Shipment cost number/document
Regards -
Creating sales order through Bapi
Hi all,
I am trying to create sales order through bapi.
Now my problem is mapping sales order fields with bapi structure fields.
1.'Overall Order status' field in the 'Status' tab of the header in VA02.
2.'Tax'feild in the 'conditions' tab of the header in VA02.
Please help me to map these fields into Bapi structure.
Thanks in advance.
Regards,
Shalem.HI
GOOD
GO THROUGH THIS LINK,I HOPE THIS WILL GIVE YOU THE COMPLETE IDETA OF CREATING A SALES ORDER THROUGH BAPI,
http://help.sap.com/saphelp_nw04/helpdata/en/4c/fd7ebb515911d395f900a0c94260a5/content.htm
http://www.sappoint.com/abap/bapiintro.pdf
THANKS
MRUTYUN -
How to create a bapi to update and add record 2 abap r3 table created by me
i have created a abap r3 table and i now want to insert records into it through SAP netweaver(Web-Dynpro). So i need a bapi to udate and insert records in the abap r3 table.if someone can please tell me how to create the bapi..coz i handel the EP part and dont know much about abap.
BAPIs are defined as API methods of SAP business object types.
A BAPI is implemented as a function module, that is stored and described in the Function Builder.
To create BAPI you are supposed to do following steps :
1) create package in SE80.
2) create function group in SE80.
3) create function module in SE37(REMOTE ENABLE) & relased it .
write your logic in that FM.
4) Go in SWO1 to create Object type / object name (write the program name which is SE38 program generated in background )
5) Then go to SWO1
Utilities -> Api methods -> ADD method
write the name of FM which you have created & continue.
6) select your method
a) EDIT -> change release status -> object type -> implement
-> released
b) EDIT -> change release status -> object type component-> implement
-> released
7) go in BAPI & you will get your BAPI. -
Freight vendor updation in GR document through BAPI
Dear All
In my system we are creating Goods Receipt in background through *BAPI BAPI_GOODSMVT_CREATE*. In my PO we have entered freight condition FRB1 for that PO line item and assigned a vendor code different from material vendor. For this freight condition FRB1 in the configuration we have maintained in Control Data 2 field Vendor in GR as 2 ( i.e. Entry always possible). This will help us to change freight vendor different from freight vendor maintained in PO line item.
Now my query is that how can I achieve this through BAPI BAPI BAPI_GOODSMVT_CREATE when I am creating GR in background. In which field of BAPI should we pass the freight vendor at the time of GR creation.
Regards
Satish KumarHi Satish,
With standard SAP this is not Possible
As indicated in the attached note 356665, the field SUPPL_VEND has no
function. Please, have a look at this note for further information.
In dialog (with MB01 or MIGO) you have the possibility to enter another
freight vendor different than the vendor in your purchase order (or your
scheduling agreement) as long as you have, in your purchasing condition
type, "Vendor in GR" (V_T685A-BNKWE) maintained with the appropiate
value. Then, by posting the Goods Receipt, you will update EKBZ with
this new freight vendor.
Unfortunately in the standard system this functionality is not available
when working with the BAPI BAPI_GOODSMVT_CREATE or with the Idoc
WMMBID02.
There is no customizing setting or tool that you could use inside the
standard system to change it. -
Profit Center not getting uploaded through BAPI for MM01. Pls help
Hello all,
I am getting an errror while uploading a file through BAPI for MM01 , The error says
Error:
Profit center 1000/sslcommon does not exist
for material: AC2
*& Report ZBAPI_DUMMY
REPORT ZBAPI_MM01.
*& Report ZBAPI2
TABLES
FLAGS *
DATA: F_STOP. " Flag used to stop processing
DATA DECLARATIONS *
DATA : V_EMPTY TYPE I, " No. of empty records
V_TOTAL TYPE I. " Total no. of records.
STRUCTURES & INTERNAL TABLES
*--- BAPI structures
DATA: BAPI_HEAD LIKE BAPIMATHEAD, " Header Segment with Control
BAPI_MAKT LIKE BAPI_MAKT, " Material Description
BAPI_MARA1 LIKE BAPI_MARA, " Client Data
BAPI_MARAX LIKE BAPI_MARAX, " Checkbox Structure for BAPI_MARA
BAPI_MARC1 LIKE BAPI_MARC, " Plant View
BAPI_MARCX LIKE BAPI_MARCX, " Checkbox Structure for BAPI_MARC
BAPI_MBEW1 LIKE BAPI_MBEW, " Accounting View
BAPI_MBEWX LIKE BAPI_MBEWX, " Checkbox Structure for BAPI_MBEW
BAPI_RETURN LIKE BAPIRET2, " Return Parameter
BAPI_MARDL LIKE BAPI_MARD,
BAPI_MARDX LIKE BAPI_MARDX.
*--- Internal table to hold excel file data
DATA: IT_INTERN TYPE ALSMEX_TABLINE OCCURS 0 WITH HEADER LINE.
*--- Internal table to hold Matetrial descriptions
DATA: BEGIN OF IT_MAKT OCCURS 100.
INCLUDE STRUCTURE BAPI_MAKT.
DATA: END OF IT_MAKT.
*--- Internal to hold the records in the text file
DATA : BEGIN OF IT_DATA OCCURS 100,
WERKS(4), " Plant
MTART(4), " Material type
MATNR(18), " Material number
MATKL(9) , " Material group
MBRSH(1), " Industry sector
MEINS(3), " Base unit of measure
SPART(2), " Division
EKGRP(3), " Purchasing group
PRCTR(10), " Profit Center
VPRSV(1), " Price control indicator
BKLAS(4), "Valuation Class
*stprs(12), " Standard price
PEINH(3), " Price unit
SPRAS(2), " Language key
MAKTX(40), " Material description
LGORT(4) , " storage location
DISMM(2) , "MRP TYPE
VERPR(23), " Moving Average Price
MTVFP(2) , " Availability Check
DISLS(2) , "Lot Size
DISPO(3) , "MRP Controller
BESKZ(1) , "Procurment Type
FHORI(3) , "SCHEDMARGIN KEY
PERKZ(1) , "Period Indicator
END OF IT_DATA.
SELECTION SCREEN. *
SELECTION-SCREEN BEGIN OF BLOCK SCR1 WITH FRAME TITLE TEXT-111.
PARAMETER : P_FILE TYPE RLGRAP-FILENAME OBLIGATORY " Input File
PARAMETER : P_MAX(4) OBLIGATORY DEFAULT '100'. " no.of recs in a session
PARAMETERS: P_HEADER TYPE I DEFAULT 0. " Header Lines
PARAMETERS: P_BEGCOL TYPE I DEFAULT 1 NO-DISPLAY,
P_BEGROW TYPE I DEFAULT 2 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 *
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
*--- Validating file
PERFORM VALIDATE_FILE USING P_FILE.
START-OF-SELECTION
START-OF-SELECTION.
*--- Perform to convert the Excel data into an internal table
PERFORM CONVERT_XLS_ITAB.
IF NOT IT_DATA[] IS INITIAL.
*--- Perform to delete Header lines
PERFORM DELETE_HEADER_EMPTY_RECS.
ENDIF.
END OF SELECTION. *
END-OF-SELECTION.
*--- Perform to upload Material Master data
PERFORM UPLOAD_MATMAS.
Form : validate_input_file
Description : To provide F4 help for file if read from PC
FORM VALIDATE_FILE USING F_FILE TYPE RLGRAP-FILENAME.
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
CHANGING
FILE_NAME = F_FILE
EXCEPTIONS
MASK_TOO_LONG = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE S010(ZLKPL_MSGCLASS). " 'Error in getting filename'.
ENDIF.
ENDFORM. " validate_input_file
*& Form CONVER_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.
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 to move the data into an internal data
PERFORM MOVE_DATA.
ENDFORM. " CONVERT_XLS_ITAB
*& Form MOVE_DATA
text
FORM MOVE_DATA.
DATA : LV_INDEX TYPE I.
FIELD-SYMBOLS <FS> .
*--- Sorting the internal table
SORT IT_INTERN BY ROW COL.
CLEAR IT_INTERN.
LOOP AT IT_INTERN.
MOVE IT_INTERN-COL TO LV_INDEX.
*--- Assigning the each record to an internal table row
ASSIGN COMPONENT LV_INDEX OF STRUCTURE IT_DATA TO <FS> .
*--- Asigning the field value to a field symbol
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
To delete the Header and empty records
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.
P_HEADER = 0.
EXIT.
ENDIF.
ENDLOOP.
ENDIF.
CLEAR IT_DATA.
*--- To delete the empty lines from internal table
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.
*--- Total no of recs in file
DESCRIBE TABLE IT_DATA LINES V_TOTAL.
IF V_TOTAL = 0.
MESSAGE I013(ZLKPL_MSGCLASS). " No records in the file
F_STOP = 'X'.
STOP.
ENDIF.
ENDFORM. " DELETE_HEADER_EMPTY_RECS
*& Form UPLOAD_MATMAS
to upload Material Master data
FORM UPLOAD_MATMAS .
LOOP AT IT_DATA.
Header
BAPI_HEAD-MATERIAL = IT_DATA-MATNR.
BAPI_HEAD-IND_SECTOR = IT_DATA-MBRSH.
BAPI_HEAD-MATL_TYPE = IT_DATA-MTART.
BAPI_HEAD-BASIC_VIEW = 'X'.
BAPI_HEAD-PURCHASE_VIEW = 'X'.
BAPI_HEAD-ACCOUNT_VIEW = 'X'.
BAPI_HEAD-storage_view ='X'.
bapi_head-mrp_view = 'X'.
bapi_head-COST_view ='X'.
Material Description
REFRESH IT_MAKT.
IT_MAKT-LANGU = IT_DATA-SPRAS.
IT_MAKT-MATL_DESC = IT_DATA-MAKTX.
APPEND IT_MAKT.
Client Data - Basic
BAPI_MARA1-MATL_GROUP = IT_DATA-MATKL.
BAPI_MARA1-BASE_UOM = IT_DATA-MEINS.
bapi_mara1-unit_of_wt = it_data-gewei.
BAPI_MARA1-DIVISION = IT_DATA-SPART.
BAPI_MARAX-MATL_GROUP = 'X'.
BAPI_MARAX-BASE_UOM = 'X'.
BAPI_MARAX-UNIT_OF_WT = 'X'.
BAPI_MARAX-DIVISION = 'X'.
Plant - Purchasing
BAPI_MARC1-PLANT = IT_DATA-WERKS.
BAPI_MARC1-PUR_GROUP = IT_DATA-EKGRP.
BAPI_MARC1-PROFIT_CTR = IT_DATA-PRCTR.
BAPI_MARC1-MRP_TYPE = IT_DATA-DISMM.
BAPI_MARC1-AVAILCHECK = IT_DATA-MTVFP.
BAPI_MARC1-LOTSIZEKEY = IT_DATA-DISLS.
BAPI_MARC1-MRP_CTRLER = IT_DATA-DISPO.
BAPI_MARC1-PROC_TYPE = IT_DATA-BESKZ.
BAPI_MARC1-SM_KEY = IT_DATA-FHORI.
BAPI_MARC1-PERIOD_IND = IT_DATA-PERKZ.
BAPI_MARCX-PLANT = IT_DATA-WERKS.
BAPI_MARCX-PUR_GROUP = 'X'.
BAPI_MARCX-AVAILCHECK = 'X'.
BAPI_MARCX-PROFIT_CTR = 'X'.
BAPI_MARCX-MRP_TYPE = 'X'.
BAPI_MARCX-MRP_CTRLER = 'X'.
BAPI_MARCX-SM_KEY = 'X'.
BAPI_MARCX-LOTSIZEKEY = 'X'.
Storage Location.
BAPI_MARDL-PLANT = IT_DATA-WERKS.
BAPI_MARDL-STGE_LOC = IT_DATA-LGORT.
BAPI_MARDX-PLANT = IT_DATA-WERKS.
BAPI_MARDX-STGE_LOC = IT_DATA-LGORT.
Accounting
BAPI_MBEW1-VAL_AREA = IT_DATA-WERKS.
BAPI_MBEW1-PRICE_CTRL = IT_DATA-VPRSV.
BAPI_MBEW1-VAL_CLASS = IT_DATA-BKLAS.
BAPI_MBEW1-MOVING_PR = IT_DATA-VERPR.
bapi_mbew1-std_price = it_data-stprs.
BAPI_MBEW1-PRICE_UNIT = IT_DATA-PEINH.
BAPI_MBEWX-VAL_AREA = IT_DATA-WERKS.
BAPI_MBEWX-PRICE_CTRL = 'X'.
BAPI_MBEWX-STD_PRICE = 'X'.
BAPI_MBEWX-PRICE_UNIT = 'X'.
BAPI_MBEWX-MOVING_PR = 'X'.
*--- BAPI to create material
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
HEADDATA = BAPI_HEAD
CLIENTDATA = BAPI_MARA1
CLIENTDATAX = BAPI_MARAX
PLANTDATA = BAPI_MARC1
PLANTDATAX = BAPI_MARCX
FORECASTPARAMETERS =
FORECASTPARAMETERSX =
PLANNINGDATA =
PLANNINGDATAX =
STORAGELOCATIONDATA = BAPI_MARDL
STORAGELOCATIONDATAX = BAPI_MARDX
VALUATIONDATA = BAPI_MBEW1
VALUATIONDATAX = BAPI_MBEWX
WAREHOUSENUMBERDATA =
WAREHOUSENUMBERDATAX =
SALESDATA = BAPI_MVKE1
SALESDATAX = BAPI_MVKEX
STORAGETYPEDATA =
STORAGETYPEDATAX =
IMPORTING
RETURN = BAPI_RETURN
TABLES
MATERIALDESCRIPTION = IT_MAKT
UNITSOFMEASURE =
UNITSOFMEASUREX =
INTERNATIONALARTNOS =
MATERIALLONGTEXT =
TAXCLASSIFICATIONS =
RETURNMESSAGES =
PRTDATA =
PRTDATAX =
EXTENSIONIN =
EXTENSIONINX =
IF BAPI_RETURN-TYPE = 'E'.
WRITE:/ 'Error:' ,BAPI_RETURN-MESSAGE ,'for material:' ,
IT_DATA-MATNR.
ELSEIF BAPI_RETURN-TYPE = 'S'.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT =
IMPORTING
RETURN = BAPI_RETURN
WRITE: 'Successfully created material' ,IT_DATA-MATNR.
ENDIF.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT =
IMPORTING
RETURN = BAPI_RETURN
ENDLOOP.
ENDFORM. " UPLOAD_MATMASthe Profit center 1000/sslcommon not created. first create the profit center and then upload your data.check tcode KE52 for created profit centers...
-
Transfer the Pur Order Info through BAPI's between SAP R/3 Systems Using XI
How to Create a Purchase Order for the Vendor and transfer this data through BAPI's between SAP R/3 Systems Using "Exchange Infrastructure(XI)".
Please kindly let me know the procedure for creating BAPI's and how to transfer this information between SAP R/3 systems. Please kindly mention the NAVIGATION for this scenario.Hi Revathi,
If you want to do an IDOC to IDOC scenario, then the Points to be noted are:
1. You dont need a DT, MT or a message interface for the IDOC as it itself acts as the Message Interface.
2. You import the IDOC and use the same in your mapping.
3. You do not need a sender IDOC adapter, and no sender agreement, but a receiver IDOC adapter and a receiver agreement is needed.
IDOC -> File scenario ref:
/people/prateek.shah/blog/2005/06/08/introduction-to-idoc-xi-file-scenario-and-complete-walk-through-for-starters
File -> IDOC ->
/people/anish.abraham2/blog/2005/12/22/file-to-multiple-idocs-xslt-mapping
(It concentrates on XSLT mapping but also gives an idea about the configuration part. Do go thru that, it might help you.)
Apart from this if you need any info on how to configure your ALE, partnet profile,etc drop me a mail, I have excellent tutors that can help you in the same.
Regards,
Bhavesh -
What is BAPI?How to create a BAPI? Difference b/w BAPI and BDC
Hi all,
Can some one help me regarding...
What is an BAPI?where it is used?
How to create a BAPI?
What is the difference between BAPI and BDC Program?
Iam in Initial stage regarding BAPI concept.
Please respond me soon.
Thanks,
LeeHI,
Here it is:
BAPI Programming Guide
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/CABFABAPIREF/CABFABAPIPG.pdf
BAPI User Guide
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCMIDAPII/CABFAAPIINTRO.pdf
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://ifr.sap.com/catalog/query.asp
STEP BY STEP for BAPI
http://sap-img.com/abap/bapi-step-by-step-guidance.htm
<b>DIFFERENCE between BAPI and BDC</b>
BDC is traditional way of coding the transactions for uploading the legacy data, Sap is changing all transactions to Object oriented programming. Since BAPI is Object based and supports all the new transactions it is preffered over BDC. More over BAPI's process data faster than BDC.
BAPI is a SAP-supplied function module with a defined interface, which allows you to interact with various business objects. SAP guarantees the integrity of your database for anything updated using a BAPI. BDC is a method of driving screens programatically, for updating SAP data. BAPIs are generally faster than BDCs.
A BAPI is faster because it is updating the DB "directly". Whereas BDC with call
transaction goes through the whole screen sequence like any user would do, simply put, fills screens.
However - there is not always a BAPI for a particular transaction and not all functions that are performed by a transaction can be done by a BAPI. BDCs produce error sessions which can be processed by the user, while BAPIs don't.
First choose the BAPI ,if there is no BAPI go for BDC.
why BAPI first not BDC.
SAP comes up with Change in Version, so each and every time they will change the screens/number etc.
so you have to change your BDC programs accordingly.
and also Most of the Latest versions transactions are Enjoy Transaction. they will not support BDC's in Background.
But Using BAPI's No such disadvantages.
A BAPI is faster because it is updating the DB "directly" through ABAP code.
A BDC with call transaction goes through the whole screen sequence like any user would do, simply put, it is filling screens.
Actually it depends on your requirement but BAPI is more effective as it is standard function module to update SAP databases rather than BDC.
using bdc over bapi has advantages and also disadvantages
advantages:
1. using bdc we can upload data into database tables using 2 ways
1. foreground -
means that user interaction is there for each and every record.
2. back ground -
no user interaction and tasks are done automatically.
using these two options is one of the greatest advantage over bapi.
2. in bdc call transaction method we can control the display of screen resolution which is not possible with bapi's
3. bdc is generally used for transferring of large amount of data than bapi's
4.session method of bdc allows us to place data directly in application server and then finally transfered into sap database tables
disadvantages:
1.bdc is only used for sap to sap system data transferring
2. bapis's generally works more faster than bdc's
3. using bapis we can connect to remote systems and also to non sap systems.
if useful reward some points.
A BAPI is a method of a SAP Business Object. BAPI enables SAP and third party applications to interact and integrate
with each other at the Business Object / Process level.
Check this link to know more about BAPI.
http://www.sapgenie.com/abap/bapi/example.htm
http://sappoint.com/abap/
Batch Data Communication (BDC) is the oldest batch interfacing technique that SAP provided since the early versions of R/3. BDC is not a
typical integration tool, in the sense that, it can be only be used for uploading data into R/3 and so it is not bi-directional.
BDC works on the principle of simulating user input for transactional screen, via an ABAP program. Typically the input comes in the form
of a flat file. The ABAP program reads this file and formats the input data screen by screen into an internal table (BDCDATA). The
transaction is then started using this internal table as the input and executed in the background.
In Call Transaction, the transactions are triggered at the time of processing itself and so the ABAP program must do the error handling.
It can also be used for real-time interfaces and custom error handling & logging features. .
To know more about BDC,
check the link.
http://sappoint.com/abap/
Main differences are...
In case of bdc data transfer takes place from flat file into sap system ie the file existing in sap system to sap sytem
where is bapi's r remotly enabled function modules which are assigned to some business objects n used to transfer the data between different business partners who are using different systems other than sap.
not only that...
when you plan to upgrade your system version then bdc willnot support those upgradations where as bapi's will support.
<b><REMOVED BY MODERATOR></b>
Manish
Message was edited by:
Alvaro Tejada Galindo -
Need to Post Components in Production Order in MB1A through BAPI as Planned Good Issue
Hi ,
I have created a Program to upload data s for MB1A through BDC , it works fine, but for huge data s it takes more time. alternatively created one more Program which updates through BAPI Function Module "BAPI_GOODSMVT_CREATE". It works fine , but one issue noted, after posting through Function Module , components are posted as Unplanned Goods Issue. I need to post the components as " Planned Goods Issue" instead of "Unplanned Goods Issue " . This can viewed through Tcode : C003
Below are the inputs passed for BAPI Function Moduel
**&------Header Contents of bapi Upload-------------------&*
header-pstng_date = sy-datum. " Posting date
header-doc_date = sy-datum. " Document Date
header-header_txt = '000001002280'. " Header text
header-pr_uname = sy-uname. " User Name
header-ref_doc_no = '000001002280'. " Header Ref. Doc. No.
CONCATENATE sy-uname sy-uzeit c_method INTO header-ref_doc_no_long SEPARATED BY '-'. " Refer Text
*Item Data
wa_item-material = '000000000010000800'. "Material
wa_item-plant = '3910'. "Plant
wa_item-stge_loc = 'WIP'. "Storage Location
wa_item-move_type = '261'. "Movement Type
wa_item-entry_qnt = '1'. "Quantity
wa_item-entry_uom = 'PC'. "Unit
*wa_item-res_item = 1. "Reservation Item
*wa_item-reserv_no = " Reservation Number
wa_item-batch = '0000011027'. "Batch No
*wa_item-mvt_ind = 'F'. "Movement Indicator
*wa_item-stck_type = 'F'. "Stock Type
wa_item-orderid = '000001002260'. "Order ID
wa_item-prod_date = SY-DATUM.
*wa_item-GL_Account = '610000'. "GL Account
*TRANSLATE wa_item-batch TO UPPER CASE.
*APPEND wa_item TO it_item.
c_code = '03'.
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
goodsmvt_header = header
goodsmvt_code = c_code
TABLES
goodsmvt_item = it_item
goodsmvt_serialnumber = it_sno
return = return.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
wait = 'X'.
commit work and wait.
Even i tried to pass "Movement Indicator , GL Account etc" , Still not able to fix the issue. Can anyone suggest how to post the Production Order components as "Planned Goods Issue". I am not sure any other values to be password.
BR,
MuraliI have made something like your :
* Alimtentation de la BAPI de mouvement de stock MM.
move : sy-datum to ls_header-pstng_date ,
sy-datum to ls_header-doc_date ,
* Indique le code mouvement
'03' to lw_code. " 03 normalement, mais je veux que ca plante
loop at lt_ltap
into ls_ltap.
move : ls_ltap-matnr to ls_item-material ,
ls_ltap-werks to ls_item-plant ,
ls_ltap-lgort to ls_item-stge_loc ,
'261' to ls_item-move_type ,
ls_ltap-vsolm to ls_item-entry_qnt ,
ls_ltap-meins to ls_item-entry_uom ,
i_ltak_vb-benum to ls_item-orderid ,
i_ltak_vb-rsnum to ls_item-reserv_no ,
ls_ltap-rspos to ls_item-res_item ,
ls_ltap-rsart to ls_item-res_type.
append ls_item to lt_item.
clear ls_item.
endloop.
I have to put the reservation number to have it works.
Fred -
Hi i want to ceate customer through bapi with external no range not implici
hi i want to create customer through bapi which facilitates to enter customer code(our own defined not the sequentially next no.)
i have gone through F.M BAPI_CUSTOMER_CREATEFROMDATA1 BUT NOT ABLE TO UNDERSTAND HOW TO INPUT PARAMETER FOR CUSTOMER_CODE.
PLEASE GUIDE ME IF ANY ONE AWARE ABOUT THAT.
THANKS
Moderator message: please don't use all caps from now on.
Edited by: Thomas Zloch on Aug 4, 2010 6:12 PMIf the iTunes database files are on that drive, launch iTunes with the Shift key(Windows) or Option key(Mac OS X) held down, select Choose Library, and navigate to it. The computer may need to be authorized to play protected content, and if the library contains rented movies, those won't play.
If not, import the content to an iTunes library.
(100371)
Maybe you are looking for
-
MSI Tv @nywhere Master (MS-8606) Little Problem w/Video
hmm ive notice somthing wrong with my Video... i took two screen shots to show http://yuz.p5.org.uk/video01.jpg if anyone knows the cause or a fix please tell me Best Regards Yuz
-
How to capture the execution plan for a query
HI All, Can anyone please help me in finding out the command to capture the execution plan for a query. Execution plan for select * from EMP where <Condtions> it is getting executed successfully but i need to get the proper execution plan for the sam
-
Hi guys, I need guidance for using the T code XD99. Am not able to create a variant.I want to add value to the field of credit control area in KNVV. How do I go about? Can you please guide me. Thanks in advance.
-
I am currently on the Nation Talk FS 700 plan for $60/month plus 3 extra lines @ $9.99/ each. It appears that this plan has been discontinued and is now replaced by a slightly different plan name with 700 anytime minutes for $89.99 month. I'd like
-
How to import two kms in one interface(at one staging area)
Hi All, I am new to odi please help.... 1)In my interface i am using IKM SQL Increment.. i want to import on more IKM SQL to SQL how do i import this into my interface i am getting only one KM at a time i need two how to do that .. 2)i am using two d