InterFace Programming : Create Material.
Hi Gurus,
I want to create one interface program for creating new material from External system like foxpro.
I don't have any knowledge about writing interface programs.
I anyone from u please tell me how to write this program.
thanks in advance.
Vinod.
Hi ,
See the sample code
*TO CREATE MATERIAL USING BAPI.
STRUCTURE DECLARATIONS *
TABLES: BAPIMATHEAD, "Headerdata
BAPI_MARA, "Clientdata
BAPI_MARAX, "Clientdatax
BAPI_MARC, "Plantdata
BAPI_MARCX, "Plantdatax
BAPI_MAKT, "Material description
BAPI_MBEW, "VALUATION DATA
BAPI_MBEWX,
BAPI_MARM,
BAPI_MARMX,
bapi_mean,
BAPIRET2. "Return messages
DATA:V_FILE TYPE STRING. "input data file
DATA:
BEGIN OF LSMW_MATERIAL_MASTER,
MATNR(018) TYPE C, "Material number
MTART(004) TYPE C, "Material type
MBRSH(001) TYPE C, "Industry sector
WERKS(004) TYPE C, "Plant
MAKTX(040) TYPE C, "Material description
DISMM(002) TYPE C, "Extra Field Added In the Program as itsrequired
MEINS(003) TYPE C, "Base unit of measure
MATKL(009) TYPE C, "Material group
SPART(002) TYPE C, "Division
LABOR(003) TYPE C, "Lab/office
PRDHA(018) TYPE C, "Product hierarchy
MSTAE(002) TYPE C, "X-plant matl status
MTPOS_MARA(004) TYPE C, "Gen item cat group
<b>BRGEW(017) TYPE C, "Gross weight
GEWEI(003) TYPE C, "Weight unit</b> NTGEW(017) TYPE C, "Net weight
GROES(032) TYPE C, "Size/Dimensions
MAGRV(004) TYPE C, "Matl grp pack matls
BISMT(018) TYPE C, "Old material number
WRKST(048) TYPE C, "Basic material
PROFL(003) TYPE C, "DG indicator profile
KZUMW(001) TYPE C, "Environmentally rlvt
BSTME(003) TYPE C, "Order unit
VABME(001) TYPE C,
EKGRP(003) TYPE C, "Purchasing group
XCHPF(001) TYPE C, "Batch management
EKWSL(004) TYPE C, "Purchasing key value
WEBAZ(003) TYPE C, "GR processing time
MFRPN(040) TYPE C, "Manufacturer part number
MFRNR(010) TYPE C, "Manufacturer number
VPRSV(001) TYPE C, "Price control indicator
STPRS(015) TYPE C, "Standard price
BWPRH(014) TYPE C, "Commercial price1
BKLAS(004) TYPE C, "Valuation class
bwkey(004) type c,
END OF LSMW_MATERIAL_MASTER.
INTERNAL TABLE DECLARATIONS *
*to store the input data
DATA:
BEGIN OF it_matmaster OCCURS 0.
INCLUDE STRUCTURE LSMW_MATERIAL_MASTER.
DATA:
END OF it_matmaster.
*for material description
DATA:BEGIN OF IT_MATERIALDESC OCCURS 0.
INCLUDE STRUCTURE BAPI_MAKT .
DATA:END OF IT_MATERIALDESC.
*FOR gross wt
data: begin of it_uom occurs 0.
include structure BAPI_MARM.
data:end of it_uom.
DATA: BEGIN OF IT_UOMX OCCURS 0.
INCLUDE STRUCTURE BAPI_MARMX.
DATA:END OF IT_UOMX.
data:begin of it_mean occurs 0.
include structure bapi_mean.
data:end of it_mean.
DATA:BEGIN OF IT_MLTX OCCURS 0.
INCLUDE STRUCTURE BAPI_MLTX.
DATA:END OF IT_MLTX.
*to return messages
DATA:BEGIN OF IT_RETURN OCCURS 0.
INCLUDE STRUCTURE BAPIRET2.
DATA:END OF IT_RETURN.
SELECTION SCREEN *
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-002.
PARAMETERS:P_FILE LIKE RLGRAP-FILENAME OBLIGATORY.
SELECTION-SCREEN END OF BLOCK B1 .
AT SELECTION SCREEN *
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = 'P_FILE'
IMPORTING
FILE_NAME = P_FILE.
TO UPLOAD THE DATA *
START-OF-SELECTION.
V_FILE = P_FILE.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = V_FILE
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
HEADER_LENGTH = 0
READ_BY_LINE = 'X'
DAT_MODE = ' '
IMPORTING
FILELENGTH =
HEADER =
tables
data_tab = IT_MATMASTER
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*ELSE.
*DELETE IT_MATMASTER INDEX 1.
ENDIF.
DATA POPULATIONS *
LOOP AT IT_MATMASTER.
*HEADER DATA
BAPIMATHEAD-MATERIAL = IT_MATMASTER-MATNR.
BAPIMATHEAD-IND_SECTOR = IT_MATMASTER-Mbrsh.
BAPIMATHEAD-MATL_TYPE = IT_MATMASTER-Mtart.
BAPIMATHEAD-BASIC_VIEW = 'X'.
BAPIMATHEAD-PURCHASE_VIEW = 'X'.
BAPIMATHEAD-ACCOUNT_VIEW = 'X'.
*CLIENTDATA
BAPI_MARA-MATL_GROUP = IT_MATMASTER-MATKL.
BAPI_MARA-DIVISION = IT_MATMASTER-SPART.
BAPI_MARA-DSN_OFFICE = IT_MATMASTER-LABOR.
BAPI_MARA-PROD_HIER = IT_MATMASTER-PRDHA.
BAPI_MARA-PUR_STATUS = IT_MATMASTER-MSTAE.
BAPI_MARA-ITEM_CAT = IT_MATMASTER-MTPOS_MARA.
BAPI_MARA-NET_WEIGHT = IT_MATMASTER-NTGEW.
BAPI_MARA-PO_UNIT = 'KG'.
BAPI_MARA-UNIT_OF_WT_ISO = 'KG'.
BAPI_MARA-UNIT_OF_WT = 'KG'.
BAPI_MARA-PACK_VO_UN = 'KG'.
BAPI_MARA-BASE_UOM_ISO = 'KG'.
bapi_mara-size_dim = it_matmaster-groes.
BAPI_MARA-MAT_GRP_SM = IT_MATMASTER-MAGRV.
BAPI_MARA-OLD_MAT_NO = IT_MATMASTER-BISMT.
BAPI_MARA-BASE_UOM = IT_MATMASTER-MEINS.
BAPI_MARA-BASIC_MATL = IT_MATMASTER-WRKST.
BAPI_MARA-HAZMATPROF = IT_MATMASTER-PROFL.
BAPI_MARA-ENVT_RLVT = IT_MATMASTER-KZUMW.
BAPI_MARA-PO_UNIT = IT_MATMASTER-BSTME.
BAPI_MARA-VAR_ORD_UN = IT_MATMASTER-VABME.
BAPI_MARA-PUR_VALKEY = IT_MATMASTER-EKWSL.
BAPI_MARA-MANU_MAT = IT_MATMASTER-MFRPN.
BAPI_MARA-MFR_NO = IT_MATMASTER-MFRNR.
BAPI_MARAX-MATL_GROUP = 'X'.
BAPI_MARAX-DIVISION = 'X'.
BAPI_MARAX-DSN_OFFICE = 'X'.
BAPI_MARAX-PROD_HIER = 'X'.
BAPI_MARAX-PUR_STATUS = 'X'.
BAPI_MARAX-ITEM_CAT = 'X'.
BAPI_MARAX-NET_WEIGHT = 'X'.
BAPI_MARAX-UNIT_OF_WT = 'X'.
BAPI_MARAX-UNIT_OF_WT_ISO = 'X'.
bapi_maraX-size_dim = 'X'.
BAPI_MARAX-MAT_GRP_SM = 'X'.
BAPI_MARAX-OLD_MAT_NO = 'X'.
BAPI_MARAX-BASE_UOM = 'X'.
BAPI_MARAX-BASE_UOM_ISO = 'X'.
BAPI_MARAX-BASIC_MATL = 'X'.
BAPI_MARAX-MFR_NO = 'X'.
BAPI_MARAX-HAZMATPROF = 'X'.
BAPI_MARAX-ENVT_RLVT = 'X'.
BAPI_MARAX-PO_UNIT = 'X'.
BAPI_MARAX-PACK_VO_UN = 'X'.
BAPI_MARAX-VAR_ORD_UN = 'X'.
BAPI_MARAX-PUR_VALKEY = 'X'.
BAPI_MARAX-MANU_MAT = 'X'.
BAPI_MARAX-MFR_NO = 'X'.
*PLANT DATA
BAPI_MARC-PLANT = IT_MATMASTER-WERKS.
BAPI_MARC-PUR_GROUP = IT_MATMASTER-EKGRP.
BAPI_MARC-BATCH_MGMT = IT_MATMASTER-XCHPF.
BAPI_MARC-GR_PR_TIME = IT_MATMASTER-WEBAZ.
BAPI_MARCX-PLANT = IT_MATMASTER-WERKS.
BAPI_MARCX-PUR_GROUP = 'X'.
BAPI_MARCX-BATCH_MGMT = 'X'.
BAPI_MARCX-GR_PR_TIME = 'X'.
*VALUATION DATA
BAPI_MBEW-PRICE_CTRL = IT_MATMASTER-VPRSV.
BAPI_MBEW-STD_PRICE = IT_MATMASTER-STPRS.
BAPI_MBEW-COMMPRICE1 = IT_MATMASTER-BWPRH.
BAPI_MBEW-VAL_AREA = IT_MATMASTER-BWKEY.
BAPI_MBEW-VAL_CLASS = IT_MATMASTER-BKLAS.
BAPI_MBEWX-PRICE_CTRL = 'X'.
BAPI_MBEWX-STD_PRICE = 'X'.
BAPI_MBEWX-COMMPRICE1 = 'X'.
BAPI_MBEWX-VAL_AREA = IT_MATMASTER-BWKEY.
BAPI_MBEWX-VAL_CLASS = 'X'.
IT_MATERIALDESC-LANGU = 'EN'.
IT_MATERIALDESC-MATL_DESC = IT_MATMASTER-MAKTX.
append IT_materialdesc.
<b> IT_UOM-GROSS_WT = IT_MATMASTER-BRGEW.
IT_UOM-ALT_UNIT = 'KG'.
IT_UOM-ALT_UNIT_ISO = 'KG'.
IT_UOM-UNIT_OF_WT = IT_MATMASTER-GEWEI.
APPEND IT_UOM.
IT_UOMX-GROSS_WT = 'X'.
IT_UOMX-ALT_UNIT = 'KG'.
IT_UOMX-ALT_UNIT_ISO = 'KG'.
IT_UOMX-UNIT_OF_WT = 'X'.
APPEND IT_UOMX.</b>
it_mean-unit = 'KD3'.
append it_mean.
it_mltx-langu = 'E'.
it_mltx-text_name = it_matmaster-matnr.
APPEND IT_MLTX.
CALL FUNCTION 'BAPI_MATERIAL_SAVEDATA'
EXPORTING
headdata = BAPIMATHEAD
CLIENTDATA = BAPI_MARA
CLIENTDATAX = BAPI_MARAx
PLANTDATA = BAPI_MARc
PLANTDATAX = BAPI_MARcx
FORECASTPARAMETERS =
FORECASTPARAMETERSX =
PLANNINGDATA =
PLANNINGDATAX =
STORAGELOCATIONDATA =
STORAGELOCATIONDATAX =
VALUATIONDATA = BAPI_MBEW
VALUATIONDATAX = BAPI_MBEWX
WAREHOUSENUMBERDATA =
WAREHOUSENUMBERDATAX =
SALESDATA =
SALESDATAX =
STORAGETYPEDATA =
STORAGETYPEDATAX =
FLAG_ONLINE = ' '
FLAG_CAD_CALL = ' '
IMPORTING
RETURN = IT_RETURN
TABLES
MATERIALDESCRIPTION = IT_MATERIALDESC
UNITSOFMEASURE = IT_UOM
UNITSOFMEASUREX = IT_UOMX
INTERNATIONALARTNOS = it_mean
MATERIALLONGTEXT = IT_MLTX
TAXCLASSIFICATIONS =
RETURNMESSAGES =
PRTDATA =
PRTDATAX =
EXTENSIONIN =
EXTENSIONINX =
read table it_return with key TYPE = 'S'.
if sy-subrc = 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT =
IMPORTING
RETURN =
*else.
*CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'
IMPORTING
RETURN =
endif.
WRITE:/ IT_RETURN-TYPE,
2 IT_RETURN-ID,
22 IT_RETURN-NUMBER,
25 IT_RETURN-MESSAGE.
IT_RETURN-LOG_NO,
IT_RETURN-LOG_MSG_NO,
IT_RETURN-MESSAGE_V1,
IT_RETURN-MESSAGE_V2,
IT_RETURN-MESSAGE_V3,
IT_RETURN-MESSAGE_V4,
IT_RETURN-PARAMETER,
IT_RETURN-ROW,
IT_RETURN-FIELD,
IT_RETURN-SYSTEM.
Thanks
Jagadeesh.G
Similar Messages
-
VB11 - CREATE MATERIAL DETERMINATION. need a BAPI for this
i have to develop an inbound interface program to create VB11 - CREATE MATERIAL DETERMINATION.
Can any one suggest me if there is any BAPI for doing this insted of going to BDC program .
Regards
RaadhaI don't think there will be any BAPI to do the update as material determination is itself dynamic depending upon which determination type you chose from - the key field combination changes accordingly. Just like updating pricing doesn't have any general purpose BAPI.
I think BDC is the only way out here -
USER EXIT - Sample Program or Material
Hai,
I don't know User Exit Programs.So, If anybody have Sample Program or Material, please send them to me...Finding the User Exit:
Code SE18 is used to Identify the BADI available.
Look for the string 'CL_EXITHANDLER' in the standard program. This is a class which has a method 'GET_INSTANCE' which is used to trigger BADI's from the Standard Program. The interface parameter for this static method 'EXIT_NAME' is used to pass the BADI to the method.
Open Standard Program and do a global search 'CL_EXITHANDLER'.
SE18 > give the BADI name found through above search.
CUSTOMER_ADD_DATA > which has a method SAVE_DATA.
T.Code SE19 is used to Implement BADI.
SE19 > give the implementation name > Give the Definition name as CUSTOMER_ADD_DATA and the Short Text.
User Exit
Exits are basically the hooks whcih SAP has provided to add your own code. There are two types of Exits:
1. Customer exits: Implemented as Function Modules within z includes. Anybody can change it and no access key is required.
2. User Exit: Implemented as subroutines within includes (any include except y or z includes). You need access for the specific include and then you can any subroutine (user exit) within that Include.
BADIs are the enhanced version of user exits where the same logic is implemented via classes and object (OOP)
Enchancement point is the latest once introduces with ECC6.0 . Not very sure about that but you can change it without any access key.
Please go through the following link which will help you understand the exits in a much better way:
http://help.sap.com/saphelp_nw04/helpdata/en/bf/ec07a25db911d295ae0000e82de14a/content.htm
http://www.sap-img.com/abap/what-is-the-difference-between-smod-and-cmod.htm
http://sap.niraj.tripod.com/id21.html
http://help.sap.com/saphelp_nw04/helpdata/en/c8/1975cc43b111d1896f0000e8322d00/frameset.htm
http://www.sap-img.com/ab038.htm
User Exits.
http://www.erpgenie.com/sap/abap/code/abap26.htm
http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
http://www.sapgenie.com/abap/code/abap26.htm
http://www.sap-img.com/abap/what-is-user-exits.htm
http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
http://www.easymarketplace.de/userexit.php
http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
http://www.sappoint.com/abap/userexit.pdfUser-Exit
customer exits
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f1a7e790-0201-0010-0a8d-f08a4662562d
Menu Exit.
http://www.sappoint.com/abap/spmp.pdf
http://www.sappoint.com/abap/userexit.pdf
http://www.sapdevelopment.co.uk/enhance/mod_sapmenu.htm
http://www.sapdevelopment.co.uk/enhance/enhancehome.htm
USER EXIT
http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
http://www.sapgenie.com/abap/code/abap26.htm
http://www.sap-img.com/abap/what-is-user-exits.htm
http://wiki.ittoolbox.com/index.php/HOWTO:Implement_a_screen_exit_to_a_standard_SAP_transaction
http://www.easymarketplace.de/userexit.php
http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
http://www.sappoint.com/abap/userexit.pdfUser-Exit
http://www.sap-img.com/ab038.htm
http://help.sap.com/saphelp_46c/helpdata/en/64/72369adc56d11195100060b03c6b76/frameset.htm
http://www.sap-img.com/abap/a-short-tutorial-on-user-exits.htm
http://www.sap-img.com/abap/what-is-user-exits.htm
http://expertanswercenter.techtarget.com/eac/knowledgebaseAnswer/0,295199,sid63_gci982756,00.html
Field Exit
If you are in 4.7 and up follow this
1. Run report RSMODPRF
2. Run on the selection screen
3. In list Field Exit > Create
4. Give your data element
5.System will generate the FM FIELD_EXIT_XXXXX
6. Activate it.
7. Select your field exit and assign to your program and screen
8. Select again .. Field exit > Activate
If you are in version below 4.7
1. CMOD
2. Go to >Text enhancment > Field exit
then follow the same step from 3 onwards as given above.
Menu Exit
Procedure for Creating MENU Exits.
1) To get into Area Menu Maintenance Screen Type SE43 T.Code in Command
Line.
2) In Area Menu Paramenter type 'S000' (S triple Zero)
3) Then Press Change Icon in Application Tool Bar. Then It may ask for
Access Key or it may display "Specify Processing mode" window. If it ask
for the Access Key Check for the availability of OSS Note and apply to open
Standard SAP Menu to include MENU Exits. Otherwise, if it display "Specify
Processing mode" window with Three Push Button. In which select "Change" and
proceed further.
4) Then it will display "Information" window with the following information
"Caution : The Original Language of the structure is German (editing lang. :
English) ". Then press "Enter Key to proceed further.
5) Then you will get into "Edit Area Menu S000".
6) for eg:- Expand Tools Menu.
7) Then Press ABAP Workbench <Icon>.
8) Then you will get into ABAP Workbench Menu Tree.
9) Then Expand Utilities Menu.
10) In the last line you will find one MENU EXIT Provision to include your
own menu. "Node Text Not Found" This text can be change by double Clicking
that. There you can find the T.Code. Here for Eg:- "+DW4".
11) for eg: - Here change the Text to "Sample Menu Exit" and then note down
the T.Code "+DW4".
12) Then Save with Change Request Number and come out of Transaction SE43.
13) Then Goto Transaction SE93.
14) Then type T.Code "+DW4" and press Create.
15) Then proceed further to create transaction called "+DW4".
I hope this could help you in Creating Menu Exit...
Creating menu exits
http://help.sap.com/saphelp_nw04/helpdata/en/c8/19762743b111d1896f0000e8322d00/content.htm
http://help.sap.com/saphelp_nw2004s/helpdata/en/83/7a18cbde6e11d195460000e82de14a/frameset.htm
Regards, -
Runtime error in LSMW to create Material Master
Hi all,
I am trying to create Material No. using direct input method in lsmw. The program name is RMDATIND. But while executing the last step i.e Start Direct input program I am getting a runtime error
"A RAISE statement in the program "SAPLMG25" raised the exception
condition "NOT_FOUND".
Since the exception was not intercepted by a superior
program, processing was terminated."
I have checked all the steps of lsmw. Any idea why this specific error is coming?Are you able to create the material manually with the data. If you have checked the basic data view then i would check to see if base unit of measure is mandatory and if its being passed/mapped properly for the material you are creating.
-
Creating Materialized View in Toad
As with every new endeavor - come new questions.
I am trying to create a materialized view via toad (first time doing this). Now - toad is great, since it provides a kind-of wizard interface. Hence, one doesn't have to completely code in the create statement, with all of the options, etc.
Instead, in toad, one can (via the schema browser), go into the Materialized Views tab and click on create new. This opens a window with 6 tabs: Basic Info, Refresh Info, Physical Attributes, Query, Partitions & Subpartition Template.
In the Basic Info, one can put a check mark next to some of the following options:
-Build Deffered
-Parallel
-Cache
-Logging
-Using index
-Allow updates
etc.
I have read that build deferred refers to whether or not you would like the view to be created automatically or to be deferred.
Anyways, I tried to find Toad documentation to explain each of the options in-detail. No success. Hence, am researching each part piece by piece.
But - here is my question:
In the Query tab, we are asked to specify a query. I am assuming that the query does not have to be a full query, beginning with CREATE MATERIALIZED VIEW mv_table1 REFRESH FAST etc...
Since in this 'wizard', we are providing the MV name at the top of the dialog box, we are checking the 'options' in the other tabs, etc.
And so, I assumed that the query should merely be a select query in the window mentioned above.
So I entered the following:
select * from table1@remote_db;
When I go to verify the syntax, I get the error message: ORA_00911: invalid character. It seems to be pointing to my db_link (remote_db). I have been using this link throughout many places, w/o any problems.
Has anyone created a MV in toad before? Any links to good toad documentation would be helpful as well.
Thanks.(This is fun... ;))
For anyone endeavoring this in the future, below I have attached the prerequisites required in order to create a materialized view (can also be found @ http://download-uk.oracle.com/docs/cd/B14117_01/server.101/b10759/statements_6002.htm):
Prerequisites
The privileges required to create a materialized view should be granted directly rather than through a role.
To create a materialized view in your own schema:
You must have been granted the CREATE MATERIALIZED VIEW system privilege and either the CREATE TABLE or CREATE ANY TABLE system privilege.
You must also have access to any master tables of the materialized view that you do not own, either through a SELECT object privilege on each of the tables or through the SELECT ANY TABLE system privilege.
To create a materialized view in another user's schema:
You must have the CREATE ANY MATERIALIZED VIEW system privilege.
The owner of the materialized view must have the CREATE TABLE system privilege. The owner must also have access to any master tables of the materialized view that the schema owner does not own (for example, if the master tables are on a remote database) and to any materialized view logs defined on those master tables, either through a SELECT object privilege on each of the tables or through the SELECT ANY TABLE system privilege.
To create a refresh-on-commit materialized view (ON COMMIT REFRESH clause), in addition to the preceding privileges, you must have the ON COMMIT REFRESH object privilege on any master tables that you do not own or you must have the ON COMMIT REFRESH system privilege.
To create the materialized view with query rewrite enabled, in addition to the preceding privileges:
If the schema owner does not own the master tables, then the schema owner must have the GLOBAL QUERY REWRITE privilege or the QUERY REWRITE object privilege on each table outside the schema.
If you are defining the materialized view on a prebuilt container (ON PREBUILT TABLE clause), then you must have the SELECT privilege WITH GRANT OPTION on the container table.
The user whose schema contains the materialized view must have sufficient quota in the target tablespace to store the master table and index of the materialized view or must have the UNLIMITED TABLESPACE system privilege.
When you create a materialized view, Oracle Database creates one internal table and at least one index, and may create one view, all in the schema of the materialized view. Oracle Database uses these objects to maintain the materialized view data. You must have the privileges necessary to create these objects. -
Names of interface tables and interface programs of oracle modules
Hi all,
i need urgent and accurate information about the names of interface tables and interface programs of the following oracle modules,R12, or either ther are custom made. Any accurate link refering to the desire information would be much appreciated.
Plus i need a clear and simple definition and purpose of interface tables and interface program and by what other names are they known in industry.
Data Object,Oracle Module
Chart of Accounts,Oracle General Ledger
Trial Balance,Oracle General Ledger
Supplier Master,Oracle Payables
Open Supplier Invoices,Oracle Payables
Open Supplier Credit/ Debit Memos,Oracle Payables
Open Supplier Advances,Oracle Payables
Bank Master,Oracle Cash Management
Customer Master,Oracle Receivable
Asset Categories,Oracle Assets
Asset Master,Oracle Assets
Item Master,Oracle Inventory
Item Categories,Oracle Inventory
Sub Inventory and Locators,Oracle Inventory
Item On Hand Balances,Oracle Inventory
Item wise Per unit Cost,Oracle Inventory
Bill of Material,Oracle Discrete Manufacturing
Departments,Oracle Discrete Manufacturing
Operations,Oracle Discrete Manufacturing
Routings,Oracle Discrete Manufacturing
Resources,Oracle Discrete Manufacturing
Overheads,Oracle Discrete Manufacturing
Employee Master,Approval Hierarchy
Approval Hierarchy,Approval Hierarchy
Open Customer Invoices,Oracle Receivables
Open Customer Credit/ Debit Memos,Oracle Receivables
Open Customer Advances,Oracle Receivables
Pending Requisitions,Oracle Purchasing
Pending Purchase Orders,Oracle Purchasing
Open Sales Orders,Oracle Order Management
Price List,Oracle Order ManagementHi;
Its metalink note you need to login metalink wiht valid CSI(customer Support Identifier) number to can se note via using note number.
Please see:
Oracle EBS Based and Interface tables
Oracle EBS Based and Interface tables
Regard
Helios -
R12 Invoice Distributions not in table after Payable Open Interface Program
Hello,
I have inserted data in AP_INVOICES_INTERFACE and AP_INVOICE_LINES_INTERFACE and launched Payable Open Interface Program.
All my invoices has been successfully processed.
Just after completion of import program, i query an invoice on apps and all the Distribution lines are displayed when i click on "All Distribution" button BUT when i query the table AP_INVOICE_DISTRIBUTIONS_ALL by the invoice_id, no records are displayed.
Its only when i press the button save on Apps or when i validate the invoice that i can see records in the table AP_INVOICE_DISTRIBUTIONS.
Please help.. need to know where these lines are stored initially because i need to perform a post-import update on the attributes at INVOICE_DISTRIBUTION level.
thanksI believe that is standard functionality. You can create a request set to run the Invoice Validation Program after your import is successfully done.
Carl Hammond had posted a similar one before. You can search the forum for that message, otherwise, he probably has the right answer.
Thanks
Nagamohan -
'BAPI_GOODSMVT_CREATE' takes more time for creating material document
Hi Experts,
I m using 'BAPI_GOODSMVT_CREATE' in my custom report, it takes more time for creating Material documents.
Please let me know if there is any option to overcome this issue.
Thanks in advance
Regards,
LeoHi,
please check if some of following OSS notes are not valid for your problem:
[Note 838036 - AFS: Performance issues during GR with ref. to PO|https://service.sap.com/sap/support/notes/838036]
[Note 391142 - Performance: Goods receipt for inbound delivery|https://service.sap.com/sap/support/notes/391142]
[Note 1414418 - Goods receipt for customer returns: Various corrections|https://service.sap.com/sap/support/notes/1414418]
The other idea is not to commit each call, but executing commit of packages e.g. after 1000 BAPI calls.
But otherwise, I am afraid you can not do a lot about performance of standard BAPI. Maybe there is some customer enhancement which is taking too long inside the BAPI, but this has to be analysed by you. To analyse performance, just execute your program via tr. SE30.
Regards
Adrian -
'BAPI_GOODSMVT_CREATE' takes more time for creating material document for the 1st time
Hi Experts,
I am doing goods movement using BAPI_GOODSMVT_CREATE in my custom code.
Then there is some functional configuration such that, material documents and TR and TO are getting created.
Now I need to get TO and TR numbers from LTAK table passing material documnt number and year, which I got from above used BAPI.
The problem I am facing is very strange.
Only for the 1st time, I am not finding TR and TO values in LTAK table. And subsequent runs I get entries in LTAK in there is a wait time of 5 seconds after bapi call.
I have found 'BAPI_GOODSMVT_CREATE' takes more time for creating material document with similar issue, but no solution or explanation.
Note 838036 says something similar, but it seems obsolete.
Kindly share your expertise and opinions.
Thanks,
AnilHi,
please check if some of following OSS notes are not valid for your problem:
[Note 838036 - AFS: Performance issues during GR with ref. to PO|https://service.sap.com/sap/support/notes/838036]
[Note 391142 - Performance: Goods receipt for inbound delivery|https://service.sap.com/sap/support/notes/391142]
[Note 1414418 - Goods receipt for customer returns: Various corrections|https://service.sap.com/sap/support/notes/1414418]
The other idea is not to commit each call, but executing commit of packages e.g. after 1000 BAPI calls.
But otherwise, I am afraid you can not do a lot about performance of standard BAPI. Maybe there is some customer enhancement which is taking too long inside the BAPI, but this has to be analysed by you. To analyse performance, just execute your program via tr. SE30.
Regards
Adrian -
Create material master get error message
Hello Guys,
I get the error message as below when i create material master . can you help me?
error message
nternal error in FORM/FUNCTION ckms_buffer_write in position 19 with RC 0
Message no. C+099
Procedure
Please inform your system administrator.
Thanks and best regards,
AlengaoDebug the program with help of ABAPer and check it.
Also pls check these NOTES,
414204, 933809, 390655,0001096890
0001126497
0001164684
0001230454
Edited by: Afshad Irani on Aug 12, 2010 3:12 PM -
Unable to create material master
Hi
I tried creating material master using tcode MM01. I have done the basic config to start using MM (i am a FICO guy).
When i create the material master, and try to save, it opens another window of "ABAP Debugger Controls Session" and I am not sure what to do there...when i exit from the debugger screen, it takes me back to SAP Easy Access Menu...
any idea guys why this error is coming.
thanks
VikashHi,
You should get your ABAPer to sit down with you while you are maintaining material master creation and once the same error was encountered, you shall ask them to turn off the 'debugging mode' of the related program.
Cheers,
HT -
I created three database tables in PostgreSQL database and interfaced it with JDBC.
In the interface program, I queried the program to retrieve data from two tables. I got results from the first table, but did not get any result from the second table. Rather, the system sent the following error message: Exception in thread "main" java.sql.SQLException: ERROR: parser: parse error at or
near "mdas_ar_coments"
at org.postgresql.core.QueryExecutor.executeV2(QueryExecutor.java:289)
Mdas_ar_coments is the name of the second table. I have checked the names, there is no spelling mistake in both the database tables and interface program.
Please, let me know how to query two or more tables in a JDBC interface program.
Thanks.Please show me how you are attempting to query two tables using JDBC.
-
Network Routings not imported through "Bill and Routing Interface" program
Hi,
I wanted to import Network routing to Shop Floor Manager hence I am using bom_op_routings_interface and then I am running "Bill and Routing Interface" program. But import program is errored with "You do not have access to items of type standard, so you may not be able to insert, update or delete routings ot this item type".
Highly appreciate if any one clarify why this error is issued by Import program.
Thanks in advance.
Subramanyam.Please see if the solution in (BOM API Bom_Rtg_Pub.Process_Rtg is not Creating or Updating Maintenance Routings [ID 761976.1]) helps.
Thanks,
Hussein -
Creating material in multiple plants and storage locations
Hi Gurus,
I am wondering if someone could help me out in this issue,
I frequently get 1's and 2 materials creation requirement , is there any simple way , while creating material in MM01 , I could create/extend to all plants and storage locations.
I know we can use LSMW , but this is not bulk requirement,it is frequent but in 1or 2 nos.
Any help highly appriciated and rewared.
Thanks.Hi,
To my knowledge I doubt if both MM17 & MM50 can meet your need, as MM17 is to mass change the values already existing in the MMR, while MM50 is to extend the views in a given plant & not to extend across plants.
A suggestion would be to use the BAPI's -
BAPI_MATERIAL_SAVEDATA Create and Change Material Master Data
BAPI_MATERIAL_SAVEREPLICA BAPI for Mass Maintenance of Material Data
Give your requirement to your abaper & inform him / her to use the above BAPI's. I am sure your abaper can write a simple & user friendly program to meet your exact need.
Regards,
Vivek -
How to create material(mm01) through function module or bapi
Hi,
this is kiran iam sap fresher.Hi,
try this
*& Report ZKAR_MATMAS_BAPI
*& This program demonstrates how easy it is to create Material master
*& data using BAPI_MATERIAL_SAVEDATA
*& The program also generates a report post-execution displaying errors
*& as well as successful uploads
REPORT ZKAR_MATMAS_BAPI.
* 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 Information
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
*--- 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
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 IT_DATA.
* SELECTION SCREEN. *
SELECTION-SCREEN BEGIN OF BLOCK SCR1 WITH FRAME TITLE TEXT-111.
PARAMETER : P_FILE TYPE RLGRAP-FILENAME OBLIGATORY DEFAULT " Input File
'C:\Material_master.XLS'.
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 1 NO-DISPLAY,
P_ENDCOL TYPE I DEFAULT 100 NO-DISPLAY,
P_ENDROW TYPE I DEFAULT 32000 NO-DISPLAY.
SELECTION-SCREEN END OF BLOCK SCR1.
* AT SELECTION-SCREEN *
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
UNPACK IT_DATA-MATNR TO IT_DATA-MATNR.
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'.
* 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_MARCX-PLANT = IT_DATA-WERKS.
BAPI_MARCX-PUR_GROUP = 'X'.
* Accounting
BAPI_MBEW1-VAL_AREA = IT_DATA-WERKS.
BAPI_MBEW1-PRICE_CTRL = IT_DATA-VPRSV.
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 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 =
* STORAGELOCATIONDATAX =
* 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'.
WRITE: 'Successfully created material' ,IT_DATA-MATNR.
ENDIF.
ENDLOOP.
ENDFORM. " UPLOAD_MATMAS
Maybe you are looking for
-
ISE Web Authentication with Profile
Hi, I'm using Web Authentication with Cisco ISE 1.2.1 without problems. The Cisco ISE didn't find the endpoint in my internal endpoint store and continue with Web Authentication But when I enable the PSN with the Profile Server, the Cisco
-
XML document must have a top level element
Hi all, I have deployed my web services in 904. When I try to see the generated wsdl, I am seeing: XML document must have a top level element. in IE. Does anyone know why? Thanks.
-
Does not run from My Documents
I tried putting SQL Developer into My Documents so I can run it from any PC I am logged onto. Unfortunately is starts and quickly disappears without any error. The My Documents folder is on a network drive that is always available when I log onto a P
-
Set up Calibration Inspection in Inspection Interface
Hello, I'm currently designing an inspection interface "front panel" for a program that detects faults in caps. I've been having a look at some of the features that are offered in the interface and I was wondering if there is a way I can perform an e
-
i've read+follow all instruction about configuring instanClient... php.ini -> enable about oci path -> set path directory on my windows (based on directory which i extract oci.dll etc) and restart all system... and when i starting apache -> on phpinf