Update the Oracle Table using BAPI
Hi All,
I would like to update Oracle Data Base with my custom BAPI using the Business Logic Transaction.
Could any one please give me some logic how to do it?.
Thanks
R M
RM,
Please follow the steps below:
1) Create and Configure the Data Server for the database you want to access/update (basically
you are creating a database connection here).
2) Save and test the connection by clicking the 'Status' button
3) Create new query template with template type as 'SQL Query' and select the server you have
configured in step#1
4) Select the mode as 'Command' and type-in your Insert/Update statements in the 'Fixed Query'
tab. For example: insert into yourtable values ('[Param.1]','[Param.2]')
5) Test the query by passing parameters from the 'Parameters' tab. You are supposed to get a
'Command Execution Successful' message if the data is successfully posted to the database.
6) Create a 'SQL Query' action block in your Business logic transaction to access the above query
and map your Param.1, Param.2 etc. to your BAPI result (on the Link Editor).
Hope this helps.
John
Similar Messages
-
I want to update the Custom table using the data available in ITAB.
Hi,
I want to updaste the Custom Table which is created by me (Ztable) using the data available in itab.(which i got from defferent standard tables)
I want to update the custom table using the itab data How is it possible?
Is any possible by using Modify ?
DPK.example here
modifying datbase table useing internal table
advises before updating this datbase table plz lock that table to avoid incosistency
write the logic for modifying
Modify the database table as per new dunning procedure
MODIFY fkkvkp FROM TABLE lt_fkkvkp .
and finally unlock the table
example
*To lock table for further operations
constants: lc_tabname TYPE rstable-tabname VALUE 'FKKVKP' . "FKKVKP
CALL FUNCTION 'ENQUEUE_E_TABLE'
EXPORTING
tabname = lc_tabname
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3.
IF sy-subrc EQ 0.
To fetch all the contract accounts for customers of the segment
Households/SME.
PERFORM fetch_contract_accounts using lc_tabname .
ENDIF. " IF sy-subrc EQ 0.
*wrote the logic
Modify the database table as per new dunning procedure from internal table
MODIFY fkkvkp FROM TABLE lt_fkkvkp .
*unlock the tbale
CALL FUNCTION 'DEQUEUE_E_TABLE'
EXPORTING
TABNAME = uc_tabname . -
How to update the Weekly data using BAPI for MD61
Hi All,
i have used two BAPI's in my Z program to upload data from flat file to sap-system (BAPI_REQUIREMENTS_GETDETAIL and BAPI_REQUIREMENTS_CHANGE) and i uploaded the Monthly Data from the flat file on sap system successfully.
but i have to also upload the Weekly Data on the sap system using BAPI.
is there any BAPI for the same or what can be the solution for the uploading weekly data on sap system ?
Please reply me.
Thanks in advance..
Edited by: Prajapati_Shyam on Dec 29, 2010 4:19 PMHi Jovito,
thanks for your reply,
i developed a Z program to upload monthly data as well as weekly data into tcode MD61 by selecting the radio button weekly or monthly but i am not able to upload the weekly data as i didnt' get any BAPI OR any other logic to upload weekly data Or not able to use the existing BAPI BAPI_Requirement_create , because the upload file is in monthly format.
MD61 tcode can be used for both data (Monthly or weekly data).
can you suggesst me any BAPI to upload the weekly data or any other logic for the same
thanks & regards
Prajapati -
Material Master: Update the Z fields using BAPI
Hi to all,
My requirement is simple. But I do not have much knowledge on BAPI. I have got some information that we can extend th BAPI and update the Z fields in material master. I have added the z fields in MARA. So when I call the bapi z fields has to get update.
Which BAPI can i use? I have got one BAPI - BAPI_MATERIAL_SAVEDATA. plz suggest me to do it.
1. how do i enhance the BAPI or extend th BAPI.
2. Is ther any approch to do it.
thnks
Yerukala SettyHi,
Append the z fields to BAPI_TE_MARA and BAPI_TE_MARAX structures using append structures.
Populate two structures for the fields in BAPI_TE_MARA and BAPI_TE_MARAX.
To BAPI_MATERIAL_SAVEDATA, under EXTENSIONIN parameters, pass structure name as BAPI_TE_MARA and Value Part1, 2, 3, 4 with the filled structure info.
Similarly append X structure as well.
Regards,
Ganga -
How to update the database table using webdynpro??
Hi,
Can anybody helm me in updating database table....by entering the values on the output screen of webdynpro component??should i use any commit statement in function module ,which i used to update.hi martina....
consider you are having two input fields bound to attr1 and attr2.
now after pressing the save button:
just read teh two attributes to field1, field2 using code wizard. then
<db name>-<fieldname1> = <field1>.
<db name>-<fieldname2> = <field2>.
insert <dbname>.
---regards,
alex b justin -
Jython error while updating a oracle table based on file count
Hi,
i have jython procedure for counting counting records in a flat file
Here is the code(took from odiexperts) modified and am getting errors, somebody take a look and let me know what is the sql exception in this code
COMMAND on target: Jython
Command on source : Oracle --and specified the logical schema
Without connecting to the database using the jdbc connection i can see the output successfully, but i want to update the oracle table with count. any help is greatly appreciated
---------------------------------Error-----------------------------
org.apache.bsf.BSFException: exception from Jython:
Traceback (innermost last):
File "<string>", line 45, in ?
java.sql.SQLException: ORA-00936: missing expression
---------------------------------------Code--------------------------------------------------
import java.sql.Connection
import java.sql.Statement
import java.sql.DriverManager
import java.sql.ResultSet
import java.sql.ResultSetMetaData
import os
import string
import java.sql as sql
import java.lang as lang
import re
filesrc = open('c:\mm\xyz.csv','r')
first=filesrc.readline()
lines = 0
while first:
#get the no of lines in the file
lines += 1
first=filesrc.readline()
#print lines
## THE ABOVE PART OF THE PROGRAM IS TO COUNT THE NUMBER OF LINES
## AND STORE IT INTO THE VARIABLE `LINES `
def intWithCommas(x):
if type(x) not in [type(0), type(0L)]:
raise TypeError("Parameter must be an integer.")
if x < 0:
return '-' + intWithCommas(-x)
result = ''
while x >= 1000:
x, r = divmod(x, 1000)
result = ",%03d%s" % (r, result)
return "%d%s" % (x, result)
## THE ABOVE PROGRAM IS TO DISPLAY THE NUMBERS
sourceConnection = odiRef.getJDBCConnection("SRC")
sqlstring = sourceConnection.createStatement()
sqlstmt="update tab1 set tot_coll_amt = to_number( "#lines ") where load_audit_key=418507"
sqlstring.executeQuery(sqlstmt)
sourceConnection.close()
s0=' \n\nThe Number of Lines in the File are ->> '
s1=str(intWithCommas(lines))
s2=' \n\nand the First Line of the File is ->> '
filesrc.seek(0)
s3=str(filesrc.readline())
final=s0 + s1 + s2 + s3
filesrc.close()
raise finali changed as you adviced ankit
am getting the following error now
org.apache.bsf.BSFException: exception from Jython:
Traceback (innermost last):
File "<string>", line 37, in ?
java.sql.SQLException: ORA-00911: invalid character
here is the modified code
sourceConnection = odiRef.getJDBCConnection("SRC")
sqlstring = sourceConnection.createStatement()
sqlstmt="update tab1 set tot_coll_amt = to_number('#lines') where load_audit_key=418507;"
result=sqlstring.executeUpdate(sqlstmt)
sourceConnection.close()
Any ideas
Edited by: Sunny on Dec 3, 2010 1:04 PM -
How to Update the oracle toad column value in table by using SSRS 2008
Hi Team,
How to update the oracle DB table column value by using SSRS 2008.
Can any one help me on this.
Thanks,
Manasa.
Thank You, Manasa.VHi veerapaneni,
According to your description, you want to use SSRS to update data in database table. Right?
Though Reporting Services is mostly used for rendering data, your requirement is still can be achieved technically. You need to create a really complicated stored procedure. Pass insert/delete/update and the columns we need to insert/delete/update as
parameters into the stored procedure. When we click "View Report", the stored procedure will execute so that we can execute insert/delete/update inside of the stored procedure. Please take a reference to two related articles below:
Update Tables with Reporting Services – T-SQL Tuesday #005
SQL Server: Using SQL Server Reporting Services to Manage Data
If you have any question, please feel free to ask.
Best Regards,
Simon Hou -
How to update the ztable by using table handling function
how to update the ztable by using table handling function
It is very urgent ...............................
thanks in advancesee the below code for the direct ztable update
Report ZUPDATE_PRPS.
tables: zprps.
parameter: p_wbs like zprps-pspnr,
p_value like zprps-fakkz default 'X'.
data: wa_fakkz type zprps-fakkz.
*START-OF_SELECTION
start-of-selection.
call function 'CONVERSION_EXIT_ABPSP_INPUT'
exporting
input = p_wbs
importing
output = p_wbs
exceptions
not_found = 1
others = 2.
select single fakkz
into wa_fakkz
from zprps
where pspnr eq p_wbs.
if sy-subrc eq 0.
update zprps set fakkz = p_value where PSPNR eq p_wbs.
if p_value is initial.
message i999(za) with 'Billing element field has been unchecked'.
else.
message i999(za) with 'Billing element field has been checked'.
endif.
else.
message i999(za) with 'WBS element not found'.
endif.
reward points if it is usefull .....
Girish -
Planner group is not updated in service notification using BAPI
Hi,
Planner group is not updated in service notification using BAPI BAPI_ALM_ORDER_MAINTAIN.
I have written the below code, but planner group is not updated in the service notification.
Please advice which parameters do i need to pass to update planner group in the service notification.
wa_methods-refnumber = '000001'.
wa_methods-objecttype = 'PARTNER'.
wa_methods-method = 'CREATE'.
wa_methods-objectkey = wa_subscr1-aufnr.
APPEND wa_methods TO i_methods.
wa_methods-refnumber = '000002'.
wa_methods-objecttype = 'HEADER'.
wa_methods-method = 'CREATE'.
wa_methods-objectkey = wa_subscr1-aufnr.
APPEND wa_methods TO i_methods.
wa_methods-refnumber = '000000'.
wa_methods-objecttype = ' '.
wa_methods-method = 'SAVE'.
APPEND wa_methods TO i_methods.
REFRESH i_partner.
CLEAR wa_partner.
wa_partner-orderid = wa_subscr1-aufnr.
wa_partner-partn_role = 'VW'.
wa_partner-partn_role_old = ''.
wa_partner-partner = wa_subscr1-parnr.
wa_partner-partner_old = ''.
APPEND wa_partner TO i_partner.
REFRESH i_planrgrp.
CLEAR wa_planrgrp.
wa_planrgrp-orderid = wa_subscr1-aufnr.
wa_planrgrp-plangroup = wa_subscr1-ingpr.
APPEND wa_planrgrp TO i_planrgrp.
REFRESH i_planrgrp_up.
CLEAR wa_planrgrp_up.
wa_planrgrp_up-orderid = wa_subscr1-aufnr.
wa_planrgrp_up-plangroup = 'X'.
APPEND wa_planrgrp_up TO i_planrgrp_up.
*----Change order details with Technician name
CALL FUNCTION 'BAPI_ALM_ORDER_MAINTAIN'
TABLES
it_methods = i_methods
it_header = i_planrgrp
it_header_up = i_planrgrp_up
it_partner = i_partner
return = i_return.
Thanks & regards,
KrishnaTry this way
CALL FUNCTION 'BAPI_SERVNOT_CREATE'
EXPORTING
* EXTERNAL_NUMBER =
notif_type = 'S3'
notifheader = ls_notif_h
* TASK_DETERMINATION = ' '
* SENDER =
* ORDERID =
IMPORTING
NOTIFHEADER_EXPORT = ls_notif_e
TABLES
* NOTITEM =
* NOTIFCAUS =
* NOTIFACTV =
* NOTIFTASK =
* NOTIFPARTNR =
* LONGTEXTS =
* KEY_RELATIONSHIPS =
return = lt_return
* IF lt_return IS INITIAL. " <<< Comment this lie
read table lt_return into ls_return with key type = 'E'. " << Change
if sy-subrc ne 0. " << Change
COMMIT WORK AND WAIT.
write: / ls_notif_e-NOTIF_NO.
ELSE.
LOOP AT lt_return INTO ls_return.
WRITE:/ 'errors'.
* ls_return.
ENDLOOP.
endif.
a® -
Updating T'code ME23N using BAPI's
Dear All,
I am updating T'code ME23N using BAPI " BAPI_PO_CHANGE". First i m tried in SE37 there its not updating it giving error like " PO could not be changed using the Enjoy-BAPI" for this i m trying in 4.6c.
Here i have to update only two check boxes those are NO_MORE_GR(ELIKZ) and FINAL_INV(EREKZ).
Please tell me any one there are any other BAPI's are avialable or how to slove this porblem.
Best Regards,
Srinivas.Hello
I just have run this code in 4.6C. It working fine.
DATA: xreturn like BAPIRET2 occurs 0 with header line,
xpoitem like BAPIMEPOITEM occurs 0 with header line,
xpoitemx like BAPIMEPOITEMX occurs 0 with header line.
xpoitem-po_item = p_ebelp. " set position here
xpoitem-no_more_gr = 'X'.
xpoitem-final_inv = 'X'.
append xpoitem.
xpoitemx-po_item = p_ebelp. " set position here
xpoitemx-no_more_gr = 'X'.
xpoitemx-final_inv = 'X'.
append xpoitemx.
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder = p_ebeln "set ebeln here
TABLES
return = xreturn
poitem = xpoitem
poitemx = xpoitemx.
if sy-subrc = 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING WAIT = 'X'.
endif. -
Trying to update the business partner using BAPI_BUPA_CENTRAL_CHANGE
Hi all ,
i am tryibg to create a function module which updates the first name, last name, email id of the business partner that i already created. the return table shows zero entries and i dont find any udate being done for the business partner if i go and check in the respective table. can some one tell me what is the problem.
Import paramters for my function module are business partner number, first name, last name, email -d.
FUNCTION Z_CHANGE_BP2.
""Local Interface:
*" IMPORTING
*" VALUE(CUST_NO) TYPE BU_PARTNER
*" VALUE(FIRST_NAME) TYPE BU_NAMEP_F
*" VALUE(LAST_NAME) TYPE BU_NAMEP_L
*" VALUE(EMAIL_ID) TYPE AD_SMTPADR
*" TABLES
*" IT_RETURN2 STRUCTURE ZRETURN1 OPTIONAL
*" IT_RETURN4 STRUCTURE ZRETURN1 OPTIONAL
Defining the internal tables used in BAPI BAPI_BUPA_CENTRAL_CHANGE.
DATA: it_CENTRALDATA TYPE STANDARD TABLE OF BAPIBUS1006_CENTRAL WITH HEADER LINE.
DATA: it_CENTRALDATAPERSON TYPE STANDARD TABLE OF BAPIBUS1006_CENTRAL_PERSON WITH HEADER LINE.
DATA: it_E_MAILDATANONADDRESS TYPE STANDARD TABLE OF BAPIADSMTP WITH HEADER LINE.
DATA: it_RETURN1 TYPE STANDARD TABLE OF BAPIRET2 WITH HEADER LINE.
DATA: it_RETURN3 TYPE STANDARD TABLE OF BAPIRET2 WITH HEADER LINE.
****Values for seacrh term1, search term2 of it_CENTRALDATA
it_CENTRALDATA-SEARCHTERM1 = FIRST_NAME.
it_CENTRALDATA-SEARCHTERM2 = LAST_NAME.
APPEND it_CENTRALDATA TO it_CENTRALDATA.
first name, last name of it_CENTRALDATAPERSON
it_CENTRALDATAPERSON-FIRSTNAME = FIRST_NAME.
it_CENTRALDATAPERSON-LASTNAME = LAST_NAME.
APPEND it_CENTRALDATAPERSON TO it_CENTRALDATAPERSON.
Value for E_MAIL of it_TELEFONDATANONADDRES-
it_E_MAILDATANONADDRESS-E_MAIL = EMAIL_ID.
APPEND it_E_MAILDATANONADDRESS TO it_E_MAILDATANONADDRESS.
Call the BAPI BAPI_BUPA_CENTRAL_CHANGE
CALL FUNCTION 'BAPI_BUPA_CENTRAL_CHANGE'
EXPORTING
BUSINESSPARTNER = CUST_NO
CENTRALDATA = it_CENTRALDATA
CENTRALDATAPERSON = it_CENTRALDATAPERSON
TABLES
E_MAILDATANONADDRESS = it_E_MAILDATANONADDRESS
RETURN = it_RETURN1.
Call Commit work
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
IMPORTING
RETURN = it_RETURN3.
ENDFUNCTION.Hi,
Pass values to the Parameter CENTRALDATA_X in your FM 'BAPI_BUPA_CENTRAL_CHANGE'
Something Like:
CALL FUNCTION 'BAPI_BUPA_CENTRAL_CHANGE'
EXPORTING
businesspartner = bpartner
centraldata = centraldatadetail
centraldataperson = centraldataperson
CENTRALDATAORGANIZATION =
CENTRALDATAGROUP =
centraldata_x = centraldata_x
centraldataperson_x = centraldataperson_x
CENTRALDATAORGANIZATION_X =
CENTRALDATAGROUP_X =
TABLES
return = return.
Refer to:
problem with 'BAPI_BUPA_CENTRAL_CHANGE'
http://sap.ittoolbox.com/groups/technical-functional/sap-dev/bapi-bupa_central_change-need-help-549117 -
Real time update in Oracle Table
Hi Friends,
I have a new requirement (challenging) and i need your inputs to proceed further.
User is expecting an real time update in Oracle Table.
Example:
I have an Oracle (10g) table DDSX-CALENDAR table. whenever a record(new) gets inserted into this table, i need to take this record and update the other oracle table (10g) existing in a different environment (schema and server).
Please let me your inputs about handling this requirement.
Thanks for your time.
Regards,
Diwakar DayalanThanks Prasath.
I beleive for setting up the DBlink the user needs to have DBA role.
How do we know the data has been inserted into the source, do i need to use a trigger for that ?
In which way i can use the DB link inside a trigger to update the values in the target table.
Example
My source tables is
DDSX_STR_BANK
Store Number Bank Name Bank Account Number
0001 BOA 111111111111 (assume previous value is 222222222222 )
0002 BOA 222222222222 (assume previous value is 111111111111).
Now two store numbers have got its bank account number updated in the source and the value is inserted, Now my requirement is once the value is inserted in the source, i need to update bank account number in SSDX_STR_BANK table in a different server and schema.
SSDX_STR_BANK
Store Number Bank Account Number
0001 222222222222
0002 111111111111
Update the bank account numbers in Sync with the DDSX_STR_BANK.
Please guide me how to proceed with this requirement.
Thanks,
Divakar -
Updation in synchronous mode using bapi
hi all ,
i have a requirement to update master table using bapi /SAPMP/BAPI_MATERIAL_SAVEDATA where has it is taking more time can any one of you sugguest what will be the best approach which i can improve the execution time and can u tell me whether i can execute bapi in synchronous mode.
with regards,
abaperHi,
You can go for either BDC or LSMW also.
Regards,
Renjith Michael. -
Creating a material with just the basic view using BAPI
Hi
I intend to create a new material with just the basic view using BAPI BAPI_MATERIAL_SAVEDATA -
To do this - I believe I have to fill in the structure HEADDATA data - ( mandatory ) with the required values - I fill values for fields IND_SECTOR, MATL_TYPE & basic view ( check this field ) and leave the MATERIAL field as blank (assuming internal numbering ) and then fill values of the CLIENTDATA structure with values for the basic data view.
Is this correct ? Will my material number created be returned in the RETURN structure - how do I look for the material number exclusively in my RETURN structure ?hi
good
go through this progarm which ll give you detail idea about BAPI_MATERIAL_SAVEDATA
REPORT ZBAPIMM01 LINE-SIZE 255 NO STANDARD PAGE HEADING
LINE-COUNT 065(001).
TABLES: T001L, "Storage Locations
MARA, "General Material Data
MAKT, "Material Descriptions
MBEW, "Material Valuation
MARC. "Plant Data for Material
DATA: BAPI_HEAD LIKE BAPIMATHEAD,
BAPI_MAKT LIKE BAPI_MAKT, "Material Description
BAPI_MARA1 LIKE BAPI_MARA, "Client Data
BAPI_MARAX LIKE BAPI_MARAX,
BAPI_MARC1 LIKE BAPI_MARC, "Plant View
BAPI_MARCX LIKE BAPI_MARCX,
BAPI_MBEW1 LIKE BAPI_MBEW, "Accounting View
BAPI_MBEWX LIKE BAPI_MBEWX,
BAPI_RETURN LIKE BAPIRET2.
DATA: BEGIN OF INT_MAKT OCCURS 100.
INCLUDE STRUCTURE BAPI_MAKT.
DATA: END OF INT_MAKT.
DATA: BEGIN OF INT_MAT 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
GEWEI(3), "Weight Unit
SPART(2), "Division
EKGRP(3), "Purchasing group
VPRSV(1), "Price control indicator
STPRS(12), "Standard price
PEINH(3), "Price unit
SPRAS(2), "Language key
MAKTX(40), "Material description
END OF INT_MAT.
SELECT-OPTIONS:
PLANT FOR MARC-WERKS OBLIGATORY MEMORY ID PLT,
MATERIAL FOR MARA-MATNR MEMORY ID MAT,
MATLTYPE FOR MARA-MTART MEMORY ID MTY,
DIVISION FOR MARA-SPART MEMORY ID DIV.
PARAMETERS: F_FILE LIKE RLGRAP-FILENAME
DEFAULT 'C:\DATA\ZMATERIAL.XLS' MEMORY ID F_FILE,
GETDATA AS CHECKBOX, "Tick to download materials data to local harddisk
UPDDATA AS CHECKBOX. "Tick to update date to Materials Master
IF GETDATA = 'X'.
PERFORM DOWNLOAD_DATA.
PERFORM DOWNLOAD_FILE.
ENDIF.
IF UPDDATA = 'X'.
PERFORM UPLOAD_FILE.
PERFORM UPDATE_MM.
ENDIF.
FORM DOWNLOAD_DATA.
SELECT * FROM MARC WHERE LVORM EQ ' '
AND WERKS IN PLANT
AND MATNR IN MATERIAL.
CLEAR MARA.
SELECT SINGLE * FROM MARA WHERE MATNR = MARC-MATNR.
CHECK MATLTYPE.
CHECK DIVISION.
CLEAR MBEW.
SELECT SINGLE * FROM MBEW WHERE MATNR = MARC-MATNR
AND BWKEY = MARC-WERKS.
CLEAR MAKT.
SELECT SINGLE * FROM MAKT WHERE SPRAS = 'EN'
AND MATNR = MARC-MATNR.
WRITE:/ MARC-WERKS, "Plant
MARA-MTART, "Material type
MARA-MATNR, "Material number
MARA-MATKL, "Material group
MARA-MBRSH, "Industry sector
MARA-MEINS, "Base unit of measure
MARA-GEWEI, "Weight Unit
MARA-SPART, "Division
MARC-EKGRP, "Purchasing group
MBEW-VPRSV, "Price control indicator
MBEW-STPRS, "Standard price
MBEW-PEINH, "Price unit
MAKT-SPRAS, "Language key
MAKT-MAKTX. "Material description
INT_MAT-WERKS = MARC-WERKS. "Plant
INT_MAT-MTART = MARA-MTART. "Material type
INT_MAT-MATNR = MARA-MATNR. "Material number
INT_MAT-MATKL = MARA-MATKL. "Material group
INT_MAT-MBRSH = MARA-MBRSH. "Industry sector
INT_MAT-MEINS = MARA-MEINS. "Base unit of measure
INT_MAT-GEWEI = MARA-GEWEI. "Weight Unit
INT_MAT-SPART = MARA-SPART. "Division
INT_MAT-EKGRP = MARC-EKGRP. "Purchasing group
INT_MAT-VPRSV = MBEW-VPRSV. "Price control indicator
INT_MAT-STPRS = MBEW-STPRS. "Standard price
INT_MAT-PEINH = MBEW-PEINH. "Price unit
INT_MAT-SPRAS = MAKT-SPRAS. "Language key
INT_MAT-MAKTX = MAKT-MAKTX. "Material description
APPEND INT_MAT.
CLEAR INT_MAT.
ENDSELECT.
ENDFORM.
FORM DOWNLOAD_FILE.
call function 'WS_DOWNLOAD'
EXPORTING
FILENAME = F_FILE
FILETYPE = 'DAT'
FILETYPE = 'WK1'
tables
data_tab = INT_MAT
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_WRITE_ERROR = 2
INVALID_FILESIZE = 3
INVALID_TYPE = 4
NO_BATCH = 5
UNKNOWN_ERROR = 6
INVALID_TABLE_WIDTH = 7
GUI_REFUSE_FILETRANSFER = 8
CUSTOMER_ERROR = 9
OTHERS = 10.
IF SY-SUBRC = 0.
FORMAT COLOR COL_GROUP.
WRITE:/ 'Data Download Successfully to your local harddisk'.
SKIP.
ENDIF.
ENDFORM.
FORM UPLOAD_FILE.
call function 'WS_UPLOAD'
EXPORTING
FILENAME = F_FILE
FILETYPE = 'DAT'
FILETYPE = 'WK1'
tables
data_tab = INT_MAT
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_WRITE_ERROR = 2
INVALID_FILESIZE = 3
INVALID_TYPE = 4
NO_BATCH = 5
UNKNOWN_ERROR = 6
INVALID_TABLE_WIDTH = 7
GUI_REFUSE_FILETRANSFER = 8
CUSTOMER_ERROR = 9
OTHERS = 10.
IF SY-SUBRC = 0.
FORMAT COLOR COL_GROUP.
WRITE:/ 'Data Upload Successfully from your local harddisk'.
SKIP.
ENDIF.
ENDFORM.
FORM UPDATE_MM.
LOOP AT INT_MAT.
Header
BAPI_HEAD-MATERIAL = INT_MAT-MATNR.
BAPI_HEAD-IND_SECTOR = INT_MAT-MBRSH.
BAPI_HEAD-MATL_TYPE = INT_MAT-MTART.
BAPI_HEAD-BASIC_VIEW = 'X'.
BAPI_HEAD-PURCHASE_VIEW = 'X'.
BAPI_HEAD-ACCOUNT_VIEW = 'X'.
Material Description
REFRESH INT_MAKT.
INT_MAKT-LANGU = INT_MAT-SPRAS.
INT_MAKT-MATL_DESC = INT_MAT-MAKTX.
APPEND INT_MAKT.
Client Data - Basic
BAPI_MARA1-MATL_GROUP = INT_MAT-MATKL.
BAPI_MARA1-BASE_UOM = INT_MAT-MEINS.
BAPI_MARA1-UNIT_OF_WT = INT_MAT-GEWEI.
BAPI_MARA1-DIVISION = INT_MAT-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 = INT_MAT-WERKS.
BAPI_MARC1-PUR_GROUP = INT_MAT-EKGRP.
BAPI_MARCX-PLANT = INT_MAT-WERKS.
BAPI_MARCX-PUR_GROUP = 'X'.
Accounting
BAPI_MBEW1-VAL_AREA = INT_MAT-WERKS.
BAPI_MBEW1-PRICE_CTRL = INT_MAT-VPRSV.
BAPI_MBEW1-STD_PRICE = INT_MAT-STPRS.
BAPI_MBEW1-PRICE_UNIT = INT_MAT-PEINH.
BAPI_MBEWX-VAL_AREA = INT_MAT-WERKS.
BAPI_MBEWX-PRICE_CTRL = 'X'.
BAPI_MBEWX-STD_PRICE = 'X'.
BAPI_MBEWX-PRICE_UNIT = 'X'.
WRITE:/ BAPI_HEAD, BAPI_MARC1.
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 =
STORAGELOCATIONDATAX =
VALUATIONDATA = BAPI_MBEW1
VALUATIONDATAX = BAPI_MBEWX
WAREHOUSENUMBERDATA =
WAREHOUSENUMBERDATAX =
SALESDATA = BAPI_MVKE1
SALESDATAX = BAPI_MVKEX
STORAGETYPEDATA =
STORAGETYPEDATAX =
IMPORTING
RETURN = BAPI_RETURN
TABLES
MATERIALDESCRIPTION = INT_MAKT
UNITSOFMEASURE =
UNITSOFMEASUREX =
INTERNATIONALARTNOS =
MATERIALLONGTEXT =
TAXCLASSIFICATIONS =
RETURNMESSAGES =
PRTDATA =
PRTDATAX =
EXTENSIONIN =
EXTENSIONINX =
IF BAPI_RETURN-TYPE = 'E'.
WRITE:/ 'Error Message ', BAPI_RETURN.
ENDIF.
ENDLOOP.
ENDFORM.
*---End of Program
thanks
mrutyun^ -
Need a PLSQL API for update the oe_order_headers_all table
Hi all,
I need a PLSQL API for update the oe_order_headers_all table.
Anyone know please help me.
Regards,
M.Soundrapandian.Use the Process Order API to update this table.
Note: 746787.1 - Process Order API In Order Management
https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=746787.1
Oracle Order Management Open Interfaces, API, & Electronic Messaging Guide
http://download-uk.oracle.com/docs/cd/B25516_14/current/acrobat/115omapi.zip
Oracle Integration Repository
http://irep.oracle.com
Maybe you are looking for
-
Itunes will not open on my pc and i have downloaded it a few times now
itunes will not open on my pc homepage and i have now downloaded it bout 5 times everytime it downloads and the does not load any help ?
-
Doubt in the value return by the function based on given condition
Hi, Below function should return the value based on the value of in_row_number_high variable. I have used CASE but it does't return proper value. How could I give that condition? Please help. FUNCTION gen_total_lane_count_pct in_lane_id
-
need help fixing my itune, when i click on it it wont open all i see is a ? on it.
-
Iphone can't start up! Blackout! HELP!
I am in Singapore... I got my phone 6days back. Yesterday after i sent one sms out & when i pressed the "Sleep/wake up" button. No image/ nothing happens to the phone. Wonder if the sleep/wake up button got stuck... or what... Tried holding/ pressing
-
Can't update to the latest (v52) firmware version ...
Other people can update their software but I cannot, although we have the same Nokia device model. What's wrong? Update availability is based on many things, including existing Nokia device firmware version, country, and operator. It may be due to on