OCI without SRM
Dear Folks,
In my company we dont have SRM, But user requesting to built OCI with supplier catalog, so i have configured web service ID & Description in SPRO - MM - Purchasing - Enviroment - Web serive - ID & Description. as below:
Now i can able to get the Catalog icon in the ME21n screen. IF i click the icon it goes to the site https://simplesystem.de/
but below given Access no, User & Password was not populated. So i struck in the Login screen itself.
please advice me is there any setting i missed out or any other developments i need to do.
i refered this OSS notes 1509352, but i cant get useful info.
Steps parameter Value of the parameters Type
10 https://simplesystem.de/ 0 - URL
20 f-index.jsp 2 - Fixed
30 Access no 7705561 2 - Fixed
40 User converteam-test 2 - Fixed
50 Password test 2 - Fixed
60 ~caller CTLG 2 - Fixed
70 ~OKCode ADDI 2 - Fixed
80 ~target _top 2 - Fixed
90 HOOK_URL 4 - Return URL
thanks in advance
M.Kannan.
Dear Masa,
Thanks a lot for your inputs...... it works & now i can able to login to the shopping cart site directly.
Please advice me how to transfer the selected items to SAP PO (R/3).
is there any development needs to done or any setting !
thanks in advance.
Regards
Kannan.M
Similar Messages
-
Hi all,
i was asked to verify if it is possible to implement a vendor integration without an SRM Server. The vendor offers a catalog that supports OCI.
We want to build a simple prototype that shows the vendors catalog, gets the data from it and processes the returned data.
In our ERP system (2004 and 2004s) I found the package BBP_WS_BASIS which contains sample implementations for the OCI. As far as I tried, I could not get the example apps running.
Unfortunately I was not able to to find any documentation on the package.
Has anyone experience with the package or in using OCI with ERP without SRM?
Any information might help.
bye
MichaelHi Michael,
I have just define the call structure in the IMG.
10 http://SDN.corpo.intra:50000/catalogue/catado 0 URL
15 action login 2 Fixed Value
16 standard_catalogue true 2 Fixed Value
20 login TOTO 2 Fixed Value
30 pwd TITI 2 Fixed Value
40 HOOK_URL 4 Return URL
50 ~OkCode ADDI 2 Fixed Value
60 ~target _top 2 Fixed Value
70 ~caller CTLG 2 Fixed Value
Kind regards,
Yann -
Catalog based procurement in ECC without SRM
What all are pre-reqsuisites for getting the functionality of Catalog based purchasing within ECC without SRM.
We can't find comprehensive document supporting this process on SAP website.
We need details regarding- hardware, portal??, netweaver settings, ECC config settings, business process steps, limitations of using catalogs within SAP ECC vs. separate SRM system
Can we load catalog from multiple suppliers wihin ECC including price management?Hi,
I am also very interested by the answers.
Regards,
Nathalie -
Problems with OCI without an environment (ORACLE_HOME not set)
System: Solaris 9, Sun-Fire-V440
Our application has Oracle 9i as one of the possible persistence backends. Oracle is not always available at all clients sites so we use dlopen/dlsym to access the required OCI functions in clntsh on demand. Moreover, the app is started by inetd, so there is no environment and ORACLE_HOME is not set. The result is that OCIEnvCreate fails and returns -1. Presumably libclntsh.so.9.0 looks for ORACLE_HOME and falls over when it doesn't find it.
Q: Is there a work around for this purely in terms of 9i version software?
One work around we've found is to install Instant Client. IC is intended to run in cases where there is no ORACLE_HOME set. This now acts as a gateway between our app and 9i. However, in order to make our app work with IC we've had to 'crle' the install path of IC. This is not so desirable because it adds to the admin burden.
Q. If the answer to the first question is 'no', is there another way of connecting to Oracle without modifying lib search paths?
I am including skeleton.cpp and the corresponding skeleton.ksh which demonstrates the problem.
Any advice is very much appreciated.
Adam
############## skeleton.cpp ########################
#include <stdlib.h>
#include <stdio.h>
#include <dlfcn.h>
#include <link.h>
#include <oci.h>
#include <oratypes.h>
int main(int argc, char *argv[])
OCIEnv *envhp;
sword (*MY_OCIEnvCreate)(...);
char* dlerr;
sword ociret;
if(argc < 1)
exit(1);
char dllname = (char )argv[1];
void *mydll = dlopen(dllname,RTLD_NOW|RTLD_GLOBAL);
if (mydll==NULL)
fprintf(stderr,"Error while loading Oracle module. dlopen() failed.\n"
"OS says: %s.\n",
(dlerr=dlerror())?dlerr:"");
exit(1);
MY_OCIEnvCreate = (sword(*)(...)) dlsym(mydll,"OCIEnvCreate");
if (MY_OCIEnvCreate == NULL)
fprintf(stderr,"Error while loading Oracle module function %s.\n"
"OS says: %s.\n",
"OCIEnvCreate",
(dlerr=dlerror())?dlerr:"");
exit(1);
ociret = MY_OCIEnvCreate(&envhp, OCI_DEFAULT, (dvoid *)0,
0, 0, 0, (size_t)0, (dvoid **)0);
if (OCI_SUCCESS != ociret)
fprintf(stderr, "OCI Error %ld occurred.\n", ociret);
exit(1);
return 0;
########### skeleton.ksh #####################
#!/bin/ksh -vx
ORA_DIR=/usr/opt/oracle/product/9.2.0.1.0
INSTCLI_DIR=/d0/adam/instantclient/instantclient10_1
# Make with 9i libs
CC -ldl -I$ORA_DIR/rdbms/demo -I$ORA_DIR/rdbms/public -o skeleton skeleton.cpp
if [[ $? -ne 0 ]]; then
print "ERROR: compile 1 failed"
exit 1
fi
# expect to succeed with ORACLE_HOME set and fail with ORACLE_HOME unset
export ORACLE_HOME=$ORA_DIR
skeleton $ORA_DIR/lib32/libclntsh.so
if [[ $? -ne 0 ]]; then
print "ERROR: unexpectedly failed in 9i on ORACLE_HOME set"
exit 1
fi
unset ORACLE_HOME
skeleton $ORA_DIR/lib32/libclntsh.so
if [[ $? -eq 0 ]]; then
print "ERROR: unexpectedly succeeded in 9i on ORACLE_HOME set"
exit 1
fi
# Make with Instance Client libs
CC -ldl -I$ORA_DIR/rdbms/demo -I$ORA_DIR/rdbms/public -o skeleton skeleton.cpp
if [[ $? -ne 0 ]]; then
print "ERROR: compile 2 failed"
exit 1
fi
# expect to succeed with ORACLE_HOME unset
skeleton $INSTCLI_DIR/libclntsh.so
if [[ $? -ne 0 ]]; then
print "ERROR: unexpectedly failed with Instance Client 10.1 and ORACLE_HOME set"
exit 1
fi
exit 0
############################################After some investigation I have found a surprisingly simple solution to this problem. When inetd exec's a process, it provides a bare bones environment that comes from the /etc/default/login file. This environment can be extended using putenv(3C). Thus after dlopen/dlsym of clntsh, the program calls putenv with "ORACLE_HOME=/usr/opt/oracle/product/9.2.0.1.0" as argument. OCIEnvCreate and other OCI calls work fine after this.
Adam -
Use of Open Catalog Interface (OCI) in ERP
Dear colleagues,
I am not sure if this is the right forum to post this question but can we use Open Catalog Interface (OCI) without having SRM directly in ECC 6.0? If yes what are the prerequisites, customizing, licensing etc.
What we are planning is end users will select material(s) he/she wants to procure from a catalog from a portal (not an SAP portal) and once this is done purchase requisition will be created in ERP system.
Regards
MelihECC6.0 MM does support OCI. This works on both the Purchase Req and PO. You can punchout from MM and shop from an OCI compliant source such as MDM, supplier hosted, other catalog tools and then this informaiton is pulled back into the Purchase Req or PO. OCI is delivered with ECC6.0 MM so there should not be any license issues.
Configuration is part of the catalog web service set up and this is where you maintain information such as URL, user id, password, etc. -
OCI Catalog Items not transfering to Work Order or PR in NWBC-HTML
Hello,
We currently have multiple OCI vendors set up in our SAP system. (We are running SAP 6 enhancement pack 5, and running traditional out of the box OCI, "not SRM". )
When we use Standard SAP and NWBC desktop client 3.5, we can order from catalog and items will transfer to components tab (if using Work Orders) or PR line items (if using ME51N) with no issues.
When we use the OCI for Work Order or ME51N in NWBC-HTML, we can access the Vendor catalogs and select the parts, but the shopping cart items will not transfer to SAP
Can anyone explain what maybe causing the Catalog to return nothing in the Work Order Components tab or ME51N in NWBC-HTML.
Help will be very much appreciated.
Thank you.Hi Masa,
I tested both already and it doesn't make any difference. My issue is most probably related to shared_memory as i've read some SAP notes. I've been able to find a workaround for our issue but i feel it isn't a complete solution for our issue.
We're running a multi client environment and as it seems shared memory is enabled. Shared memory works properly within the EP however in the NWBC it doesn't. After enabling the paramaters for bypass inbound and bypass outbound handler the catalogs started working from within the NWBC aswell. However these paramaters aren't recommended if there isn't any need by SAP?
If you have any clue on shared_memory and our issue then your inputs are very much appreciated however I feel this issue will most likely be resolved via SP's / patches as the use of the NWBC for SRM is relatively new.
Kind regards,
Tim -
Configuring SRM SUS Application
Hi Experts,
I need your help and suggestions. please help me on that.
Current Deployment & Problem:
We have deployed “Supplier Collaboration 4.0” Business packages in portal. We could see there are Webdynpro Java and BSP iviews.
To load the BSP iviews in the portal, it requires SRM 7.01 system need to be given as “System Alias” in the portal iview configuration. Currently we don’t have SRM 7.01 system in our Landscape. So iviews are not visible in the portal.
Expected Version of Business package only for ECC:
Is it possible to get similar kind of Busineess package only for ECC with functionality of view purchase order, confirm purchase order, Attach Invoice against confirmed PO etc. Also is it possible to get webdynpro Java iviews or webdynpro ABAP iviews or UI5 iviews with Business package component.
Please clarify my doubt and provide any suggestions to proceed without SRM or SUS configuration.
Thanks for the help in advance.
Regards,
KarthickHave you got any chance to check here?
SAP BusinessObjects 4.0 Monitoring Configuration - Part(1)
SAP BusinessObjects 4.0 Monitoring Configuration - Part(2)
SAP BusinessObjects 4.0 Monitoring Configuration - Part(3)
You can get most of questions answered here -
We have SRM 5.0 being integrated with MDM5.5 for catalog management.
The business requirement is to have some relationship between catalog items like Bill of Materials, Sales Kits, Substitutes and Related Items etc. which MDM2.0 suports.
We would like to take these items to SRM shopping cart with their relationship intact and the dependency among the items is not disturbed by the requester/approver of the shopping cart.
However, we notice that the items with relation ship like Kit are broght from MDM to the Shopping cart in SRM, these items are broken down to each single line item and allows the requester to change these items. This is not ensuring the relationship among the items.
Fro Example: A Kit in MDM contains 10 items. But when it is brought to SRM shopping cart, these items become 10 line items and requester is able to delete / change the quantity, price etc.
Can anyone can help me how to ahcieve the functionality.
Following are being used by us:
MDM 5.5 SP5; SRM 5.0
RaoHello Rao,
No item type or relationship information is passed via OCI from SRM-MDM Catalog to SRM. I think you should implement customer field and BADI to handle it.
Regards,
Masa -
C/C++ OCI XML support examples
Hi all,
I'm trying to find some simple C/C++ examples of accessing XMLType columns from OCI. I'm interested in examples that show the basics like querying an XMLType column and inserting values into an XMLType column. I'm mainly interested in examples that deal with the XMLType column when the data is stored in the database as a CLOB though I'm not sure if the client side really cares about that.
My application is based on the 9i OCI client since we still need to support that so I think that some of the newer OCI XML calls will not be available. I'm already quite familiar with programming in OCI, and I'm in the process of adding support for XML to our applicaiton so I just need some sample code that shows the basics and then hopefully I can figure things out from there.
Any help would be much appreciated.
Thanks,
NickIt's possible to get XMLTYPE column in OCI without converting them to string or clob. I was able to do it by taking just the XDK headers and using only those functions declared there which are exposed by oci.dll directly. Here's the comment from my code:
<tt>
// Only calls which are defined in xmlproc.h (in xdb/include) as
// #define XmlXYZ which take an xctx as first param, and cast back
// xctx into xmlctxhead, then access the struct of function pointers,
// are accessible to a pure OCI / Instance Client app.
</tt>
Crystal clear, no? ;-)
The code below could be compiled with Instant Client augmented with xdk/include/*.h. It depends on a few classes and methods not listed (it's part of a bigger file), but if you program with OCI you should be able to replace them with something that works. It's quite rough, my own experimentation, before moving on to wrap all this messy C-code into nicer looking C++, but it shows that it can be done. Notice you need to init on Object mode, and given that it uses undocumented functions for the parsing, probably not supported at all by Oracle.
Anyways, I hope its useful to someone. --DD
PS: Sorry, looks like the forum garbles the code a little in HTML. don't know how to fix that. Maybe look at the source for the HTML.
<tt>
#include <xmlotn.h>
* \brief Replacement for official XmlSaveDom not accessible to Instant-Clients
* This method wraps calls to the unofficial XmlSaveDomVA method exposed by
* Oracle contexts, to work around the fact that XmlSaveDom is not accessible
* to applications deployed against Oracle's Instant Client runtime.
* The real XmlSaveDom may be taking advantage of more undocumented key/value
* pairs supported by underlying XmlSaveDomVA methods, to do proper error
* handling possibly, which may explain why XmlSaveDomVA does not return the
* number of bytes written, as advertised by XmlSaveDom's documentation.
static xmldocnode* myXmlLoadDom(xmlctx* xctx, xmlerr* err, ...) {
va_list v;
va_start(v, err);
xmldocnode*const rc = XmlLoadDomVA(xctx, err, v);
va_end(v);
return rc;
static xmldocnode* load_dom_from_string(
xmlctx* xctx, const char* doc_string, ub4 string_len
SystemTimer timer;
xmlerr err = XMLERR_OK;
xmldocnode*const doc = myXmlLoadDom(
xctx, &err,
"buffer", doc_string,
"buffer_length", string_len,
NULL // sentinel marking end of key/value pairs
if (err != XMLERR_OK || doc == NULL) {
cerr << "Error parsing XML string" << endl;
// throw?
cout << "loaded dom in " << timer << endl;
return doc;
static xmldocnode* load_dom_from_file(
xmlctx* xctx, const char* filename
SystemTimer timer;
xmlerr err = XMLERR_OK;
xmldocnode*const doc = myXmlLoadDom(
xctx, &err,
"file", filename,
NULL // sentinel marking end of key/value pairs
if (err != XMLERR_OK || doc == NULL) {
cerr << "Error parsing XML file " << filename << endl;
// throw?
cout << "loaded dom in " << timer << endl;
return doc;
static ubig_ora myXmlSaveDom(xmlctx* xctx, xmlerr* err, xmlnode* root, ...) {
SystemTimer timer;
va_list v;
va_start(v, root);
const ubig_ora rc = XmlSaveDomVA(xctx, err, root, v);
va_end(v);
cout << "saved dom in " << timer << endl;
return rc;
// TODO: On truncation, retry with increasingly larger heap buffer
// and re-attempt serialization.
static std::string save_dom_to_string(
xmlctx* xctx, xmlnode* root,
bool add_xmldecl = true,
ub4 indent_step = 2,
ub4 indent_level = 0,
bool prune_children = false,
const char* eol = "\n"
xmlerr err = XMLERR_OK;
const ub4 max_len = 2048;
oratext doc_string[max_len] = {0};
boolean xmldecl = add_xmldecl? TRUE: FALSE;
boolean prune = prune_children? TRUE: FALSE;
const ubig_ora byte_count = myXmlSaveDom(
xctx, &err, root,
"buffer", doc_string,
"buffer_length", max_len,
"xmldecl", xmldecl, // ignored
"prune", prune,
// Using UTF-16 yields an empty string.
// Using AL32UTF8 adds XML decl previously missing (with encoding="UTF-8")
// despite requesting no xmldecl explicitly (was ignored anyway...), but
// only if passing the doc node, not the root node.
"output_encoding", "AL32UTF8",
//"eol", eol, // LPX-00019: property "eol" unknown
"indent_step", indent_step,
"indent_level", indent_level, // ignored
NULL // sentinel marking end of key/value pairs
// Number of bytes written not returned, as advertised.
// So deduce silent truncation from the end of the string
// (nor is err set to XMLERR_SAVE_OVERFLOW...)
const bool was_truncated = doc_string[max_len - 1] == '\0'
&& doc_string[max_len - 2] != '\0';
const size_t actual_len = strlen((const char*)doc_string);
cout << "byte_count return = " << byte_count
<< "; actual length = " << actual_len
<< "; truncated = " << (was_truncated? "true": "false")
<< endl;
if (err == XMLERR_OK && actual_len > 0) {
if (was_truncated) {
cerr << "Truncation during XML serialization to a string" << endl;
return std::string((const char*)doc_string, actual_len);
return std::string();
static void xml_dom_basics_main(int argc, const char* argv[]) {
SystemTimer* disconnect_timer; // time "shutdown"
Environment env(OCI_OBJECT);
env.connect(zusername, zpassword, zdatabase);
SystemTimer timer; // don't time connecting to DB
OCIError*const errhp = env.errhp;
xmlctx*const xctx = OCIXmlDbInitXmlCtx(
env.envhp, env.svchp, errhp,
(ocixmldbparam *)0, 0
if (!xctx) {
checkerr(OCI_ERROR, errhp);
// TODO: Manipulate XML context???
// FIXME: Instant Client SDK does not ship with xml.h...
// Following call compiles (because include xmlotn.h) but doesn't link
// with Instant Client SDK, because oci.dll doesn't export this symbol.
//const boolean is_unicode = XmlIsUnicode(xctx);
** Same issue here, XmlLoadDom not available from oci.dll...
// Parse "dummy" document
xmlerr err = XMLERR_OK;
oratext doc_string[] = "<dummy/>";
xmldocnode* doc = XmlLoadDom(
xctx, &err,
"buffer", doc_string,
"buffer_length", sizeof(doc_string)-1,
"validate", TRUE,
NULL // sentinel indicating last key/value pair
if (!doc) {
cerr << "XML parsing failed: rc = " << err << endl;
// Only calls which are defined in xmlproc.h (in xdb/include) as
// #define XmlXYZ which take an xctx as first param, and cast back
// xctx into xmlctxhead, then access the struct of function pointers,
// are accessible to a pure OCI / Instance Client app.
oratext* dummy_root = 0;//[] = "dummy";
oratext* dummy_uri = 0;
xmldtdnode* dummy_dtd = 0;
xmlerr err = XMLERR_OK;
xmldocnode* doc = XmlCreateDocument(
xctx, dummy_uri, dummy_root, dummy_dtd, &err
if (!doc) {
cerr << "XML parsing failed: rc = " << err << endl;
} else {
oratext root_tag[] = "root";
xmlelemnode* root = XmlDomCreateElem(xctx, doc, root_tag);
XmlDomAppendChild(xctx, doc, root);
oratext child_tag[] = "child";
xmlelemnode* child = XmlDomCreateElem(xctx, doc, child_tag);
XmlDomAppendChild(xctx, root, child);
xmltextnode* text = XmlDomCreateText(xctx, doc, (oratext*)"foo");
XmlDomAppendChild(xctx, child, text);
// Add a second child, but without text
child = XmlDomCreateElem(xctx, doc, child_tag);
XmlDomAppendChild(xctx, root, child);
xmlelemnode* root2 = XmlDomGetDocElem(xctx, doc);
assert(root == root2);
xmlnodelist* children = XmlDomGetElemsByTag(
xctx, root, (oratext*)"child"
ub4 child_count = XmlDomGetNodeListLength(xctx, children);
if (child_count > 0) {
xmlnode* child0 = XmlDomGetNodeListItem(xctx, children, 0);
if (XmlDomHasChildNodes(xctx, child0)) {
// I assume it's text
xmlnode* text0 = XmlDomGetFirstChild(xctx, child0);
const oratext* value = XmlDomGetNodeValue(xctx, text0);
ub4 value2_length = 0;
const oratext* value2 = XmlDomGetNodeValueLen(xctx, text0, 0, 0, &value2_length);
cout << "value = " << value << "; #value2 = " << value2_length << endl;
XmlDomFreeNodeList(xctx, children);
oratext doc_string[2048];
const ubig_ora byte_count =
(*XML_CB(xctx)->XML_SAVE_DOM_VA_CB)(
//XmlSaveDomVA(
xctx, &err, root,
"buffer", doc_string,
"buffer_length", 2048,//sizeof(doc_string) - 1,
NULL
cout << "byte_count = " << byte_count << endl;
if (err == XMLERR_OK && byte_count > 0) {
doc_string[sizeof(doc_string) - 1] = '\0'; // just in case
cout << "doc = \n" << doc_string << endl;
const std::string root_string = save_dom_to_string(xctx, root);
cout << "root = \n" << root_string << endl;
const std::string doc_string = save_dom_to_string(xctx, doc, false, 2, 2, false, "\r\n");
cout << "doc = \n" << doc_string << endl;
xmldocnode* doc2 = load_dom_from_string(
xctx, doc_string.c_str(), (ub4)doc_string.size()
const std::string doc_string2 = save_dom_to_string(xctx, doc2);
cout << "doc2 = \n" << doc_string2 << endl;
XmlFreeDocument(xctx, doc);
XmlFreeDocument(xctx, doc2);
// Try accessing freed doc on purpose (Hmmm, works...)
//const std::string doc_string3 = save_dom_to_string(xctx, doc2);
//cout << "doc3 = \n" << doc_string3 << endl;
// 28 KB file. If file doesn't exist, simply prints out an error
cout << "\n\n===== Loading / parsing 28 KB XML file =====" << endl;
xmldocnode* xsd = load_dom_from_file(xctx, "georaster.xsd");
cout << "XSD = \n" << save_dom_to_string(xctx, xsd, false, 2, 2, true, "\r\n");
XmlFreeDocument(xctx, xsd);
// 1,870 KB
cout << "\n\n===== Loading / parsing 1,870 KB XML file =====" << endl;
xmldocnode* witsml1 = load_dom_from_file(
xctx, "medium.xml"
cout << "WITSML1 = \n" << save_dom_to_string(xctx, witsml1, false, 2, 2, true);
XmlFreeDocument(xctx, witsml1);
// 68,911 KB
cout << "\n\n===== Loading / parsing 68,911 KB XML file =====" << endl;
xmldocnode* witsml2 = load_dom_from_file(
xctx, "big.xml"
cout << "WITSML2 = \n" << save_dom_to_string(xctx, witsml2, false, 2, 2, true);
XmlFreeDocument(xctx, witsml2);
OCIXmlDbFreeXmlCtx(xctx);
cout << "xml_dom_basics_main: " << timer << endl;
// For some reason, disconnecting after reading a large XML file
// is very slow... Loading the 68 MB file above, in about 8 seconds,
// results in the shutdown to take around 28 seconds!!!
disconnect_timer = new SystemTimer; // time "shutdown"
cout << "\n\nDisconnecting from DB, terminating OCI environment... " << endl;
cout << "'shutdown' time: " << *disconnect_timer << endl;
delete disconnect_timer;
template <class T> T* checkxml(T* node, xmlerr err) {
xmlnode* xml_node = node;
if (!xml_node) {
throw std::runtime_error("null node");
if (err != XMLERR_OK) {
throw std::runtime_error("XML error code returned");
return node;
static void xml_dom_select_main(int argc, const char* argv[]) {
const oratext charset[] = "AL32UTF8";
Environment env(OCI_OBJECT, charset, charset);
env.connect(zusername, zpassword, zdatabase);
SystemTimer timer; // don't time connecting to DB
OCIError*const errhp = env.errhp;
xmlctx*const xctx = OCIXmlDbInitXmlCtx(
env.envhp, env.svchp, errhp,
(ocixmldbparam *)0, 0
if (!xctx) {
checkerr(OCI_ERROR, errhp);
throw std::runtime_error("Cannot initialize XML context");
// Allocate Statement Handle
OCIStmt* selecthp = 0;
checkerr(
OCIHandleAlloc(
(dvoid *) env.envhp, (dvoid **) &selecthp,
OCI_HTYPE_STMT, 0, 0
env.errhp
// Prepare Statement
const char *const sql = "SELECT id, doc FROM xml_tab";
checkerr(
OCIStmtPrepare(
selecthp, env.errhp,
(const OraText*)sql, (ub4) strlen(sql),
(ub4) OCI_NTV_SYNTAX, (ub4) OCI_DEFAULT
env.errhp
// Defines
ub4 id = 0;
OCIDefine* define_id = 0;
checkerr(
OCIDefineByPos(
selecthp, &define_id, env.errhp, 1, &id, sizeof(id), SQLT_UIN,
(dvoid *) 0, (ub2 *) 0, (ub2 *) 0, OCI_DEFAULT
env.errhp
OCIDefine* define_doc = 0;
checkerr(
OCIDefineByPos(
selecthp, &define_doc, env.errhp, 2, 0, sizeof(point_typ), SQLT_NTY,
(dvoid *) 0, (ub2 *) 0, (ub2 *) 0, OCI_DEFAULT
env.errhp
OCIType* xmltype_tdo = 0;
const oratext xmltype_name[] = "XMLTYPE";
checkerr(
OCITypeByName(
env.envhp, env.errhp, env.svchp,
0, 0, // schema name (default schema when 0)
xmltype_name, (ub4)strlen((const char*)xmltype_name),
0, 0, // version name (ignored)
OCI_DURATION_SESSION,
OCI_TYPEGET_ALL,
&xmltype_tdo // connection (service specific)
env.errhp
xmldocnode* doc = 0;
ub4 doc_size = 0;
OCIInd* p_doc_ind = 0;
ub4 doc_ind_size = 0;//(ub4)sizeof(point_ind);
checkerr(
OCIDefineObject(
define_doc, env.errhp, xmltype_tdo,
//(void**)&p_pt, &pt_size, (void**)&p_pt_ind, &pt_ind_size
(void**)&doc, 0, (void**)&p_doc_ind, 0
env.errhp
// Execute (scalar) Select Statement
checkerr(
OCIStmtExecute(
env.svchp, selecthp, env.errhp, (ub4) 0 /* specific to select... */, (ub4) 0,
(CONST OCISnapshot *) NULL, (OCISnapshot *) NULL,
OCI_DEFAULT
env.errhp,
OCI_NO_DATA // TODO: Test with a select that returns no rows,
// and specifying 0 iters, to see if it returns
// OCI_SUCCESS, or OCI_NO_DATA
// TODO: Describe the select-list.
// TODO: Fix this screwed up logic!
sword fetch_rc = OCI_NO_DATA;
size_t row_count = 0;
do {
checkerr(
fetch_rc = OCIStmtFetch2(
selecthp, env.errhp, (ub4)1,
(ub2)OCI_FETCH_NEXT, (sb4)0, (ub4)OCI_DEFAULT
env.errhp, OCI_NO_DATA
if (fetch_rc != OCI_NO_DATA) {
++row_count;
if (p_doc_ind && *p_doc_ind == OCI_IND_NULL) {
cerr << "\nXML doc#" << id << " is NULL" << endl;
continue;
cout << "\nXML doc#" << id << ":\n" << save_dom_to_string(xctx, doc) << endl;
while (fetch_rc != OCI_NO_DATA);
if (doc != NULL) {
// When last row contained no document (NULL in XMLTYPE column),
// the doc pointer is somehow reset to 0, and OCIObjectFree complains
// about it: OCI-21560: argument 3 is null, invalid, or out of range
checkerr(
OCIObjectFree(env.envhp, env.errhp, doc, 0),
env.errhp
// Necessary to free documents when selecting XMLTYPE,
// sinced used OCIObjectFree above?
//XmlFreeDocument(xctx, doc);
// Free Statement Handle
checkerr(
OCIHandleFree(selecthp, OCI_HTYPE_STMT),
env.errhp
OCIXmlDbFreeXmlCtx(xctx);
cout << "xml_dom_select_main: " << timer << endl;
static void xml_dom_insert_main(int argc, const char* argv[]) {
Environment env(OCI_OBJECT);
env.connect(zusername, zpassword, zdatabase);
SystemTimer timer; // don't time connecting to DB
OCIError*const errhp = env.errhp;
xmlctx*const xctx = OCIXmlDbInitXmlCtx(
env.envhp, env.svchp, errhp,
(ocixmldbparam *)0, 0
if (!xctx) {
checkerr(OCI_ERROR, errhp);
throw std::runtime_error("Cannot initialize XML context");
xmlerr err = XMLERR_OK;
xmldocnode* doc = checkxml(XmlCreateDocument(xctx, 0, 0, 0, &err), err);
xmlelemnode* root = checkxml(XmlDomCreateElem(xctx, doc, (oratext*)"root"), err);
XmlDomAppendChild(xctx, doc, root);
xmlattrnode* version = checkxml(XmlDomCreateAttr(xctx, doc, (oratext*)"version", (oratext*)"0.1"), err);
XmlDomAppendChild(xctx, root, version);
xmlelemnode* child = checkxml(XmlDomCreateElem(xctx, doc, (oratext*)"child"), err);
XmlDomAppendChild(xctx, root, child);
xmltextnode* text = checkxml(XmlDomCreateText(xctx, doc, (oratext*)"baz"), err);
XmlDomAppendChild(xctx, child, text);
// Add a second child, but without text
child = checkxml(XmlDomCreateElem(xctx, doc, (oratext*)"child"), err);
XmlDomAppendChild(xctx, root, child);
xmlattrnode* empty = checkxml(XmlDomCreateAttr(xctx, doc, (oratext*)"empty", (oratext*)"true"), err);
XmlDomAppendChild(xctx, child, empty);
const std::string doc_string = save_dom_to_string(xctx, doc);
cout << "doc = \n" << doc_string << endl;
// Insert this document into the DB
// Allocate Statement Handle
OCIStmt* selecthp = 0;
checkerr(
OCIHandleAlloc(
(dvoid *) env.envhp, (dvoid **) &selecthp,
OCI_HTYPE_STMT, 0, 0
env.errhp
// Prepare Statement
const char *const sql = "INSERT INTO xml_tab (id, doc) VALUES (:1, :2)";
checkerr(
OCIStmtPrepare(
selecthp, env.errhp,
(const OraText*)sql, (ub4) strlen(sql),
(ub4) OCI_NTV_SYNTAX, (ub4) OCI_DEFAULT
env.errhp
// Binds
ub4 id = 101;
OCIBind* bind_id = 0;
checkerr(
OCIBindByPos(
selecthp, &bind_id, env.errhp, 1, &id, sizeof(id), SQLT_UIN,
(dvoid *) 0, (ub2 *) 0, (ub2 *) 0, (ub4) 0, (ub4 *) 0, OCI_DEFAULT
env.errhp
OCIBind* bind_doc = 0;
checkerr(
OCIBindByPos(
selecthp, &bind_doc, env.errhp, 2, 0, sizeof(point_typ), SQLT_NTY,
(dvoid *) 0, (ub2 *) 0, (ub2 *) 0, (ub4) 0, (ub4 *) 0, OCI_DEFAULT
env.errhp
OCIType* xmltype_tdo = 0;
const oratext xmltype_name[] = "XMLTYPE";
checkerr(
OCITypeByName(
env.envhp, env.errhp, env.svchp,
0, 0, // schema name (default schema when 0)
xmltype_name, (ub4)strlen((const char*)xmltype_name),
0, 0, // version name (ignored)
OCI_DURATION_SESSION,
OCI_TYPEGET_ALL,
&xmltype_tdo // connection (service specific)
env.errhp
//xmldocnode* doc = 0;
ub4 doc_size = 0;
OCIInd doc_ind = OCI_IND_NOTNULL;
OCIInd* p_doc_ind = &doc_ind;
ub4 doc_ind_size = 0;//(ub4)sizeof(point_ind);
checkerr(
OCIBindObject(
bind_doc, env.errhp, xmltype_tdo,
//(void**)&p_pt, &pt_size, (void**)&p_pt_ind, &pt_ind_size
(void**)&doc, 0, (void**)&p_doc_ind, 0
env.errhp
// Execute (scalar) Select Statement
checkerr(
OCIStmtExecute(
env.svchp, selecthp, env.errhp, (ub4) 1, (ub4) 0,
(CONST OCISnapshot *) NULL, (OCISnapshot *) NULL,
OCI_DEFAULT
env.errhp,
OCI_NO_DATA // TODO: Test with a select that returns no rows,
// and specifying 0 iters, to see if it returns
// OCI_SUCCESS, or OCI_NO_DATA
// Commit transaction
checkerr(
OCITransCommit(env.svchp, env.errhp, 0),
env.errhp
XmlFreeDocument(xctx, doc);
OCIXmlDbFreeXmlCtx(xctx);
cout << "xml_dom_insert_main: " << timer << endl;
</tt> -
System copy (backend and/or SRM)
Hi
we have more than one backend connected to SRM. Sometimes our Q-system is copied (refreshed) from the productive system. If we do a alligned copy (all systems SRM and ERPs) the new Q-landscape is of course fine.
In future, we'd like to decouple the system refreshments. Meaning: only one backend will be refreshed without SRM, or only SRM will be refreshed without the backends.
Does anybody have experienc with that? What do you do to reconstruct testable data (mainly POs) in both cases?
Info: We're using the extended classic scenario.
br,
Richardmy understanding is that you need to copy the connected system ( ECC) along with SRM. If only one system is refreshed, then the material master replication and other similar configuration whcih are based on GUIDs may not work properly. I have never tried /worked on system whcih are refreshed the way you have mentioned.
Pl let me know your views.
Thanks
velu -
Hi,
We are planning develop a custom catalog using ABAP WebDynpro and link with SRM using OCI. SRM expects the return in HTML Form from external catalog, to fill the shopping cart. Is it possible to pass the HTML Form with shopping basket information from ABAP Webdynpro to SRM ?
Thanks
MeenalHi,
Look on this thread: OCI custom Form(HOOK_URL) Data Return
Re: OCI Background (Cross-Catalog) Search HTML Required
Regards,
Marcin Gajewski -
Hi everyone,
There is a query regarding OCI mapping. How do we get to see the images and some other fields in the SRM even when we dont manually nor by default get the images to be mapped in the OCI mappings.
We dont even get to see the images field in the drop-down list through which we mapped the MDM field with the SRM fields.
Can any one explain why.....
Full Marks will be given to relevant answers.....Hi Swapnil,
There are a number of pre-mapped (hard-coded) fields, which you cannot change:
OCI Field SRM-MDM Field
NEW_ITEM-PRICE : Price Amount
NEW-ITEM_CURRENCY : Price Currency
NEW-ITEM_PRICEUNIT : Price Base Quantity UOM
NEW_ITEM-UNIT : Price Base Quantity
NEW_ITEM-PURCHORG : Purchasing Organization
NEW_ITEM-PURCHINFREC : Purchasing Info Record ID
NEW_ITEM-CONTRACT : Contract ID
NEW_ITEM-CONTRACT_ITEM : Contract Item ID
NEW-ITEM_ATTACHMENT : Hyperlink-URL
NEW-ITEM_ATTACHMENT_TITLE : Hyperlink-URL Description
For displaying images on SRM, OCI fields are already pre-configured (Pre-Mapped) as mentioned below:
NEW-ITEM_ATTACHMENT : Hyperlink-URL
NEW-ITEM_ATTACHMENT_TITLE :Hyperlink-URL Description
But only the thing is that for displaying the images on the SRM, you have to make some changes in Configuration UI as follows:
Login into Configuration UI by using user as Master.
then Go to Costomize display tab, select 'List View' and add Image field and save the configuration.
For more information, Just refer the "Business Scenario Configuration Guide of SRM-MDM".
Hope this will help you
Any more help then please let me know.
Regards,
Saurabh...
Reward with points If found helpfull. -
Integrate with a vendor from SAP ECC 6.0 for 'PunchOut' functionality
Hi Friends,
Pardon me if I have made mistakes in using the terminology in my posting. We just use SAP ECC 6.0 and no SRM. We want to integrate with a vendor for so-called Punchout. Our users will click a URL link from our Intranet and it takes them to Vendor's catalog website. They can choose items and create a shopping cart. The website will return us a unique Shopping Cart ID with list of Items in cxml format. We can use that information and create PO. We are not familiar with cxml format and how to process the PO. Is this a standard functionality in SRM ? I don't think we can install SRM since we don't have Business suite license. If any one has experience with above scenario, ie connecting to vendor's cataglog from SAP ECC 6.00 without SRM, can you pl share with us ?
NiranjanHi Masa
Thanks for the reply. The vendor supports OCI as well. However, since I was not familiar with it, I was thinking to go with cXML. When I opened the OCI pdf in the URL that you mentioned, it talks about SRM server. Like I had mentioned earlier, we don't use SRM at our company here. Can you let me know in couple of steps how OCI works and how fast we can implement in our ERP ECC 6.0 environment ? I am delighted to note that one of the companies in Japan implemented in 4 hours.
Thanks for your help,
Niranjan -
Hi all,
I know it is possible to access MDM catalogs via ECC6.0 (so without SRM) however my question is whether it is possible to fill certain backend business documents (network, internal order etc.) with content from the MDM internal catalog(s).
We are a utilities company and want to have our internal customers and contractors to plan their materials (so with material nr's) at our warehouse (this is, we want to add extra materials (by using the internal catalog) to networks and internal orders which have automatically been filled by bills of material).
I suppose the challenge in this case is the transfer via the OCI interface.
Obviously this is not a standard process but i would like to know if anyone has any suggestions to help me out, for example by using customer specific enhancements.
And if so, what should be done.....
Thanks a million.
Grtz,
Mark
Edited by: Fleskesm on Mar 22, 2010 8:06 AMHi,
You have two options available:
- Upgrade EP6.0 SP2
- A fresh EP7.0 installation
If it's a fresh installation, you may have to transport the content from EP6.0 SP2 to EP7.0. Please refer to : http://help.sap.com/saphelp_nw2004s/helpdata/en/c5/56599164d0c04cb566ba0e2d7ed55c/frameset.htm
And incase you are just upgrade EP6.0 SP2 to EP7.0 then you may access the following link:
https://websmp102.sap-ag.de/upgrade-ep
https://websmp110.sap-ag.de/upgradenw2004s
Though the portal content in PCD is never lost, just to be on the safer side, you may export all the content in the form of an .epa file and save it to your local machine or any other server before you start an upgrade. The option of saving it to you local machine appears as a link "Download" when you are done with the export. This information is also available in Export Portal Content section: http://help.sap.com/saphelp_nw2004s/helpdata/en/c5/56599164d0c04cb566ba0e2d7ed55c/frameset.htm
Hope that helps. Let me know if you are facing any issues.
Regards,
Sunil -
How do you confirm the validity of a Env or SvcCtx Handle
I have a fairly large legecy system using mostly ProC. However, we have found some use for OCI in some specific instances. So we have used the SQLEnvGet and SqlSvcCtxGet to get an Environment and Service Context handle of an existing ProC Session to allow us to use OCI without opening a second Db connection.
However, for some strange, but legitimate reason there will be a ProC Connect Release, and shortly after a new Connect which invalidates my handles.
The problem is, in the area where I use these handles, I know of no way of determining if this disconnect/connect event has occured and using these invalid handles causes some largely undesired results includeing core dumps.
Is there tools available that would allow me to check the validity of these handles before I attempt to use them?PSB Mktg wrote:
...If I did define my PMS Spot Channel then I did it by accident
You can tell if you have defined it by looking at your Channels palette. I would wager that it is not there based on your description.
http://www.planetphotoshop.com/working-with-spot-color-channels.html
As you have the suite, you might look at using Illustrator for logos. Photoshop is rarely used for logos.
Maybe you are looking for
-
How do I install the same e-mail address on my ipad as I have on my imac (snow leapord)
How do I install the same e-mail address on my ipad mini as I have on my imac (snow leopard)
-
Since last upgrade internet history will not clear
SSince last upgrade to my iPhone 4 the internet history will not clear. Tried usual things
-
Ok, Ive had problems with this for a while, first it would just shut off randomly, and then it got worse and started shutting off more often until now where it wont turn on. I know its not busted because I can hook it up to my computer and toss files
-
Dears; I did upgrade for the CUCM from version 4 to version 7 and I discover that the JTAPI and the CTI route points has been disappeared ! I do not know why? Now to create new JTAPI, do I have to do any thing on the PG? Or only to install it on the
-
My old PC died, I got a new windows 7 pc. I authorized new pc, The cloud music plays. Connect IPOD CLASSIC, asked me to erase or load I hit erase. Now I cant sync any songs to my IPOD nor can I burn a CD from a play list. Help I have no clue how to l