on 07-21-2014 3:39 PM
Hi experts,
I have a scenario which create a file when an order is create in Sap B1.
Now I would like add a comment in comment zone of this order only when some conditions are respected. So I want to update this order after his creation
Does anyone know how to do that?
Thanks
Best regards
Sarah
Hi Sarah,
one Option is to define a successor step for your B1->File Scenario.
This successor step will get triggered when your first Scenario is finished and you can use the result to update your order.
For more Information please open B1i online help (Help -> Online Help) and search for "predecessor".
Best regards
Bastian
P.S.: Another possibility could be the usage of an internal Queue or a timer-triggered Scenario.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sarah,
the easiest option is an upgrade to actual B1if patch, e.g. B1if for B1 9.0 pl12 using Framework Version 1.20.0.
Predecessor Inbound
The integration framework can provide result information of any transaction of a scenario step of the same scenario package as inbound information to a scenario step with predecessor inbound. The integration framework hands over information to the scenario step with predecessor inbound after it has finished processing the scenario step. It uses an internal queue to hand over information.
The integration framework controls the predecessor inbound processing using parameters of the inbound definition of the scenario step.
To define the inbound definition of the scenario step, select Scenarios→Scenario Step Design → [Inbound] → [Channel].The integration framework uses the following parameters to control the inbound processing:
Scenario Step Design – Inbound – Channel
● Inbound Type = Predecessor
● Process Mode = Asynchronous
● Process Trigger = Queue
● Identification Method = vBIU Name
● Identification Parameter = n.a.
● Identifier = Name of the scenario step identifier for which you want to control the result
● Identification Namespace = n.a.
If you have defined a scenario step with predecessor inbound, you can select this scenario step in any other scenario step as a successor in the outbound channel definition. Additionally you can select the successor mode in the outbound channel definition. You define, which information the integration framework hands over from the scenario step to the scenario step with predecessor inbound:
● Status information only
Status information contains the result of message processing, the message ID, start and end time, the sender and receiver SysId, the sender object type and receiver object type ID.
● Status information and payload
In addition to the status information, the scenario step with predecessor inbound also receives the payload.
● Status information and complete message
In addition to status information and the payload, the scenario step with predecessor inbound also receives the sender message and message processing results of the scenario step.
Example
With predecessor inbound you can design for example, the following:
● You have a scenario package with scenario step A and scenario step B.
● Scenario step A processes data from a sender to a receiver system.
● Scenario step B picks up the result of scenario step A and reports the result back to the sender system of scenario step A.
To design such a scenario step:
1. Design scenario step A with inbound, outbound definition and processing.
2. Design scenario step B with predecessor inbound
3. In the outbound channel definition of scenario step A, select scenario step B in the Successor field.
4. In the outbound channel definition of scenario step A, select which information you want to process in the Successor Mode field.
NOTE
Do not use the predecessor inbound to call another step in processing. Use the Put to Internal Queue atom instead. The purpose of predecessor inbound is only to control the result of a step.
Best regards
Bastian
Hi Bastian,
Thank you for the documentation.
I'm sorry but I'm very novice and I understand the successor option it's to join my two scenario step.
But I don't see how to update my order , how to add a comment automatically when the file and the order are create.
I know it's on my second scenario step after the creation of the file but I don't know which atom use and how do that
Do you have an idea please?
Thanks
Best regards
Sarah
Hi Sarah,
following structure updates an B1 Sales Order (object Id 17) for a defined B1 OUTBOUND in atom0:
<BOM xmlns="">
<BO>
<AdmInfo>
<Object>17</Object>
<Version>2</Version>
</AdmInfo>
<QueryParams>
<DocEntry>value of B1's DocEntry</DocEntry>
</QueryParams>
<Documents>
<row>
<Comments>stored as file successful</Comments>
</row>
</Documents>
</BO>
</BOM>
Best regards
Bastian
Hi Sarah,
please first design your Scenario (INBOUND = Predecessor, OUTBOUND = B1) and save it.
Open the automatically generated atom0 with a WEBDAV enabled XML Editor and paste the code above between:
<xsl:template name="transform">
...
</xsl:template>
</xsl:stylesheet>
Please don't get me wrong, but from my point of view the SCN is not the ideal forum for a general B1i enablement.
Please first check the SAP Partner Edge for B1i online training material:
My proposal is that you additionally contact your local SAP Business One product expert and request a B1i enablement session from SAP.
E.g. in DACH region our SAP Business One field organization coordinates B1i enablement workshops from SAP either as classroom or online trainings.
Best regards
Bastian
Hi Bastian
Thank you for your answer.
I put your code like you say but I have an error which say :" error in scenario step no receiver system"
Nevertheless I have defined a receiver system in set up.
Infact there is no payload section R in the message. Do you know how to adjust that please?
Thank you very much
Best regards
Sarah
User | Count |
---|---|
86 | |
7 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.