2007 Jul 18 2:59 PM
We have an Orders IDOC that we are sending to our customers.
The requirement here is, some of the IDOC's are needs to be released Immediately to our partners, based on the Amount (If the Amount Specified is Greater than "X" ), if not we want to collect those IDOC in the R/3 Application file system and want to release them at later stage. Whether it is Possible to do that?
If so how to do that please?
2007 Jul 18 3:47 PM
If you use my option. You need to create the following: -
2 Output Condition Types
2 Output Requirement programs linked to the above named conditions types. Linking one program to one condition and the other program to the other condition. These conditions programs will check the qty value and set the field SY-SUBRC = 4 if the output is not required.
Amend the partner profile(s) to have these two messages of which one is set to immedielty the other set to collect.
2007 Jul 18 3:11 PM
2007 Jul 18 3:22 PM
Hi,
Is the amount value available in the one of IDoc segment?
If it is then perhaps you can build a custom program to select all corresponding IDoc(s), read the IDoc content using FM IDOC_READ_COMPLETELY and validate the amount for each IDoc.
If the amount is greater than <check value> then you pass the corresponding IDoc(s) to the program RSEOUT00 using SUBMIT statement in order to release/send the IDoc(s) to your customer.
Please ensure your order outbound partner profile is setup to collect IDocs instead of trigger immediately.
Regards,
Ferry Lianto
2007 Jul 18 3:43 PM
Thanks Ferry. Yes the Amount Field is available in the IDOC itself.
I am not clear with the following point you mentioned
If it is then perhaps you can build a custom program to select all corresponding IDoc(s), read the IDoc content using FM IDOC_READ_COMPLETELY and validate the amount for each IDoc.
Once an IDOC is created in our R/3 System, we want to decide whether we are going to send them Immediately or we are going to send at a later time.
So I I have understood you properly, you are asking me to use the FM IDOC_READ_COMPLETEly, that will look into the IDOC and will decided whether that IDOC has to be send immediately or at the later stage.
-
Coming to the other answer, he says I can create two message types for Immediate Processing and for later Processing. How to do that.
-
Comparing the above two techniques, which one will be easy and cost effective?
Thanks
2007 Jul 18 3:28 PM
You could try with an Ouptut Requirement program. However it is the value of NAST-VSZTP that you would need to change.
If you cannot change the value of this NAST field. The only other option may be to have two seperate message types: -
ORDERS
ORDERS_COLLECT
The output requirement programs can be set at Output Condition level. You would have an output condition for each message. Then you would check the value in question.
If you return the field SY-SUBRC = 4 in the output requirement programs then this will stop the output being proposed.
2007 Jul 18 3:47 PM
If you use my option. You need to create the following: -
2 Output Condition Types
2 Output Requirement programs linked to the above named conditions types. Linking one program to one condition and the other program to the other condition. These conditions programs will check the qty value and set the field SY-SUBRC = 4 if the output is not required.
Amend the partner profile(s) to have these two messages of which one is set to immedielty the other set to collect.
2007 Jul 18 5:41 PM
Martin Thanks a bunch.
How does a Message type and Output condition types are different? are they same?
So you are asking me to create two message type. One for Immediate Processing and other one for collection.
Once we create two separate Message types, what exactly the ABAP programer has to do with that?
Thanks again.
2007 Jul 18 5:54 PM
Yedi,
Creating message types is the job of an ABAP programmer. If you want immediate processing or collection, you just need to check that in the partner profiles for those message types.
Once IDOCS are collected RBDMIDOC program will process all those idocs periodically.
Rgds,
Naren
2007 Jul 18 3:52 PM
Hi,
You are correct for understanding my idea ...
-
Coming to the other answer, he says I can create two message types for Immediate Processing and for later Processing. How to do that.
I am not familiar with Martin's proposal solution using message type ORDERS_COLLECT (it doesn't exits in my system ECC 5.0). But nothing wrong to try with Martin's help.
-
Comparing the above two techniques, which one will be easy and cost effective?
I can not answer this question as I am not familiar with message type ORDERS_COLLECT. But for my solution, you can code the program for less than an hour and perform quick unit testing
Regards,
Ferry Lianto
2007 Jul 18 3:56 PM
Sorry I wasn't clear. The two message types should be: -
ORDERS
ZORDERS_COLLECT
You will need to create a bespoke IDoc message.
If you write a program to read the IDoc data. How often do you want this program to run. Remember you want IDocs to be sent immedietly. Also how many Idocs are to be created.
If it was me I would use two message types.
2007 Jul 18 4:39 PM
Thank you Martin and Ferry for educating me. I will talk to my ABAP Team and will let them know your view points and will come back to you again.
Thanks for your Help. Appreciated.