on 04-30-2013 3:33 PM
Hi everybody,
I sucessfully replicate UDOs with B1if, but I can't do it with user-defined tables of type "No object".
Please, can anyone help me?
I will be grateful for any help you can provide.
Fernanda
Hi Fernanda,
for UDTs you can use the standard B1 Event Mechanism. Just activate the B1EventMonitor and you will see events with pattern: <nameofyourUDT>.
Here is an example of an INBOUND definition for a UDT called @INBOUND:
<Inbound>
<DataRetrieval delret="true">
<method>Retrieval</method>
<adapter>JDBC</adapter>
<type>SQL</type>
<ruledoc/>
<JDBC_SQL>
<sql>select * from [@INBOUND] where Code = '$key'</sql>
</JDBC_SQL>
</DataRetrieval>
<Channel Id="INB_B1_EVNT_ASYN_EVT">
<type>SAP Business One</type>
<mode>Asynchronous</mode>
<trigger>B1Event</trigger>
<obj>INBOUND</obj>
<ident>B1 Event</ident>
<idpar>n.a.</idpar>
<idns/>
</Channel>
</Inbound>
The OUTBOUND definition for a UDT - if you don't have an UDO defined based on an UDT - is B1 via SQL:
<Outbound>
<Channel Id="OUT_B1">
<type>SAP Business One</type>
<format>B1i SQL</format>
</Channel>
<Successor Id="" Mode=""/>
<OUT_B1>
<sql>
<sqlmode>single</sqlmode>
</sql>
</OUT_B1>
</Outbound>
Your atom0 should have the following structure (which can be found in the B1i online help under phrase B1 outbound):
<B1out type="b1isql">
<SQL sqlmode="single/multiple">
<Table id="name" keylist="f1,f2,..." task="A" del="">
<Field id="name" value="field_value" wrapchar="true"/>
<Field id="fieldname" value="field_value" wrapchar=" false"/>
...
<Table id="name" keylist="f1,f2,..." task="I" del="">
<Field id="name" value="field_value" wrapchar="true "/>
<Field id="name" value="field_value" wrapchar="true "/>
...
</Table>
...
</Table>
<Table id="name" keylist="f1,f2,..." task="D" del="">
...
</Table>
...
</SQL>
</B1out>
B1out/@type
Mandatory root tag B1out, mandatory attribute with the value b1isql
SQL/@sqlmode
This is the mandatory tag SQL. The sqlmode attribute is also mandatory. Set the value to “single” or “multiple”. This flag is relevant for processing multiple SQL statements. The default is “multiple”.
Table
“Table” is a fixed value. Use it to define a database table record. You can define multiple tags. You can nest the tags to represent a father-child relationship.
Table/@id
The “id” attribute specifies the name of the database table.
Table/@keylist
The “keylist” attribute represents the specification of the primary key field name. If the primary key consists of multiple concatenated field values, enter a comma-separated list of all field names.
Table/@task
Specify the operation in the database.
Automatic detection decides whether an update or insert is necessary. The system detects the correct operation for each record separately using the definitions of the primary keys.
Table/@del
If the operation is “D”, define a comma-separated list of table names where the additional deletion happens. The prerequisite for this cascading deletion is the same primary key.
Field
“Field” is a fixed value for defining a field in the database table record. You can define multiple of these tags.
The “id” attribute specifies the name of the database table field.
Field/@value
The “value” attribute contains the value of the field.
Field/@wrapchar
It is the default that the value is wrapped by the apostrophe character. If you want not want this because for example, if the value contains a number, set wrapchar to false.
Best regards
Bastian
P.S.: of course inserting into UDTs via SQL statements should be done very carefully.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Dear experts,
could I use the same outbound method (B1isql) to Insert/Update an UDO and would that still be 'SAP-Conform'? I understand that usually I could use the B1 Service Method for UDOs, but the B1isql would just work much faster and also supports father-child table relationships.
Thanks, David
Hello there experts,
please help me how to give inbound for UDO replication via DIAPI and i have tried my own research and made a sample scenario but i keep getting he same error as :
DoQuery Source: SAPbobsCOM.Recordset.90.0 Description: 1). [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Invalid object name 'UDO'. 2). [Microsoft][ODBC Driver 13 for SQL Server][SQL Server]Statement(s) could not be prepared.
I can see that the Object name must have an prefix of [dbo].[@UDO]. but i dont know where i should give this in Inbound please help me push data into the sender payload . pleaseeeeeee
hope you guys will notice this message and help me out thanks in advance 🙂
hi!,
have you solved the problem?,
thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mariano,
yes, I follow the instructions from Maria Trinidad in this post: http://scn.sap.com/thread/2093543
I hope it help you
Fernanda
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.